removal of PIPS 'antiword' example pending a decision on its license
authorDominic Pinkman <dominic.pinkman@nokia.com>
Wed, 16 Jun 2010 10:24:13 +0100
changeset 10 d4524d6a4472
parent 9 59758314f811
child 11 5072524fcc79
removal of PIPS 'antiword' example pending a decision on its license
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/_p_i_p_s_2antiword_2group_2_bld_8inf_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/_p_i_p_s_2antiword_2sis_2backup__registration_8xml_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/antiword_8h_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/antiword_8mmp_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/antiword__reg_8rss_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/asc85enc_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/blocklist_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/chartrans_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/datalist_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/debug_8h_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/depot_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/dib2eps_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/dib2sprt_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/doclist_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/draw_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/draw_8h_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/drawfile_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/drawfile_8h_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/fail_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/fail_8h_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/finddata_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/findtext_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/fmt__text_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/fontinfo_8h_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/fontlist_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/fonts_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/fonts__r_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/fonts__u_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/guid-72f72df3-653c-414c-a357-7613ad8bc169.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/hdrftrlist_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/icons_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/imgexam_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/imgtrans_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/jpeg2eps_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/jpeg2sprt_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/listlist_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/main__ros_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/main__u_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/misc_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/notes_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/options_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/out2window_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/output_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/pdf_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/pictlist_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/png2eps_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/png2sprt_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/postscript_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/prop0_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/prop2_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/prop6_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/prop8_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/properties_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/propmod_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/riscos_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/rowlist_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/saveas_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/sectlist_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/startup_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/stylelist_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/stylesheet_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/summary_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/tabstop_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/text_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/unix_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/utf8_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/version_8h_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/word2text_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/wordconst_8h_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/worddos_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/wordlib_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/wordmac_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/wordole_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/wordtypes_8h_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/wordwin_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/xmalloc_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/xml_8c_source.html
Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-72f72df3-653c-414c-a357-7613ad8bc169.zip
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/_p_i_p_s_2antiword_2group_2_bld_8inf_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/group/bld.inf Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/group/bld.inf</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment">* ==============================================================================</span>
-<a name="l00003"></a>00003 <span class="comment">*  Name        : Bld.inf</span>
-<a name="l00004"></a>00004 <span class="comment">*  Part of     : Open C / antiword</span>
-<a name="l00005"></a>00005 <span class="comment">*  Interface   : </span>
-<a name="l00006"></a>00006 <span class="comment">*  Description : Word document conversion project</span>
-<a name="l00007"></a>00007 <span class="comment">*  Version     : </span>
-<a name="l00008"></a>00008 <span class="comment">*</span>
-<a name="l00009"></a>00009 <span class="comment">*  Copyright (c) 2005-2007 Nokia Corporation.</span>
-<a name="l00010"></a>00010 <span class="comment">*  This material, including documentation and any related </span>
-<a name="l00011"></a>00011 <span class="comment">*  computer programs, is protected by copyright controlled by </span>
-<a name="l00012"></a>00012 <span class="comment">*  Nokia Corporation.</span>
-<a name="l00013"></a>00013 <span class="comment">* ==============================================================================</span>
-<a name="l00014"></a>00014 <span class="comment">*/</span>
-<a name="l00015"></a>00015 PRJ_PLATFORMS
-<a name="l00016"></a>00016 WINSCW
-<a name="l00017"></a>00017 ARMV5
-<a name="l00018"></a>00018 GCCE
-<a name="l00019"></a>00019 
-<a name="l00020"></a>00020 PRJ_MMPFILES
-<a name="l00021"></a>00021 antiword.mmp
-<a name="l00022"></a>00022 
-<a name="l00023"></a>00023 
-<a name="l00024"></a>00024 PRJ_EXPORTS
-<a name="l00025"></a>00025 ..\data\Resources\8859-1.txt                                            \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\8859-1.txt
-<a name="l00026"></a>00026 ..\data\Resources\8859-10.txt                                           \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\8859-10.txt
-<a name="l00027"></a>00027 ..\data\Resources\8859-11.txt                                           \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\8859-11.txt
-<a name="l00028"></a>00028 ..\data\Resources\8859-13.txt                                           \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\8859-13.txt
-<a name="l00029"></a>00029 ..\data\Resources\8859-14.txt                                           \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\8859-14.txt
-<a name="l00030"></a>00030 ..\data\Resources\8859-15.txt                                           \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\8859-15.txt
-<a name="l00031"></a>00031 ..\data\Resources\8859-16.txt                                           \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\8859-16.txt
-<a name="l00032"></a>00032 ..\data\Resources\8859-2.txt                                            \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\8859-2.txt
-<a name="l00033"></a>00033 ..\data\Resources\8859-3.txt                                            \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\8859-3.txt
-<a name="l00034"></a>00034 ..\data\Resources\8859-4.txt                                            \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\8859-4.txt
-<a name="l00035"></a>00035 ..\data\Resources\8859-5.txt                                            \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\8859-5.txt
-<a name="l00036"></a>00036 ..\data\Resources\8859-6.txt                                            \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\8859-6.txt
-<a name="l00037"></a>00037 ..\data\Resources\8859-7.txt                                            \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\8859-7.txt
-<a name="l00038"></a>00038 ..\data\Resources\8859-8.txt                                            \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\8859-8.txt
-<a name="l00039"></a>00039 ..\data\Resources\8859-9.txt                                            \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\8859-9.txt
-<a name="l00040"></a>00040 ..\data\Resources\cp1250.txt                                            \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\cp1250.txt
-<a name="l00041"></a>00041 ..\data\Resources\cp1251.txt                                            \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\cp1251.txt
-<a name="l00042"></a>00042 ..\data\Resources\cp1252.txt                                            \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\cp1252.txt
-<a name="l00043"></a>00043 ..\data\Resources\cp437.txt                                                     \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\cp437.txt
-<a name="l00044"></a>00044 ..\data\Resources\cp850.txt                                                     \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\cp850.txt
-<a name="l00045"></a>00045 ..\data\Resources\cp852.txt                                                     \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\cp852.txt
-<a name="l00046"></a>00046 ..\data\Resources\cp862.txt                                                     \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\cp862.txt
-<a name="l00047"></a>00047 ..\data\Resources\cp864.txt                                                     \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\cp864.txt
-<a name="l00048"></a>00048 ..\data\Resources\cp866.txt                                                     \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\cp866.txt
-<a name="l00049"></a>00049 ..\data\Resources\Default                                                               \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\Default     
-<a name="l00050"></a>00050 ..\data\Resources\Example                                                               \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\Example
-<a name="l00051"></a>00051 ..\data\Resources\fontnames                                                     \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\fontnames
-<a name="l00052"></a>00052 ..\data\Resources\fontnames.russian                     \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\fontnames.russian
-<a name="l00053"></a>00053 ..\data\Resources\koi8-r.txt                                            \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\koi8-r.txt
-<a name="l00054"></a>00054 ..\data\Resources\koi8-u.txt                                            \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\koi8-u.txt
-<a name="l00055"></a>00055 ..\data\Resources\MacCyrillic.txt                               \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\MacCrillic.txt
-<a name="l00056"></a>00056 ..\data\Resources\MacRoman.txt                                  \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\MacRoman.txt
-<a name="l00057"></a>00057 ..\data\Resources\roman.txt                                                     \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\roman.txt   
-<a name="l00058"></a>00058 ..\data\Resources\Unicode01                                                     \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\Unicode01
-<a name="l00059"></a>00059 ..\data\Resources\Unicode15                                                     \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\Unicode15
-<a name="l00060"></a>00060 ..\data\Resources\UTF-8.txt                                                     \epoc32\winscw\c\<span class="keyword">private</span>\A0001323\Resources\UTF-8.txt
-<a name="l00061"></a>00061 
-<a name="l00062"></a>00062 
-<a name="l00063"></a>00063 <span class="comment">//sample data file</span>
-<a name="l00064"></a>00064 ..\data\sample.doc                                                                                      \epoc32\winscw\c\sample.doc
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/_p_i_p_s_2antiword_2sis_2backup__registration_8xml_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/sis/backup_registration.xml Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/sis/backup_registration.xml</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 &lt;?xml version=<span class="stringliteral">&quot;1.0&quot;</span> standalone=<span class="stringliteral">&quot;yes&quot;</span>?&gt;
-<a name="l00002"></a>00002 &lt;backup_registration&gt;
-<a name="l00003"></a>00003   &lt;system_backup/&gt;
-<a name="l00004"></a>00004   &lt;restore requires_reboot = <span class="stringliteral">&quot;no&quot;</span>/&gt;
-<a name="l00005"></a>00005 &lt;/backup_registration&gt;
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/antiword_8h_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,753 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/inc/antiword.h Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/inc/antiword.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * antiword.h</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2004 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Generic include file for project &#39;Antiword&#39;</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#if !defined(__antiword_h)</span>
-<a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor">#define __antiword_h 1</span>
-<a name="l00011"></a>00011 <span class="preprocessor"></span>
-<a name="l00012"></a>00012 <span class="preprocessor">#if defined(DEBUG) == defined(NDEBUG)</span>
-<a name="l00013"></a>00013 <span class="preprocessor"></span><span class="preprocessor">#error Exactly one of the DEBUG and NDEBUG flags MUST be set</span>
-<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* DEBUG == NDEBUG */</span>
-<a name="l00015"></a>00015 
-<a name="l00016"></a>00016 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
-<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;limits.h&gt;</span>
-<a name="l00018"></a>00018 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#include &quot;DeskLib:Font.h&quot;</span>
-<a name="l00020"></a>00020 <span class="preprocessor">#include &quot;DeskLib:Wimp.h&quot;</span>
-<a name="l00021"></a>00021 <span class="preprocessor">#include &quot;Desklib:Window.h&quot;</span>
-<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;drawfile.h&quot;</span>
-<a name="l00023"></a>00023 <span class="preprocessor">#define window_ANY      event_ANY</span>
-<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define icon_ANY        event_ANY</span>
-<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#include &lt;sys/types.h&gt;</span>
-<a name="l00027"></a>00027 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00028"></a>00028 <span class="preprocessor">#include &quot;wordconst.h&quot;</span>
-<a name="l00029"></a>00029 <span class="preprocessor">#include &quot;wordtypes.h&quot;</span>
-<a name="l00030"></a>00030 <span class="preprocessor">#include &quot;fail.h&quot;</span>
-<a name="l00031"></a>00031 <span class="preprocessor">#include &quot;debug.h&quot;</span>
-<a name="l00032"></a>00032 
-<a name="l00033"></a>00033 <span class="comment">/* Constants */</span>
-<a name="l00034"></a>00034 <span class="preprocessor">#if !defined(PATH_MAX)</span>
-<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor"> #if defined(__riscos)</span>
-<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor"> #define PATH_MAX                255</span>
-<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor"> #else</span>
-<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">  #if defined(MAXPATHLEN)</span>
-<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">  #define PATH_MAX              MAXPATHLEN</span>
-<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">  #else</span>
-<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">  #define PATH_MAX              255</span>
-<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">  #endif </span><span class="comment">/* MAXPATHLEN */</span>
-<a name="l00043"></a>00043 <span class="preprocessor"> #endif </span><span class="comment">/* __riscos */</span>
-<a name="l00044"></a>00044 <span class="preprocessor">#endif </span><span class="comment">/* !PATH_MAX */</span>
-<a name="l00045"></a>00045 
-<a name="l00046"></a>00046 <span class="preprocessor">#if !defined(CHAR_BIT)</span>
-<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#define CHAR_BIT                8</span>
-<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* CHAR_BIT */</span>
-<a name="l00049"></a>00049 
-<a name="l00050"></a>00050 <span class="preprocessor">#if !defined(TIME_T_MIN)</span>
-<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor">#define TIME_T_MIN              ((time_t)0 &lt; (time_t)-1 ?\</span>
-<a name="l00052"></a>00052 <span class="preprocessor">                                (time_t)0 :\</span>
-<a name="l00053"></a>00053 <span class="preprocessor">                                (time_t)1 &lt;&lt; (sizeof(time_t) * CHAR_BIT - 1))</span>
-<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* TIMER_T_MIN */</span>
-<a name="l00055"></a>00055 
-<a name="l00056"></a>00056 <span class="preprocessor">#if !defined(TIME_T_MAX)</span>
-<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor">#if defined(__TURBOC__) </span><span class="comment">/* Turbo C chokes on the subtraction below */</span>
-<a name="l00058"></a>00058 <span class="preprocessor">#define TIME_T_MAX              (LONG_MAX)</span>
-<a name="l00059"></a>00059 <span class="preprocessor"></span><span class="preprocessor">#else   </span><span class="comment">/* All others */</span>
-<a name="l00060"></a>00060 <span class="preprocessor">#define TIME_T_MAX              (~(time_t)0 - TIME_T_MIN)</span>
-<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __TURBOC__ */</span>
-<a name="l00062"></a>00062 <span class="preprocessor">#endif </span><span class="comment">/* TIME_T_MAX */</span>
-<a name="l00063"></a>00063 
-<a name="l00064"></a>00064 <span class="preprocessor">#if !defined(SIZE_T_MAX)</span>
-<a name="l00065"></a>00065 <span class="preprocessor"></span><span class="preprocessor">#define SIZE_T_MAX              (~(size_t)0)</span>
-<a name="l00066"></a>00066 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* SIZE_T_MAX */</span>
-<a name="l00067"></a>00067 
-<a name="l00068"></a>00068 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00069"></a>00069 <span class="preprocessor"></span><span class="preprocessor">#define FILE_SEPARATOR          &quot;.&quot;</span>
-<a name="l00070"></a>00070 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__dos) || defined(__CYGMING__)</span>
-<a name="l00071"></a>00071 <span class="preprocessor"></span><span class="preprocessor">#define FILE_SEPARATOR          &quot;\\&quot;</span>
-<a name="l00072"></a>00072 <span class="preprocessor"></span><span class="preprocessor">#else   </span><span class="comment">/* All others */</span>
-<a name="l00073"></a>00073 <span class="preprocessor">#define FILE_SEPARATOR          &quot;/&quot;</span>
-<a name="l00074"></a>00074 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00075"></a>00075 
-<a name="l00076"></a>00076 <span class="comment">/* PNG chunk names */</span>
-<a name="l00077"></a>00077 <span class="preprocessor">#define PNG_CN_IDAT             0x49444154</span>
-<a name="l00078"></a>00078 <span class="preprocessor"></span><span class="preprocessor">#define PNG_CN_IEND             0x49454e44</span>
-<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">#define PNG_CN_IHDR             0x49484452</span>
-<a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor">#define PNG_CN_PLTE             0x504c5445</span>
-<a name="l00081"></a>00081 <span class="preprocessor"></span>
-<a name="l00082"></a>00082 <span class="comment">/* The screen width */</span>
-<a name="l00083"></a>00083 <span class="preprocessor">#define MIN_SCREEN_WIDTH         45</span>
-<a name="l00084"></a>00084 <span class="preprocessor"></span><span class="preprocessor">#define DEFAULT_SCREEN_WIDTH     76</span>
-<a name="l00085"></a>00085 <span class="preprocessor"></span><span class="preprocessor">#define MAX_SCREEN_WIDTH        145</span>
-<a name="l00086"></a>00086 <span class="preprocessor"></span>
-<a name="l00087"></a>00087 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00088"></a>00088 <span class="preprocessor"></span><span class="comment">/* The scale factors as percentages */</span>
-<a name="l00089"></a>00089 <span class="preprocessor">#define MIN_SCALE_FACTOR         25</span>
-<a name="l00090"></a>00090 <span class="preprocessor"></span><span class="preprocessor">#define DEFAULT_SCALE_FACTOR    100</span>
-<a name="l00091"></a>00091 <span class="preprocessor"></span><span class="preprocessor">#define MAX_SCALE_FACTOR        400</span>
-<a name="l00092"></a>00092 <span class="preprocessor"></span>
-<a name="l00093"></a>00093 <span class="comment">/* Filetypes */</span>
-<a name="l00094"></a>00094 <span class="preprocessor">#define FILETYPE_MSWORD         0xae6</span>
-<a name="l00095"></a>00095 <span class="preprocessor"></span><span class="preprocessor">#define FILETYPE_DRAW           0xaff</span>
-<a name="l00096"></a>00096 <span class="preprocessor"></span><span class="preprocessor">#define FILETYPE_JPEG           0xc85</span>
-<a name="l00097"></a>00097 <span class="preprocessor"></span><span class="preprocessor">#define FILETYPE_POSCRIPT       0xff5</span>
-<a name="l00098"></a>00098 <span class="preprocessor"></span><span class="preprocessor">#define FILETYPE_SPRITE         0xff9</span>
-<a name="l00099"></a>00099 <span class="preprocessor"></span><span class="preprocessor">#define FILETYPE_TEXT           0xfff</span>
-<a name="l00100"></a>00100 <span class="preprocessor"></span>
-<a name="l00101"></a>00101 <span class="comment">/* The button numbers in the choices window */</span>
-<a name="l00102"></a>00102 <span class="preprocessor">#define CHOICES_DEFAULT_BUTTON           3</span>
-<a name="l00103"></a>00103 <span class="preprocessor"></span><span class="preprocessor">#define CHOICES_SAVE_BUTTON              2</span>
-<a name="l00104"></a>00104 <span class="preprocessor"></span><span class="preprocessor">#define CHOICES_CANCEL_BUTTON            1</span>
-<a name="l00105"></a>00105 <span class="preprocessor"></span><span class="preprocessor">#define CHOICES_APPLY_BUTTON             0</span>
-<a name="l00106"></a>00106 <span class="preprocessor"></span><span class="preprocessor">#define CHOICES_BREAK_BUTTON             6</span>
-<a name="l00107"></a>00107 <span class="preprocessor"></span><span class="preprocessor">#define CHOICES_BREAK_WRITEABLE          7</span>
-<a name="l00108"></a>00108 <span class="preprocessor"></span><span class="preprocessor">#define CHOICES_BREAK_UP_BUTTON          8</span>
-<a name="l00109"></a>00109 <span class="preprocessor"></span><span class="preprocessor">#define CHOICES_BREAK_DOWN_BUTTON        9</span>
-<a name="l00110"></a>00110 <span class="preprocessor"></span><span class="preprocessor">#define CHOICES_NO_BREAK_BUTTON         11</span>
-<a name="l00111"></a>00111 <span class="preprocessor"></span><span class="preprocessor">#define CHOICES_AUTOFILETYPE_BUTTON     14</span>
-<a name="l00112"></a>00112 <span class="preprocessor"></span><span class="preprocessor">#define CHOICES_HIDDEN_TEXT_BUTTON      22</span>
-<a name="l00113"></a>00113 <span class="preprocessor"></span><span class="preprocessor">#define CHOICES_WITH_IMAGES_BUTTON      17</span>
-<a name="l00114"></a>00114 <span class="preprocessor"></span><span class="preprocessor">#define CHOICES_NO_IMAGES_BUTTON        18</span>
-<a name="l00115"></a>00115 <span class="preprocessor"></span><span class="preprocessor">#define CHOICES_TEXTONLY_BUTTON         19</span>
-<a name="l00116"></a>00116 <span class="preprocessor"></span><span class="preprocessor">#define CHOICES_SCALE_WRITEABLE         25</span>
-<a name="l00117"></a>00117 <span class="preprocessor"></span><span class="preprocessor">#define CHOICES_SCALE_UP_BUTTON         26</span>
-<a name="l00118"></a>00118 <span class="preprocessor"></span><span class="preprocessor">#define CHOICES_SCALE_DOWN_BUTTON       27</span>
-<a name="l00119"></a>00119 <span class="preprocessor"></span>
-<a name="l00120"></a>00120 <span class="comment">/* The button numbers in the scale view window */</span>
-<a name="l00121"></a>00121 <span class="preprocessor">#define SCALE_CANCEL_BUTTON              1</span>
-<a name="l00122"></a>00122 <span class="preprocessor"></span><span class="preprocessor">#define SCALE_SCALE_BUTTON               0</span>
-<a name="l00123"></a>00123 <span class="preprocessor"></span><span class="preprocessor">#define SCALE_SCALE_WRITEABLE            3</span>
-<a name="l00124"></a>00124 <span class="preprocessor"></span><span class="preprocessor">#define SCALE_50_PCT                     5</span>
-<a name="l00125"></a>00125 <span class="preprocessor"></span><span class="preprocessor">#define SCALE_75_PCT                     6</span>
-<a name="l00126"></a>00126 <span class="preprocessor"></span><span class="preprocessor">#define SCALE_100_PCT                    7</span>
-<a name="l00127"></a>00127 <span class="preprocessor"></span><span class="preprocessor">#define SCALE_150_PCT                    8</span>
-<a name="l00128"></a>00128 <span class="preprocessor"></span>
-<a name="l00129"></a>00129 <span class="comment">/* Save menu fields */</span>
-<a name="l00130"></a>00130 <span class="preprocessor">#define SAVEMENU_SCALEVIEW              0</span>
-<a name="l00131"></a>00131 <span class="preprocessor"></span><span class="preprocessor">#define SAVEMENU_SAVEDRAW               1</span>
-<a name="l00132"></a>00132 <span class="preprocessor"></span><span class="preprocessor">#define SAVEMENU_SAVETEXT               2</span>
-<a name="l00133"></a>00133 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00134"></a>00134 <span class="preprocessor"></span><span class="comment">/* Margins for the PostScript version */</span>
-<a name="l00135"></a>00135 <span class="preprocessor">#define PS_LEFT_MARGIN                  (72 * 640L)</span>
-<a name="l00136"></a>00136 <span class="preprocessor"></span><span class="preprocessor">#define PS_RIGHT_MARGIN                 (48 * 640L)</span>
-<a name="l00137"></a>00137 <span class="preprocessor"></span><span class="preprocessor">#define PS_TOP_MARGIN                   (72 * 640L)</span>
-<a name="l00138"></a>00138 <span class="preprocessor"></span><span class="preprocessor">#define PS_BOTTOM_MARGIN                (72 * 640L)</span>
-<a name="l00139"></a>00139 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00140"></a>00140 
-<a name="l00141"></a>00141 <span class="comment">/* Macros */</span>
-<a name="l00142"></a>00142 <span class="preprocessor">#define STREQ(x,y)      (*(x) == *(y) &amp;&amp; strcmp(x,y) == 0)</span>
-<a name="l00143"></a>00143 <span class="preprocessor"></span><span class="preprocessor">#define STRNEQ(x,y,n)   (*(x) == *(y) &amp;&amp; strncmp(x,y,n) == 0)</span>
-<a name="l00144"></a>00144 <span class="preprocessor"></span><span class="preprocessor">#if defined(__dos) || defined(__EMX__)</span>
-<a name="l00145"></a>00145 <span class="preprocessor"></span><span class="preprocessor">#define STRCEQ(x,y)     (stricmp(x,y) == 0)</span>
-<a name="l00146"></a>00146 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00147"></a>00147 <span class="preprocessor"></span><span class="preprocessor">#define STRCEQ(x,y)     (strcasecmp(x,y) == 0)</span>
-<a name="l00148"></a>00148 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __dos or __EMX__ */</span>
-<a name="l00149"></a>00149 <span class="preprocessor">#define elementsof(a)   (sizeof(a) / sizeof(a[0]))</span>
-<a name="l00150"></a>00150 <span class="preprocessor"></span><span class="preprocessor">#define odd(x)          (((x)&amp;0x01)!=0)</span>
-<a name="l00151"></a>00151 <span class="preprocessor"></span><span class="preprocessor">#define ROUND4(x)       (((x)+3)&amp;~0x03)</span>
-<a name="l00152"></a>00152 <span class="preprocessor"></span><span class="preprocessor">#define ROUND128(x)     (((x)+127)&amp;~0x7f)</span>
-<a name="l00153"></a>00153 <span class="preprocessor"></span><span class="preprocessor">#define BIT(x)          (1UL &lt;&lt; (x))</span>
-<a name="l00154"></a>00154 <span class="preprocessor"></span><span class="preprocessor">#if !defined(max)</span>
-<a name="l00155"></a>00155 <span class="preprocessor"></span><span class="preprocessor">#define max(x,y)        ((x)&gt;(y)?(x):(y))</span>
-<a name="l00156"></a>00156 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* !max */</span>
-<a name="l00157"></a>00157 <span class="preprocessor">#if !defined(min)</span>
-<a name="l00158"></a>00158 <span class="preprocessor"></span><span class="preprocessor">#define min(x,y)        ((x)&lt;(y)?(x):(y))</span>
-<a name="l00159"></a>00159 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* !min */</span>
-<a name="l00160"></a>00160 
-<a name="l00161"></a>00161 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00162"></a>00162 <span class="preprocessor"></span><span class="comment">/* The name of the table font */</span>
-<a name="l00163"></a>00163 <span class="preprocessor">#define TABLE_FONT                      &quot;Corpus.Medium&quot;</span>
-<a name="l00164"></a>00164 <span class="preprocessor"></span><span class="comment">/* Names of the default fonts */</span>
-<a name="l00165"></a>00165 <span class="preprocessor">#define FONT_MONOSPACED_PLAIN           &quot;Corpus.Medium&quot;</span>
-<a name="l00166"></a>00166 <span class="preprocessor"></span><span class="preprocessor">#define FONT_MONOSPACED_BOLD            &quot;Corpus.Bold&quot;</span>
-<a name="l00167"></a>00167 <span class="preprocessor"></span><span class="preprocessor">#define FONT_MONOSPACED_ITALIC          &quot;Corpus.Medium.Oblique&quot;</span>
-<a name="l00168"></a>00168 <span class="preprocessor"></span><span class="preprocessor">#define FONT_MONOSPACED_BOLDITALIC      &quot;Corpus.Bold.Oblique&quot;</span>
-<a name="l00169"></a>00169 <span class="preprocessor"></span><span class="preprocessor">#define FONT_SERIF_PLAIN                &quot;Trinity.Medium&quot;</span>
-<a name="l00170"></a>00170 <span class="preprocessor"></span><span class="preprocessor">#define FONT_SERIF_BOLD                 &quot;Trinity.Bold&quot;</span>
-<a name="l00171"></a>00171 <span class="preprocessor"></span><span class="preprocessor">#define FONT_SERIF_ITALIC               &quot;Trinity.Medium.Italic&quot;</span>
-<a name="l00172"></a>00172 <span class="preprocessor"></span><span class="preprocessor">#define FONT_SERIF_BOLDITALIC           &quot;Trinity.Bold.Italic&quot;</span>
-<a name="l00173"></a>00173 <span class="preprocessor"></span><span class="preprocessor">#define FONT_SANS_SERIF_PLAIN           &quot;Homerton.Medium&quot;</span>
-<a name="l00174"></a>00174 <span class="preprocessor"></span><span class="preprocessor">#define FONT_SANS_SERIF_BOLD            &quot;Homerton.Bold&quot;</span>
-<a name="l00175"></a>00175 <span class="preprocessor"></span><span class="preprocessor">#define FONT_SANS_SERIF_ITALIC          &quot;Homerton.Medium.Oblique&quot;</span>
-<a name="l00176"></a>00176 <span class="preprocessor"></span><span class="preprocessor">#define FONT_SANS_SERIF_BOLDITALIC      &quot;Homerton.Bold.Oblique&quot;</span>
-<a name="l00177"></a>00177 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00178"></a>00178 <span class="preprocessor"></span><span class="comment">/* The name of the table font */</span>
-<a name="l00179"></a>00179 <span class="preprocessor">#define TABLE_FONT                      &quot;Courier&quot;</span>
-<a name="l00180"></a>00180 <span class="preprocessor"></span><span class="comment">/* Names of the default fonts */</span>
-<a name="l00181"></a>00181 <span class="preprocessor">#define FONT_MONOSPACED_PLAIN           &quot;Courier&quot;</span>
-<a name="l00182"></a>00182 <span class="preprocessor"></span><span class="preprocessor">#define FONT_MONOSPACED_BOLD            &quot;Courier-Bold&quot;</span>
-<a name="l00183"></a>00183 <span class="preprocessor"></span><span class="preprocessor">#define FONT_MONOSPACED_ITALIC          &quot;Courier-Oblique&quot;</span>
-<a name="l00184"></a>00184 <span class="preprocessor"></span><span class="preprocessor">#define FONT_MONOSPACED_BOLDITALIC      &quot;Courier-BoldOblique&quot;</span>
-<a name="l00185"></a>00185 <span class="preprocessor"></span><span class="preprocessor">#define FONT_SERIF_PLAIN                &quot;Times-Roman&quot;</span>
-<a name="l00186"></a>00186 <span class="preprocessor"></span><span class="preprocessor">#define FONT_SERIF_BOLD                 &quot;Times-Bold&quot;</span>
-<a name="l00187"></a>00187 <span class="preprocessor"></span><span class="preprocessor">#define FONT_SERIF_ITALIC               &quot;Times-Italic&quot;</span>
-<a name="l00188"></a>00188 <span class="preprocessor"></span><span class="preprocessor">#define FONT_SERIF_BOLDITALIC           &quot;Times-BoldItalic&quot;</span>
-<a name="l00189"></a>00189 <span class="preprocessor"></span><span class="preprocessor">#define FONT_SANS_SERIF_PLAIN           &quot;Helvetica&quot;</span>
-<a name="l00190"></a>00190 <span class="preprocessor"></span><span class="preprocessor">#define FONT_SANS_SERIF_BOLD            &quot;Helvetica-Bold&quot;</span>
-<a name="l00191"></a>00191 <span class="preprocessor"></span><span class="preprocessor">#define FONT_SANS_SERIF_ITALIC          &quot;Helvetica-Oblique&quot;</span>
-<a name="l00192"></a>00192 <span class="preprocessor"></span><span class="preprocessor">#define FONT_SANS_SERIF_BOLDITALIC      &quot;Helvetica-BoldOblique&quot;</span>
-<a name="l00193"></a>00193 <span class="preprocessor"></span><span class="comment">/* The name of the antiword directories and the font information file */</span>
-<a name="l00194"></a>00194 <span class="preprocessor">#if defined(__dos)</span>
-<a name="l00195"></a>00195 <span class="preprocessor"></span><span class="preprocessor">#define GLOBAL_ANTIWORD_DIR     &quot;C:\\antiword&quot;</span>
-<a name="l00196"></a>00196 <span class="preprocessor"></span><span class="preprocessor">#define ANTIWORD_DIR            &quot;antiword&quot;</span>
-<a name="l00197"></a>00197 <span class="preprocessor"></span><span class="preprocessor">#define FONTNAMES_FILE          &quot;fontname.txt&quot;</span>
-<a name="l00198"></a>00198 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__amigaos)</span>
-<a name="l00199"></a>00199 <span class="preprocessor"></span><span class="preprocessor">#define GLOBAL_ANTIWORD_DIR     &quot;SYS:.antiword&quot;</span>
-<a name="l00200"></a>00200 <span class="preprocessor"></span><span class="preprocessor">#define ANTIWORD_DIR            &quot;.antiword&quot;</span>
-<a name="l00201"></a>00201 <span class="preprocessor"></span><span class="preprocessor">#define FONTNAMES_FILE          &quot;fontnames&quot;</span>
-<a name="l00202"></a>00202 <span class="preprocessor"></span><span class="preprocessor">#elif defined(N_PLAT_NLM)</span>
-<a name="l00203"></a>00203 <span class="preprocessor"></span><span class="preprocessor">#define GLOBAL_ANTIWORD_DIR     &quot;SYS:/antiword&quot;</span>
-<a name="l00204"></a>00204 <span class="preprocessor"></span><span class="preprocessor">#define ANTIWORD_DIR            &quot;antiword&quot;</span>
-<a name="l00205"></a>00205 <span class="preprocessor"></span><span class="preprocessor">#define FONTNAMES_FILE          &quot;fontname.txt&quot;</span>
-<a name="l00206"></a>00206 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__vms)</span>
-<a name="l00207"></a>00207 <span class="preprocessor"></span><span class="preprocessor">#define GLOBAL_ANTIWORD_DIR     &quot;/usr/share/antiword&quot;</span>
-<a name="l00208"></a>00208 <span class="preprocessor"></span><span class="preprocessor">#define ANTIWORD_DIR            &quot;antiword&quot;</span>
-<a name="l00209"></a>00209 <span class="preprocessor"></span><span class="preprocessor">#define FONTNAMES_FILE          &quot;fontnames&quot;</span>
-<a name="l00210"></a>00210 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__BEOS__)</span>
-<a name="l00211"></a>00211 <span class="preprocessor"></span><span class="preprocessor">#define GLOBAL_ANTIWORD_DIR     &quot;/boot/home/config/apps/antiword&quot;</span>
-<a name="l00212"></a>00212 <span class="preprocessor"></span><span class="preprocessor">#define ANTIWORD_DIR            &quot;antiword&quot;</span>
-<a name="l00213"></a>00213 <span class="preprocessor"></span><span class="preprocessor">#define FONTNAMES_FILE          &quot;fontnames&quot;</span>
-<a name="l00214"></a>00214 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__CYGMING__)</span>
-<a name="l00215"></a>00215 <span class="preprocessor"></span><span class="preprocessor">#define GLOBAL_ANTIWORD_DIR     &quot;C:\\antiword&quot;</span>
-<a name="l00216"></a>00216 <span class="preprocessor"></span><span class="preprocessor">#define ANTIWORD_DIR            &quot;antiword&quot;</span>
-<a name="l00217"></a>00217 <span class="preprocessor"></span><span class="preprocessor">#define FONTNAMES_FILE          &quot;fontnames&quot;</span>
-<a name="l00218"></a>00218 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__Plan9__)</span>
-<a name="l00219"></a>00219 <span class="preprocessor"></span><span class="preprocessor">#define GLOBAL_ANTIWORD_DIR     &quot;/sys/lib/antiword&quot;</span>
-<a name="l00220"></a>00220 <span class="preprocessor"></span><span class="preprocessor">#define ANTIWORD_DIR            &quot;lib/antiword&quot;</span>
-<a name="l00221"></a>00221 <span class="preprocessor"></span><span class="preprocessor">#define FONTNAMES_FILE          &quot;fontnames&quot;</span>
-<a name="l00222"></a>00222 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__sun__)</span>
-<a name="l00223"></a>00223 <span class="preprocessor"></span><span class="preprocessor">#define GLOBAL_ANTIWORD_DIR     &quot;/usr/local/share/antiword&quot;</span>
-<a name="l00224"></a>00224 <span class="preprocessor"></span><span class="preprocessor">#define ANTIWORD_DIR</span>
-<a name="l00225"></a>00225 <span class="preprocessor"></span><span class="preprocessor">#define FONTNAMES_FILE          &quot;fontnames&quot;</span>
-<a name="l00226"></a>00226 <span class="preprocessor"></span><span class="preprocessor">#else   </span><span class="comment">/* All others */</span>
-<a name="l00227"></a>00227 <span class="preprocessor">#define GLOBAL_ANTIWORD_DIR     &quot;/usr/share/antiword&quot;</span>
-<a name="l00228"></a>00228 <span class="preprocessor"></span><span class="preprocessor">#define ANTIWORD_DIR            &quot;.antiword&quot;</span>
-<a name="l00229"></a>00229 <span class="preprocessor"></span><span class="preprocessor">#define FONTNAMES_FILE          &quot;fontnames&quot;</span>
-<a name="l00230"></a>00230 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __dos */</span>
-<a name="l00231"></a>00231 <span class="comment">/* The names of grouped mapping files */</span>
-<a name="l00232"></a>00232         <span class="comment">/* ASCII */</span>
-<a name="l00233"></a>00233 <span class="preprocessor">#define MAPPING_FILE_CP437      &quot;cp437.txt&quot;</span>
-<a name="l00234"></a>00234 <span class="preprocessor"></span>        <span class="comment">/* Latin1 */</span>
-<a name="l00235"></a>00235 <span class="preprocessor">#define MAPPING_FILE_8859_1     &quot;8859-1.txt&quot;</span>
-<a name="l00236"></a>00236 <span class="preprocessor"></span>        <span class="comment">/* Latin2 */</span>
-<a name="l00237"></a>00237 <span class="preprocessor">#define MAPPING_FILE_8859_2     &quot;8859-2.txt&quot;</span>
-<a name="l00238"></a>00238 <span class="preprocessor"></span><span class="preprocessor">#define MAPPING_FILE_CP852      &quot;cp852.txt&quot;</span>
-<a name="l00239"></a>00239 <span class="preprocessor"></span><span class="preprocessor">#define MAPPING_FILE_CP1250     &quot;cp1250.txt&quot;</span>
-<a name="l00240"></a>00240 <span class="preprocessor"></span>        <span class="comment">/* Cyrillic */</span>
-<a name="l00241"></a>00241 <span class="preprocessor">#define MAPPING_FILE_8859_5     &quot;8859-5.txt&quot;</span>
-<a name="l00242"></a>00242 <span class="preprocessor"></span><span class="preprocessor">#define MAPPING_FILE_KOI8_R     &quot;koi8-r.txt&quot;</span>
-<a name="l00243"></a>00243 <span class="preprocessor"></span><span class="preprocessor">#define MAPPING_FILE_KOI8_U     &quot;koi8-u.txt&quot;</span>
-<a name="l00244"></a>00244 <span class="preprocessor"></span><span class="preprocessor">#define MAPPING_FILE_CP866      &quot;cp866.txt&quot;</span>
-<a name="l00245"></a>00245 <span class="preprocessor"></span><span class="preprocessor">#define MAPPING_FILE_CP1251     &quot;cp1251.txt&quot;</span>
-<a name="l00246"></a>00246 <span class="preprocessor"></span>        <span class="comment">/* Latin9 */</span>
-<a name="l00247"></a>00247 <span class="preprocessor">#define MAPPING_FILE_8859_15    &quot;8859-15.txt&quot;</span>
-<a name="l00248"></a>00248 <span class="preprocessor"></span>        <span class="comment">/* UTF-8 */</span>
-<a name="l00249"></a>00249 <span class="preprocessor">#define MAPPING_FILE_UTF_8      &quot;UTF-8.txt&quot;</span>
-<a name="l00250"></a>00250 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00251"></a>00251 
-<a name="l00252"></a>00252 <span class="comment">/* Prototypes */</span>
-<a name="l00253"></a>00253 
-<a name="l00254"></a>00254 <span class="comment">/* asc85enc.c */</span>
-<a name="l00255"></a>00255 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vASCII85EncodeByte(FILE *, <span class="keywordtype">int</span>);
-<a name="l00256"></a>00256 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vASCII85EncodeArray(FILE *, FILE *, <span class="keywordtype">size_t</span>);
-<a name="l00257"></a>00257 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vASCII85EncodeFile(FILE *, FILE *, <span class="keywordtype">size_t</span>);
-<a name="l00258"></a>00258 <span class="comment">/* blocklist.c */</span>
-<a name="l00259"></a>00259 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vDestroyTextBlockList(<span class="keywordtype">void</span>);
-<a name="l00260"></a>00260 <span class="keyword">extern</span> BOOL     bAdd2TextBlockList(<span class="keyword">const</span> text_block_type *);
-<a name="l00261"></a>00261 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vSplitBlockList(FILE *, ULONG, ULONG, ULONG, ULONG, ULONG,
-<a name="l00262"></a>00262                         ULONG, ULONG, ULONG, BOOL);
-<a name="l00263"></a>00263 <span class="keyword">extern</span> BOOL     bExistsHdrFtr(<span class="keywordtype">void</span>);
-<a name="l00264"></a>00264 <span class="keyword">extern</span> BOOL     bExistsTextBox(<span class="keywordtype">void</span>);
-<a name="l00265"></a>00265 <span class="keyword">extern</span> BOOL     bExistsHdrTextBox(<span class="keywordtype">void</span>);
-<a name="l00266"></a>00266 <span class="keyword">extern</span> USHORT   usNextChar(FILE *, list_id_enum, ULONG *, ULONG *, USHORT *);
-<a name="l00267"></a>00267 <span class="keyword">extern</span> USHORT   usToHdrFtrPosition(FILE *, ULONG);
-<a name="l00268"></a>00268 <span class="keyword">extern</span> USHORT   usToFootnotePosition(FILE *, ULONG);
-<a name="l00269"></a>00269 <span class="keyword">extern</span> ULONG    ulCharPos2FileOffsetX(ULONG, list_id_enum *);
-<a name="l00270"></a>00270 <span class="keyword">extern</span> ULONG    ulCharPos2FileOffset(ULONG);
-<a name="l00271"></a>00271 <span class="keyword">extern</span> ULONG    ulHdrFtrOffset2CharPos(ULONG);
-<a name="l00272"></a>00272 <span class="keyword">extern</span> ULONG    ulGetSeqNumber(ULONG);
-<a name="l00273"></a>00273 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00274"></a>00274 <span class="preprocessor"></span><span class="keyword">extern</span> ULONG    ulGetDocumentLength(<span class="keywordtype">void</span>);
-<a name="l00275"></a>00275 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00276"></a>00276 <span class="comment">/* chartrans.c */</span>
-<a name="l00277"></a>00277 <span class="keyword">extern</span> UCHAR    ucGetBulletCharacter(conversion_type, encoding_type);
-<a name="l00278"></a>00278 <span class="keyword">extern</span> UCHAR    ucGetNbspCharacter(<span class="keywordtype">void</span>);
-<a name="l00279"></a>00279 <span class="keyword">extern</span> BOOL     bReadCharacterMappingTable(FILE *);
-<a name="l00280"></a>00280 <span class="keyword">extern</span> ULONG    ulTranslateCharacters(USHORT, ULONG, <span class="keywordtype">int</span>, conversion_type,
-<a name="l00281"></a>00281                         encoding_type, BOOL);
-<a name="l00282"></a>00282 <span class="keyword">extern</span> ULONG    ulToUpper(ULONG);
-<a name="l00283"></a>00283 <span class="comment">/* datalist.c */</span>
-<a name="l00284"></a>00284 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vDestroyDataBlockList(<span class="keywordtype">void</span>);
-<a name="l00285"></a>00285 <span class="keyword">extern</span> BOOL     bAdd2DataBlockList(<span class="keyword">const</span> data_block_type *);
-<a name="l00286"></a>00286 <span class="keyword">extern</span> ULONG    ulGetDataOffset(FILE *);
-<a name="l00287"></a>00287 <span class="keyword">extern</span> BOOL     bSetDataOffset(FILE *, ULONG);
-<a name="l00288"></a>00288 <span class="keyword">extern</span> <span class="keywordtype">int</span>      iNextByte(FILE *);
-<a name="l00289"></a>00289 <span class="keyword">extern</span> USHORT   usNextWord(FILE *);
-<a name="l00290"></a>00290 <span class="keyword">extern</span> ULONG    ulNextLong(FILE *);
-<a name="l00291"></a>00291 <span class="keyword">extern</span> USHORT   usNextWordBE(FILE *);
-<a name="l00292"></a>00292 <span class="keyword">extern</span> ULONG    ulNextLongBE(FILE *);
-<a name="l00293"></a>00293 <span class="keyword">extern</span> <span class="keywordtype">size_t</span>   tSkipBytes(FILE *, <span class="keywordtype">size_t</span>);
-<a name="l00294"></a>00294 <span class="keyword">extern</span> ULONG    ulDataPos2FileOffset(ULONG);
-<a name="l00295"></a>00295 <span class="comment">/* depot.c */</span>
-<a name="l00296"></a>00296 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vDestroySmallBlockList(<span class="keywordtype">void</span>);
-<a name="l00297"></a>00297 <span class="keyword">extern</span> BOOL     bCreateSmallBlockList(ULONG, <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>);
-<a name="l00298"></a>00298 <span class="keyword">extern</span> ULONG    ulDepotOffset(ULONG, <span class="keywordtype">size_t</span>);
-<a name="l00299"></a>00299 <span class="comment">/* dib2eps &amp; dib2sprt.c */</span>
-<a name="l00300"></a>00300 <span class="keyword">extern</span> BOOL     bTranslateDIB(diagram_type *,
-<a name="l00301"></a>00301                         FILE *, ULONG, <span class="keyword">const</span> imagedata_type *);
-<a name="l00302"></a>00302 <span class="preprocessor">#if defined(__dos)</span>
-<a name="l00303"></a>00303 <span class="preprocessor"></span><span class="comment">/* dos.c */</span>
-<a name="l00304"></a>00304 <span class="keyword">extern</span> <span class="keywordtype">int</span>      iGetCodepage(<span class="keywordtype">void</span>);
-<a name="l00305"></a>00305 <span class="preprocessor">#endif </span><span class="comment">/* __dos */</span>
-<a name="l00306"></a>00306 <span class="comment">/* doclist.c */</span>
-<a name="l00307"></a>00307 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vDestroyDocumentInfoList(<span class="keywordtype">void</span>);
-<a name="l00308"></a>00308 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vCreateDocumentInfoList(<span class="keyword">const</span> document_block_type *);
-<a name="l00309"></a>00309 <span class="keyword">extern</span> UCHAR    ucGetDopHdrFtrSpecification(<span class="keywordtype">void</span>);
-<a name="l00310"></a>00310 <span class="comment">/* draw.c &amp; output.c */</span>
-<a name="l00311"></a>00311 <span class="keyword">extern</span> BOOL     bAddDummyImage(diagram_type *, <span class="keyword">const</span> imagedata_type *);
-<a name="l00312"></a>00312 <span class="keyword">extern</span> diagram_type *pCreateDiagram(<span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keyword">const</span> <span class="keywordtype">char</span> *, FILE *);
-<a name="l00313"></a>00313 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vPrologue2(diagram_type *, <span class="keywordtype">int</span>);
-<a name="l00314"></a>00314 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vMove2NextLine(diagram_type *, drawfile_fontref, USHORT);
-<a name="l00315"></a>00315 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vSubstring2Diagram(diagram_type *,
-<a name="l00316"></a>00316                         <span class="keywordtype">char</span> *, <span class="keywordtype">size_t</span>, <span class="keywordtype">long</span>, UCHAR, USHORT,
-<a name="l00317"></a>00317                         drawfile_fontref, USHORT, USHORT);
-<a name="l00318"></a>00318 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vStartOfParagraph1(diagram_type *, <span class="keywordtype">long</span>);
-<a name="l00319"></a>00319 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vStartOfParagraph2(diagram_type *);
-<a name="l00320"></a>00320 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vEndOfParagraph(diagram_type *, drawfile_fontref, USHORT, <span class="keywordtype">long</span>);
-<a name="l00321"></a>00321 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vEndOfPage(diagram_type *, <span class="keywordtype">long</span>, BOOL);
-<a name="l00322"></a>00322 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vSetHeaders(diagram_type *, USHORT);
-<a name="l00323"></a>00323 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vStartOfList(diagram_type *, UCHAR, BOOL);
-<a name="l00324"></a>00324 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vEndOfList(diagram_type *);
-<a name="l00325"></a>00325 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vStartOfListItem(diagram_type *, BOOL);
-<a name="l00326"></a>00326 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vEndOfTable(diagram_type *);
-<a name="l00327"></a>00327 <span class="keyword">extern</span> BOOL     bAddTableRow(diagram_type *, <span class="keywordtype">char</span> **, <span class="keywordtype">int</span>,
-<a name="l00328"></a>00328                         <span class="keyword">const</span> <span class="keywordtype">short</span> *, UCHAR);
-<a name="l00329"></a>00329 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00330"></a>00330 <span class="preprocessor"></span><span class="keyword">extern</span> BOOL     bDestroyDiagram(event_pollblock *, <span class="keywordtype">void</span> *);
-<a name="l00331"></a>00331 <span class="preprocessor">#if 0</span>
-<a name="l00332"></a>00332 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="keywordtype">void</span>     vImage2Diagram(diagram_type *, <span class="keyword">const</span> imagedata_type *,
-<a name="l00333"></a>00333                         UCHAR *, <span class="keywordtype">size_t</span>);
-<a name="l00334"></a>00334 <span class="preprocessor">#endif //0      </span>
-<a name="l00335"></a>00335 <span class="preprocessor"></span><span class="keyword">extern</span> BOOL     bVerifyDiagram(diagram_type *);
-<a name="l00336"></a>00336 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vShowDiagram(diagram_type *);
-<a name="l00337"></a>00337 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vMainButtonClick(mouse_block *);
-<a name="l00338"></a>00338 <span class="keyword">extern</span> BOOL     bMainKeyPressed(event_pollblock *, <span class="keywordtype">void</span> *);
-<a name="l00339"></a>00339 <span class="keyword">extern</span> BOOL     bMainEventHandler(event_pollblock *, <span class="keywordtype">void</span> *);
-<a name="l00340"></a>00340 <span class="keyword">extern</span> BOOL     bRedrawMainWindow(event_pollblock *, <span class="keywordtype">void</span> *);
-<a name="l00341"></a>00341 <span class="keyword">extern</span> BOOL     bScaleOpenAction(event_pollblock *, <span class="keywordtype">void</span> *);
-<a name="l00342"></a>00342 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vSetTitle(diagram_type *);
-<a name="l00343"></a>00343 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vScaleButtonClick(mouse_block *, diagram_type *);
-<a name="l00344"></a>00344 <span class="keyword">extern</span> BOOL     bScaleKeyPressed(event_pollblock *, <span class="keywordtype">void</span> *);
-<a name="l00345"></a>00345 <span class="keyword">extern</span> BOOL     bScaleEventHandler(event_pollblock *, <span class="keywordtype">void</span> *);
-<a name="l00346"></a>00346 <span class="preprocessor">#else</span>
-<a name="l00347"></a>00347 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="keywordtype">void</span>     vImagePrologue(diagram_type *, <span class="keyword">const</span> imagedata_type *);
-<a name="l00348"></a>00348 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vImageEpilogue(diagram_type *);
-<a name="l00349"></a>00349 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vDestroyDiagram(diagram_type *);
-<a name="l00350"></a>00350 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00351"></a>00351 <span class="comment">/* finddata.c */</span>
-<a name="l00352"></a>00352 <span class="keyword">extern</span> BOOL     bAddDataBlocks(ULONG , ULONG, ULONG, <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>);
-<a name="l00353"></a>00353 <span class="keyword">extern</span> BOOL     bGet6DocumentData(FILE *, ULONG,
-<a name="l00354"></a>00354                                 <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>, <span class="keyword">const</span> UCHAR *);
-<a name="l00355"></a>00355 <span class="comment">/* findtext.c */</span>
-<a name="l00356"></a>00356 <span class="keyword">extern</span> BOOL     bAddTextBlocks(ULONG , ULONG, BOOL,
-<a name="l00357"></a>00357                                 USHORT, ULONG, <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>);
-<a name="l00358"></a>00358 <span class="keyword">extern</span> BOOL     bGet6DocumentText(FILE *, BOOL, ULONG,
-<a name="l00359"></a>00359                                 <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>, <span class="keyword">const</span> UCHAR *);
-<a name="l00360"></a>00360 <span class="keyword">extern</span> BOOL     bGet8DocumentText(FILE *, <span class="keyword">const</span> pps_info_type *,
-<a name="l00361"></a>00361                                 <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>, <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>,
-<a name="l00362"></a>00362                                 <span class="keyword">const</span> UCHAR *);
-<a name="l00363"></a>00363 <span class="comment">/* fmt_text.c */</span>
-<a name="l00364"></a>00364 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vPrologueFMT(diagram_type *, <span class="keyword">const</span> options_type *);
-<a name="l00365"></a>00365 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vSubstringFMT(diagram_type *, <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keywordtype">size_t</span>, <span class="keywordtype">long</span>,
-<a name="l00366"></a>00366                                 USHORT);
-<a name="l00367"></a>00367 <span class="comment">/* fontlist.c */</span>
-<a name="l00368"></a>00368 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vDestroyFontInfoList(<span class="keywordtype">void</span>);
-<a name="l00369"></a>00369 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vCorrectFontValues(font_block_type *);
-<a name="l00370"></a>00370 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vAdd2FontInfoList(<span class="keyword">const</span> font_block_type *);
-<a name="l00371"></a>00371 <span class="keyword">extern</span> <span class="keyword">const</span> font_block_type    *pGetNextFontInfoListItem(
-<a name="l00372"></a>00372                                         <span class="keyword">const</span> font_block_type *);
-<a name="l00373"></a>00373 <span class="comment">/* fonts.c */</span>
-<a name="l00374"></a>00374 <span class="keyword">extern</span> <span class="keywordtype">int</span>      iGetFontByNumber(UCHAR, USHORT);
-<a name="l00375"></a>00375 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span>       *szGetOurFontname(<span class="keywordtype">int</span>);
-<a name="l00376"></a>00376 <span class="keyword">extern</span> <span class="keywordtype">int</span>      iFontname2Fontnumber(<span class="keyword">const</span> <span class="keywordtype">char</span> *, USHORT);
-<a name="l00377"></a>00377 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vCreate0FontTable(<span class="keywordtype">void</span>);
-<a name="l00378"></a>00378 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vCreate2FontTable(FILE *, <span class="keywordtype">int</span>, <span class="keyword">const</span> UCHAR *);
-<a name="l00379"></a>00379 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vCreate6FontTable(FILE *, ULONG,
-<a name="l00380"></a>00380                         <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>, <span class="keyword">const</span> UCHAR *);
-<a name="l00381"></a>00381 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vCreate8FontTable(FILE *, <span class="keyword">const</span> pps_info_type *,
-<a name="l00382"></a>00382                         <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>, <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>,
-<a name="l00383"></a>00383                         <span class="keyword">const</span> UCHAR *);
-<a name="l00384"></a>00384 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vDestroyFontTable(<span class="keywordtype">void</span>);
-<a name="l00385"></a>00385 <span class="keyword">extern</span> <span class="keyword">const</span> font_table_type    *pGetNextFontTableRecord(
-<a name="l00386"></a>00386                                                 <span class="keyword">const</span> font_table_type *);
-<a name="l00387"></a>00387 <span class="keyword">extern</span> <span class="keywordtype">size_t</span>   tGetFontTableLength(<span class="keywordtype">void</span>);
-<a name="l00388"></a>00388 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vCorrectFontTable(conversion_type, encoding_type);
-<a name="l00389"></a>00389 <span class="keyword">extern</span> <span class="keywordtype">long</span>     lComputeSpaceWidth(drawfile_fontref, USHORT);
-<a name="l00390"></a>00390 <span class="comment">/* fonts_r.c &amp; fonts_u.c */</span>
-<a name="l00391"></a>00391 <span class="keyword">extern</span> FILE     *pOpenFontTableFile(<span class="keywordtype">void</span>);
-<a name="l00392"></a>00392 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vCloseFont(<span class="keywordtype">void</span>);
-<a name="l00393"></a>00393 <span class="keyword">extern</span> drawfile_fontref tOpenFont(UCHAR, USHORT, USHORT);
-<a name="l00394"></a>00394 <span class="keyword">extern</span> drawfile_fontref tOpenTableFont(USHORT);
-<a name="l00395"></a>00395 <span class="keyword">extern</span> <span class="keywordtype">long</span>     lComputeStringWidth(<span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keywordtype">size_t</span>, drawfile_fontref, USHORT);
-<a name="l00396"></a>00396 <span class="keyword">extern</span> <span class="keywordtype">size_t</span>   tCountColumns(<span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keywordtype">size_t</span>);
-<a name="l00397"></a>00397 <span class="keyword">extern</span> <span class="keywordtype">size_t</span>   tGetCharacterLength(<span class="keyword">const</span> <span class="keywordtype">char</span> *);
-<a name="l00398"></a>00398 <span class="comment">/* fonts_u.c */</span>
-<a name="l00399"></a>00399 <span class="preprocessor">#if !defined(__riscos)</span>
-<a name="l00400"></a>00400 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span>       *szGetFontname(drawfile_fontref);
-<a name="l00401"></a>00401 <span class="preprocessor">#endif </span><span class="comment">/* !__riscos */</span>
-<a name="l00402"></a>00402 <span class="comment">/* hdrftrlist.c */</span>
-<a name="l00403"></a>00403 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vDestroyHdrFtrInfoList(<span class="keywordtype">void</span>);
-<a name="l00404"></a>00404 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vCreat8HdrFtrInfoList(<span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>);
-<a name="l00405"></a>00405 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vCreat6HdrFtrInfoList(<span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>);
-<a name="l00406"></a>00406 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vCreat2HdrFtrInfoList(<span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>);
-<a name="l00407"></a>00407 <span class="keyword">extern</span> <span class="keyword">const</span> hdrftr_block_type *pGetHdrFtrInfo(<span class="keywordtype">int</span>, BOOL, BOOL, BOOL);
-<a name="l00408"></a>00408 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vPrepareHdrFtrText(FILE *);
-<a name="l00409"></a>00409 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00410"></a>00410 <span class="preprocessor"></span><span class="comment">/* icons.c */</span>
-<a name="l00411"></a>00411 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vUpdateIcon(window_handle, icon_block *);
-<a name="l00412"></a>00412 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vUpdateRadioButton(window_handle, icon_handle, BOOL);
-<a name="l00413"></a>00413 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vUpdateWriteable(window_handle, icon_handle, <span class="keyword">const</span> <span class="keywordtype">char</span> *);
-<a name="l00414"></a>00414 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vUpdateWriteableNumber(window_handle, icon_handle, <span class="keywordtype">int</span>);
-<a name="l00415"></a>00415 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00416"></a>00416 <span class="comment">/* imgexam.c */</span>
-<a name="l00417"></a>00417 <span class="keyword">extern</span> image_info_enum  eExamineImage(FILE *, ULONG, imagedata_type *);
-<a name="l00418"></a>00418 <span class="comment">/* imgtrans */</span>
-<a name="l00419"></a>00419 <span class="keyword">extern</span> BOOL     bTranslateImage(diagram_type *,
-<a name="l00420"></a>00420                         FILE *, BOOL, ULONG, <span class="keyword">const</span> imagedata_type *);
-<a name="l00421"></a>00421 <span class="comment">/* jpeg2eps.c &amp; jpeg2spr.c */</span>
-<a name="l00422"></a>00422 <span class="keyword">extern</span> BOOL     bTranslateJPEG(diagram_type *,
-<a name="l00423"></a>00423                         FILE *, ULONG, <span class="keywordtype">size_t</span>, <span class="keyword">const</span> imagedata_type *);
-<a name="l00424"></a>00424 <span class="comment">/* listlist.c */</span>
-<a name="l00425"></a>00425 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vDestroyListInfoList(<span class="keywordtype">void</span>);
-<a name="l00426"></a>00426 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vBuildLfoList(<span class="keyword">const</span> UCHAR *, <span class="keywordtype">size_t</span>);
-<a name="l00427"></a>00427 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vAdd2ListInfoList(ULONG, USHORT, UCHAR,
-<a name="l00428"></a>00428                         <span class="keyword">const</span> list_block_type *);
-<a name="l00429"></a>00429 <span class="keyword">extern</span> <span class="keyword">const</span> list_block_type    *pGetListInfo(USHORT, UCHAR);
-<a name="l00430"></a>00430 <span class="keyword">extern</span> USHORT   usGetListValue(<span class="keywordtype">int</span>, <span class="keywordtype">int</span>, <span class="keyword">const</span> style_block_type *);
-<a name="l00431"></a>00431 <span class="comment">/* misc.c */</span>
-<a name="l00432"></a>00432 <span class="preprocessor">#if !defined(__riscos)</span>
-<a name="l00433"></a>00433 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span>       *szGetHomeDirectory(<span class="keywordtype">void</span>);
-<a name="l00434"></a>00434 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span>       *szGetAntiwordDirectory(<span class="keywordtype">void</span>);
-<a name="l00435"></a>00435 <span class="preprocessor">#endif </span><span class="comment">/* !__riscos */</span>
-<a name="l00436"></a>00436 <span class="keyword">extern</span> <span class="keywordtype">long</span>     lGetFilesize(<span class="keyword">const</span> <span class="keywordtype">char</span> *);
-<a name="l00437"></a>00437 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00438"></a>00438 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="keywordtype">void</span>     vPrintBlock(<span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keywordtype">int</span>, <span class="keyword">const</span> UCHAR *, <span class="keywordtype">size_t</span>);
-<a name="l00439"></a>00439 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vPrintUnicode(<span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keywordtype">int</span>, <span class="keyword">const</span> UCHAR *, <span class="keywordtype">size_t</span>);
-<a name="l00440"></a>00440 <span class="keyword">extern</span> BOOL     bCheckDoubleLinkedList(output_type *);
-<a name="l00441"></a>00441 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00442"></a>00442 <span class="keyword">extern</span> BOOL     bReadBytes(UCHAR *, <span class="keywordtype">size_t</span>, ULONG, FILE *);
-<a name="l00443"></a>00443 <span class="keyword">extern</span> BOOL     bReadBuffer(FILE *, ULONG, <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>, <span class="keywordtype">size_t</span>,
-<a name="l00444"></a>00444                         UCHAR *, ULONG, <span class="keywordtype">size_t</span>);
-<a name="l00445"></a>00445 <span class="keyword">extern</span> ULONG    ulColor2Color(UCHAR);
-<a name="l00446"></a>00446 <span class="keyword">extern</span> output_type *pSplitList(output_type *);
-<a name="l00447"></a>00447 <span class="keyword">extern</span> <span class="keywordtype">size_t</span>   tNumber2Roman(UINT, BOOL, <span class="keywordtype">char</span> *);
-<a name="l00448"></a>00448 <span class="keyword">extern</span> <span class="keywordtype">size_t</span>   tNumber2Alpha(UINT, BOOL, <span class="keywordtype">char</span> *);
-<a name="l00449"></a>00449 <span class="keyword">extern</span> <span class="keywordtype">char</span>     *unincpy(<span class="keywordtype">char</span> *, <span class="keyword">const</span> UCHAR *, <span class="keywordtype">size_t</span>);
-<a name="l00450"></a>00450 <span class="keyword">extern</span> <span class="keywordtype">size_t</span>   unilen(<span class="keyword">const</span> UCHAR *);
-<a name="l00451"></a>00451 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span>       *szBasename(<span class="keyword">const</span> <span class="keywordtype">char</span> *);
-<a name="l00452"></a>00452 <span class="keyword">extern</span> <span class="keywordtype">long</span>     lComputeLeading(USHORT);
-<a name="l00453"></a>00453 <span class="keyword">extern</span> <span class="keywordtype">size_t</span>   tUcs2Utf8(ULONG, <span class="keywordtype">char</span> *, <span class="keywordtype">size_t</span>);
-<a name="l00454"></a>00454 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGetBulletValue(conversion_type, encoding_type, <span class="keywordtype">char</span> *, <span class="keywordtype">size_t</span>);
-<a name="l00455"></a>00455 <span class="keyword">extern</span> BOOL     bAllZero(<span class="keyword">const</span> UCHAR *, <span class="keywordtype">size_t</span>);
-<a name="l00456"></a>00456 <span class="keyword">extern</span> BOOL     bGetNormalizedCodeset(<span class="keywordtype">char</span> *, <span class="keywordtype">size_t</span>, BOOL *);
-<a name="l00457"></a>00457 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span>       *szGetDefaultMappingFile(<span class="keywordtype">void</span>);
-<a name="l00458"></a>00458 <span class="keyword">extern</span> time_t   tConvertDTTM(ULONG);
-<a name="l00459"></a>00459 <span class="comment">/* notes.c */</span>
-<a name="l00460"></a>00460 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vDestroyNotesInfoLists(<span class="keywordtype">void</span>);
-<a name="l00461"></a>00461 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGetNotesInfo(FILE *, <span class="keyword">const</span> pps_info_type *,
-<a name="l00462"></a>00462                         <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>, <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>,
-<a name="l00463"></a>00463                         <span class="keyword">const</span> UCHAR *, <span class="keywordtype">int</span>);
-<a name="l00464"></a>00464 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vPrepareFootnoteText(FILE *);
-<a name="l00465"></a>00465 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span>       *szGetFootnootText(UINT);
-<a name="l00466"></a>00466 <span class="keyword">extern</span> notetype_enum eGetNotetype(ULONG);
-<a name="l00467"></a>00467 <span class="comment">/* options.c */</span>
-<a name="l00468"></a>00468 <span class="keyword">extern</span> <span class="keywordtype">int</span>      iReadOptions(<span class="keywordtype">int</span>, <span class="keywordtype">char</span> **);
-<a name="l00469"></a>00469 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGetOptions(options_type *);
-<a name="l00470"></a>00470 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00471"></a>00471 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="keywordtype">void</span>     vChoicesOpenAction(window_handle);
-<a name="l00472"></a>00472 <span class="keyword">extern</span> BOOL     bChoicesMouseClick(event_pollblock *, <span class="keywordtype">void</span> *);
-<a name="l00473"></a>00473 <span class="keyword">extern</span> BOOL     bChoicesKeyPressed(event_pollblock *, <span class="keywordtype">void</span> *);
-<a name="l00474"></a>00474 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00475"></a>00475 <span class="comment">/* out2window.c */</span>
-<a name="l00476"></a>00476 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vSetLeftIndentation(diagram_type *, <span class="keywordtype">long</span>);
-<a name="l00477"></a>00477 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vAlign2Window(diagram_type *, output_type *,
-<a name="l00478"></a>00478                         <span class="keywordtype">long</span>, UCHAR);
-<a name="l00479"></a>00479 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vJustify2Window(diagram_type *, output_type *,
-<a name="l00480"></a>00480                         <span class="keywordtype">long</span>, <span class="keywordtype">long</span>, UCHAR);
-<a name="l00481"></a>00481 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vResetStyles(<span class="keywordtype">void</span>);
-<a name="l00482"></a>00482 <span class="keyword">extern</span> <span class="keywordtype">size_t</span>   tStyle2Window(<span class="keywordtype">char</span> *, <span class="keywordtype">size_t</span>, <span class="keyword">const</span> style_block_type *,
-<a name="l00483"></a>00483                         <span class="keyword">const</span> section_block_type *);
-<a name="l00484"></a>00484 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vTableRow2Window(diagram_type *, output_type *,
-<a name="l00485"></a>00485                         <span class="keyword">const</span> row_block_type *, conversion_type, <span class="keywordtype">int</span>);
-<a name="l00486"></a>00486 <span class="comment">/* pdf.c */</span>
-<a name="l00487"></a>00487 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vCreateInfoDictionary(diagram_type *, <span class="keywordtype">int</span>);
-<a name="l00488"></a>00488 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vProloguePDF(diagram_type *,
-<a name="l00489"></a>00489                         <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keyword">const</span> options_type *);
-<a name="l00490"></a>00490 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vEpiloguePDF(diagram_type *);
-<a name="l00491"></a>00491 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vImageProloguePDF(diagram_type *, <span class="keyword">const</span> imagedata_type *);
-<a name="l00492"></a>00492 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vImageEpiloguePDF(diagram_type *);
-<a name="l00493"></a>00493 <span class="keyword">extern</span> BOOL     bAddDummyImagePDF(diagram_type *, <span class="keyword">const</span> imagedata_type *);
-<a name="l00494"></a>00494 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vAddFontsPDF(diagram_type *);
-<a name="l00495"></a>00495 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vMove2NextLinePDF(diagram_type *, USHORT);
-<a name="l00496"></a>00496 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vSubstringPDF(diagram_type *,
-<a name="l00497"></a>00497                                 <span class="keywordtype">char</span> *, <span class="keywordtype">size_t</span>, <span class="keywordtype">long</span>, UCHAR, USHORT,
-<a name="l00498"></a>00498                                 drawfile_fontref, USHORT, USHORT);
-<a name="l00499"></a>00499 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vStartOfParagraphPDF(diagram_type *, <span class="keywordtype">long</span>);
-<a name="l00500"></a>00500 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vEndOfParagraphPDF(diagram_type *, USHORT, <span class="keywordtype">long</span>);
-<a name="l00501"></a>00501 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vEndOfPagePDF(diagram_type *, BOOL);
-<a name="l00502"></a>00502 <span class="comment">/* pictlist.c */</span>
-<a name="l00503"></a>00503 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vDestroyPictInfoList(<span class="keywordtype">void</span>);
-<a name="l00504"></a>00504 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vAdd2PictInfoList(<span class="keyword">const</span> picture_block_type *);
-<a name="l00505"></a>00505 <span class="keyword">extern</span> ULONG    ulGetPictInfoListItem(ULONG);
-<a name="l00506"></a>00506 <span class="comment">/* png2eps.c &amp; png2spr.c */</span>
-<a name="l00507"></a>00507 <span class="keyword">extern</span> BOOL     bTranslatePNG(diagram_type *,
-<a name="l00508"></a>00508                         FILE *, ULONG, <span class="keywordtype">size_t</span>, <span class="keyword">const</span> imagedata_type *);
-<a name="l00509"></a>00509 <span class="comment">/* postscript.c */</span>
-<a name="l00510"></a>00510 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vProloguePS(diagram_type *,
-<a name="l00511"></a>00511                         <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keyword">const</span> options_type *);
-<a name="l00512"></a>00512 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vEpiloguePS(diagram_type *);
-<a name="l00513"></a>00513 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vImageProloguePS(diagram_type *, <span class="keyword">const</span> imagedata_type *);
-<a name="l00514"></a>00514 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vImageEpiloguePS(diagram_type *);
-<a name="l00515"></a>00515 <span class="keyword">extern</span> BOOL     bAddDummyImagePS(diagram_type *, <span class="keyword">const</span> imagedata_type *);
-<a name="l00516"></a>00516 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vAddFontsPS(diagram_type *);
-<a name="l00517"></a>00517 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vMove2NextLinePS(diagram_type *, USHORT);
-<a name="l00518"></a>00518 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vSubstringPS(diagram_type *,
-<a name="l00519"></a>00519                                 <span class="keywordtype">char</span> *, <span class="keywordtype">size_t</span>, <span class="keywordtype">long</span>, UCHAR, USHORT,
-<a name="l00520"></a>00520                                 drawfile_fontref, USHORT, USHORT);
-<a name="l00521"></a>00521 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vStartOfParagraphPS(diagram_type *, <span class="keywordtype">long</span>);
-<a name="l00522"></a>00522 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vEndOfParagraphPS(diagram_type *, USHORT, <span class="keywordtype">long</span>);
-<a name="l00523"></a>00523 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vEndOfPagePS(diagram_type *, BOOL);
-<a name="l00524"></a>00524 <span class="comment">/* prop0.c */</span>
-<a name="l00525"></a>00525 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet0DopInfo(FILE *, <span class="keyword">const</span> UCHAR *);
-<a name="l00526"></a>00526 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet0SepInfo(FILE *, <span class="keyword">const</span> UCHAR *);
-<a name="l00527"></a>00527 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet0PapInfo(FILE *, <span class="keyword">const</span> UCHAR *);
-<a name="l00528"></a>00528 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet0ChrInfo(FILE *, <span class="keyword">const</span> UCHAR *);
-<a name="l00529"></a>00529 <span class="comment">/* prop2.c */</span>
-<a name="l00530"></a>00530 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet2DopInfo(FILE *, <span class="keyword">const</span> UCHAR *);
-<a name="l00531"></a>00531 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet2SepInfo(FILE *, <span class="keyword">const</span> UCHAR *);
-<a name="l00532"></a>00532 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet2HdrFtrInfo(FILE *, <span class="keyword">const</span> UCHAR *);
-<a name="l00533"></a>00533 <span class="keyword">extern</span> row_info_enum    eGet2RowInfo(<span class="keywordtype">int</span>,
-<a name="l00534"></a>00534                         <span class="keyword">const</span> UCHAR *, <span class="keywordtype">int</span>, row_block_type *);
-<a name="l00535"></a>00535 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet2StyleInfo(<span class="keywordtype">int</span>,
-<a name="l00536"></a>00536                         <span class="keyword">const</span> UCHAR *, <span class="keywordtype">int</span>, style_block_type *);
-<a name="l00537"></a>00537 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet2PapInfo(FILE *, <span class="keyword">const</span> UCHAR *);
-<a name="l00538"></a>00538 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet1FontInfo(<span class="keywordtype">int</span>,
-<a name="l00539"></a>00539                         <span class="keyword">const</span> UCHAR *, <span class="keywordtype">size_t</span>, font_block_type *);
-<a name="l00540"></a>00540 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet2FontInfo(<span class="keywordtype">int</span>,
-<a name="l00541"></a>00541                         <span class="keyword">const</span> UCHAR *, <span class="keywordtype">size_t</span>, font_block_type *);
-<a name="l00542"></a>00542 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet2ChrInfo(FILE *, <span class="keywordtype">int</span>, <span class="keyword">const</span> UCHAR *);
-<a name="l00543"></a>00543 <span class="comment">/* prop6.c */</span>
-<a name="l00544"></a>00544 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet6DopInfo(FILE *, ULONG, <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>,
-<a name="l00545"></a>00545                         <span class="keyword">const</span> UCHAR *);
-<a name="l00546"></a>00546 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet6SepInfo(FILE *, ULONG, <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>,
-<a name="l00547"></a>00547                         <span class="keyword">const</span> UCHAR *);
-<a name="l00548"></a>00548 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet6HdrFtrInfo(FILE *, ULONG, <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>,
-<a name="l00549"></a>00549                         <span class="keyword">const</span> UCHAR *);
-<a name="l00550"></a>00550 <span class="keyword">extern</span> row_info_enum    eGet6RowInfo(<span class="keywordtype">int</span>,
-<a name="l00551"></a>00551                         <span class="keyword">const</span> UCHAR *, <span class="keywordtype">int</span>, row_block_type *);
-<a name="l00552"></a>00552 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet6StyleInfo(<span class="keywordtype">int</span>,
-<a name="l00553"></a>00553                         <span class="keyword">const</span> UCHAR *, <span class="keywordtype">int</span>, style_block_type *);
-<a name="l00554"></a>00554 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet6PapInfo(FILE *, ULONG, <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>,
-<a name="l00555"></a>00555                         <span class="keyword">const</span> UCHAR *);
-<a name="l00556"></a>00556 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet6FontInfo(<span class="keywordtype">int</span>, USHORT,
-<a name="l00557"></a>00557                         <span class="keyword">const</span> UCHAR *, <span class="keywordtype">int</span>, font_block_type *);
-<a name="l00558"></a>00558 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet6ChrInfo(FILE *, ULONG, <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>,
-<a name="l00559"></a>00559                         <span class="keyword">const</span> UCHAR *);
-<a name="l00560"></a>00560 <span class="comment">/* prop8.c */</span>
-<a name="l00561"></a>00561 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet8DopInfo(FILE *, <span class="keyword">const</span> pps_type *,
-<a name="l00562"></a>00562                         <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>, <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>,
-<a name="l00563"></a>00563                         <span class="keyword">const</span> UCHAR *);
-<a name="l00564"></a>00564 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet8SepInfo(FILE *, <span class="keyword">const</span> pps_info_type *,
-<a name="l00565"></a>00565                         <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>, <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>,
-<a name="l00566"></a>00566                         <span class="keyword">const</span> UCHAR *);
-<a name="l00567"></a>00567 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet8HdrFtrInfo(FILE *, <span class="keyword">const</span> pps_type *,
-<a name="l00568"></a>00568                         <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>, <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>,
-<a name="l00569"></a>00569                         <span class="keyword">const</span> UCHAR *);
-<a name="l00570"></a>00570 <span class="keyword">extern</span> row_info_enum    eGet8RowInfo(<span class="keywordtype">int</span>,
-<a name="l00571"></a>00571                         <span class="keyword">const</span> UCHAR *, <span class="keywordtype">int</span>, row_block_type *);
-<a name="l00572"></a>00572 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet8StyleInfo(<span class="keywordtype">int</span>,
-<a name="l00573"></a>00573                         <span class="keyword">const</span> UCHAR *, <span class="keywordtype">int</span>, style_block_type *);
-<a name="l00574"></a>00574 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet8LstInfo(FILE *, <span class="keyword">const</span> pps_info_type *,
-<a name="l00575"></a>00575                         <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>, <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>,
-<a name="l00576"></a>00576                         <span class="keyword">const</span> UCHAR *);
-<a name="l00577"></a>00577 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet8PapInfo(FILE *, <span class="keyword">const</span> pps_info_type *,
-<a name="l00578"></a>00578                         <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>, <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>,
-<a name="l00579"></a>00579                         <span class="keyword">const</span> UCHAR *);
-<a name="l00580"></a>00580 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet8FontInfo(<span class="keywordtype">int</span>, USHORT,
-<a name="l00581"></a>00581                         <span class="keyword">const</span> UCHAR *, <span class="keywordtype">int</span>, font_block_type *);
-<a name="l00582"></a>00582 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet8ChrInfo(FILE *, <span class="keyword">const</span> pps_info_type *,
-<a name="l00583"></a>00583                         <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>, <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>,
-<a name="l00584"></a>00584                         <span class="keyword">const</span> UCHAR *);
-<a name="l00585"></a>00585 <span class="comment">/* properties.c */</span>
-<a name="l00586"></a>00586 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGetPropertyInfo(FILE *, <span class="keyword">const</span> pps_info_type *,
-<a name="l00587"></a>00587                         <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>, <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>,
-<a name="l00588"></a>00588                         <span class="keyword">const</span> UCHAR *, <span class="keywordtype">int</span>);
-<a name="l00589"></a>00589 <span class="keyword">extern</span> row_info_enum    ePropMod2RowInfo(USHORT, <span class="keywordtype">int</span>);
-<a name="l00590"></a>00590 <span class="comment">/* propmod.c */</span>
-<a name="l00591"></a>00591 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vDestroyPropModList(<span class="keywordtype">void</span>);
-<a name="l00592"></a>00592 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vAdd2PropModList(<span class="keyword">const</span> UCHAR *);
-<a name="l00593"></a>00593 <span class="keyword">extern</span> <span class="keyword">const</span> UCHAR      *aucReadPropModListItem(USHORT);
-<a name="l00594"></a>00594 <span class="comment">/* rowlist.c */</span>
-<a name="l00595"></a>00595 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vDestroyRowInfoList(<span class="keywordtype">void</span>);
-<a name="l00596"></a>00596 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vAdd2RowInfoList(<span class="keyword">const</span> row_block_type *);
-<a name="l00597"></a>00597 <span class="keyword">extern</span> <span class="keyword">const</span> row_block_type     *pGetNextRowInfoListItem(<span class="keywordtype">void</span>);
-<a name="l00598"></a>00598 <span class="comment">/* riscos.c */</span>
-<a name="l00599"></a>00599 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00600"></a>00600 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="keywordtype">int</span>      iGetFiletype(<span class="keyword">const</span> <span class="keywordtype">char</span> *);
-<a name="l00601"></a>00601 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vSetFiletype(<span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keywordtype">int</span>);
-<a name="l00602"></a>00602 <span class="keyword">extern</span> BOOL     bMakeDirectory(<span class="keyword">const</span> <span class="keywordtype">char</span> *);
-<a name="l00603"></a>00603 <span class="keyword">extern</span> <span class="keywordtype">int</span>      iReadCurrentAlphabetNumber(<span class="keywordtype">void</span>);
-<a name="l00604"></a>00604 <span class="keyword">extern</span> <span class="keywordtype">int</span>      iGetRiscOsVersion(<span class="keywordtype">void</span>);
-<a name="l00605"></a>00605 <span class="keyword">extern</span> BOOL     bDrawRenderDiag360(<span class="keywordtype">void</span> *, <span class="keywordtype">size_t</span>,
-<a name="l00606"></a>00606                         window_redrawblock *, <span class="keywordtype">double</span>, os_error *);
-<a name="l00607"></a>00607 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00608"></a>00608 <span class="preprocessor"></span><span class="keyword">extern</span> BOOL     bGetJpegInfo(UCHAR *, <span class="keywordtype">size_t</span>);
-<a name="l00609"></a>00609 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00610"></a>00610 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00611"></a>00611 <span class="comment">/* saveas.c */</span>
-<a name="l00612"></a>00612 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00613"></a>00613 <span class="preprocessor"></span><span class="keyword">extern</span> BOOL     bSaveTextfile(event_pollblock *, <span class="keywordtype">void</span> *);
-<a name="l00614"></a>00614 <span class="keyword">extern</span> BOOL     bSaveDrawfile(event_pollblock *, <span class="keywordtype">void</span> *);
-<a name="l00615"></a>00615 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00616"></a>00616 <span class="comment">/* sectlist.c */</span>
-<a name="l00617"></a>00617 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vDestroySectionInfoList(<span class="keywordtype">void</span>);
-<a name="l00618"></a>00618 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vAdd2SectionInfoList(<span class="keyword">const</span> section_block_type *, ULONG);
-<a name="l00619"></a>00619 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGetDefaultSection(section_block_type *);
-<a name="l00620"></a>00620 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vDefault2SectionInfoList(ULONG);
-<a name="l00621"></a>00621 <span class="keyword">extern</span> <span class="keyword">const</span> section_block_type *
-<a name="l00622"></a>00622                 pGetSectionInfo(<span class="keyword">const</span> section_block_type *, ULONG);
-<a name="l00623"></a>00623 <span class="keyword">extern</span> <span class="keywordtype">size_t</span>   tGetNumberOfSections(<span class="keywordtype">void</span>);
-<a name="l00624"></a>00624 <span class="keyword">extern</span> UCHAR    ucGetSepHdrFtrSpecification(<span class="keywordtype">size_t</span>);
-<a name="l00625"></a>00625 <span class="comment">/* stylelist.c */</span>
-<a name="l00626"></a>00626 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vDestroyStyleInfoList(<span class="keywordtype">void</span>);
-<a name="l00627"></a>00627 <span class="keyword">extern</span> level_type_enum  eGetNumType(UCHAR);
-<a name="l00628"></a>00628 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vCorrectStyleValues(style_block_type *);
-<a name="l00629"></a>00629 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vAdd2StyleInfoList(<span class="keyword">const</span> style_block_type *);
-<a name="l00630"></a>00630 <span class="keyword">extern</span> <span class="keyword">const</span> style_block_type   *pGetNextStyleInfoListItem(
-<a name="l00631"></a>00631                                         <span class="keyword">const</span> style_block_type *);
-<a name="l00632"></a>00632 <span class="keyword">extern</span> <span class="keyword">const</span> style_block_type   *pGetNextTextStyle(<span class="keyword">const</span> style_block_type *);
-<a name="l00633"></a>00633 <span class="keyword">extern</span> USHORT   usGetIstd(ULONG);
-<a name="l00634"></a>00634 <span class="keyword">extern</span> BOOL     bStyleImpliesList(<span class="keyword">const</span> style_block_type *, <span class="keywordtype">int</span>);
-<a name="l00635"></a>00635 <span class="comment">/* stylesheet.c */</span>
-<a name="l00636"></a>00636 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vDestroyStylesheetList(<span class="keywordtype">void</span>);
-<a name="l00637"></a>00637 <span class="keyword">extern</span> USHORT   usStc2istd(UCHAR);
-<a name="l00638"></a>00638 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet2Stylesheet(FILE *, <span class="keywordtype">int</span>, <span class="keyword">const</span> UCHAR *);
-<a name="l00639"></a>00639 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet6Stylesheet(FILE *, ULONG, <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>,
-<a name="l00640"></a>00640                         <span class="keyword">const</span> UCHAR *);
-<a name="l00641"></a>00641 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vGet8Stylesheet(FILE *, <span class="keyword">const</span> pps_info_type *,
-<a name="l00642"></a>00642                         <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>, <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>,
-<a name="l00643"></a>00643                         <span class="keyword">const</span> UCHAR *);
-<a name="l00644"></a>00644 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vFillStyleFromStylesheet(USHORT, style_block_type *);
-<a name="l00645"></a>00645 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vFillFontFromStylesheet(USHORT, font_block_type *);
-<a name="l00646"></a>00646 <span class="comment">/* summary.c */</span>
-<a name="l00647"></a>00647 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vDestroySummaryInfo(<span class="keywordtype">void</span>);
-<a name="l00648"></a>00648 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vSet0SummaryInfo(FILE *, <span class="keyword">const</span> UCHAR *);
-<a name="l00649"></a>00649 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vSet2SummaryInfo(FILE *, <span class="keywordtype">int</span>, <span class="keyword">const</span> UCHAR *);
-<a name="l00650"></a>00650 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vSet6SummaryInfo(FILE *, <span class="keyword">const</span> pps_info_type *,
-<a name="l00651"></a>00651                         <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>, <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>,
-<a name="l00652"></a>00652                         <span class="keyword">const</span> UCHAR *);
-<a name="l00653"></a>00653 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vSet8SummaryInfo(FILE *, <span class="keyword">const</span> pps_info_type *,
-<a name="l00654"></a>00654                         <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>, <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>,
-<a name="l00655"></a>00655                         <span class="keyword">const</span> UCHAR *);
-<a name="l00656"></a>00656 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span>       *szGetTitle(<span class="keywordtype">void</span>);
-<a name="l00657"></a>00657 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span>       *szGetSubject(<span class="keywordtype">void</span>);
-<a name="l00658"></a>00658 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span>       *szGetAuthor(<span class="keywordtype">void</span>);
-<a name="l00659"></a>00659 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span>       *szGetLastSaveDtm(<span class="keywordtype">void</span>);
-<a name="l00660"></a>00660 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span>       *szGetModDate(<span class="keywordtype">void</span>);
-<a name="l00661"></a>00661 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span>       *szGetCreationDate(<span class="keywordtype">void</span>);
-<a name="l00662"></a>00662 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span>       *szGetCompany(<span class="keywordtype">void</span>);
-<a name="l00663"></a>00663 <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span>       *szGetLanguage(<span class="keywordtype">void</span>);
-<a name="l00664"></a>00664 <span class="comment">/* tabstop.c */</span>
-<a name="l00665"></a>00665 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vSetDefaultTabWidth(FILE *, <span class="keyword">const</span> pps_info_type *,
-<a name="l00666"></a>00666                         <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>, <span class="keyword">const</span> ULONG *, <span class="keywordtype">size_t</span>,
-<a name="l00667"></a>00667                         <span class="keyword">const</span> UCHAR *, <span class="keywordtype">int</span>);
-<a name="l00668"></a>00668 <span class="keyword">extern</span> <span class="keywordtype">long</span>     lGetDefaultTabWidth(<span class="keywordtype">void</span>);
-<a name="l00669"></a>00669 <span class="comment">/* text.c */</span>
-<a name="l00670"></a>00670 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vPrologueTXT(diagram_type *, <span class="keyword">const</span> options_type *);
-<a name="l00671"></a>00671 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vEpilogueTXT(FILE *);
-<a name="l00672"></a>00672 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vMove2NextLineTXT(diagram_type *);
-<a name="l00673"></a>00673 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vSubstringTXT(diagram_type *, <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keywordtype">size_t</span>, <span class="keywordtype">long</span>);
-<a name="l00674"></a>00674 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vStartOfParagraphTXT(diagram_type *, <span class="keywordtype">long</span>);
-<a name="l00675"></a>00675 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vEndOfParagraphTXT(diagram_type *, <span class="keywordtype">long</span>);
-<a name="l00676"></a>00676 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vEndOfPageTXT(diagram_type *, <span class="keywordtype">long</span>);
-<a name="l00677"></a>00677 <span class="comment">/* unix.c */</span>
-<a name="l00678"></a>00678 <span class="keyword">extern</span> <span class="keywordtype">void</span>     werr(<span class="keywordtype">int</span>, <span class="keyword">const</span> <span class="keywordtype">char</span> *, ...);
-<a name="l00679"></a>00679 <span class="preprocessor">#if !defined(__riscos)</span>
-<a name="l00680"></a>00680 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="keywordtype">void</span>     Hourglass_On(<span class="keywordtype">void</span>);
-<a name="l00681"></a>00681 <span class="keyword">extern</span> <span class="keywordtype">void</span>     Hourglass_Off(<span class="keywordtype">void</span>);
-<a name="l00682"></a>00682 <span class="preprocessor">#endif </span><span class="comment">/* !__riscos */</span>
-<a name="l00683"></a>00683 <span class="comment">/* utf8.c */</span>
-<a name="l00684"></a>00684 <span class="preprocessor">#if !defined(__riscos)</span>
-<a name="l00685"></a>00685 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="keywordtype">long</span>     utf8_strwidth(<span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keywordtype">size_t</span>);
-<a name="l00686"></a>00686 <span class="keyword">extern</span> <span class="keywordtype">int</span>      utf8_chrlength(<span class="keyword">const</span> <span class="keywordtype">char</span> *);
-<a name="l00687"></a>00687 <span class="keyword">extern</span> BOOL     is_locale_utf8(<span class="keywordtype">void</span>);
-<a name="l00688"></a>00688 <span class="preprocessor">#endif </span><span class="comment">/* !__riscos */</span>
-<a name="l00689"></a>00689 <span class="comment">/* word2text.c */</span>
-<a name="l00690"></a>00690 <span class="keyword">extern</span> BOOL     bOutputContainsText(<span class="keyword">const</span> output_type *);
-<a name="l00691"></a>00691 <span class="keyword">extern</span> BOOL     bWordDecryptor(FILE *, <span class="keywordtype">long</span>, diagram_type *);
-<a name="l00692"></a>00692 <span class="keyword">extern</span> output_type      *pHdrFtrDecryptor(FILE *, ULONG, ULONG);
-<a name="l00693"></a>00693 <span class="keyword">extern</span> <span class="keywordtype">char</span>             *szFootnoteDecryptor(FILE *, ULONG, ULONG);
-<a name="l00694"></a>00694 <span class="comment">/* worddos.c */</span>
-<a name="l00695"></a>00695 <span class="keyword">extern</span> <span class="keywordtype">int</span>      iInitDocumentDOS(FILE *, <span class="keywordtype">long</span>);
-<a name="l00696"></a>00696 <span class="comment">/* wordlib.c */</span>
-<a name="l00697"></a>00697 <span class="keyword">extern</span> BOOL     bIsWordForDosFile(FILE *, <span class="keywordtype">long</span>);
-<a name="l00698"></a>00698 <span class="keyword">extern</span> BOOL     bIsRtfFile(FILE *);
-<a name="l00699"></a>00699 <span class="keyword">extern</span> BOOL     bIsWordPerfectFile(FILE *);
-<a name="l00700"></a>00700 <span class="keyword">extern</span> BOOL     bIsWinWord12File(FILE *, <span class="keywordtype">long</span>);
-<a name="l00701"></a>00701 <span class="keyword">extern</span> BOOL     bIsMacWord45File(FILE *);
-<a name="l00702"></a>00702 <span class="keyword">extern</span> <span class="keywordtype">int</span>      iGuessVersionNumber(FILE *, <span class="keywordtype">long</span>);
-<a name="l00703"></a>00703 <span class="keyword">extern</span> <span class="keywordtype">int</span>      iGetVersionNumber(<span class="keyword">const</span> UCHAR *);
-<a name="l00704"></a>00704 <span class="keyword">extern</span> BOOL     bIsOldMacFile(<span class="keywordtype">void</span>);
-<a name="l00705"></a>00705 <span class="keyword">extern</span> <span class="keywordtype">int</span>      iInitDocument(FILE *, <span class="keywordtype">long</span>);
-<a name="l00706"></a>00706 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vFreeDocument(<span class="keywordtype">void</span>);
-<a name="l00707"></a>00707 <span class="comment">/* wordmac.c */</span>
-<a name="l00708"></a>00708 <span class="keyword">extern</span> <span class="keywordtype">int</span>      iInitDocumentMAC(FILE *, <span class="keywordtype">long</span>);
-<a name="l00709"></a>00709 <span class="comment">/* wordole.c */</span>
-<a name="l00710"></a>00710 <span class="keyword">extern</span> <span class="keywordtype">int</span>      iInitDocumentOLE(FILE *, <span class="keywordtype">long</span>);
-<a name="l00711"></a>00711 <span class="comment">/* wordwin.c */</span>
-<a name="l00712"></a>00712 <span class="keyword">extern</span> <span class="keywordtype">int</span>      iInitDocumentWIN(FILE *, <span class="keywordtype">long</span>);
-<a name="l00713"></a>00713 <span class="comment">/* xmalloc.c */</span>
-<a name="l00714"></a>00714 <span class="keyword">extern</span> <span class="keywordtype">void</span>     *xmalloc(<span class="keywordtype">size_t</span>);
-<a name="l00715"></a>00715 <span class="keyword">extern</span> <span class="keywordtype">void</span>     *xcalloc(<span class="keywordtype">size_t</span>, <span class="keywordtype">size_t</span>);
-<a name="l00716"></a>00716 <span class="keyword">extern</span> <span class="keywordtype">void</span>     *xrealloc(<span class="keywordtype">void</span> *, <span class="keywordtype">size_t</span>);
-<a name="l00717"></a>00717 <span class="keyword">extern</span> <span class="keywordtype">char</span>     *xstrdup(<span class="keyword">const</span> <span class="keywordtype">char</span> *);
-<a name="l00718"></a>00718 <span class="keyword">extern</span> <span class="keywordtype">void</span>     *xfree(<span class="keywordtype">void</span> *);
-<a name="l00719"></a>00719 <span class="comment">/* xml.c */</span>
-<a name="l00720"></a>00720 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vCreateBookIntro(diagram_type *, <span class="keywordtype">int</span>);
-<a name="l00721"></a>00721 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vPrologueXML(diagram_type *, <span class="keyword">const</span> options_type *);
-<a name="l00722"></a>00722 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vEpilogueXML(diagram_type *);
-<a name="l00723"></a>00723 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vMove2NextLineXML(diagram_type *);
-<a name="l00724"></a>00724 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vSubstringXML(diagram_type *,
-<a name="l00725"></a>00725                                 <span class="keyword">const</span> <span class="keywordtype">char</span> *, <span class="keywordtype">size_t</span>, <span class="keywordtype">long</span>, USHORT);
-<a name="l00726"></a>00726 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vStartOfParagraphXML(diagram_type *, UINT);
-<a name="l00727"></a>00727 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vEndOfParagraphXML(diagram_type *, UINT);
-<a name="l00728"></a>00728 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vEndOfPageXML(diagram_type *);
-<a name="l00729"></a>00729 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vSetHeadersXML(diagram_type *, USHORT);
-<a name="l00730"></a>00730 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vStartOfListXML(diagram_type *, UCHAR, BOOL);
-<a name="l00731"></a>00731 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vEndOfListXML(diagram_type *);
-<a name="l00732"></a>00732 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vStartOfListItemXML(diagram_type *, BOOL);
-<a name="l00733"></a>00733 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vEndOfTableXML(diagram_type *);
-<a name="l00734"></a>00734 <span class="keyword">extern</span> <span class="keywordtype">void</span>     vAddTableRowXML(diagram_type *, <span class="keywordtype">char</span> **, <span class="keywordtype">int</span>,
-<a name="l00735"></a>00735                         <span class="keyword">const</span> <span class="keywordtype">short</span> *, UCHAR);
-<a name="l00736"></a>00736 
-<a name="l00737"></a>00737 <span class="preprocessor">#endif </span><span class="comment">/* __antiword_h */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/antiword_8mmp_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/group/antiword.mmp Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/group/antiword.mmp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment">* ==============================================================================</span>
-<a name="l00003"></a>00003 <span class="comment">*  Name        : antiword.mmp</span>
-<a name="l00004"></a>00004 <span class="comment">*  Part of     : Open C / antiword</span>
-<a name="l00005"></a>00005 <span class="comment">*  Interface   : </span>
-<a name="l00006"></a>00006 <span class="comment">*  Description : Word document conversion project</span>
-<a name="l00007"></a>00007 <span class="comment">*  Version     : </span>
-<a name="l00008"></a>00008 <span class="comment">*</span>
-<a name="l00009"></a>00009 <span class="comment">*  Copyright (c) 2005-2007 Nokia Corporation.</span>
-<a name="l00010"></a>00010 <span class="comment">*  This material, including documentation and any related </span>
-<a name="l00011"></a>00011 <span class="comment">*  computer programs, is protected by copyright controlled by </span>
-<a name="l00012"></a>00012 <span class="comment">*  Nokia Corporation.</span>
-<a name="l00013"></a>00013 <span class="comment">* ==============================================================================</span>
-<a name="l00014"></a>00014 <span class="comment">*/</span>
-<a name="l00015"></a>00015 
-<a name="l00016"></a>00016 TARGET          antiword.exe
-<a name="l00017"></a>00017 TARGETTYPE      exe
-<a name="l00018"></a>00018 UID             0x100039CE 0xA0001323
-<a name="l00019"></a>00019 VENDORID        0
-<a name="l00020"></a>00020 
-<a name="l00021"></a>00021 
-<a name="l00022"></a>00022 SOURCEPATH      ..\data
-<a name="l00023"></a>00023 START RESOURCE  antiword_reg.rss
-<a name="l00024"></a>00024 <span class="preprocessor">#ifdef WINSCW</span>
-<a name="l00025"></a>00025 <span class="preprocessor"></span>TARGETPATH          \<span class="keyword">private</span>\10003a3f\apps
-<a name="l00026"></a>00026 <span class="preprocessor">#else</span>
-<a name="l00027"></a>00027 <span class="preprocessor"></span>TARGETPATH          \<span class="keyword">private</span>\10003a3f\<span class="keyword">import</span>\apps
-<a name="l00028"></a>00028 <span class="preprocessor">#endif</span>
-<a name="l00029"></a>00029 <span class="preprocessor"></span>END <span class="comment">//RESOURCE</span>
-<a name="l00030"></a>00030 
-<a name="l00031"></a>00031 SOURCEPATH      ..\src
-<a name="l00032"></a>00032 
-<a name="l00033"></a>00033 <span class="comment">//Sourcefile</span>
-<a name="l00034"></a>00034 SOURCE          asc85enc.c
-<a name="l00035"></a>00035 SOURCE          blocklist.c
-<a name="l00036"></a>00036 SOURCE          chartrans.c
-<a name="l00037"></a>00037 SOURCE          datalist.c
-<a name="l00038"></a>00038 SOURCE          depot.c
-<a name="l00039"></a>00039 SOURCE          dib2eps.c
-<a name="l00040"></a>00040 SOURCE          doclist.c
-<a name="l00041"></a>00041 SOURCE          fail.c
-<a name="l00042"></a>00042 SOURCE          finddata.c
-<a name="l00043"></a>00043 SOURCE          findtext.c
-<a name="l00044"></a>00044 SOURCE          fmt_text.c
-<a name="l00045"></a>00045 SOURCE          fontlist.c
-<a name="l00046"></a>00046 SOURCE          fonts.c
-<a name="l00047"></a>00047 SOURCE          fonts_u.c
-<a name="l00048"></a>00048 SOURCE          hdrftrlist.c
-<a name="l00049"></a>00049 SOURCE          imgexam.c
-<a name="l00050"></a>00050 SOURCE          imgtrans.c
-<a name="l00051"></a>00051 SOURCE          jpeg2eps.c
-<a name="l00052"></a>00052 SOURCE          listlist.c
-<a name="l00053"></a>00053 SOURCE          main_u.c
-<a name="l00054"></a>00054 SOURCE          misc.c
-<a name="l00055"></a>00055 SOURCE          notes.c
-<a name="l00056"></a>00056 SOURCE          options.c
-<a name="l00057"></a>00057 SOURCE          out2window.c
-<a name="l00058"></a>00058 SOURCE          output.c
-<a name="l00059"></a>00059 SOURCE          pdf.c
-<a name="l00060"></a>00060 SOURCE          pictlist.c
-<a name="l00061"></a>00061 SOURCE          png2eps.c
-<a name="l00062"></a>00062 SOURCE          png2sprt.c
-<a name="l00063"></a>00063 SOURCE          postscript.c
-<a name="l00064"></a>00064 SOURCE          prop0.c
-<a name="l00065"></a>00065 SOURCE          prop2.c
-<a name="l00066"></a>00066 SOURCE          prop6.c
-<a name="l00067"></a>00067 SOURCE          prop8.c
-<a name="l00068"></a>00068 SOURCE          properties.c
-<a name="l00069"></a>00069 SOURCE          propmod.c
-<a name="l00070"></a>00070 SOURCE          rowlist.c
-<a name="l00071"></a>00071 SOURCE          sectlist.c
-<a name="l00072"></a>00072 SOURCE          stylelist.c
-<a name="l00073"></a>00073 SOURCE          stylesheet.c
-<a name="l00074"></a>00074 SOURCE          summary.c
-<a name="l00075"></a>00075 SOURCE          tabstop.c
-<a name="l00076"></a>00076 SOURCE          text.c
-<a name="l00077"></a>00077 SOURCE          unix.c
-<a name="l00078"></a>00078 SOURCE          utf8.c
-<a name="l00079"></a>00079 SOURCE          word2text.c
-<a name="l00080"></a>00080 SOURCE          worddos.c
-<a name="l00081"></a>00081 SOURCE          wordlib.c
-<a name="l00082"></a>00082 SOURCE          wordmac.c
-<a name="l00083"></a>00083 SOURCE          wordole.c
-<a name="l00084"></a>00084 SOURCE          wordwin.c
-<a name="l00085"></a>00085 SOURCE          xmalloc.c
-<a name="l00086"></a>00086 SOURCE          xml.c
-<a name="l00087"></a>00087 
-<a name="l00088"></a>00088 <span class="comment">// Some of the files removed</span>
-<a name="l00089"></a>00089 <span class="comment">// sprite support is not present in openc</span>
-<a name="l00090"></a>00090 <span class="comment">//SOURCE          dib2sprt.c</span>
-<a name="l00091"></a>00091 <span class="comment">//SOURCE          draw.c</span>
-<a name="l00092"></a>00092 <span class="comment">//SOURCE          drawfile.c</span>
-<a name="l00093"></a>00093 <span class="comment">//SOURCE          fonts_r.c</span>
-<a name="l00094"></a>00094 <span class="comment">//SOURCE          icons.c</span>
-<a name="l00095"></a>00095 <span class="comment">//SOURCE          jpeg2sprt.c</span>
-<a name="l00096"></a>00096 <span class="comment">//SOURCE          main_ros.c</span>
-<a name="l00097"></a>00097 <span class="comment">//SOURCE          riscos.c</span>
-<a name="l00098"></a>00098 <span class="comment">//SOURCE          saveas.c</span>
-<a name="l00099"></a>00099 <span class="comment">//SOURCE          startup.c</span>
-<a name="l00100"></a>00100 
-<a name="l00101"></a>00101 
-<a name="l00102"></a>00102 USERINCLUDE     ..\inc 
-<a name="l00103"></a>00103 
-<a name="l00104"></a>00104 
-<a name="l00105"></a>00105 
-<a name="l00106"></a>00106 
-<a name="l00107"></a>00107 <span class="comment">//Project Specific Macro and reqmts.</span>
-<a name="l00108"></a>00108 MACRO                           SYMBIAN
-<a name="l00109"></a>00109 MACRO                           NDEBUG
-<a name="l00110"></a>00110 epocheapsize            0x4000 0x8000
-<a name="l00111"></a>00111 epocstacksize           0x8000
-<a name="l00112"></a>00112 
-<a name="l00113"></a>00113 <span class="comment">//Standard System include paths</span>
-<a name="l00114"></a>00114 SYSTEMINCLUDE           \epoc32\include
-<a name="l00115"></a>00115 <span class="comment">// These are needed for including Open C headers</span>
-<a name="l00116"></a>00116 <span class="comment">// NOTE! When part of SDK, path will differ</span>
-<a name="l00117"></a>00117 SYSTEMINCLUDE           \epoc32\include\stdapis
-<a name="l00118"></a>00118 
-<a name="l00119"></a>00119 STATICLIBRARY           libcrt0.lib
-<a name="l00120"></a>00120 
-<a name="l00121"></a>00121 LIBRARY                 euser.lib
-<a name="l00122"></a>00122 LIBRARY                 libc.lib
-<a name="l00123"></a>00123 
-<a name="l00124"></a>00124 <span class="comment">// No capabilities needed by this application</span>
-<a name="l00125"></a>00125 CAPABILITY                      None
-<a name="l00126"></a>00126 
-<a name="l00127"></a>00127 LANG                    SC
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/antiword__reg_8rss_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/data/antiword_reg.rss Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/data/antiword_reg.rss</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include &lt;appinfo.rh&gt;</span>
-<a name="l00002"></a>00002 
-<a name="l00003"></a>00003 UID2 KUidAppRegistrationResourceFile
-<a name="l00004"></a>00004 UID3 0xA0001323
-<a name="l00005"></a>00005 
-<a name="l00006"></a>00006 RESOURCE APP_REGISTRATION_INFO
-<a name="l00007"></a>00007   {
-<a name="l00008"></a>00008   app_file=<span class="stringliteral">&quot;Antiword&quot;</span>;
-<a name="l00009"></a>00009 
-<a name="l00010"></a>00010   embeddability=KAppNotEmbeddable;
-<a name="l00011"></a>00011   newfile=KAppDoesNotSupportNewFile;
-<a name="l00012"></a>00012   }
-<a name="l00013"></a>00013 
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/asc85enc_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,170 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/asc85enc.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/asc85enc.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * asc85enc.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2000-2003 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Functions to for ASCII 85 encoding</span>
-<a name="l00007"></a>00007 <span class="comment"> *</span>
-<a name="l00008"></a>00008 <span class="comment"> *====================================================================</span>
-<a name="l00009"></a>00009 <span class="comment"> * This part of the software is based on:</span>
-<a name="l00010"></a>00010 <span class="comment"> * asc85ec.c - ASCII85 and Hex encoding for PostScript Level 2 and PDF</span>
-<a name="l00011"></a>00011 <span class="comment"> * Copyright (C) 1994-99 Thomas Merz (tm@muc.de)</span>
-<a name="l00012"></a>00012 <span class="comment"> *====================================================================</span>
-<a name="l00013"></a>00013 <span class="comment"> * The credit should go to him, but all the bugs are mine.</span>
-<a name="l00014"></a>00014 <span class="comment"> */</span>
-<a name="l00015"></a>00015 
-<a name="l00016"></a>00016 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
-<a name="l00017"></a>00017 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00018"></a>00018 
-<a name="l00019"></a>00019 <span class="keyword">static</span> <span class="keyword">const</span> ULONG      aulPower85[5] = {
-<a name="l00020"></a>00020         1UL, 85UL, 85UL * 85, 85UL * 85 * 85, 85UL * 85 * 85 * 85,
-<a name="l00021"></a>00021 };
-<a name="l00022"></a>00022 <span class="keyword">static</span> <span class="keywordtype">int</span>      iOutBytes = 0;  <span class="comment">/* Number of characters in an output line */</span>
-<a name="l00023"></a>00023 <span class="keyword">static</span> <span class="keywordtype">char</span>     cCharPrev = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00024"></a>00024 
-<a name="l00025"></a>00025 <span class="comment">/*</span>
-<a name="l00026"></a>00026 <span class="comment"> * Two percent characters at the start of a line will cause trouble</span>
-<a name="l00027"></a>00027 <span class="comment"> * with some post-processing software. In order to avoid this, we</span>
-<a name="l00028"></a>00028 <span class="comment"> * simply insert a line break if we encounter two percent characters</span>
-<a name="l00029"></a>00029 <span class="comment"> * at the start of the line. Of course, this rather simplistic</span>
-<a name="l00030"></a>00030 <span class="comment"> * algorithm may lead to a large line count in pathological cases,</span>
-<a name="l00031"></a>00031 <span class="comment"> * but the chance for hitting such a case is very small, and even</span>
-<a name="l00032"></a>00032 <span class="comment"> * so it&#39;s only a cosmetic flaw and not a functional restriction.</span>
-<a name="l00033"></a>00033 <span class="comment"> */</span>
-<a name="l00034"></a>00034 
-<a name="l00035"></a>00035 <span class="comment">/*</span>
-<a name="l00036"></a>00036 <span class="comment"> * vOutputByte - output one byte</span>
-<a name="l00037"></a>00037 <span class="comment"> */</span>
-<a name="l00038"></a>00038 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00039"></a>00039 vOutputByte(ULONG ulChar, FILE *pOutFile)
-<a name="l00040"></a>00040 {
-<a name="l00041"></a>00041         <span class="keywordflow">if</span> (iOutBytes == 1 &amp;&amp; cCharPrev == <span class="charliteral">&#39;%&#39;</span> &amp;&amp; ulChar == (ULONG)<span class="charliteral">&#39;%&#39;</span>) {
-<a name="l00042"></a>00042                 <span class="keywordflow">if</span> (putc(<span class="charliteral">&#39;\n&#39;</span>, pOutFile) != EOF) {
-<a name="l00043"></a>00043                         iOutBytes = 0;
-<a name="l00044"></a>00044                 }
-<a name="l00045"></a>00045         }
-<a name="l00046"></a>00046         <span class="keywordflow">if</span> (putc((<span class="keywordtype">int</span>)ulChar, pOutFile) == EOF) {
-<a name="l00047"></a>00047                 <span class="keywordflow">return</span>;
-<a name="l00048"></a>00048         }
-<a name="l00049"></a>00049         iOutBytes++;
-<a name="l00050"></a>00050         <span class="keywordflow">if</span> (iOutBytes &gt; 63) {
-<a name="l00051"></a>00051                 <span class="keywordflow">if</span> (putc(<span class="charliteral">&#39;\n&#39;</span>, pOutFile) != EOF) {
-<a name="l00052"></a>00052                         iOutBytes = 0;
-<a name="l00053"></a>00053                 }
-<a name="l00054"></a>00054         }
-<a name="l00055"></a>00055         cCharPrev = (char)ulChar;
-<a name="l00056"></a>00056 } <span class="comment">/* end of vOutputByte */</span>
-<a name="l00057"></a>00057 
-<a name="l00058"></a>00058 <span class="comment">/*</span>
-<a name="l00059"></a>00059 <span class="comment"> * vASCII85EncodeByte - ASCII 85 encode a byte</span>
-<a name="l00060"></a>00060 <span class="comment"> */</span>
-<a name="l00061"></a>00061 <span class="keywordtype">void</span>
-<a name="l00062"></a>00062 vASCII85EncodeByte(FILE *pOutFile, <span class="keywordtype">int</span> iByte)
-<a name="l00063"></a>00063 {
-<a name="l00064"></a>00064         <span class="keyword">static</span> ULONG    ulBuffer[4] = { 0, 0, 0, 0 };
-<a name="l00065"></a>00065         <span class="keyword">static</span> <span class="keywordtype">int</span>      iInBuffer = 0;
-<a name="l00066"></a>00066         ULONG   ulValue, ulTmp;
-<a name="l00067"></a>00067         <span class="keywordtype">int</span>     iIndex;
-<a name="l00068"></a>00068 
-<a name="l00069"></a>00069         fail(pOutFile == NULL);
-<a name="l00070"></a>00070         fail(iInBuffer &lt; 0);
-<a name="l00071"></a>00071         fail(iInBuffer &gt; 3);
-<a name="l00072"></a>00072 
-<a name="l00073"></a>00073         <span class="keywordflow">if</span> (iByte == EOF) {
-<a name="l00074"></a>00074                 <span class="comment">/* End Of File, time to clean up */</span>
-<a name="l00075"></a>00075                 <span class="keywordflow">if</span> (iInBuffer &gt; 0 &amp;&amp; iInBuffer &lt; 4) {
-<a name="l00076"></a>00076                         <span class="comment">/* Encode the remaining bytes */</span>
-<a name="l00077"></a>00077                         ulValue = 0;
-<a name="l00078"></a>00078                         <span class="keywordflow">for</span> (iIndex = iInBuffer - 1; iIndex &gt;= 0; iIndex--) {
-<a name="l00079"></a>00079                                 ulValue |=
-<a name="l00080"></a>00080                                         ulBuffer[iIndex] &lt;&lt; (8 * (3 - iIndex));
-<a name="l00081"></a>00081                         }
-<a name="l00082"></a>00082                         <span class="keywordflow">for</span> (iIndex = 4; iIndex &gt;= 4 - iInBuffer; iIndex--) {
-<a name="l00083"></a>00083                                 ulTmp = ulValue / aulPower85[iIndex];
-<a name="l00084"></a>00084                                 vOutputByte(ulTmp + <span class="charliteral">&#39;!&#39;</span>, pOutFile);
-<a name="l00085"></a>00085                                 ulValue -= ulTmp * aulPower85[iIndex];
-<a name="l00086"></a>00086                         }
-<a name="l00087"></a>00087                 }
-<a name="l00088"></a>00088                 <span class="comment">/* Add the End Of Data marker */</span>
-<a name="l00089"></a>00089                 (void)putc(<span class="charliteral">&#39;~&#39;</span>, pOutFile);
-<a name="l00090"></a>00090                 (void)putc(<span class="charliteral">&#39;&gt;&#39;</span>, pOutFile);
-<a name="l00091"></a>00091                 (void)putc(<span class="charliteral">&#39;\n&#39;</span>, pOutFile);
-<a name="l00092"></a>00092                 <span class="comment">/* Reset the control variables */</span>
-<a name="l00093"></a>00093                 iInBuffer = 0;
-<a name="l00094"></a>00094                 iOutBytes = 0;
-<a name="l00095"></a>00095                 cCharPrev = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00096"></a>00096                 <span class="keywordflow">return</span>;
-<a name="l00097"></a>00097         }
-<a name="l00098"></a>00098 
-<a name="l00099"></a>00099         ulBuffer[iInBuffer] = (ULONG)iByte &amp; 0xff;
-<a name="l00100"></a>00100         iInBuffer++;
-<a name="l00101"></a>00101 
-<a name="l00102"></a>00102         <span class="keywordflow">if</span> (iInBuffer &gt;= 4) {
-<a name="l00103"></a>00103                 ulValue = (ulBuffer[0] &lt;&lt; 24) | (ulBuffer[1] &lt;&lt; 16) |
-<a name="l00104"></a>00104                         (ulBuffer[2] &lt;&lt; 8) | ulBuffer[3];
-<a name="l00105"></a>00105                 <span class="keywordflow">if</span> (ulValue == 0) {
-<a name="l00106"></a>00106                         vOutputByte((ULONG)<span class="charliteral">&#39;z&#39;</span>, pOutFile); <span class="comment">/* Shortcut for 0 */</span>
-<a name="l00107"></a>00107                 } <span class="keywordflow">else</span> {
-<a name="l00108"></a>00108                         <span class="keywordflow">for</span> (iIndex = 4; iIndex &gt;= 0; iIndex--) {
-<a name="l00109"></a>00109                                 ulTmp = ulValue / aulPower85[iIndex];
-<a name="l00110"></a>00110                                 vOutputByte(ulTmp + <span class="charliteral">&#39;!&#39;</span>, pOutFile);
-<a name="l00111"></a>00111                                 ulValue -= ulTmp * aulPower85[iIndex];
-<a name="l00112"></a>00112                         }
-<a name="l00113"></a>00113                 }
-<a name="l00114"></a>00114                 <span class="comment">/* Reset the buffer */</span>
-<a name="l00115"></a>00115                 iInBuffer = 0;
-<a name="l00116"></a>00116         }
-<a name="l00117"></a>00117 } <span class="comment">/* end of vASCII85EncodeByte */</span>
-<a name="l00118"></a>00118 
-<a name="l00119"></a>00119 <span class="comment">/*</span>
-<a name="l00120"></a>00120 <span class="comment"> * vASCII85EncodeArray - ASCII 85 encode a byte array</span>
-<a name="l00121"></a>00121 <span class="comment"> */</span>
-<a name="l00122"></a>00122 <span class="keywordtype">void</span>
-<a name="l00123"></a>00123 vASCII85EncodeArray(FILE *pInFile, FILE *pOutFile, <span class="keywordtype">size_t</span> tLength)
-<a name="l00124"></a>00124 {
-<a name="l00125"></a>00125         <span class="keywordtype">size_t</span>  tCount;
-<a name="l00126"></a>00126         <span class="keywordtype">int</span>     iByte;
-<a name="l00127"></a>00127 
-<a name="l00128"></a>00128         fail(pInFile == NULL);
-<a name="l00129"></a>00129         fail(pOutFile == NULL);
-<a name="l00130"></a>00130 
-<a name="l00131"></a>00131         DBG_DEC(tLength);
-<a name="l00132"></a>00132 
-<a name="l00133"></a>00133         <span class="keywordflow">for</span> (tCount = 0; tCount &lt; tLength; tCount++) {
-<a name="l00134"></a>00134                 iByte = iNextByte(pInFile);
-<a name="l00135"></a>00135                 <span class="keywordflow">if</span> (iByte == EOF) {
-<a name="l00136"></a>00136                         <span class="keywordflow">break</span>;
-<a name="l00137"></a>00137                 }
-<a name="l00138"></a>00138                 vASCII85EncodeByte(pOutFile, iByte);
-<a name="l00139"></a>00139         }
-<a name="l00140"></a>00140 } <span class="comment">/* end of vASCII85EncodeArray */</span>
-<a name="l00141"></a>00141 
-<a name="l00142"></a>00142 <span class="comment">/*</span>
-<a name="l00143"></a>00143 <span class="comment"> * vASCII85EncodeFile - ASCII 85 encode part of a file</span>
-<a name="l00144"></a>00144 <span class="comment"> */</span>
-<a name="l00145"></a>00145 <span class="keywordtype">void</span>
-<a name="l00146"></a>00146 vASCII85EncodeFile(FILE *pInFile, FILE *pOutFile, <span class="keywordtype">size_t</span> tLength)
-<a name="l00147"></a>00147 {
-<a name="l00148"></a>00148         fail(pInFile == NULL);
-<a name="l00149"></a>00149         fail(pOutFile == NULL);
-<a name="l00150"></a>00150         fail(tLength == 0);
-<a name="l00151"></a>00151 
-<a name="l00152"></a>00152         vASCII85EncodeArray(pInFile, pOutFile, tLength);
-<a name="l00153"></a>00153         vASCII85EncodeByte(pOutFile, EOF);
-<a name="l00154"></a>00154 } <span class="comment">/* end of vASCII85EncodeFile */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/blocklist_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,839 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/blocklist.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/blocklist.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * blocklist.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2005 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Build, read and destroy the lists of Word &quot;text&quot; blocks</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00011"></a>00011 
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 <span class="comment">/*</span>
-<a name="l00014"></a>00014 <span class="comment"> * Private structure to hide the way the information</span>
-<a name="l00015"></a>00015 <span class="comment"> * is stored from the rest of the program</span>
-<a name="l00016"></a>00016 <span class="comment"> */</span>
-<a name="l00017"></a>00017 <span class="keyword">typedef</span> <span class="keyword">struct </span>list_mem_tag {
-<a name="l00018"></a>00018         text_block_type         tInfo;
-<a name="l00019"></a>00019         <span class="keyword">struct </span>list_mem_tag     *pNext;
-<a name="l00020"></a>00020 } list_mem_type;
-<a name="l00021"></a>00021 
-<a name="l00022"></a>00022 <span class="keyword">typedef</span> <span class="keyword">struct </span>readinfo_tag {
-<a name="l00023"></a>00023         list_mem_type           *pBlockCurrent;
-<a name="l00024"></a>00024         ULONG                   ulBlockOffset;
-<a name="l00025"></a>00025         <span class="keywordtype">size_t</span>                  tByteNext;
-<a name="l00026"></a>00026         UCHAR                   aucBlock[BIG_BLOCK_SIZE];
-<a name="l00027"></a>00027 } readinfo_type;
-<a name="l00028"></a>00028 
-<a name="l00029"></a>00029 <span class="comment">/* Variables to describe the start of the block lists */</span>
-<a name="l00030"></a>00030 <span class="keyword">static</span> list_mem_type    *pTextAnchor = NULL;
-<a name="l00031"></a>00031 <span class="keyword">static</span> list_mem_type    *pFootnoteAnchor = NULL;
-<a name="l00032"></a>00032 <span class="keyword">static</span> list_mem_type    *pHdrFtrAnchor = NULL;
-<a name="l00033"></a>00033 <span class="keyword">static</span> list_mem_type    *pMacroAnchor = NULL;
-<a name="l00034"></a>00034 <span class="keyword">static</span> list_mem_type    *pAnnotationAnchor = NULL;
-<a name="l00035"></a>00035 <span class="keyword">static</span> list_mem_type    *pEndnoteAnchor = NULL;
-<a name="l00036"></a>00036 <span class="keyword">static</span> list_mem_type    *pTextBoxAnchor = NULL;
-<a name="l00037"></a>00037 <span class="keyword">static</span> list_mem_type    *pHdrTextBoxAnchor = NULL;
-<a name="l00038"></a>00038 <span class="comment">/* Variable needed to build the block list */</span>
-<a name="l00039"></a>00039 <span class="keyword">static</span> list_mem_type    *pBlockLast = NULL;
-<a name="l00040"></a>00040 <span class="comment">/* Variable needed to read the block lists */</span>
-<a name="l00041"></a>00041 <span class="keyword">static</span> readinfo_type    tOthers = { NULL, 0, 0, };
-<a name="l00042"></a>00042 <span class="keyword">static</span> readinfo_type    tHdrFtr = { NULL, 0, 0, };
-<a name="l00043"></a>00043 <span class="keyword">static</span> readinfo_type    tFootnote = { NULL, 0, 0, };
-<a name="l00044"></a>00044 
-<a name="l00045"></a>00045 
-<a name="l00046"></a>00046 <span class="comment">/*</span>
-<a name="l00047"></a>00047 <span class="comment"> * pFreeOneList - free a text block list</span>
-<a name="l00048"></a>00048 <span class="comment"> *</span>
-<a name="l00049"></a>00049 <span class="comment"> * Will always return NULL</span>
-<a name="l00050"></a>00050 <span class="comment"> */</span>
-<a name="l00051"></a>00051 <span class="keyword">static</span> list_mem_type *
-<a name="l00052"></a>00052 pFreeOneList(list_mem_type *pAnchor)
-<a name="l00053"></a>00053 {
-<a name="l00054"></a>00054         list_mem_type   *pCurr, *pNext;
-<a name="l00055"></a>00055 
-<a name="l00056"></a>00056         pCurr = pAnchor;
-<a name="l00057"></a>00057         <span class="keywordflow">while</span> (pCurr != NULL) {
-<a name="l00058"></a>00058                 pNext = pCurr-&gt;pNext;
-<a name="l00059"></a>00059                 pCurr = xfree(pCurr);
-<a name="l00060"></a>00060                 pCurr = pNext;
-<a name="l00061"></a>00061         }
-<a name="l00062"></a>00062         <span class="keywordflow">return</span> NULL;
-<a name="l00063"></a>00063 } <span class="comment">/* end of pFreeOneList */</span>
-<a name="l00064"></a>00064 
-<a name="l00065"></a>00065 <span class="comment">/*</span>
-<a name="l00066"></a>00066 <span class="comment"> * vDestroyTextBlockList - destroy the text block lists</span>
-<a name="l00067"></a>00067 <span class="comment"> */</span>
-<a name="l00068"></a>00068 <span class="keywordtype">void</span>
-<a name="l00069"></a>00069 vDestroyTextBlockList(<span class="keywordtype">void</span>)
-<a name="l00070"></a>00070 {
-<a name="l00071"></a>00071         DBG_MSG(<span class="stringliteral">&quot;vDestroyTextBlockList&quot;</span>);
-<a name="l00072"></a>00072 
-<a name="l00073"></a>00073         <span class="comment">/* Free the lists one by one */</span>
-<a name="l00074"></a>00074         pTextAnchor = pFreeOneList(pTextAnchor);
-<a name="l00075"></a>00075         pFootnoteAnchor = pFreeOneList(pFootnoteAnchor);
-<a name="l00076"></a>00076         pHdrFtrAnchor = pFreeOneList(pHdrFtrAnchor);
-<a name="l00077"></a>00077         pMacroAnchor = pFreeOneList(pMacroAnchor);
-<a name="l00078"></a>00078         pAnnotationAnchor = pFreeOneList(pAnnotationAnchor);
-<a name="l00079"></a>00079         pEndnoteAnchor = pFreeOneList(pEndnoteAnchor);
-<a name="l00080"></a>00080         pTextBoxAnchor = pFreeOneList(pTextBoxAnchor);
-<a name="l00081"></a>00081         pHdrTextBoxAnchor = pFreeOneList(pHdrTextBoxAnchor);
-<a name="l00082"></a>00082         <span class="comment">/* Reset all the controle variables */</span>
-<a name="l00083"></a>00083         pBlockLast = NULL;
-<a name="l00084"></a>00084         tOthers.pBlockCurrent = NULL;
-<a name="l00085"></a>00085         tHdrFtr.pBlockCurrent = NULL;
-<a name="l00086"></a>00086         tFootnote.pBlockCurrent = NULL;
-<a name="l00087"></a>00087 } <span class="comment">/* end of vDestroyTextBlockList */</span>
-<a name="l00088"></a>00088 
-<a name="l00089"></a>00089 <span class="comment">/*</span>
-<a name="l00090"></a>00090 <span class="comment"> * bAdd2TextBlockList - add an element to the text block list</span>
-<a name="l00091"></a>00091 <span class="comment"> *</span>
-<a name="l00092"></a>00092 <span class="comment"> * returns: TRUE when successful, otherwise FALSE</span>
-<a name="l00093"></a>00093 <span class="comment"> */</span>
-<a name="l00094"></a>00094 BOOL
-<a name="l00095"></a>00095 bAdd2TextBlockList(<span class="keyword">const</span> text_block_type *pTextBlock)
-<a name="l00096"></a>00096 {
-<a name="l00097"></a>00097         list_mem_type   *pListMember;
-<a name="l00098"></a>00098 
-<a name="l00099"></a>00099         fail(pTextBlock == NULL);
-<a name="l00100"></a>00100         fail(pTextBlock-&gt;ulFileOffset == FC_INVALID);
-<a name="l00101"></a>00101         fail(pTextBlock-&gt;ulCharPos == CP_INVALID);
-<a name="l00102"></a>00102         fail(pTextBlock-&gt;ulLength == 0);
-<a name="l00103"></a>00103         fail(pTextBlock-&gt;bUsesUnicode &amp;&amp; odd(pTextBlock-&gt;ulLength));
-<a name="l00104"></a>00104 
-<a name="l00105"></a>00105         NO_DBG_MSG(<span class="stringliteral">&quot;bAdd2TextBlockList&quot;</span>);
-<a name="l00106"></a>00106         NO_DBG_HEX(pTextBlock-&gt;ulFileOffset);
-<a name="l00107"></a>00107         NO_DBG_HEX(pTextBlock-&gt;ulCharPos);
-<a name="l00108"></a>00108         NO_DBG_HEX(pTextBlock-&gt;ulLength);
-<a name="l00109"></a>00109         NO_DBG_DEC(pTextBlock-&gt;bUsesUnicode);
-<a name="l00110"></a>00110         NO_DBG_DEC(pTextBlock-&gt;usPropMod);
-<a name="l00111"></a>00111 
-<a name="l00112"></a>00112         <span class="keywordflow">if</span> (pTextBlock-&gt;ulFileOffset == FC_INVALID ||
-<a name="l00113"></a>00113             pTextBlock-&gt;ulCharPos == CP_INVALID ||
-<a name="l00114"></a>00114             pTextBlock-&gt;ulLength == 0 ||
-<a name="l00115"></a>00115             (pTextBlock-&gt;bUsesUnicode &amp;&amp; odd(pTextBlock-&gt;ulLength))) {
-<a name="l00116"></a>00116                 werr(0, <span class="stringliteral">&quot;Software (textblock) error&quot;</span>);
-<a name="l00117"></a>00117                 <span class="keywordflow">return</span> FALSE;
-<a name="l00118"></a>00118         }
-<a name="l00119"></a>00119         <span class="comment">/*</span>
-<a name="l00120"></a>00120 <span class="comment">         * Check for continuous blocks of the same character size and</span>
-<a name="l00121"></a>00121 <span class="comment">         * the same properties modifier</span>
-<a name="l00122"></a>00122 <span class="comment">         */</span>
-<a name="l00123"></a>00123         <span class="keywordflow">if</span> (pBlockLast != NULL &amp;&amp;
-<a name="l00124"></a>00124             pBlockLast-&gt;tInfo.ulFileOffset +
-<a name="l00125"></a>00125              pBlockLast-&gt;tInfo.ulLength == pTextBlock-&gt;ulFileOffset &amp;&amp;
-<a name="l00126"></a>00126             pBlockLast-&gt;tInfo.ulCharPos +
-<a name="l00127"></a>00127              pBlockLast-&gt;tInfo.ulLength == pTextBlock-&gt;ulCharPos &amp;&amp;
-<a name="l00128"></a>00128             pBlockLast-&gt;tInfo.bUsesUnicode == pTextBlock-&gt;bUsesUnicode &amp;&amp;
-<a name="l00129"></a>00129             pBlockLast-&gt;tInfo.usPropMod == pTextBlock-&gt;usPropMod) {
-<a name="l00130"></a>00130                 <span class="comment">/* These are continous blocks */</span>
-<a name="l00131"></a>00131                 pBlockLast-&gt;tInfo.ulLength += pTextBlock-&gt;ulLength;
-<a name="l00132"></a>00132                 <span class="keywordflow">return</span> TRUE;
-<a name="l00133"></a>00133         }
-<a name="l00134"></a>00134         <span class="comment">/* Make a new block */</span>
-<a name="l00135"></a>00135         pListMember = xmalloc(<span class="keyword">sizeof</span>(list_mem_type));
-<a name="l00136"></a>00136         <span class="comment">/* Add the block to the list */</span>
-<a name="l00137"></a>00137         pListMember-&gt;tInfo = *pTextBlock;
-<a name="l00138"></a>00138         pListMember-&gt;pNext = NULL;
-<a name="l00139"></a>00139         <span class="keywordflow">if</span> (pTextAnchor == NULL) {
-<a name="l00140"></a>00140                 pTextAnchor = pListMember;
-<a name="l00141"></a>00141         } <span class="keywordflow">else</span> {
-<a name="l00142"></a>00142                 fail(pBlockLast == NULL);
-<a name="l00143"></a>00143                 pBlockLast-&gt;pNext = pListMember;
-<a name="l00144"></a>00144         }
-<a name="l00145"></a>00145         pBlockLast = pListMember;
-<a name="l00146"></a>00146         <span class="keywordflow">return</span> TRUE;
-<a name="l00147"></a>00147 } <span class="comment">/* end of bAdd2TextBlockList */</span>
-<a name="l00148"></a>00148 
-<a name="l00149"></a>00149 <span class="comment">/*</span>
-<a name="l00150"></a>00150 <span class="comment"> * vSpitList - Split the list in two</span>
-<a name="l00151"></a>00151 <span class="comment"> */</span>
-<a name="l00152"></a>00152 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00153"></a>00153 vSpitList(list_mem_type **ppAnchorCurr, list_mem_type **ppAnchorNext,
-<a name="l00154"></a>00154         ULONG ulListLen)
-<a name="l00155"></a>00155 {
-<a name="l00156"></a>00156         list_mem_type   *pCurr;
-<a name="l00157"></a>00157         <span class="keywordtype">long</span>            lCharsToGo, lBytesTooFar;
-<a name="l00158"></a>00158 
-<a name="l00159"></a>00159         fail(ppAnchorCurr == NULL);
-<a name="l00160"></a>00160         fail(ppAnchorNext == NULL);
-<a name="l00161"></a>00161         fail(ulListLen &gt; (ULONG)LONG_MAX);
-<a name="l00162"></a>00162 
-<a name="l00163"></a>00163         pCurr = NULL;
-<a name="l00164"></a>00164         lCharsToGo = (long)ulListLen;
-<a name="l00165"></a>00165         lBytesTooFar = -1;
-<a name="l00166"></a>00166         <span class="keywordflow">if</span> (ulListLen != 0) {
-<a name="l00167"></a>00167                 DBG_DEC(ulListLen);
-<a name="l00168"></a>00168                 <span class="keywordflow">for</span> (pCurr = *ppAnchorCurr;
-<a name="l00169"></a>00169                      pCurr != NULL;
-<a name="l00170"></a>00170                      pCurr = pCurr-&gt;pNext) {
-<a name="l00171"></a>00171                         NO_DBG_DEC(pCurr-&gt;tInfo.ulLength);
-<a name="l00172"></a>00172                         fail(pCurr-&gt;tInfo.ulLength == 0);
-<a name="l00173"></a>00173                         fail(pCurr-&gt;tInfo.ulLength &gt; (ULONG)LONG_MAX);
-<a name="l00174"></a>00174                         <span class="keywordflow">if</span> (pCurr-&gt;tInfo.bUsesUnicode) {
-<a name="l00175"></a>00175                                 fail(odd(pCurr-&gt;tInfo.ulLength));
-<a name="l00176"></a>00176                                 lCharsToGo -= (long)(pCurr-&gt;tInfo.ulLength / 2);
-<a name="l00177"></a>00177                                 <span class="keywordflow">if</span> (lCharsToGo &lt; 0) {
-<a name="l00178"></a>00178                                         lBytesTooFar = -2 * lCharsToGo;
-<a name="l00179"></a>00179                                 }
-<a name="l00180"></a>00180                         } <span class="keywordflow">else</span> {
-<a name="l00181"></a>00181                                 lCharsToGo -= (long)pCurr-&gt;tInfo.ulLength;
-<a name="l00182"></a>00182                                 if (lCharsToGo &lt; 0) {
-<a name="l00183"></a>00183                                         lBytesTooFar = -lCharsToGo;
-<a name="l00184"></a>00184                                 }
-<a name="l00185"></a>00185                         }
-<a name="l00186"></a>00186                         <span class="keywordflow">if</span> (lCharsToGo &lt;= 0) {
-<a name="l00187"></a>00187                                 <span class="keywordflow">break</span>;
-<a name="l00188"></a>00188                         }
-<a name="l00189"></a>00189                 }
-<a name="l00190"></a>00190         }
-<a name="l00191"></a>00191 <span class="comment">/* Split the list */</span>
-<a name="l00192"></a>00192         <span class="keywordflow">if</span> (ulListLen == 0) {
-<a name="l00193"></a>00193                 <span class="comment">/* Current blocklist is empty */</span>
-<a name="l00194"></a>00194                 *ppAnchorNext = *ppAnchorCurr;
-<a name="l00195"></a>00195                 *ppAnchorCurr = NULL;
-<a name="l00196"></a>00196         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pCurr == NULL) {
-<a name="l00197"></a>00197                 <span class="comment">/* No blocks for the next list */</span>
-<a name="l00198"></a>00198                 *ppAnchorNext = NULL;
-<a name="l00199"></a>00199         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (lCharsToGo == 0) {
-<a name="l00200"></a>00200                 <span class="comment">/* Move the integral number of blocks to the next list */</span>
-<a name="l00201"></a>00201                 *ppAnchorNext = pCurr-&gt;pNext;
-<a name="l00202"></a>00202                 pCurr-&gt;pNext = NULL;
-<a name="l00203"></a>00203         } <span class="keywordflow">else</span> {
-<a name="l00204"></a>00204                 <span class="comment">/* Split the part current block list, part next block list */</span>
-<a name="l00205"></a>00205                 DBG_DEC(lBytesTooFar);
-<a name="l00206"></a>00206                 fail(lBytesTooFar &lt;= 0);
-<a name="l00207"></a>00207                 *ppAnchorNext = xmalloc(<span class="keyword">sizeof</span>(list_mem_type));
-<a name="l00208"></a>00208                 DBG_HEX(pCurr-&gt;tInfo.ulFileOffset);
-<a name="l00209"></a>00209                 (*ppAnchorNext)-&gt;tInfo.ulFileOffset =
-<a name="l00210"></a>00210                                 pCurr-&gt;tInfo.ulFileOffset +
-<a name="l00211"></a>00211                                 pCurr-&gt;tInfo.ulLength -
-<a name="l00212"></a>00212                                 lBytesTooFar;
-<a name="l00213"></a>00213                 DBG_HEX((*ppAnchorNext)-&gt;tInfo.ulFileOffset);
-<a name="l00214"></a>00214                 DBG_HEX(pCurr-&gt;tInfo.ulCharPos);
-<a name="l00215"></a>00215                 (*ppAnchorNext)-&gt;tInfo.ulCharPos =
-<a name="l00216"></a>00216                                 pCurr-&gt;tInfo.ulCharPos +
-<a name="l00217"></a>00217                                 pCurr-&gt;tInfo.ulLength -
-<a name="l00218"></a>00218                                 lBytesTooFar;
-<a name="l00219"></a>00219                 DBG_HEX((*ppAnchorNext)-&gt;tInfo.ulCharPos);
-<a name="l00220"></a>00220                 (*ppAnchorNext)-&gt;tInfo.ulLength = (ULONG)lBytesTooFar;
-<a name="l00221"></a>00221                 pCurr-&gt;tInfo.ulLength -= (ULONG)lBytesTooFar;
-<a name="l00222"></a>00222                 (*ppAnchorNext)-&gt;tInfo.bUsesUnicode = pCurr-&gt;tInfo.bUsesUnicode;
-<a name="l00223"></a>00223                 (*ppAnchorNext)-&gt;tInfo.usPropMod = pCurr-&gt;tInfo.usPropMod;
-<a name="l00224"></a>00224                 <span class="comment">/* Move the integral number of blocks to the next list */</span>
-<a name="l00225"></a>00225                 (*ppAnchorNext)-&gt;pNext = pCurr-&gt;pNext;
-<a name="l00226"></a>00226                 pCurr-&gt;pNext = NULL;
-<a name="l00227"></a>00227         }
-<a name="l00228"></a>00228 } <span class="comment">/* end of vSpitList */</span>
-<a name="l00229"></a>00229 
-<a name="l00230"></a>00230 <span class="preprocessor">#if defined(DEBUG) || defined(__riscos)</span>
-<a name="l00231"></a>00231 <span class="preprocessor"></span><span class="comment">/*</span>
-<a name="l00232"></a>00232 <span class="comment"> * ulComputeListLength - compute the length of a list</span>
-<a name="l00233"></a>00233 <span class="comment"> *</span>
-<a name="l00234"></a>00234 <span class="comment"> * returns the list length in characters</span>
-<a name="l00235"></a>00235 <span class="comment"> */</span>
-<a name="l00236"></a>00236 <span class="keyword">static</span> ULONG
-<a name="l00237"></a>00237 ulComputeListLength(<span class="keyword">const</span> list_mem_type *pAnchor)
-<a name="l00238"></a>00238 {
-<a name="l00239"></a>00239         <span class="keyword">const</span> list_mem_type     *pCurr;
-<a name="l00240"></a>00240         ULONG           ulTotal;
-<a name="l00241"></a>00241 
-<a name="l00242"></a>00242         ulTotal = 0;
-<a name="l00243"></a>00243         <span class="keywordflow">for</span> (pCurr = pAnchor; pCurr != NULL; pCurr = pCurr-&gt;pNext) {
-<a name="l00244"></a>00244                 fail(pCurr-&gt;tInfo.ulLength == 0);
-<a name="l00245"></a>00245                 <span class="keywordflow">if</span> (pCurr-&gt;tInfo.bUsesUnicode) {
-<a name="l00246"></a>00246                         fail(odd(pCurr-&gt;tInfo.ulLength));
-<a name="l00247"></a>00247                         ulTotal += pCurr-&gt;tInfo.ulLength / 2;
-<a name="l00248"></a>00248                 } <span class="keywordflow">else</span> {
-<a name="l00249"></a>00249                         ulTotal += pCurr-&gt;tInfo.ulLength;
-<a name="l00250"></a>00250                 }
-<a name="l00251"></a>00251         }
-<a name="l00252"></a>00252         <span class="keywordflow">return</span> ulTotal;
-<a name="l00253"></a>00253 } <span class="comment">/* end of ulComputeListLength */</span>
-<a name="l00254"></a>00254 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG || __riscos */</span>
-<a name="l00255"></a>00255 
-<a name="l00256"></a>00256 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00257"></a>00257 <span class="preprocessor"></span><span class="comment">/*</span>
-<a name="l00258"></a>00258 <span class="comment"> * vCheckList - check the number of bytes in a block list</span>
-<a name="l00259"></a>00259 <span class="comment"> */</span>
-<a name="l00260"></a>00260 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00261"></a>00261 vCheckList(<span class="keyword">const</span> list_mem_type *pAnchor, ULONG ulListLen, <span class="keywordtype">char</span> *szMsg)
-<a name="l00262"></a>00262 {
-<a name="l00263"></a>00263         ULONG           ulTotal;
-<a name="l00264"></a>00264 
-<a name="l00265"></a>00265         ulTotal = ulComputeListLength(pAnchor);
-<a name="l00266"></a>00266         DBG_DEC(ulTotal);
-<a name="l00267"></a>00267         <span class="keywordflow">if</span> (ulTotal != ulListLen) {
-<a name="l00268"></a>00268                 DBG_DEC(ulListLen);
-<a name="l00269"></a>00269                 werr(1, szMsg);
-<a name="l00270"></a>00270         }
-<a name="l00271"></a>00271 } <span class="comment">/* end of vCheckList */</span>
-<a name="l00272"></a>00272 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00273"></a>00273 
-<a name="l00274"></a>00274 <span class="comment">/*</span>
-<a name="l00275"></a>00275 <span class="comment"> * bIsEmptyBox - check to see if the given text box is empty</span>
-<a name="l00276"></a>00276 <span class="comment"> */</span>
-<a name="l00277"></a>00277 <span class="keyword">static</span> BOOL
-<a name="l00278"></a>00278 bIsEmptyBox(FILE *pFile, <span class="keyword">const</span> list_mem_type *pAnchor)
-<a name="l00279"></a>00279 {
-<a name="l00280"></a>00280         <span class="keyword">const</span> list_mem_type     *pCurr;
-<a name="l00281"></a>00281         <span class="keywordtype">size_t</span>  tIndex, tSize;
-<a name="l00282"></a>00282         UCHAR   *aucBuffer;
-<a name="l00283"></a>00283         <span class="keywordtype">char</span>    cChar;
-<a name="l00284"></a>00284 
-<a name="l00285"></a>00285         fail(pFile == NULL);
-<a name="l00286"></a>00286 
-<a name="l00287"></a>00287         <span class="keywordflow">if</span> (pAnchor == NULL) {
-<a name="l00288"></a>00288                 <span class="keywordflow">return</span> TRUE;
-<a name="l00289"></a>00289         }
-<a name="l00290"></a>00290 
-<a name="l00291"></a>00291         aucBuffer = NULL;
-<a name="l00292"></a>00292         <span class="keywordflow">for</span> (pCurr = pAnchor; pCurr != NULL; pCurr = pCurr-&gt;pNext) {
-<a name="l00293"></a>00293                 fail(pCurr-&gt;tInfo.ulLength == 0);
-<a name="l00294"></a>00294                 tSize = (size_t)pCurr-&gt;tInfo.ulLength;
-<a name="l00295"></a>00295 #<span class="keywordflow">if</span> defined(__dos) &amp;&amp; !defined(__DJGPP__)
-<a name="l00296"></a>00296                 if (pCurr-&gt;tInfo.ulLength &gt; 0xffffUL) {
-<a name="l00297"></a>00297                         tSize = 0xffff;
-<a name="l00298"></a>00298                 }
-<a name="l00299"></a>00299 <span class="preprocessor">#endif </span><span class="comment">/* __dos &amp;&amp; !__DJGPP__ */</span>
-<a name="l00300"></a>00300                 fail(aucBuffer != NULL);
-<a name="l00301"></a>00301                 aucBuffer = xmalloc(tSize);
-<a name="l00302"></a>00302                 <span class="keywordflow">if</span> (!bReadBytes(aucBuffer, tSize,
-<a name="l00303"></a>00303                                 pCurr-&gt;tInfo.ulFileOffset, pFile)) {
-<a name="l00304"></a>00304                         aucBuffer = xfree(aucBuffer);
-<a name="l00305"></a>00305                         <span class="keywordflow">return</span> FALSE;
-<a name="l00306"></a>00306                 }
-<a name="l00307"></a>00307                 <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tSize; tIndex++) {
-<a name="l00308"></a>00308                         cChar = (char)aucBuffer[tIndex];
-<a name="l00309"></a>00309                         <span class="keywordflow">switch</span> (cChar) {
-<a name="l00310"></a>00310                         <span class="keywordflow">case</span> <span class="charliteral">&#39;\0&#39;</span>: <span class="keywordflow">case</span> <span class="charliteral">&#39;\r&#39;</span>: <span class="keywordflow">case</span> <span class="charliteral">&#39;\n&#39;</span>:
-<a name="l00311"></a>00311                         <span class="keywordflow">case</span> <span class="charliteral">&#39;\f&#39;</span>: <span class="keywordflow">case</span> <span class="charliteral">&#39;\t&#39;</span>: <span class="keywordflow">case</span> <span class="charliteral">&#39;\v&#39;</span>:
-<a name="l00312"></a>00312                         <span class="keywordflow">case</span> <span class="charliteral">&#39; &#39;</span>:
-<a name="l00313"></a>00313                                 <span class="keywordflow">break</span>;
-<a name="l00314"></a>00314                         <span class="keywordflow">default</span>:
-<a name="l00315"></a>00315                                 aucBuffer = xfree(aucBuffer);
-<a name="l00316"></a>00316                                 <span class="keywordflow">return</span> FALSE;
-<a name="l00317"></a>00317                         }
-<a name="l00318"></a>00318                 }
-<a name="l00319"></a>00319                 aucBuffer = xfree(aucBuffer);
-<a name="l00320"></a>00320         }
-<a name="l00321"></a>00321         fail(aucBuffer != NULL);
-<a name="l00322"></a>00322         <span class="keywordflow">return</span> TRUE;
-<a name="l00323"></a>00323 } <span class="comment">/* end of bIsEmptyBox */</span>
-<a name="l00324"></a>00324 
-<a name="l00325"></a>00325 <span class="comment">/*</span>
-<a name="l00326"></a>00326 <span class="comment"> * vSplitBlockList - split the block list in the various parts</span>
-<a name="l00327"></a>00327 <span class="comment"> *</span>
-<a name="l00328"></a>00328 <span class="comment"> * Split the blocklist in a Text block list, a Footnote block list, a</span>
-<a name="l00329"></a>00329 <span class="comment"> * HeaderFooter block list, a Macro block list, an Annotation block list,</span>
-<a name="l00330"></a>00330 <span class="comment"> * an Endnote block list, a TextBox list and a HeaderTextBox list.</span>
-<a name="l00331"></a>00331 <span class="comment"> *</span>
-<a name="l00332"></a>00332 <span class="comment"> * NOTE:</span>
-<a name="l00333"></a>00333 <span class="comment"> * The various ul*Len input parameters are given in characters, but the</span>
-<a name="l00334"></a>00334 <span class="comment"> * length of the blocks are in bytes.</span>
-<a name="l00335"></a>00335 <span class="comment"> */</span>
-<a name="l00336"></a>00336 <span class="keywordtype">void</span>
-<a name="l00337"></a>00337 vSplitBlockList(FILE *pFile, ULONG ulTextLen, ULONG ulFootnoteLen,
-<a name="l00338"></a>00338         ULONG ulHdrFtrLen, ULONG ulMacroLen, ULONG ulAnnotationLen,
-<a name="l00339"></a>00339         ULONG ulEndnoteLen, ULONG ulTextBoxLen, ULONG ulHdrTextBoxLen,
-<a name="l00340"></a>00340         BOOL bMustExtend)
-<a name="l00341"></a>00341 {
-<a name="l00342"></a>00342         list_mem_type   *apAnchors[8];
-<a name="l00343"></a>00343         list_mem_type   *pGarbageAnchor, *pCurr;
-<a name="l00344"></a>00344         <span class="keywordtype">size_t</span>          tIndex;
-<a name="l00345"></a>00345 
-<a name="l00346"></a>00346         DBG_MSG(<span class="stringliteral">&quot;vSplitBlockList&quot;</span>);
-<a name="l00347"></a>00347 
-<a name="l00348"></a>00348         pGarbageAnchor = NULL;
-<a name="l00349"></a>00349 
-<a name="l00350"></a>00350         DBG_MSG_C(ulTextLen != 0, <span class="stringliteral">&quot;Text block list&quot;</span>);
-<a name="l00351"></a>00351         vSpitList(&amp;pTextAnchor, &amp;pFootnoteAnchor, ulTextLen);
-<a name="l00352"></a>00352         DBG_MSG_C(ulFootnoteLen != 0, <span class="stringliteral">&quot;Footnote block list&quot;</span>);
-<a name="l00353"></a>00353         vSpitList(&amp;pFootnoteAnchor, &amp;pHdrFtrAnchor, ulFootnoteLen);
-<a name="l00354"></a>00354         DBG_MSG_C(ulHdrFtrLen != 0, <span class="stringliteral">&quot;Header/Footer block list&quot;</span>);
-<a name="l00355"></a>00355         vSpitList(&amp;pHdrFtrAnchor, &amp;pMacroAnchor, ulHdrFtrLen);
-<a name="l00356"></a>00356         DBG_MSG_C(ulMacroLen != 0, <span class="stringliteral">&quot;Macro block list&quot;</span>);
-<a name="l00357"></a>00357         vSpitList(&amp;pMacroAnchor, &amp;pAnnotationAnchor, ulMacroLen);
-<a name="l00358"></a>00358         DBG_MSG_C(ulAnnotationLen != 0, <span class="stringliteral">&quot;Annotation block list&quot;</span>);
-<a name="l00359"></a>00359         vSpitList(&amp;pAnnotationAnchor, &amp;pEndnoteAnchor, ulAnnotationLen);
-<a name="l00360"></a>00360         DBG_MSG_C(ulEndnoteLen != 0, <span class="stringliteral">&quot;Endnote block list&quot;</span>);
-<a name="l00361"></a>00361         vSpitList(&amp;pEndnoteAnchor, &amp;pTextBoxAnchor, ulEndnoteLen);
-<a name="l00362"></a>00362         DBG_MSG_C(ulTextBoxLen != 0, <span class="stringliteral">&quot;Textbox block list&quot;</span>);
-<a name="l00363"></a>00363         vSpitList(&amp;pTextBoxAnchor, &amp;pHdrTextBoxAnchor, ulTextBoxLen);
-<a name="l00364"></a>00364         DBG_MSG_C(ulHdrTextBoxLen != 0, <span class="stringliteral">&quot;HeaderTextbox block list&quot;</span>);
-<a name="l00365"></a>00365         vSpitList(&amp;pHdrTextBoxAnchor, &amp;pGarbageAnchor, ulHdrTextBoxLen);
-<a name="l00366"></a>00366 
-<a name="l00367"></a>00367         <span class="comment">/* Free the garbage block list, this should not be needed */</span>
-<a name="l00368"></a>00368         DBG_DEC_C(pGarbageAnchor != NULL, pGarbageAnchor-&gt;tInfo.ulLength);
-<a name="l00369"></a>00369         pGarbageAnchor = pFreeOneList(pGarbageAnchor);
-<a name="l00370"></a>00370 
-<a name="l00371"></a>00371 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00372"></a>00372 <span class="preprocessor"></span>        vCheckList(pTextAnchor, ulTextLen, <span class="stringliteral">&quot;Software error (Text)&quot;</span>);
-<a name="l00373"></a>00373         vCheckList(pFootnoteAnchor, ulFootnoteLen, <span class="stringliteral">&quot;Software error (Footnote)&quot;</span>);
-<a name="l00374"></a>00374         vCheckList(pHdrFtrAnchor, ulHdrFtrLen, <span class="stringliteral">&quot;Software error (Hdr/Ftr)&quot;</span>);
-<a name="l00375"></a>00375         vCheckList(pMacroAnchor, ulMacroLen, <span class="stringliteral">&quot;Software error (Macro)&quot;</span>);
-<a name="l00376"></a>00376         vCheckList(pAnnotationAnchor, ulAnnotationLen,
-<a name="l00377"></a>00377                                                 <span class="stringliteral">&quot;Software error (Annotation)&quot;</span>);
-<a name="l00378"></a>00378         vCheckList(pEndnoteAnchor, ulEndnoteLen, <span class="stringliteral">&quot;Software error (Endnote)&quot;</span>);
-<a name="l00379"></a>00379         vCheckList(pTextBoxAnchor, ulTextBoxLen, <span class="stringliteral">&quot;Software error (TextBox)&quot;</span>);
-<a name="l00380"></a>00380         vCheckList(pHdrTextBoxAnchor, ulHdrTextBoxLen,
-<a name="l00381"></a>00381                                                 <span class="stringliteral">&quot;Software error (HdrTextBox)&quot;</span>);
-<a name="l00382"></a>00382 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00383"></a>00383 
-<a name="l00384"></a>00384         <span class="comment">/* Remove the list if the text box is empty */</span>
-<a name="l00385"></a>00385         <span class="keywordflow">if</span> (bIsEmptyBox(pFile, pTextBoxAnchor)) {
-<a name="l00386"></a>00386                 pTextBoxAnchor = pFreeOneList(pTextBoxAnchor);
-<a name="l00387"></a>00387         }
-<a name="l00388"></a>00388         <span class="keywordflow">if</span> (bIsEmptyBox(pFile, pHdrTextBoxAnchor)) {
-<a name="l00389"></a>00389                 pHdrTextBoxAnchor = pFreeOneList(pHdrTextBoxAnchor);
-<a name="l00390"></a>00390         }
-<a name="l00391"></a>00391 
-<a name="l00392"></a>00392         <span class="keywordflow">if</span> (!bMustExtend) {
-<a name="l00393"></a>00393                 <span class="keywordflow">return</span>;
-<a name="l00394"></a>00394         }
-<a name="l00395"></a>00395         <span class="comment">/*</span>
-<a name="l00396"></a>00396 <span class="comment">         * All blocks (except the last one) must have a length that</span>
-<a name="l00397"></a>00397 <span class="comment">         * is a multiple of the Big Block Size</span>
-<a name="l00398"></a>00398 <span class="comment">         */</span>
-<a name="l00399"></a>00399 
-<a name="l00400"></a>00400         apAnchors[0] = pTextAnchor;
-<a name="l00401"></a>00401         apAnchors[1] = pFootnoteAnchor;
-<a name="l00402"></a>00402         apAnchors[2] = pHdrFtrAnchor;
-<a name="l00403"></a>00403         apAnchors[3] = pMacroAnchor;
-<a name="l00404"></a>00404         apAnchors[4] = pAnnotationAnchor;
-<a name="l00405"></a>00405         apAnchors[5] = pEndnoteAnchor;
-<a name="l00406"></a>00406         apAnchors[6] = pTextBoxAnchor;
-<a name="l00407"></a>00407         apAnchors[7] = pHdrTextBoxAnchor;
-<a name="l00408"></a>00408 
-<a name="l00409"></a>00409         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; elementsof(apAnchors); tIndex++) {
-<a name="l00410"></a>00410                 <span class="keywordflow">for</span> (pCurr = apAnchors[tIndex];
-<a name="l00411"></a>00411                      pCurr != NULL;
-<a name="l00412"></a>00412                      pCurr = pCurr-&gt;pNext) {
-<a name="l00413"></a>00413                         <span class="keywordflow">if</span> (pCurr-&gt;pNext != NULL &amp;&amp;
-<a name="l00414"></a>00414                             pCurr-&gt;tInfo.ulLength % BIG_BLOCK_SIZE != 0) {
-<a name="l00415"></a>00415                                 DBG_DEC(tIndex);
-<a name="l00416"></a>00416                                 DBG_HEX(pCurr-&gt;tInfo.ulFileOffset);
-<a name="l00417"></a>00417                                 DBG_HEX(pCurr-&gt;tInfo.ulCharPos);
-<a name="l00418"></a>00418                                 DBG_DEC(pCurr-&gt;tInfo.ulLength);
-<a name="l00419"></a>00419                                 pCurr-&gt;tInfo.ulLength /= BIG_BLOCK_SIZE;
-<a name="l00420"></a>00420                                 pCurr-&gt;tInfo.ulLength++;
-<a name="l00421"></a>00421                                 pCurr-&gt;tInfo.ulLength *= BIG_BLOCK_SIZE;
-<a name="l00422"></a>00422                                 DBG_DEC(pCurr-&gt;tInfo.ulLength);
-<a name="l00423"></a>00423                         }
-<a name="l00424"></a>00424                 }
-<a name="l00425"></a>00425         }
-<a name="l00426"></a>00426 } <span class="comment">/* end of vSplitBlockList */</span>
-<a name="l00427"></a>00427 
-<a name="l00428"></a>00428 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00429"></a>00429 <span class="preprocessor"></span><span class="comment">/*</span>
-<a name="l00430"></a>00430 <span class="comment"> * ulGetDocumentLength - get the total character length of the printable lists</span>
-<a name="l00431"></a>00431 <span class="comment"> *</span>
-<a name="l00432"></a>00432 <span class="comment"> * returns: The total number of characters</span>
-<a name="l00433"></a>00433 <span class="comment"> */</span>
-<a name="l00434"></a>00434 ULONG
-<a name="l00435"></a>00435 ulGetDocumentLength(<span class="keywordtype">void</span>)
-<a name="l00436"></a>00436 {
-<a name="l00437"></a>00437         <span class="keywordtype">long</span>            ulTotal;
-<a name="l00438"></a>00438 
-<a name="l00439"></a>00439         DBG_MSG(<span class="stringliteral">&quot;ulGetDocumentLength&quot;</span>);
-<a name="l00440"></a>00440 
-<a name="l00441"></a>00441         ulTotal = ulComputeListLength(pTextAnchor);
-<a name="l00442"></a>00442         ulTotal += ulComputeListLength(pFootnoteAnchor);
-<a name="l00443"></a>00443         ulTotal += ulComputeListLength(pEndnoteAnchor);
-<a name="l00444"></a>00444         ulTotal += ulComputeListLength(pTextBoxAnchor);
-<a name="l00445"></a>00445         ulTotal += ulComputeListLength(pHdrTextBoxAnchor);
-<a name="l00446"></a>00446         DBG_DEC(ulTotal);
-<a name="l00447"></a>00447         <span class="keywordflow">return</span> ulTotal;
-<a name="l00448"></a>00448 } <span class="comment">/* end of ulGetDocumentLength */</span>
-<a name="l00449"></a>00449 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00450"></a>00450 
-<a name="l00451"></a>00451 <span class="preprocessor">#if 0</span>
-<a name="l00452"></a>00452 <span class="preprocessor"></span><span class="comment">/*</span>
-<a name="l00453"></a>00453 <span class="comment"> * bExistsHdrFtr - are there headers and/or footers?</span>
-<a name="l00454"></a>00454 <span class="comment"> */</span>
-<a name="l00455"></a>00455 BOOL
-<a name="l00456"></a>00456 bExistsHdrFtr(<span class="keywordtype">void</span>)
-<a name="l00457"></a>00457 {
-<a name="l00458"></a>00458         <span class="keywordflow">return</span> pHdrFtrAnchor != NULL &amp;&amp;
-<a name="l00459"></a>00459                 pHdrFtrAnchor-&gt;tInfo.ulLength != 0;
-<a name="l00460"></a>00460 } <span class="comment">/* end of bExistsHdrFtr */</span>
-<a name="l00461"></a>00461 <span class="preprocessor">#endif</span>
-<a name="l00462"></a>00462 <span class="preprocessor"></span>
-<a name="l00463"></a>00463 <span class="comment">/*</span>
-<a name="l00464"></a>00464 <span class="comment"> * bExistsTextBox - is there a text box?</span>
-<a name="l00465"></a>00465 <span class="comment"> */</span>
-<a name="l00466"></a>00466 BOOL
-<a name="l00467"></a>00467 bExistsTextBox(<span class="keywordtype">void</span>)
-<a name="l00468"></a>00468 {
-<a name="l00469"></a>00469         <span class="keywordflow">return</span> pTextBoxAnchor != NULL &amp;&amp;
-<a name="l00470"></a>00470                 pTextBoxAnchor-&gt;tInfo.ulLength != 0;
-<a name="l00471"></a>00471 } <span class="comment">/* end of bExistsTextBox */</span>
-<a name="l00472"></a>00472 
-<a name="l00473"></a>00473 <span class="comment">/*</span>
-<a name="l00474"></a>00474 <span class="comment"> * bExistsHdrTextBox - is there a header text box?</span>
-<a name="l00475"></a>00475 <span class="comment"> */</span>
-<a name="l00476"></a>00476 BOOL
-<a name="l00477"></a>00477 bExistsHdrTextBox(<span class="keywordtype">void</span>)
-<a name="l00478"></a>00478 {
-<a name="l00479"></a>00479         <span class="keywordflow">return</span> pHdrTextBoxAnchor != NULL &amp;&amp;
-<a name="l00480"></a>00480                 pHdrTextBoxAnchor-&gt;tInfo.ulLength != 0;
-<a name="l00481"></a>00481 } <span class="comment">/* end of bExistsHdrTextBox */</span>
-<a name="l00482"></a>00482 
-<a name="l00483"></a>00483 <span class="comment">/*</span>
-<a name="l00484"></a>00484 <span class="comment"> * usGetNextByte - get the next byte from the specified block list</span>
-<a name="l00485"></a>00485 <span class="comment"> */</span>
-<a name="l00486"></a>00486 <span class="keyword">static</span> USHORT
-<a name="l00487"></a>00487 usGetNextByte(FILE *pFile, readinfo_type *pInfoCurrent, list_mem_type *pAnchor,
-<a name="l00488"></a>00488         ULONG *pulFileOffset, ULONG *pulCharPos, USHORT *pusPropMod)
-<a name="l00489"></a>00489 {
-<a name="l00490"></a>00490         ULONG   ulReadOff;
-<a name="l00491"></a>00491         <span class="keywordtype">size_t</span>  tReadLen;
-<a name="l00492"></a>00492 
-<a name="l00493"></a>00493         fail(pInfoCurrent == NULL);
-<a name="l00494"></a>00494 
-<a name="l00495"></a>00495         <span class="keywordflow">if</span> (pInfoCurrent-&gt;pBlockCurrent == NULL ||
-<a name="l00496"></a>00496             pInfoCurrent-&gt;tByteNext &gt;= <span class="keyword">sizeof</span>(pInfoCurrent-&gt;aucBlock) ||
-<a name="l00497"></a>00497             pInfoCurrent-&gt;ulBlockOffset + pInfoCurrent-&gt;tByteNext &gt;=
-<a name="l00498"></a>00498                                 pInfoCurrent-&gt;pBlockCurrent-&gt;tInfo.ulLength) {
-<a name="l00499"></a>00499                 <span class="keywordflow">if</span> (pInfoCurrent-&gt;pBlockCurrent == NULL) {
-<a name="l00500"></a>00500                         <span class="comment">/* First block, first part */</span>
-<a name="l00501"></a>00501                         pInfoCurrent-&gt;pBlockCurrent = pAnchor;
-<a name="l00502"></a>00502                         pInfoCurrent-&gt;ulBlockOffset = 0;
-<a name="l00503"></a>00503                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pInfoCurrent-&gt;ulBlockOffset +
-<a name="l00504"></a>00504                                 <span class="keyword">sizeof</span>(pInfoCurrent-&gt;aucBlock) &lt;
-<a name="l00505"></a>00505                                 pInfoCurrent-&gt;pBlockCurrent-&gt;tInfo.ulLength) {
-<a name="l00506"></a>00506                         <span class="comment">/* Same block, next part */</span>
-<a name="l00507"></a>00507                         pInfoCurrent-&gt;ulBlockOffset +=
-<a name="l00508"></a>00508                                         <span class="keyword">sizeof</span>(pInfoCurrent-&gt;aucBlock);
-<a name="l00509"></a>00509                 } <span class="keywordflow">else</span> {
-<a name="l00510"></a>00510                         <span class="comment">/* Next block, first part */</span>
-<a name="l00511"></a>00511                         pInfoCurrent-&gt;pBlockCurrent =
-<a name="l00512"></a>00512                                         pInfoCurrent-&gt;pBlockCurrent-&gt;pNext;
-<a name="l00513"></a>00513                         pInfoCurrent-&gt;ulBlockOffset = 0;
-<a name="l00514"></a>00514                 }
-<a name="l00515"></a>00515                 <span class="keywordflow">if</span> (pInfoCurrent-&gt;pBlockCurrent == NULL) {
-<a name="l00516"></a>00516                         <span class="comment">/* Past the last part of the last block */</span>
-<a name="l00517"></a>00517                         <span class="keywordflow">return</span> (USHORT)EOF;
-<a name="l00518"></a>00518                 }
-<a name="l00519"></a>00519                 tReadLen = (size_t)
-<a name="l00520"></a>00520                         (pInfoCurrent-&gt;pBlockCurrent-&gt;tInfo.ulLength -
-<a name="l00521"></a>00521                          pInfoCurrent-&gt;ulBlockOffset);
-<a name="l00522"></a>00522                 <span class="keywordflow">if</span> (tReadLen &gt; <span class="keyword">sizeof</span>(pInfoCurrent-&gt;aucBlock)) {
-<a name="l00523"></a>00523                         tReadLen = <span class="keyword">sizeof</span>(pInfoCurrent-&gt;aucBlock);
-<a name="l00524"></a>00524                 }
-<a name="l00525"></a>00525                 ulReadOff = pInfoCurrent-&gt;pBlockCurrent-&gt;tInfo.ulFileOffset +
-<a name="l00526"></a>00526                                 pInfoCurrent-&gt;ulBlockOffset;
-<a name="l00527"></a>00527                 <span class="keywordflow">if</span> (!bReadBytes(pInfoCurrent-&gt;aucBlock,
-<a name="l00528"></a>00528                                                 tReadLen, ulReadOff, pFile)) {
-<a name="l00529"></a>00529                         <span class="comment">/* Don&#39;t read from this list any longer */</span>
-<a name="l00530"></a>00530                         pInfoCurrent-&gt;pBlockCurrent = NULL;
-<a name="l00531"></a>00531                         <span class="keywordflow">return</span> (USHORT)EOF;
-<a name="l00532"></a>00532                 }
-<a name="l00533"></a>00533                 pInfoCurrent-&gt;tByteNext = 0;
-<a name="l00534"></a>00534         }
-<a name="l00535"></a>00535         <span class="keywordflow">if</span> (pulFileOffset != NULL) {
-<a name="l00536"></a>00536                 *pulFileOffset =
-<a name="l00537"></a>00537                         pInfoCurrent-&gt;pBlockCurrent-&gt;tInfo.ulFileOffset +
-<a name="l00538"></a>00538                         pInfoCurrent-&gt;ulBlockOffset +
-<a name="l00539"></a>00539                         pInfoCurrent-&gt;tByteNext;
-<a name="l00540"></a>00540         }
-<a name="l00541"></a>00541         <span class="keywordflow">if</span> (pulCharPos != NULL) {
-<a name="l00542"></a>00542                 *pulCharPos =
-<a name="l00543"></a>00543                         pInfoCurrent-&gt;pBlockCurrent-&gt;tInfo.ulCharPos +
-<a name="l00544"></a>00544                         pInfoCurrent-&gt;ulBlockOffset +
-<a name="l00545"></a>00545                         pInfoCurrent-&gt;tByteNext;
-<a name="l00546"></a>00546         }
-<a name="l00547"></a>00547         <span class="keywordflow">if</span> (pusPropMod != NULL) {
-<a name="l00548"></a>00548                 *pusPropMod = pInfoCurrent-&gt;pBlockCurrent-&gt;tInfo.usPropMod;
-<a name="l00549"></a>00549         }
-<a name="l00550"></a>00550         <span class="keywordflow">return</span> (USHORT)pInfoCurrent-&gt;aucBlock[pInfoCurrent-&gt;tByteNext++];
-<a name="l00551"></a>00551 } <span class="comment">/* end of usGetNextByte */</span>
-<a name="l00552"></a>00552 
-<a name="l00553"></a>00553 
-<a name="l00554"></a>00554 <span class="comment">/*</span>
-<a name="l00555"></a>00555 <span class="comment"> * usGetNextChar - get the next character from the specified block list</span>
-<a name="l00556"></a>00556 <span class="comment"> */</span>
-<a name="l00557"></a>00557 <span class="keyword">static</span> USHORT
-<a name="l00558"></a>00558 usGetNextChar(FILE *pFile, list_id_enum eListID,
-<a name="l00559"></a>00559         ULONG *pulFileOffset, ULONG *pulCharPos, USHORT *pusPropMod)
-<a name="l00560"></a>00560 {
-<a name="l00561"></a>00561         readinfo_type   *pReadinfo;
-<a name="l00562"></a>00562         list_mem_type   *pAnchor;
-<a name="l00563"></a>00563         USHORT  usLSB, usMSB;
-<a name="l00564"></a>00564 
-<a name="l00565"></a>00565         <span class="keywordflow">switch</span> (eListID) {
-<a name="l00566"></a>00566         <span class="keywordflow">case</span> text_list:
-<a name="l00567"></a>00567                 pReadinfo = &amp;tOthers;
-<a name="l00568"></a>00568                 pAnchor = pTextAnchor;
-<a name="l00569"></a>00569                 <span class="keywordflow">break</span>;
-<a name="l00570"></a>00570         <span class="keywordflow">case</span> footnote_list:
-<a name="l00571"></a>00571                 pReadinfo = &amp;tFootnote;
-<a name="l00572"></a>00572                 pAnchor = pFootnoteAnchor;
-<a name="l00573"></a>00573                 <span class="keywordflow">break</span>;
-<a name="l00574"></a>00574         <span class="keywordflow">case</span> hdrftr_list:
-<a name="l00575"></a>00575                 pReadinfo = &amp;tHdrFtr;
-<a name="l00576"></a>00576                 pAnchor = pHdrFtrAnchor;
-<a name="l00577"></a>00577                 <span class="keywordflow">break</span>;
-<a name="l00578"></a>00578         <span class="keywordflow">case</span> endnote_list:
-<a name="l00579"></a>00579                 pReadinfo = &amp;tOthers;
-<a name="l00580"></a>00580                 pAnchor = pEndnoteAnchor;
-<a name="l00581"></a>00581                 <span class="keywordflow">break</span>;
-<a name="l00582"></a>00582         <span class="keywordflow">case</span> textbox_list:
-<a name="l00583"></a>00583                 pReadinfo = &amp;tOthers;
-<a name="l00584"></a>00584                 pAnchor = pTextBoxAnchor;
-<a name="l00585"></a>00585                 <span class="keywordflow">break</span>;
-<a name="l00586"></a>00586         <span class="keywordflow">case</span> hdrtextbox_list:
-<a name="l00587"></a>00587                 pReadinfo = &amp;tOthers;
-<a name="l00588"></a>00588                 pAnchor = pHdrTextBoxAnchor;
-<a name="l00589"></a>00589                 <span class="keywordflow">break</span>;
-<a name="l00590"></a>00590         <span class="keywordflow">default</span>:
-<a name="l00591"></a>00591                 DBG_DEC(eListID);
-<a name="l00592"></a>00592                 <span class="keywordflow">return</span> (USHORT)EOF;
-<a name="l00593"></a>00593         }
-<a name="l00594"></a>00594 
-<a name="l00595"></a>00595         usLSB = usGetNextByte(pFile, pReadinfo, pAnchor,
-<a name="l00596"></a>00596                                 pulFileOffset, pulCharPos, pusPropMod);
-<a name="l00597"></a>00597         <span class="keywordflow">if</span> (usLSB == (USHORT)EOF) {
-<a name="l00598"></a>00598                 <span class="keywordflow">return</span> (USHORT)EOF;
-<a name="l00599"></a>00599         }
-<a name="l00600"></a>00600         fail(pReadinfo-&gt;pBlockCurrent == NULL);
-<a name="l00601"></a>00601 
-<a name="l00602"></a>00602         <span class="keywordflow">if</span> (pReadinfo-&gt;pBlockCurrent-&gt;tInfo.bUsesUnicode) {
-<a name="l00603"></a>00603                 usMSB = usGetNextByte(pFile,
-<a name="l00604"></a>00604                                 pReadinfo, pAnchor, NULL, NULL, NULL);
-<a name="l00605"></a>00605         } <span class="keywordflow">else</span> {
-<a name="l00606"></a>00606                 usMSB = 0x00;
-<a name="l00607"></a>00607         }
-<a name="l00608"></a>00608         <span class="keywordflow">if</span> (usMSB == (USHORT)EOF) {
-<a name="l00609"></a>00609                 DBG_MSG(<span class="stringliteral">&quot;usGetNextChar: Unexpected EOF&quot;</span>);
-<a name="l00610"></a>00610                 DBG_HEX_C(pulFileOffset != NULL, *pulFileOffset);
-<a name="l00611"></a>00611                 DBG_HEX_C(pulCharPos != NULL, *pulCharPos);
-<a name="l00612"></a>00612                 <span class="keywordflow">return</span> (USHORT)EOF;
-<a name="l00613"></a>00613         }
-<a name="l00614"></a>00614         <span class="keywordflow">return</span> (usMSB &lt;&lt; 8) | usLSB;
-<a name="l00615"></a>00615 } <span class="comment">/* end of usGetNextChar */</span>
-<a name="l00616"></a>00616 
-<a name="l00617"></a>00617 <span class="comment">/*</span>
-<a name="l00618"></a>00618 <span class="comment"> * usNextChar - get the next character from the given block list</span>
-<a name="l00619"></a>00619 <span class="comment"> */</span>
-<a name="l00620"></a>00620 USHORT
-<a name="l00621"></a>00621 usNextChar(FILE *pFile, list_id_enum eListID,
-<a name="l00622"></a>00622         ULONG *pulFileOffset, ULONG *pulCharPos, USHORT *pusPropMod)
-<a name="l00623"></a>00623 {
-<a name="l00624"></a>00624         USHORT  usRetVal;
-<a name="l00625"></a>00625 
-<a name="l00626"></a>00626         fail(pFile == NULL);
-<a name="l00627"></a>00627 
-<a name="l00628"></a>00628         usRetVal = usGetNextChar(pFile, eListID,
-<a name="l00629"></a>00629                                 pulFileOffset, pulCharPos, pusPropMod);
-<a name="l00630"></a>00630         <span class="keywordflow">if</span> (usRetVal == (USHORT)EOF) {
-<a name="l00631"></a>00631                 <span class="keywordflow">if</span> (pulFileOffset != NULL) {
-<a name="l00632"></a>00632                         *pulFileOffset = FC_INVALID;
-<a name="l00633"></a>00633                 }
-<a name="l00634"></a>00634                 <span class="keywordflow">if</span> (pulCharPos != NULL) {
-<a name="l00635"></a>00635                         *pulCharPos = CP_INVALID;
-<a name="l00636"></a>00636                 }
-<a name="l00637"></a>00637                 <span class="keywordflow">if</span> (pusPropMod != NULL) {
-<a name="l00638"></a>00638                         *pusPropMod = IGNORE_PROPMOD;
-<a name="l00639"></a>00639                 }
-<a name="l00640"></a>00640         }
-<a name="l00641"></a>00641         <span class="keywordflow">return</span> usRetVal;
-<a name="l00642"></a>00642 } <span class="comment">/* end of usNextChar */</span>
-<a name="l00643"></a>00643 
-<a name="l00644"></a>00644 <span class="comment">/*</span>
-<a name="l00645"></a>00645 <span class="comment"> * usToHdrFtrPosition - Go to a character position in header/foorter list</span>
-<a name="l00646"></a>00646 <span class="comment"> *</span>
-<a name="l00647"></a>00647 <span class="comment"> * Returns the character found on the specified character position</span>
-<a name="l00648"></a>00648 <span class="comment"> */</span>
-<a name="l00649"></a>00649 USHORT
-<a name="l00650"></a>00650 usToHdrFtrPosition(FILE *pFile, ULONG ulCharPos)
-<a name="l00651"></a>00651 {
-<a name="l00652"></a>00652         ULONG   ulCharPosCurr;
-<a name="l00653"></a>00653         USHORT  usChar;
-<a name="l00654"></a>00654 
-<a name="l00655"></a>00655         tHdrFtr.pBlockCurrent = NULL;   <span class="comment">/* To reset the header/footer list */</span>
-<a name="l00656"></a>00656         <span class="keywordflow">do</span> {
-<a name="l00657"></a>00657                 usChar = usNextChar(pFile,
-<a name="l00658"></a>00658                                 hdrftr_list, NULL, &amp;ulCharPosCurr, NULL);
-<a name="l00659"></a>00659         } <span class="keywordflow">while</span> (usChar != (USHORT)EOF &amp;&amp; ulCharPosCurr != ulCharPos);
-<a name="l00660"></a>00660         <span class="keywordflow">return</span> usChar;
-<a name="l00661"></a>00661 } <span class="comment">/* end of usToHdrFtrPosition */</span>
-<a name="l00662"></a>00662 
-<a name="l00663"></a>00663 <span class="comment">/*</span>
-<a name="l00664"></a>00664 <span class="comment"> * usToFootnotePosition - Go to a character position in footnote list</span>
-<a name="l00665"></a>00665 <span class="comment"> *</span>
-<a name="l00666"></a>00666 <span class="comment"> * Returns the character found on the specified character position</span>
-<a name="l00667"></a>00667 <span class="comment"> */</span>
-<a name="l00668"></a>00668 USHORT
-<a name="l00669"></a>00669 usToFootnotePosition(FILE *pFile, ULONG ulCharPos)
-<a name="l00670"></a>00670 {
-<a name="l00671"></a>00671         ULONG   ulCharPosCurr;
-<a name="l00672"></a>00672         USHORT  usChar;
-<a name="l00673"></a>00673 
-<a name="l00674"></a>00674         tFootnote.pBlockCurrent = NULL; <span class="comment">/* To reset the footnote list */</span>
-<a name="l00675"></a>00675         <span class="keywordflow">do</span> {
-<a name="l00676"></a>00676                 usChar = usNextChar(pFile,
-<a name="l00677"></a>00677                                 footnote_list, NULL, &amp;ulCharPosCurr, NULL);
-<a name="l00678"></a>00678         } <span class="keywordflow">while</span> (usChar != (USHORT)EOF &amp;&amp; ulCharPosCurr != ulCharPos);
-<a name="l00679"></a>00679         <span class="keywordflow">return</span> usChar;
-<a name="l00680"></a>00680 } <span class="comment">/* end of usToFootnotePosition */</span>
-<a name="l00681"></a>00681 
-<a name="l00682"></a>00682 <span class="comment">/*</span>
-<a name="l00683"></a>00683 <span class="comment"> * Convert a character position to an offset in the file.</span>
-<a name="l00684"></a>00684 <span class="comment"> * Logical to physical offset.</span>
-<a name="l00685"></a>00685 <span class="comment"> *</span>
-<a name="l00686"></a>00686 <span class="comment"> * Returns:     FC_INVALID: in case of error</span>
-<a name="l00687"></a>00687 <span class="comment"> *              otherwise: the computed file offset</span>
-<a name="l00688"></a>00688 <span class="comment"> */</span>
-<a name="l00689"></a>00689 ULONG
-<a name="l00690"></a>00690 ulCharPos2FileOffsetX(ULONG ulCharPos, list_id_enum *peListID)
-<a name="l00691"></a>00691 {
-<a name="l00692"></a>00692         <span class="keyword">static</span> list_id_enum     eListIDs[8] = {
-<a name="l00693"></a>00693                 text_list,      footnote_list,          hdrftr_list,
-<a name="l00694"></a>00694                 macro_list,     annotation_list,        endnote_list,
-<a name="l00695"></a>00695                 textbox_list,   hdrtextbox_list,
-<a name="l00696"></a>00696         };
-<a name="l00697"></a>00697         list_mem_type   *apAnchors[8];
-<a name="l00698"></a>00698         list_mem_type   *pCurr;
-<a name="l00699"></a>00699         list_id_enum    eListGuess;
-<a name="l00700"></a>00700         ULONG           ulBestGuess;
-<a name="l00701"></a>00701         <span class="keywordtype">size_t</span>          tIndex;
-<a name="l00702"></a>00702 
-<a name="l00703"></a>00703         fail(peListID == NULL);
-<a name="l00704"></a>00704 
-<a name="l00705"></a>00705         <span class="keywordflow">if</span> (ulCharPos == CP_INVALID) {
-<a name="l00706"></a>00706                 *peListID = no_list;
-<a name="l00707"></a>00707                 <span class="keywordflow">return</span> FC_INVALID;
-<a name="l00708"></a>00708         }
-<a name="l00709"></a>00709 
-<a name="l00710"></a>00710         apAnchors[0] = pTextAnchor;
-<a name="l00711"></a>00711         apAnchors[1] = pFootnoteAnchor;
-<a name="l00712"></a>00712         apAnchors[2] = pHdrFtrAnchor;
-<a name="l00713"></a>00713         apAnchors[3] = pMacroAnchor;
-<a name="l00714"></a>00714         apAnchors[4] = pAnnotationAnchor;
-<a name="l00715"></a>00715         apAnchors[5] = pEndnoteAnchor;
-<a name="l00716"></a>00716         apAnchors[6] = pTextBoxAnchor;
-<a name="l00717"></a>00717         apAnchors[7] = pHdrTextBoxAnchor;
-<a name="l00718"></a>00718 
-<a name="l00719"></a>00719         eListGuess = no_list;     <span class="comment">/* Best guess is no list */</span>
-<a name="l00720"></a>00720         ulBestGuess = FC_INVALID; <span class="comment">/* Best guess is &quot;file offset not found&quot; */</span>
-<a name="l00721"></a>00721 
-<a name="l00722"></a>00722         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; elementsof(apAnchors); tIndex++) {
-<a name="l00723"></a>00723                 <span class="keywordflow">for</span> (pCurr = apAnchors[tIndex];
-<a name="l00724"></a>00724                      pCurr != NULL;
-<a name="l00725"></a>00725                      pCurr = pCurr-&gt;pNext) {
-<a name="l00726"></a>00726                         <span class="keywordflow">if</span> (ulCharPos == pCurr-&gt;tInfo.ulCharPos +
-<a name="l00727"></a>00727                              pCurr-&gt;tInfo.ulLength &amp;&amp;
-<a name="l00728"></a>00728                             pCurr-&gt;pNext != NULL) {
-<a name="l00729"></a>00729                                 <span class="comment">/*</span>
-<a name="l00730"></a>00730 <span class="comment">                                 * The character position is one beyond this</span>
-<a name="l00731"></a>00731 <span class="comment">                                 * block, so we guess it&#39;s the first byte of</span>
-<a name="l00732"></a>00732 <span class="comment">                                 * the next block (if there is a next block)</span>
-<a name="l00733"></a>00733 <span class="comment">                                 */</span>
-<a name="l00734"></a>00734                                 eListGuess= eListIDs[tIndex];
-<a name="l00735"></a>00735                                 ulBestGuess = pCurr-&gt;pNext-&gt;tInfo.ulFileOffset;
-<a name="l00736"></a>00736                         }
-<a name="l00737"></a>00737 
-<a name="l00738"></a>00738                         <span class="keywordflow">if</span> (ulCharPos &lt; pCurr-&gt;tInfo.ulCharPos ||
-<a name="l00739"></a>00739                             ulCharPos &gt;= pCurr-&gt;tInfo.ulCharPos +
-<a name="l00740"></a>00740                              pCurr-&gt;tInfo.ulLength) {
-<a name="l00741"></a>00741                                 <span class="comment">/* Character position is not in this block */</span>
-<a name="l00742"></a>00742                                 <span class="keywordflow">continue</span>;
-<a name="l00743"></a>00743                         }
-<a name="l00744"></a>00744 
-<a name="l00745"></a>00745                         <span class="comment">/* The character position is in the current block */</span>
-<a name="l00746"></a>00746                         *peListID = eListIDs[tIndex];
-<a name="l00747"></a>00747                         <span class="keywordflow">return</span> pCurr-&gt;tInfo.ulFileOffset +
-<a name="l00748"></a>00748                                 ulCharPos - pCurr-&gt;tInfo.ulCharPos;
-<a name="l00749"></a>00749                 }
-<a name="l00750"></a>00750         }
-<a name="l00751"></a>00751         <span class="comment">/* Passed beyond the end of the last list */</span>
-<a name="l00752"></a>00752         NO_DBG_HEX(ulCharPos);
-<a name="l00753"></a>00753         NO_DBG_HEX(ulBestGuess);
-<a name="l00754"></a>00754         *peListID = eListGuess;
-<a name="l00755"></a>00755         <span class="keywordflow">return</span> ulBestGuess;
-<a name="l00756"></a>00756 } <span class="comment">/* end of ulCharPos2FileOffsetX */</span>
-<a name="l00757"></a>00757 
-<a name="l00758"></a>00758 <span class="comment">/*</span>
-<a name="l00759"></a>00759 <span class="comment"> * Convert a character position to an offset in the file.</span>
-<a name="l00760"></a>00760 <span class="comment"> * Logical to physical offset.</span>
-<a name="l00761"></a>00761 <span class="comment"> *</span>
-<a name="l00762"></a>00762 <span class="comment"> * Returns:     FC_INVALID: in case of error</span>
-<a name="l00763"></a>00763 <span class="comment"> *              otherwise: the computed file offset</span>
-<a name="l00764"></a>00764 <span class="comment"> */</span>
-<a name="l00765"></a>00765 ULONG
-<a name="l00766"></a>00766 ulCharPos2FileOffset(ULONG ulCharPos)
-<a name="l00767"></a>00767 {
-<a name="l00768"></a>00768         list_id_enum    eListID;
-<a name="l00769"></a>00769 
-<a name="l00770"></a>00770         <span class="keywordflow">return</span> ulCharPos2FileOffsetX(ulCharPos, &amp;eListID);
-<a name="l00771"></a>00771 } <span class="comment">/* end of ulCharPos2FileOffset */</span>
-<a name="l00772"></a>00772 
-<a name="l00773"></a>00773 <span class="comment">/*</span>
-<a name="l00774"></a>00774 <span class="comment"> * Convert an offset in the header/footer list to a character position.</span>
-<a name="l00775"></a>00775 <span class="comment"> *</span>
-<a name="l00776"></a>00776 <span class="comment"> * Returns:     CP_INVALID: in case of error</span>
-<a name="l00777"></a>00777 <span class="comment"> *              otherwise: the computed character position</span>
-<a name="l00778"></a>00778 <span class="comment"> */</span>
-<a name="l00779"></a>00779 ULONG
-<a name="l00780"></a>00780 ulHdrFtrOffset2CharPos(ULONG ulHdrFtrOffset)
-<a name="l00781"></a>00781 {
-<a name="l00782"></a>00782         list_mem_type   *pCurr;
-<a name="l00783"></a>00783         ULONG           ulOffset;
-<a name="l00784"></a>00784 
-<a name="l00785"></a>00785         ulOffset = ulHdrFtrOffset;
-<a name="l00786"></a>00786         <span class="keywordflow">for</span> (pCurr = pHdrFtrAnchor; pCurr != NULL; pCurr = pCurr-&gt;pNext) {
-<a name="l00787"></a>00787                 <span class="keywordflow">if</span> (ulOffset &gt;= pCurr-&gt;tInfo.ulLength) {
-<a name="l00788"></a>00788                         <span class="comment">/* The offset is not in this block */</span>
-<a name="l00789"></a>00789                         ulOffset -= pCurr-&gt;tInfo.ulLength;
-<a name="l00790"></a>00790                         <span class="keywordflow">continue</span>;
-<a name="l00791"></a>00791                 }
-<a name="l00792"></a>00792                 <span class="keywordflow">return</span> pCurr-&gt;tInfo.ulCharPos + ulOffset;
-<a name="l00793"></a>00793         }
-<a name="l00794"></a>00794         <span class="keywordflow">return</span> CP_INVALID;
-<a name="l00795"></a>00795 } <span class="comment">/* end of ulHdrFtrOffset2CharPos */</span>
-<a name="l00796"></a>00796 
-<a name="l00797"></a>00797 <span class="comment">/*</span>
-<a name="l00798"></a>00798 <span class="comment"> * Get the sequence number beloning to the given file offset</span>
-<a name="l00799"></a>00799 <span class="comment"> *</span>
-<a name="l00800"></a>00800 <span class="comment"> * Returns the sequence number</span>
-<a name="l00801"></a>00801 <span class="comment"> */</span>
-<a name="l00802"></a>00802 ULONG
-<a name="l00803"></a>00803 ulGetSeqNumber(ULONG ulFileOffset)
-<a name="l00804"></a>00804 {
-<a name="l00805"></a>00805         list_mem_type   *pCurr;
-<a name="l00806"></a>00806         ULONG           ulSeq;
-<a name="l00807"></a>00807 
-<a name="l00808"></a>00808         <span class="keywordflow">if</span> (ulFileOffset == FC_INVALID) {
-<a name="l00809"></a>00809                 <span class="keywordflow">return</span> FC_INVALID;
-<a name="l00810"></a>00810         }
-<a name="l00811"></a>00811 
-<a name="l00812"></a>00812         ulSeq = 0;
-<a name="l00813"></a>00813         <span class="keywordflow">for</span> (pCurr = pTextAnchor; pCurr != NULL; pCurr = pCurr-&gt;pNext) {
-<a name="l00814"></a>00814                 <span class="keywordflow">if</span> (ulFileOffset &gt;= pCurr-&gt;tInfo.ulFileOffset &amp;&amp;
-<a name="l00815"></a>00815                     ulFileOffset &lt; pCurr-&gt;tInfo.ulFileOffset +
-<a name="l00816"></a>00816                      pCurr-&gt;tInfo.ulLength) {
-<a name="l00817"></a>00817                         <span class="comment">/* The file offset is within the current textblock */</span>
-<a name="l00818"></a>00818                         <span class="keywordflow">return</span> ulSeq + ulFileOffset - pCurr-&gt;tInfo.ulFileOffset;
-<a name="l00819"></a>00819                 }
-<a name="l00820"></a>00820                 ulSeq += pCurr-&gt;tInfo.ulLength;
-<a name="l00821"></a>00821         }
-<a name="l00822"></a>00822         <span class="keywordflow">return</span> FC_INVALID;
-<a name="l00823"></a>00823 } <span class="comment">/* end of ulGetSeqNumber */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/chartrans_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,736 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/chartrans.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/chartrans.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * chartrans.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1999-2004 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Translate Word characters to local representation</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;ctype.h&gt;</span>
-<a name="l00012"></a>00012 <span class="preprocessor">#if defined(__STDC_ISO_10646__)</span>
-<a name="l00013"></a>00013 <span class="preprocessor"></span><span class="preprocessor">#include &lt;wctype.h&gt;</span>
-<a name="l00014"></a>00014 <span class="preprocessor">#endif </span><span class="comment">/* __STDC_ISO_10646__ */</span>
-<a name="l00015"></a>00015 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00016"></a>00016 
-<a name="l00017"></a>00017 <span class="keyword">static</span> <span class="keyword">const</span> USHORT usCp850[] = {       <span class="comment">/* DOS implementation of Latin1 */</span>
-<a name="l00018"></a>00018         0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x00e0, 0x00e5, 0x00e7,
-<a name="l00019"></a>00019         0x00ea, 0x00eb, 0x00e8, 0x00ef, 0x00ee, 0x00ec, 0x00c4, 0x00c5,
-<a name="l00020"></a>00020         0x00c9, 0x00e6, 0x00c6, 0x00f4, 0x00f6, 0x00f2, 0x00fb, 0x00f9,
-<a name="l00021"></a>00021         0x00ff, 0x00d6, 0x00dc, 0x00f8, 0x00a3, 0x00d8, 0x00d7, 0x0192,
-<a name="l00022"></a>00022         0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00f1, 0x00d1, 0x00aa, 0x00ba,
-<a name="l00023"></a>00023         0x00bf, 0x00ae, 0x00ac, 0x00bd, 0x00bc, 0x00a1, 0x00ab, 0x00bb,
-<a name="l00024"></a>00024         0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x00c1, 0x00c2, 0x00c0,
-<a name="l00025"></a>00025         0x00a9, 0x2563, 0x2551, 0x2557, 0x255d, 0x00a2, 0x00a5, 0x2510,
-<a name="l00026"></a>00026         0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x00e3, 0x00c3,
-<a name="l00027"></a>00027         0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x00a4,
-<a name="l00028"></a>00028         0x00f0, 0x00d0, 0x00ca, 0x00cb, 0x00c8, 0x0131, 0x00cd, 0x00ce,
-<a name="l00029"></a>00029         0x00cf, 0x2518, 0x250c, 0x2588, 0x2584, 0x00a6, 0x00cc, 0x2580,
-<a name="l00030"></a>00030         0x00d3, 0x00df, 0x00d4, 0x00d2, 0x00f5, 0x00d5, 0x00b5, 0x00fe,
-<a name="l00031"></a>00031         0x00de, 0x00da, 0x00db, 0x00d9, 0x00fd, 0x00dd, 0x00af, 0x00b4,
-<a name="l00032"></a>00032         0x00ad, 0x00b1, 0x2017, 0x00be, 0x00b6, 0x00a7, 0x00f7, 0x00b8,
-<a name="l00033"></a>00033         0x00b0, 0x00a8, 0x00b7, 0x00b9, 0x00b3, 0x00b2, 0x25a0, 0x00a0,
-<a name="l00034"></a>00034 };
-<a name="l00035"></a>00035 
-<a name="l00036"></a>00036 <span class="keyword">static</span> <span class="keyword">const</span> USHORT usCp1250[] = {      <span class="comment">/* Windows implementation of Latin2 */</span>
-<a name="l00037"></a>00037         0x20ac, 0x003f, 0x201a, 0x003f, 0x201e, 0x2026, 0x2020, 0x2021,
-<a name="l00038"></a>00038         0x003f, 0x2030, 0x0160, 0x2039, 0x015a, 0x0164, 0x017d, 0x0179,
-<a name="l00039"></a>00039         0x003f, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,
-<a name="l00040"></a>00040         0x003f, 0x2122, 0x0161, 0x203a, 0x015b, 0x0165, 0x017e, 0x017a,
-<a name="l00041"></a>00041         0x00a0, 0x02c7, 0x02d8, 0x0141, 0x00a4, 0x0104, 0x00a6, 0x00a7,
-<a name="l00042"></a>00042         0x00a8, 0x00a9, 0x015e, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x017b,
-<a name="l00043"></a>00043         0x00b0, 0x00b1, 0x02db, 0x0142, 0x00b4, 0x00b5, 0x00b6, 0x00b7,
-<a name="l00044"></a>00044         0x00b8, 0x0105, 0x015f, 0x00bb, 0x013d, 0x02dd, 0x013e, 0x017c,
-<a name="l00045"></a>00045         0x0154, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x0139, 0x0106, 0x00c7,
-<a name="l00046"></a>00046         0x010c, 0x00c9, 0x0118, 0x00cb, 0x011a, 0x00cd, 0x00ce, 0x010e,
-<a name="l00047"></a>00047         0x0110, 0x0143, 0x0147, 0x00d3, 0x00d4, 0x0150, 0x00d6, 0x00d7,
-<a name="l00048"></a>00048         0x0158, 0x016e, 0x00da, 0x0170, 0x00dc, 0x00dd, 0x0162, 0x00df,
-<a name="l00049"></a>00049         0x0155, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x013a, 0x0107, 0x00e7,
-<a name="l00050"></a>00050         0x010d, 0x00e9, 0x0119, 0x00eb, 0x011b, 0x00ed, 0x00ee, 0x010f,
-<a name="l00051"></a>00051         0x0111, 0x0144, 0x0148, 0x00f3, 0x00f4, 0x0151, 0x00f6, 0x00f7,
-<a name="l00052"></a>00052         0x0159, 0x016f, 0x00fa, 0x0171, 0x00fc, 0x00fd, 0x0163, 0x02d9,
-<a name="l00053"></a>00053 };
-<a name="l00054"></a>00054 
-<a name="l00055"></a>00055 <span class="keyword">static</span> <span class="keyword">const</span> USHORT usCp1251[] = {      <span class="comment">/* Windows implementation of Cyrillic */</span>
-<a name="l00056"></a>00056         0x0402, 0x0403, 0x201a, 0x0453, 0x201e, 0x2026, 0x2020, 0x2021,
-<a name="l00057"></a>00057         0x20ac, 0x2030, 0x0409, 0x2039, 0x040a, 0x040c, 0x040b, 0x040f,
-<a name="l00058"></a>00058         0x0452, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,
-<a name="l00059"></a>00059         0x00f3, 0x2122, 0x0459, 0x203a, 0x045a, 0x045c, 0x045b, 0x045f,
-<a name="l00060"></a>00060         0x00a0, 0x040e, 0x045e, 0x0408, 0x00a4, 0x0490, 0x00a6, 0x00a7,
-<a name="l00061"></a>00061         0x0401, 0x00a9, 0x0404, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x0407,
-<a name="l00062"></a>00062         0x00b0, 0x00b1, 0x0406, 0x0456, 0x0491, 0x00b5, 0x00b6, 0x00b7,
-<a name="l00063"></a>00063         0x0451, 0x2116, 0x0454, 0x00bb, 0x0458, 0x0405, 0x0455, 0x0457,
-<a name="l00064"></a>00064         0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
-<a name="l00065"></a>00065         0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f,
-<a name="l00066"></a>00066         0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
-<a name="l00067"></a>00067         0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f,
-<a name="l00068"></a>00068         0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
-<a name="l00069"></a>00069         0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f,
-<a name="l00070"></a>00070         0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
-<a name="l00071"></a>00071         0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f,
-<a name="l00072"></a>00072 };
-<a name="l00073"></a>00073 
-<a name="l00074"></a>00074 <span class="keyword">static</span> <span class="keyword">const</span> USHORT usCp1252[] = {      <span class="comment">/* Windows implementation of Latin1 */</span>
-<a name="l00075"></a>00075         0x20ac, 0x003f, 0x201a, 0x0192, 0x201e, 0x2026, 0x2020, 0x2021,
-<a name="l00076"></a>00076         0x02c6, 0x2030, 0x0160, 0x2039, 0x0152, 0x003f, 0x017d, 0x003f,
-<a name="l00077"></a>00077         0x003f, 0x2018, 0x2019, 0x201c, 0x201d, 0x2022, 0x2013, 0x2014,
-<a name="l00078"></a>00078         0x02dc, 0x2122, 0x0161, 0x203a, 0x0153, 0x003f, 0x017e, 0x0178,
-<a name="l00079"></a>00079         0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7,
-<a name="l00080"></a>00080         0x00a8, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
-<a name="l00081"></a>00081         0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x00b4, 0x00b5, 0x00b6, 0x00b7,
-<a name="l00082"></a>00082         0x00b8, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf,
-<a name="l00083"></a>00083         0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x00c4, 0x00c5, 0x00c6, 0x00c7,
-<a name="l00084"></a>00084         0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x00cc, 0x00cd, 0x00ce, 0x00cf,
-<a name="l00085"></a>00085         0x00d0, 0x00d1, 0x00d2, 0x00d3, 0x00d4, 0x00d5, 0x00d6, 0x00d7,
-<a name="l00086"></a>00086         0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x00dd, 0x00de, 0x00df,
-<a name="l00087"></a>00087         0x00e0, 0x00e1, 0x00e2, 0x00e3, 0x00e4, 0x00e5, 0x00e6, 0x00e7,
-<a name="l00088"></a>00088         0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
-<a name="l00089"></a>00089         0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7,
-<a name="l00090"></a>00090         0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff,
-<a name="l00091"></a>00091 };
-<a name="l00092"></a>00092 
-<a name="l00093"></a>00093 <span class="keyword">static</span> <span class="keyword">const</span> USHORT usMacRoman[] = {    <span class="comment">/* Apple implementation of Latin1 */</span>
-<a name="l00094"></a>00094         0x00c4, 0x00c5, 0x00c7, 0x00c9, 0x00d1, 0x00d6, 0x00dc, 0x00e1,
-<a name="l00095"></a>00095         0x00e0, 0x00e2, 0x00e4, 0x00e3, 0x00e5, 0x00e7, 0x00e9, 0x00e8,
-<a name="l00096"></a>00096         0x00ea, 0x00eb, 0x00ed, 0x00ec, 0x00ee, 0x00ef, 0x00f1, 0x00f3,
-<a name="l00097"></a>00097         0x00f2, 0x00f4, 0x00f6, 0x00f5, 0x00fa, 0x00f9, 0x00fb, 0x00fc,
-<a name="l00098"></a>00098         0x2020, 0x00b0, 0x00a2, 0x00a3, 0x00a7, 0x2022, 0x00b6, 0x00df,
-<a name="l00099"></a>00099         0x00ae, 0x00a9, 0x2122, 0x00b4, 0x00a8, 0x2260, 0x00c6, 0x00d8,
-<a name="l00100"></a>00100         0x221e, 0x00b1, 0x2264, 0x2265, 0x00a5, 0x00b5, 0x2202, 0x2211,
-<a name="l00101"></a>00101         0x220f, 0x03c0, 0x222b, 0x00aa, 0x00ba, 0x2126, 0x00e6, 0x00f8,
-<a name="l00102"></a>00102         0x00bf, 0x00a1, 0x00ac, 0x221a, 0x0192, 0x2248, 0x2206, 0x00ab,
-<a name="l00103"></a>00103         0x00bb, 0x2026, 0x00a0, 0x00c0, 0x00c3, 0x00d5, 0x0152, 0x0153,
-<a name="l00104"></a>00104         0x2013, 0x2014, 0x201c, 0x201d, 0x2018, 0x2019, 0x00f7, 0x25ca,
-<a name="l00105"></a>00105         0x00ff, 0x0178, 0x2044, 0x00a4, 0x2039, 0x203a, 0xfb01, 0xfb02,
-<a name="l00106"></a>00106         0x2021, 0x00b7, 0x201a, 0x201e, 0x2030, 0x00c2, 0x00ca, 0x00c1,
-<a name="l00107"></a>00107         0x00cb, 0x00c8, 0x00cd, 0x00ce, 0x00cf, 0x00cc, 0x00d3, 0x00d4,
-<a name="l00108"></a>00108         0x003f, 0x00d2, 0x00da, 0x00db, 0x00d9, 0x0131, 0x02c6, 0x02dc,
-<a name="l00109"></a>00109         0x00af, 0x02d8, 0x02d9, 0x02da, 0x00b8, 0x02dd, 0x02db, 0x02c7,
-<a name="l00110"></a>00110 };
-<a name="l00111"></a>00111 
-<a name="l00112"></a>00112 <span class="keyword">static</span> <span class="keyword">const</span> USHORT usPrivateArea[] = {
-<a name="l00113"></a>00113         0x0020, 0x0021, 0x2200, 0x0023, 0x2203, 0x0025, 0x0026, 0x220d,
-<a name="l00114"></a>00114         0x0028, 0x0029, 0x2217, 0x002b, 0x002c, 0x2212, 0x002e, 0x002f,
-<a name="l00115"></a>00115         0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
-<a name="l00116"></a>00116         0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x2019, 0x003e, 0x003f,
-<a name="l00117"></a>00117         0x201d, 0x201c, 0x0392, 0x03a7, 0x0394, 0x0395, 0x03a6, 0x0393,
-<a name="l00118"></a>00118         0x0397, 0x0399, 0x03d1, 0x039a, 0x039b, 0x039c, 0x039d, 0x039f,
-<a name="l00119"></a>00119         0x03a0, 0x0398, 0x03a1, 0x03a3, 0x03a4, 0x03a5, 0x03c2, 0x03a9,
-<a name="l00120"></a>00120         0x039e, 0x03a8, 0x0396, 0x005b, 0x2234, 0x005d, 0x22a5, 0x005f,
-<a name="l00121"></a>00121         0x003f, 0x03b1, 0x03b2, 0x03c7, 0x03b4, 0x03b5, 0x03c6, 0x03b3,
-<a name="l00122"></a>00122         0x03b7, 0x03b9, 0x03d5, 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03bf,
-<a name="l00123"></a>00123         0x03c0, 0x03b8, 0x03c1, 0x03c3, 0x03c4, 0x03c5, 0x03d6, 0x03c9,
-<a name="l00124"></a>00124         0x03be, 0x03c8, 0x03b6, 0x007b, 0x007c, 0x007d, 0x223c, 0x003f,
-<a name="l00125"></a>00125         0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-<a name="l00126"></a>00126         0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-<a name="l00127"></a>00127         0x003f, 0x003f, 0x003f, 0x2022, 0x003f, 0x003f, 0x003f, 0x003f,
-<a name="l00128"></a>00128         0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f, 0x003f,
-<a name="l00129"></a>00129         0x20ac, 0x03d2, 0x2032, 0x2264, 0x2044, 0x221e, 0x0192, 0x2663,
-<a name="l00130"></a>00130         0x2666, 0x2665, 0x2660, 0x2194, 0x2190, 0x2191, 0x2192, 0x2193,
-<a name="l00131"></a>00131         0x00b0, 0x00b1, 0x2033, 0x2265, 0x00d7, 0x221d, 0x2202, 0x2022,
-<a name="l00132"></a>00132         0x00f7, 0x2260, 0x2261, 0x2248, 0x2026, 0x007c, 0x23af, 0x21b5,
-<a name="l00133"></a>00133         0x2135, 0x2111, 0x211c, 0x2118, 0x2297, 0x2295, 0x2205, 0x2229,
-<a name="l00134"></a>00134         0x222a, 0x2283, 0x2287, 0x2284, 0x2282, 0x2286, 0x2208, 0x2209,
-<a name="l00135"></a>00135         0x2220, 0x2207, 0x00ae, 0x00a9, 0x2122, 0x220f, 0x221a, 0x22c5,
-<a name="l00136"></a>00136         0x00ac, 0x2227, 0x2228, 0x21d4, 0x21d0, 0x21d1, 0x21d2, 0x21d3,
-<a name="l00137"></a>00137         0x22c4, 0x3008, 0x00ae, 0x00a9, 0x2122, 0x2211, 0x239b, 0x239c,
-<a name="l00138"></a>00138         0x239d, 0x23a1, 0x23a2, 0x23a3, 0x23a7, 0x23a8, 0x23a9, 0x23aa,
-<a name="l00139"></a>00139         0x003f, 0x3009, 0x222b, 0x2320, 0x23ae, 0x2321, 0x239e, 0x239f,
-<a name="l00140"></a>00140         0x23a0, 0x23a4, 0x23a5, 0x23a6, 0x23ab, 0x23ac, 0x23ad, 0x003f,
-<a name="l00141"></a>00141 };
-<a name="l00142"></a>00142 
-<a name="l00143"></a>00143 <span class="keyword">typedef</span> <span class="keyword">struct </span>char_table_tag {
-<a name="l00144"></a>00144         UCHAR   ucLocal;
-<a name="l00145"></a>00145         USHORT  usUnicode;
-<a name="l00146"></a>00146 } char_table_type;
-<a name="l00147"></a>00147 
-<a name="l00148"></a>00148 <span class="keyword">static</span> char_table_type  atCharTable[256];
-<a name="l00149"></a>00149 <span class="keyword">static</span> <span class="keywordtype">size_t</span>           tNextPosFree = 0;
-<a name="l00150"></a>00150 
-<a name="l00151"></a>00151 
-<a name="l00152"></a>00152 <span class="comment">/*</span>
-<a name="l00153"></a>00153 <span class="comment"> * iCompare - compare two records</span>
-<a name="l00154"></a>00154 <span class="comment"> *</span>
-<a name="l00155"></a>00155 <span class="comment"> * Compares two records. For use by qsort(3C) and bsearch(3C).</span>
-<a name="l00156"></a>00156 <span class="comment"> *</span>
-<a name="l00157"></a>00157 <span class="comment"> * returns -1 if rec1 &lt; rec2, 0 if rec1 == rec2, 1 if rec1 &gt; rec2</span>
-<a name="l00158"></a>00158 <span class="comment"> */</span>
-<a name="l00159"></a>00159 <span class="keyword">static</span> <span class="keywordtype">int</span>
-<a name="l00160"></a>00160 iCompare(<span class="keyword">const</span> <span class="keywordtype">void</span> *pvRecord1, <span class="keyword">const</span> <span class="keywordtype">void</span> *pvRecord2)
-<a name="l00161"></a>00161 {
-<a name="l00162"></a>00162         USHORT  usUnicode1, usUnicode2;
-<a name="l00163"></a>00163 
-<a name="l00164"></a>00164         usUnicode1 = ((char_table_type *)pvRecord1)-&gt;usUnicode;
-<a name="l00165"></a>00165         usUnicode2 = ((char_table_type *)pvRecord2)-&gt;usUnicode;
-<a name="l00166"></a>00166 
-<a name="l00167"></a>00167         <span class="keywordflow">if</span> (usUnicode1 &lt; usUnicode2) {
-<a name="l00168"></a>00168                 <span class="keywordflow">return</span> -1;
-<a name="l00169"></a>00169         }
-<a name="l00170"></a>00170         <span class="keywordflow">if</span> (usUnicode1 &gt; usUnicode2) {
-<a name="l00171"></a>00171                 <span class="keywordflow">return</span> 1;
-<a name="l00172"></a>00172         }
-<a name="l00173"></a>00173         <span class="keywordflow">return</span> 0;
-<a name="l00174"></a>00174 } <span class="comment">/* end of iCompare */</span>
-<a name="l00175"></a>00175 
-<a name="l00176"></a>00176 <span class="comment">/*</span>
-<a name="l00177"></a>00177 <span class="comment"> * pGetCharTableRecord - get the character table record</span>
-<a name="l00178"></a>00178 <span class="comment"> *</span>
-<a name="l00179"></a>00179 <span class="comment"> * returns a pointer to the record when found, otherwise NULL</span>
-<a name="l00180"></a>00180 <span class="comment"> */</span>
-<a name="l00181"></a>00181 <span class="keyword">static</span> <span class="keyword">const</span> char_table_type *
-<a name="l00182"></a>00182 pGetCharTableRecord(USHORT usUnicode)
-<a name="l00183"></a>00183 {
-<a name="l00184"></a>00184         char_table_type tKey;
-<a name="l00185"></a>00185 
-<a name="l00186"></a>00186         <span class="keywordflow">if</span> (tNextPosFree == 0) {
-<a name="l00187"></a>00187                 <span class="keywordflow">return</span> NULL;
-<a name="l00188"></a>00188         }
-<a name="l00189"></a>00189         tKey.usUnicode = usUnicode;
-<a name="l00190"></a>00190         tKey.ucLocal = 0;
-<a name="l00191"></a>00191         <span class="keywordflow">return</span> (char_table_type *)bsearch(&amp;tKey,
-<a name="l00192"></a>00192                         atCharTable,
-<a name="l00193"></a>00193                         tNextPosFree, <span class="keyword">sizeof</span>(atCharTable[0]),
-<a name="l00194"></a>00194                         iCompare);
-<a name="l00195"></a>00195 } <span class="comment">/* end of pGetCharTableRecord */</span>
-<a name="l00196"></a>00196 
-<a name="l00197"></a>00197 <span class="comment">/*</span>
-<a name="l00198"></a>00198 <span class="comment"> * ucGetBulletCharacter - get the local representation of the bullet</span>
-<a name="l00199"></a>00199 <span class="comment"> */</span>
-<a name="l00200"></a>00200 UCHAR
-<a name="l00201"></a>00201 ucGetBulletCharacter(conversion_type eConversionType, encoding_type eEncoding)
-<a name="l00202"></a>00202 {
-<a name="l00203"></a>00203 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00204"></a>00204 <span class="preprocessor"></span>        <span class="keywordflow">return</span> 0x8f;
-<a name="l00205"></a>00205 <span class="preprocessor">#else</span>
-<a name="l00206"></a>00206 <span class="preprocessor"></span>        <span class="keyword">const</span> char_table_type   *pRec;
-<a name="l00207"></a>00207 
-<a name="l00208"></a>00208         fail(eEncoding == encoding_utf_8);
-<a name="l00209"></a>00209 
-<a name="l00210"></a>00210         <span class="keywordflow">if</span> (eEncoding == encoding_latin_1 &amp;&amp;
-<a name="l00211"></a>00211             (eConversionType == conversion_ps ||
-<a name="l00212"></a>00212              eConversionType == conversion_pdf)) {
-<a name="l00213"></a>00213                 <span class="comment">/* Ugly, but it makes the PostScript and PDF look better */</span>
-<a name="l00214"></a>00214                 <span class="keywordflow">return</span> (UCHAR)143;
-<a name="l00215"></a>00215         }
-<a name="l00216"></a>00216         <span class="keywordflow">if</span> (eConversionType != conversion_text &amp;&amp;
-<a name="l00217"></a>00217             eConversionType != conversion_fmt_text) {
-<a name="l00218"></a>00218                 pRec = pGetCharTableRecord(UNICODE_BULLET);
-<a name="l00219"></a>00219                 <span class="keywordflow">if</span> (pRec != NULL) {
-<a name="l00220"></a>00220                         <span class="keywordflow">return</span> pRec-&gt;ucLocal;
-<a name="l00221"></a>00221                 }
-<a name="l00222"></a>00222                 pRec = pGetCharTableRecord(UNICODE_BULLET_OPERATOR);
-<a name="l00223"></a>00223                 <span class="keywordflow">if</span> (pRec != NULL) {
-<a name="l00224"></a>00224                         <span class="keywordflow">return</span> pRec-&gt;ucLocal;
-<a name="l00225"></a>00225                 }
-<a name="l00226"></a>00226                 pRec = pGetCharTableRecord(UNICODE_MIDDLE_DOT);
-<a name="l00227"></a>00227                 <span class="keywordflow">if</span> (pRec != NULL) {
-<a name="l00228"></a>00228                         <span class="keywordflow">return</span> pRec-&gt;ucLocal;
-<a name="l00229"></a>00229                 }
-<a name="l00230"></a>00230         }
-<a name="l00231"></a>00231         <span class="keywordflow">return</span> (UCHAR)<span class="charliteral">&#39;.&#39;</span>;
-<a name="l00232"></a>00232 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00233"></a>00233 } <span class="comment">/* end of ucGetBulletCharacter */</span>
-<a name="l00234"></a>00234 
-<a name="l00235"></a>00235 <span class="comment">/*</span>
-<a name="l00236"></a>00236 <span class="comment"> * ucGetNbspCharacter - get the local representation of the non-breaking space</span>
-<a name="l00237"></a>00237 <span class="comment"> */</span>
-<a name="l00238"></a>00238 UCHAR
-<a name="l00239"></a>00239 ucGetNbspCharacter(<span class="keywordtype">void</span>)
-<a name="l00240"></a>00240 {
-<a name="l00241"></a>00241         <span class="keyword">const</span> char_table_type   *pRec;
-<a name="l00242"></a>00242 
-<a name="l00243"></a>00243         pRec = pGetCharTableRecord(0x00a0);     <span class="comment">/* Unicode non-breaking space */</span>
-<a name="l00244"></a>00244         <span class="keywordflow">if</span> (pRec == NULL) {
-<a name="l00245"></a>00245                 DBG_MSG(<span class="stringliteral">&quot;Non-breaking space record not found&quot;</span>);
-<a name="l00246"></a>00246                 <span class="comment">/* No value found, use the best guess */</span>
-<a name="l00247"></a>00247                 <span class="keywordflow">return</span> (UCHAR)0xa0;
-<a name="l00248"></a>00248         }
-<a name="l00249"></a>00249         <span class="keywordflow">return</span> pRec-&gt;ucLocal;
-<a name="l00250"></a>00250 } <span class="comment">/* end of ucGetNbspCharacter */</span>
-<a name="l00251"></a>00251 
-<a name="l00252"></a>00252 <span class="comment">/*</span>
-<a name="l00253"></a>00253 <span class="comment"> * bReadCharacterMappingTable - read the mapping table</span>
-<a name="l00254"></a>00254 <span class="comment"> *</span>
-<a name="l00255"></a>00255 <span class="comment"> * Read the character mapping table from file and have the contents sorted</span>
-<a name="l00256"></a>00256 <span class="comment"> *</span>
-<a name="l00257"></a>00257 <span class="comment"> * returns TRUE if successful, otherwise FALSE</span>
-<a name="l00258"></a>00258 <span class="comment"> */</span>
-<a name="l00259"></a>00259 BOOL
-<a name="l00260"></a>00260 bReadCharacterMappingTable(FILE *pFile)
-<a name="l00261"></a>00261 {
-<a name="l00262"></a>00262         <span class="keywordtype">char</span>    *pcTmp;
-<a name="l00263"></a>00263         ULONG   ulUnicode;
-<a name="l00264"></a>00264         UINT    uiLocal;
-<a name="l00265"></a>00265         <span class="keywordtype">int</span>     iFields;
-<a name="l00266"></a>00266         <span class="keywordtype">char</span>    szLine[81];
-<a name="l00267"></a>00267 
-<a name="l00268"></a>00268         <span class="keywordflow">if</span> (pFile == NULL) {
-<a name="l00269"></a>00269                 <span class="keywordflow">return</span> FALSE;
-<a name="l00270"></a>00270         }
-<a name="l00271"></a>00271 
-<a name="l00272"></a>00272         <span class="comment">/* Clean the table first */</span>
-<a name="l00273"></a>00273         (void)memset(atCharTable, 0, <span class="keyword">sizeof</span>(atCharTable));
-<a name="l00274"></a>00274 
-<a name="l00275"></a>00275         <span class="comment">/* Fill the table */</span>
-<a name="l00276"></a>00276         <span class="keywordflow">while</span> (fgets(szLine, (<span class="keywordtype">int</span>)<span class="keyword">sizeof</span>(szLine), pFile)) {
-<a name="l00277"></a>00277                 <span class="keywordflow">if</span> (szLine[0] == <span class="charliteral">&#39;#&#39;</span> ||
-<a name="l00278"></a>00278                     szLine[0] == <span class="charliteral">&#39;\r&#39;</span> ||
-<a name="l00279"></a>00279                     szLine[0] == <span class="charliteral">&#39;\n&#39;</span>) {
-<a name="l00280"></a>00280                         <span class="comment">/* Comment or empty line */</span>
-<a name="l00281"></a>00281                         <span class="keywordflow">continue</span>;
-<a name="l00282"></a>00282                 }
-<a name="l00283"></a>00283                 iFields = sscanf(szLine, <span class="stringliteral">&quot;%x %lx %*s&quot;</span>, &amp;uiLocal, &amp;ulUnicode);
-<a name="l00284"></a>00284                 <span class="keywordflow">if</span> (iFields != 2) {
-<a name="l00285"></a>00285                         pcTmp = strchr(szLine, <span class="charliteral">&#39;\r&#39;</span>);
-<a name="l00286"></a>00286                         <span class="keywordflow">if</span> (pcTmp != NULL) {
-<a name="l00287"></a>00287                                 *pcTmp = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00288"></a>00288                         }
-<a name="l00289"></a>00289                         pcTmp = strchr(szLine, <span class="charliteral">&#39;\n&#39;</span>);
-<a name="l00290"></a>00290                         <span class="keywordflow">if</span> (pcTmp != NULL) {
-<a name="l00291"></a>00291                                 *pcTmp = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00292"></a>00292                         }
-<a name="l00293"></a>00293                         werr(0, <span class="stringliteral">&quot;Syntax error in: &#39;%s&#39;&quot;</span>, szLine);
-<a name="l00294"></a>00294                         <span class="keywordflow">continue</span>;
-<a name="l00295"></a>00295                 }
-<a name="l00296"></a>00296                 <span class="keywordflow">if</span> (uiLocal &gt; 0xff || ulUnicode &gt; 0xffff) {
-<a name="l00297"></a>00297                         werr(0, <span class="stringliteral">&quot;Syntax error in: &#39;%02x %04lx&#39;&quot;</span>,
-<a name="l00298"></a>00298                                         uiLocal, ulUnicode);
-<a name="l00299"></a>00299                         <span class="keywordflow">continue</span>;
-<a name="l00300"></a>00300                 }
-<a name="l00301"></a>00301                 <span class="comment">/* Store only the relevant entries */</span>
-<a name="l00302"></a>00302                 <span class="keywordflow">if</span> (uiLocal != ulUnicode || uiLocal &gt;= 0x80) {
-<a name="l00303"></a>00303                         atCharTable[tNextPosFree].ucLocal = (UCHAR)uiLocal;
-<a name="l00304"></a>00304                         atCharTable[tNextPosFree].usUnicode = (USHORT)ulUnicode;
-<a name="l00305"></a>00305                         tNextPosFree++;
-<a name="l00306"></a>00306                 }
-<a name="l00307"></a>00307                 <span class="keywordflow">if</span> (tNextPosFree &gt;= elementsof(atCharTable)) {
-<a name="l00308"></a>00308                         werr(0, <span class="stringliteral">&quot;Too many entries in the character mapping &quot;</span>
-<a name="l00309"></a>00309                                 <span class="stringliteral">&quot;file. Ignoring the rest.&quot;</span>);
-<a name="l00310"></a>00310                         <span class="keywordflow">break</span>;
-<a name="l00311"></a>00311                 }
-<a name="l00312"></a>00312         }
-<a name="l00313"></a>00313 
-<a name="l00314"></a>00314         <span class="keywordflow">if</span> (tNextPosFree != 0) {
-<a name="l00315"></a>00315                 DBG_HEX(atCharTable[0].usUnicode);
-<a name="l00316"></a>00316                 DBG_HEX(atCharTable[tNextPosFree - 1].usUnicode);
-<a name="l00317"></a>00317 
-<a name="l00318"></a>00318                 qsort(atCharTable,
-<a name="l00319"></a>00319                         tNextPosFree, <span class="keyword">sizeof</span>(atCharTable[0]),
-<a name="l00320"></a>00320                         iCompare);
-<a name="l00321"></a>00321 
-<a name="l00322"></a>00322                 DBG_HEX(atCharTable[0].usUnicode);
-<a name="l00323"></a>00323                 DBG_HEX(atCharTable[tNextPosFree - 1].usUnicode);
-<a name="l00324"></a>00324         }
-<a name="l00325"></a>00325 
-<a name="l00326"></a>00326         <span class="keywordflow">return</span> TRUE;
-<a name="l00327"></a>00327 } <span class="comment">/* end of bReadCharacterMappingTable */</span>
-<a name="l00328"></a>00328 
-<a name="l00329"></a>00329 <span class="comment">/*</span>
-<a name="l00330"></a>00330 <span class="comment"> * ulTranslateCharacters - Translate characters to local representation</span>
-<a name="l00331"></a>00331 <span class="comment"> *</span>
-<a name="l00332"></a>00332 <span class="comment"> * Translate all characters to local representation</span>
-<a name="l00333"></a>00333 <span class="comment"> *</span>
-<a name="l00334"></a>00334 <span class="comment"> * returns the translated character</span>
-<a name="l00335"></a>00335 <span class="comment"> */</span>
-<a name="l00336"></a>00336 ULONG
-<a name="l00337"></a>00337 ulTranslateCharacters(USHORT usChar, ULONG ulFileOffset, <span class="keywordtype">int</span> iWordVersion,
-<a name="l00338"></a>00338         conversion_type eConversionType, encoding_type eEncoding,
-<a name="l00339"></a>00339         BOOL bUseMacCharSet)
-<a name="l00340"></a>00340 {
-<a name="l00341"></a>00341         <span class="keyword">const</span> char_table_type   *pTmp;
-<a name="l00342"></a>00342         <span class="keyword">const</span> USHORT    *usCharSet;
-<a name="l00343"></a>00343 
-<a name="l00344"></a>00344         usCharSet = NULL;
-<a name="l00345"></a>00345         <span class="keywordflow">if</span> (bUseMacCharSet) {
-<a name="l00346"></a>00346                 <span class="comment">/* Macintosh character set */</span>
-<a name="l00347"></a>00347                 usCharSet = usMacRoman;
-<a name="l00348"></a>00348         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (iWordVersion == 0) {
-<a name="l00349"></a>00349                 <span class="comment">/* DOS character set */</span>
-<a name="l00350"></a>00350                 usCharSet = usCp850;
-<a name="l00351"></a>00351         } <span class="keywordflow">else</span> {
-<a name="l00352"></a>00352                 <span class="comment">/* Windows character set */</span>
-<a name="l00353"></a>00353                 <span class="keywordflow">switch</span> (eEncoding) {
-<a name="l00354"></a>00354                 <span class="keywordflow">case</span> encoding_latin_2:
-<a name="l00355"></a>00355                         usCharSet = usCp1250;
-<a name="l00356"></a>00356                         <span class="keywordflow">break</span>;
-<a name="l00357"></a>00357                 <span class="keywordflow">case</span> encoding_cyrillic:
-<a name="l00358"></a>00358                         usCharSet = usCp1251;
-<a name="l00359"></a>00359                         <span class="keywordflow">break</span>;
-<a name="l00360"></a>00360                 <span class="keywordflow">case</span> encoding_latin_1:
-<a name="l00361"></a>00361                 <span class="keywordflow">default</span>:
-<a name="l00362"></a>00362                         usCharSet = usCp1252;
-<a name="l00363"></a>00363                         <span class="keywordflow">break</span>;
-<a name="l00364"></a>00364                 }
-<a name="l00365"></a>00365         }
-<a name="l00366"></a>00366         fail(usCharSet == NULL);
-<a name="l00367"></a>00367         <span class="keywordflow">if</span> (usChar &gt;= 0x80 &amp;&amp; usChar &lt;= 0x9f) {
-<a name="l00368"></a>00368                 <span class="comment">/* Translate implementation defined characters */</span>
-<a name="l00369"></a>00369                 usChar = usCharSet[usChar - 0x80];
-<a name="l00370"></a>00370         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (iWordVersion &lt; 8 &amp;&amp; usChar &gt;= 0xa0 &amp;&amp; usChar &lt;= 0xff) {
-<a name="l00371"></a>00371                 <span class="comment">/* Translate old character set to Unixcode */</span>
-<a name="l00372"></a>00372                 usChar = usCharSet[usChar - 0x80];
-<a name="l00373"></a>00373         }
-<a name="l00374"></a>00374 
-<a name="l00375"></a>00375         <span class="comment">/* Microsoft Unicode to real Unicode */</span>
-<a name="l00376"></a>00376         <span class="keywordflow">if</span> (usChar &gt;= 0xf020 &amp;&amp; usChar &lt;= 0xf0ff) {
-<a name="l00377"></a>00377                 DBG_HEX_C(usPrivateArea[usChar - 0xf020] == 0x003f, usChar);
-<a name="l00378"></a>00378                 usChar = usPrivateArea[usChar - 0xf020];
-<a name="l00379"></a>00379         }
-<a name="l00380"></a>00380 
-<a name="l00381"></a>00381         <span class="comment">/* Characters with a special meaning in Word */</span>
-<a name="l00382"></a>00382         <span class="keywordflow">switch</span> (usChar) {
-<a name="l00383"></a>00383         <span class="keywordflow">case</span> IGNORE_CHARACTER:
-<a name="l00384"></a>00384         <span class="keywordflow">case</span> FOOTNOTE_SEPARATOR:
-<a name="l00385"></a>00385         <span class="keywordflow">case</span> FOOTNOTE_CONTINUATION:
-<a name="l00386"></a>00386         <span class="keywordflow">case</span> ANNOTATION:
-<a name="l00387"></a>00387         <span class="keywordflow">case</span> FRAME:
-<a name="l00388"></a>00388         <span class="keywordflow">case</span> LINE_FEED:
-<a name="l00389"></a>00389         <span class="keywordflow">case</span> WORD_SOFT_HYPHEN:
-<a name="l00390"></a>00390         <span class="keywordflow">case</span> UNICODE_HYPHENATION_POINT:
-<a name="l00391"></a>00391                 <span class="keywordflow">return</span> IGNORE_CHARACTER;
-<a name="l00392"></a>00392         <span class="keywordflow">case</span> PICTURE:
-<a name="l00393"></a>00393         <span class="keywordflow">case</span> TABLE_SEPARATOR:
-<a name="l00394"></a>00394         <span class="keywordflow">case</span> TAB:
-<a name="l00395"></a>00395         <span class="keywordflow">case</span> HARD_RETURN:
-<a name="l00396"></a>00396         <span class="keywordflow">case</span> PAGE_BREAK:
-<a name="l00397"></a>00397         <span class="keywordflow">case</span> PAR_END:
-<a name="l00398"></a>00398         <span class="keywordflow">case</span> COLUMN_FEED:
-<a name="l00399"></a>00399                 <span class="keywordflow">return</span> (ULONG)usChar;
-<a name="l00400"></a>00400         <span class="keywordflow">case</span> FOOTNOTE_OR_ENDNOTE:
-<a name="l00401"></a>00401                 NO_DBG_HEX(ulFileOffset);
-<a name="l00402"></a>00402                 <span class="keywordflow">switch</span> (eGetNotetype(ulFileOffset)) {
-<a name="l00403"></a>00403                 <span class="keywordflow">case</span> notetype_is_footnote:
-<a name="l00404"></a>00404                         <span class="keywordflow">return</span> FOOTNOTE_CHAR;
-<a name="l00405"></a>00405                 <span class="keywordflow">case</span> notetype_is_endnote:
-<a name="l00406"></a>00406                         <span class="keywordflow">return</span> ENDNOTE_CHAR;
-<a name="l00407"></a>00407                 <span class="keywordflow">default</span>:
-<a name="l00408"></a>00408                         <span class="keywordflow">return</span> UNKNOWN_NOTE_CHAR;
-<a name="l00409"></a>00409                 }
-<a name="l00410"></a>00410         <span class="keywordflow">case</span> WORD_UNBREAKABLE_JOIN:
-<a name="l00411"></a>00411                 <span class="keywordflow">return</span> (ULONG)OUR_UNBREAKABLE_JOIN;
-<a name="l00412"></a>00412         <span class="keywordflow">default</span>:
-<a name="l00413"></a>00413                 <span class="keywordflow">break</span>;
-<a name="l00414"></a>00414         }
-<a name="l00415"></a>00415 
-<a name="l00416"></a>00416         <span class="keywordflow">if</span> (eEncoding != encoding_utf_8) {
-<a name="l00417"></a>00417                 <span class="comment">/* Latin characters in an oriental text */</span>
-<a name="l00418"></a>00418                 <span class="keywordflow">if</span> (usChar &gt;= 0xff01 &amp;&amp; usChar &lt;= 0xff5e) {
-<a name="l00419"></a>00419                         usChar -= 0xfee0;
-<a name="l00420"></a>00420                 }
-<a name="l00421"></a>00421         }
-<a name="l00422"></a>00422 
-<a name="l00423"></a>00423         <span class="keywordflow">if</span> (eEncoding == encoding_latin_1 &amp;&amp;
-<a name="l00424"></a>00424             (eConversionType == conversion_ps ||
-<a name="l00425"></a>00425              eConversionType == conversion_pdf)) {
-<a name="l00426"></a>00426                 <span class="comment">/* Ugly, but it makes the PostScript and PDF look better */</span>
-<a name="l00427"></a>00427                 <span class="keywordflow">switch</span> (usChar) {
-<a name="l00428"></a>00428                 <span class="keywordflow">case</span> UNICODE_ELLIPSIS:
-<a name="l00429"></a>00429                         <span class="keywordflow">return</span> 140;
-<a name="l00430"></a>00430                 <span class="keywordflow">case</span> UNICODE_TRADEMARK_SIGN:
-<a name="l00431"></a>00431                         <span class="keywordflow">return</span> 141;
-<a name="l00432"></a>00432                 <span class="keywordflow">case</span> UNICODE_PER_MILLE_SIGN:
-<a name="l00433"></a>00433                         <span class="keywordflow">return</span> 142;
-<a name="l00434"></a>00434                 <span class="keywordflow">case</span> UNICODE_BULLET:
-<a name="l00435"></a>00435                 <span class="keywordflow">case</span> UNICODE_BULLET_OPERATOR:
-<a name="l00436"></a>00436                 <span class="keywordflow">case</span> UNICODE_BLACK_CLUB_SUIT:
-<a name="l00437"></a>00437                         <span class="keywordflow">return</span> 143;
-<a name="l00438"></a>00438                 <span class="keywordflow">case</span> UNICODE_LEFT_SINGLE_QMARK:
-<a name="l00439"></a>00439                         <span class="keywordflow">return</span> 144;
-<a name="l00440"></a>00440                 <span class="keywordflow">case</span> UNICODE_RIGHT_SINGLE_QMARK:
-<a name="l00441"></a>00441                         <span class="keywordflow">return</span> 145;
-<a name="l00442"></a>00442                 <span class="keywordflow">case</span> UNICODE_SINGLE_LEFT_ANGLE_QMARK:
-<a name="l00443"></a>00443                         <span class="keywordflow">return</span> 146;
-<a name="l00444"></a>00444                 <span class="keywordflow">case</span> UNICODE_SINGLE_RIGHT_ANGLE_QMARK:
-<a name="l00445"></a>00445                         <span class="keywordflow">return</span> 147;
-<a name="l00446"></a>00446                 <span class="keywordflow">case</span> UNICODE_LEFT_DOUBLE_QMARK:
-<a name="l00447"></a>00447                         <span class="keywordflow">return</span> 148;
-<a name="l00448"></a>00448                 <span class="keywordflow">case</span> UNICODE_RIGHT_DOUBLE_QMARK:
-<a name="l00449"></a>00449                         <span class="keywordflow">return</span> 149;
-<a name="l00450"></a>00450                 <span class="keywordflow">case</span> UNICODE_DOUBLE_LOW_9_QMARK:
-<a name="l00451"></a>00451                         <span class="keywordflow">return</span> 150;
-<a name="l00452"></a>00452                 <span class="keywordflow">case</span> UNICODE_EN_DASH:
-<a name="l00453"></a>00453                         <span class="keywordflow">return</span> 151;
-<a name="l00454"></a>00454                 <span class="keywordflow">case</span> UNICODE_EM_DASH:
-<a name="l00455"></a>00455                         <span class="keywordflow">return</span> 152;
-<a name="l00456"></a>00456                 <span class="keywordflow">case</span> UNICODE_MINUS_SIGN:
-<a name="l00457"></a>00457                         <span class="keywordflow">return</span> 153;
-<a name="l00458"></a>00458                 <span class="keywordflow">case</span> UNICODE_CAPITAL_LIGATURE_OE:
-<a name="l00459"></a>00459                         <span class="keywordflow">return</span> 154;
-<a name="l00460"></a>00460                 <span class="keywordflow">case</span> UNICODE_SMALL_LIGATURE_OE:
-<a name="l00461"></a>00461                         <span class="keywordflow">return</span> 155;
-<a name="l00462"></a>00462                 <span class="keywordflow">case</span> UNICODE_DAGGER:
-<a name="l00463"></a>00463                         <span class="keywordflow">return</span> 156;
-<a name="l00464"></a>00464                 <span class="keywordflow">case</span> UNICODE_DOUBLE_DAGGER:
-<a name="l00465"></a>00465                         <span class="keywordflow">return</span> 157;
-<a name="l00466"></a>00466                 <span class="keywordflow">case</span> UNICODE_SMALL_LIGATURE_FI:
-<a name="l00467"></a>00467                         <span class="keywordflow">return</span> 158;
-<a name="l00468"></a>00468                 <span class="keywordflow">case</span> UNICODE_SMALL_LIGATURE_FL:
-<a name="l00469"></a>00469                         <span class="keywordflow">return</span> 159;
-<a name="l00470"></a>00470                 <span class="keywordflow">default</span>:
-<a name="l00471"></a>00471                         <span class="keywordflow">break</span>;
-<a name="l00472"></a>00472                 }
-<a name="l00473"></a>00473         }
-<a name="l00474"></a>00474 
-<a name="l00475"></a>00475         <span class="keywordflow">if</span> (eConversionType == conversion_pdf) {
-<a name="l00476"></a>00476                 <span class="keywordflow">if</span> (eEncoding == encoding_latin_1) {
-<a name="l00477"></a>00477                         <span class="keywordflow">switch</span> (usChar) {
-<a name="l00478"></a>00478                         <span class="keywordflow">case</span> UNICODE_EURO_SIGN:
-<a name="l00479"></a>00479                                 <span class="keywordflow">return</span> 128;
-<a name="l00480"></a>00480                         <span class="keywordflow">default</span>:
-<a name="l00481"></a>00481                                 <span class="keywordflow">break</span>;
-<a name="l00482"></a>00482                         }
-<a name="l00483"></a>00483                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (eEncoding == encoding_latin_2) {
-<a name="l00484"></a>00484                         <span class="keywordflow">switch</span> (usChar) {
-<a name="l00485"></a>00485                         <span class="keywordflow">case</span> UNICODE_CAPITAL_D_WITH_STROKE:
-<a name="l00486"></a>00486                         <span class="keywordflow">case</span> UNICODE_SMALL_D_WITH_STROKE:
-<a name="l00487"></a>00487                                 <span class="keywordflow">return</span> 0x3f;
-<a name="l00488"></a>00488                         <span class="keywordflow">default</span>:
-<a name="l00489"></a>00489                                 <span class="keywordflow">break</span>;
-<a name="l00490"></a>00490                         }
-<a name="l00491"></a>00491                 }
-<a name="l00492"></a>00492         }
-<a name="l00493"></a>00493 
-<a name="l00494"></a>00494         <span class="keywordflow">if</span> (usChar &lt; 0x80) {
-<a name="l00495"></a>00495                 <span class="comment">/* US ASCII */</span>
-<a name="l00496"></a>00496                 <span class="keywordflow">if</span> (usChar &lt; 0x20 || usChar == 0x7f) {
-<a name="l00497"></a>00497                         <span class="comment">/* Ignore control characters */</span>
-<a name="l00498"></a>00498                         DBG_HEX(usChar);
-<a name="l00499"></a>00499                         DBG_FIXME();
-<a name="l00500"></a>00500                         <span class="keywordflow">return</span> IGNORE_CHARACTER;
-<a name="l00501"></a>00501                 }
-<a name="l00502"></a>00502                 <span class="keywordflow">return</span> (ULONG)usChar;
-<a name="l00503"></a>00503         }
-<a name="l00504"></a>00504 
-<a name="l00505"></a>00505         <span class="keywordflow">if</span> (eEncoding == encoding_utf_8) {
-<a name="l00506"></a>00506                 <span class="comment">/* No need to convert Unicode characters */</span>
-<a name="l00507"></a>00507                 <span class="keywordflow">return</span> (ULONG)usChar;
-<a name="l00508"></a>00508         }
-<a name="l00509"></a>00509 
-<a name="l00510"></a>00510         <span class="comment">/* Unicode to local representation */</span>
-<a name="l00511"></a>00511         pTmp = pGetCharTableRecord(usChar);
-<a name="l00512"></a>00512         <span class="keywordflow">if</span> (pTmp != NULL) {
-<a name="l00513"></a>00513                 DBG_HEX_C(usChar &gt;= 0x7f &amp;&amp; usChar &lt;= 0x9f, usChar);
-<a name="l00514"></a>00514                 <span class="keywordflow">return</span> (ULONG)pTmp-&gt;ucLocal;
-<a name="l00515"></a>00515         }
-<a name="l00516"></a>00516 
-<a name="l00517"></a>00517         <span class="comment">/* Fancy characters to simple US ASCII */</span>
-<a name="l00518"></a>00518         <span class="keywordflow">switch</span> (usChar) {
-<a name="l00519"></a>00519         <span class="keywordflow">case</span> UNICODE_SMALL_F_HOOK:
-<a name="l00520"></a>00520                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;f&#39;</span>;
-<a name="l00521"></a>00521         <span class="keywordflow">case</span> UNICODE_GREEK_CAPITAL_CHI:
-<a name="l00522"></a>00522                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;X&#39;</span>;
-<a name="l00523"></a>00523         <span class="keywordflow">case</span> UNICODE_GREEK_SMALL_UPSILON:
-<a name="l00524"></a>00524                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;v&#39;</span>;
-<a name="l00525"></a>00525         <span class="keywordflow">case</span> UNICODE_MODIFIER_CIRCUMFLEX:
-<a name="l00526"></a>00526         <span class="keywordflow">case</span> UNICODE_UPWARDS_ARROW:
-<a name="l00527"></a>00527                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;^&#39;</span>;
-<a name="l00528"></a>00528         <span class="keywordflow">case</span> UNICODE_SMALL_TILDE:
-<a name="l00529"></a>00529         <span class="keywordflow">case</span> UNICODE_TILDE_OPERATOR:
-<a name="l00530"></a>00530                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;~&#39;</span>;
-<a name="l00531"></a>00531         <span class="keywordflow">case</span> UNICODE_EN_QUAD:
-<a name="l00532"></a>00532         <span class="keywordflow">case</span> UNICODE_EM_QUAD:
-<a name="l00533"></a>00533         <span class="keywordflow">case</span> UNICODE_EN_SPACE:
-<a name="l00534"></a>00534         <span class="keywordflow">case</span> UNICODE_EM_SPACE:
-<a name="l00535"></a>00535         <span class="keywordflow">case</span> UNICODE_THREE_PER_EM_SPACE:
-<a name="l00536"></a>00536         <span class="keywordflow">case</span> UNICODE_FOUR_PER_EM_SPACE:
-<a name="l00537"></a>00537         <span class="keywordflow">case</span> UNICODE_SIX_PER_EM_SPACE:
-<a name="l00538"></a>00538         <span class="keywordflow">case</span> UNICODE_FIGURE_SPACE:
-<a name="l00539"></a>00539         <span class="keywordflow">case</span> UNICODE_PUNCTUATION_SPACE:
-<a name="l00540"></a>00540         <span class="keywordflow">case</span> UNICODE_THIN_SPACE:
-<a name="l00541"></a>00541         <span class="keywordflow">case</span> UNICODE_NARROW_NO_BREAK_SPACE:
-<a name="l00542"></a>00542         <span class="keywordflow">case</span> UNICODE_LIGHT_SHADE:
-<a name="l00543"></a>00543         <span class="keywordflow">case</span> UNICODE_MEDIUM_SHADE:
-<a name="l00544"></a>00544         <span class="keywordflow">case</span> UNICODE_DARK_SHADE:
-<a name="l00545"></a>00545                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39; &#39;</span>;
-<a name="l00546"></a>00546         <span class="keywordflow">case</span> UNICODE_LEFT_DOUBLE_QMARK:
-<a name="l00547"></a>00547         <span class="keywordflow">case</span> UNICODE_RIGHT_DOUBLE_QMARK:
-<a name="l00548"></a>00548         <span class="keywordflow">case</span> UNICODE_DOUBLE_LOW_9_QMARK:
-<a name="l00549"></a>00549         <span class="keywordflow">case</span> UNICODE_DOUBLE_HIGH_REV_9_QMARK:
-<a name="l00550"></a>00550         <span class="keywordflow">case</span> UNICODE_DOUBLE_PRIME:
-<a name="l00551"></a>00551                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;&quot;&#39;</span>;
-<a name="l00552"></a>00552         <span class="keywordflow">case</span> UNICODE_LEFT_SINGLE_QMARK:
-<a name="l00553"></a>00553         <span class="keywordflow">case</span> UNICODE_RIGHT_SINGLE_QMARK:
-<a name="l00554"></a>00554         <span class="keywordflow">case</span> UNICODE_SINGLE_LOW_9_QMARK:
-<a name="l00555"></a>00555         <span class="keywordflow">case</span> UNICODE_SINGLE_HIGH_REV_9_QMARK:
-<a name="l00556"></a>00556         <span class="keywordflow">case</span> UNICODE_PRIME:
-<a name="l00557"></a>00557                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;\&#39;&#39;</span>;
-<a name="l00558"></a>00558         <span class="keywordflow">case</span> UNICODE_HYPHEN:
-<a name="l00559"></a>00559         <span class="keywordflow">case</span> UNICODE_NON_BREAKING_HYPHEN:
-<a name="l00560"></a>00560         <span class="keywordflow">case</span> UNICODE_FIGURE_DASH:
-<a name="l00561"></a>00561         <span class="keywordflow">case</span> UNICODE_EN_DASH:
-<a name="l00562"></a>00562         <span class="keywordflow">case</span> UNICODE_EM_DASH:
-<a name="l00563"></a>00563         <span class="keywordflow">case</span> UNICODE_HORIZONTAL_BAR:
-<a name="l00564"></a>00564         <span class="keywordflow">case</span> UNICODE_MINUS_SIGN:
-<a name="l00565"></a>00565         <span class="keywordflow">case</span> UNICODE_BD_LIGHT_HORIZONTAL:
-<a name="l00566"></a>00566         <span class="keywordflow">case</span> UNICODE_BD_DOUBLE_HORIZONTAL:
-<a name="l00567"></a>00567                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;-&#39;</span>;
-<a name="l00568"></a>00568         <span class="keywordflow">case</span> UNICODE_DOUBLE_VERTICAL_LINE:
-<a name="l00569"></a>00569         <span class="keywordflow">case</span> UNICODE_BD_LIGHT_VERTICAL:
-<a name="l00570"></a>00570         <span class="keywordflow">case</span> UNICODE_BD_DOUBLE_VERTICAL:
-<a name="l00571"></a>00571                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;|&#39;</span>;
-<a name="l00572"></a>00572         <span class="keywordflow">case</span> UNICODE_DOUBLE_LOW_LINE:
-<a name="l00573"></a>00573                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;_&#39;</span>;
-<a name="l00574"></a>00574         <span class="keywordflow">case</span> UNICODE_DAGGER:
-<a name="l00575"></a>00575                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;+&#39;</span>;
-<a name="l00576"></a>00576         <span class="keywordflow">case</span> UNICODE_DOUBLE_DAGGER:
-<a name="l00577"></a>00577                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;#&#39;</span>;
-<a name="l00578"></a>00578         <span class="keywordflow">case</span> UNICODE_BULLET:
-<a name="l00579"></a>00579         <span class="keywordflow">case</span> UNICODE_BULLET_OPERATOR:
-<a name="l00580"></a>00580         <span class="keywordflow">case</span> UNICODE_BLACK_CLUB_SUIT:
-<a name="l00581"></a>00581                 <span class="keywordflow">return</span> (ULONG)ucGetBulletCharacter(eConversionType, eEncoding);
-<a name="l00582"></a>00582         <span class="keywordflow">case</span> UNICODE_ONE_DOT_LEADER:
-<a name="l00583"></a>00583         <span class="keywordflow">case</span> UNICODE_TWO_DOT_LEADER:
-<a name="l00584"></a>00584                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;.&#39;</span>;
-<a name="l00585"></a>00585         <span class="keywordflow">case</span> UNICODE_ELLIPSIS:
-<a name="l00586"></a>00586 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00587"></a>00587 <span class="preprocessor"></span>                <span class="keywordflow">return</span> (ULONG)OUR_ELLIPSIS;
-<a name="l00588"></a>00588 <span class="preprocessor">#else</span>
-<a name="l00589"></a>00589 <span class="preprocessor"></span>                <span class="keywordflow">if</span> (ulFileOffset == 0) {
-<a name="l00590"></a>00590                         <span class="keywordflow">return</span> (ULONG)OUR_ELLIPSIS;
-<a name="l00591"></a>00591                 }
-<a name="l00592"></a>00592                 <span class="keywordflow">return</span> UNICODE_ELLIPSIS;
-<a name="l00593"></a>00593 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00594"></a>00594         <span class="keywordflow">case</span> UNICODE_DOUBLE_LEFT_ANGLE_QMARK:
-<a name="l00595"></a>00595         <span class="keywordflow">case</span> UNICODE_TRIANGULAR_BULLET:
-<a name="l00596"></a>00596         <span class="keywordflow">case</span> UNICODE_SINGLE_LEFT_ANGLE_QMARK:
-<a name="l00597"></a>00597         <span class="keywordflow">case</span> UNICODE_LEFTWARDS_ARROW:
-<a name="l00598"></a>00598                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;&lt;&#39;</span>;
-<a name="l00599"></a>00599         <span class="keywordflow">case</span> UNICODE_DOUBLE_RIGHT_ANGLE_QMARK:
-<a name="l00600"></a>00600         <span class="keywordflow">case</span> UNICODE_SINGLE_RIGHT_ANGLE_QMARK:
-<a name="l00601"></a>00601         <span class="keywordflow">case</span> UNICODE_RIGHTWARDS_ARROW:
-<a name="l00602"></a>00602                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;&gt;&#39;</span>;
-<a name="l00603"></a>00603         <span class="keywordflow">case</span> UNICODE_UNDERTIE:
-<a name="l00604"></a>00604                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;-&#39;</span>;
-<a name="l00605"></a>00605         <span class="keywordflow">case</span> UNICODE_N_ARY_SUMMATION:
-<a name="l00606"></a>00606                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;S&#39;</span>;
-<a name="l00607"></a>00607         <span class="keywordflow">case</span> UNICODE_EURO_SIGN:
-<a name="l00608"></a>00608                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;E&#39;</span>;
-<a name="l00609"></a>00609         <span class="keywordflow">case</span> UNICODE_CIRCLE:
-<a name="l00610"></a>00610         <span class="keywordflow">case</span> UNICODE_SQUARE:
-<a name="l00611"></a>00611                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;O&#39;</span>;
-<a name="l00612"></a>00612         <span class="keywordflow">case</span> UNICODE_DIAMOND:
-<a name="l00613"></a>00613                 <span class="keywordflow">return</span> (ULONG)OUR_DIAMOND;
-<a name="l00614"></a>00614         <span class="keywordflow">case</span> UNICODE_NUMERO_SIGN:
-<a name="l00615"></a>00615                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;N&#39;</span>;
-<a name="l00616"></a>00616         <span class="keywordflow">case</span> UNICODE_KELVIN_SIGN:
-<a name="l00617"></a>00617                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;K&#39;</span>;
-<a name="l00618"></a>00618         <span class="keywordflow">case</span> UNICODE_DOWNWARDS_ARROW:
-<a name="l00619"></a>00619                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;v&#39;</span>;
-<a name="l00620"></a>00620         <span class="keywordflow">case</span> UNICODE_FRACTION_SLASH:
-<a name="l00621"></a>00621         <span class="keywordflow">case</span> UNICODE_DIVISION_SLASH:
-<a name="l00622"></a>00622                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;/&#39;</span>;
-<a name="l00623"></a>00623         <span class="keywordflow">case</span> UNICODE_ASTERISK_OPERATOR:
-<a name="l00624"></a>00624                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;*&#39;</span>;
-<a name="l00625"></a>00625         <span class="keywordflow">case</span> UNICODE_RATIO:
-<a name="l00626"></a>00626                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;:&#39;</span>;
-<a name="l00627"></a>00627         <span class="keywordflow">case</span> UNICODE_BD_LIGHT_DOWN_RIGHT:
-<a name="l00628"></a>00628         <span class="keywordflow">case</span> UNICODE_BD_LIGHT_DOWN_AND_LEFT:
-<a name="l00629"></a>00629         <span class="keywordflow">case</span> UNICODE_BD_LIGHT_UP_AND_RIGHT:
-<a name="l00630"></a>00630         <span class="keywordflow">case</span> UNICODE_BD_LIGHT_UP_AND_LEFT:
-<a name="l00631"></a>00631         <span class="keywordflow">case</span> UNICODE_BD_LIGHT_VERTICAL_AND_RIGHT:
-<a name="l00632"></a>00632         <span class="keywordflow">case</span> UNICODE_BD_LIGHT_VERTICAL_AND_LEFT:
-<a name="l00633"></a>00633         <span class="keywordflow">case</span> UNICODE_BD_LIGHT_DOWN_AND_HORIZONTAL:
-<a name="l00634"></a>00634         <span class="keywordflow">case</span> UNICODE_BD_LIGHT_UP_AND_HORIZONTAL:
-<a name="l00635"></a>00635         <span class="keywordflow">case</span> UNICODE_BD_LIGHT_VERTICAL_AND_HORIZONTAL:
-<a name="l00636"></a>00636         <span class="keywordflow">case</span> UNICODE_BD_DOUBLE_DOWN_AND_RIGHT:
-<a name="l00637"></a>00637         <span class="keywordflow">case</span> UNICODE_BD_DOUBLE_DOWN_AND_LEFT:
-<a name="l00638"></a>00638         <span class="keywordflow">case</span> UNICODE_BD_DOUBLE_UP_AND_RIGHT:
-<a name="l00639"></a>00639         <span class="keywordflow">case</span> UNICODE_BD_DOUBLE_UP_AND_LEFT:
-<a name="l00640"></a>00640         <span class="keywordflow">case</span> UNICODE_BD_DOUBLE_VERTICAL_AND_RIGHT:
-<a name="l00641"></a>00641         <span class="keywordflow">case</span> UNICODE_BD_DOUBLE_VERTICAL_AND_LEFT:
-<a name="l00642"></a>00642         <span class="keywordflow">case</span> UNICODE_BD_DOUBLE_DOWN_AND_HORIZONTAL:
-<a name="l00643"></a>00643         <span class="keywordflow">case</span> UNICODE_BD_DOUBLE_UP_AND_HORIZONTAL:
-<a name="l00644"></a>00644         <span class="keywordflow">case</span> UNICODE_BD_DOUBLE_VERTICAL_AND_HORIZONTAL:
-<a name="l00645"></a>00645         <span class="keywordflow">case</span> UNICODE_BLACK_SQUARE:
-<a name="l00646"></a>00646                 <span class="keywordflow">return</span> (ULONG)<span class="charliteral">&#39;+&#39;</span>;
-<a name="l00647"></a>00647         <span class="keywordflow">case</span> UNICODE_HAIR_SPACE:
-<a name="l00648"></a>00648         <span class="keywordflow">case</span> UNICODE_ZERO_WIDTH_SPACE:
-<a name="l00649"></a>00649         <span class="keywordflow">case</span> UNICODE_ZERO_WIDTH_NON_JOINER:
-<a name="l00650"></a>00650         <span class="keywordflow">case</span> UNICODE_ZERO_WIDTH_JOINER:
-<a name="l00651"></a>00651         <span class="keywordflow">case</span> UNICODE_LEFT_TO_RIGHT_MARK:
-<a name="l00652"></a>00652         <span class="keywordflow">case</span> UNICODE_RIGHT_TO_LEFT_MARK:
-<a name="l00653"></a>00653         <span class="keywordflow">case</span> UNICODE_LEFT_TO_RIGHT_EMBEDDING:
-<a name="l00654"></a>00654         <span class="keywordflow">case</span> UNICODE_RIGHT_TO_LEFT_EMBEDDING:
-<a name="l00655"></a>00655         <span class="keywordflow">case</span> UNICODE_POP_DIRECTIONAL_FORMATTING:
-<a name="l00656"></a>00656         <span class="keywordflow">case</span> UNICODE_LEFT_TO_RIGHT_OVERRIDE:
-<a name="l00657"></a>00657         <span class="keywordflow">case</span> UNICODE_RIGHT_TO_LEFT_OVERRIDE:
-<a name="l00658"></a>00658         <span class="keywordflow">case</span> UNICODE_ZERO_WIDTH_NO_BREAK_SPACE:
-<a name="l00659"></a>00659                 <span class="keywordflow">return</span> IGNORE_CHARACTER;
-<a name="l00660"></a>00660         <span class="keywordflow">default</span>:
-<a name="l00661"></a>00661                 <span class="keywordflow">break</span>;
-<a name="l00662"></a>00662         }
-<a name="l00663"></a>00663 
-<a name="l00664"></a>00664         <span class="keywordflow">if</span> (usChar == UNICODE_TRADEMARK_SIGN) {
-<a name="l00665"></a>00665                 <span class="comment">/*</span>
-<a name="l00666"></a>00666 <span class="comment">                 * No local representation, it doesn&#39;t look like anything in</span>
-<a name="l00667"></a>00667 <span class="comment">                 * US-ASCII and a question mark does more harm than good.</span>
-<a name="l00668"></a>00668 <span class="comment">                 */</span>
-<a name="l00669"></a>00669                 <span class="keywordflow">return</span> IGNORE_CHARACTER;
-<a name="l00670"></a>00670         }
-<a name="l00671"></a>00671 
-<a name="l00672"></a>00672         <span class="keywordflow">if</span> (usChar &gt;= 0xa0 &amp;&amp; usChar &lt;= 0xff) {
-<a name="l00673"></a>00673                 <span class="comment">/* Before Word 97, Word did&#39;t use Unicode */</span>
-<a name="l00674"></a>00674                 <span class="keywordflow">return</span> (ULONG)usChar;
-<a name="l00675"></a>00675         }
-<a name="l00676"></a>00676 
-<a name="l00677"></a>00677         DBG_HEX_C(usChar &lt; 0x3000 || usChar &gt;= 0xd800, ulFileOffset);
-<a name="l00678"></a>00678         DBG_HEX_C(usChar &lt; 0x3000 || usChar &gt;= 0xd800, usChar);
-<a name="l00679"></a>00679         DBG_MSG_C(usChar &gt;= 0xe000 &amp;&amp; usChar &lt; 0xf900, <span class="stringliteral">&quot;Private Use Area&quot;</span>);
-<a name="l00680"></a>00680 
-<a name="l00681"></a>00681         <span class="comment">/* Untranslated Unicode character */</span>
-<a name="l00682"></a>00682         <span class="keywordflow">return</span> 0x3f;
-<a name="l00683"></a>00683 } <span class="comment">/* end of ulTranslateCharacters */</span>
-<a name="l00684"></a>00684 
-<a name="l00685"></a>00685 <span class="comment">/*</span>
-<a name="l00686"></a>00686 <span class="comment"> * ulToUpper - convert letter to upper case</span>
-<a name="l00687"></a>00687 <span class="comment"> *</span>
-<a name="l00688"></a>00688 <span class="comment"> * This function converts a letter to upper case. Unlike toupper(3) this</span>
-<a name="l00689"></a>00689 <span class="comment"> * function is independent from the settings of locale. This comes in handy</span>
-<a name="l00690"></a>00690 <span class="comment"> * for people who have to read Word documents in more than one language or</span>
-<a name="l00691"></a>00691 <span class="comment"> * contain more than one language.</span>
-<a name="l00692"></a>00692 <span class="comment"> *</span>
-<a name="l00693"></a>00693 <span class="comment"> * returns the converted letter, or ulChar if the conversion was not possible.</span>
-<a name="l00694"></a>00694 <span class="comment"> */</span>
-<a name="l00695"></a>00695 ULONG
-<a name="l00696"></a>00696 ulToUpper(ULONG ulChar)
-<a name="l00697"></a>00697 {
-<a name="l00698"></a>00698         <span class="keywordflow">if</span> (ulChar &lt; 0x80) {
-<a name="l00699"></a>00699                 <span class="comment">/* US ASCII: use standard function */</span>
-<a name="l00700"></a>00700                 <span class="keywordflow">return</span> (ULONG)toupper((<span class="keywordtype">int</span>)ulChar);
-<a name="l00701"></a>00701         }
-<a name="l00702"></a>00702         <span class="keywordflow">if</span> (ulChar &gt;= 0xe0 &amp;&amp; ulChar &lt;= 0xfe &amp;&amp; ulChar != 0xf7) {
-<a name="l00703"></a>00703                 <span class="comment">/*</span>
-<a name="l00704"></a>00704 <span class="comment">                 * Lower case accented characters</span>
-<a name="l00705"></a>00705 <span class="comment">                 * 0xf7 is Division sign; 0xd7 is Multiplication sign</span>
-<a name="l00706"></a>00706 <span class="comment">                 * 0xff is y with diaeresis; 0xdf is Sharp s</span>
-<a name="l00707"></a>00707 <span class="comment">                 */</span>
-<a name="l00708"></a>00708                 <span class="keywordflow">return</span> ulChar &amp; ~0x20;
-<a name="l00709"></a>00709         }
-<a name="l00710"></a>00710 <span class="preprocessor">#if defined(__STDC_ISO_10646__)</span>
-<a name="l00711"></a>00711 <span class="preprocessor"></span>        <span class="comment">/*</span>
-<a name="l00712"></a>00712 <span class="comment">         * If this is ISO C99 and all locales have wchar_t = ISO 10646</span>
-<a name="l00713"></a>00713 <span class="comment">         * (e.g., glibc 2.2 or newer), then use standard function</span>
-<a name="l00714"></a>00714 <span class="comment">         */</span>
-<a name="l00715"></a>00715         <span class="keywordflow">if</span> (ulChar &gt; 0xff) {
-<a name="l00716"></a>00716                 <span class="keywordflow">return</span> (ULONG)towupper((wint_t)ulChar);
-<a name="l00717"></a>00717         }
-<a name="l00718"></a>00718 <span class="preprocessor">#endif </span><span class="comment">/* __STDC_ISO_10646__ */</span>
-<a name="l00719"></a>00719         <span class="keywordflow">return</span> ulChar;
-<a name="l00720"></a>00720 } <span class="comment">/* end of ulToUpper */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/datalist_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,390 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/datalist.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/datalist.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * datalist.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2000-2002 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Build, read and destroy a list of Word data blocks</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;errno.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define EIO             42</span>
-<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00016"></a>00016 
-<a name="l00017"></a>00017 
-<a name="l00018"></a>00018 <span class="comment">/*</span>
-<a name="l00019"></a>00019 <span class="comment"> * Private structure to hide the way the information</span>
-<a name="l00020"></a>00020 <span class="comment"> * is stored from the rest of the program</span>
-<a name="l00021"></a>00021 <span class="comment"> */</span>
-<a name="l00022"></a>00022 <span class="keyword">typedef</span> <span class="keyword">struct </span>data_mem_tag {
-<a name="l00023"></a>00023         data_block_type         tInfo;
-<a name="l00024"></a>00024         <span class="keyword">struct </span>data_mem_tag     *pNext;
-<a name="l00025"></a>00025 } data_mem_type;
-<a name="l00026"></a>00026 
-<a name="l00027"></a>00027 <span class="comment">/* Variable to describe the start of the data block list */</span>
-<a name="l00028"></a>00028 <span class="keyword">static</span> data_mem_type    *pAnchor = NULL;
-<a name="l00029"></a>00029 <span class="comment">/* Variable needed to read the data block list */</span>
-<a name="l00030"></a>00030 <span class="keyword">static</span> data_mem_type    *pBlockLast = NULL;
-<a name="l00031"></a>00031 <span class="comment">/* Variable needed to read the data block list */</span>
-<a name="l00032"></a>00032 <span class="keyword">static</span> data_mem_type    *pBlockCurrent = NULL;
-<a name="l00033"></a>00033 <span class="keyword">static</span> ULONG    ulBlockOffset = 0;
-<a name="l00034"></a>00034 <span class="keyword">static</span> <span class="keywordtype">size_t</span>   tByteNext = 0;
-<a name="l00035"></a>00035 <span class="comment">/* Last block read */</span>
-<a name="l00036"></a>00036 <span class="keyword">static</span> UCHAR    aucBlock[BIG_BLOCK_SIZE];
-<a name="l00037"></a>00037 
-<a name="l00038"></a>00038 
-<a name="l00039"></a>00039 <span class="comment">/*</span>
-<a name="l00040"></a>00040 <span class="comment"> * vDestroyDataBlockList - destroy the data block list</span>
-<a name="l00041"></a>00041 <span class="comment"> */</span>
-<a name="l00042"></a>00042 <span class="keywordtype">void</span>
-<a name="l00043"></a>00043 vDestroyDataBlockList(<span class="keywordtype">void</span>)
-<a name="l00044"></a>00044 {
-<a name="l00045"></a>00045         data_mem_type   *pCurr, *pNext;
-<a name="l00046"></a>00046 
-<a name="l00047"></a>00047         DBG_MSG(<span class="stringliteral">&quot;vDestroyDataBlockList&quot;</span>);
-<a name="l00048"></a>00048 
-<a name="l00049"></a>00049         pCurr = pAnchor;
-<a name="l00050"></a>00050         <span class="keywordflow">while</span> (pCurr != NULL) {
-<a name="l00051"></a>00051                 pNext = pCurr-&gt;pNext;
-<a name="l00052"></a>00052                 pCurr = xfree(pCurr);
-<a name="l00053"></a>00053                 pCurr = pNext;
-<a name="l00054"></a>00054         }
-<a name="l00055"></a>00055         pAnchor = NULL;
-<a name="l00056"></a>00056         <span class="comment">/* Reset all the control variables */</span>
-<a name="l00057"></a>00057         pBlockLast = NULL;
-<a name="l00058"></a>00058         pBlockCurrent = NULL;
-<a name="l00059"></a>00059         ulBlockOffset = 0;
-<a name="l00060"></a>00060         tByteNext = 0;
-<a name="l00061"></a>00061 } <span class="comment">/* end of vDestroyDataBlockList */</span>
-<a name="l00062"></a>00062 
-<a name="l00063"></a>00063 <span class="comment">/*</span>
-<a name="l00064"></a>00064 <span class="comment"> * bAdd2DataBlockList - add an element to the data block list</span>
-<a name="l00065"></a>00065 <span class="comment"> *</span>
-<a name="l00066"></a>00066 <span class="comment"> * Returns TRUE when successful, otherwise FALSE</span>
-<a name="l00067"></a>00067 <span class="comment"> */</span>
-<a name="l00068"></a>00068 BOOL
-<a name="l00069"></a>00069 bAdd2DataBlockList(<span class="keyword">const</span> data_block_type *pDataBlock)
-<a name="l00070"></a>00070 {
-<a name="l00071"></a>00071         data_mem_type   *pListMember;
-<a name="l00072"></a>00072 
-<a name="l00073"></a>00073         fail(pDataBlock == NULL);
-<a name="l00074"></a>00074         fail(pDataBlock-&gt;ulFileOffset == FC_INVALID);
-<a name="l00075"></a>00075         fail(pDataBlock-&gt;ulDataPos == CP_INVALID);
-<a name="l00076"></a>00076         fail(pDataBlock-&gt;ulLength == 0);
-<a name="l00077"></a>00077 
-<a name="l00078"></a>00078         NO_DBG_MSG(<span class="stringliteral">&quot;bAdd2DataBlockList&quot;</span>);
-<a name="l00079"></a>00079         NO_DBG_HEX(pDataBlock-&gt;ulFileOffset);
-<a name="l00080"></a>00080         NO_DBG_HEX(pDataBlock-&gt;ulDataPos);
-<a name="l00081"></a>00081         NO_DBG_HEX(pDataBlock-&gt;ulLength);
-<a name="l00082"></a>00082 
-<a name="l00083"></a>00083         <span class="keywordflow">if</span> (pDataBlock-&gt;ulFileOffset == FC_INVALID ||
-<a name="l00084"></a>00084             pDataBlock-&gt;ulDataPos == CP_INVALID ||
-<a name="l00085"></a>00085             pDataBlock-&gt;ulLength == 0) {
-<a name="l00086"></a>00086                 werr(0, <span class="stringliteral">&quot;Software (datablock) error&quot;</span>);
-<a name="l00087"></a>00087                 <span class="keywordflow">return</span> FALSE;
-<a name="l00088"></a>00088         }
-<a name="l00089"></a>00089         <span class="comment">/* Check for continuous blocks */</span>
-<a name="l00090"></a>00090         <span class="keywordflow">if</span> (pBlockLast != NULL &amp;&amp;
-<a name="l00091"></a>00091             pBlockLast-&gt;tInfo.ulFileOffset +
-<a name="l00092"></a>00092              pBlockLast-&gt;tInfo.ulLength == pDataBlock-&gt;ulFileOffset &amp;&amp;
-<a name="l00093"></a>00093             pBlockLast-&gt;tInfo.ulDataPos +
-<a name="l00094"></a>00094              pBlockLast-&gt;tInfo.ulLength == pDataBlock-&gt;ulDataPos) {
-<a name="l00095"></a>00095                 <span class="comment">/* These are continous blocks */</span>
-<a name="l00096"></a>00096                 pBlockLast-&gt;tInfo.ulLength += pDataBlock-&gt;ulLength;
-<a name="l00097"></a>00097                 <span class="keywordflow">return</span> TRUE;
-<a name="l00098"></a>00098         }
-<a name="l00099"></a>00099         <span class="comment">/* Make a new block */</span>
-<a name="l00100"></a>00100         pListMember = xmalloc(<span class="keyword">sizeof</span>(data_mem_type));
-<a name="l00101"></a>00101         <span class="comment">/* Add the block to the data list */</span>
-<a name="l00102"></a>00102         pListMember-&gt;tInfo = *pDataBlock;
-<a name="l00103"></a>00103         pListMember-&gt;pNext = NULL;
-<a name="l00104"></a>00104         <span class="keywordflow">if</span> (pAnchor == NULL) {
-<a name="l00105"></a>00105                 pAnchor = pListMember;
-<a name="l00106"></a>00106         } <span class="keywordflow">else</span> {
-<a name="l00107"></a>00107                 fail(pBlockLast == NULL);
-<a name="l00108"></a>00108                 pBlockLast-&gt;pNext = pListMember;
-<a name="l00109"></a>00109         }
-<a name="l00110"></a>00110         pBlockLast = pListMember;
-<a name="l00111"></a>00111         <span class="keywordflow">return</span> TRUE;
-<a name="l00112"></a>00112 } <span class="comment">/* end of bAdd2DataBlockList */</span>
-<a name="l00113"></a>00113 
-<a name="l00114"></a>00114 <span class="comment">/*</span>
-<a name="l00115"></a>00115 <span class="comment"> * ulGetDataOffset - get the offset in the data block list</span>
-<a name="l00116"></a>00116 <span class="comment"> *</span>
-<a name="l00117"></a>00117 <span class="comment"> * Get the fileoffset the current position in the data block list</span>
-<a name="l00118"></a>00118 <span class="comment"> */</span>
-<a name="l00119"></a>00119 ULONG
-<a name="l00120"></a>00120 ulGetDataOffset(FILE *pFile)
-<a name="l00121"></a>00121 {
-<a name="l00122"></a>00122         <span class="keywordflow">return</span> pBlockCurrent-&gt;tInfo.ulFileOffset + ulBlockOffset + tByteNext;
-<a name="l00123"></a>00123 } <span class="comment">/* end of ulGetDataOffset */</span>
-<a name="l00124"></a>00124 
-<a name="l00125"></a>00125 <span class="comment">/*</span>
-<a name="l00126"></a>00126 <span class="comment"> * bSetDataOffset - set the offset in the data block list</span>
-<a name="l00127"></a>00127 <span class="comment"> *</span>
-<a name="l00128"></a>00128 <span class="comment"> * Make the given fileoffset the current position in the data block list</span>
-<a name="l00129"></a>00129 <span class="comment"> */</span>
-<a name="l00130"></a>00130 BOOL
-<a name="l00131"></a>00131 bSetDataOffset(FILE *pFile, ULONG ulFileOffset)
-<a name="l00132"></a>00132 {
-<a name="l00133"></a>00133         data_mem_type   *pCurr;
-<a name="l00134"></a>00134         <span class="keywordtype">size_t</span>  tReadLen;
-<a name="l00135"></a>00135 
-<a name="l00136"></a>00136         DBG_HEX(ulFileOffset);
-<a name="l00137"></a>00137 
-<a name="l00138"></a>00138         <span class="keywordflow">for</span> (pCurr = pAnchor; pCurr != NULL; pCurr = pCurr-&gt;pNext) {
-<a name="l00139"></a>00139                 <span class="keywordflow">if</span> (ulFileOffset &lt; pCurr-&gt;tInfo.ulFileOffset ||
-<a name="l00140"></a>00140                     ulFileOffset &gt;= pCurr-&gt;tInfo.ulFileOffset +
-<a name="l00141"></a>00141                      pCurr-&gt;tInfo.ulLength) {
-<a name="l00142"></a>00142                         <span class="comment">/* The file offset is not in this block */</span>
-<a name="l00143"></a>00143                         <span class="keywordflow">continue</span>;
-<a name="l00144"></a>00144                 }
-<a name="l00145"></a>00145                 <span class="comment">/* Compute the maximum number of bytes to read */</span>
-<a name="l00146"></a>00146                 tReadLen = (size_t)(pCurr-&gt;tInfo.ulFileOffset +
-<a name="l00147"></a>00147                                 pCurr-&gt;tInfo.ulLength -
-<a name="l00148"></a>00148                                 ulFileOffset);
-<a name="l00149"></a>00149                 <span class="comment">/* Compute the real number of bytes to read */</span>
-<a name="l00150"></a>00150                 <span class="keywordflow">if</span> (tReadLen &gt; <span class="keyword">sizeof</span>(aucBlock)) {
-<a name="l00151"></a>00151                         tReadLen = <span class="keyword">sizeof</span>(aucBlock);
-<a name="l00152"></a>00152                 }
-<a name="l00153"></a>00153                 <span class="comment">/* Read the bytes */</span>
-<a name="l00154"></a>00154                 <span class="keywordflow">if</span> (!bReadBytes(aucBlock, tReadLen, ulFileOffset, pFile)) {
-<a name="l00155"></a>00155                         <span class="keywordflow">return</span> FALSE;
-<a name="l00156"></a>00156                 }
-<a name="l00157"></a>00157                 <span class="comment">/* Set the control variables */</span>
-<a name="l00158"></a>00158                 pBlockCurrent = pCurr;
-<a name="l00159"></a>00159                 ulBlockOffset = ulFileOffset - pCurr-&gt;tInfo.ulFileOffset;
-<a name="l00160"></a>00160                 tByteNext = 0;
-<a name="l00161"></a>00161                 <span class="keywordflow">return</span> TRUE;
-<a name="l00162"></a>00162         }
-<a name="l00163"></a>00163         <span class="keywordflow">return</span> FALSE;
-<a name="l00164"></a>00164 } <span class="comment">/* end of bSetDataOffset */</span>
-<a name="l00165"></a>00165 
-<a name="l00166"></a>00166 <span class="comment">/*</span>
-<a name="l00167"></a>00167 <span class="comment"> * iNextByte - get the next byte from the data block list</span>
-<a name="l00168"></a>00168 <span class="comment"> */</span>
-<a name="l00169"></a>00169 <span class="keywordtype">int</span>
-<a name="l00170"></a>00170 iNextByte(FILE *pFile)
-<a name="l00171"></a>00171 {
-<a name="l00172"></a>00172         ULONG   ulReadOff;
-<a name="l00173"></a>00173         <span class="keywordtype">size_t</span>  tReadLen;
-<a name="l00174"></a>00174 
-<a name="l00175"></a>00175         fail(pBlockCurrent == NULL);
-<a name="l00176"></a>00176 
-<a name="l00177"></a>00177         <span class="keywordflow">if</span> (tByteNext &gt;= <span class="keyword">sizeof</span>(aucBlock) ||
-<a name="l00178"></a>00178             ulBlockOffset + tByteNext &gt;= pBlockCurrent-&gt;tInfo.ulLength) {
-<a name="l00179"></a>00179                 <span class="keywordflow">if</span> (ulBlockOffset + <span class="keyword">sizeof</span>(aucBlock) &lt;
-<a name="l00180"></a>00180                                         pBlockCurrent-&gt;tInfo.ulLength) {
-<a name="l00181"></a>00181                         <span class="comment">/* Same block, next part */</span>
-<a name="l00182"></a>00182                         ulBlockOffset += <span class="keyword">sizeof</span>(aucBlock);
-<a name="l00183"></a>00183                 } <span class="keywordflow">else</span> {
-<a name="l00184"></a>00184                         <span class="comment">/* Next block, first part */</span>
-<a name="l00185"></a>00185                         pBlockCurrent = pBlockCurrent-&gt;pNext;
-<a name="l00186"></a>00186                         ulBlockOffset = 0;
-<a name="l00187"></a>00187                 }
-<a name="l00188"></a>00188                 <span class="keywordflow">if</span> (pBlockCurrent == NULL) {
-<a name="l00189"></a>00189                         <span class="comment">/* Past the last part of the last block */</span>
-<a name="l00190"></a>00190                         errno = EIO;
-<a name="l00191"></a>00191                         <span class="keywordflow">return</span> EOF;
-<a name="l00192"></a>00192                 }
-<a name="l00193"></a>00193                 tReadLen = (size_t)
-<a name="l00194"></a>00194                                 (pBlockCurrent-&gt;tInfo.ulLength - ulBlockOffset);
-<a name="l00195"></a>00195                 <span class="keywordflow">if</span> (tReadLen &gt; <span class="keyword">sizeof</span>(aucBlock)) {
-<a name="l00196"></a>00196                         tReadLen = <span class="keyword">sizeof</span>(aucBlock);
-<a name="l00197"></a>00197                 }
-<a name="l00198"></a>00198                 ulReadOff = pBlockCurrent-&gt;tInfo.ulFileOffset + ulBlockOffset;
-<a name="l00199"></a>00199                 <span class="keywordflow">if</span> (!bReadBytes(aucBlock, tReadLen, ulReadOff, pFile)) {
-<a name="l00200"></a>00200                         errno = EIO;
-<a name="l00201"></a>00201                         <span class="keywordflow">return</span> EOF;
-<a name="l00202"></a>00202                 }
-<a name="l00203"></a>00203                 tByteNext = 0;
-<a name="l00204"></a>00204         }
-<a name="l00205"></a>00205         <span class="keywordflow">return</span> (<span class="keywordtype">int</span>)aucBlock[tByteNext++];
-<a name="l00206"></a>00206 } <span class="comment">/* end of iNextByte */</span>
-<a name="l00207"></a>00207 
-<a name="l00208"></a>00208 <span class="comment">/*</span>
-<a name="l00209"></a>00209 <span class="comment"> * usNextWord - get the next word from the data block list</span>
-<a name="l00210"></a>00210 <span class="comment"> *</span>
-<a name="l00211"></a>00211 <span class="comment"> * Read a two byte value in Little Endian order, that means MSB last</span>
-<a name="l00212"></a>00212 <span class="comment"> *</span>
-<a name="l00213"></a>00213 <span class="comment"> * All return values can be valid so errno is set in case of error</span>
-<a name="l00214"></a>00214 <span class="comment"> */</span>
-<a name="l00215"></a>00215 USHORT
-<a name="l00216"></a>00216 usNextWord(FILE *pFile)
-<a name="l00217"></a>00217 {
-<a name="l00218"></a>00218         USHORT  usLSB, usMSB;
-<a name="l00219"></a>00219 
-<a name="l00220"></a>00220         usLSB = (USHORT)iNextByte(pFile);
-<a name="l00221"></a>00221         <span class="keywordflow">if</span> (usLSB == (USHORT)EOF) {
-<a name="l00222"></a>00222                 errno = EIO;
-<a name="l00223"></a>00223                 <span class="keywordflow">return</span> (USHORT)EOF;
-<a name="l00224"></a>00224         }
-<a name="l00225"></a>00225         usMSB = (USHORT)iNextByte(pFile);
-<a name="l00226"></a>00226         <span class="keywordflow">if</span> (usMSB == (USHORT)EOF) {
-<a name="l00227"></a>00227                 DBG_MSG(<span class="stringliteral">&quot;usNextWord: Unexpected EOF&quot;</span>);
-<a name="l00228"></a>00228                 errno = EIO;
-<a name="l00229"></a>00229                 <span class="keywordflow">return</span> (USHORT)EOF;
-<a name="l00230"></a>00230         }
-<a name="l00231"></a>00231         <span class="keywordflow">return</span> (usMSB &lt;&lt; 8) | usLSB;
-<a name="l00232"></a>00232 } <span class="comment">/* end of usNextWord */</span>
-<a name="l00233"></a>00233 
-<a name="l00234"></a>00234 <span class="comment">/*</span>
-<a name="l00235"></a>00235 <span class="comment"> * ulNextLong - get the next long from the data block list</span>
-<a name="l00236"></a>00236 <span class="comment"> *</span>
-<a name="l00237"></a>00237 <span class="comment"> * Read a four byte value in Little Endian order, that means MSW last</span>
-<a name="l00238"></a>00238 <span class="comment"> *</span>
-<a name="l00239"></a>00239 <span class="comment"> * All return values can be valid so errno is set in case of error</span>
-<a name="l00240"></a>00240 <span class="comment"> */</span>
-<a name="l00241"></a>00241 ULONG
-<a name="l00242"></a>00242 ulNextLong(FILE *pFile)
-<a name="l00243"></a>00243 {
-<a name="l00244"></a>00244         ULONG   ulLSW, ulMSW;
-<a name="l00245"></a>00245 
-<a name="l00246"></a>00246         ulLSW = (ULONG)usNextWord(pFile);
-<a name="l00247"></a>00247         <span class="keywordflow">if</span> (ulLSW == (ULONG)EOF) {
-<a name="l00248"></a>00248                 errno = EIO;
-<a name="l00249"></a>00249                 <span class="keywordflow">return</span> (ULONG)EOF;
-<a name="l00250"></a>00250         }
-<a name="l00251"></a>00251         ulMSW = (ULONG)usNextWord(pFile);
-<a name="l00252"></a>00252         <span class="keywordflow">if</span> (ulMSW == (ULONG)EOF) {
-<a name="l00253"></a>00253                 DBG_MSG(<span class="stringliteral">&quot;ulNextLong: Unexpected EOF&quot;</span>);
-<a name="l00254"></a>00254                 errno = EIO;
-<a name="l00255"></a>00255                 <span class="keywordflow">return</span> (ULONG)EOF;
-<a name="l00256"></a>00256         }
-<a name="l00257"></a>00257         <span class="keywordflow">return</span> (ulMSW &lt;&lt; 16) | ulLSW;
-<a name="l00258"></a>00258 } <span class="comment">/* end of ulNextLong */</span>
-<a name="l00259"></a>00259 
-<a name="l00260"></a>00260 <span class="comment">/*</span>
-<a name="l00261"></a>00261 <span class="comment"> * usNextWordBE - get the next two byte value</span>
-<a name="l00262"></a>00262 <span class="comment"> *</span>
-<a name="l00263"></a>00263 <span class="comment"> * Read a two byte value in Big Endian order, that means MSB first</span>
-<a name="l00264"></a>00264 <span class="comment"> *</span>
-<a name="l00265"></a>00265 <span class="comment"> * All return values can be valid so errno is set in case of error</span>
-<a name="l00266"></a>00266 <span class="comment"> */</span>
-<a name="l00267"></a>00267 USHORT
-<a name="l00268"></a>00268 usNextWordBE(FILE *pFile)
-<a name="l00269"></a>00269 {
-<a name="l00270"></a>00270         USHORT usLSB, usMSB;
-<a name="l00271"></a>00271 
-<a name="l00272"></a>00272         usMSB = (USHORT)iNextByte(pFile);
-<a name="l00273"></a>00273         <span class="keywordflow">if</span> (usMSB == (USHORT)EOF) {
-<a name="l00274"></a>00274                 errno = EIO;
-<a name="l00275"></a>00275                 <span class="keywordflow">return</span> (USHORT)EOF;
-<a name="l00276"></a>00276         }
-<a name="l00277"></a>00277         usLSB = (USHORT)iNextByte(pFile);
-<a name="l00278"></a>00278         <span class="keywordflow">if</span> (usLSB == (USHORT)EOF) {
-<a name="l00279"></a>00279                 DBG_MSG(<span class="stringliteral">&quot;usNextWordBE: Unexpected EOF&quot;</span>);
-<a name="l00280"></a>00280                 errno = EIO;
-<a name="l00281"></a>00281                 <span class="keywordflow">return</span> (USHORT)EOF;
-<a name="l00282"></a>00282         }
-<a name="l00283"></a>00283         <span class="keywordflow">return</span> (usMSB &lt;&lt; 8) | usLSB;
-<a name="l00284"></a>00284 } <span class="comment">/* end of usNextWordBE */</span>
-<a name="l00285"></a>00285 
-<a name="l00286"></a>00286 <span class="comment">/*</span>
-<a name="l00287"></a>00287 <span class="comment"> * ulNextLongBE - get the next four byte value</span>
-<a name="l00288"></a>00288 <span class="comment"> *</span>
-<a name="l00289"></a>00289 <span class="comment"> * Read a four byte value in Big Endian order, that means MSW first</span>
-<a name="l00290"></a>00290 <span class="comment"> *</span>
-<a name="l00291"></a>00291 <span class="comment"> * All return values can be valid so errno is set in case of error</span>
-<a name="l00292"></a>00292 <span class="comment"> */</span>
-<a name="l00293"></a>00293 ULONG
-<a name="l00294"></a>00294 ulNextLongBE(FILE *pFile)
-<a name="l00295"></a>00295 {
-<a name="l00296"></a>00296         ULONG   ulLSW, ulMSW;
-<a name="l00297"></a>00297 
-<a name="l00298"></a>00298         ulMSW = (ULONG)usNextWordBE(pFile);
-<a name="l00299"></a>00299         <span class="keywordflow">if</span> (ulMSW == (ULONG)EOF) {
-<a name="l00300"></a>00300                 errno = EIO;
-<a name="l00301"></a>00301                 <span class="keywordflow">return</span> (ULONG)EOF;
-<a name="l00302"></a>00302         }
-<a name="l00303"></a>00303         ulLSW = (ULONG)usNextWordBE(pFile);
-<a name="l00304"></a>00304         <span class="keywordflow">if</span> (ulLSW == (ULONG)EOF) {
-<a name="l00305"></a>00305                 DBG_MSG(<span class="stringliteral">&quot;ulNextLongBE: Unexpected EOF&quot;</span>);
-<a name="l00306"></a>00306                 errno = EIO;
-<a name="l00307"></a>00307                 <span class="keywordflow">return</span> (ULONG)EOF;
-<a name="l00308"></a>00308         }
-<a name="l00309"></a>00309         <span class="keywordflow">return</span> (ulMSW &lt;&lt; 16) | ulLSW;
-<a name="l00310"></a>00310 } <span class="comment">/* end of ulNextLongBE */</span>
-<a name="l00311"></a>00311 
-<a name="l00312"></a>00312 <span class="comment">/*</span>
-<a name="l00313"></a>00313 <span class="comment"> * tSkipBytes - skip over the given number of bytes</span>
-<a name="l00314"></a>00314 <span class="comment"> *</span>
-<a name="l00315"></a>00315 <span class="comment"> * Returns the number of skipped bytes</span>
-<a name="l00316"></a>00316 <span class="comment"> */</span>
-<a name="l00317"></a>00317 <span class="keywordtype">size_t</span>
-<a name="l00318"></a>00318 tSkipBytes(FILE *pFile, <span class="keywordtype">size_t</span> tToSkip)
-<a name="l00319"></a>00319 {
-<a name="l00320"></a>00320         <span class="keywordtype">size_t</span>  tToGo, tMaxMove, tMove;
-<a name="l00321"></a>00321 
-<a name="l00322"></a>00322         fail(pFile == NULL);
-<a name="l00323"></a>00323         fail(pBlockCurrent == NULL);
-<a name="l00324"></a>00324 
-<a name="l00325"></a>00325         tToGo = tToSkip;
-<a name="l00326"></a>00326         <span class="keywordflow">while</span> (tToGo != 0) {
-<a name="l00327"></a>00327                 <span class="comment">/* Goto the end of the current block */</span>
-<a name="l00328"></a>00328                 tMaxMove = min(<span class="keyword">sizeof</span>(aucBlock) - tByteNext,
-<a name="l00329"></a>00329                                 (<span class="keywordtype">size_t</span>)(pBlockCurrent-&gt;tInfo.ulLength -
-<a name="l00330"></a>00330                                 ulBlockOffset - tByteNext));
-<a name="l00331"></a>00331                 tMove = min(tMaxMove, tToGo);
-<a name="l00332"></a>00332                 tByteNext += tMove;
-<a name="l00333"></a>00333                 tToGo -= tMove;
-<a name="l00334"></a>00334                 <span class="keywordflow">if</span> (tToGo != 0) {
-<a name="l00335"></a>00335                         <span class="comment">/* Goto the next block */</span>
-<a name="l00336"></a>00336                         <span class="keywordflow">if</span> (iNextByte(pFile) == EOF) {
-<a name="l00337"></a>00337                                 <span class="keywordflow">return</span> tToSkip - tToGo;
-<a name="l00338"></a>00338                         }
-<a name="l00339"></a>00339                         tToGo--;
-<a name="l00340"></a>00340                 }
-<a name="l00341"></a>00341         }
-<a name="l00342"></a>00342         <span class="keywordflow">return</span> tToSkip;
-<a name="l00343"></a>00343 } <span class="comment">/* end of tSkipBytes */</span>
-<a name="l00344"></a>00344 
-<a name="l00345"></a>00345 <span class="comment">/*</span>
-<a name="l00346"></a>00346 <span class="comment"> * Translate  a data position to an offset in the file.</span>
-<a name="l00347"></a>00347 <span class="comment"> * Logical to physical offset.</span>
-<a name="l00348"></a>00348 <span class="comment"> *</span>
-<a name="l00349"></a>00349 <span class="comment"> * Returns:     FC_INVALID: in case of error</span>
-<a name="l00350"></a>00350 <span class="comment"> *              otherwise: the computed file offset</span>
-<a name="l00351"></a>00351 <span class="comment"> */</span>
-<a name="l00352"></a>00352 ULONG
-<a name="l00353"></a>00353 ulDataPos2FileOffset(ULONG ulDataPos)
-<a name="l00354"></a>00354 {
-<a name="l00355"></a>00355         data_mem_type   *pCurr;
-<a name="l00356"></a>00356 
-<a name="l00357"></a>00357         fail(ulDataPos == CP_INVALID);
-<a name="l00358"></a>00358 
-<a name="l00359"></a>00359         <span class="keywordflow">for</span> (pCurr = pAnchor; pCurr != NULL; pCurr = pCurr-&gt;pNext) {
-<a name="l00360"></a>00360                 <span class="keywordflow">if</span> (ulDataPos &lt; pCurr-&gt;tInfo.ulDataPos ||
-<a name="l00361"></a>00361                     ulDataPos &gt;= pCurr-&gt;tInfo.ulDataPos +
-<a name="l00362"></a>00362                      pCurr-&gt;tInfo.ulLength) {
-<a name="l00363"></a>00363                         <span class="comment">/* The data offset is not in this block, try the next */</span>
-<a name="l00364"></a>00364                         <span class="keywordflow">continue</span>;
-<a name="l00365"></a>00365                 }
-<a name="l00366"></a>00366                 <span class="comment">/* The data offset is in the current block */</span>
-<a name="l00367"></a>00367                 <span class="keywordflow">return</span> pCurr-&gt;tInfo.ulFileOffset +
-<a name="l00368"></a>00368                                 ulDataPos -
-<a name="l00369"></a>00369                                 pCurr-&gt;tInfo.ulDataPos;
-<a name="l00370"></a>00370         }
-<a name="l00371"></a>00371         <span class="comment">/* Passed beyond the end of the list */</span>
-<a name="l00372"></a>00372         DBG_HEX_C(ulDataPos != 0, ulDataPos);
-<a name="l00373"></a>00373         <span class="keywordflow">return</span> FC_INVALID;
-<a name="l00374"></a>00374 } <span class="comment">/* end of ulDataPos2FileOffset */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/debug_8h_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/inc/debug.h Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/inc/debug.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * debug.h</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2005 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Macro&#39;s for debuging.</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#if !defined(__debug_h)</span>
-<a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor">#define __debug_h 1</span>
-<a name="l00011"></a>00011 <span class="preprocessor"></span>
-<a name="l00012"></a>00012 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
-<a name="l00013"></a>00013 <span class="preprocessor">#include &lt;ctype.h&gt;</span>
-<a name="l00014"></a>00014 
-<a name="l00015"></a>00015 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00016"></a>00016 <span class="preprocessor"></span>
-<a name="l00017"></a>00017 <span class="preprocessor">#define DBG_MSG(t)      (void)fprintf(stderr,\</span>
-<a name="l00018"></a>00018 <span class="preprocessor">                                &quot;%s[%3d]: %.240s\n&quot;,\</span>
-<a name="l00019"></a>00019 <span class="preprocessor">                                __FILE__, __LINE__, (t))</span>
-<a name="l00020"></a>00020 <span class="preprocessor"></span>
-<a name="l00021"></a>00021 <span class="preprocessor">#define DBG_STRN(t,m)   (void)fprintf(stderr,\</span>
-<a name="l00022"></a>00022 <span class="preprocessor">                                &quot;%s[%3d]: %d &#39;%.*s&#39;\n&quot;,\</span>
-<a name="l00023"></a>00023 <span class="preprocessor">                                __FILE__, __LINE__,\</span>
-<a name="l00024"></a>00024 <span class="preprocessor">                                (int)(m), (int)(m), (const char *)(t))</span>
-<a name="l00025"></a>00025 <span class="preprocessor"></span>
-<a name="l00026"></a>00026 <span class="preprocessor">#define DBG_CHR(m)    (void)fprintf(stderr,\</span>
-<a name="l00027"></a>00027 <span class="preprocessor">                                &quot;%s[%3d]: &quot;#m&quot; = %3d 0x%02x &#39;%c&#39;\n&quot;,\</span>
-<a name="l00028"></a>00028 <span class="preprocessor">                                __FILE__, __LINE__,\</span>
-<a name="l00029"></a>00029 <span class="preprocessor">                                (int)(m), (unsigned int)(unsigned char)(m),\</span>
-<a name="l00030"></a>00030 <span class="preprocessor">                                isprint((int)(unsigned char)(m))?(char)(m):&#39; &#39;)</span>
-<a name="l00031"></a>00031 <span class="preprocessor"></span>
-<a name="l00032"></a>00032 <span class="preprocessor">#define DBG_DEC(m)      (void)fprintf(stderr,\</span>
-<a name="l00033"></a>00033 <span class="preprocessor">                                &quot;%s[%3d]: &quot;#m&quot; = %ld\n&quot;,\</span>
-<a name="l00034"></a>00034 <span class="preprocessor">                                __FILE__, __LINE__, (long)(m))</span>
-<a name="l00035"></a>00035 <span class="preprocessor"></span>
-<a name="l00036"></a>00036 <span class="preprocessor">#define DBG_HEX(m)      (void)fprintf(stderr,\</span>
-<a name="l00037"></a>00037 <span class="preprocessor">                                &quot;%s[%3d]: &quot;#m&quot; = 0x%02lx\n&quot;,\</span>
-<a name="l00038"></a>00038 <span class="preprocessor">                                __FILE__, __LINE__, (unsigned long)(m))</span>
-<a name="l00039"></a>00039 <span class="preprocessor"></span>
-<a name="l00040"></a>00040 <span class="preprocessor">#define DBG_FLT(m)      (void)fprintf(stderr,\</span>
-<a name="l00041"></a>00041 <span class="preprocessor">                                &quot;%s[%3d]: &quot;#m&quot; = %.3f\n&quot;,\</span>
-<a name="l00042"></a>00042 <span class="preprocessor">                                __FILE__, __LINE__, (double)(m))</span>
-<a name="l00043"></a>00043 <span class="preprocessor"></span>
-<a name="l00044"></a>00044 <span class="preprocessor">#define DBG_FIXME()     (void)fprintf(stderr,\</span>
-<a name="l00045"></a>00045 <span class="preprocessor">                                &quot;%s[%3d]: FIXME\n&quot;,\</span>
-<a name="l00046"></a>00046 <span class="preprocessor">                                __FILE__, __LINE__)</span>
-<a name="l00047"></a>00047 <span class="preprocessor"></span>
-<a name="l00048"></a>00048 <span class="preprocessor">#define DBG_PRINT_BLOCK(b,m)    vPrintBlock(__FILE__, __LINE__,(b),(m))</span>
-<a name="l00049"></a>00049 <span class="preprocessor"></span><span class="preprocessor">#define DBG_UNICODE(t)          vPrintUnicode(__FILE__, __LINE__,\</span>
-<a name="l00050"></a>00050 <span class="preprocessor">                                        (const UCHAR *)(t),unilen(t))</span>
-<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor">#define DBG_UNICODE_N(t,m)      vPrintUnicode(__FILE__, __LINE__,\</span>
-<a name="l00052"></a>00052 <span class="preprocessor">                                        (const UCHAR *)(t),(m))</span>
-<a name="l00053"></a>00053 <span class="preprocessor"></span>
-<a name="l00054"></a>00054 <span class="preprocessor">#define DBG_MSG_C(c,t)          do { if (c) DBG_MSG(t); } while(0)</span>
-<a name="l00055"></a>00055 <span class="preprocessor"></span><span class="preprocessor">#define DBG_STRN_C(c,t,m)       do { if (c) DBG_STRN(t,m); } while(0)</span>
-<a name="l00056"></a>00056 <span class="preprocessor"></span><span class="preprocessor">#define DBG_CHR_C(c,m)          do { if (c) DBG_CHR(m); } while(0)</span>
-<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor">#define DBG_DEC_C(c,m)          do { if (c) DBG_DEC(m); } while(0)</span>
-<a name="l00058"></a>00058 <span class="preprocessor"></span><span class="preprocessor">#define DBG_HEX_C(c,m)          do { if (c) DBG_HEX(m); } while(0)</span>
-<a name="l00059"></a>00059 <span class="preprocessor"></span><span class="preprocessor">#define DBG_FLT_C(c,m)          do { if (c) DBG_FLT(m); } while(0)</span>
-<a name="l00060"></a>00060 <span class="preprocessor"></span>
-<a name="l00061"></a>00061 <span class="preprocessor">#else</span>
-<a name="l00062"></a>00062 <span class="preprocessor"></span>
-<a name="l00063"></a>00063 <span class="preprocessor">#define DBG_MSG(t)              </span><span class="comment">/* EMPTY */</span>
-<a name="l00064"></a>00064 <span class="preprocessor">#define DBG_STRN(t,m)           </span><span class="comment">/* EMPTY */</span>
-<a name="l00065"></a>00065 <span class="preprocessor">#define DBG_CHR(m)              </span><span class="comment">/* EMPTY */</span>
-<a name="l00066"></a>00066 <span class="preprocessor">#define DBG_DEC(m)              </span><span class="comment">/* EMPTY */</span>
-<a name="l00067"></a>00067 <span class="preprocessor">#define DBG_HEX(m)              </span><span class="comment">/* EMPTY */</span>
-<a name="l00068"></a>00068 <span class="preprocessor">#define DBG_FLT(m)              </span><span class="comment">/* EMPTY */</span>
-<a name="l00069"></a>00069 
-<a name="l00070"></a>00070 <span class="preprocessor">#define DBG_FIXME()             </span><span class="comment">/* EMPTY */</span>
-<a name="l00071"></a>00071 <span class="preprocessor">#define DBG_PRINT_BLOCK(b,m)    </span><span class="comment">/* EMPTY */</span>
-<a name="l00072"></a>00072 <span class="preprocessor">#define DBG_UNICODE(t)          </span><span class="comment">/* EMPTY */</span>
-<a name="l00073"></a>00073 <span class="preprocessor">#define DBG_UNICODE_N(t,m)      </span><span class="comment">/* EMPTY */</span>
-<a name="l00074"></a>00074 
-<a name="l00075"></a>00075 <span class="preprocessor">#define DBG_MSG_C(c,t)          </span><span class="comment">/* EMPTY */</span>
-<a name="l00076"></a>00076 <span class="preprocessor">#define DBG_STRN_C(c,t,m)       </span><span class="comment">/* EMPTY */</span>
-<a name="l00077"></a>00077 <span class="preprocessor">#define DBG_CHR_C(c,m)          </span><span class="comment">/* EMPTY */</span>
-<a name="l00078"></a>00078 <span class="preprocessor">#define DBG_DEC_C(c,m)          </span><span class="comment">/* EMPTY */</span>
-<a name="l00079"></a>00079 <span class="preprocessor">#define DBG_HEX_C(c,m)          </span><span class="comment">/* EMPTY */</span>
-<a name="l00080"></a>00080 <span class="preprocessor">#define DBG_FLT_C(c,m)          </span><span class="comment">/* EMPTY */</span>
-<a name="l00081"></a>00081 
-<a name="l00082"></a>00082 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00083"></a>00083 
-<a name="l00084"></a>00084 <span class="preprocessor">#define NO_DBG_MSG(t)           </span><span class="comment">/* EMPTY */</span>
-<a name="l00085"></a>00085 <span class="preprocessor">#define NO_DBG_STRN(t,m)        </span><span class="comment">/* EMPTY */</span>
-<a name="l00086"></a>00086 <span class="preprocessor">#define NO_DBG_CHR(m)           </span><span class="comment">/* EMPTY */</span>
-<a name="l00087"></a>00087 <span class="preprocessor">#define NO_DBG_DEC(m)           </span><span class="comment">/* EMPTY */</span>
-<a name="l00088"></a>00088 <span class="preprocessor">#define NO_DBG_HEX(m)           </span><span class="comment">/* EMPTY */</span>
-<a name="l00089"></a>00089 <span class="preprocessor">#define NO_DBG_FLT(m)           </span><span class="comment">/* EMPTY */</span>
-<a name="l00090"></a>00090 
-<a name="l00091"></a>00091 <span class="preprocessor">#define NO_DBG_PRINT_BLOCK(b,m) </span><span class="comment">/* EMPTY */</span>
-<a name="l00092"></a>00092 <span class="preprocessor">#define NO_DBG_UNICODE(t)       </span><span class="comment">/* EMPTY */</span>
-<a name="l00093"></a>00093 <span class="preprocessor">#define NO_DBG_UNICODE_N(t,m)   </span><span class="comment">/* EMPTY */</span>
-<a name="l00094"></a>00094 
-<a name="l00095"></a>00095 <span class="preprocessor">#define NO_DBG_MSG_C(c,t)       </span><span class="comment">/* EMPTY */</span>
-<a name="l00096"></a>00096 <span class="preprocessor">#define NO_DBG_STRN_C(c,t,m)    </span><span class="comment">/* EMPTY */</span>
-<a name="l00097"></a>00097 <span class="preprocessor">#define NO_DBG_CHR_C(c,m)       </span><span class="comment">/* EMPTY */</span>
-<a name="l00098"></a>00098 <span class="preprocessor">#define NO_DBG_DEC_C(c,m)       </span><span class="comment">/* EMPTY */</span>
-<a name="l00099"></a>00099 <span class="preprocessor">#define NO_DBG_HEX_C(c,m)       </span><span class="comment">/* EMPTY */</span>
-<a name="l00100"></a>00100 <span class="preprocessor">#define NO_DBG_FLT_C(c,m)       </span><span class="comment">/* EMPTY */</span>
-<a name="l00101"></a>00101 
-<a name="l00102"></a>00102 <span class="preprocessor">#if defined(TRACE)</span>
-<a name="l00103"></a>00103 <span class="preprocessor"></span>
-<a name="l00104"></a>00104 <span class="preprocessor">#define TRACE_MSG(t)    do {\</span>
-<a name="l00105"></a>00105 <span class="preprocessor">                        (void)fprintf(stderr,\</span>
-<a name="l00106"></a>00106 <span class="preprocessor">                                &quot;%s[%3d]: TRACE:%.40s\n&quot;,\</span>
-<a name="l00107"></a>00107 <span class="preprocessor">                                __FILE__, __LINE__, (t));\</span>
-<a name="l00108"></a>00108 <span class="preprocessor">                        (void)fflush(stderr);\</span>
-<a name="l00109"></a>00109 <span class="preprocessor">                        } while(0)</span>
-<a name="l00110"></a>00110 <span class="preprocessor"></span>
-<a name="l00111"></a>00111 <span class="preprocessor">#else</span>
-<a name="l00112"></a>00112 <span class="preprocessor"></span>
-<a name="l00113"></a>00113 <span class="preprocessor">#define TRACE_MSG(t)            </span><span class="comment">/* EMPTY */</span>
-<a name="l00114"></a>00114 
-<a name="l00115"></a>00115 <span class="preprocessor">#endif </span><span class="comment">/* TRACE */</span>
-<a name="l00116"></a>00116 
-<a name="l00117"></a>00117 <span class="preprocessor">#endif </span><span class="comment">/* !__debug_h */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/depot_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/depot.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/depot.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * depot.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2002 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Functions to compute the depot offset</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00010"></a>00010 
-<a name="l00011"></a>00011 <span class="preprocessor">#define SIZE_RATIO      (BIG_BLOCK_SIZE/SMALL_BLOCK_SIZE)</span>
-<a name="l00012"></a>00012 <span class="preprocessor"></span>
-<a name="l00013"></a>00013 <span class="keyword">static</span> ULONG    *aulSmallBlockList = NULL;
-<a name="l00014"></a>00014 <span class="keyword">static</span> <span class="keywordtype">size_t</span>   tSmallBlockListLen = 0;
-<a name="l00015"></a>00015 
-<a name="l00016"></a>00016 
-<a name="l00017"></a>00017 <span class="comment">/*</span>
-<a name="l00018"></a>00018 <span class="comment"> * vDestroySmallBlockList - destroy the small block list</span>
-<a name="l00019"></a>00019 <span class="comment"> */</span>
-<a name="l00020"></a>00020 <span class="keywordtype">void</span>
-<a name="l00021"></a>00021 vDestroySmallBlockList(<span class="keywordtype">void</span>)
-<a name="l00022"></a>00022 {
-<a name="l00023"></a>00023         DBG_MSG(<span class="stringliteral">&quot;vDestroySmallBlockList&quot;</span>);
-<a name="l00024"></a>00024 
-<a name="l00025"></a>00025         aulSmallBlockList = xfree(aulSmallBlockList);
-<a name="l00026"></a>00026         tSmallBlockListLen = 0;
-<a name="l00027"></a>00027 } <span class="comment">/* end of vDestroySmalBlockList */</span>
-<a name="l00028"></a>00028 
-<a name="l00029"></a>00029 <span class="comment">/*</span>
-<a name="l00030"></a>00030 <span class="comment"> * vCreateSmallBlockList - create the small block list</span>
-<a name="l00031"></a>00031 <span class="comment"> *</span>
-<a name="l00032"></a>00032 <span class="comment"> * returns: TRUE when successful, otherwise FALSE</span>
-<a name="l00033"></a>00033 <span class="comment"> */</span>
-<a name="l00034"></a>00034 BOOL
-<a name="l00035"></a>00035 bCreateSmallBlockList(ULONG ulStartblock, <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen)
-<a name="l00036"></a>00036 {
-<a name="l00037"></a>00037         ULONG   ulTmp;
-<a name="l00038"></a>00038         <span class="keywordtype">size_t</span>  tSize;
-<a name="l00039"></a>00039         <span class="keywordtype">int</span>     iIndex;
-<a name="l00040"></a>00040 
-<a name="l00041"></a>00041         fail(aulSmallBlockList != NULL);
-<a name="l00042"></a>00042         fail(tSmallBlockListLen != 0);
-<a name="l00043"></a>00043         fail(ulStartblock &gt; MAX_BLOCKNUMBER &amp;&amp; ulStartblock != END_OF_CHAIN);
-<a name="l00044"></a>00044         fail(aulBBD == NULL);
-<a name="l00045"></a>00045         fail(tBBDLen == 0);
-<a name="l00046"></a>00046 
-<a name="l00047"></a>00047         <span class="comment">/* Find the length of the small block list */</span>
-<a name="l00048"></a>00048         <span class="keywordflow">for</span> (tSmallBlockListLen = 0, ulTmp = ulStartblock;
-<a name="l00049"></a>00049              tSmallBlockListLen &lt; tBBDLen &amp;&amp; ulTmp != END_OF_CHAIN;
-<a name="l00050"></a>00050              tSmallBlockListLen++, ulTmp = aulBBD[ulTmp]) {
-<a name="l00051"></a>00051                 <span class="keywordflow">if</span> (ulTmp &gt;= (ULONG)tBBDLen) {
-<a name="l00052"></a>00052                         DBG_DEC(ulTmp);
-<a name="l00053"></a>00053                         DBG_DEC(tBBDLen);
-<a name="l00054"></a>00054                         werr(1, <span class="stringliteral">&quot;The Big Block Depot is damaged&quot;</span>);
-<a name="l00055"></a>00055                 }
-<a name="l00056"></a>00056         }
-<a name="l00057"></a>00057         DBG_DEC(tSmallBlockListLen);
-<a name="l00058"></a>00058 
-<a name="l00059"></a>00059         <span class="keywordflow">if</span> (tSmallBlockListLen == 0) {
-<a name="l00060"></a>00060                 <span class="comment">/* There is no small block list */</span>
-<a name="l00061"></a>00061                 fail(ulStartblock != END_OF_CHAIN);
-<a name="l00062"></a>00062                 aulSmallBlockList = NULL;
-<a name="l00063"></a>00063                 <span class="keywordflow">return</span> TRUE;
-<a name="l00064"></a>00064         }
-<a name="l00065"></a>00065 
-<a name="l00066"></a>00066         <span class="comment">/* Create the small block list */</span>
-<a name="l00067"></a>00067         tSize = tSmallBlockListLen * <span class="keyword">sizeof</span>(ULONG);
-<a name="l00068"></a>00068         aulSmallBlockList = xmalloc(tSize);
-<a name="l00069"></a>00069         <span class="keywordflow">for</span> (iIndex = 0, ulTmp = ulStartblock;
-<a name="l00070"></a>00070              iIndex &lt; (int)tBBDLen &amp;&amp; ulTmp != END_OF_CHAIN;
-<a name="l00071"></a>00071              iIndex++, ulTmp = aulBBD[ulTmp]) {
-<a name="l00072"></a>00072                 <span class="keywordflow">if</span> (ulTmp &gt;= (ULONG)tBBDLen) {
-<a name="l00073"></a>00073                         DBG_DEC(ulTmp);
-<a name="l00074"></a>00074                         DBG_DEC(tBBDLen);
-<a name="l00075"></a>00075                         werr(1, <span class="stringliteral">&quot;The Big Block Depot is damaged&quot;</span>);
-<a name="l00076"></a>00076                 }
-<a name="l00077"></a>00077                 aulSmallBlockList[iIndex] = ulTmp;
-<a name="l00078"></a>00078                 NO_DBG_DEC(aulSmallBlockList[iIndex]);
-<a name="l00079"></a>00079         }
-<a name="l00080"></a>00080         <span class="keywordflow">return</span> TRUE;
-<a name="l00081"></a>00081 } <span class="comment">/* end of bCreateSmallBlockList */</span>
-<a name="l00082"></a>00082 
-<a name="l00083"></a>00083 <span class="comment">/*</span>
-<a name="l00084"></a>00084 <span class="comment"> * ulDepotOffset - get the depot offset the block list</span>
-<a name="l00085"></a>00085 <span class="comment"> */</span>
-<a name="l00086"></a>00086 ULONG
-<a name="l00087"></a>00087 ulDepotOffset(ULONG ulIndex, <span class="keywordtype">size_t</span> tBlockSize)
-<a name="l00088"></a>00088 {
-<a name="l00089"></a>00089         ULONG   ulTmp;
-<a name="l00090"></a>00090         <span class="keywordtype">size_t</span>  tTmp;
-<a name="l00091"></a>00091 
-<a name="l00092"></a>00092         fail(ulIndex &gt;= ULONG_MAX / BIG_BLOCK_SIZE);
-<a name="l00093"></a>00093 
-<a name="l00094"></a>00094         <span class="keywordflow">switch</span> (tBlockSize) {
-<a name="l00095"></a>00095         <span class="keywordflow">case</span> BIG_BLOCK_SIZE:
-<a name="l00096"></a>00096                 <span class="keywordflow">return</span> (ulIndex + 1) * BIG_BLOCK_SIZE;
-<a name="l00097"></a>00097         <span class="keywordflow">case</span> SMALL_BLOCK_SIZE:
-<a name="l00098"></a>00098                 tTmp = (size_t)(ulIndex / SIZE_RATIO);
-<a name="l00099"></a>00099                 ulTmp = ulIndex % SIZE_RATIO;
-<a name="l00100"></a>00100                 <span class="keywordflow">if</span> (aulSmallBlockList == NULL ||
-<a name="l00101"></a>00101                     tTmp &gt;= tSmallBlockListLen) {
-<a name="l00102"></a>00102                         DBG_HEX(aulSmallBlockList);
-<a name="l00103"></a>00103                         DBG_DEC(tSmallBlockListLen);
-<a name="l00104"></a>00104                         DBG_DEC(tTmp);
-<a name="l00105"></a>00105                         <span class="keywordflow">return</span> 0;
-<a name="l00106"></a>00106                 }
-<a name="l00107"></a>00107                 <span class="keywordflow">return</span> ((aulSmallBlockList[tTmp] + 1) * SIZE_RATIO +
-<a name="l00108"></a>00108                                 ulTmp) * SMALL_BLOCK_SIZE;
-<a name="l00109"></a>00109         <span class="keywordflow">default</span>:
-<a name="l00110"></a>00110                 DBG_DEC(tBlockSize);
-<a name="l00111"></a>00111                 DBG_FIXME();
-<a name="l00112"></a>00112                 <span class="keywordflow">return</span> 0;
-<a name="l00113"></a>00113         }
-<a name="l00114"></a>00114 } <span class="comment">/* end of ulDepotOffset */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/dib2eps_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,525 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/dib2eps.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/dib2eps.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * dib2eps.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2000-2003 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Functions to translate dib pictures into eps</span>
-<a name="l00007"></a>00007 <span class="comment"> *</span>
-<a name="l00008"></a>00008 <span class="comment"> *================================================================</span>
-<a name="l00009"></a>00009 <span class="comment"> * This part of the software is based on:</span>
-<a name="l00010"></a>00010 <span class="comment"> * The Windows Bitmap Decoder Class part of paintlib</span>
-<a name="l00011"></a>00011 <span class="comment"> * Paintlib is copyright (c) 1996-2000 Ulrich von Zadow</span>
-<a name="l00012"></a>00012 <span class="comment"> *================================================================</span>
-<a name="l00013"></a>00013 <span class="comment"> * The credit should go to him, but all the bugs are mine.</span>
-<a name="l00014"></a>00014 <span class="comment"> */</span>
-<a name="l00015"></a>00015 
-<a name="l00016"></a>00016 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
-<a name="l00017"></a>00017 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00018"></a>00018 
-<a name="l00019"></a>00019 
-<a name="l00020"></a>00020 <span class="comment">/*</span>
-<a name="l00021"></a>00021 <span class="comment"> * vDecode1bpp - decode an uncompressed 1 bit per pixel image</span>
-<a name="l00022"></a>00022 <span class="comment"> */</span>
-<a name="l00023"></a>00023 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00024"></a>00024 vDecode1bpp(FILE *pInFile, FILE *pOutFile, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00025"></a>00025 {
-<a name="l00026"></a>00026         <span class="keywordtype">size_t</span>  tPadding;
-<a name="l00027"></a>00027         <span class="keywordtype">int</span>     iX, iY, iN, iByte, iTmp, iEighthWidth, iUse;
-<a name="l00028"></a>00028 
-<a name="l00029"></a>00029         DBG_MSG(<span class="stringliteral">&quot;vDecode1bpp&quot;</span>);
-<a name="l00030"></a>00030 
-<a name="l00031"></a>00031         fail(pOutFile == NULL);
-<a name="l00032"></a>00032         fail(pImg == NULL);
-<a name="l00033"></a>00033         fail(pImg-&gt;iColorsUsed &lt; 1 || pImg-&gt;iColorsUsed &gt; 2);
-<a name="l00034"></a>00034 
-<a name="l00035"></a>00035         DBG_DEC(pImg-&gt;iWidth);
-<a name="l00036"></a>00036         DBG_DEC(pImg-&gt;iHeight);
-<a name="l00037"></a>00037 
-<a name="l00038"></a>00038         iEighthWidth = (pImg-&gt;iWidth + 7) / 8;
-<a name="l00039"></a>00039         tPadding = (size_t)(ROUND4(iEighthWidth) - iEighthWidth);
-<a name="l00040"></a>00040 
-<a name="l00041"></a>00041         <span class="keywordflow">for</span> (iY = 0; iY &lt; pImg-&gt;iHeight; iY++) {
-<a name="l00042"></a>00042                 <span class="keywordflow">for</span> (iX = 0; iX &lt; iEighthWidth; iX++) {
-<a name="l00043"></a>00043                         iByte = iNextByte(pInFile);
-<a name="l00044"></a>00044                         <span class="keywordflow">if</span> (iByte == EOF) {
-<a name="l00045"></a>00045                                 vASCII85EncodeByte(pOutFile, EOF);
-<a name="l00046"></a>00046                                 <span class="keywordflow">return</span>;
-<a name="l00047"></a>00047                         }
-<a name="l00048"></a>00048                         <span class="keywordflow">if</span> (iX == iEighthWidth - 1 &amp;&amp; pImg-&gt;iWidth % 8 != 0) {
-<a name="l00049"></a>00049                                 iUse = pImg-&gt;iWidth % 8;
-<a name="l00050"></a>00050                         } <span class="keywordflow">else</span> {
-<a name="l00051"></a>00051                                 iUse = 8;
-<a name="l00052"></a>00052                         }
-<a name="l00053"></a>00053                         <span class="keywordflow">for</span> (iN = 0; iN &lt; iUse; iN++) {
-<a name="l00054"></a>00054                                 <span class="keywordflow">switch</span> (iN) {
-<a name="l00055"></a>00055                                 <span class="keywordflow">case</span> 0: iTmp = (iByte &amp; 0x80) / 128; <span class="keywordflow">break</span>;
-<a name="l00056"></a>00056                                 <span class="keywordflow">case</span> 1: iTmp = (iByte &amp; 0x40) / 64; <span class="keywordflow">break</span>;
-<a name="l00057"></a>00057                                 <span class="keywordflow">case</span> 2: iTmp = (iByte &amp; 0x20) / 32; <span class="keywordflow">break</span>;
-<a name="l00058"></a>00058                                 <span class="keywordflow">case</span> 3: iTmp = (iByte &amp; 0x10) / 16; <span class="keywordflow">break</span>;
-<a name="l00059"></a>00059                                 <span class="keywordflow">case</span> 4: iTmp = (iByte &amp; 0x08) / 8; <span class="keywordflow">break</span>;
-<a name="l00060"></a>00060                                 <span class="keywordflow">case</span> 5: iTmp = (iByte &amp; 0x04) / 4; <span class="keywordflow">break</span>;
-<a name="l00061"></a>00061                                 <span class="keywordflow">case</span> 6: iTmp = (iByte &amp; 0x02) / 2; <span class="keywordflow">break</span>;
-<a name="l00062"></a>00062                                 <span class="keywordflow">case</span> 7: iTmp = (iByte &amp; 0x01); <span class="keywordflow">break</span>;
-<a name="l00063"></a>00063                                 <span class="keywordflow">default</span>: iTmp = 0; <span class="keywordflow">break</span>;
-<a name="l00064"></a>00064                                 }
-<a name="l00065"></a>00065                                 vASCII85EncodeByte(pOutFile, iTmp);
-<a name="l00066"></a>00066                         }
-<a name="l00067"></a>00067                 }
-<a name="l00068"></a>00068                 (void)tSkipBytes(pInFile, tPadding);
-<a name="l00069"></a>00069         }
-<a name="l00070"></a>00070         vASCII85EncodeByte(pOutFile, EOF);
-<a name="l00071"></a>00071 } <span class="comment">/* end of vDecode1bpp */</span>
-<a name="l00072"></a>00072 
-<a name="l00073"></a>00073 <span class="comment">/*</span>
-<a name="l00074"></a>00074 <span class="comment"> * vDecode4bpp - decode an uncompressed 4 bits per pixel image</span>
-<a name="l00075"></a>00075 <span class="comment"> */</span>
-<a name="l00076"></a>00076 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00077"></a>00077 vDecode4bpp(FILE *pInFile, FILE *pOutFile, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00078"></a>00078 {
-<a name="l00079"></a>00079         <span class="keywordtype">size_t</span>  tPadding;
-<a name="l00080"></a>00080         <span class="keywordtype">int</span>     iX, iY, iN, iByte, iTmp, iHalfWidth, iUse;
-<a name="l00081"></a>00081 
-<a name="l00082"></a>00082         DBG_MSG(<span class="stringliteral">&quot;vDecode4bpp&quot;</span>);
-<a name="l00083"></a>00083 
-<a name="l00084"></a>00084         fail(pInFile == NULL);
-<a name="l00085"></a>00085         fail(pOutFile == NULL);
-<a name="l00086"></a>00086         fail(pImg == NULL);
-<a name="l00087"></a>00087         fail(pImg-&gt;iColorsUsed &lt; 1 || pImg-&gt;iColorsUsed &gt; 16);
-<a name="l00088"></a>00088 
-<a name="l00089"></a>00089         DBG_DEC(pImg-&gt;iWidth);
-<a name="l00090"></a>00090         DBG_DEC(pImg-&gt;iHeight);
-<a name="l00091"></a>00091 
-<a name="l00092"></a>00092         iHalfWidth = (pImg-&gt;iWidth + 1) / 2;
-<a name="l00093"></a>00093         tPadding = (size_t)(ROUND4(iHalfWidth) - iHalfWidth);
-<a name="l00094"></a>00094 
-<a name="l00095"></a>00095         <span class="keywordflow">for</span> (iY = 0; iY &lt; pImg-&gt;iHeight; iY++) {
-<a name="l00096"></a>00096                 <span class="keywordflow">for</span> (iX = 0; iX &lt; iHalfWidth; iX++) {
-<a name="l00097"></a>00097                         iByte = iNextByte(pInFile);
-<a name="l00098"></a>00098                         <span class="keywordflow">if</span> (iByte == EOF) {
-<a name="l00099"></a>00099                                 vASCII85EncodeByte(pOutFile, EOF);
-<a name="l00100"></a>00100                                 <span class="keywordflow">return</span>;
-<a name="l00101"></a>00101                         }
-<a name="l00102"></a>00102                         <span class="keywordflow">if</span> (iX == iHalfWidth - 1 &amp;&amp; odd(pImg-&gt;iWidth)) {
-<a name="l00103"></a>00103                                 iUse = 1;
-<a name="l00104"></a>00104                         } <span class="keywordflow">else</span> {
-<a name="l00105"></a>00105                                 iUse = 2;
-<a name="l00106"></a>00106                         }
-<a name="l00107"></a>00107                         <span class="keywordflow">for</span> (iN = 0; iN &lt; iUse; iN++) {
-<a name="l00108"></a>00108                                 <span class="keywordflow">if</span> (odd(iN)) {
-<a name="l00109"></a>00109                                         iTmp = iByte &amp; 0x0f;
-<a name="l00110"></a>00110                                 } <span class="keywordflow">else</span> {
-<a name="l00111"></a>00111                                         iTmp = (iByte &amp; 0xf0) / 16;
-<a name="l00112"></a>00112                                 }
-<a name="l00113"></a>00113                                 vASCII85EncodeByte(pOutFile, iTmp);
-<a name="l00114"></a>00114                         }
-<a name="l00115"></a>00115                 }
-<a name="l00116"></a>00116                 (void)tSkipBytes(pInFile, tPadding);
-<a name="l00117"></a>00117         }
-<a name="l00118"></a>00118         vASCII85EncodeByte(pOutFile, EOF);
-<a name="l00119"></a>00119 } <span class="comment">/* end of vDecode4bpp */</span>
-<a name="l00120"></a>00120 
-<a name="l00121"></a>00121 <span class="comment">/*</span>
-<a name="l00122"></a>00122 <span class="comment"> * vDecode8bpp - decode an uncompressed 8 bits per pixel image</span>
-<a name="l00123"></a>00123 <span class="comment"> */</span>
-<a name="l00124"></a>00124 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00125"></a>00125 vDecode8bpp(FILE *pInFile, FILE *pOutFile, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00126"></a>00126 {
-<a name="l00127"></a>00127         <span class="keywordtype">size_t</span>  tPadding;
-<a name="l00128"></a>00128         <span class="keywordtype">int</span>     iX, iY, iByte;
-<a name="l00129"></a>00129 
-<a name="l00130"></a>00130         DBG_MSG(<span class="stringliteral">&quot;vDecode8bpp&quot;</span>);
-<a name="l00131"></a>00131 
-<a name="l00132"></a>00132         fail(pInFile == NULL);
-<a name="l00133"></a>00133         fail(pOutFile == NULL);
-<a name="l00134"></a>00134         fail(pImg == NULL);
-<a name="l00135"></a>00135         fail(pImg-&gt;iColorsUsed &lt; 1 || pImg-&gt;iColorsUsed &gt; 256);
-<a name="l00136"></a>00136 
-<a name="l00137"></a>00137         DBG_DEC(pImg-&gt;iWidth);
-<a name="l00138"></a>00138         DBG_DEC(pImg-&gt;iHeight);
-<a name="l00139"></a>00139 
-<a name="l00140"></a>00140         tPadding = (size_t)(ROUND4(pImg-&gt;iWidth) - pImg-&gt;iWidth);
-<a name="l00141"></a>00141 
-<a name="l00142"></a>00142         <span class="keywordflow">for</span> (iY = 0; iY &lt; pImg-&gt;iHeight; iY++) {
-<a name="l00143"></a>00143                 <span class="keywordflow">for</span> (iX = 0; iX &lt; pImg-&gt;iWidth; iX++) {
-<a name="l00144"></a>00144                         iByte = iNextByte(pInFile);
-<a name="l00145"></a>00145                         <span class="keywordflow">if</span> (iByte == EOF) {
-<a name="l00146"></a>00146                                 vASCII85EncodeByte(pOutFile, EOF);
-<a name="l00147"></a>00147                                 <span class="keywordflow">return</span>;
-<a name="l00148"></a>00148                         }
-<a name="l00149"></a>00149                         vASCII85EncodeByte(pOutFile, iByte);
-<a name="l00150"></a>00150                 }
-<a name="l00151"></a>00151                 (void)tSkipBytes(pInFile, tPadding);
-<a name="l00152"></a>00152         }
-<a name="l00153"></a>00153         vASCII85EncodeByte(pOutFile, EOF);
-<a name="l00154"></a>00154 } <span class="comment">/* end of vDecode8bpp */</span>
-<a name="l00155"></a>00155 
-<a name="l00156"></a>00156 <span class="comment">/*</span>
-<a name="l00157"></a>00157 <span class="comment"> * vDecode24bpp - decode an uncompressed 24 bits per pixel image</span>
-<a name="l00158"></a>00158 <span class="comment"> */</span>
-<a name="l00159"></a>00159 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00160"></a>00160 vDecode24bpp(FILE *pInFile, FILE *pOutFile, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00161"></a>00161 {
-<a name="l00162"></a>00162         <span class="keywordtype">size_t</span>  tPadding;
-<a name="l00163"></a>00163         <span class="keywordtype">int</span>     iX, iY, iBlue, iGreen, iRed, iTripleWidth;
-<a name="l00164"></a>00164 
-<a name="l00165"></a>00165         DBG_MSG(<span class="stringliteral">&quot;vDecode24bpp&quot;</span>);
-<a name="l00166"></a>00166 
-<a name="l00167"></a>00167         fail(pInFile == NULL);
-<a name="l00168"></a>00168         fail(pOutFile == NULL);
-<a name="l00169"></a>00169         fail(pImg == NULL);
-<a name="l00170"></a>00170         fail(!pImg-&gt;bColorImage);
-<a name="l00171"></a>00171 
-<a name="l00172"></a>00172         DBG_DEC(pImg-&gt;iWidth);
-<a name="l00173"></a>00173         DBG_DEC(pImg-&gt;iHeight);
-<a name="l00174"></a>00174 
-<a name="l00175"></a>00175         iTripleWidth = pImg-&gt;iWidth * 3;
-<a name="l00176"></a>00176         tPadding = (size_t)(ROUND4(iTripleWidth) - iTripleWidth);
-<a name="l00177"></a>00177 
-<a name="l00178"></a>00178         <span class="keywordflow">for</span> (iY = 0; iY &lt; pImg-&gt;iHeight; iY++) {
-<a name="l00179"></a>00179                 <span class="keywordflow">for</span> (iX = 0; iX &lt; pImg-&gt;iWidth; iX++) {
-<a name="l00180"></a>00180                         <span class="comment">/* Change from BGR order to RGB order */</span>
-<a name="l00181"></a>00181                         iBlue = iNextByte(pInFile);
-<a name="l00182"></a>00182                         <span class="keywordflow">if</span> (iBlue == EOF) {
-<a name="l00183"></a>00183                                 vASCII85EncodeByte(pOutFile, EOF);
-<a name="l00184"></a>00184                                 <span class="keywordflow">return</span>;
-<a name="l00185"></a>00185                         }
-<a name="l00186"></a>00186                         iGreen = iNextByte(pInFile);
-<a name="l00187"></a>00187                         <span class="keywordflow">if</span> (iGreen == EOF) {
-<a name="l00188"></a>00188                                 vASCII85EncodeByte(pOutFile, EOF);
-<a name="l00189"></a>00189                                 <span class="keywordflow">return</span>;
-<a name="l00190"></a>00190                         }
-<a name="l00191"></a>00191                         iRed = iNextByte(pInFile);
-<a name="l00192"></a>00192                         <span class="keywordflow">if</span> (iRed == EOF) {
-<a name="l00193"></a>00193                                 vASCII85EncodeByte(pOutFile, EOF);
-<a name="l00194"></a>00194                                 <span class="keywordflow">return</span>;
-<a name="l00195"></a>00195                         }
-<a name="l00196"></a>00196                         vASCII85EncodeByte(pOutFile, iRed);
-<a name="l00197"></a>00197                         vASCII85EncodeByte(pOutFile, iGreen);
-<a name="l00198"></a>00198                         vASCII85EncodeByte(pOutFile, iBlue);
-<a name="l00199"></a>00199                 }
-<a name="l00200"></a>00200                 (void)tSkipBytes(pInFile, tPadding);
-<a name="l00201"></a>00201         }
-<a name="l00202"></a>00202         vASCII85EncodeByte(pOutFile, EOF);
-<a name="l00203"></a>00203 } <span class="comment">/* end of vDecode24bpp */</span>
-<a name="l00204"></a>00204 
-<a name="l00205"></a>00205 <span class="comment">/*</span>
-<a name="l00206"></a>00206 <span class="comment"> * vDecodeRle4 - decode a RLE compressed 4 bits per pixel image</span>
-<a name="l00207"></a>00207 <span class="comment"> */</span>
-<a name="l00208"></a>00208 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00209"></a>00209 vDecodeRle4(FILE *pInFile, FILE *pOutFile, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00210"></a>00210 {
-<a name="l00211"></a>00211         <span class="keywordtype">int</span>     iX, iY, iByte, iTmp, iRunLength, iRun;
-<a name="l00212"></a>00212         BOOL    bEOF, bEOL;
-<a name="l00213"></a>00213 
-<a name="l00214"></a>00214         DBG_MSG(<span class="stringliteral">&quot;vDecodeRle4&quot;</span>);
-<a name="l00215"></a>00215 
-<a name="l00216"></a>00216         fail(pInFile == NULL);
-<a name="l00217"></a>00217         fail(pOutFile == NULL);
-<a name="l00218"></a>00218         fail(pImg == NULL);
-<a name="l00219"></a>00219         fail(pImg-&gt;iColorsUsed &lt; 1 || pImg-&gt;iColorsUsed &gt; 16);
-<a name="l00220"></a>00220 
-<a name="l00221"></a>00221         DBG_DEC(pImg-&gt;iWidth);
-<a name="l00222"></a>00222         DBG_DEC(pImg-&gt;iHeight);
-<a name="l00223"></a>00223 
-<a name="l00224"></a>00224         bEOF = FALSE;
-<a name="l00225"></a>00225 
-<a name="l00226"></a>00226         <span class="keywordflow">for</span> (iY =  0; iY &lt; pImg-&gt;iHeight &amp;&amp; !bEOF; iY++) {
-<a name="l00227"></a>00227                 bEOL = FALSE;
-<a name="l00228"></a>00228                 iX = 0;
-<a name="l00229"></a>00229                 <span class="keywordflow">while</span> (!bEOL) {
-<a name="l00230"></a>00230                         iRunLength = iNextByte(pInFile);
-<a name="l00231"></a>00231                         <span class="keywordflow">if</span> (iRunLength == EOF) {
-<a name="l00232"></a>00232                                 vASCII85EncodeByte(pOutFile, EOF);
-<a name="l00233"></a>00233                                 <span class="keywordflow">return</span>;
-<a name="l00234"></a>00234                         }
-<a name="l00235"></a>00235                         <span class="keywordflow">if</span> (iRunLength != 0) {
-<a name="l00236"></a>00236                                 <span class="comment">/*</span>
-<a name="l00237"></a>00237 <span class="comment">                                 * Encoded packet:</span>
-<a name="l00238"></a>00238 <span class="comment">                                 * RunLength pixels, all the &quot;same&quot; value</span>
-<a name="l00239"></a>00239 <span class="comment">                                 */</span>
-<a name="l00240"></a>00240                                 iByte = iNextByte(pInFile);
-<a name="l00241"></a>00241                                 <span class="keywordflow">if</span> (iByte == EOF) {
-<a name="l00242"></a>00242                                         vASCII85EncodeByte(pOutFile, EOF);
-<a name="l00243"></a>00243                                         <span class="keywordflow">return</span>;
-<a name="l00244"></a>00244                                 }
-<a name="l00245"></a>00245                                 <span class="keywordflow">for</span> (iRun = 0; iRun &lt; iRunLength; iRun++) {
-<a name="l00246"></a>00246                                         <span class="keywordflow">if</span> (odd(iRun)) {
-<a name="l00247"></a>00247                                                 iTmp = iByte &amp; 0x0f;
-<a name="l00248"></a>00248                                         } <span class="keywordflow">else</span> {
-<a name="l00249"></a>00249                                                 iTmp = (iByte &amp; 0xf0) / 16;
-<a name="l00250"></a>00250                                         }
-<a name="l00251"></a>00251                                         <span class="keywordflow">if</span> (iX &lt; pImg-&gt;iWidth) {
-<a name="l00252"></a>00252                                                 vASCII85EncodeByte(pOutFile, iTmp);
-<a name="l00253"></a>00253                                         }
-<a name="l00254"></a>00254                                         iX++;
-<a name="l00255"></a>00255                                 }
-<a name="l00256"></a>00256                                 <span class="keywordflow">continue</span>;
-<a name="l00257"></a>00257                         }
-<a name="l00258"></a>00258                         <span class="comment">/* Literal or escape */</span>
-<a name="l00259"></a>00259                         iRunLength = iNextByte(pInFile);
-<a name="l00260"></a>00260                         <span class="keywordflow">if</span> (iRunLength == EOF) {
-<a name="l00261"></a>00261                                 vASCII85EncodeByte(pOutFile, EOF);
-<a name="l00262"></a>00262                                 <span class="keywordflow">return</span>;
-<a name="l00263"></a>00263                         }
-<a name="l00264"></a>00264                         <span class="keywordflow">if</span> (iRunLength == 0) {          <span class="comment">/* End of line escape */</span>
-<a name="l00265"></a>00265                                 bEOL = TRUE;
-<a name="l00266"></a>00266                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (iRunLength == 1) {   <span class="comment">/* End of file escape */</span>
-<a name="l00267"></a>00267                                 bEOF = TRUE;
-<a name="l00268"></a>00268                                 bEOL = TRUE;
-<a name="l00269"></a>00269                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (iRunLength == 2) {   <span class="comment">/* Delta escape */</span>
-<a name="l00270"></a>00270                                 DBG_MSG(<span class="stringliteral">&quot;RLE4: encountered delta escape&quot;</span>);
-<a name="l00271"></a>00271                                 bEOF = TRUE;
-<a name="l00272"></a>00272                                 bEOL = TRUE;
-<a name="l00273"></a>00273                         } <span class="keywordflow">else</span> {                        <span class="comment">/* Literal packet */</span>
-<a name="l00274"></a>00274                                 iByte = 0;
-<a name="l00275"></a>00275                                 <span class="keywordflow">for</span> (iRun = 0; iRun &lt; iRunLength; iRun++) {
-<a name="l00276"></a>00276                                         <span class="keywordflow">if</span> (odd(iRun)) {
-<a name="l00277"></a>00277                                                 iTmp = iByte &amp; 0x0f;
-<a name="l00278"></a>00278                                         } <span class="keywordflow">else</span> {
-<a name="l00279"></a>00279                                                 iByte = iNextByte(pInFile);
-<a name="l00280"></a>00280                                                 <span class="keywordflow">if</span> (iByte == EOF) {
-<a name="l00281"></a>00281                                                         vASCII85EncodeByte(pOutFile, EOF);
-<a name="l00282"></a>00282                                                         <span class="keywordflow">return</span>;
-<a name="l00283"></a>00283                                                 }
-<a name="l00284"></a>00284                                                 iTmp = (iByte &amp; 0xf0) / 16;
-<a name="l00285"></a>00285                                         }
-<a name="l00286"></a>00286                                         <span class="keywordflow">if</span> (iX &lt; pImg-&gt;iWidth) {
-<a name="l00287"></a>00287                                                 vASCII85EncodeByte(pOutFile, iTmp);
-<a name="l00288"></a>00288                                         }
-<a name="l00289"></a>00289                                         iX++;
-<a name="l00290"></a>00290                                 }
-<a name="l00291"></a>00291                                 <span class="comment">/* Padding if the number of bytes is odd */</span>
-<a name="l00292"></a>00292                                 <span class="keywordflow">if</span> (odd((iRunLength + 1) / 2)) {
-<a name="l00293"></a>00293                                         (void)tSkipBytes(pInFile, 1);
-<a name="l00294"></a>00294                                 }
-<a name="l00295"></a>00295                         }
-<a name="l00296"></a>00296                 }
-<a name="l00297"></a>00297                 DBG_DEC_C(iX != pImg-&gt;iWidth, iX);
-<a name="l00298"></a>00298         }
-<a name="l00299"></a>00299         vASCII85EncodeByte(pOutFile, EOF);
-<a name="l00300"></a>00300 } <span class="comment">/* end of vDecodeRle4 */</span>
-<a name="l00301"></a>00301 
-<a name="l00302"></a>00302 <span class="comment">/*</span>
-<a name="l00303"></a>00303 <span class="comment"> * vDecodeRle8 - decode a RLE compressed 8 bits per pixel image</span>
-<a name="l00304"></a>00304 <span class="comment"> */</span>
-<a name="l00305"></a>00305 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00306"></a>00306 vDecodeRle8(FILE *pInFile, FILE *pOutFile, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00307"></a>00307 {
-<a name="l00308"></a>00308         <span class="keywordtype">int</span>     iX, iY, iByte, iRunLength, iRun;
-<a name="l00309"></a>00309         BOOL    bEOF, bEOL;
-<a name="l00310"></a>00310 
-<a name="l00311"></a>00311         DBG_MSG(<span class="stringliteral">&quot;vDecodeRle8&quot;</span>);
-<a name="l00312"></a>00312 
-<a name="l00313"></a>00313         fail(pInFile == NULL);
-<a name="l00314"></a>00314         fail(pOutFile == NULL);
-<a name="l00315"></a>00315         fail(pImg == NULL);
-<a name="l00316"></a>00316         fail(pImg-&gt;iColorsUsed &lt; 1 || pImg-&gt;iColorsUsed &gt; 256);
-<a name="l00317"></a>00317 
-<a name="l00318"></a>00318         DBG_DEC(pImg-&gt;iWidth);
-<a name="l00319"></a>00319         DBG_DEC(pImg-&gt;iHeight);
-<a name="l00320"></a>00320 
-<a name="l00321"></a>00321         bEOF = FALSE;
-<a name="l00322"></a>00322 
-<a name="l00323"></a>00323         <span class="keywordflow">for</span> (iY = 0; iY &lt; pImg-&gt;iHeight &amp;&amp; !bEOF; iY++) {
-<a name="l00324"></a>00324                 bEOL = FALSE;
-<a name="l00325"></a>00325                 iX = 0;
-<a name="l00326"></a>00326                 <span class="keywordflow">while</span> (!bEOL) {
-<a name="l00327"></a>00327                         iRunLength = iNextByte(pInFile);
-<a name="l00328"></a>00328                         <span class="keywordflow">if</span> (iRunLength == EOF) {
-<a name="l00329"></a>00329                                 vASCII85EncodeByte(pOutFile, EOF);
-<a name="l00330"></a>00330                                 <span class="keywordflow">return</span>;
-<a name="l00331"></a>00331                         }
-<a name="l00332"></a>00332                         <span class="keywordflow">if</span> (iRunLength != 0) {
-<a name="l00333"></a>00333                                 <span class="comment">/*</span>
-<a name="l00334"></a>00334 <span class="comment">                                 * Encoded packet:</span>
-<a name="l00335"></a>00335 <span class="comment">                                 * RunLength pixels, all the same value</span>
-<a name="l00336"></a>00336 <span class="comment">                                 */</span>
-<a name="l00337"></a>00337                                 iByte = iNextByte(pInFile);
-<a name="l00338"></a>00338                                 <span class="keywordflow">if</span> (iByte == EOF) {
-<a name="l00339"></a>00339                                         vASCII85EncodeByte(pOutFile, EOF);
-<a name="l00340"></a>00340                                         <span class="keywordflow">return</span>;
-<a name="l00341"></a>00341                                 }
-<a name="l00342"></a>00342                                 <span class="keywordflow">for</span> (iRun = 0; iRun &lt; iRunLength; iRun++) {
-<a name="l00343"></a>00343                                         <span class="keywordflow">if</span> (iX &lt; pImg-&gt;iWidth) {
-<a name="l00344"></a>00344                                                 vASCII85EncodeByte(pOutFile, iByte);
-<a name="l00345"></a>00345                                         }
-<a name="l00346"></a>00346                                         iX++;
-<a name="l00347"></a>00347                                 }
-<a name="l00348"></a>00348                                 <span class="keywordflow">continue</span>;
-<a name="l00349"></a>00349                         }
-<a name="l00350"></a>00350                         <span class="comment">/* Literal or escape */</span>
-<a name="l00351"></a>00351                         iRunLength = iNextByte(pInFile);
-<a name="l00352"></a>00352                         <span class="keywordflow">if</span> (iRunLength == EOF) {
-<a name="l00353"></a>00353                                 vASCII85EncodeByte(pOutFile, EOF);
-<a name="l00354"></a>00354                                 <span class="keywordflow">return</span>;
-<a name="l00355"></a>00355                         }
-<a name="l00356"></a>00356                         <span class="keywordflow">if</span> (iRunLength == 0) {          <span class="comment">/* End of line escape */</span>
-<a name="l00357"></a>00357                                 bEOL = TRUE;
-<a name="l00358"></a>00358                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (iRunLength == 1) {   <span class="comment">/* End of file escape */</span>
-<a name="l00359"></a>00359                                 bEOF = TRUE;
-<a name="l00360"></a>00360                                 bEOL = TRUE;
-<a name="l00361"></a>00361                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (iRunLength == 2) {   <span class="comment">/* Delta escape */</span>
-<a name="l00362"></a>00362                                 DBG_MSG(<span class="stringliteral">&quot;RLE8: encountered delta escape&quot;</span>);
-<a name="l00363"></a>00363                                 bEOF = TRUE;
-<a name="l00364"></a>00364                                 bEOL = TRUE;
-<a name="l00365"></a>00365                         } <span class="keywordflow">else</span> {                        <span class="comment">/* Literal packet */</span>
-<a name="l00366"></a>00366                                 <span class="keywordflow">for</span> (iRun = 0; iRun &lt; iRunLength; iRun++) {
-<a name="l00367"></a>00367                                         iByte = iNextByte(pInFile);
-<a name="l00368"></a>00368                                         <span class="keywordflow">if</span> (iByte == EOF) {
-<a name="l00369"></a>00369                                                 vASCII85EncodeByte(pOutFile, EOF);
-<a name="l00370"></a>00370                                                 <span class="keywordflow">return</span>;
-<a name="l00371"></a>00371                                         }
-<a name="l00372"></a>00372                                         <span class="keywordflow">if</span> (iX &lt; pImg-&gt;iWidth) {
-<a name="l00373"></a>00373                                                 vASCII85EncodeByte(pOutFile, iByte);
-<a name="l00374"></a>00374                                         }
-<a name="l00375"></a>00375                                         iX++;
-<a name="l00376"></a>00376                                 }
-<a name="l00377"></a>00377                                 <span class="comment">/* Padding if the number of bytes is odd */</span>
-<a name="l00378"></a>00378                                 <span class="keywordflow">if</span> (odd(iRunLength)) {
-<a name="l00379"></a>00379                                         (void)tSkipBytes(pInFile, 1);
-<a name="l00380"></a>00380                                 }
-<a name="l00381"></a>00381                         }
-<a name="l00382"></a>00382                 }
-<a name="l00383"></a>00383                 DBG_DEC_C(iX != pImg-&gt;iWidth, iX);
-<a name="l00384"></a>00384         }
-<a name="l00385"></a>00385         vASCII85EncodeByte(pOutFile, EOF);
-<a name="l00386"></a>00386 } <span class="comment">/* end of vDecodeRle8 */</span>
-<a name="l00387"></a>00387 
-<a name="l00388"></a>00388 <span class="comment">/*</span>
-<a name="l00389"></a>00389 <span class="comment"> * vDecodeDIB - decode a dib picture</span>
-<a name="l00390"></a>00390 <span class="comment"> */</span>
-<a name="l00391"></a>00391 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00392"></a>00392 vDecodeDIB(FILE *pInFile, FILE *pOutFile, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00393"></a>00393 {
-<a name="l00394"></a>00394         <span class="keywordtype">size_t</span>  tHeaderSize;
-<a name="l00395"></a>00395 
-<a name="l00396"></a>00396         fail(pInFile == NULL);
-<a name="l00397"></a>00397         fail(pOutFile == NULL);
-<a name="l00398"></a>00398         fail(pImg == NULL);
-<a name="l00399"></a>00399 
-<a name="l00400"></a>00400         <span class="comment">/* Skip the bitmap info header */</span>
-<a name="l00401"></a>00401         tHeaderSize = (size_t)ulNextLong(pInFile);
-<a name="l00402"></a>00402         (void)tSkipBytes(pInFile, tHeaderSize - 4);
-<a name="l00403"></a>00403         <span class="comment">/* Skip the colortable */</span>
-<a name="l00404"></a>00404         <span class="keywordflow">if</span> (pImg-&gt;uiBitsPerComponent &lt;= 8) {
-<a name="l00405"></a>00405                 (void)tSkipBytes(pInFile,
-<a name="l00406"></a>00406                         (<span class="keywordtype">size_t</span>)(pImg-&gt;iColorsUsed *
-<a name="l00407"></a>00407                          ((tHeaderSize &gt; 12) ? 4 : 3)));
-<a name="l00408"></a>00408         }
-<a name="l00409"></a>00409 
-<a name="l00410"></a>00410         <span class="keywordflow">switch</span> (pImg-&gt;uiBitsPerComponent) {
-<a name="l00411"></a>00411         <span class="keywordflow">case</span> 1:
-<a name="l00412"></a>00412                 fail(pImg-&gt;eCompression != compression_none);
-<a name="l00413"></a>00413                 vDecode1bpp(pInFile, pOutFile, pImg);
-<a name="l00414"></a>00414                 <span class="keywordflow">break</span>;
-<a name="l00415"></a>00415         <span class="keywordflow">case</span> 4:
-<a name="l00416"></a>00416                 fail(pImg-&gt;eCompression != compression_none &amp;&amp;
-<a name="l00417"></a>00417                                 pImg-&gt;eCompression != compression_rle4);
-<a name="l00418"></a>00418                 <span class="keywordflow">if</span> (pImg-&gt;eCompression == compression_rle4) {
-<a name="l00419"></a>00419                         vDecodeRle4(pInFile, pOutFile, pImg);
-<a name="l00420"></a>00420                 } <span class="keywordflow">else</span> {
-<a name="l00421"></a>00421                         vDecode4bpp(pInFile, pOutFile, pImg);
-<a name="l00422"></a>00422                 }
-<a name="l00423"></a>00423                 <span class="keywordflow">break</span>;
-<a name="l00424"></a>00424         <span class="keywordflow">case</span> 8:
-<a name="l00425"></a>00425                 fail(pImg-&gt;eCompression != compression_none &amp;&amp;
-<a name="l00426"></a>00426                                 pImg-&gt;eCompression != compression_rle8);
-<a name="l00427"></a>00427                 <span class="keywordflow">if</span> (pImg-&gt;eCompression == compression_rle8) {
-<a name="l00428"></a>00428                         vDecodeRle8(pInFile, pOutFile, pImg);
-<a name="l00429"></a>00429                 } <span class="keywordflow">else</span> {
-<a name="l00430"></a>00430                         vDecode8bpp(pInFile, pOutFile, pImg);
-<a name="l00431"></a>00431                 }
-<a name="l00432"></a>00432                 <span class="keywordflow">break</span>;
-<a name="l00433"></a>00433         <span class="keywordflow">case</span> 24:
-<a name="l00434"></a>00434                 fail(pImg-&gt;eCompression != compression_none);
-<a name="l00435"></a>00435                 vDecode24bpp(pInFile, pOutFile, pImg);
-<a name="l00436"></a>00436                 <span class="keywordflow">break</span>;
-<a name="l00437"></a>00437         <span class="keywordflow">default</span>:
-<a name="l00438"></a>00438                 DBG_DEC(pImg-&gt;uiBitsPerComponent);
-<a name="l00439"></a>00439                 <span class="keywordflow">break</span>;
-<a name="l00440"></a>00440         }
-<a name="l00441"></a>00441 } <span class="comment">/* end of vDecodeDIB */</span>
-<a name="l00442"></a>00442 
-<a name="l00443"></a>00443 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00444"></a>00444 <span class="preprocessor"></span><span class="comment">/*</span>
-<a name="l00445"></a>00445 <span class="comment"> * vCopy2File</span>
-<a name="l00446"></a>00446 <span class="comment"> */</span>
-<a name="l00447"></a>00447 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00448"></a>00448 vCopy2File(FILE *pInFile, ULONG ulFileOffset, <span class="keywordtype">size_t</span> tPictureLen)
-<a name="l00449"></a>00449 {
-<a name="l00450"></a>00450         <span class="keyword">static</span> <span class="keywordtype">int</span>      iPicCounter = 0;
-<a name="l00451"></a>00451         FILE    *pOutFile;
-<a name="l00452"></a>00452         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00453"></a>00453         <span class="keywordtype">int</span>     iTmp;
-<a name="l00454"></a>00454         <span class="keywordtype">char</span>    szFilename[30];
-<a name="l00455"></a>00455 
-<a name="l00456"></a>00456         <span class="keywordflow">if</span> (!bSetDataOffset(pInFile, ulFileOffset)) {
-<a name="l00457"></a>00457                 <span class="keywordflow">return</span>;
-<a name="l00458"></a>00458         }
-<a name="l00459"></a>00459 
-<a name="l00460"></a>00460         sprintf(szFilename, <span class="stringliteral">&quot;/tmp/pic/pic%04d.bmp&quot;</span>, ++iPicCounter);
-<a name="l00461"></a>00461         pOutFile = fopen(szFilename, <span class="stringliteral">&quot;wb&quot;</span>);
-<a name="l00462"></a>00462         <span class="keywordflow">if</span> (pOutFile == NULL) {
-<a name="l00463"></a>00463                 <span class="keywordflow">return</span>;
-<a name="l00464"></a>00464         }
-<a name="l00465"></a>00465         <span class="comment">/* Turn a dib into a bmp by adding a fake 14 byte header */</span>
-<a name="l00466"></a>00466         (void)putc(<span class="charliteral">&#39;B&#39;</span>, pOutFile);
-<a name="l00467"></a>00467         (void)putc(<span class="charliteral">&#39;M&#39;</span>, pOutFile);
-<a name="l00468"></a>00468         <span class="keywordflow">for</span> (iTmp = 0; iTmp &lt; 12; iTmp++) {
-<a name="l00469"></a>00469                 <span class="keywordflow">if</span> (putc(0, pOutFile) == EOF) {
-<a name="l00470"></a>00470                         <span class="keywordflow">break</span>;
-<a name="l00471"></a>00471                 }
-<a name="l00472"></a>00472         }
-<a name="l00473"></a>00473         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tPictureLen; tIndex++) {
-<a name="l00474"></a>00474                 iTmp = iNextByte(pInFile);
-<a name="l00475"></a>00475                 <span class="keywordflow">if</span> (putc(iTmp, pOutFile) == EOF) {
-<a name="l00476"></a>00476                         <span class="keywordflow">break</span>;
-<a name="l00477"></a>00477                 }
-<a name="l00478"></a>00478         }
-<a name="l00479"></a>00479         (void)fclose(pOutFile);
-<a name="l00480"></a>00480 } <span class="comment">/* end of vCopy2File */</span>
-<a name="l00481"></a>00481 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00482"></a>00482 
-<a name="l00483"></a>00483 <span class="comment">/*</span>
-<a name="l00484"></a>00484 <span class="comment"> * bTranslateDIB - translate a DIB picture</span>
-<a name="l00485"></a>00485 <span class="comment"> *</span>
-<a name="l00486"></a>00486 <span class="comment"> * This function translates a picture from dib to eps</span>
-<a name="l00487"></a>00487 <span class="comment"> *</span>
-<a name="l00488"></a>00488 <span class="comment"> * return TRUE when sucessful, otherwise FALSE</span>
-<a name="l00489"></a>00489 <span class="comment"> */</span>
-<a name="l00490"></a>00490 BOOL
-<a name="l00491"></a>00491 bTranslateDIB(diagram_type *pDiag, FILE *pInFile,
-<a name="l00492"></a>00492                 ULONG ulFileOffset, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00493"></a>00493 {
-<a name="l00494"></a>00494 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00495"></a>00495 <span class="preprocessor"></span>        fail(pImg-&gt;tPosition &gt; pImg-&gt;tLength);
-<a name="l00496"></a>00496         vCopy2File(pInFile, ulFileOffset, pImg-&gt;tLength - pImg-&gt;tPosition);
-<a name="l00497"></a>00497 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00498"></a>00498 
-<a name="l00499"></a>00499         <span class="comment">/* Seek to start position of DIB data */</span>
-<a name="l00500"></a>00500         <span class="keywordflow">if</span> (!bSetDataOffset(pInFile, ulFileOffset)) {
-<a name="l00501"></a>00501                 <span class="keywordflow">return</span> FALSE;
-<a name="l00502"></a>00502         }
-<a name="l00503"></a>00503 
-<a name="l00504"></a>00504         vImagePrologue(pDiag, pImg);
-<a name="l00505"></a>00505         vDecodeDIB(pInFile, pDiag-&gt;pOutFile, pImg);
-<a name="l00506"></a>00506         vImageEpilogue(pDiag);
-<a name="l00507"></a>00507 
-<a name="l00508"></a>00508         <span class="keywordflow">return</span> TRUE;
-<a name="l00509"></a>00509 } <span class="comment">/* end of bTranslateDIB */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/dib2sprt_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,613 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/dib2sprt.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/dib2sprt.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * dib2sprt.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2000-2003 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Functions to translate dib pictures into sprites</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;DeskLib:Error.h&quot;</span>
-<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;DeskLib:Sprite.h&quot;</span>
-<a name="l00013"></a>00013 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00014"></a>00014 
-<a name="l00015"></a>00015 <span class="preprocessor">#if 0 </span><span class="comment">/* defined(DEBUG) */</span>
-<a name="l00016"></a>00016 <span class="keyword">static</span> <span class="keywordtype">int</span> iPicCounter = 0;
-<a name="l00017"></a>00017 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00018"></a>00018 
-<a name="l00019"></a>00019 
-<a name="l00020"></a>00020 <span class="comment">/*</span>
-<a name="l00021"></a>00021 <span class="comment"> * iGetByteWidth - compute the number of bytes needed for a row of pixels</span>
-<a name="l00022"></a>00022 <span class="comment"> */</span>
-<a name="l00023"></a>00023 <span class="keyword">static</span> <span class="keywordtype">int</span>
-<a name="l00024"></a>00024 iGetByteWidth(<span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00025"></a>00025 {
-<a name="l00026"></a>00026         <span class="keywordflow">switch</span> (pImg-&gt;uiBitsPerComponent) {
-<a name="l00027"></a>00027         <span class="keywordflow">case</span>  1:
-<a name="l00028"></a>00028                 <span class="keywordflow">return</span> (pImg-&gt;iWidth + 31) / 32 * <span class="keyword">sizeof</span>(int);
-<a name="l00029"></a>00029         <span class="keywordflow">case</span>  4:
-<a name="l00030"></a>00030                 <span class="keywordflow">return</span> (pImg-&gt;iWidth + 7) / 8 * <span class="keyword">sizeof</span>(int);
-<a name="l00031"></a>00031         <span class="keywordflow">case</span>  8:
-<a name="l00032"></a>00032         <span class="keywordflow">case</span> 24:
-<a name="l00033"></a>00033                 <span class="keywordflow">return</span> (pImg-&gt;iWidth + 3) / 4 * <span class="keyword">sizeof</span>(int);
-<a name="l00034"></a>00034         <span class="keywordflow">default</span>:
-<a name="l00035"></a>00035                 DBG_DEC(pImg-&gt;uiBitsPerComponent);
-<a name="l00036"></a>00036                 <span class="keywordflow">return</span> 0;
-<a name="l00037"></a>00037         }
-<a name="l00038"></a>00038 } <span class="comment">/* end of iGetByteWidth */</span>
-<a name="l00039"></a>00039 
-<a name="l00040"></a>00040 <span class="comment">/*</span>
-<a name="l00041"></a>00041 <span class="comment"> * pCreateBlankSprite - Create a blank sprite.</span>
-<a name="l00042"></a>00042 <span class="comment"> *</span>
-<a name="l00043"></a>00043 <span class="comment"> * Create a blank sprite and add a palette if needed</span>
-<a name="l00044"></a>00044 <span class="comment"> *</span>
-<a name="l00045"></a>00045 <span class="comment"> * returns a pointer to the sprite when successful, otherwise NULL</span>
-<a name="l00046"></a>00046 <span class="comment"> */</span>
-<a name="l00047"></a>00047 <span class="keyword">static</span> sprite_areainfo *
-<a name="l00048"></a>00048 pCreateBlankSprite(<span class="keyword">const</span> imagedata_type *pImg, <span class="keywordtype">size_t</span> *pSize)
-<a name="l00049"></a>00049 {
-<a name="l00050"></a>00050         sprite_areainfo *pArea;
-<a name="l00051"></a>00051         UCHAR   *pucTmp;
-<a name="l00052"></a>00052         <span class="keywordtype">size_t</span>  tSize;
-<a name="l00053"></a>00053         screen_modeval  uMode;
-<a name="l00054"></a>00054         <span class="keywordtype">int</span>     iIndex, iPaletteEntries;
-<a name="l00055"></a>00055 
-<a name="l00056"></a>00056         TRACE_MSG(<span class="stringliteral">&quot;pCreateBlankSprite&quot;</span>);
-<a name="l00057"></a>00057 
-<a name="l00058"></a>00058         fail(pImg == NULL);
-<a name="l00059"></a>00059         fail(pSize == NULL);
-<a name="l00060"></a>00060 
-<a name="l00061"></a>00061         <span class="keywordflow">switch</span> (pImg-&gt;uiBitsPerComponent) {
-<a name="l00062"></a>00062         <span class="keywordflow">case</span>  1:
-<a name="l00063"></a>00063                 uMode.screen_mode = 18;
-<a name="l00064"></a>00064                 iPaletteEntries = 2;
-<a name="l00065"></a>00065                 <span class="keywordflow">break</span>;
-<a name="l00066"></a>00066         <span class="keywordflow">case</span>  4:
-<a name="l00067"></a>00067                 uMode.screen_mode = 20;
-<a name="l00068"></a>00068                 iPaletteEntries = 16;
-<a name="l00069"></a>00069                 <span class="keywordflow">break</span>;
-<a name="l00070"></a>00070         <span class="keywordflow">case</span>  8:
-<a name="l00071"></a>00071         <span class="keywordflow">case</span> 24:
-<a name="l00072"></a>00072                 uMode.screen_mode = 21;
-<a name="l00073"></a>00073                 iPaletteEntries = 0;
-<a name="l00074"></a>00074                 <span class="keywordflow">break</span>;
-<a name="l00075"></a>00075         <span class="keywordflow">default</span>:
-<a name="l00076"></a>00076                 DBG_DEC(pImg-&gt;uiBitsPerComponent);
-<a name="l00077"></a>00077                 <span class="keywordflow">return</span> NULL;
-<a name="l00078"></a>00078         }
-<a name="l00079"></a>00079         fail(iPaletteEntries &lt; 0 || iPaletteEntries &gt; 16);
-<a name="l00080"></a>00080 
-<a name="l00081"></a>00081         <span class="comment">/* Get memory for the sprite */</span>
-<a name="l00082"></a>00082         tSize = <span class="keyword">sizeof</span>(sprite_areainfo) +
-<a name="l00083"></a>00083                 Sprite_MemorySize(pImg-&gt;iWidth, pImg-&gt;iHeight, uMode,
-<a name="l00084"></a>00084                 iPaletteEntries &gt; 0 ? sprite_HASPAL : sprite_HASNOMASKPAL);
-<a name="l00085"></a>00085         DBG_DEC(tSize);
-<a name="l00086"></a>00086         pArea = xmalloc(tSize);
-<a name="l00087"></a>00087 
-<a name="l00088"></a>00088         <span class="comment">/* Initialise sprite area */</span>
-<a name="l00089"></a>00089         pArea-&gt;areasize = tSize;
-<a name="l00090"></a>00090         pArea-&gt;numsprites = 0;
-<a name="l00091"></a>00091         pArea-&gt;firstoffset = <span class="keyword">sizeof</span>(sprite_areainfo);
-<a name="l00092"></a>00092         pArea-&gt;freeoffset = <span class="keyword">sizeof</span>(sprite_areainfo);
-<a name="l00093"></a>00093 
-<a name="l00094"></a>00094         <span class="comment">/* Create a blank sprite */</span>
-<a name="l00095"></a>00095         Error_CheckFatal(Sprite_Create(pArea, <span class="stringliteral">&quot;wordimage&quot;</span>,
-<a name="l00096"></a>00096                 iPaletteEntries &gt; 0 ? 1 : 0,
-<a name="l00097"></a>00097                 pImg-&gt;iWidth, pImg-&gt;iHeight, uMode));
-<a name="l00098"></a>00098 
-<a name="l00099"></a>00099         <span class="comment">/* Add the palette */</span>
-<a name="l00100"></a>00100         pucTmp = (UCHAR *)pArea + pArea-&gt;firstoffset + <span class="keyword">sizeof</span>(sprite_header);
-<a name="l00101"></a>00101         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; iPaletteEntries; iIndex++) {
-<a name="l00102"></a>00102                 <span class="comment">/* First color */</span>
-<a name="l00103"></a>00103                 *pucTmp++ = 0;
-<a name="l00104"></a>00104                 *pucTmp++ = pImg-&gt;aucPalette[iIndex][0];
-<a name="l00105"></a>00105                 *pucTmp++ = pImg-&gt;aucPalette[iIndex][1];
-<a name="l00106"></a>00106                 *pucTmp++ = pImg-&gt;aucPalette[iIndex][2];
-<a name="l00107"></a>00107                 <span class="comment">/* Second color */</span>
-<a name="l00108"></a>00108                 *pucTmp++ = 0;
-<a name="l00109"></a>00109                 *pucTmp++ = pImg-&gt;aucPalette[iIndex][0];
-<a name="l00110"></a>00110                 *pucTmp++ = pImg-&gt;aucPalette[iIndex][1];
-<a name="l00111"></a>00111                 *pucTmp++ = pImg-&gt;aucPalette[iIndex][2];
-<a name="l00112"></a>00112         }
-<a name="l00113"></a>00113 
-<a name="l00114"></a>00114         *pSize = tSize;
-<a name="l00115"></a>00115         <span class="keywordflow">return</span> pArea;
-<a name="l00116"></a>00116 } <span class="comment">/* end of pCreateBlankSprite */</span>
-<a name="l00117"></a>00117 
-<a name="l00118"></a>00118 <span class="comment">/*</span>
-<a name="l00119"></a>00119 <span class="comment"> * iReduceColor - reduce from 24 bit to 8 bit color</span>
-<a name="l00120"></a>00120 <span class="comment"> *</span>
-<a name="l00121"></a>00121 <span class="comment"> * Reduce 24 bit true colors to RISC OS default 256 color palette</span>
-<a name="l00122"></a>00122 <span class="comment"> *</span>
-<a name="l00123"></a>00123 <span class="comment"> * returns the resulting color</span>
-<a name="l00124"></a>00124 <span class="comment"> */</span>
-<a name="l00125"></a>00125 <span class="keyword">static</span> <span class="keywordtype">int</span>
-<a name="l00126"></a>00126 iReduceColor(<span class="keywordtype">int</span> iRed, <span class="keywordtype">int</span> iGreen, <span class="keywordtype">int</span> iBlue)
-<a name="l00127"></a>00127 {
-<a name="l00128"></a>00128         <span class="keywordtype">int</span>     iResult;
-<a name="l00129"></a>00129 
-<a name="l00130"></a>00130         iResult = (iBlue &amp; 0x80) ? 0x80 : 0;
-<a name="l00131"></a>00131         iResult |= (iGreen &amp; 0x80) ? 0x40 : 0;
-<a name="l00132"></a>00132         iResult |= (iGreen &amp; 0x40) ? 0x20 : 0;
-<a name="l00133"></a>00133         iResult |= (iRed &amp; 0x80) ? 0x10 : 0;
-<a name="l00134"></a>00134         iResult |= (iBlue &amp; 0x40) ? 0x08 : 0;
-<a name="l00135"></a>00135         iResult |= (iRed &amp; 0x40) ? 0x04 : 0;
-<a name="l00136"></a>00136         iResult |= ((iRed | iGreen | iBlue) &amp; 0x20) ? 0x02 : 0;
-<a name="l00137"></a>00137         iResult |= ((iRed | iGreen | iBlue) &amp; 0x10) ? 0x01 : 0;
-<a name="l00138"></a>00138         <span class="keywordflow">return</span> iResult;
-<a name="l00139"></a>00139 } <span class="comment">/* end of iReduceColor */</span>
-<a name="l00140"></a>00140 
-<a name="l00141"></a>00141 <span class="comment">/*</span>
-<a name="l00142"></a>00142 <span class="comment"> * vDecode1bpp - decode an uncompressed 1 bit per pixel image</span>
-<a name="l00143"></a>00143 <span class="comment"> */</span>
-<a name="l00144"></a>00144 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00145"></a>00145 vDecode1bpp(FILE *pFile, UCHAR *pucData, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00146"></a>00146 {
-<a name="l00147"></a>00147         <span class="keywordtype">int</span>     iX, iY, iByteWidth, iOffset, iTmp, iEighthWidth, iPadding;
-<a name="l00148"></a>00148         UCHAR   ucTmp;
-<a name="l00149"></a>00149 
-<a name="l00150"></a>00150         DBG_MSG(<span class="stringliteral">&quot;vDecode1bpp&quot;</span>);
-<a name="l00151"></a>00151 
-<a name="l00152"></a>00152         fail(pFile == NULL);
-<a name="l00153"></a>00153         fail(pucData == NULL);
-<a name="l00154"></a>00154         fail(pImg == NULL);
-<a name="l00155"></a>00155         fail(pImg-&gt;iColorsUsed &lt; 1 || pImg-&gt;iColorsUsed &gt; 2);
-<a name="l00156"></a>00156 
-<a name="l00157"></a>00157         iByteWidth = iGetByteWidth(pImg);
-<a name="l00158"></a>00158 
-<a name="l00159"></a>00159         iEighthWidth = (pImg-&gt;iWidth + 7) / 8;
-<a name="l00160"></a>00160         iPadding = ROUND4(iEighthWidth) - iEighthWidth;
-<a name="l00161"></a>00161 
-<a name="l00162"></a>00162         <span class="keywordflow">for</span> (iY = pImg-&gt;iHeight - 1; iY &gt;= 0; iY--) {
-<a name="l00163"></a>00163                 <span class="keywordflow">for</span> (iX = 0; iX &lt; iEighthWidth; iX++) {
-<a name="l00164"></a>00164                         iTmp = iNextByte(pFile);
-<a name="l00165"></a>00165                         <span class="keywordflow">if</span> (iTmp == EOF) {
-<a name="l00166"></a>00166                                 <span class="keywordflow">return</span>;
-<a name="l00167"></a>00167                         }
-<a name="l00168"></a>00168                         <span class="comment">/* Reverse the bit order */</span>
-<a name="l00169"></a>00169                         ucTmp  = (iTmp &amp; BIT(0)) ? (UCHAR)BIT(7) : 0;
-<a name="l00170"></a>00170                         ucTmp |= (iTmp &amp; BIT(1)) ? (UCHAR)BIT(6) : 0;
-<a name="l00171"></a>00171                         ucTmp |= (iTmp &amp; BIT(2)) ? (UCHAR)BIT(5) : 0;
-<a name="l00172"></a>00172                         ucTmp |= (iTmp &amp; BIT(3)) ? (UCHAR)BIT(4) : 0;
-<a name="l00173"></a>00173                         ucTmp |= (iTmp &amp; BIT(4)) ? (UCHAR)BIT(3) : 0;
-<a name="l00174"></a>00174                         ucTmp |= (iTmp &amp; BIT(5)) ? (UCHAR)BIT(2) : 0;
-<a name="l00175"></a>00175                         ucTmp |= (iTmp &amp; BIT(6)) ? (UCHAR)BIT(1) : 0;
-<a name="l00176"></a>00176                         ucTmp |= (iTmp &amp; BIT(7)) ? (UCHAR)BIT(0) : 0;
-<a name="l00177"></a>00177                         iOffset = iY * iByteWidth + iX;
-<a name="l00178"></a>00178                         *(pucData + iOffset) = ucTmp;
-<a name="l00179"></a>00179                 }
-<a name="l00180"></a>00180                 (void)tSkipBytes(pFile, iPadding);
-<a name="l00181"></a>00181         }
-<a name="l00182"></a>00182 } <span class="comment">/* end of vDecode1bpp */</span>
-<a name="l00183"></a>00183 
-<a name="l00184"></a>00184 <span class="comment">/*</span>
-<a name="l00185"></a>00185 <span class="comment"> * vDecode4bpp - decode an uncompressed 4 bits per pixel image</span>
-<a name="l00186"></a>00186 <span class="comment"> */</span>
-<a name="l00187"></a>00187 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00188"></a>00188 vDecode4bpp(FILE *pFile, UCHAR *pucData, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00189"></a>00189 {
-<a name="l00190"></a>00190         <span class="keywordtype">int</span>     iX, iY, iByteWidth, iOffset, iTmp, iHalfWidth, iPadding;
-<a name="l00191"></a>00191         UCHAR   ucTmp;
-<a name="l00192"></a>00192 
-<a name="l00193"></a>00193         DBG_MSG(<span class="stringliteral">&quot;vDecode4bpp&quot;</span>);
-<a name="l00194"></a>00194 
-<a name="l00195"></a>00195         fail(pFile == NULL);
-<a name="l00196"></a>00196         fail(pucData == NULL);
-<a name="l00197"></a>00197         fail(pImg == NULL);
-<a name="l00198"></a>00198         fail(pImg-&gt;iColorsUsed &lt; 1 || pImg-&gt;iColorsUsed &gt; 16);
-<a name="l00199"></a>00199 
-<a name="l00200"></a>00200         iByteWidth = iGetByteWidth(pImg);
-<a name="l00201"></a>00201 
-<a name="l00202"></a>00202         iHalfWidth = (pImg-&gt;iWidth + 1) / 2;
-<a name="l00203"></a>00203         iPadding = ROUND4(iHalfWidth) - iHalfWidth;
-<a name="l00204"></a>00204 
-<a name="l00205"></a>00205         <span class="keywordflow">for</span> (iY = pImg-&gt;iHeight - 1; iY &gt;= 0; iY--) {
-<a name="l00206"></a>00206                 <span class="keywordflow">for</span> (iX = 0; iX &lt; iHalfWidth; iX++) {
-<a name="l00207"></a>00207                         iTmp = iNextByte(pFile);
-<a name="l00208"></a>00208                         <span class="keywordflow">if</span> (iTmp == EOF) {
-<a name="l00209"></a>00209                                 <span class="keywordflow">return</span>;
-<a name="l00210"></a>00210                         }
-<a name="l00211"></a>00211                         <span class="comment">/* Reverse the nibble order */</span>
-<a name="l00212"></a>00212                         ucTmp = (iTmp &amp; 0xf0) &gt;&gt; 4;
-<a name="l00213"></a>00213                         ucTmp |= (iTmp &amp; 0x0f) &lt;&lt; 4;
-<a name="l00214"></a>00214                         iOffset = iY * iByteWidth + iX;
-<a name="l00215"></a>00215                         *(pucData + iOffset) = ucTmp;
-<a name="l00216"></a>00216                 }
-<a name="l00217"></a>00217                 (void)tSkipBytes(pFile, iPadding);
-<a name="l00218"></a>00218         }
-<a name="l00219"></a>00219 } <span class="comment">/* end of vDecode4bpp */</span>
-<a name="l00220"></a>00220 
-<a name="l00221"></a>00221 <span class="comment">/*</span>
-<a name="l00222"></a>00222 <span class="comment"> * vDecode8bpp - decode an uncompressed 8 bits per pixel image</span>
-<a name="l00223"></a>00223 <span class="comment"> */</span>
-<a name="l00224"></a>00224 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00225"></a>00225 vDecode8bpp(FILE *pFile, UCHAR *pucData, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00226"></a>00226 {
-<a name="l00227"></a>00227         <span class="keywordtype">int</span>     iX, iY, iByteWidth, iOffset, iIndex, iPadding;
-<a name="l00228"></a>00228 
-<a name="l00229"></a>00229         DBG_MSG(<span class="stringliteral">&quot;vDecode8bpp&quot;</span>);
-<a name="l00230"></a>00230 
-<a name="l00231"></a>00231         fail(pFile == NULL);
-<a name="l00232"></a>00232         fail(pucData == NULL);
-<a name="l00233"></a>00233         fail(pImg == NULL);
-<a name="l00234"></a>00234         fail(pImg-&gt;iColorsUsed &lt; 1 || pImg-&gt;iColorsUsed &gt; 256);
-<a name="l00235"></a>00235 
-<a name="l00236"></a>00236         iByteWidth = iGetByteWidth(pImg);
-<a name="l00237"></a>00237 
-<a name="l00238"></a>00238         iPadding = ROUND4(pImg-&gt;iWidth) - pImg-&gt;iWidth;
-<a name="l00239"></a>00239 
-<a name="l00240"></a>00240         <span class="keywordflow">for</span> (iY = pImg-&gt;iHeight - 1; iY &gt;= 0; iY--) {
-<a name="l00241"></a>00241                 <span class="keywordflow">for</span> (iX = 0; iX &lt; pImg-&gt;iWidth; iX++) {
-<a name="l00242"></a>00242                         iIndex = iNextByte(pFile);
-<a name="l00243"></a>00243                         <span class="keywordflow">if</span> (iIndex == EOF) {
-<a name="l00244"></a>00244                                 <span class="keywordflow">return</span>;
-<a name="l00245"></a>00245                         }
-<a name="l00246"></a>00246                         iOffset = iY * iByteWidth + iX;
-<a name="l00247"></a>00247                         *(pucData + iOffset) = iReduceColor(
-<a name="l00248"></a>00248                                 pImg-&gt;aucPalette[iIndex][0],
-<a name="l00249"></a>00249                                 pImg-&gt;aucPalette[iIndex][1],
-<a name="l00250"></a>00250                                 pImg-&gt;aucPalette[iIndex][2]);
-<a name="l00251"></a>00251                 }
-<a name="l00252"></a>00252                 (void)tSkipBytes(pFile, iPadding);
-<a name="l00253"></a>00253         }
-<a name="l00254"></a>00254 } <span class="comment">/* end of vDecode8bpp */</span>
-<a name="l00255"></a>00255 
-<a name="l00256"></a>00256 <span class="comment">/*</span>
-<a name="l00257"></a>00257 <span class="comment"> * vDecode24bpp - decode an uncompressed 24 bits per pixel image</span>
-<a name="l00258"></a>00258 <span class="comment"> */</span>
-<a name="l00259"></a>00259 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00260"></a>00260 vDecode24bpp(FILE *pFile, UCHAR *pucData, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00261"></a>00261 {
-<a name="l00262"></a>00262         <span class="keywordtype">int</span>     iX, iY, iTripleWidth, iByteWidth, iOffset, iPadding;
-<a name="l00263"></a>00263         <span class="keywordtype">int</span>     iRed, iGreen, iBlue;
-<a name="l00264"></a>00264 
-<a name="l00265"></a>00265         DBG_MSG(<span class="stringliteral">&quot;vDecode24bpp&quot;</span>);
-<a name="l00266"></a>00266 
-<a name="l00267"></a>00267         fail(pFile == NULL);
-<a name="l00268"></a>00268         fail(pucData == NULL);
-<a name="l00269"></a>00269         fail(pImg == NULL);
-<a name="l00270"></a>00270 
-<a name="l00271"></a>00271         iByteWidth = iGetByteWidth(pImg);
-<a name="l00272"></a>00272 
-<a name="l00273"></a>00273         iTripleWidth = pImg-&gt;iWidth * 3;
-<a name="l00274"></a>00274         iPadding = ROUND4(iTripleWidth) - iTripleWidth;
-<a name="l00275"></a>00275 
-<a name="l00276"></a>00276         <span class="keywordflow">for</span> (iY = pImg-&gt;iHeight - 1; iY &gt;= 0; iY--) {
-<a name="l00277"></a>00277                 <span class="keywordflow">for</span> (iX = 0; iX &lt; pImg-&gt;iWidth; iX++) {
-<a name="l00278"></a>00278                         iBlue = iNextByte(pFile);
-<a name="l00279"></a>00279                         <span class="keywordflow">if</span> (iBlue == EOF) {
-<a name="l00280"></a>00280                                 <span class="keywordflow">return</span>;
-<a name="l00281"></a>00281                         }
-<a name="l00282"></a>00282                         iGreen = iNextByte(pFile);
-<a name="l00283"></a>00283                         <span class="keywordflow">if</span> (iGreen == EOF) {
-<a name="l00284"></a>00284                                 <span class="keywordflow">return</span>;
-<a name="l00285"></a>00285                         }
-<a name="l00286"></a>00286                         iRed = iNextByte(pFile);
-<a name="l00287"></a>00287                         <span class="keywordflow">if</span> (iRed == EOF) {
-<a name="l00288"></a>00288                                 <span class="keywordflow">return</span>;
-<a name="l00289"></a>00289                         }
-<a name="l00290"></a>00290                         iOffset = iY * iByteWidth + iX;
-<a name="l00291"></a>00291                         *(pucData + iOffset) =
-<a name="l00292"></a>00292                                         iReduceColor(iRed, iGreen, iBlue);
-<a name="l00293"></a>00293                 }
-<a name="l00294"></a>00294                 (void)tSkipBytes(pFile, iPadding);
-<a name="l00295"></a>00295         }
-<a name="l00296"></a>00296 } <span class="comment">/* end of vDecode24bpp */</span>
-<a name="l00297"></a>00297 
-<a name="l00298"></a>00298 <span class="comment">/*</span>
-<a name="l00299"></a>00299 <span class="comment"> * vDecodeRle4 - decode a RLE compressed 4 bits per pixel image</span>
-<a name="l00300"></a>00300 <span class="comment"> */</span>
-<a name="l00301"></a>00301 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00302"></a>00302 vDecodeRle4(FILE *pFile, UCHAR *pucData, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00303"></a>00303 {
-<a name="l00304"></a>00304         <span class="keywordtype">int</span>     iX, iY, iByteWidth, iOffset, iTmp, iHalfWidth;
-<a name="l00305"></a>00305         <span class="keywordtype">int</span>     iRun, iRunLength, iHalfRun;
-<a name="l00306"></a>00306         BOOL    bEOL;
-<a name="l00307"></a>00307         UCHAR   ucTmp;
-<a name="l00308"></a>00308 
-<a name="l00309"></a>00309         DBG_MSG(<span class="stringliteral">&quot;vDecodeRle4&quot;</span>);
-<a name="l00310"></a>00310 
-<a name="l00311"></a>00311         fail(pFile == NULL);
-<a name="l00312"></a>00312         fail(pucData == NULL);
-<a name="l00313"></a>00313         fail(pImg == NULL);
-<a name="l00314"></a>00314         fail(pImg-&gt;iColorsUsed &lt; 1 || pImg-&gt;iColorsUsed &gt; 16);
-<a name="l00315"></a>00315 
-<a name="l00316"></a>00316         DBG_DEC(pImg-&gt;iWidth);
-<a name="l00317"></a>00317         DBG_DEC(pImg-&gt;iHeight);
-<a name="l00318"></a>00318 
-<a name="l00319"></a>00319         iByteWidth = iGetByteWidth(pImg);
-<a name="l00320"></a>00320         iHalfWidth = (pImg-&gt;iWidth + 1) / 2;
-<a name="l00321"></a>00321 
-<a name="l00322"></a>00322         <span class="keywordflow">for</span> (iY = pImg-&gt;iHeight - 1; iY &gt;= 0; iY--) {
-<a name="l00323"></a>00323                 bEOL = FALSE;
-<a name="l00324"></a>00324                 iX = 0;
-<a name="l00325"></a>00325                 <span class="keywordflow">while</span> (!bEOL) {
-<a name="l00326"></a>00326                         iRunLength = iNextByte(pFile);
-<a name="l00327"></a>00327                         <span class="keywordflow">if</span> (iRunLength == EOF) {
-<a name="l00328"></a>00328                                 <span class="keywordflow">return</span>;
-<a name="l00329"></a>00329                         }
-<a name="l00330"></a>00330                         <span class="keywordflow">if</span> (iRunLength != 0) {
-<a name="l00331"></a>00331                                 <span class="comment">/*</span>
-<a name="l00332"></a>00332 <span class="comment">                                 * Encoded packet:</span>
-<a name="l00333"></a>00333 <span class="comment">                                 * RunLength pixels, all the &quot;same&quot; value</span>
-<a name="l00334"></a>00334 <span class="comment">                                 */</span>
-<a name="l00335"></a>00335                                 iTmp = iNextByte(pFile);
-<a name="l00336"></a>00336                                 <span class="keywordflow">if</span> (iTmp == EOF) {
-<a name="l00337"></a>00337                                         <span class="keywordflow">return</span>;
-<a name="l00338"></a>00338                                 }
-<a name="l00339"></a>00339                                 <span class="comment">/* Reverse the nibble order */</span>
-<a name="l00340"></a>00340                                 ucTmp = (iTmp &amp; 0xf0) &gt;&gt; 4;
-<a name="l00341"></a>00341                                 ucTmp |= (iTmp &amp; 0x0f) &lt;&lt; 4;
-<a name="l00342"></a>00342                                 iHalfRun = (iRunLength + 1) / 2;
-<a name="l00343"></a>00343                                 <span class="keywordflow">for</span> (iRun = 0; iRun &lt; iHalfRun; iRun++) {
-<a name="l00344"></a>00344                                         <span class="keywordflow">if</span> (iX &lt; iHalfWidth) {
-<a name="l00345"></a>00345                                                 iOffset = iY * iByteWidth + iX;
-<a name="l00346"></a>00346                                                 *(pucData + iOffset) = ucTmp;
-<a name="l00347"></a>00347                                         }
-<a name="l00348"></a>00348                                         iX++;
-<a name="l00349"></a>00349                                 }
-<a name="l00350"></a>00350                                 <span class="keywordflow">continue</span>;
-<a name="l00351"></a>00351                         }
-<a name="l00352"></a>00352                         <span class="comment">/* Literal or escape */</span>
-<a name="l00353"></a>00353                         iRunLength = iNextByte(pFile);
-<a name="l00354"></a>00354                         <span class="keywordflow">if</span> (iRunLength == EOF) {
-<a name="l00355"></a>00355                                 <span class="keywordflow">return</span>;
-<a name="l00356"></a>00356                         }
-<a name="l00357"></a>00357                         <span class="keywordflow">if</span> (iRunLength == 0) {          <span class="comment">/* End of line escape */</span>
-<a name="l00358"></a>00358                                 bEOL = TRUE;
-<a name="l00359"></a>00359                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (iRunLength == 1) {   <span class="comment">/* End of file escape */</span>
-<a name="l00360"></a>00360                                 <span class="keywordflow">return</span>;
-<a name="l00361"></a>00361                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (iRunLength == 2) {   <span class="comment">/* Delta escape */</span>
-<a name="l00362"></a>00362                                 DBG_MSG(<span class="stringliteral">&quot;RLE4: encountered delta escape&quot;</span>);
-<a name="l00363"></a>00363                                 <span class="keywordflow">return</span>;
-<a name="l00364"></a>00364                         } <span class="keywordflow">else</span> {                        <span class="comment">/* Literal packet */</span>
-<a name="l00365"></a>00365                                 iHalfRun = (iRunLength + 1) / 2;
-<a name="l00366"></a>00366                                 <span class="keywordflow">for</span> (iRun = 0; iRun &lt; iHalfRun; iRun++) {
-<a name="l00367"></a>00367                                         iTmp = iNextByte(pFile);
-<a name="l00368"></a>00368                                         <span class="keywordflow">if</span> (iTmp == EOF) {
-<a name="l00369"></a>00369                                                 <span class="keywordflow">return</span>;
-<a name="l00370"></a>00370                                         }
-<a name="l00371"></a>00371                                         <span class="comment">/* Reverse the nibble order */</span>
-<a name="l00372"></a>00372                                         ucTmp = (iTmp &amp; 0xf0) &gt;&gt; 4;
-<a name="l00373"></a>00373                                         ucTmp |= (iTmp &amp; 0x0f) &lt;&lt; 4;
-<a name="l00374"></a>00374                                         <span class="keywordflow">if</span> (iX &lt; iHalfWidth) {
-<a name="l00375"></a>00375                                                 iOffset = iY * iByteWidth + iX;
-<a name="l00376"></a>00376                                                 *(pucData + iOffset) = ucTmp;
-<a name="l00377"></a>00377                                         }
-<a name="l00378"></a>00378                                         iX++;
-<a name="l00379"></a>00379                                 }
-<a name="l00380"></a>00380                                 <span class="comment">/* Padding if the number of bytes is odd */</span>
-<a name="l00381"></a>00381                                 <span class="keywordflow">if</span> (odd(iHalfRun)) {
-<a name="l00382"></a>00382                                         (void)tSkipBytes(pFile, 1);
-<a name="l00383"></a>00383                                 }
-<a name="l00384"></a>00384                         }
-<a name="l00385"></a>00385                 }
-<a name="l00386"></a>00386                 DBG_DEC_C(iX != iHalfWidth, iX);
-<a name="l00387"></a>00387         }
-<a name="l00388"></a>00388 } <span class="comment">/* end of vDecodeRle4 */</span>
-<a name="l00389"></a>00389 
-<a name="l00390"></a>00390 <span class="comment">/*</span>
-<a name="l00391"></a>00391 <span class="comment"> * vDecodeRle8 - decode a RLE compressed 8 bits per pixel image</span>
-<a name="l00392"></a>00392 <span class="comment"> */</span>
-<a name="l00393"></a>00393 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00394"></a>00394 vDecodeRle8(FILE *pFile, UCHAR *pucData, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00395"></a>00395 {
-<a name="l00396"></a>00396         <span class="keywordtype">int</span>     iX, iY, iRun, iRunLength, iOffset, iIndex, iByteWidth;
-<a name="l00397"></a>00397         BOOL    bEOL;
-<a name="l00398"></a>00398 
-<a name="l00399"></a>00399         DBG_MSG(<span class="stringliteral">&quot;vDecodeRle8&quot;</span>);
-<a name="l00400"></a>00400 
-<a name="l00401"></a>00401         fail(pFile == NULL);
-<a name="l00402"></a>00402         fail(pucData == NULL);
-<a name="l00403"></a>00403         fail(pImg == NULL);
-<a name="l00404"></a>00404         fail(pImg-&gt;iColorsUsed &lt; 1 || pImg-&gt;iColorsUsed &gt; 256);
-<a name="l00405"></a>00405 
-<a name="l00406"></a>00406         DBG_DEC(pImg-&gt;iWidth);
-<a name="l00407"></a>00407         DBG_DEC(pImg-&gt;iHeight);
-<a name="l00408"></a>00408 
-<a name="l00409"></a>00409         iByteWidth = iGetByteWidth(pImg);
-<a name="l00410"></a>00410 
-<a name="l00411"></a>00411         <span class="keywordflow">for</span> (iY = pImg-&gt;iHeight - 1; iY &gt;= 0; iY--) {
-<a name="l00412"></a>00412                 bEOL = FALSE;
-<a name="l00413"></a>00413                 iX = 0;
-<a name="l00414"></a>00414                 <span class="keywordflow">while</span> (!bEOL) {
-<a name="l00415"></a>00415                         iRunLength = iNextByte(pFile);
-<a name="l00416"></a>00416                         <span class="keywordflow">if</span> (iRunLength == EOF) {
-<a name="l00417"></a>00417                                 <span class="keywordflow">return</span>;
-<a name="l00418"></a>00418                         }
-<a name="l00419"></a>00419                         <span class="keywordflow">if</span> (iRunLength != 0) {
-<a name="l00420"></a>00420                                 <span class="comment">/*</span>
-<a name="l00421"></a>00421 <span class="comment">                                 * Encoded packet:</span>
-<a name="l00422"></a>00422 <span class="comment">                                 * RunLength pixels, all the same value</span>
-<a name="l00423"></a>00423 <span class="comment">                                 */</span>
-<a name="l00424"></a>00424                                 iIndex = iNextByte(pFile);
-<a name="l00425"></a>00425                                 <span class="keywordflow">if</span> (iIndex == EOF) {
-<a name="l00426"></a>00426                                         <span class="keywordflow">return</span>;
-<a name="l00427"></a>00427                                 }
-<a name="l00428"></a>00428                                 <span class="keywordflow">for</span> (iRun = 0; iRun &lt; iRunLength; iRun++) {
-<a name="l00429"></a>00429                                         <span class="keywordflow">if</span> (iX &lt; pImg-&gt;iWidth) {
-<a name="l00430"></a>00430                                                 iOffset = iY * iByteWidth + iX;
-<a name="l00431"></a>00431                                                 *(pucData + iOffset) =
-<a name="l00432"></a>00432                                                         iReduceColor(
-<a name="l00433"></a>00433                                                         pImg-&gt;aucPalette[iIndex][0],
-<a name="l00434"></a>00434                                                         pImg-&gt;aucPalette[iIndex][1],
-<a name="l00435"></a>00435                                                         pImg-&gt;aucPalette[iIndex][2]);
-<a name="l00436"></a>00436                                         }
-<a name="l00437"></a>00437                                         iX++;
-<a name="l00438"></a>00438                                 }
-<a name="l00439"></a>00439                                 <span class="keywordflow">continue</span>;
-<a name="l00440"></a>00440                         }
-<a name="l00441"></a>00441                         <span class="comment">/* Literal or escape */</span>
-<a name="l00442"></a>00442                         iRunLength = iNextByte(pFile);
-<a name="l00443"></a>00443                         <span class="keywordflow">if</span> (iRunLength == EOF) {
-<a name="l00444"></a>00444                                 <span class="keywordflow">return</span>;
-<a name="l00445"></a>00445                         }
-<a name="l00446"></a>00446                         <span class="keywordflow">if</span> (iRunLength == 0) {          <span class="comment">/* End of line escape */</span>
-<a name="l00447"></a>00447                                 bEOL = TRUE;
-<a name="l00448"></a>00448                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (iRunLength == 1) {   <span class="comment">/* End of file escape */</span>
-<a name="l00449"></a>00449                                 <span class="keywordflow">return</span>;
-<a name="l00450"></a>00450                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (iRunLength == 2) {   <span class="comment">/* Delta escape */</span>
-<a name="l00451"></a>00451                                 DBG_MSG(<span class="stringliteral">&quot;RLE8: encountered delta escape&quot;</span>);
-<a name="l00452"></a>00452                                 <span class="keywordflow">return</span>;
-<a name="l00453"></a>00453                         } <span class="keywordflow">else</span> {                        <span class="comment">/* Literal packet */</span>
-<a name="l00454"></a>00454                                 <span class="keywordflow">for</span> (iRun = 0; iRun &lt; iRunLength; iRun++) {
-<a name="l00455"></a>00455                                         iIndex = iNextByte(pFile);
-<a name="l00456"></a>00456                                         <span class="keywordflow">if</span> (iIndex == EOF) {
-<a name="l00457"></a>00457                                                 <span class="keywordflow">return</span>;
-<a name="l00458"></a>00458                                         }
-<a name="l00459"></a>00459                                         <span class="keywordflow">if</span> (iX &lt; pImg-&gt;iWidth) {
-<a name="l00460"></a>00460                                                 iOffset = iY * iByteWidth + iX;
-<a name="l00461"></a>00461                                                 *(pucData + iOffset) =
-<a name="l00462"></a>00462                                                         iReduceColor(
-<a name="l00463"></a>00463                                                         pImg-&gt;aucPalette[iIndex][0],
-<a name="l00464"></a>00464                                                         pImg-&gt;aucPalette[iIndex][1],
-<a name="l00465"></a>00465                                                         pImg-&gt;aucPalette[iIndex][2]);
-<a name="l00466"></a>00466                                         }
-<a name="l00467"></a>00467                                         iX++;
-<a name="l00468"></a>00468                                 }
-<a name="l00469"></a>00469                                 <span class="comment">/* Padding if the number of bytes is odd */</span>
-<a name="l00470"></a>00470                                 <span class="keywordflow">if</span> (odd(iRunLength)) {
-<a name="l00471"></a>00471                                         (void)tSkipBytes(pFile, 1);
-<a name="l00472"></a>00472                                 }
-<a name="l00473"></a>00473                         }
-<a name="l00474"></a>00474                 }
-<a name="l00475"></a>00475                 DBG_DEC_C(iX != pImg-&gt;iWidth, iX);
-<a name="l00476"></a>00476         }
-<a name="l00477"></a>00477 } <span class="comment">/* end of vDecodeRle8 */</span>
-<a name="l00478"></a>00478 
-<a name="l00479"></a>00479 <span class="preprocessor">#if 0 </span><span class="comment">/* defined(DEBUG) */</span>
-<a name="l00480"></a>00480 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00481"></a>00481 vCopy2File(UCHAR *pucSprite, <span class="keywordtype">size_t</span> tSpriteSize)
-<a name="l00482"></a>00482 {
-<a name="l00483"></a>00483         FILE    *pOutFile;
-<a name="l00484"></a>00484         <span class="keywordtype">int</span>     iIndex;
-<a name="l00485"></a>00485         <span class="keywordtype">char</span>    szFilename[30];
-<a name="l00486"></a>00486 
-<a name="l00487"></a>00487         sprintf(szFilename, <span class="stringliteral">&quot;&lt;Wimp$ScrapDir&gt;.sprt%04d&quot;</span>, ++iPicCounter);
-<a name="l00488"></a>00488         pOutFile = fopen(szFilename, <span class="stringliteral">&quot;wb&quot;</span>);
-<a name="l00489"></a>00489         <span class="keywordflow">if</span> (pOutFile == NULL) {
-<a name="l00490"></a>00490                 <span class="keywordflow">return</span>;
-<a name="l00491"></a>00491         }
-<a name="l00492"></a>00492         DBG_MSG(szFilename);
-<a name="l00493"></a>00493         <span class="keywordflow">for</span> (iIndex = 4; iIndex &lt; (int)tSpriteSize; iIndex++) {
-<a name="l00494"></a>00494                 <span class="keywordflow">if</span> (putc(pucSprite[iIndex], pOutFile) == EOF) {
-<a name="l00495"></a>00495                         <span class="keywordflow">break</span>;
-<a name="l00496"></a>00496                 }
-<a name="l00497"></a>00497         }
-<a name="l00498"></a>00498         (void)fclose(pOutFile);
-<a name="l00499"></a>00499         vSetFiletype(szFilename, FILETYPE_SPRITE);
-<a name="l00500"></a>00500 } <span class="comment">/* end of vCopy2File */</span>
-<a name="l00501"></a>00501 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00502"></a>00502 
-<a name="l00503"></a>00503 <span class="comment">/*</span>
-<a name="l00504"></a>00504 <span class="comment"> * vDecodeDIB - decode a dib picture</span>
-<a name="l00505"></a>00505 <span class="comment"> */</span>
-<a name="l00506"></a>00506 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00507"></a>00507 vDecodeDIB(diagram_type *pDiag, FILE *pFile, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00508"></a>00508 {
-<a name="l00509"></a>00509         sprite_areainfo *pSprite;
-<a name="l00510"></a>00510         UCHAR   *pucPalette, *pucData;
-<a name="l00511"></a>00511         <span class="keywordtype">size_t</span>  tSpriteSize;
-<a name="l00512"></a>00512         <span class="keywordtype">int</span>     iHeaderSize;
-<a name="l00513"></a>00513 
-<a name="l00514"></a>00514         <span class="comment">/* Skip the bitmap info header */</span>
-<a name="l00515"></a>00515         iHeaderSize = (int)ulNextLong(pFile);
-<a name="l00516"></a>00516         (void)tSkipBytes(pFile, iHeaderSize - 4);
-<a name="l00517"></a>00517         <span class="comment">/* Skip the colortable */</span>
-<a name="l00518"></a>00518         <span class="keywordflow">if</span> (pImg-&gt;uiBitsPerComponent &lt;= 8) {
-<a name="l00519"></a>00519                 (void)tSkipBytes(pFile,
-<a name="l00520"></a>00520                         pImg-&gt;iColorsUsed * ((iHeaderSize &gt; 12) ? 4 : 3));
-<a name="l00521"></a>00521         }
-<a name="l00522"></a>00522 
-<a name="l00523"></a>00523         <span class="comment">/* Create an blank sprite */</span>
-<a name="l00524"></a>00524         pSprite = pCreateBlankSprite(pImg, &amp;tSpriteSize);
-<a name="l00525"></a>00525         pucPalette = (UCHAR *)pSprite +
-<a name="l00526"></a>00526                         pSprite-&gt;firstoffset + <span class="keyword">sizeof</span>(sprite_header);
-<a name="l00527"></a>00527 
-<a name="l00528"></a>00528         <span class="comment">/* Add the pixel information */</span>
-<a name="l00529"></a>00529         <span class="keywordflow">switch</span> (pImg-&gt;uiBitsPerComponent) {
-<a name="l00530"></a>00530         <span class="keywordflow">case</span>  1:
-<a name="l00531"></a>00531                 fail(pImg-&gt;eCompression != compression_none);
-<a name="l00532"></a>00532                 pucData = pucPalette + 2 * 8;
-<a name="l00533"></a>00533                 vDecode1bpp(pFile, pucData, pImg);
-<a name="l00534"></a>00534                 <span class="keywordflow">break</span>;
-<a name="l00535"></a>00535         <span class="keywordflow">case</span>  4:
-<a name="l00536"></a>00536                 fail(pImg-&gt;eCompression != compression_none &amp;&amp;
-<a name="l00537"></a>00537                                 pImg-&gt;eCompression != compression_rle4);
-<a name="l00538"></a>00538                 pucData = pucPalette + 16 * 8;
-<a name="l00539"></a>00539                 <span class="keywordflow">if</span> (pImg-&gt;eCompression == compression_rle4) {
-<a name="l00540"></a>00540                         vDecodeRle4(pFile, pucData, pImg);
-<a name="l00541"></a>00541                 } <span class="keywordflow">else</span> {
-<a name="l00542"></a>00542                         vDecode4bpp(pFile, pucData, pImg);
-<a name="l00543"></a>00543                 }
-<a name="l00544"></a>00544                 <span class="keywordflow">break</span>;
-<a name="l00545"></a>00545         <span class="keywordflow">case</span>  8:
-<a name="l00546"></a>00546                 fail(pImg-&gt;eCompression != compression_none &amp;&amp;
-<a name="l00547"></a>00547                                 pImg-&gt;eCompression != compression_rle8);
-<a name="l00548"></a>00548                 pucData = pucPalette + 0 * 8;
-<a name="l00549"></a>00549                 <span class="keywordflow">if</span> (pImg-&gt;eCompression == compression_rle8) {
-<a name="l00550"></a>00550                         vDecodeRle8(pFile, pucData, pImg);
-<a name="l00551"></a>00551                 } <span class="keywordflow">else</span> {
-<a name="l00552"></a>00552                         vDecode8bpp(pFile, pucData, pImg);
-<a name="l00553"></a>00553                 }
-<a name="l00554"></a>00554                 <span class="keywordflow">break</span>;
-<a name="l00555"></a>00555         <span class="keywordflow">case</span> 24:
-<a name="l00556"></a>00556                 fail(pImg-&gt;eCompression != compression_none);
-<a name="l00557"></a>00557                 pucData = pucPalette + 0 * 8;
-<a name="l00558"></a>00558                 vDecode24bpp(pFile, pucData, pImg);
-<a name="l00559"></a>00559                 <span class="keywordflow">break</span>;
-<a name="l00560"></a>00560         <span class="keywordflow">default</span>:
-<a name="l00561"></a>00561                 DBG_DEC(pImg-&gt;uiBitsPerComponent);
-<a name="l00562"></a>00562                 <span class="keywordflow">break</span>;
-<a name="l00563"></a>00563         }
-<a name="l00564"></a>00564 
-<a name="l00565"></a>00565 <span class="preprocessor">#if 0 </span><span class="comment">/* defined(DEBUG) */</span>
-<a name="l00566"></a>00566         vCopy2File((UCHAR *)pSprite, tSpriteSize);
-<a name="l00567"></a>00567 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00568"></a>00568 
-<a name="l00569"></a>00569         <span class="comment">/* Add the sprite to the Draw file */</span>
-<a name="l00570"></a>00570         vImage2Diagram(pDiag, pImg,
-<a name="l00571"></a>00571                 (UCHAR *)pSprite + pSprite-&gt;firstoffset,
-<a name="l00572"></a>00572                 tSpriteSize - pSprite-&gt;firstoffset);
-<a name="l00573"></a>00573 
-<a name="l00574"></a>00574         <span class="comment">/* Clean up before you leave */</span>
-<a name="l00575"></a>00575         pSprite = xfree(pSprite);
-<a name="l00576"></a>00576 } <span class="comment">/* end of vDecodeDIB */</span>
-<a name="l00577"></a>00577 
-<a name="l00578"></a>00578 <span class="comment">/*</span>
-<a name="l00579"></a>00579 <span class="comment"> * bTranslateDIB - translate a DIB picture</span>
-<a name="l00580"></a>00580 <span class="comment"> *</span>
-<a name="l00581"></a>00581 <span class="comment"> * This function translates a picture from dib to sprite</span>
-<a name="l00582"></a>00582 <span class="comment"> *</span>
-<a name="l00583"></a>00583 <span class="comment"> * return TRUE when sucessful, otherwise FALSE</span>
-<a name="l00584"></a>00584 <span class="comment"> */</span>
-<a name="l00585"></a>00585 BOOL
-<a name="l00586"></a>00586 bTranslateDIB(diagram_type *pDiag, FILE *pFile,
-<a name="l00587"></a>00587         ULONG ulFileOffset, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00588"></a>00588 {
-<a name="l00589"></a>00589         <span class="comment">/* Seek to start position of DIB data */</span>
-<a name="l00590"></a>00590         <span class="keywordflow">if</span> (!bSetDataOffset(pFile, ulFileOffset)) {
-<a name="l00591"></a>00591                 <span class="keywordflow">return</span> FALSE;
-<a name="l00592"></a>00592         }
-<a name="l00593"></a>00593 
-<a name="l00594"></a>00594         vDecodeDIB(pDiag, pFile, pImg);
-<a name="l00595"></a>00595 
-<a name="l00596"></a>00596         <span class="keywordflow">return</span> TRUE;
-<a name="l00597"></a>00597 } <span class="comment">/* end of bTranslateDIB */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/doclist_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/doclist.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/doclist.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * doclist.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2004 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Build, read and destroy list(s) of Word document information</span>
-<a name="l00007"></a>00007 <span class="comment"> *</span>
-<a name="l00008"></a>00008 <span class="comment"> * Note:</span>
-<a name="l00009"></a>00009 <span class="comment"> * There is no real list there is always one document per document</span>
-<a name="l00010"></a>00010 <span class="comment"> */</span>
-<a name="l00011"></a>00011 
-<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00013"></a>00013 
-<a name="l00014"></a>00014 <span class="preprocessor">#define HALF_INCH       36000L  </span><span class="comment">/* In millipoints */</span>
-<a name="l00015"></a>00015 
-<a name="l00016"></a>00016 <span class="comment">/* Variables needed to write the Document Information List */</span>
-<a name="l00017"></a>00017 <span class="keyword">static</span> document_block_type *pAnchor = NULL;
-<a name="l00018"></a>00018 <span class="keyword">static</span> document_block_type tInfo;
-<a name="l00019"></a>00019 
-<a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="comment">/*</span>
-<a name="l00022"></a>00022 <span class="comment"> * vDestroyDocumentInfoList - destroy the Document Information List</span>
-<a name="l00023"></a>00023 <span class="comment"> */</span>
-<a name="l00024"></a>00024 <span class="keywordtype">void</span>
-<a name="l00025"></a>00025 vDestroyDocumentInfoList(<span class="keywordtype">void</span>)
-<a name="l00026"></a>00026 {
-<a name="l00027"></a>00027         DBG_MSG(<span class="stringliteral">&quot;vDestroyDocumentInfoList&quot;</span>);
-<a name="l00028"></a>00028 
-<a name="l00029"></a>00029         pAnchor = NULL;
-<a name="l00030"></a>00030 } <span class="comment">/* end of vDestoryDocumentInfoList */</span>
-<a name="l00031"></a>00031 
-<a name="l00032"></a>00032 <span class="comment">/*</span>
-<a name="l00033"></a>00033 <span class="comment"> * vCreateDocumentInfoList - create the Document Information List</span>
-<a name="l00034"></a>00034 <span class="comment"> */</span>
-<a name="l00035"></a>00035 <span class="keywordtype">void</span>
-<a name="l00036"></a>00036 vCreateDocumentInfoList(<span class="keyword">const</span> document_block_type *pDocument)
-<a name="l00037"></a>00037 {
-<a name="l00038"></a>00038         fail(pDocument == NULL);
-<a name="l00039"></a>00039         fail(pAnchor != NULL);
-<a name="l00040"></a>00040 
-<a name="l00041"></a>00041         tInfo = *pDocument;
-<a name="l00042"></a>00042         pAnchor = &amp;tInfo;
-<a name="l00043"></a>00043 } <span class="comment">/* end of vCreateDocumentInfoList */</span>
-<a name="l00044"></a>00044 
-<a name="l00045"></a>00045 <span class="comment">/*</span>
-<a name="l00046"></a>00046 <span class="comment"> * lGetDefaultTabWidth - get the default tabwidth in millipoints</span>
-<a name="l00047"></a>00047 <span class="comment"> */</span>
-<a name="l00048"></a>00048 <span class="keywordtype">long</span>
-<a name="l00049"></a>00049 lGetDefaultTabWidth(<span class="keywordtype">void</span>)
-<a name="l00050"></a>00050 {
-<a name="l00051"></a>00051         <span class="keywordtype">long</span>    lDefaultTabWidth;
-<a name="l00052"></a>00052         USHORT  usTmp;
-<a name="l00053"></a>00053 
-<a name="l00054"></a>00054         <span class="keywordflow">if</span> (pAnchor == NULL) {
-<a name="l00055"></a>00055                 DBG_FIXME();
-<a name="l00056"></a>00056                 <span class="keywordflow">return</span> HALF_INCH;
-<a name="l00057"></a>00057         }
-<a name="l00058"></a>00058         usTmp = pAnchor-&gt;usDefaultTabWidth;
-<a name="l00059"></a>00059         lDefaultTabWidth = usTmp == 0 ? HALF_INCH : lTwips2MilliPoints(usTmp);
-<a name="l00060"></a>00060         NO_DBG_DEC(lDefaultTabWidth);
-<a name="l00061"></a>00061         <span class="keywordflow">return</span> lDefaultTabWidth;
-<a name="l00062"></a>00062 } <span class="comment">/* end of lGetDefaultTabWidth */</span>
-<a name="l00063"></a>00063 
-<a name="l00064"></a>00064 <span class="comment">/*</span>
-<a name="l00065"></a>00065 <span class="comment"> * ucGetDopHdrFtrSpecification - get the Heder/footer specification</span>
-<a name="l00066"></a>00066 <span class="comment"> */</span>
-<a name="l00067"></a>00067 UCHAR
-<a name="l00068"></a>00068 ucGetDopHdrFtrSpecification(<span class="keywordtype">void</span>)
-<a name="l00069"></a>00069 {
-<a name="l00070"></a>00070         <span class="keywordflow">if</span> (pAnchor == NULL) {
-<a name="l00071"></a>00071                 DBG_FIXME();
-<a name="l00072"></a>00072                 <span class="keywordflow">return</span> 0x00;
-<a name="l00073"></a>00073         }
-<a name="l00074"></a>00074         <span class="keywordflow">return</span> pAnchor-&gt;ucHdrFtrSpecification;
-<a name="l00075"></a>00075 } <span class="comment">/* end of ucGetDopHdrFtrSpecification */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/draw_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1063 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/draw.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/draw.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * draw.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2005 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Functions to deal with the Draw format</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;ctype.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;DeskLib:KeyCodes.h&quot;</span>
-<a name="l00013"></a>00013 <span class="preprocessor">#include &quot;DeskLib:Error.h&quot;</span>
-<a name="l00014"></a>00014 <span class="preprocessor">#include &quot;DeskLib:Menu.h&quot;</span>
-<a name="l00015"></a>00015 <span class="preprocessor">#include &quot;DeskLib:Template.h&quot;</span>
-<a name="l00016"></a>00016 <span class="preprocessor">#include &quot;DeskLib:Window.h&quot;</span>
-<a name="l00017"></a>00017 <span class="preprocessor">#include &quot;DeskLib:EventMsg.h&quot;</span>
-<a name="l00018"></a>00018 <span class="preprocessor">#include &quot;flexlib:flex.h&quot;</span>
-<a name="l00019"></a>00019 <span class="preprocessor">#include &quot;drawfile.h&quot;</span>
-<a name="l00020"></a>00020 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00021"></a>00021 
-<a name="l00022"></a>00022 <span class="comment">/* The work area must be a little bit larger than the diagram */</span>
-<a name="l00023"></a>00023 <span class="preprocessor">#define WORKAREA_EXTENSION          5</span>
-<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="comment">/* Diagram memory */</span>
-<a name="l00025"></a>00025 <span class="preprocessor">#define INITIAL_SIZE            32768   </span><span class="comment">/* 32k */</span>
-<a name="l00026"></a>00026 <span class="preprocessor">#define EXTENSION_SIZE           4096   </span><span class="comment">/*  4k */</span>
-<a name="l00027"></a>00027 <span class="comment">/* Main window title */</span>
-<a name="l00028"></a>00028 <span class="preprocessor">#define WINDOW_TITLE_LEN           28</span>
-<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define FILENAME_TITLE_LEN      (WINDOW_TITLE_LEN - 10)</span>
-<a name="l00030"></a>00030 <span class="preprocessor"></span>
-<a name="l00031"></a>00031 
-<a name="l00032"></a>00032 <span class="preprocessor">#if !defined(__GNUC__)</span>
-<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="keywordtype">int</span>
-<a name="l00034"></a>00034 flex_alloc(flex_ptr anchor, <span class="keywordtype">int</span> n)
-<a name="l00035"></a>00035 {
-<a name="l00036"></a>00036         <span class="keywordtype">void</span>    *pvTmp;
-<a name="l00037"></a>00037 
-<a name="l00038"></a>00038         TRACE_MSG(<span class="stringliteral">&quot;flex_alloc&quot;</span>);
-<a name="l00039"></a>00039 
-<a name="l00040"></a>00040         <span class="keywordflow">if</span> (anchor == NULL || n &lt; 0) {
-<a name="l00041"></a>00041                 <span class="keywordflow">return</span> 0;
-<a name="l00042"></a>00042         }
-<a name="l00043"></a>00043         <span class="keywordflow">if</span> (n == 0) {
-<a name="l00044"></a>00044                 n = 1;
-<a name="l00045"></a>00045         }
-<a name="l00046"></a>00046         pvTmp = malloc(n);
-<a name="l00047"></a>00047         <span class="keywordflow">if</span> (pvTmp == NULL) {
-<a name="l00048"></a>00048                 <span class="keywordflow">return</span> 0;
-<a name="l00049"></a>00049         }
-<a name="l00050"></a>00050         *anchor = pvTmp;
-<a name="l00051"></a>00051         <span class="keywordflow">return</span> 1;
-<a name="l00052"></a>00052 } <span class="comment">/* end of flex_alloc */</span>
-<a name="l00053"></a>00053 
-<a name="l00054"></a>00054 <span class="keywordtype">void</span>
-<a name="l00055"></a>00055 flex_free(flex_ptr anchor)
-<a name="l00056"></a>00056 {
-<a name="l00057"></a>00057         TRACE_MSG(<span class="stringliteral">&quot;flex_free&quot;</span>);
-<a name="l00058"></a>00058 
-<a name="l00059"></a>00059         <span class="keywordflow">if</span> (anchor == NULL || *anchor == NULL) {
-<a name="l00060"></a>00060                 <span class="keywordflow">return</span>;
-<a name="l00061"></a>00061         }
-<a name="l00062"></a>00062         free(*anchor);
-<a name="l00063"></a>00063         *anchor = NULL;
-<a name="l00064"></a>00064 } <span class="comment">/* end of flex_free */</span>
-<a name="l00065"></a>00065 
-<a name="l00066"></a>00066 <span class="keywordtype">int</span>
-<a name="l00067"></a>00067 flex_extend(flex_ptr anchor, <span class="keywordtype">int</span> newsize)
-<a name="l00068"></a>00068 {
-<a name="l00069"></a>00069         <span class="keywordtype">void</span>    *pvTmp;
-<a name="l00070"></a>00070 
-<a name="l00071"></a>00071         TRACE_MSG(<span class="stringliteral">&quot;flex_extend&quot;</span>);
-<a name="l00072"></a>00072 
-<a name="l00073"></a>00073         <span class="keywordflow">if</span> (anchor == NULL || newsize &lt; 0) {
-<a name="l00074"></a>00074                 <span class="keywordflow">return</span> 0;
-<a name="l00075"></a>00075         }
-<a name="l00076"></a>00076         <span class="keywordflow">if</span> (newsize == 0) {
-<a name="l00077"></a>00077                 newsize = 1;
-<a name="l00078"></a>00078         }
-<a name="l00079"></a>00079         pvTmp = realloc(*anchor, newsize);
-<a name="l00080"></a>00080         <span class="keywordflow">if</span> (pvTmp == NULL) {
-<a name="l00081"></a>00081                 <span class="keywordflow">return</span> 0;
-<a name="l00082"></a>00082         }
-<a name="l00083"></a>00083         *anchor = pvTmp;
-<a name="l00084"></a>00084         <span class="keywordflow">return</span> 1;
-<a name="l00085"></a>00085 } <span class="comment">/* end of flex_extend */</span>
-<a name="l00086"></a>00086 <span class="preprocessor">#endif </span><span class="comment">/* !__GNUC__ */</span>
-<a name="l00087"></a>00087 
-<a name="l00088"></a>00088 <span class="comment">/*</span>
-<a name="l00089"></a>00089 <span class="comment"> * vCreateMainWindow - create the Main window</span>
-<a name="l00090"></a>00090 <span class="comment"> *</span>
-<a name="l00091"></a>00091 <span class="comment"> * remark: does not return if the Main window can&#39;t be created</span>
-<a name="l00092"></a>00092 <span class="comment"> */</span>
-<a name="l00093"></a>00093 <span class="keyword">static</span> window_handle
-<a name="l00094"></a>00094 tCreateMainWindow(<span class="keywordtype">void</span>)
-<a name="l00095"></a>00095 {
-<a name="l00096"></a>00096         window_handle   tMainWindow;
-<a name="l00097"></a>00097 
-<a name="l00098"></a>00098         TRACE_MSG(<span class="stringliteral">&quot;tCreateMainWindow&quot;</span>);
-<a name="l00099"></a>00099 
-<a name="l00100"></a>00100         tMainWindow = Window_Create(<span class="stringliteral">&quot;MainWindow&quot;</span>, template_TITLEMIN);
-<a name="l00101"></a>00101         <span class="keywordflow">if</span> (tMainWindow == 0) {
-<a name="l00102"></a>00102                 werr(1, <span class="stringliteral">&quot;I can&#39;t find the &#39;MainWindow&#39; template&quot;</span>);
-<a name="l00103"></a>00103         }
-<a name="l00104"></a>00104         <span class="keywordflow">return</span> tMainWindow;
-<a name="l00105"></a>00105 } <span class="comment">/* end of tCreateMainWindow */</span>
-<a name="l00106"></a>00106 
-<a name="l00107"></a>00107 <span class="comment">/*</span>
-<a name="l00108"></a>00108 <span class="comment"> * vCreateScaleWindow - create the Scale view window</span>
-<a name="l00109"></a>00109 <span class="comment"> *</span>
-<a name="l00110"></a>00110 <span class="comment"> * remark: does not return if the Scale view window can&#39;t be created</span>
-<a name="l00111"></a>00111 <span class="comment"> */</span>
-<a name="l00112"></a>00112 <span class="keyword">static</span> window_handle
-<a name="l00113"></a>00113 tCreateScaleWindow(<span class="keywordtype">void</span>)
-<a name="l00114"></a>00114 {
-<a name="l00115"></a>00115         window_handle   tScaleWindow;
-<a name="l00116"></a>00116 
-<a name="l00117"></a>00117         TRACE_MSG(<span class="stringliteral">&quot;tCreateScaleWindow&quot;</span>);
-<a name="l00118"></a>00118 
-<a name="l00119"></a>00119         tScaleWindow = Window_Create(<span class="stringliteral">&quot;ScaleView&quot;</span>, template_TITLEMIN);
-<a name="l00120"></a>00120         <span class="keywordflow">if</span> (tScaleWindow == 0) {
-<a name="l00121"></a>00121                 werr(1, <span class="stringliteral">&quot;I can&#39;t find the &#39;ScaleView&#39; template&quot;</span>);
-<a name="l00122"></a>00122         }
-<a name="l00123"></a>00123         <span class="keywordflow">return</span> tScaleWindow;
-<a name="l00124"></a>00124 } <span class="comment">/* end of tCreateScaleWindow */</span>
-<a name="l00125"></a>00125 
-<a name="l00126"></a>00126 <span class="comment">/*</span>
-<a name="l00127"></a>00127 <span class="comment"> * pCreateDiagram - create and initialize a diagram</span>
-<a name="l00128"></a>00128 <span class="comment"> *</span>
-<a name="l00129"></a>00129 <span class="comment"> * remark: does not return if the diagram can&#39;t be created</span>
-<a name="l00130"></a>00130 <span class="comment"> */</span>
-<a name="l00131"></a>00131 diagram_type *
-<a name="l00132"></a>00132 pCreateDiagram(<span class="keyword">const</span> <span class="keywordtype">char</span> *szTask, <span class="keyword">const</span> <span class="keywordtype">char</span> *szFilename)
-<a name="l00133"></a>00133 {
-<a name="l00134"></a>00134         diagram_type    *pDiag;
-<a name="l00135"></a>00135         options_type    tOptions;
-<a name="l00136"></a>00136         window_handle   tMainWindow, tScaleWindow;
-<a name="l00137"></a>00137         wimp_box        tBox;
-<a name="l00138"></a>00138 
-<a name="l00139"></a>00139         TRACE_MSG(<span class="stringliteral">&quot;pCreateDiagram&quot;</span>);
-<a name="l00140"></a>00140 
-<a name="l00141"></a>00141         fail(szTask == NULL || szTask[0] == <span class="charliteral">&#39;\0&#39;</span>);
-<a name="l00142"></a>00142 
-<a name="l00143"></a>00143         <span class="comment">/* Create the main window */</span>
-<a name="l00144"></a>00144         tMainWindow = tCreateMainWindow();
-<a name="l00145"></a>00145 
-<a name="l00146"></a>00146         <span class="comment">/* Create the scale view window */</span>
-<a name="l00147"></a>00147         tScaleWindow = tCreateScaleWindow();
-<a name="l00148"></a>00148 
-<a name="l00149"></a>00149         <span class="comment">/* Get the necessary memory */</span>
-<a name="l00150"></a>00150         pDiag = xmalloc(<span class="keyword">sizeof</span>(diagram_type));
-<a name="l00151"></a>00151         <span class="keywordflow">if</span> (flex_alloc((flex_ptr)&amp;pDiag-&gt;tInfo.data, INITIAL_SIZE) != 1) {
-<a name="l00152"></a>00152                 werr(1, <span class="stringliteral">&quot;Memory allocation failed, unable to continue&quot;</span>);
-<a name="l00153"></a>00153         }
-<a name="l00154"></a>00154 
-<a name="l00155"></a>00155         <span class="comment">/* Initialize the diagram */</span>
-<a name="l00156"></a>00156         vGetOptions(&amp;tOptions);
-<a name="l00157"></a>00157         pDiag-&gt;tMainWindow = tMainWindow;
-<a name="l00158"></a>00158         pDiag-&gt;tScaleWindow = tScaleWindow;
-<a name="l00159"></a>00159         pDiag-&gt;iScaleFactorCurr = tOptions.iScaleFactor;
-<a name="l00160"></a>00160         pDiag-&gt;iScaleFactorTemp = tOptions.iScaleFactor;
-<a name="l00161"></a>00161         pDiag-&gt;tMemorySize = INITIAL_SIZE;
-<a name="l00162"></a>00162         tBox.min.x = 0;
-<a name="l00163"></a>00163         tBox.min.y = -(Drawfile_ScreenToDraw(32 + 3) * 8 + 1);
-<a name="l00164"></a>00164         tBox.max.x = Drawfile_ScreenToDraw(16) * MIN_SCREEN_WIDTH + 1;
-<a name="l00165"></a>00165         tBox.max.y = 0;
-<a name="l00166"></a>00166         Error_CheckFatal(Drawfile_CreateDiagram(&amp;pDiag-&gt;tInfo,
-<a name="l00167"></a>00167                                         pDiag-&gt;tMemorySize, szTask, tBox));
-<a name="l00168"></a>00168         DBG_DEC(pDiag-&gt;tInfo.length);
-<a name="l00169"></a>00169         pDiag-&gt;lXleft = 0;
-<a name="l00170"></a>00170         pDiag-&gt;lYtop = 0;
-<a name="l00171"></a>00171         strncpy(pDiag-&gt;szFilename,
-<a name="l00172"></a>00172                         szBasename(szFilename), <span class="keyword">sizeof</span>(pDiag-&gt;szFilename) - 1);
-<a name="l00173"></a>00173         pDiag-&gt;szFilename[<span class="keyword">sizeof</span>(pDiag-&gt;szFilename) - 1] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00174"></a>00174         <span class="comment">/* Return success */</span>
-<a name="l00175"></a>00175         <span class="keywordflow">return</span> pDiag;
-<a name="l00176"></a>00176 } <span class="comment">/* end of pCreateDiagram */</span>
-<a name="l00177"></a>00177 
-<a name="l00178"></a>00178 <span class="comment">/*</span>
-<a name="l00179"></a>00179 <span class="comment"> * bDestroyDiagram - remove a diagram by freeing the memory it uses</span>
-<a name="l00180"></a>00180 <span class="comment"> */</span>
-<a name="l00181"></a>00181 BOOL
-<a name="l00182"></a>00182 bDestroyDiagram(event_pollblock *pEvent, <span class="keywordtype">void</span> *pvReference)
-<a name="l00183"></a>00183 {
-<a name="l00184"></a>00184         diagram_type    *pDiag;
-<a name="l00185"></a>00185         window_handle   tWindow;
-<a name="l00186"></a>00186 
-<a name="l00187"></a>00187         TRACE_MSG(<span class="stringliteral">&quot;bDestroyDiagram&quot;</span>);
-<a name="l00188"></a>00188 
-<a name="l00189"></a>00189         fail(pEvent == NULL);
-<a name="l00190"></a>00190         fail(pvReference == NULL);
-<a name="l00191"></a>00191 
-<a name="l00192"></a>00192         <span class="keywordflow">if</span> (pEvent == NULL || pvReference == NULL) {
-<a name="l00193"></a>00193                 <span class="keywordflow">return</span> FALSE;
-<a name="l00194"></a>00194         }
-<a name="l00195"></a>00195 
-<a name="l00196"></a>00196         pDiag = (diagram_type *)pvReference;
-<a name="l00197"></a>00197 
-<a name="l00198"></a>00198         <span class="keywordflow">switch</span> (pEvent-&gt;type) {
-<a name="l00199"></a>00199         <span class="keywordflow">case</span> event_CLOSE:
-<a name="l00200"></a>00200                 tWindow = pEvent-&gt;data.openblock.window;
-<a name="l00201"></a>00201                 <span class="keywordflow">break</span>;
-<a name="l00202"></a>00202         <span class="keywordflow">case</span> event_KEY:
-<a name="l00203"></a>00203                 tWindow = pEvent-&gt;data.key.caret.window;
-<a name="l00204"></a>00204                 <span class="keywordflow">break</span>;
-<a name="l00205"></a>00205         <span class="keywordflow">default</span>:
-<a name="l00206"></a>00206                 DBG_DEC(pEvent-&gt;type);
-<a name="l00207"></a>00207                 <span class="keywordflow">return</span> FALSE;
-<a name="l00208"></a>00208         }
-<a name="l00209"></a>00209         <span class="keywordflow">if</span> (tWindow != pDiag-&gt;tMainWindow) {
-<a name="l00210"></a>00210                 <span class="keywordflow">return</span> FALSE;
-<a name="l00211"></a>00211         }
-<a name="l00212"></a>00212 
-<a name="l00213"></a>00213         <span class="comment">/* Delete the main window */</span>
-<a name="l00214"></a>00214         Window_Delete(pDiag-&gt;tMainWindow);
-<a name="l00215"></a>00215         pDiag-&gt;tMainWindow = 0;
-<a name="l00216"></a>00216 
-<a name="l00217"></a>00217         <span class="comment">/* Delete the scale window */</span>
-<a name="l00218"></a>00218         Window_Delete(pDiag-&gt;tScaleWindow);
-<a name="l00219"></a>00219         pDiag-&gt;tScaleWindow = 0;
-<a name="l00220"></a>00220 
-<a name="l00221"></a>00221 <span class="preprocessor">#if defined(__GNUC__)</span>
-<a name="l00222"></a>00222 <span class="preprocessor"></span>        <span class="comment">/*</span>
-<a name="l00223"></a>00223 <span class="comment">         * Remove all references to the diagram that will be free-ed</span>
-<a name="l00224"></a>00224 <span class="comment">         * by undoing the EventMsg_Claim&#39;s from within the Menu_Warn&#39;s</span>
-<a name="l00225"></a>00225 <span class="comment">         */</span>
-<a name="l00226"></a>00226         <span class="keywordflow">while</span> (EventMsg_ReleaseSpecific(message_MENUWARNING, window_ANY,
-<a name="l00227"></a>00227                                         bSaveTextfile, pDiag))
-<a name="l00228"></a>00228                 ; <span class="comment">/* EMPTY */</span>
-<a name="l00229"></a>00229         <span class="keywordflow">while</span> (EventMsg_ReleaseSpecific(message_MENUWARNING, window_ANY,
-<a name="l00230"></a>00230                                         bSaveDrawfile, pDiag))
-<a name="l00231"></a>00231                 ; <span class="comment">/* EMPTY */</span>
-<a name="l00232"></a>00232         <span class="keywordflow">while</span> (EventMsg_ReleaseSpecific(message_MENUWARNING, window_ANY,
-<a name="l00233"></a>00233                                         bScaleOpenAction, pDiag))
-<a name="l00234"></a>00234                 ; <span class="comment">/* EMPTY */</span>
-<a name="l00235"></a>00235 <span class="preprocessor">#endif </span><span class="comment">/* __GNUC__ */</span>
-<a name="l00236"></a>00236 
-<a name="l00237"></a>00237         <span class="comment">/* Free the memory */</span>
-<a name="l00238"></a>00238         <span class="keywordflow">if</span> (pDiag-&gt;tInfo.data != NULL &amp;&amp; pDiag-&gt;tMemorySize != 0) {
-<a name="l00239"></a>00239                 flex_free((flex_ptr)&amp;pDiag-&gt;tInfo.data);
-<a name="l00240"></a>00240         }
-<a name="l00241"></a>00241         <span class="comment">/* Just to be on the save side */</span>
-<a name="l00242"></a>00242         pDiag-&gt;tInfo.data = NULL;
-<a name="l00243"></a>00243         pDiag-&gt;tInfo.length = 0;
-<a name="l00244"></a>00244         pDiag-&gt;tMemorySize = 0;
-<a name="l00245"></a>00245 
-<a name="l00246"></a>00246         <span class="comment">/* Destroy the diagram itself */</span>
-<a name="l00247"></a>00247         pDiag = xfree(pDiag);
-<a name="l00248"></a>00248         <span class="keywordflow">return</span> TRUE;
-<a name="l00249"></a>00249 } <span class="comment">/* end of bDestroyDiagram */</span>
-<a name="l00250"></a>00250 
-<a name="l00251"></a>00251 <span class="comment">/*</span>
-<a name="l00252"></a>00252 <span class="comment"> * vExtendDiagramSize - make sure the diagram is big enough</span>
-<a name="l00253"></a>00253 <span class="comment"> */</span>
-<a name="l00254"></a>00254 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00255"></a>00255 vExtendDiagramSize(diagram_type *pDiag, <span class="keywordtype">size_t</span> tSize)
-<a name="l00256"></a>00256 {
-<a name="l00257"></a>00257         TRACE_MSG(<span class="stringliteral">&quot;vExtendDiagramSize&quot;</span>);
-<a name="l00258"></a>00258 
-<a name="l00259"></a>00259         fail(pDiag == NULL || tSize % 4 != 0);
-<a name="l00260"></a>00260 
-<a name="l00261"></a>00261         <span class="keywordflow">while</span> (pDiag-&gt;tInfo.length + tSize &gt; pDiag-&gt;tMemorySize) {
-<a name="l00262"></a>00262                 <span class="keywordflow">if</span> (flex_extend((flex_ptr)&amp;pDiag-&gt;tInfo.data,
-<a name="l00263"></a>00263                                 pDiag-&gt;tMemorySize + EXTENSION_SIZE) != 1) {
-<a name="l00264"></a>00264                         werr(1, <span class="stringliteral">&quot;Memory extend failed, unable to continue&quot;</span>);
-<a name="l00265"></a>00265                 }
-<a name="l00266"></a>00266                 pDiag-&gt;tMemorySize += EXTENSION_SIZE;
-<a name="l00267"></a>00267                 NO_DBG_DEC(pDiag-&gt;tMemorySize);
-<a name="l00268"></a>00268         }
-<a name="l00269"></a>00269         TRACE_MSG(<span class="stringliteral">&quot;end of vExtendDiagramSize&quot;</span>);
-<a name="l00270"></a>00270 } <span class="comment">/* end of vExtendDiagramSize */</span>
-<a name="l00271"></a>00271 
-<a name="l00272"></a>00272 <span class="comment">/*</span>
-<a name="l00273"></a>00273 <span class="comment"> * vPrologue2 - prologue part 2; add a font list to a diagram</span>
-<a name="l00274"></a>00274 <span class="comment"> */</span>
-<a name="l00275"></a>00275 <span class="keywordtype">void</span>
-<a name="l00276"></a>00276 vPrologue2(diagram_type *pDiag, <span class="keywordtype">int</span> iWordVersion)
-<a name="l00277"></a>00277 {
-<a name="l00278"></a>00278         <a class="code" href="structdrawfile__object.html">drawfile_object</a> *pNew;
-<a name="l00279"></a>00279         <span class="keyword">const</span> font_table_type   *pTmp;
-<a name="l00280"></a>00280         <span class="keywordtype">char</span>    *pcTmp;
-<a name="l00281"></a>00281         <span class="keywordtype">size_t</span>  tRealSize, tSize;
-<a name="l00282"></a>00282         <span class="keywordtype">int</span>     iCount;
-<a name="l00283"></a>00283 
-<a name="l00284"></a>00284         TRACE_MSG(<span class="stringliteral">&quot;vPrologue2&quot;</span>);
-<a name="l00285"></a>00285 
-<a name="l00286"></a>00286         fail(pDiag == NULL);
-<a name="l00287"></a>00287 
-<a name="l00288"></a>00288         <span class="keywordflow">if</span> (tGetFontTableLength() == 0) {
-<a name="l00289"></a>00289                 <span class="keywordflow">return</span>;
-<a name="l00290"></a>00290         }
-<a name="l00291"></a>00291         tRealSize = offsetof(<a class="code" href="structdrawfile__object.html">drawfile_object</a>, data);
-<a name="l00292"></a>00292         pTmp = NULL;
-<a name="l00293"></a>00293         <span class="keywordflow">while</span> ((pTmp = pGetNextFontTableRecord(pTmp)) != NULL) {
-<a name="l00294"></a>00294                 tRealSize += 2 + strlen(pTmp-&gt;szOurFontname);
-<a name="l00295"></a>00295         }
-<a name="l00296"></a>00296         DBG_DEC(tRealSize);
-<a name="l00297"></a>00297         tSize = ROUND4(tRealSize);
-<a name="l00298"></a>00298         vExtendDiagramSize(pDiag, tSize);
-<a name="l00299"></a>00299         pNew = xmalloc(tSize);
-<a name="l00300"></a>00300         memset(pNew, 0, tSize);
-<a name="l00301"></a>00301         pNew-&gt;type = drawfile_TYPE_FONT_TABLE;
-<a name="l00302"></a>00302         pNew-&gt;size = tSize;
-<a name="l00303"></a>00303         pcTmp = (<span class="keywordtype">char</span> *)&amp;pNew-&gt;data.font_table.font_def[0].font_ref;
-<a name="l00304"></a>00304         iCount = 0;
-<a name="l00305"></a>00305         pTmp = NULL;
-<a name="l00306"></a>00306         while ((pTmp = pGetNextFontTableRecord(pTmp)) != NULL) {
-<a name="l00307"></a>00307                 *pcTmp = ++iCount;
-<a name="l00308"></a>00308                 pcTmp++;
-<a name="l00309"></a>00309                 strcpy(pcTmp, pTmp-&gt;szOurFontname);
-<a name="l00310"></a>00310                 pcTmp += 1 + strlen(pTmp-&gt;szOurFontname);
-<a name="l00311"></a>00311         }
-<a name="l00312"></a>00312         Error_CheckFatal(Drawfile_AppendObject(&amp;pDiag-&gt;tInfo,
-<a name="l00313"></a>00313                         pDiag-&gt;tMemorySize, pNew, TRUE));
-<a name="l00314"></a>00314         pNew = xfree(pNew);
-<a name="l00315"></a>00315 } <span class="comment">/* end of vPrologue2 */</span>
-<a name="l00316"></a>00316 
-<a name="l00317"></a>00317 <span class="comment">/*</span>
-<a name="l00318"></a>00318 <span class="comment"> * vSubstring2Diagram - put a sub string into a diagram</span>
-<a name="l00319"></a>00319 <span class="comment"> */</span>
-<a name="l00320"></a>00320 <span class="keywordtype">void</span>
-<a name="l00321"></a>00321 vSubstring2Diagram(diagram_type *pDiag,
-<a name="l00322"></a>00322         <span class="keywordtype">char</span> *szString, <span class="keywordtype">size_t</span> tStringLength, <span class="keywordtype">long</span> lStringWidth,
-<a name="l00323"></a>00323         UCHAR ucFontColor, USHORT usFontstyle, drawfile_fontref tFontRef,
-<a name="l00324"></a>00324         USHORT usFontSize, USHORT usMaxFontSize)
-<a name="l00325"></a>00325 {
-<a name="l00326"></a>00326         <a class="code" href="structdrawfile__object.html">drawfile_object</a> *pNew;
-<a name="l00327"></a>00327         <span class="keywordtype">long</span>    lSizeX, lSizeY, lOffset, l20, lYMove;
-<a name="l00328"></a>00328         <span class="keywordtype">size_t</span>  tRealSize, tSize;
-<a name="l00329"></a>00329 
-<a name="l00330"></a>00330         TRACE_MSG(<span class="stringliteral">&quot;vSubstring2Diagram&quot;</span>);
-<a name="l00331"></a>00331 
-<a name="l00332"></a>00332         fail(pDiag == NULL || szString == NULL);
-<a name="l00333"></a>00333         fail(pDiag-&gt;lXleft &lt; 0);
-<a name="l00334"></a>00334         fail(tStringLength != strlen(szString));
-<a name="l00335"></a>00335         fail(usFontSize &lt; MIN_FONT_SIZE || usFontSize &gt; MAX_FONT_SIZE);
-<a name="l00336"></a>00336         fail(usMaxFontSize &lt; MIN_FONT_SIZE || usMaxFontSize &gt; MAX_FONT_SIZE);
-<a name="l00337"></a>00337         fail(usFontSize &gt; usMaxFontSize);
-<a name="l00338"></a>00338 
-<a name="l00339"></a>00339         <span class="keywordflow">if</span> (szString[0] == <span class="charliteral">&#39;\0&#39;</span> || tStringLength == 0) {
-<a name="l00340"></a>00340                 <span class="keywordflow">return</span>;
-<a name="l00341"></a>00341         }
-<a name="l00342"></a>00342 
-<a name="l00343"></a>00343         <span class="keywordflow">if</span> (tFontRef == 0) {
-<a name="l00344"></a>00344                 lOffset = Drawfile_ScreenToDraw(2);
-<a name="l00345"></a>00345                 l20 = Drawfile_ScreenToDraw(32 + 3);
-<a name="l00346"></a>00346                 lSizeX = Drawfile_ScreenToDraw(16);
-<a name="l00347"></a>00347                 lSizeY = Drawfile_ScreenToDraw(32);
-<a name="l00348"></a>00348         } <span class="keywordflow">else</span> {
-<a name="l00349"></a>00349                 lOffset = lToBaseLine(usMaxFontSize);
-<a name="l00350"></a>00350                 l20 = lWord2DrawUnits20(usMaxFontSize);
-<a name="l00351"></a>00351                 lSizeX = lWord2DrawUnits00(usFontSize);
-<a name="l00352"></a>00352                 lSizeY = lWord2DrawUnits00(usFontSize);
-<a name="l00353"></a>00353         }
-<a name="l00354"></a>00354 
-<a name="l00355"></a>00355         lYMove = 0;
-<a name="l00356"></a>00356 
-<a name="l00357"></a>00357         <span class="comment">/* Up for superscript */</span>
-<a name="l00358"></a>00358         <span class="keywordflow">if</span> (bIsSuperscript(usFontstyle)) {
-<a name="l00359"></a>00359                 lYMove = lMilliPoints2DrawUnits((((<span class="keywordtype">long</span>)usFontSize + 1) / 2) * 375);
-<a name="l00360"></a>00360         }
-<a name="l00361"></a>00361         <span class="comment">/* Down for subscript */</span>
-<a name="l00362"></a>00362         <span class="keywordflow">if</span> (bIsSubscript(usFontstyle)) {
-<a name="l00363"></a>00363                 lYMove = -lMilliPoints2DrawUnits((<span class="keywordtype">long</span>)usFontSize * 125);
-<a name="l00364"></a>00364         }
-<a name="l00365"></a>00365 
-<a name="l00366"></a>00366         tRealSize = offsetof(<a class="code" href="structdrawfile__object.html">drawfile_object</a>, data);
-<a name="l00367"></a>00367         tRealSize += <span class="keyword">sizeof</span>(<a class="code" href="structdrawfile__text.html">drawfile_text</a>) + tStringLength;
-<a name="l00368"></a>00368         tSize = ROUND4(tRealSize);
-<a name="l00369"></a>00369         vExtendDiagramSize(pDiag, tSize);
-<a name="l00370"></a>00370         pNew = xmalloc(tSize);
-<a name="l00371"></a>00371         memset(pNew, 0, tSize);
-<a name="l00372"></a>00372         pNew-&gt;type = drawfile_TYPE_TEXT;
-<a name="l00373"></a>00373         pNew-&gt;size = tSize;
-<a name="l00374"></a>00374         pNew-&gt;data.text.bbox.min.x = (int)pDiag-&gt;lXleft;
-<a name="l00375"></a>00375         pNew-&gt;data.text.bbox.min.y = (<span class="keywordtype">int</span>)(pDiag-&gt;lYtop + lYMove);
-<a name="l00376"></a>00376         pNew-&gt;data.text.bbox.max.x = (int)(pDiag-&gt;lXleft + lStringWidth);
-<a name="l00377"></a>00377         pNew-&gt;data.text.bbox.max.y = (int)(pDiag-&gt;lYtop + l20 + lYMove);
-<a name="l00378"></a>00378         pNew-&gt;data.text.fill.value = (int)ulColor2Color(ucFontColor);
-<a name="l00379"></a>00379         pNew-&gt;data.text.bg_hint.value = 0xffffff00;     <span class="comment">/* White */</span>
-<a name="l00380"></a>00380         pNew-&gt;data.text.style.font_ref = tFontRef;
-<a name="l00381"></a>00381         pNew-&gt;data.text.style.reserved[0] = 0;
-<a name="l00382"></a>00382         pNew-&gt;data.text.style.reserved[1] = 0;
-<a name="l00383"></a>00383         pNew-&gt;data.text.style.reserved[2] = 0;
-<a name="l00384"></a>00384         pNew-&gt;data.text.xsize = (int)lSizeX;
-<a name="l00385"></a>00385         pNew-&gt;data.text.ysize = (int)lSizeY;
-<a name="l00386"></a>00386         pNew-&gt;data.text.base.x = (int)pDiag-&gt;lXleft;
-<a name="l00387"></a>00387         pNew-&gt;data.text.base.y = (<span class="keywordtype">int</span>)(pDiag-&gt;lYtop + lOffset + lYMove);
-<a name="l00388"></a>00388         strncpy(pNew-&gt;data.text.text, szString, tStringLength);
-<a name="l00389"></a>00389         pNew-&gt;data.text.text[tStringLength] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00390"></a>00390         Error_CheckFatal(Drawfile_AppendObject(&amp;pDiag-&gt;tInfo,
-<a name="l00391"></a>00391                         pDiag-&gt;tMemorySize, pNew, TRUE));
-<a name="l00392"></a>00392         pNew = xfree(pNew);
-<a name="l00393"></a>00393         <span class="comment">/*draw_translateText(&amp;pDiag-&gt;tInfo);*/</span>
-<a name="l00394"></a>00394         pDiag-&gt;lXleft += lStringWidth;
-<a name="l00395"></a>00395         TRACE_MSG(<span class="stringliteral">&quot;leaving vSubstring2Diagram&quot;</span>);
-<a name="l00396"></a>00396 } <span class="comment">/* end of vSubstring2Diagram */</span>
-<a name="l00397"></a>00397 
-<a name="l00398"></a>00398 <span class="comment">/*</span>
-<a name="l00399"></a>00399 <span class="comment"> * vImage2Diagram - put an image into a diagram</span>
-<a name="l00400"></a>00400 <span class="comment"> */</span>
-<a name="l00401"></a>00401 <span class="keywordtype">void</span>
-<a name="l00402"></a>00402 vImage2Diagram(diagram_type *pDiag, <span class="keyword">const</span> imagedata_type *pImg,
-<a name="l00403"></a>00403         UCHAR *pucImage, <span class="keywordtype">size_t</span> tImageSize)
-<a name="l00404"></a>00404 {
-<a name="l00405"></a>00405         <a class="code" href="structdrawfile__object.html">drawfile_object</a> *pNew;
-<a name="l00406"></a>00406         <span class="keywordtype">long</span>    lWidth, lHeight;
-<a name="l00407"></a>00407         <span class="keywordtype">size_t</span>  tRealSize, tSize;
-<a name="l00408"></a>00408 
-<a name="l00409"></a>00409         TRACE_MSG(<span class="stringliteral">&quot;vImage2Diagram&quot;</span>);
-<a name="l00410"></a>00410 
-<a name="l00411"></a>00411         fail(pDiag == NULL);
-<a name="l00412"></a>00412         fail(pImg == NULL);
-<a name="l00413"></a>00413         fail(pDiag-&gt;lXleft &lt; 0);
-<a name="l00414"></a>00414         fail(pImg-&gt;eImageType != imagetype_is_dib &amp;&amp;
-<a name="l00415"></a>00415              pImg-&gt;eImageType != imagetype_is_jpeg);
-<a name="l00416"></a>00416 
-<a name="l00417"></a>00417         DBG_DEC_C(pDiag-&gt;lXleft != 0, pDiag-&gt;lXleft);
-<a name="l00418"></a>00418 
-<a name="l00419"></a>00419         lWidth = lPoints2DrawUnits(pImg-&gt;iHorSizeScaled);
-<a name="l00420"></a>00420         lHeight = lPoints2DrawUnits(pImg-&gt;iVerSizeScaled);
-<a name="l00421"></a>00421         DBG_DEC(lWidth);
-<a name="l00422"></a>00422         DBG_DEC(lHeight);
-<a name="l00423"></a>00423 
-<a name="l00424"></a>00424         pDiag-&gt;lYtop -= lHeight;
-<a name="l00425"></a>00425 
-<a name="l00426"></a>00426         tRealSize = offsetof(<a class="code" href="structdrawfile__object.html">drawfile_object</a>, data);
-<a name="l00427"></a>00427         <span class="keywordflow">switch</span> (pImg-&gt;eImageType) {
-<a name="l00428"></a>00428         <span class="keywordflow">case</span> imagetype_is_dib:
-<a name="l00429"></a>00429                 tRealSize += <span class="keyword">sizeof</span>(<a class="code" href="structdrawfile__sprite.html">drawfile_sprite</a>) + tImageSize;
-<a name="l00430"></a>00430                 tSize = ROUND4(tRealSize);
-<a name="l00431"></a>00431                 vExtendDiagramSize(pDiag, tSize);
-<a name="l00432"></a>00432                 pNew = xmalloc(tSize);
-<a name="l00433"></a>00433                 memset(pNew, 0, tSize);
-<a name="l00434"></a>00434                 pNew-&gt;type = drawfile_TYPE_SPRITE;
-<a name="l00435"></a>00435                 pNew-&gt;size = tSize;
-<a name="l00436"></a>00436                 pNew-&gt;data.sprite.bbox.min.x = (int)pDiag-&gt;lXleft;
-<a name="l00437"></a>00437                 pNew-&gt;data.sprite.bbox.min.y = (<span class="keywordtype">int</span>)pDiag-&gt;lYtop;
-<a name="l00438"></a>00438                 pNew-&gt;data.sprite.bbox.max.x = (int)(pDiag-&gt;lXleft + lWidth);
-<a name="l00439"></a>00439                 pNew-&gt;data.sprite.bbox.max.y = (int)(pDiag-&gt;lYtop + lHeight);
-<a name="l00440"></a>00440                 memcpy(&amp;pNew-&gt;data.sprite.header, pucImage, tImageSize);
-<a name="l00441"></a>00441                 <span class="keywordflow">break</span>;
-<a name="l00442"></a>00442         <span class="keywordflow">case</span> imagetype_is_jpeg:
-<a name="l00443"></a>00443 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00444"></a>00444 <span class="preprocessor"></span>                (void)bGetJpegInfo(pucImage, tImageSize);
-<a name="l00445"></a>00445 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00446"></a>00446                 tRealSize += <span class="keyword">sizeof</span>(<a class="code" href="structdrawfile__jpeg.html">drawfile_jpeg</a>) + tImageSize;
-<a name="l00447"></a>00447                 tSize = ROUND4(tRealSize);
-<a name="l00448"></a>00448                 vExtendDiagramSize(pDiag, tSize);
-<a name="l00449"></a>00449                 pNew = xmalloc(tSize);
-<a name="l00450"></a>00450                 memset(pNew, 0, tSize);
-<a name="l00451"></a>00451                 pNew-&gt;type = drawfile_TYPE_JPEG;
-<a name="l00452"></a>00452                 pNew-&gt;size = tSize;
-<a name="l00453"></a>00453                 pNew-&gt;data.jpeg.bbox.min.x = (int)pDiag-&gt;lXleft;
-<a name="l00454"></a>00454                 pNew-&gt;data.jpeg.bbox.min.y = (<span class="keywordtype">int</span>)pDiag-&gt;lYtop;
-<a name="l00455"></a>00455                 pNew-&gt;data.jpeg.bbox.max.x = (int)(pDiag-&gt;lXleft + lWidth);
-<a name="l00456"></a>00456                 pNew-&gt;data.jpeg.bbox.max.y = (int)(pDiag-&gt;lYtop + lHeight);
-<a name="l00457"></a>00457                 pNew-&gt;data.jpeg.width = (int)lWidth;
-<a name="l00458"></a>00458                 pNew-&gt;data.jpeg.height = (int)lHeight;
-<a name="l00459"></a>00459                 pNew-&gt;data.jpeg.xdpi = 90;
-<a name="l00460"></a>00460                 pNew-&gt;data.jpeg.ydpi = 90;
-<a name="l00461"></a>00461                 pNew-&gt;data.jpeg.trfm.entries[0][0] = 0x10000;
-<a name="l00462"></a>00462                 pNew-&gt;data.jpeg.trfm.entries[0][1] = 0;
-<a name="l00463"></a>00463                 pNew-&gt;data.jpeg.trfm.entries[1][0] = 0;
-<a name="l00464"></a>00464                 pNew-&gt;data.jpeg.trfm.entries[1][1] = 0x10000;
-<a name="l00465"></a>00465                 pNew-&gt;data.jpeg.trfm.entries[2][0] = (int)pDiag-&gt;lXleft;
-<a name="l00466"></a>00466                 pNew-&gt;data.jpeg.trfm.entries[2][1] = (<span class="keywordtype">int</span>)pDiag-&gt;lYtop;
-<a name="l00467"></a>00467                 pNew-&gt;data.jpeg.len = tImageSize;
-<a name="l00468"></a>00468                 memcpy(pNew-&gt;data.jpeg.data, pucImage, tImageSize);
-<a name="l00469"></a>00469                 <span class="keywordflow">break</span>;
-<a name="l00470"></a>00470         <span class="keywordflow">default</span>:
-<a name="l00471"></a>00471                 DBG_DEC(pImg-&gt;eImageType);
-<a name="l00472"></a>00472                 pNew = NULL;
-<a name="l00473"></a>00473                 <span class="keywordflow">break</span>;
-<a name="l00474"></a>00474         }
-<a name="l00475"></a>00475 
-<a name="l00476"></a>00476         Error_CheckFatal(Drawfile_AppendObject(&amp;pDiag-&gt;tInfo,
-<a name="l00477"></a>00477                                         pDiag-&gt;tMemorySize, pNew, TRUE));
-<a name="l00478"></a>00478         pNew = xfree(pNew);
-<a name="l00479"></a>00479         pDiag-&gt;lXleft = 0;
-<a name="l00480"></a>00480 } <span class="comment">/* end of vImage2Diagram */</span>
-<a name="l00481"></a>00481 
-<a name="l00482"></a>00482 <span class="comment">/*</span>
-<a name="l00483"></a>00483 <span class="comment"> * bAddDummyImage - add a dummy image</span>
-<a name="l00484"></a>00484 <span class="comment"> *</span>
-<a name="l00485"></a>00485 <span class="comment"> * return TRUE when successful, otherwise FALSE</span>
-<a name="l00486"></a>00486 <span class="comment"> */</span>
-<a name="l00487"></a>00487 BOOL
-<a name="l00488"></a>00488 bAddDummyImage(diagram_type *pDiag, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00489"></a>00489 {
-<a name="l00490"></a>00490         <a class="code" href="structdrawfile__object.html">drawfile_object</a> *pNew;
-<a name="l00491"></a>00491         <span class="keywordtype">int</span>     *piTmp;
-<a name="l00492"></a>00492         <span class="keywordtype">long</span>    lWidth, lHeight;
-<a name="l00493"></a>00493         <span class="keywordtype">size_t</span>  tRealSize, tSize;
-<a name="l00494"></a>00494 
-<a name="l00495"></a>00495         TRACE_MSG(<span class="stringliteral">&quot;bAddDummyImage&quot;</span>);
-<a name="l00496"></a>00496 
-<a name="l00497"></a>00497         fail(pDiag == NULL);
-<a name="l00498"></a>00498         fail(pImg == NULL);
-<a name="l00499"></a>00499         fail(pDiag-&gt;lXleft &lt; 0);
-<a name="l00500"></a>00500 
-<a name="l00501"></a>00501         <span class="keywordflow">if</span> (pImg-&gt;iVerSizeScaled &lt;= 0 || pImg-&gt;iHorSizeScaled &lt;= 0) {
-<a name="l00502"></a>00502                 <span class="keywordflow">return</span> FALSE;
-<a name="l00503"></a>00503         }
-<a name="l00504"></a>00504 
-<a name="l00505"></a>00505         DBG_DEC_C(pDiag-&gt;lXleft != 0, pDiag-&gt;lXleft);
-<a name="l00506"></a>00506 
-<a name="l00507"></a>00507         lWidth = lPoints2DrawUnits(pImg-&gt;iHorSizeScaled);
-<a name="l00508"></a>00508         lHeight = lPoints2DrawUnits(pImg-&gt;iVerSizeScaled);
-<a name="l00509"></a>00509 
-<a name="l00510"></a>00510         pDiag-&gt;lYtop -= lHeight;
-<a name="l00511"></a>00511 
-<a name="l00512"></a>00512         tRealSize = offsetof(<a class="code" href="structdrawfile__object.html">drawfile_object</a>, data);
-<a name="l00513"></a>00513         tRealSize += <span class="keyword">sizeof</span>(<a class="code" href="structdrawfile__path.html">drawfile_path</a>) + (14 - 1) * <span class="keyword">sizeof</span>(int);
-<a name="l00514"></a>00514         tSize = ROUND4(tRealSize);
-<a name="l00515"></a>00515         vExtendDiagramSize(pDiag, tSize);
-<a name="l00516"></a>00516         pNew = xmalloc(tSize);
-<a name="l00517"></a>00517         memset(pNew, 0, tSize);
-<a name="l00518"></a>00518         pNew-&gt;type = drawfile_TYPE_PATH;
-<a name="l00519"></a>00519         pNew-&gt;size = tSize;
-<a name="l00520"></a>00520         pNew-&gt;data.path.bbox.min.x = (int)pDiag-&gt;lXleft;
-<a name="l00521"></a>00521         pNew-&gt;data.path.bbox.min.y = (<span class="keywordtype">int</span>)pDiag-&gt;lYtop;
-<a name="l00522"></a>00522         pNew-&gt;data.path.bbox.max.x = (int)(pDiag-&gt;lXleft + lWidth);
-<a name="l00523"></a>00523         pNew-&gt;data.path.bbox.max.y = (int)(pDiag-&gt;lYtop + lHeight);
-<a name="l00524"></a>00524         pNew-&gt;data.path.fill.value = -1;
-<a name="l00525"></a>00525         pNew-&gt;data.path.outline.value = 0x4d4d4d00;     <span class="comment">/* Gray 70 percent */</span>
-<a name="l00526"></a>00526         pNew-&gt;data.path.width = (int)lMilliPoints2DrawUnits(500);
-<a name="l00527"></a>00527         pNew-&gt;data.path.style.flags = 0;
-<a name="l00528"></a>00528         pNew-&gt;data.path.style.reserved = 0;
-<a name="l00529"></a>00529         pNew-&gt;data.path.style.cap_width = 0;
-<a name="l00530"></a>00530         pNew-&gt;data.path.style.cap_length = 0;
-<a name="l00531"></a>00531         piTmp = pNew-&gt;data.path.path;
-<a name="l00532"></a>00532         *piTmp++ = drawfile_PATH_MOVE_TO;
-<a name="l00533"></a>00533         *piTmp++ = pNew-&gt;data.path.bbox.min.x;
-<a name="l00534"></a>00534         *piTmp++ = pNew-&gt;data.path.bbox.min.y;
-<a name="l00535"></a>00535         *piTmp++ = drawfile_PATH_LINE_TO;
-<a name="l00536"></a>00536         *piTmp++ = pNew-&gt;data.path.bbox.min.x;
-<a name="l00537"></a>00537         *piTmp++ = pNew-&gt;data.path.bbox.max.y;
-<a name="l00538"></a>00538         *piTmp++ = drawfile_PATH_LINE_TO;
-<a name="l00539"></a>00539         *piTmp++ = pNew-&gt;data.path.bbox.max.x;
-<a name="l00540"></a>00540         *piTmp++ = pNew-&gt;data.path.bbox.max.y;
-<a name="l00541"></a>00541         *piTmp++ = drawfile_PATH_LINE_TO;
-<a name="l00542"></a>00542         *piTmp++ = pNew-&gt;data.path.bbox.max.x;
-<a name="l00543"></a>00543         *piTmp++ = pNew-&gt;data.path.bbox.min.y;
-<a name="l00544"></a>00544         *piTmp++ = drawfile_PATH_CLOSE_LINE;
-<a name="l00545"></a>00545         *piTmp++ = drawfile_PATH_END_PATH;
-<a name="l00546"></a>00546 
-<a name="l00547"></a>00547         Error_CheckFatal(Drawfile_AppendObject(&amp;pDiag-&gt;tInfo,
-<a name="l00548"></a>00548                                         pDiag-&gt;tMemorySize, pNew, TRUE));
-<a name="l00549"></a>00549         pNew = xfree(pNew);
-<a name="l00550"></a>00550         pDiag-&gt;lXleft = 0;
-<a name="l00551"></a>00551         <span class="keywordflow">return</span> TRUE;
-<a name="l00552"></a>00552 } <span class="comment">/* end of bAddDummyImage */</span>
-<a name="l00553"></a>00553 
-<a name="l00554"></a>00554 <span class="comment">/*</span>
-<a name="l00555"></a>00555 <span class="comment"> * vMove2NextLine - move to the next line</span>
-<a name="l00556"></a>00556 <span class="comment"> */</span>
-<a name="l00557"></a>00557 <span class="keywordtype">void</span>
-<a name="l00558"></a>00558 vMove2NextLine(diagram_type *pDiag, drawfile_fontref tFontRef,
-<a name="l00559"></a>00559         USHORT usFontSize)
-<a name="l00560"></a>00560 {
-<a name="l00561"></a>00561         <span class="keywordtype">long</span>    l20;
-<a name="l00562"></a>00562 
-<a name="l00563"></a>00563         TRACE_MSG(<span class="stringliteral">&quot;vMove2NextLine&quot;</span>);
-<a name="l00564"></a>00564 
-<a name="l00565"></a>00565         fail(pDiag == NULL);
-<a name="l00566"></a>00566         fail(usFontSize &lt; MIN_FONT_SIZE || usFontSize &gt; MAX_FONT_SIZE);
-<a name="l00567"></a>00567 
-<a name="l00568"></a>00568         <span class="keywordflow">if</span> (tFontRef == 0) {
-<a name="l00569"></a>00569                 l20 = Drawfile_ScreenToDraw(32 + 3);
-<a name="l00570"></a>00570         } <span class="keywordflow">else</span> {
-<a name="l00571"></a>00571                 l20 = lWord2DrawUnits20(usFontSize);
-<a name="l00572"></a>00572         }
-<a name="l00573"></a>00573         pDiag-&gt;lYtop -= l20;
-<a name="l00574"></a>00574 } <span class="comment">/* end of vMove2NextLine */</span>
-<a name="l00575"></a>00575 
-<a name="l00576"></a>00576 <span class="comment">/*</span>
-<a name="l00577"></a>00577 <span class="comment"> * Create an start of paragraph (Phase 1)</span>
-<a name="l00578"></a>00578 <span class="comment"> */</span>
-<a name="l00579"></a>00579 <span class="keywordtype">void</span>
-<a name="l00580"></a>00580 vStartOfParagraph1(diagram_type *pDiag, <span class="keywordtype">long</span> lBeforeIndentation)
-<a name="l00581"></a>00581 {
-<a name="l00582"></a>00582         TRACE_MSG(<span class="stringliteral">&quot;vStartOfParagraph1&quot;</span>);
-<a name="l00583"></a>00583 
-<a name="l00584"></a>00584         fail(pDiag == NULL);
-<a name="l00585"></a>00585         fail(lBeforeIndentation &lt; 0);
-<a name="l00586"></a>00586 
-<a name="l00587"></a>00587         pDiag-&gt;lXleft = 0;
-<a name="l00588"></a>00588         pDiag-&gt;lYtop -= lMilliPoints2DrawUnits(lBeforeIndentation);
-<a name="l00589"></a>00589 } <span class="comment">/* end of vStartOfParagraph1 */</span>
-<a name="l00590"></a>00590 
-<a name="l00591"></a>00591 <span class="comment">/*</span>
-<a name="l00592"></a>00592 <span class="comment"> * Create an start of paragraph (Phase 2)</span>
-<a name="l00593"></a>00593 <span class="comment"> * DUMMY function</span>
-<a name="l00594"></a>00594 <span class="comment"> */</span>
-<a name="l00595"></a>00595 <span class="keywordtype">void</span>
-<a name="l00596"></a>00596 vStartOfParagraph2(diagram_type *pDiag)
-<a name="l00597"></a>00597 {
-<a name="l00598"></a>00598         TRACE_MSG(<span class="stringliteral">&quot;vStartOfParagraph2&quot;</span>);
-<a name="l00599"></a>00599 } <span class="comment">/* end of vStartOfParagraph2 */</span>
-<a name="l00600"></a>00600 
-<a name="l00601"></a>00601 <span class="comment">/*</span>
-<a name="l00602"></a>00602 <span class="comment"> * Create an end of paragraph</span>
-<a name="l00603"></a>00603 <span class="comment"> */</span>
-<a name="l00604"></a>00604 <span class="keywordtype">void</span>
-<a name="l00605"></a>00605 vEndOfParagraph(diagram_type *pDiag,
-<a name="l00606"></a>00606         drawfile_fontref tFontRef, USHORT usFontSize, <span class="keywordtype">long</span> lAfterIndentation)
-<a name="l00607"></a>00607 {
-<a name="l00608"></a>00608         TRACE_MSG(<span class="stringliteral">&quot;vEndOfParagraph&quot;</span>);
-<a name="l00609"></a>00609 
-<a name="l00610"></a>00610         fail(pDiag == NULL);
-<a name="l00611"></a>00611         fail(usFontSize &lt; MIN_FONT_SIZE || usFontSize &gt; MAX_FONT_SIZE);
-<a name="l00612"></a>00612         fail(lAfterIndentation &lt; 0);
-<a name="l00613"></a>00613 
-<a name="l00614"></a>00614         pDiag-&gt;lXleft = 0;
-<a name="l00615"></a>00615         pDiag-&gt;lYtop -= lMilliPoints2DrawUnits(lAfterIndentation);
-<a name="l00616"></a>00616 } <span class="comment">/* end of vEndOfParagraph */</span>
-<a name="l00617"></a>00617 
-<a name="l00618"></a>00618 <span class="comment">/*</span>
-<a name="l00619"></a>00619 <span class="comment"> * Create an end of page</span>
-<a name="l00620"></a>00620 <span class="comment"> */</span>
-<a name="l00621"></a>00621 <span class="keywordtype">void</span>
-<a name="l00622"></a>00622 vEndOfPage(diagram_type *pDiag, <span class="keywordtype">long</span> lAfterIndentation, BOOL bNewSection)
-<a name="l00623"></a>00623 {
-<a name="l00624"></a>00624         TRACE_MSG(<span class="stringliteral">&quot;vEndOfPage&quot;</span>);
-<a name="l00625"></a>00625 
-<a name="l00626"></a>00626         fail(pDiag == NULL);
-<a name="l00627"></a>00627         fail(lAfterIndentation &lt; 0);
-<a name="l00628"></a>00628 
-<a name="l00629"></a>00629         pDiag-&gt;lXleft = 0;
-<a name="l00630"></a>00630         pDiag-&gt;lYtop -= lMilliPoints2DrawUnits(lAfterIndentation);
-<a name="l00631"></a>00631 } <span class="comment">/* end of vEndOfPage */</span>
-<a name="l00632"></a>00632 
-<a name="l00633"></a>00633 <span class="comment">/*</span>
-<a name="l00634"></a>00634 <span class="comment"> * vSetHeaders - set the headers</span>
-<a name="l00635"></a>00635 <span class="comment"> * DUMMY function</span>
-<a name="l00636"></a>00636 <span class="comment"> */</span>
-<a name="l00637"></a>00637 <span class="keywordtype">void</span>
-<a name="l00638"></a>00638 vSetHeaders(diagram_type *pDiag, USHORT usIstd)
-<a name="l00639"></a>00639 {
-<a name="l00640"></a>00640         TRACE_MSG(<span class="stringliteral">&quot;vSetHeaders&quot;</span>);
-<a name="l00641"></a>00641 } <span class="comment">/* end of vSetHeaders */</span>
-<a name="l00642"></a>00642 
-<a name="l00643"></a>00643 <span class="comment">/*</span>
-<a name="l00644"></a>00644 <span class="comment"> * Create a start of list</span>
-<a name="l00645"></a>00645 <span class="comment"> * DUMMY function</span>
-<a name="l00646"></a>00646 <span class="comment"> */</span>
-<a name="l00647"></a>00647 <span class="keywordtype">void</span>
-<a name="l00648"></a>00648 vStartOfList(diagram_type *pDiag, UCHAR ucNFC, BOOL bIsEndOfTable)
-<a name="l00649"></a>00649 {
-<a name="l00650"></a>00650         TRACE_MSG(<span class="stringliteral">&quot;vStartOfList&quot;</span>);
-<a name="l00651"></a>00651 } <span class="comment">/* end of vStartOfList */</span>
-<a name="l00652"></a>00652 
-<a name="l00653"></a>00653 <span class="comment">/*</span>
-<a name="l00654"></a>00654 <span class="comment"> * Create an end of list</span>
-<a name="l00655"></a>00655 <span class="comment"> * DUMMY function</span>
-<a name="l00656"></a>00656 <span class="comment"> */</span>
-<a name="l00657"></a>00657 <span class="keywordtype">void</span>
-<a name="l00658"></a>00658 vEndOfList(diagram_type *pDiag)
-<a name="l00659"></a>00659 {
-<a name="l00660"></a>00660         TRACE_MSG(<span class="stringliteral">&quot;vEndOfList&quot;</span>);
-<a name="l00661"></a>00661 } <span class="comment">/* end of vEndOfList */</span>
-<a name="l00662"></a>00662 
-<a name="l00663"></a>00663 <span class="comment">/*</span>
-<a name="l00664"></a>00664 <span class="comment"> * Create a start of a list item</span>
-<a name="l00665"></a>00665 <span class="comment"> * DUMMY function</span>
-<a name="l00666"></a>00666 <span class="comment"> */</span>
-<a name="l00667"></a>00667 <span class="keywordtype">void</span>
-<a name="l00668"></a>00668 vStartOfListItem(diagram_type *pDiag, BOOL bNoMarks)
-<a name="l00669"></a>00669 {
-<a name="l00670"></a>00670         TRACE_MSG(<span class="stringliteral">&quot;vStartOfListItem&quot;</span>);
-<a name="l00671"></a>00671 } <span class="comment">/* end of vStartOfListItem */</span>
-<a name="l00672"></a>00672 
-<a name="l00673"></a>00673 <span class="comment">/*</span>
-<a name="l00674"></a>00674 <span class="comment"> * Create an end of a table</span>
-<a name="l00675"></a>00675 <span class="comment"> * DUMMY function</span>
-<a name="l00676"></a>00676 <span class="comment"> */</span>
-<a name="l00677"></a>00677 <span class="keywordtype">void</span>
-<a name="l00678"></a>00678 vEndOfTable(diagram_type *pDiag)
-<a name="l00679"></a>00679 {
-<a name="l00680"></a>00680         TRACE_MSG(<span class="stringliteral">&quot;vEndOfTable&quot;</span>);
-<a name="l00681"></a>00681 } <span class="comment">/* end of vEndTable */</span>
-<a name="l00682"></a>00682 
-<a name="l00683"></a>00683 <span class="comment">/*</span>
-<a name="l00684"></a>00684 <span class="comment"> * Add a table row</span>
-<a name="l00685"></a>00685 <span class="comment"> * DUMMY function</span>
-<a name="l00686"></a>00686 <span class="comment"> *</span>
-<a name="l00687"></a>00687 <span class="comment"> * Returns TRUE when conversion type is XML</span>
-<a name="l00688"></a>00688 <span class="comment"> */</span>
-<a name="l00689"></a>00689 BOOL
-<a name="l00690"></a>00690 bAddTableRow(diagram_type *pDiag, <span class="keywordtype">char</span> **aszColTxt,
-<a name="l00691"></a>00691         <span class="keywordtype">int</span> iNbrOfColumns, <span class="keyword">const</span> <span class="keywordtype">short</span> *asColumnWidth, UCHAR ucBorderInfo)
-<a name="l00692"></a>00692 {
-<a name="l00693"></a>00693         TRACE_MSG(<span class="stringliteral">&quot;bAddTableRow&quot;</span>);
-<a name="l00694"></a>00694 
-<a name="l00695"></a>00695         <span class="keywordflow">return</span> FALSE;
-<a name="l00696"></a>00696 } <span class="comment">/* end of bAddTableRow */</span>
-<a name="l00697"></a>00697 
-<a name="l00698"></a>00698 <span class="comment">/*</span>
-<a name="l00699"></a>00699 <span class="comment"> * vForceRedraw - force a redraw of the main window</span>
-<a name="l00700"></a>00700 <span class="comment"> */</span>
-<a name="l00701"></a>00701 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00702"></a>00702 vForceRedraw(diagram_type *pDiag)
-<a name="l00703"></a>00703 {
-<a name="l00704"></a>00704         window_state            tWindowState;
-<a name="l00705"></a>00705         window_redrawblock      tRedraw;
-<a name="l00706"></a>00706         <span class="keywordtype">int</span>     x0, y0, x1, y1;
-<a name="l00707"></a>00707 
-<a name="l00708"></a>00708         TRACE_MSG(<span class="stringliteral">&quot;vForceRedraw&quot;</span>);
-<a name="l00709"></a>00709 
-<a name="l00710"></a>00710         fail(pDiag == NULL);
-<a name="l00711"></a>00711 
-<a name="l00712"></a>00712         DBG_DEC(pDiag-&gt;iScaleFactorCurr);
-<a name="l00713"></a>00713 
-<a name="l00714"></a>00714         <span class="comment">/* Read the size of the current diagram */</span>
-<a name="l00715"></a>00715         Drawfile_QueryBox(&amp;pDiag-&gt;tInfo, &amp;tRedraw.rect, TRUE);
-<a name="l00716"></a>00716         <span class="comment">/* Adjust the size of the work area */</span>
-<a name="l00717"></a>00717         x0 = tRedraw.rect.min.x * pDiag-&gt;iScaleFactorCurr / 100 - 1;
-<a name="l00718"></a>00718         y0 = tRedraw.rect.min.y * pDiag-&gt;iScaleFactorCurr / 100 - 1;
-<a name="l00719"></a>00719         x1 = tRedraw.rect.max.x * pDiag-&gt;iScaleFactorCurr / 100 + 1;
-<a name="l00720"></a>00720         y1 = tRedraw.rect.max.y * pDiag-&gt;iScaleFactorCurr / 100 + 1;
-<a name="l00721"></a>00721         <span class="comment">/* Work area extension */</span>
-<a name="l00722"></a>00722         x0 -= WORKAREA_EXTENSION;
-<a name="l00723"></a>00723         y0 -= WORKAREA_EXTENSION;
-<a name="l00724"></a>00724         x1 += WORKAREA_EXTENSION;
-<a name="l00725"></a>00725         y1 += WORKAREA_EXTENSION;
-<a name="l00726"></a>00726         Window_SetExtent(pDiag-&gt;tMainWindow, x0, y0, x1, y1);
-<a name="l00727"></a>00727         <span class="comment">/* Widen the box slightly to be sure all the edges are drawn */</span>
-<a name="l00728"></a>00728         x0 -= 5;
-<a name="l00729"></a>00729         y0 -= 5;
-<a name="l00730"></a>00730         x1 += 5;
-<a name="l00731"></a>00731         y1 += 5;
-<a name="l00732"></a>00732         <span class="comment">/* Force the redraw */</span>
-<a name="l00733"></a>00733         Window_ForceRedraw(pDiag-&gt;tMainWindow, x0, y0, x1, y1);
-<a name="l00734"></a>00734         <span class="comment">/* Reopen the window to show the correct size */</span>
-<a name="l00735"></a>00735         Error_CheckFatal(Wimp_GetWindowState(pDiag-&gt;tMainWindow, &amp;tWindowState));
-<a name="l00736"></a>00736         tWindowState.openblock.behind = -1;
-<a name="l00737"></a>00737         Error_CheckFatal(Wimp_OpenWindow(&amp;tWindowState.openblock));
-<a name="l00738"></a>00738 } <span class="comment">/* end of vForceRedraw */</span>
-<a name="l00739"></a>00739 
-<a name="l00740"></a>00740 <span class="comment">/*</span>
-<a name="l00741"></a>00741 <span class="comment"> * vShowDiagram - put the diagram on the screen</span>
-<a name="l00742"></a>00742 <span class="comment"> */</span>
-<a name="l00743"></a>00743 <span class="keywordtype">void</span>
-<a name="l00744"></a>00744 vShowDiagram(diagram_type *pDiag)
-<a name="l00745"></a>00745 {
-<a name="l00746"></a>00746         wimp_box        tRect;
-<a name="l00747"></a>00747         <span class="keywordtype">int</span>     x0, y0, x1, y1;
-<a name="l00748"></a>00748 
-<a name="l00749"></a>00749         TRACE_MSG(<span class="stringliteral">&quot;vShowDiagram&quot;</span>);
-<a name="l00750"></a>00750 
-<a name="l00751"></a>00751         fail(pDiag == NULL);
-<a name="l00752"></a>00752 
-<a name="l00753"></a>00753         Window_Show(pDiag-&gt;tMainWindow, open_NEARLAST);
-<a name="l00754"></a>00754         Drawfile_QueryBox(&amp;pDiag-&gt;tInfo, &amp;tRect, TRUE);
-<a name="l00755"></a>00755         <span class="comment">/* Work area extension */</span>
-<a name="l00756"></a>00756         x0 = tRect.min.x - WORKAREA_EXTENSION;
-<a name="l00757"></a>00757         y0 = tRect.min.y - WORKAREA_EXTENSION;
-<a name="l00758"></a>00758         x1 = tRect.max.x + WORKAREA_EXTENSION;
-<a name="l00759"></a>00759         y1 = tRect.max.y + WORKAREA_EXTENSION;
-<a name="l00760"></a>00760         Window_SetExtent(pDiag-&gt;tMainWindow, x0, y0, x1, y1);
-<a name="l00761"></a>00761         vForceRedraw(pDiag);
-<a name="l00762"></a>00762 } <span class="comment">/* end of vShowDiagram */</span>
-<a name="l00763"></a>00763 
-<a name="l00764"></a>00764 <span class="comment">/*</span>
-<a name="l00765"></a>00765 <span class="comment"> * vMainButtonClick - handle mouse buttons clicks for the main screen</span>
-<a name="l00766"></a>00766 <span class="comment"> */</span>
-<a name="l00767"></a>00767 <span class="keywordtype">void</span>
-<a name="l00768"></a>00768 vMainButtonClick(mouse_block *pMouse)
-<a name="l00769"></a>00769 {
-<a name="l00770"></a>00770         caret_block     tCaret;
-<a name="l00771"></a>00771         window_state    ws;
-<a name="l00772"></a>00772 
-<a name="l00773"></a>00773         TRACE_MSG(<span class="stringliteral">&quot;vMainButtonClick&quot;</span>);
-<a name="l00774"></a>00774 
-<a name="l00775"></a>00775         fail(pMouse == NULL);
-<a name="l00776"></a>00776 
-<a name="l00777"></a>00777         DBG_DEC(pMouse-&gt;button.data.select);
-<a name="l00778"></a>00778         DBG_DEC(pMouse-&gt;button.data.adjust);
-<a name="l00779"></a>00779         DBG_DEC(pMouse-&gt;window);
-<a name="l00780"></a>00780         DBG_DEC(pMouse-&gt;icon);
-<a name="l00781"></a>00781 
-<a name="l00782"></a>00782         <span class="keywordflow">if</span> (pMouse-&gt;window &gt;= 0 &amp;&amp;
-<a name="l00783"></a>00783             pMouse-&gt;icon == -1 &amp;&amp;
-<a name="l00784"></a>00784             (pMouse-&gt;button.data.select || pMouse-&gt;button.data.adjust)) {
-<a name="l00785"></a>00785                 <span class="comment">/* Get the input focus */</span>
-<a name="l00786"></a>00786                 Error_CheckFatal(Wimp_GetWindowState(pMouse-&gt;window, &amp;ws));
-<a name="l00787"></a>00787                 tCaret.window = pMouse-&gt;window;
-<a name="l00788"></a>00788                 tCaret.icon = -1;
-<a name="l00789"></a>00789                 tCaret.offset.x = pMouse-&gt;pos.x - ws.openblock.screenrect.min.x;
-<a name="l00790"></a>00790                 tCaret.offset.y = pMouse-&gt;pos.y - ws.openblock.screenrect.max.y;
-<a name="l00791"></a>00791                 tCaret.height = (int)BIT(25);
-<a name="l00792"></a>00792                 tCaret.index = 0;
-<a name="l00793"></a>00793                 Error_CheckFatal(Wimp_SetCaretPosition(&amp;tCaret));
-<a name="l00794"></a>00794         }
-<a name="l00795"></a>00795 } <span class="comment">/* end of vMainButtonClick */</span>
-<a name="l00796"></a>00796 
-<a name="l00797"></a>00797 <span class="comment">/*</span>
-<a name="l00798"></a>00798 <span class="comment"> * bMainKeyPressed - handle pressed keys for the main window</span>
-<a name="l00799"></a>00799 <span class="comment"> */</span>
-<a name="l00800"></a>00800 BOOL
-<a name="l00801"></a>00801 bMainKeyPressed(event_pollblock *pEvent, <span class="keywordtype">void</span> *pvReference)
-<a name="l00802"></a>00802 {
-<a name="l00803"></a>00803         diagram_type    *pDiag;
-<a name="l00804"></a>00804 
-<a name="l00805"></a>00805         TRACE_MSG(<span class="stringliteral">&quot;bMainKeyPressed&quot;</span>);
-<a name="l00806"></a>00806 
-<a name="l00807"></a>00807         fail(pEvent == NULL);
-<a name="l00808"></a>00808         fail(pEvent-&gt;type != event_KEY);
-<a name="l00809"></a>00809         fail(pvReference == NULL);
-<a name="l00810"></a>00810 
-<a name="l00811"></a>00811         pDiag = (diagram_type *)pvReference;
-<a name="l00812"></a>00812 
-<a name="l00813"></a>00813         fail(pEvent-&gt;data.key.caret.window != pDiag-&gt;tMainWindow);
-<a name="l00814"></a>00814 
-<a name="l00815"></a>00815 
-<a name="l00816"></a>00816         <span class="keywordflow">switch</span> (pEvent-&gt;data.key.code) {
-<a name="l00817"></a>00817         <span class="keywordflow">case</span> keycode_CTRL_F2:           <span class="comment">/* Ctrl F2 */</span>
-<a name="l00818"></a>00818                 bDestroyDiagram(pEvent, pvReference);
-<a name="l00819"></a>00819                 <span class="keywordflow">break</span>;
-<a name="l00820"></a>00820         <span class="keywordflow">case</span> keycode_F3:                <span class="comment">/* F3 */</span>
-<a name="l00821"></a>00821                 bSaveDrawfile(pEvent, pvReference);
-<a name="l00822"></a>00822                 <span class="keywordflow">break</span>;
-<a name="l00823"></a>00823         <span class="keywordflow">case</span> keycode_SHIFT_F3:          <span class="comment">/* Shift F3 */</span>
-<a name="l00824"></a>00824                 bSaveTextfile(pEvent, pvReference);
-<a name="l00825"></a>00825                 <span class="keywordflow">break</span>;
-<a name="l00826"></a>00826         <span class="keywordflow">default</span>:
-<a name="l00827"></a>00827                 DBG_DEC(pEvent-&gt;data.key.code);
-<a name="l00828"></a>00828                 Error_CheckFatal(Wimp_ProcessKey(pEvent-&gt;data.key.code));
-<a name="l00829"></a>00829         }
-<a name="l00830"></a>00830         <span class="keywordflow">return</span> TRUE;
-<a name="l00831"></a>00831 } <span class="comment">/* end of bMainKeyPressed */</span>
-<a name="l00832"></a>00832 
-<a name="l00833"></a>00833 <span class="comment">/*</span>
-<a name="l00834"></a>00834 <span class="comment"> * bRedrawMainWindow - redraw the main window</span>
-<a name="l00835"></a>00835 <span class="comment"> */</span>
-<a name="l00836"></a>00836 BOOL
-<a name="l00837"></a>00837 bRedrawMainWindow(event_pollblock *pEvent, <span class="keywordtype">void</span> *pvReference)
-<a name="l00838"></a>00838 {
-<a name="l00839"></a>00839         window_redrawblock      tBlock;
-<a name="l00840"></a>00840         diagram_type    *pDiag;
-<a name="l00841"></a>00841         <a class="code" href="structdrawfile__info.html">drawfile_info</a>   *pInfo;
-<a name="l00842"></a>00842         <span class="keywordtype">double</span>          dScaleFactor;
-<a name="l00843"></a>00843         BOOL            bMore;
-<a name="l00844"></a>00844 
-<a name="l00845"></a>00845         TRACE_MSG(<span class="stringliteral">&quot;bRedrawMainWindow&quot;</span>);
-<a name="l00846"></a>00846 
-<a name="l00847"></a>00847         fail(pEvent == NULL);
-<a name="l00848"></a>00848         fail(pEvent-&gt;type != event_REDRAW);
-<a name="l00849"></a>00849         fail(pvReference == NULL);
-<a name="l00850"></a>00850 
-<a name="l00851"></a>00851         pDiag = (diagram_type *)pvReference;
-<a name="l00852"></a>00852 
-<a name="l00853"></a>00853         fail(pDiag-&gt;tMainWindow != pEvent-&gt;data.openblock.window);
-<a name="l00854"></a>00854         fail(pDiag-&gt;iScaleFactorCurr &lt; MIN_SCALE_FACTOR);
-<a name="l00855"></a>00855         fail(pDiag-&gt;iScaleFactorCurr &gt; MAX_SCALE_FACTOR);
-<a name="l00856"></a>00856 
-<a name="l00857"></a>00857         dScaleFactor = (double)pDiag-&gt;iScaleFactorCurr / 100.0;
-<a name="l00858"></a>00858         pInfo = &amp;pDiag-&gt;tInfo;
-<a name="l00859"></a>00859 
-<a name="l00860"></a>00860         tBlock.window = pEvent-&gt;data.openblock.window;
-<a name="l00861"></a>00861         Error_CheckFatal(Wimp_RedrawWindow(&amp;tBlock, &amp;bMore));
-<a name="l00862"></a>00862 
-<a name="l00863"></a>00863         <span class="comment">/* If there is no real diagram just go thru the motions */</span>
-<a name="l00864"></a>00864         <span class="keywordflow">while</span> (bMore) {
-<a name="l00865"></a>00865                 <span class="keywordflow">if</span> (pInfo-&gt;data != NULL &amp;&amp; pInfo-&gt;length != 0) {
-<a name="l00866"></a>00866                         Error_CheckFatal(Drawfile_RenderDiagram(pInfo,
-<a name="l00867"></a>00867                                                 &amp;tBlock, dScaleFactor));
-<a name="l00868"></a>00868                 }
-<a name="l00869"></a>00869                 Error_CheckFatal(Wimp_GetRectangle(&amp;tBlock, &amp;bMore));
-<a name="l00870"></a>00870         }
-<a name="l00871"></a>00871         <span class="keywordflow">return</span> TRUE;
-<a name="l00872"></a>00872 } <span class="comment">/* end of bRedrawMainWindow */</span>
-<a name="l00873"></a>00873 
-<a name="l00874"></a>00874 <span class="comment">/*</span>
-<a name="l00875"></a>00875 <span class="comment"> * bScaleOpenAction - action to be taken when the Scale view window opens</span>
-<a name="l00876"></a>00876 <span class="comment"> */</span>
-<a name="l00877"></a>00877 BOOL
-<a name="l00878"></a>00878 bScaleOpenAction(event_pollblock *pEvent, <span class="keywordtype">void</span> *pvReference)
-<a name="l00879"></a>00879 {
-<a name="l00880"></a>00880         window_state    tWindowState;
-<a name="l00881"></a>00881         diagram_type    *pDiag;
-<a name="l00882"></a>00882 
-<a name="l00883"></a>00883         TRACE_MSG(<span class="stringliteral">&quot;bScaleOpenAction&quot;</span>);
-<a name="l00884"></a>00884 
-<a name="l00885"></a>00885         fail(pEvent == NULL);
-<a name="l00886"></a>00886         fail(pEvent-&gt;type != event_SEND);
-<a name="l00887"></a>00887         fail(pEvent-&gt;data.message.header.action != message_MENUWARN);
-<a name="l00888"></a>00888         fail(pvReference == NULL);
-<a name="l00889"></a>00889 
-<a name="l00890"></a>00890         pDiag = (diagram_type *)pvReference;
-<a name="l00891"></a>00891 
-<a name="l00892"></a>00892         <span class="keywordflow">if</span> (menu_currentopen != pDiag-&gt;pSaveMenu ||
-<a name="l00893"></a>00893             pEvent-&gt;data.message.data.menuwarn.selection[0] != SAVEMENU_SCALEVIEW) {
-<a name="l00894"></a>00894                 <span class="keywordflow">return</span> FALSE;
-<a name="l00895"></a>00895         }
-<a name="l00896"></a>00896 
-<a name="l00897"></a>00897         Error_CheckFatal(Wimp_GetWindowState(pDiag-&gt;tScaleWindow,
-<a name="l00898"></a>00898                                                 &amp;tWindowState));
-<a name="l00899"></a>00899         <span class="keywordflow">if</span> (tWindowState.flags.data.open) {
-<a name="l00900"></a>00900                 <span class="comment">/* The window is already open */</span>
-<a name="l00901"></a>00901                 <span class="keywordflow">return</span> TRUE;
-<a name="l00902"></a>00902         }
-<a name="l00903"></a>00903 
-<a name="l00904"></a>00904         DBG_MSG(<span class="stringliteral">&quot;vScaleOpenAction for real&quot;</span>);
-<a name="l00905"></a>00905 
-<a name="l00906"></a>00906         pDiag-&gt;iScaleFactorTemp = pDiag-&gt;iScaleFactorCurr;
-<a name="l00907"></a>00907         vUpdateWriteableNumber(pDiag-&gt;tScaleWindow,
-<a name="l00908"></a>00908                         SCALE_SCALE_WRITEABLE, pDiag-&gt;iScaleFactorTemp);
-<a name="l00909"></a>00909         Window_Show(pDiag-&gt;tScaleWindow, open_UNDERPOINTER);
-<a name="l00910"></a>00910         <span class="keywordflow">return</span> TRUE;
-<a name="l00911"></a>00911 } <span class="comment">/* end of bScaleOpenAction */</span>
-<a name="l00912"></a>00912 
-<a name="l00913"></a>00913 <span class="comment">/*</span>
-<a name="l00914"></a>00914 <span class="comment"> * vSetTitle - set the title of a window</span>
-<a name="l00915"></a>00915 <span class="comment"> */</span>
-<a name="l00916"></a>00916 <span class="keywordtype">void</span>
-<a name="l00917"></a>00917 vSetTitle(diagram_type *pDiag)
-<a name="l00918"></a>00918 {
-<a name="l00919"></a>00919         <span class="keywordtype">char</span>    szTitle[WINDOW_TITLE_LEN];
-<a name="l00920"></a>00920 
-<a name="l00921"></a>00921         TRACE_MSG(<span class="stringliteral">&quot;vSetTitle&quot;</span>);
-<a name="l00922"></a>00922 
-<a name="l00923"></a>00923         fail(pDiag == NULL);
-<a name="l00924"></a>00924         fail(pDiag-&gt;szFilename[0] == <span class="charliteral">&#39;\0&#39;</span>);
-<a name="l00925"></a>00925 
-<a name="l00926"></a>00926         (void)sprintf(szTitle, <span class="stringliteral">&quot;%.*s at %d%%&quot;</span>,
-<a name="l00927"></a>00927                                 FILENAME_TITLE_LEN,
-<a name="l00928"></a>00928                                 pDiag-&gt;szFilename,
-<a name="l00929"></a>00929                                 pDiag-&gt;iScaleFactorCurr % 1000);
-<a name="l00930"></a>00930         <span class="keywordflow">if</span> (strlen(pDiag-&gt;szFilename) &gt; FILENAME_TITLE_LEN) {
-<a name="l00931"></a>00931                 szTitle[FILENAME_TITLE_LEN - 1] = OUR_ELLIPSIS;
-<a name="l00932"></a>00932         }
-<a name="l00933"></a>00933 
-<a name="l00934"></a>00934         Window_SetTitle(pDiag-&gt;tMainWindow, szTitle);
-<a name="l00935"></a>00935 } <span class="comment">/* end of vSetTitle */</span>
-<a name="l00936"></a>00936 
-<a name="l00937"></a>00937 <span class="comment">/*</span>
-<a name="l00938"></a>00938 <span class="comment"> * vScaleButtonClick - handle a mouse button click in the Scale view window</span>
-<a name="l00939"></a>00939 <span class="comment"> */</span>
-<a name="l00940"></a>00940 <span class="keywordtype">void</span>
-<a name="l00941"></a>00941 vScaleButtonClick(mouse_block *pMouse, diagram_type *pDiag)
-<a name="l00942"></a>00942 {
-<a name="l00943"></a>00943         BOOL    bCloseWindow, bRedraw;
-<a name="l00944"></a>00944 
-<a name="l00945"></a>00945         TRACE_MSG(<span class="stringliteral">&quot;vScaleButtonClick&quot;</span>);
-<a name="l00946"></a>00946 
-<a name="l00947"></a>00947         fail(pMouse == NULL || pDiag == NULL);
-<a name="l00948"></a>00948         fail(pMouse-&gt;window != pDiag-&gt;tScaleWindow);
-<a name="l00949"></a>00949 
-<a name="l00950"></a>00950         bCloseWindow = FALSE;
-<a name="l00951"></a>00951         bRedraw = FALSE;
-<a name="l00952"></a>00952         <span class="keywordflow">switch</span> (pMouse-&gt;icon) {
-<a name="l00953"></a>00953         <span class="keywordflow">case</span> SCALE_CANCEL_BUTTON:
-<a name="l00954"></a>00954                 bCloseWindow = TRUE;
-<a name="l00955"></a>00955                 pDiag-&gt;iScaleFactorTemp = pDiag-&gt;iScaleFactorCurr;
-<a name="l00956"></a>00956                 <span class="keywordflow">break</span>;
-<a name="l00957"></a>00957         <span class="keywordflow">case</span> SCALE_SCALE_BUTTON:
-<a name="l00958"></a>00958                 bCloseWindow = TRUE;
-<a name="l00959"></a>00959                 bRedraw = pDiag-&gt;iScaleFactorCurr != pDiag-&gt;iScaleFactorTemp;
-<a name="l00960"></a>00960                 pDiag-&gt;iScaleFactorCurr = pDiag-&gt;iScaleFactorTemp;
-<a name="l00961"></a>00961                 <span class="keywordflow">break</span>;
-<a name="l00962"></a>00962         <span class="keywordflow">case</span> SCALE_50_PCT:
-<a name="l00963"></a>00963                 pDiag-&gt;iScaleFactorTemp = 50;
-<a name="l00964"></a>00964                 <span class="keywordflow">break</span>;
-<a name="l00965"></a>00965         <span class="keywordflow">case</span> SCALE_75_PCT:
-<a name="l00966"></a>00966                 pDiag-&gt;iScaleFactorTemp = 75;
-<a name="l00967"></a>00967                 <span class="keywordflow">break</span>;
-<a name="l00968"></a>00968         <span class="keywordflow">case</span> SCALE_100_PCT:
-<a name="l00969"></a>00969                 pDiag-&gt;iScaleFactorTemp = 100;
-<a name="l00970"></a>00970                 <span class="keywordflow">break</span>;
-<a name="l00971"></a>00971         <span class="keywordflow">case</span> SCALE_150_PCT:
-<a name="l00972"></a>00972                 pDiag-&gt;iScaleFactorTemp = 150;
-<a name="l00973"></a>00973                 <span class="keywordflow">break</span>;
-<a name="l00974"></a>00974         <span class="keywordflow">default</span>:
-<a name="l00975"></a>00975                 DBG_DEC(pMouse-&gt;icon);
-<a name="l00976"></a>00976                 <span class="keywordflow">break</span>;
-<a name="l00977"></a>00977         }
-<a name="l00978"></a>00978         <span class="keywordflow">if</span> (bCloseWindow) {
-<a name="l00979"></a>00979                 <span class="comment">/* Close the scale window */</span>
-<a name="l00980"></a>00980                 Error_CheckFatal(Wimp_CloseWindow(pMouse-&gt;window));
-<a name="l00981"></a>00981                 <span class="keywordflow">if</span> (bRedraw) {
-<a name="l00982"></a>00982                         <span class="comment">/* Redraw the main window */</span>
-<a name="l00983"></a>00983                         vSetTitle(pDiag);
-<a name="l00984"></a>00984                         vForceRedraw(pDiag);
-<a name="l00985"></a>00985                 }
-<a name="l00986"></a>00986         } <span class="keywordflow">else</span> {
-<a name="l00987"></a>00987                 vUpdateWriteableNumber(pMouse-&gt;window,
-<a name="l00988"></a>00988                                 SCALE_SCALE_WRITEABLE,
-<a name="l00989"></a>00989                                 pDiag-&gt;iScaleFactorTemp);
-<a name="l00990"></a>00990         }
-<a name="l00991"></a>00991 } <span class="comment">/* end of vScaleButtonClick */</span>
-<a name="l00992"></a>00992 
-<a name="l00993"></a>00993 <span class="comment">/*</span>
-<a name="l00994"></a>00994 <span class="comment"> * bScaleKeyPressed - handle pressed keys for the scale window</span>
-<a name="l00995"></a>00995 <span class="comment"> */</span>
-<a name="l00996"></a>00996 BOOL
-<a name="l00997"></a>00997 bScaleKeyPressed(event_pollblock *pEvent, <span class="keywordtype">void</span> *pvReference)
-<a name="l00998"></a>00998 {
-<a name="l00999"></a>00999         icon_block      tIcon;
-<a name="l01000"></a>01000         diagram_type    *pDiag;
-<a name="l01001"></a>01001         caret_block     *pCaret;
-<a name="l01002"></a>01002         <span class="keywordtype">char</span>            *pcChar;
-<a name="l01003"></a>01003         <span class="keywordtype">int</span>             iTmp;
-<a name="l01004"></a>01004 
-<a name="l01005"></a>01005         TRACE_MSG(<span class="stringliteral">&quot;bScaleKeyPressed&quot;</span>);
-<a name="l01006"></a>01006 
-<a name="l01007"></a>01007         fail(pEvent == NULL);
-<a name="l01008"></a>01008         fail(pEvent-&gt;type != event_KEY);
-<a name="l01009"></a>01009         fail(pvReference == NULL);
-<a name="l01010"></a>01010 
-<a name="l01011"></a>01011         pCaret = &amp;pEvent-&gt;data.key.caret;
-<a name="l01012"></a>01012         pDiag = (diagram_type *)pvReference;
-<a name="l01013"></a>01013 
-<a name="l01014"></a>01014         fail(pEvent-&gt;data.key.caret.window != pDiag-&gt;tScaleWindow);
-<a name="l01015"></a>01015 
-<a name="l01016"></a>01016         DBG_DEC_C(pCaret-&gt;icon != SCALE_SCALE_WRITEABLE, pCaret-&gt;icon);
-<a name="l01017"></a>01017         DBG_DEC_C(pCaret-&gt;icon == SCALE_SCALE_WRITEABLE, pEvent-&gt;data.key.code);
-<a name="l01018"></a>01018 
-<a name="l01019"></a>01019         <span class="keywordflow">if</span> (pEvent-&gt;data.key.code != <span class="charliteral">&#39;\r&#39;</span> ||
-<a name="l01020"></a>01020             pCaret-&gt;icon != SCALE_SCALE_WRITEABLE) {
-<a name="l01021"></a>01021                 Error_CheckFatal(Wimp_ProcessKey(pEvent-&gt;data.key.code));
-<a name="l01022"></a>01022                 <span class="keywordflow">return</span> TRUE;
-<a name="l01023"></a>01023         }
-<a name="l01024"></a>01024 
-<a name="l01025"></a>01025         Error_CheckFatal(Wimp_GetIconState(pCaret-&gt;window, pCaret-&gt;icon, &amp;tIcon));
-<a name="l01026"></a>01026         <span class="keywordflow">if</span> (!tIcon.flags.data.text || !tIcon.flags.data.indirected) {
-<a name="l01027"></a>01027                 werr(1, <span class="stringliteral">&quot;Icon %d must be indirected text&quot;</span>, (<span class="keywordtype">int</span>)pCaret-&gt;icon);
-<a name="l01028"></a>01028         }
-<a name="l01029"></a>01029         iTmp = (int)strtol(tIcon.data.indirecttext.buffer, &amp;pcChar, 10);
-<a name="l01030"></a>01030         <span class="keywordflow">if</span> (*pcChar != <span class="charliteral">&#39;\0&#39;</span> &amp;&amp; *pcChar != <span class="charliteral">&#39;\r&#39;</span>) {
-<a name="l01031"></a>01031                 DBG_DEC(*pcChar);
-<a name="l01032"></a>01032         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (iTmp &lt; MIN_SCALE_FACTOR) {
-<a name="l01033"></a>01033                 pDiag-&gt;iScaleFactorTemp = MIN_SCALE_FACTOR;
-<a name="l01034"></a>01034         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (iTmp &gt; MAX_SCALE_FACTOR) {
-<a name="l01035"></a>01035                 pDiag-&gt;iScaleFactorTemp = MAX_SCALE_FACTOR;
-<a name="l01036"></a>01036         } <span class="keywordflow">else</span> {
-<a name="l01037"></a>01037                 pDiag-&gt;iScaleFactorTemp = iTmp;
-<a name="l01038"></a>01038         }
-<a name="l01039"></a>01039         pDiag-&gt;iScaleFactorCurr = pDiag-&gt;iScaleFactorTemp;
-<a name="l01040"></a>01040         <span class="comment">/* Close the scale window */</span>
-<a name="l01041"></a>01041         Error_CheckFatal(Wimp_CloseWindow(pCaret-&gt;window));
-<a name="l01042"></a>01042         <span class="comment">/* Redraw the main window */</span>
-<a name="l01043"></a>01043         vSetTitle(pDiag);
-<a name="l01044"></a>01044         vForceRedraw(pDiag);
-<a name="l01045"></a>01045         <span class="keywordflow">return</span> TRUE;
-<a name="l01046"></a>01046 } <span class="comment">/* end of bScaleKeyPressed */</span>
-<a name="l01047"></a>01047 
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/draw_8h_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/inc/draw.h Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/inc/draw.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * draw.h</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2001 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Constants and macros to deal with the Draw format</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#if !defined(__draw_h)</span>
-<a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor">#define __draw_h 1</span>
-<a name="l00011"></a>00011 <span class="preprocessor"></span>
-<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;drawftypes.h&quot;</span>
-<a name="l00013"></a>00013 
-<a name="l00014"></a><a class="code" href="structdraw__jpegstrhdr__tag.html">00014</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structdraw__jpegstrhdr__tag.html">draw_jpegstrhdr_tag</a> {
-<a name="l00015"></a>00015         draw_tagtyp     tag;    <span class="comment">/* 1 word  */</span>
-<a name="l00016"></a>00016         draw_sizetyp    size;   <span class="comment">/* 1 word  */</span>
-<a name="l00017"></a>00017         draw_bboxtyp    bbox;   <span class="comment">/* 4 words */</span>
-<a name="l00018"></a>00018         <span class="keywordtype">int</span>     width;          <span class="comment">/* 1 word  */</span>
-<a name="l00019"></a>00019         <span class="keywordtype">int</span>     height;         <span class="comment">/* 1 word  */</span>
-<a name="l00020"></a>00020         <span class="keywordtype">int</span>     xdpi;           <span class="comment">/* 1 word  */</span>
-<a name="l00021"></a>00021         <span class="keywordtype">int</span>     ydpi;           <span class="comment">/* 1 word  */</span>
-<a name="l00022"></a>00022         <span class="keywordtype">int</span>     trfm[6];        <span class="comment">/* 6 words */</span>
-<a name="l00023"></a>00023         <span class="keywordtype">int</span>     len;            <span class="comment">/* 1 word  */</span>
-<a name="l00024"></a>00024 } <a class="code" href="structdraw__jpegstrhdr__tag.html">draw_jpegstrhdr</a>;
-<a name="l00025"></a>00025 
-<a name="l00026"></a><a class="code" href="structdraw__jpegstr__tag.html">00026</a> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structdraw__jpegstr__tag.html">draw_jpegstr_tag</a> {
-<a name="l00027"></a>00027         draw_tagtyp     tag;    <span class="comment">/* 1 word  */</span>
-<a name="l00028"></a>00028         draw_sizetyp    size;   <span class="comment">/* 1 word  */</span>
-<a name="l00029"></a>00029         draw_bboxtyp    bbox;   <span class="comment">/* 4 words */</span>
-<a name="l00030"></a>00030         <span class="keywordtype">int</span>     width;          <span class="comment">/* 1 word  */</span>
-<a name="l00031"></a>00031         <span class="keywordtype">int</span>     height;         <span class="comment">/* 1 word  */</span>
-<a name="l00032"></a>00032         <span class="keywordtype">int</span>     xdpi;           <span class="comment">/* 1 word  */</span>
-<a name="l00033"></a>00033         <span class="keywordtype">int</span>     ydpi;           <span class="comment">/* 1 word  */</span>
-<a name="l00034"></a>00034         <span class="keywordtype">int</span>     trfm[6];        <span class="comment">/* 6 words */</span>
-<a name="l00035"></a>00035         <span class="keywordtype">int</span>     len;            <span class="comment">/* 1 word  */</span>
-<a name="l00036"></a>00036         <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>   *jpeg;
-<a name="l00037"></a>00037 } <a class="code" href="structdraw__jpegstr__tag.html">draw_jpegstr</a>;
-<a name="l00038"></a>00038 
-<a name="l00039"></a><a class="code" href="uniondraw__image_type__tag.html">00039</a> <span class="keyword">typedef</span> <span class="keyword">union </span><a class="code" href="uniondraw__image_type__tag.html">draw_imageType_tag</a> {
-<a name="l00040"></a>00040         draw_spristr    *sprite;
-<a name="l00041"></a>00041         <a class="code" href="structdraw__jpegstr__tag.html">draw_jpegstr</a>    *jpeg;
-<a name="l00042"></a>00042         <span class="keywordtype">char</span>            *bytep;
-<a name="l00043"></a>00043         <span class="keywordtype">int</span>             *wordp;
-<a name="l00044"></a>00044 } <a class="code" href="uniondraw__image_type__tag.html">draw_imageType</a>;
-<a name="l00045"></a>00045 
-<a name="l00046"></a>00046 <span class="preprocessor">#endif </span><span class="comment">/* !__draw_h */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/drawfile_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,438 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/drawfile.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/drawfile.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * drawfile.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2005 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Functions to process with the Draw diagram</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &quot;DeskLib:Error.h&quot;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;DeskLib:SWI.h&quot;</span>
-<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;drawfile.h&quot;</span>
-<a name="l00013"></a>00013 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00014"></a>00014 
-<a name="l00015"></a>00015 <span class="preprocessor">#define DRAWFILE_OBJECT_TOO_SMALL       200</span>
-<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#define DRAWFILE_NO_TEXT                201</span>
-<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#define DRAWFILE_BAD_CHARACTER          202</span>
-<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define DRAWFILE_SMALL_MEMORY           203</span>
-<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define DRAWFILE_PATH_WITHOUT_LINES     204</span>
-<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define DRAWFILE_BAD_PATH_TYPE          205</span>
-<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define DRAWFILE_PATH_WITHOUT_END       206</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define DRAWFILE_BAD_SPRITE_SIZE        207</span>
-<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#define DRAWFILE_BAD_JPEG_SIZE          208</span>
-<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define DRAWFILE_TOO_SMALL              209</span>
-<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define DRAWFILE_NOT_A_DRAWFILE         210</span>
-<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define DRAWFILE_OBJECT_SIZE            211</span>
-<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define DRAWFILE_MANY_FONTTABLES        212</span>
-<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define DRAWFILE_TEXT_NO_FONT           213</span>
-<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define DRAWFILE_OBJECT_UNEXPECTED      214</span>
-<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define DRAWFILE_SIZE_ERROR             215</span>
-<a name="l00031"></a>00031 <span class="preprocessor"></span>
-<a name="l00032"></a>00032 <span class="keyword">typedef</span> <span class="keyword">struct </span>drawfile_error_tag {
-<a name="l00033"></a>00033         <span class="keywordtype">int</span>             iErrorNumber;
-<a name="l00034"></a>00034         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szErrorText;
-<a name="l00035"></a>00035 } drawfile_error_type;
-<a name="l00036"></a>00036 
-<a name="l00037"></a>00037 <span class="keyword">static</span> <span class="keyword">const</span> drawfile_error_type atErrors[] = {
-<a name="l00038"></a>00038         { DRAWFILE_OBJECT_TOO_SMALL, <span class="stringliteral">&quot;Object too small&quot;</span>},
-<a name="l00039"></a>00039         { DRAWFILE_NO_TEXT, <span class="stringliteral">&quot;Text object without text&quot;</span>},
-<a name="l00040"></a>00040         { DRAWFILE_BAD_CHARACTER, <span class="stringliteral">&quot;Bad character in string&quot;</span>},
-<a name="l00041"></a>00041         { DRAWFILE_SMALL_MEMORY, <span class="stringliteral">&quot;Not enough memory reserved&quot;</span>},
-<a name="l00042"></a>00042         { DRAWFILE_PATH_WITHOUT_LINES, <span class="stringliteral">&quot;This path has no lines&quot;</span>},
-<a name="l00043"></a>00043         { DRAWFILE_BAD_PATH_TYPE, <span class="stringliteral">&quot;Bad path-type in path&quot;</span>},
-<a name="l00044"></a>00044         { DRAWFILE_PATH_WITHOUT_END, <span class="stringliteral">&quot;No end of path seen&quot;</span>},
-<a name="l00045"></a>00045         { DRAWFILE_BAD_SPRITE_SIZE, <span class="stringliteral">&quot;Bad sprite size&quot;</span>},
-<a name="l00046"></a>00046         { DRAWFILE_BAD_JPEG_SIZE, <span class="stringliteral">&quot;Bad jpeg size&quot;</span>},
-<a name="l00047"></a>00047         { DRAWFILE_TOO_SMALL, <span class="stringliteral">&quot;Too small to be a drawfile&quot;</span>},
-<a name="l00048"></a>00048         { DRAWFILE_NOT_A_DRAWFILE, <span class="stringliteral">&quot;Not a drawfile&quot;</span>},
-<a name="l00049"></a>00049         { DRAWFILE_OBJECT_SIZE, <span class="stringliteral">&quot;Object with incorrect size&quot;</span>},
-<a name="l00050"></a>00050         { DRAWFILE_MANY_FONTTABLES, <span class="stringliteral">&quot;More than one font table&quot;</span>},
-<a name="l00051"></a>00051         { DRAWFILE_TEXT_NO_FONT, <span class="stringliteral">&quot;Text, but no font table seen&quot;</span>},
-<a name="l00052"></a>00052         { DRAWFILE_OBJECT_UNEXPECTED, <span class="stringliteral">&quot;Unexpected object type&quot;</span>},
-<a name="l00053"></a>00053         { DRAWFILE_SIZE_ERROR, <span class="stringliteral">&quot;Sizes don&#39;t match&quot;</span>},
-<a name="l00054"></a>00054 };
-<a name="l00055"></a>00055 
-<a name="l00056"></a>00056 
-<a name="l00057"></a>00057 <span class="comment">/*</span>
-<a name="l00058"></a>00058 <span class="comment"> * pFillError - error number to error struct</span>
-<a name="l00059"></a>00059 <span class="comment"> */</span>
-<a name="l00060"></a>00060 <span class="keyword">static</span> os_error *
-<a name="l00061"></a>00061 pFillError(<span class="keywordtype">int</span> iErrorNumber)
-<a name="l00062"></a>00062 {
-<a name="l00063"></a>00063         <span class="keyword">static</span> os_error         tError;
-<a name="l00064"></a>00064         <span class="keyword">const</span> drawfile_error_type       *pTmp;
-<a name="l00065"></a>00065         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szErrorText;
-<a name="l00066"></a>00066 
-<a name="l00067"></a>00067         szErrorText = <span class="stringliteral">&quot;Unknown error&quot;</span>;
-<a name="l00068"></a>00068         <span class="keywordflow">for</span> (pTmp = atErrors; pTmp &lt; atErrors + elementsof(atErrors); pTmp++) {
-<a name="l00069"></a>00069                 <span class="keywordflow">if</span> (iErrorNumber == pTmp-&gt;iErrorNumber) {
-<a name="l00070"></a>00070                         szErrorText = pTmp-&gt;szErrorText;
-<a name="l00071"></a>00071                         <span class="keywordflow">break</span>;
-<a name="l00072"></a>00072                 }
-<a name="l00073"></a>00073         }
-<a name="l00074"></a>00074         tError.errnum = iErrorNumber;
-<a name="l00075"></a>00075         strncpy(tError.errmess, szErrorText, <span class="keyword">sizeof</span>(tError.errmess) - 1);
-<a name="l00076"></a>00076         tError.errmess[<span class="keyword">sizeof</span>(tError.errmess) - 1] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00077"></a>00077         DBG_DEC(tError.errnum);
-<a name="l00078"></a>00078         DBG_MSG(tError.errmess);
-<a name="l00079"></a>00079         <span class="keywordflow">return</span> &amp;tError;
-<a name="l00080"></a>00080 } <span class="comment">/* end of pFillError */</span>
-<a name="l00081"></a>00081 
-<a name="l00082"></a>00082 <span class="comment">/*</span>
-<a name="l00083"></a>00083 <span class="comment"> * Drawfile_BBox - Find the bounding box of a diagram</span>
-<a name="l00084"></a>00084 <span class="comment"> */</span>
-<a name="l00085"></a>00085 os_error *
-<a name="l00086"></a>00086 Drawfile_Bbox(drawfile_bbox_flags flags,
-<a name="l00087"></a>00087         <a class="code" href="structdrawfile__diagram.html">drawfile_diagram</a> <span class="keyword">const</span> *diagram,
-<a name="l00088"></a>00088         <span class="keywordtype">int</span> size,
-<a name="l00089"></a>00089         <a class="code" href="structos__trfm.html">os_trfm</a> <span class="keyword">const</span> *trfm,
-<a name="l00090"></a>00090         wimp_box *bbox)
-<a name="l00091"></a>00091 {
-<a name="l00092"></a>00092         <span class="keywordflow">return</span> SWI(5, 0, DrawFile_BBox | XOS_Bit,
-<a name="l00093"></a>00093                 flags, diagram, size, trfm, bbox);
-<a name="l00094"></a>00094 } <span class="comment">/* end of Drawfile_Bbox */</span>
-<a name="l00095"></a>00095 
-<a name="l00096"></a>00096 <span class="comment">/*</span>
-<a name="l00097"></a>00097 <span class="comment"> * Drawfile_CreateDiagram - create an empty drawfile diagram</span>
-<a name="l00098"></a>00098 <span class="comment"> */</span>
-<a name="l00099"></a>00099 os_error *
-<a name="l00100"></a>00100 Drawfile_CreateDiagram(<a class="code" href="structdrawfile__info.html">drawfile_info</a> *pInfo, <span class="keywordtype">size_t</span> tMemorySize,
-<a name="l00101"></a>00101         <span class="keyword">const</span> <span class="keywordtype">char</span> *szCreator, wimp_box tBbox)
-<a name="l00102"></a>00102 {
-<a name="l00103"></a>00103         <a class="code" href="structdrawfile__diagram.html">drawfile_diagram</a>        *pDiag;
-<a name="l00104"></a>00104 
-<a name="l00105"></a>00105         <span class="keywordflow">if</span> (tMemorySize &lt; offsetof(<a class="code" href="structdrawfile__diagram.html">drawfile_diagram</a>, objects)) {
-<a name="l00106"></a>00106                 <span class="keywordflow">return</span> pFillError(DRAWFILE_SMALL_MEMORY);
-<a name="l00107"></a>00107         }
-<a name="l00108"></a>00108         pDiag = (<a class="code" href="structdrawfile__diagram.html">drawfile_diagram</a> *)pInfo-&gt;data;
-<a name="l00109"></a>00109         strncpy(pDiag-&gt;tag, <span class="stringliteral">&quot;Draw&quot;</span>, 4);
-<a name="l00110"></a>00110         pDiag-&gt;major_version = 201;
-<a name="l00111"></a>00111         pDiag-&gt;minor_version = 0;
-<a name="l00112"></a>00112         strncpy(pDiag-&gt;source, szCreator, <span class="keyword">sizeof</span>(pDiag-&gt;source));
-<a name="l00113"></a>00113         pDiag-&gt;bbox = tBbox;
-<a name="l00114"></a>00114         <span class="comment">/* Memory in use */</span>
-<a name="l00115"></a>00115         pInfo-&gt;length = offsetof(<a class="code" href="structdrawfile__diagram.html">drawfile_diagram</a>, objects);
-<a name="l00116"></a>00116         <span class="keywordflow">return</span> NULL;
-<a name="l00117"></a>00117 } <span class="comment">/* end of Drawfile_CreateDiagram */</span>
-<a name="l00118"></a>00118 
-<a name="l00119"></a>00119 <span class="comment">/*</span>
-<a name="l00120"></a>00120 <span class="comment"> * Drawfile_AppendObject - append an object to a diagram</span>
-<a name="l00121"></a>00121 <span class="comment"> */</span>
-<a name="l00122"></a>00122 os_error *
-<a name="l00123"></a>00123 Drawfile_AppendObject(<a class="code" href="structdrawfile__info.html">drawfile_info</a> *pInfo, <span class="keywordtype">size_t</span> tMemorySize,
-<a name="l00124"></a>00124         <span class="keyword">const</span> <a class="code" href="structdrawfile__object.html">drawfile_object</a> *pObject, BOOL bRebind)
-<a name="l00125"></a>00125 {
-<a name="l00126"></a>00126         wimp_box        *pMainBbox;
-<a name="l00127"></a>00127         <span class="keyword">const</span> wimp_box  *pBbox;
-<a name="l00128"></a>00128         byte            *pAfter;
-<a name="l00129"></a>00129 
-<a name="l00130"></a>00130         <span class="keywordflow">if</span> (tMemorySize &lt; pInfo-&gt;length + pObject-&gt;size) {
-<a name="l00131"></a>00131                 <span class="keywordflow">return</span> pFillError(DRAWFILE_OBJECT_TOO_SMALL);
-<a name="l00132"></a>00132         }
-<a name="l00133"></a>00133         <span class="comment">/* After the last object */</span>
-<a name="l00134"></a>00134         pAfter = (byte *)pInfo-&gt;data + pInfo-&gt;length;
-<a name="l00135"></a>00135         <span class="comment">/* Copy in the new data */</span>
-<a name="l00136"></a>00136         memcpy(pAfter, pObject, pObject-&gt;size);
-<a name="l00137"></a>00137         <span class="comment">/* Rebind if needed */</span>
-<a name="l00138"></a>00138         <span class="keywordflow">if</span> (bRebind) {
-<a name="l00139"></a>00139                 pMainBbox = &amp;((<a class="code" href="structdrawfile__diagram.html">drawfile_diagram</a> *)pInfo-&gt;data)-&gt;bbox;
-<a name="l00140"></a>00140                 <span class="keywordflow">switch</span> (pObject-&gt;type) {
-<a name="l00141"></a>00141                 <span class="keywordflow">case</span> drawfile_TYPE_FONT_TABLE:
-<a name="l00142"></a>00142                         pBbox = NULL;
-<a name="l00143"></a>00143                         <span class="keywordflow">break</span>;
-<a name="l00144"></a>00144                 <span class="keywordflow">case</span> drawfile_TYPE_TEXT:
-<a name="l00145"></a>00145                         pBbox = &amp;pObject-&gt;data.text.bbox;
-<a name="l00146"></a>00146                         <span class="keywordflow">break</span>;
-<a name="l00147"></a>00147                 <span class="keywordflow">case</span> drawfile_TYPE_PATH:
-<a name="l00148"></a>00148                         pBbox = &amp;pObject-&gt;data.path.bbox;
-<a name="l00149"></a>00149                         <span class="keywordflow">break</span>;
-<a name="l00150"></a>00150                 <span class="keywordflow">case</span> drawfile_TYPE_SPRITE:
-<a name="l00151"></a>00151                         pBbox = &amp;pObject-&gt;data.sprite.bbox;
-<a name="l00152"></a>00152                         <span class="keywordflow">break</span>;
-<a name="l00153"></a>00153                 <span class="keywordflow">case</span> drawfile_TYPE_GROUP:
-<a name="l00154"></a>00154                         pBbox = &amp;pObject-&gt;data.group.bbox;
-<a name="l00155"></a>00155                         <span class="keywordflow">break</span>;
-<a name="l00156"></a>00156                 <span class="keywordflow">case</span> drawfile_TYPE_TAGGED:
-<a name="l00157"></a>00157                         pBbox = &amp;pObject-&gt;data.tagged.bbox;
-<a name="l00158"></a>00158                         <span class="keywordflow">break</span>;
-<a name="l00159"></a>00159                 <span class="keywordflow">case</span> drawfile_TYPE_TEXT_AREA:
-<a name="l00160"></a>00160                         pBbox = &amp;pObject-&gt;data.text_area.bbox;
-<a name="l00161"></a>00161                         <span class="keywordflow">break</span>;
-<a name="l00162"></a>00162                 <span class="keywordflow">case</span> drawfile_TYPE_TEXT_COLUMN:
-<a name="l00163"></a>00163                         pBbox = NULL;
-<a name="l00164"></a>00164                         <span class="keywordflow">break</span>;
-<a name="l00165"></a>00165                 <span class="keywordflow">case</span> drawfile_TYPE_OPTIONS:
-<a name="l00166"></a>00166                         pBbox = &amp;pObject-&gt;data.options.bbox;
-<a name="l00167"></a>00167                         <span class="keywordflow">break</span>;
-<a name="l00168"></a>00168                 <span class="keywordflow">case</span> drawfile_TYPE_TRFM_TEXT:
-<a name="l00169"></a>00169                         pBbox = &amp;pObject-&gt;data.trfm_text.bbox;
-<a name="l00170"></a>00170                         <span class="keywordflow">break</span>;
-<a name="l00171"></a>00171                 <span class="keywordflow">case</span> drawfile_TYPE_TRFM_SPRITE:
-<a name="l00172"></a>00172                         pBbox = &amp;pObject-&gt;data.trfm_sprite.bbox;
-<a name="l00173"></a>00173                         <span class="keywordflow">break</span>;
-<a name="l00174"></a>00174                 <span class="keywordflow">case</span> drawfile_TYPE_JPEG:
-<a name="l00175"></a>00175                         pBbox = &amp;pObject-&gt;data.jpeg.bbox;
-<a name="l00176"></a>00176                         <span class="keywordflow">break</span>;
-<a name="l00177"></a>00177                 <span class="keywordflow">default</span>:
-<a name="l00178"></a>00178                         pBbox = NULL;
-<a name="l00179"></a>00179                         <span class="keywordflow">break</span>;
-<a name="l00180"></a>00180                 }
-<a name="l00181"></a>00181                 <span class="keywordflow">if</span> (pBbox != NULL) {
-<a name="l00182"></a>00182                         <span class="keywordflow">if</span> (pBbox-&gt;min.x &lt; pMainBbox-&gt;min.x) {
-<a name="l00183"></a>00183                                 pMainBbox-&gt;min.x = pBbox-&gt;min.x;
-<a name="l00184"></a>00184                         }
-<a name="l00185"></a>00185                         <span class="keywordflow">if</span> (pBbox-&gt;min.y &lt; pMainBbox-&gt;min.y) {
-<a name="l00186"></a>00186                                 pMainBbox-&gt;min.y = pBbox-&gt;min.y;
-<a name="l00187"></a>00187                         }
-<a name="l00188"></a>00188                         <span class="keywordflow">if</span> (pBbox-&gt;max.x &gt; pMainBbox-&gt;max.x) {
-<a name="l00189"></a>00189                                 pMainBbox-&gt;max.x = pBbox-&gt;max.x;
-<a name="l00190"></a>00190                         }
-<a name="l00191"></a>00191                         <span class="keywordflow">if</span> (pBbox-&gt;max.y &gt; pMainBbox-&gt;max.y) {
-<a name="l00192"></a>00192                                 pMainBbox-&gt;max.y = pBbox-&gt;max.y;
-<a name="l00193"></a>00193                         }
-<a name="l00194"></a>00194                 }
-<a name="l00195"></a>00195         }
-<a name="l00196"></a>00196         <span class="comment">/* Memory in use */</span>
-<a name="l00197"></a>00197         pInfo-&gt;length += pObject-&gt;size;
-<a name="l00198"></a>00198         <span class="keywordflow">return</span> NULL;
-<a name="l00199"></a>00199 } <span class="comment">/* end of Drawfile_AppendObject */</span>
-<a name="l00200"></a>00200 
-<a name="l00201"></a>00201 <span class="comment">/*</span>
-<a name="l00202"></a>00202 <span class="comment"> * Replaces the draw_render_diag function from RISC_OSLib</span>
-<a name="l00203"></a>00203 <span class="comment"> */</span>
-<a name="l00204"></a>00204 os_error *
-<a name="l00205"></a>00205 Drawfile_RenderDiagram(<a class="code" href="structdrawfile__info.html">drawfile_info</a> *pInfo, window_redrawblock *pRedraw,
-<a name="l00206"></a>00206         <span class="keywordtype">double</span> dScale)
-<a name="l00207"></a>00207 {
-<a name="l00208"></a>00208         <span class="keywordtype">int</span>     aiTransform[6];
-<a name="l00209"></a>00209 
-<a name="l00210"></a>00210         fail(pInfo == NULL);
-<a name="l00211"></a>00211         fail(pInfo-&gt;data == NULL);
-<a name="l00212"></a>00212         fail(pRedraw == NULL);
-<a name="l00213"></a>00213         fail(dScale &lt; 0.01);
-<a name="l00214"></a>00214 
-<a name="l00215"></a>00215         aiTransform[0] = (int)(dScale * 0x10000);
-<a name="l00216"></a>00216         aiTransform[1] = 0;
-<a name="l00217"></a>00217         aiTransform[2] = 0;
-<a name="l00218"></a>00218         aiTransform[3] = (int)(dScale * 0x10000);
-<a name="l00219"></a>00219         aiTransform[4] = (pRedraw-&gt;rect.min.x - pRedraw-&gt;scroll.x) * 256;
-<a name="l00220"></a>00220         aiTransform[5] = (pRedraw-&gt;rect.max.y - pRedraw-&gt;scroll.y) * 256;
-<a name="l00221"></a>00221 
-<a name="l00222"></a>00222         <span class="keywordflow">return</span> SWI(6, 0, DrawFile_Render | XOS_Bit,
-<a name="l00223"></a>00223                 0, pInfo-&gt;data, pInfo-&gt;length, aiTransform, &amp;pRedraw-&gt;rect, 0);
-<a name="l00224"></a>00224 } <span class="comment">/* end of Drawfile_RenderDiagram */</span>
-<a name="l00225"></a>00225 
-<a name="l00226"></a>00226 <span class="comment">/*</span>
-<a name="l00227"></a>00227 <span class="comment"> * pVerifyText - verify a text object</span>
-<a name="l00228"></a>00228 <span class="comment"> */</span>
-<a name="l00229"></a>00229 <span class="keyword">static</span> os_error *
-<a name="l00230"></a>00230 pVerifyText(<span class="keyword">const</span> <a class="code" href="structdrawfile__text.html">drawfile_text</a> *pText)
-<a name="l00231"></a>00231 {
-<a name="l00232"></a>00232         <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>     *pucTmp;
-<a name="l00233"></a>00233 
-<a name="l00234"></a>00234         <span class="keywordflow">if</span> (pText-&gt;text[0] == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00235"></a>00235                 <span class="keywordflow">return</span> pFillError(DRAWFILE_NO_TEXT);
-<a name="l00236"></a>00236         }
-<a name="l00237"></a>00237         pucTmp = (<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *)pText-&gt;text;
-<a name="l00238"></a>00238         while (*pucTmp != <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00239"></a>00239                 <span class="keywordflow">if</span> (*pucTmp &lt; 0x20 || *pucTmp == 0x7f) {
-<a name="l00240"></a>00240                         <span class="keywordflow">return</span> pFillError(DRAWFILE_BAD_CHARACTER);
-<a name="l00241"></a>00241                 }
-<a name="l00242"></a>00242                 pucTmp++;
-<a name="l00243"></a>00243         }
-<a name="l00244"></a>00244         <span class="keywordflow">return</span> NULL;
-<a name="l00245"></a>00245 } <span class="comment">/* end of pVerifyText */</span>
-<a name="l00246"></a>00246 
-<a name="l00247"></a>00247 <span class="comment">/*</span>
-<a name="l00248"></a>00248 <span class="comment"> * pVerifyPath - verify a path object</span>
-<a name="l00249"></a>00249 <span class="comment"> */</span>
-<a name="l00250"></a>00250 <span class="keyword">static</span> os_error *
-<a name="l00251"></a>00251 pVerifyPath(<span class="keyword">const</span> <a class="code" href="structdrawfile__path.html">drawfile_path</a> *pPath, <span class="keywordtype">int</span> iSize)
-<a name="l00252"></a>00252 {
-<a name="l00253"></a>00253         <span class="keyword">const</span> <span class="keywordtype">int</span>       *piTmp;
-<a name="l00254"></a>00254         <span class="keywordtype">int</span>     iElements;
-<a name="l00255"></a>00255         BOOL    bLine;
-<a name="l00256"></a>00256 
-<a name="l00257"></a>00257         bLine = FALSE;
-<a name="l00258"></a>00258         iElements = (iSize - offsetof(<a class="code" href="structdrawfile__path.html">drawfile_path</a>, path)) / 4;
-<a name="l00259"></a>00259 
-<a name="l00260"></a>00260         <span class="keywordflow">for</span> (piTmp = pPath-&gt;path; piTmp &lt; pPath-&gt;path + iElements; piTmp++) {
-<a name="l00261"></a>00261                 <span class="keywordflow">switch</span>(*piTmp) {
-<a name="l00262"></a>00262                 <span class="keywordflow">case</span> drawfile_PATH_END_PATH:
-<a name="l00263"></a>00263                         <span class="keywordflow">if</span> (bLine) {
-<a name="l00264"></a>00264                                 <span class="keywordflow">return</span> NULL;
-<a name="l00265"></a>00265                         }
-<a name="l00266"></a>00266                         <span class="keywordflow">return</span> pFillError(DRAWFILE_PATH_WITHOUT_LINES);
-<a name="l00267"></a>00267                 <span class="keywordflow">case</span> drawfile_PATH_LINE_TO:
-<a name="l00268"></a>00268                         bLine = TRUE;
-<a name="l00269"></a>00269                         piTmp += 2;
-<a name="l00270"></a>00270                         <span class="keywordflow">break</span>;
-<a name="l00271"></a>00271                 <span class="keywordflow">case</span> drawfile_PATH_MOVE_TO:
-<a name="l00272"></a>00272                         piTmp += 2;
-<a name="l00273"></a>00273                         <span class="keywordflow">break</span>;
-<a name="l00274"></a>00274                 <span class="keywordflow">case</span> drawfile_PATH_CLOSE_LINE:
-<a name="l00275"></a>00275                         bLine = TRUE;
-<a name="l00276"></a>00276                         <span class="keywordflow">break</span>;
-<a name="l00277"></a>00277                 <span class="keywordflow">default</span>:
-<a name="l00278"></a>00278                         <span class="keywordflow">return</span> pFillError(DRAWFILE_BAD_PATH_TYPE);
-<a name="l00279"></a>00279                 }
-<a name="l00280"></a>00280         }
-<a name="l00281"></a>00281         <span class="keywordflow">return</span> pFillError(DRAWFILE_PATH_WITHOUT_END);
-<a name="l00282"></a>00282 } <span class="comment">/* end of pVerifyPath */</span>
-<a name="l00283"></a>00283 
-<a name="l00284"></a>00284 <span class="comment">/*</span>
-<a name="l00285"></a>00285 <span class="comment"> * pVerifySprite - verify a sprite object</span>
-<a name="l00286"></a>00286 <span class="comment"> */</span>
-<a name="l00287"></a>00287 <span class="keyword">static</span> os_error *
-<a name="l00288"></a>00288 pVerifySprite(<span class="keyword">const</span> <a class="code" href="structdrawfile__sprite.html">drawfile_sprite</a> *pSprite, <span class="keywordtype">int</span> iSize)
-<a name="l00289"></a>00289 {
-<a name="l00290"></a>00290         iSize -= offsetof(<a class="code" href="structdrawfile__sprite.html">drawfile_sprite</a>, header);
-<a name="l00291"></a>00291         <span class="keywordflow">if</span> (iSize &lt; pSprite-&gt;header.offset_next) {
-<a name="l00292"></a>00292                 DBG_DEC(iSize);
-<a name="l00293"></a>00293                 DBG_DEC(pSprite-&gt;header.offset_next);
-<a name="l00294"></a>00294                 <span class="keywordflow">return</span> pFillError(DRAWFILE_BAD_SPRITE_SIZE);
-<a name="l00295"></a>00295         }
-<a name="l00296"></a>00296         <span class="keywordflow">return</span> NULL;
-<a name="l00297"></a>00297 } <span class="comment">/* end of pVerifySprite */</span>
-<a name="l00298"></a>00298 
-<a name="l00299"></a>00299 <span class="comment">/*</span>
-<a name="l00300"></a>00300 <span class="comment"> * pVerifyJpeg - verify a jpeg object</span>
-<a name="l00301"></a>00301 <span class="comment"> */</span>
-<a name="l00302"></a>00302 <span class="keyword">static</span> os_error *
-<a name="l00303"></a>00303 pVerifyJpeg(<span class="keyword">const</span> <a class="code" href="structdrawfile__jpeg.html">drawfile_jpeg</a> *pJpeg, <span class="keywordtype">int</span> iSize)
-<a name="l00304"></a>00304 {
-<a name="l00305"></a>00305         iSize -= offsetof(<a class="code" href="structdrawfile__jpeg.html">drawfile_jpeg</a>, data);
-<a name="l00306"></a>00306         <span class="keywordflow">if</span> (iSize &lt; pJpeg-&gt;len) {
-<a name="l00307"></a>00307                 DBG_DEC(iSize);
-<a name="l00308"></a>00308                 DBG_DEC(pJpeg-&gt;len);
-<a name="l00309"></a>00309                 <span class="keywordflow">return</span> pFillError(DRAWFILE_BAD_JPEG_SIZE);
-<a name="l00310"></a>00310         }
-<a name="l00311"></a>00311         <span class="keywordflow">return</span> NULL;
-<a name="l00312"></a>00312 } <span class="comment">/* end of pVerifyJpeg */</span>
-<a name="l00313"></a>00313 
-<a name="l00314"></a>00314 <span class="comment">/*</span>
-<a name="l00315"></a>00315 <span class="comment"> * Drawfile_VerifyDiagram - Verify the diagram generated from the Word file</span>
-<a name="l00316"></a>00316 <span class="comment"> *</span>
-<a name="l00317"></a>00317 <span class="comment"> * returns NULL if the diagram is correct</span>
-<a name="l00318"></a>00318 <span class="comment"> */</span>
-<a name="l00319"></a>00319 os_error *
-<a name="l00320"></a>00320 Drawfile_VerifyDiagram(<a class="code" href="structdrawfile__info.html">drawfile_info</a> *pInfo)
-<a name="l00321"></a>00321 {
-<a name="l00322"></a>00322         <a class="code" href="structdrawfile__diagram.html">drawfile_diagram</a>        *pDiag;
-<a name="l00323"></a>00323         <a class="code" href="structdrawfile__object.html">drawfile_object</a> *pObj;
-<a name="l00324"></a>00324         os_error        *pError;
-<a name="l00325"></a>00325         <span class="keyword">const</span> <span class="keywordtype">char</span>      *pcTmp;
-<a name="l00326"></a>00326         <span class="keywordtype">int</span>             iToGo, iFontTables;
-<a name="l00327"></a>00327         BOOL            bTypeFontTable;
-<a name="l00328"></a>00328 
-<a name="l00329"></a>00329         TRACE_MSG(<span class="stringliteral">&quot;Drawfile_VerifyDiagram&quot;</span>);
-<a name="l00330"></a>00330 
-<a name="l00331"></a>00331         fail(pInfo == NULL);
-<a name="l00332"></a>00332 
-<a name="l00333"></a>00333         <span class="keywordflow">if</span> (pInfo-&gt;length &lt; offsetof(<a class="code" href="structdrawfile__diagram.html">drawfile_diagram</a>, objects)) {
-<a name="l00334"></a>00334                 <span class="keywordflow">return</span> pFillError(DRAWFILE_TOO_SMALL);
-<a name="l00335"></a>00335         }
-<a name="l00336"></a>00336 
-<a name="l00337"></a>00337         pDiag = (<a class="code" href="structdrawfile__diagram.html">drawfile_diagram</a> *)pInfo-&gt;data;
-<a name="l00338"></a>00338         if (strncmp(pDiag-&gt;tag, <span class="stringliteral">&quot;Draw&quot;</span>, 4) != 0 ||
-<a name="l00339"></a>00339             pDiag-&gt;major_version != 201 ||
-<a name="l00340"></a>00340             pDiag-&gt;minor_version != 0) {
-<a name="l00341"></a>00341                 <span class="keywordflow">return</span> pFillError(DRAWFILE_NOT_A_DRAWFILE);
-<a name="l00342"></a>00342         }
-<a name="l00343"></a>00343 
-<a name="l00344"></a>00344         iToGo = pInfo-&gt;length - offsetof(<a class="code" href="structdrawfile__diagram.html">drawfile_diagram</a>, objects);
-<a name="l00345"></a>00345         pcTmp = (<span class="keyword">const</span> <span class="keywordtype">char</span> *)pInfo-&gt;data + offsetof(<a class="code" href="structdrawfile__diagram.html">drawfile_diagram</a>, objects);
-<a name="l00346"></a>00346         iFontTables = 0;
-<a name="l00347"></a>00347         bTypeFontTable = FALSE;
-<a name="l00348"></a>00348 
-<a name="l00349"></a>00349         <span class="keywordflow">while</span> (iToGo &gt; 0) {
-<a name="l00350"></a>00350                 pObj = (<a class="code" href="structdrawfile__object.html">drawfile_object</a> *)pcTmp;
-<a name="l00351"></a>00351                 <span class="keywordflow">if</span> (pObj-&gt;size &lt; 0 || pObj-&gt;size % 4 != 0) {
-<a name="l00352"></a>00352                         <span class="keywordflow">return</span> pFillError(DRAWFILE_OBJECT_SIZE);
-<a name="l00353"></a>00353                 }
-<a name="l00354"></a>00354                 <span class="keywordflow">switch</span> (pObj-&gt;type) {
-<a name="l00355"></a>00355                 <span class="keywordflow">case</span> drawfile_TYPE_FONT_TABLE:
-<a name="l00356"></a>00356                         <span class="keywordflow">if</span> (bTypeFontTable) {
-<a name="l00357"></a>00357                                 <span class="keywordflow">return</span> pFillError(DRAWFILE_MANY_FONTTABLES);
-<a name="l00358"></a>00358                         }
-<a name="l00359"></a>00359                         bTypeFontTable = TRUE;
-<a name="l00360"></a>00360                         <span class="keywordflow">break</span>;
-<a name="l00361"></a>00361                 <span class="keywordflow">case</span> drawfile_TYPE_TEXT:
-<a name="l00362"></a>00362                         <span class="keywordflow">if</span> (pObj-&gt;data.text.style.font_ref != 0 &amp;&amp;
-<a name="l00363"></a>00363                             !bTypeFontTable) {
-<a name="l00364"></a>00364                                 <span class="keywordflow">return</span> pFillError(DRAWFILE_TEXT_NO_FONT);
-<a name="l00365"></a>00365                         }
-<a name="l00366"></a>00366                         pError = pVerifyText(&amp;pObj-&gt;data.text);
-<a name="l00367"></a>00367                         <span class="keywordflow">if</span> (pError != NULL) {
-<a name="l00368"></a>00368                                 <span class="keywordflow">return</span> pError;
-<a name="l00369"></a>00369                         }
-<a name="l00370"></a>00370                         <span class="keywordflow">break</span>;
-<a name="l00371"></a>00371                 <span class="keywordflow">case</span> drawfile_TYPE_PATH:
-<a name="l00372"></a>00372                         pError = pVerifyPath(&amp;pObj-&gt;data.path,
-<a name="l00373"></a>00373                                 pObj-&gt;size - offsetof(<a class="code" href="structdrawfile__object.html">drawfile_object</a>, data));
-<a name="l00374"></a>00374                         <span class="keywordflow">if</span> (pError != NULL) {
-<a name="l00375"></a>00375                                 <span class="keywordflow">return</span> pError;
-<a name="l00376"></a>00376                         }
-<a name="l00377"></a>00377                         <span class="keywordflow">break</span>;
-<a name="l00378"></a>00378                 <span class="keywordflow">case</span> drawfile_TYPE_SPRITE:
-<a name="l00379"></a>00379                         pError = pVerifySprite(&amp;pObj-&gt;data.sprite,
-<a name="l00380"></a>00380                                 pObj-&gt;size - offsetof(<a class="code" href="structdrawfile__object.html">drawfile_object</a>, data));
-<a name="l00381"></a>00381                         <span class="keywordflow">if</span> (pError != NULL) {
-<a name="l00382"></a>00382                                 <span class="keywordflow">return</span> pError;
-<a name="l00383"></a>00383                         }
-<a name="l00384"></a>00384                         <span class="keywordflow">break</span>;
-<a name="l00385"></a>00385                 <span class="keywordflow">case</span> drawfile_TYPE_JPEG:
-<a name="l00386"></a>00386                         pError = pVerifyJpeg(&amp;pObj-&gt;data.jpeg,
-<a name="l00387"></a>00387                                 pObj-&gt;size - offsetof(<a class="code" href="structdrawfile__object.html">drawfile_object</a>, data));
-<a name="l00388"></a>00388                         <span class="keywordflow">if</span> (pError != NULL) {
-<a name="l00389"></a>00389                                 <span class="keywordflow">return</span> pError;
-<a name="l00390"></a>00390                         }
-<a name="l00391"></a>00391                         <span class="keywordflow">break</span>;
-<a name="l00392"></a>00392                 <span class="keywordflow">default</span>:
-<a name="l00393"></a>00393                         DBG_DEC(pObj-&gt;type);
-<a name="l00394"></a>00394                         <span class="keywordflow">return</span> pFillError(DRAWFILE_OBJECT_UNEXPECTED);
-<a name="l00395"></a>00395                 }
-<a name="l00396"></a>00396                 pcTmp += pObj-&gt;size;
-<a name="l00397"></a>00397                 iToGo -= pObj-&gt;size;
-<a name="l00398"></a>00398         }
-<a name="l00399"></a>00399         <span class="keywordflow">if</span> (iToGo &lt; 0) {
-<a name="l00400"></a>00400                 <span class="keywordflow">return</span> pFillError(DRAWFILE_SIZE_ERROR);
-<a name="l00401"></a>00401         }
-<a name="l00402"></a>00402         <span class="keywordflow">return</span> NULL;
-<a name="l00403"></a>00403 } <span class="comment">/* end of Drawfile_VerifyDiagram */</span>
-<a name="l00404"></a>00404 
-<a name="l00405"></a>00405 <span class="comment">/*</span>
-<a name="l00406"></a>00406 <span class="comment"> * Drawfile_QueryBox - Find the bounding box of a diagram</span>
-<a name="l00407"></a>00407 <span class="comment"> */</span>
-<a name="l00408"></a>00408 <span class="keywordtype">void</span>
-<a name="l00409"></a>00409 Drawfile_QueryBox(<a class="code" href="structdrawfile__info.html">drawfile_info</a> *pInfo, wimp_box *pRect, BOOL bScreenUnits)
-<a name="l00410"></a>00410 {
-<a name="l00411"></a>00411         fail(pInfo == NULL);
-<a name="l00412"></a>00412         fail(pRect == NULL);
-<a name="l00413"></a>00413 
-<a name="l00414"></a>00414         Error_CheckFatal(Drawfile_Bbox(0,
-<a name="l00415"></a>00415                 pInfo-&gt;data, pInfo-&gt;length, NULL, pRect));
-<a name="l00416"></a>00416         <span class="keywordflow">if</span> (bScreenUnits) {
-<a name="l00417"></a>00417                 pRect-&gt;min.x = Drawfile_DrawToScreen(pRect-&gt;min.x);
-<a name="l00418"></a>00418                 pRect-&gt;min.y = Drawfile_DrawToScreen(pRect-&gt;min.y);
-<a name="l00419"></a>00419                 pRect-&gt;max.x = Drawfile_DrawToScreen(pRect-&gt;max.x);
-<a name="l00420"></a>00420                 pRect-&gt;max.y = Drawfile_DrawToScreen(pRect-&gt;max.y);
-<a name="l00421"></a>00421         }
-<a name="l00422"></a>00422 } <span class="comment">/* end of Drawfile_QueryBox */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/drawfile_8h_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,449 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/inc/drawfile.h Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/inc/drawfile.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * drawfile.h</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2005 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Include file to deal with drawfiles</span>
-<a name="l00007"></a>00007 <span class="comment"> *</span>
-<a name="l00008"></a>00008 <span class="comment"> * Based on:</span>
-<a name="l00009"></a>00009 <span class="comment"> * C header file for DrawFile</span>
-<a name="l00010"></a>00010 <span class="comment"> * written by DefMod (May  4 2004) on Tue May  4 13:34:17 2004</span>
-<a name="l00011"></a>00011 <span class="comment"> * Jonathan Coxhead, jonathan@doves.demon.co.uk, 21 Aug 1995</span>
-<a name="l00012"></a>00012 <span class="comment"> * OSLib---efficient, type-safe, transparent, extensible,</span>
-<a name="l00013"></a>00013 <span class="comment"> * register-safe A P I coverage of RISC O S</span>
-<a name="l00014"></a>00014 <span class="comment"> * Copyright (C) 1994 Jonathan Coxhead</span>
-<a name="l00015"></a>00015 <span class="comment"> *</span>
-<a name="l00016"></a>00016 <span class="comment"> * All credit should go to him, but all the bugs are mine</span>
-<a name="l00017"></a>00017 <span class="comment"> */</span>
-<a name="l00018"></a>00018 
-<a name="l00019"></a>00019 <span class="preprocessor">#if !defined(__drawfile_h)</span>
-<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define __drawfile_h</span>
-<a name="l00021"></a>00021 <span class="preprocessor"></span>
-<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;DeskLib:Sprite.h&quot;</span>
-<a name="l00023"></a>00023 <span class="preprocessor">#include &quot;DeskLib:Wimp.h&quot;</span>
-<a name="l00024"></a>00024 
-<a name="l00025"></a>00025 <span class="preprocessor">#if !defined(BOOL)</span>
-<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define BOOL int</span>
-<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define TRUE 1</span>
-<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define FALSE 0</span>
-<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* !BOOL */</span>
-<a name="l00030"></a>00030 
-<a name="l00031"></a>00031 <span class="comment">/*********************</span>
-<a name="l00032"></a>00032 <span class="comment"> * Conversion macros *</span>
-<a name="l00033"></a>00033 <span class="comment"> *********************/</span>
-<a name="l00034"></a>00034 <span class="preprocessor">#define Drawfile_DrawToScreen(i) ((i) / 256)</span>
-<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#define Drawfile_ScreenToDraw(i) ((i) * 256)</span>
-<a name="l00036"></a>00036 <span class="preprocessor"></span>
-<a name="l00037"></a>00037 <span class="comment">/**********************************</span>
-<a name="l00038"></a>00038 <span class="comment"> * SWI names and SWI reason codes *</span>
-<a name="l00039"></a>00039 <span class="comment"> **********************************/</span>
-<a name="l00040"></a>00040 <span class="preprocessor">#define DrawFile_Render                         0x45540</span>
-<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#define DrawFile_BBox                           0x45541</span>
-<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#define DrawFile_DeclareFonts                   0x45542</span>
-<a name="l00043"></a>00043 <span class="preprocessor"></span>
-<a name="l00044"></a>00044 <span class="comment">/********************</span>
-<a name="l00045"></a>00045 <span class="comment"> * Type definitions *</span>
-<a name="l00046"></a>00046 <span class="comment"> ********************/</span>
-<a name="l00047"></a>00047 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>                            bits;
-<a name="l00048"></a>00048 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>                           byte;
-<a name="l00049"></a>00049 
-<a name="l00050"></a>00050 <span class="keyword">typedef</span> byte drawfile_fontref;
-<a name="l00051"></a>00051 
-<a name="l00052"></a>00052 <span class="keyword">typedef</span> byte drawfile_path_style_flags;
-<a name="l00053"></a>00053 
-<a name="l00054"></a>00054 <span class="keyword">typedef</span> bits drawfile_text_flags;
-<a name="l00055"></a>00055 
-<a name="l00056"></a>00056 <span class="keyword">typedef</span> bits drawfile_render_flags;
-<a name="l00057"></a>00057 
-<a name="l00058"></a>00058 <span class="keyword">typedef</span> bits drawfile_declare_fonts_flags;
-<a name="l00059"></a>00059 
-<a name="l00060"></a>00060 <span class="keyword">typedef</span> bits drawfile_paper_options;
-<a name="l00061"></a>00061 
-<a name="l00062"></a>00062 <span class="keyword">typedef</span> bits drawfile_entry_mode;
-<a name="l00063"></a>00063 
-<a name="l00064"></a>00064 <span class="keyword">typedef</span> <span class="keyword">enum</span> {
-<a name="l00065"></a>00065   drawfile_TYPE_FONT_TABLE = 0,
-<a name="l00066"></a>00066   drawfile_TYPE_TEXT = 1,
-<a name="l00067"></a>00067   drawfile_TYPE_PATH = 2,
-<a name="l00068"></a>00068   drawfile_TYPE_SPRITE = 5,
-<a name="l00069"></a>00069   drawfile_TYPE_GROUP = 6,
-<a name="l00070"></a>00070   drawfile_TYPE_TAGGED = 7,
-<a name="l00071"></a>00071   drawfile_TYPE_TEXT_AREA = 9,
-<a name="l00072"></a>00072   drawfile_TYPE_TEXT_COLUMN = 10,
-<a name="l00073"></a>00073   drawfile_TYPE_OPTIONS = 11,
-<a name="l00074"></a>00074   drawfile_TYPE_TRFM_TEXT = 12,
-<a name="l00075"></a>00075   drawfile_TYPE_TRFM_SPRITE = 13,
-<a name="l00076"></a>00076   drawfile_TYPE_JPEG = 16
-<a name="l00077"></a>00077 } drawfile_type;
-<a name="l00078"></a>00078 
-<a name="l00079"></a>00079 <span class="keyword">typedef</span> <span class="keyword">enum</span> {
-<a name="l00080"></a>00080   drawfile_PATH_END_PATH = 0,
-<a name="l00081"></a>00081   drawfile_PATH_CONTINUATION = 1,
-<a name="l00082"></a>00082   drawfile_PATH_MOVE_TO = 2,
-<a name="l00083"></a>00083   drawfile_PATH_SPECIAL_MOVE_TO = 3,
-<a name="l00084"></a>00084   drawfile_PATH_CLOSE_GAP = 4,
-<a name="l00085"></a>00085   drawfile_PATH_CLOSE_LINE = 5,
-<a name="l00086"></a>00086   drawfile_PATH_BEZIER_TO = 6,
-<a name="l00087"></a>00087   drawfile_PATH_GAP_TO = 7,
-<a name="l00088"></a>00088   drawfile_PATH_LINE_TO = 8
-<a name="l00089"></a>00089 } drawfile_path_type;
-<a name="l00090"></a>00090 
-<a name="l00091"></a><a class="code" href="structdraw__dash__pattern.html">00091</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00092"></a>00092   <span class="keywordtype">int</span> start;
-<a name="l00093"></a>00093   <span class="keywordtype">int</span> element_count;
-<a name="l00094"></a>00094   <span class="keywordtype">int</span> elements [6];
-<a name="l00095"></a>00095 } <a class="code" href="structdraw__dash__pattern.html">draw_dash_pattern</a>;
-<a name="l00096"></a>00096 
-<a name="l00097"></a><a class="code" href="structos__trfm.html">00097</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00098"></a>00098   <span class="keywordtype">int</span> entries [3] [2];
-<a name="l00099"></a>00099 } <a class="code" href="structos__trfm.html">os_trfm</a>;
-<a name="l00100"></a>00100 
-<a name="l00101"></a><a class="code" href="structdrawfile__info.html">00101</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00102"></a>00102   <span class="keywordtype">void</span> *data;
-<a name="l00103"></a>00103   <span class="keywordtype">size_t</span> length;
-<a name="l00104"></a>00104 } <a class="code" href="structdrawfile__info.html">drawfile_info</a>;
-<a name="l00105"></a>00105 
-<a name="l00106"></a><a class="code" href="structdrawfile__font__def.html">00106</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00107"></a>00107   drawfile_fontref font_ref;
-<a name="l00108"></a>00108   <span class="keywordtype">char</span> font_name [1];
-<a name="l00109"></a>00109 } <a class="code" href="structdrawfile__font__def.html">drawfile_font_def</a>;
-<a name="l00110"></a>00110 
-<a name="l00111"></a><a class="code" href="structdrawfile__text__style.html">00111</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00112"></a>00112   drawfile_fontref font_ref;
-<a name="l00113"></a>00113   byte reserved [3];
-<a name="l00114"></a>00114 } <a class="code" href="structdrawfile__text__style.html">drawfile_text_style</a>;
-<a name="l00115"></a>00115 
-<a name="l00116"></a><a class="code" href="structdrawfile__path__style.html">00116</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00117"></a>00117   drawfile_path_style_flags flags;
-<a name="l00118"></a>00118   byte reserved;
-<a name="l00119"></a>00119   byte cap_width;
-<a name="l00120"></a>00120   byte cap_length;
-<a name="l00121"></a>00121 } <a class="code" href="structdrawfile__path__style.html">drawfile_path_style</a>;
-<a name="l00122"></a>00122 
-<a name="l00123"></a><a class="code" href="structdrawfile__font__table.html">00123</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00124"></a>00124   <a class="code" href="structdrawfile__font__def.html">drawfile_font_def</a> font_def[1];
-<a name="l00125"></a>00125 } <a class="code" href="structdrawfile__font__table.html">drawfile_font_table</a>;
-<a name="l00126"></a>00126 
-<a name="l00127"></a><a class="code" href="structdrawfile__text.html">00127</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00128"></a>00128   wimp_box bbox;
-<a name="l00129"></a>00129   palette_entry fill;
-<a name="l00130"></a>00130   palette_entry bg_hint;
-<a name="l00131"></a>00131   <a class="code" href="structdrawfile__text__style.html">drawfile_text_style</a> style;
-<a name="l00132"></a>00132   <span class="keywordtype">int</span> xsize;
-<a name="l00133"></a>00133   <span class="keywordtype">int</span> ysize;
-<a name="l00134"></a>00134   wimp_coord base;
-<a name="l00135"></a>00135   <span class="keywordtype">char</span> text [1];
-<a name="l00136"></a>00136 } <a class="code" href="structdrawfile__text.html">drawfile_text</a>;
-<a name="l00137"></a>00137 
-<a name="l00138"></a><a class="code" href="structdrawfile__path.html">00138</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00139"></a>00139   wimp_box bbox;
-<a name="l00140"></a>00140   palette_entry fill;
-<a name="l00141"></a>00141   palette_entry outline;
-<a name="l00142"></a>00142   <span class="keywordtype">int</span> width;
-<a name="l00143"></a>00143   <a class="code" href="structdrawfile__path__style.html">drawfile_path_style</a> style;
-<a name="l00144"></a>00144   <span class="keywordtype">int</span> path [1];
-<a name="l00145"></a>00145 } <a class="code" href="structdrawfile__path.html">drawfile_path</a>;
-<a name="l00146"></a>00146 
-<a name="l00147"></a><a class="code" href="structdrawfile__path__with__pattern.html">00147</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00148"></a>00148   wimp_box bbox;
-<a name="l00149"></a>00149   palette_entry fill;
-<a name="l00150"></a>00150   palette_entry outline;
-<a name="l00151"></a>00151   <span class="keywordtype">int</span> width;
-<a name="l00152"></a>00152   <a class="code" href="structdrawfile__path__style.html">drawfile_path_style</a> style;
-<a name="l00153"></a>00153   <a class="code" href="structdraw__dash__pattern.html">draw_dash_pattern</a> pattern;
-<a name="l00154"></a>00154   <span class="keywordtype">int</span> path [1];
-<a name="l00155"></a>00155 } <a class="code" href="structdrawfile__path__with__pattern.html">drawfile_path_with_pattern</a>;
-<a name="l00156"></a>00156 
-<a name="l00157"></a><a class="code" href="structdrawfile__sprite.html">00157</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00158"></a>00158   wimp_box bbox;
-<a name="l00159"></a>00159   sprite_header header;
-<a name="l00160"></a>00160   byte data [1];
-<a name="l00161"></a>00161 } <a class="code" href="structdrawfile__sprite.html">drawfile_sprite</a>;
-<a name="l00162"></a>00162 
-<a name="l00163"></a><a class="code" href="structdrawfile__group.html">00163</a> <span class="keyword">typedef</span> <span class="keyword">struct  </span>{
-<a name="l00164"></a>00164   wimp_box bbox;
-<a name="l00165"></a>00165   <span class="keywordtype">char</span> name [12];
-<a name="l00166"></a>00166   <span class="keywordtype">int</span> objects [1];
-<a name="l00167"></a>00167 } <a class="code" href="structdrawfile__group.html">drawfile_group</a>;
-<a name="l00168"></a>00168 
-<a name="l00169"></a><a class="code" href="structdrawfile__tagged.html">00169</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00170"></a>00170   wimp_box bbox;
-<a name="l00171"></a>00171   drawfile_type tag;
-<a name="l00172"></a>00172   <span class="keywordtype">int</span> <span class="keywordtype">object</span> [1];
-<a name="l00173"></a>00173 } <a class="code" href="structdrawfile__tagged.html">drawfile_tagged</a>;
-<a name="l00174"></a>00174 
-<a name="l00175"></a><a class="code" href="structdrawfile__text__column.html">00175</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00176"></a>00176   wimp_box box;
-<a name="l00177"></a>00177 } <a class="code" href="structdrawfile__text__column.html">drawfile_text_column</a>;
-<a name="l00178"></a>00178 
-<a name="l00179"></a><a class="code" href="structdrawfile__text__column__list.html">00179</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00180"></a>00180   <span class="keyword">struct </span>{
-<a name="l00181"></a>00181     drawfile_type type;
-<a name="l00182"></a>00182     <span class="keywordtype">int</span> size;
-<a name="l00183"></a>00183     <a class="code" href="structdrawfile__text__column.html">drawfile_text_column</a> data;
-<a name="l00184"></a>00184   } columns [1];
-<a name="l00185"></a>00185 } <a class="code" href="structdrawfile__text__column__list.html">drawfile_text_column_list</a>;
-<a name="l00186"></a>00186 
-<a name="l00187"></a><a class="code" href="structdrawfile__area__text.html">00187</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00188"></a>00188   drawfile_type type;
-<a name="l00189"></a>00189   <span class="keywordtype">int</span> reserved [2];
-<a name="l00190"></a>00190   palette_entry fill;
-<a name="l00191"></a>00191   palette_entry bg_hint;
-<a name="l00192"></a>00192   <span class="keywordtype">char</span> text [1];
-<a name="l00193"></a>00193 } <a class="code" href="structdrawfile__area__text.html">drawfile_area_text</a>;
-<a name="l00194"></a>00194 
-<a name="l00195"></a><a class="code" href="structdrawfile__text__area.html">00195</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00196"></a>00196   wimp_box bbox;
-<a name="l00197"></a>00197   <a class="code" href="structdrawfile__text__column__list.html">drawfile_text_column_list</a> header;
-<a name="l00198"></a>00198   <a class="code" href="structdrawfile__area__text.html">drawfile_area_text</a> area_text;
-<a name="l00199"></a>00199 } <a class="code" href="structdrawfile__text__area.html">drawfile_text_area</a>;
-<a name="l00200"></a>00200 
-<a name="l00201"></a><a class="code" href="structdrawfile__options.html">00201</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00202"></a>00202   wimp_box bbox;
-<a name="l00203"></a>00203   <span class="keywordtype">int</span> paper_size;
-<a name="l00204"></a>00204   drawfile_paper_options paper_options;
-<a name="l00205"></a>00205   <span class="keywordtype">double</span> grid_spacing;
-<a name="l00206"></a>00206   <span class="keywordtype">int</span> grid_division;
-<a name="l00207"></a>00207   BOOL isometric;
-<a name="l00208"></a>00208   BOOL auto_adjust;
-<a name="l00209"></a>00209   BOOL show;
-<a name="l00210"></a>00210   BOOL lock;
-<a name="l00211"></a>00211   BOOL cm;
-<a name="l00212"></a>00212   <span class="keywordtype">int</span> zoom_mul;
-<a name="l00213"></a>00213   <span class="keywordtype">int</span> zoom_div;
-<a name="l00214"></a>00214   BOOL zoom_lock;
-<a name="l00215"></a>00215   BOOL toolbox;
-<a name="l00216"></a>00216   drawfile_entry_mode entry_mode;
-<a name="l00217"></a>00217   <span class="keywordtype">int</span> undo_size;
-<a name="l00218"></a>00218 } <a class="code" href="structdrawfile__options.html">drawfile_options</a>;
-<a name="l00219"></a>00219 
-<a name="l00220"></a><a class="code" href="structdrawfile__trfm__text.html">00220</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00221"></a>00221   wimp_box bbox;
-<a name="l00222"></a>00222   <a class="code" href="structos__trfm.html">os_trfm</a> trfm;
-<a name="l00223"></a>00223   drawfile_text_flags flags;
-<a name="l00224"></a>00224   palette_entry fill;
-<a name="l00225"></a>00225   palette_entry bg_hint;
-<a name="l00226"></a>00226   <a class="code" href="structdrawfile__text__style.html">drawfile_text_style</a> style;
-<a name="l00227"></a>00227   <span class="keywordtype">int</span> xsize;
-<a name="l00228"></a>00228   <span class="keywordtype">int</span> ysize;
-<a name="l00229"></a>00229   wimp_coord base;
-<a name="l00230"></a>00230   <span class="keywordtype">char</span> text [1];
-<a name="l00231"></a>00231 } <a class="code" href="structdrawfile__trfm__text.html">drawfile_trfm_text</a>;
-<a name="l00232"></a>00232 
-<a name="l00233"></a><a class="code" href="structdrawfile__trfm__sprite.html">00233</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00234"></a>00234   wimp_box bbox;
-<a name="l00235"></a>00235   <a class="code" href="structos__trfm.html">os_trfm</a> trfm;
-<a name="l00236"></a>00236   sprite_header header;
-<a name="l00237"></a>00237   byte data [1];
-<a name="l00238"></a>00238 } <a class="code" href="structdrawfile__trfm__sprite.html">drawfile_trfm_sprite</a>;
-<a name="l00239"></a>00239 
-<a name="l00240"></a><a class="code" href="structdrawfile__jpeg.html">00240</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00241"></a>00241   wimp_box bbox;
-<a name="l00242"></a>00242   <span class="keywordtype">int</span> width;
-<a name="l00243"></a>00243   <span class="keywordtype">int</span> height;
-<a name="l00244"></a>00244   <span class="keywordtype">int</span> xdpi;
-<a name="l00245"></a>00245   <span class="keywordtype">int</span> ydpi;
-<a name="l00246"></a>00246   <a class="code" href="structos__trfm.html">os_trfm</a> trfm;
-<a name="l00247"></a>00247   <span class="keywordtype">int</span> len;
-<a name="l00248"></a>00248   byte data [1];
-<a name="l00249"></a>00249 } <a class="code" href="structdrawfile__jpeg.html">drawfile_jpeg</a>;
-<a name="l00250"></a>00250 
-<a name="l00251"></a>00251 <span class="comment">/* ------------------------------------------------------------------------</span>
-<a name="l00252"></a>00252 <span class="comment"> * Type:          drawfile_object</span>
-<a name="l00253"></a>00253 <span class="comment"> *</span>
-<a name="l00254"></a>00254 <span class="comment"> * Description:   This type is used to declare pointers rather than objects</span>
-<a name="l00255"></a>00255 <span class="comment"> */</span>
-<a name="l00256"></a>00256 
-<a name="l00257"></a><a class="code" href="structdrawfile__object.html">00257</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00258"></a>00258   drawfile_type type;
-<a name="l00259"></a>00259   <span class="keywordtype">int</span> size;
-<a name="l00260"></a>00260   <span class="keyword">union </span>{
-<a name="l00261"></a>00261     <a class="code" href="structdrawfile__font__table.html">drawfile_font_table</a> font_table;
-<a name="l00262"></a>00262     <a class="code" href="structdrawfile__text.html">drawfile_text</a> text;
-<a name="l00263"></a>00263     <a class="code" href="structdrawfile__path.html">drawfile_path</a> path;
-<a name="l00264"></a>00264     <a class="code" href="structdrawfile__path__with__pattern.html">drawfile_path_with_pattern</a> path_with_pattern;
-<a name="l00265"></a>00265     <a class="code" href="structdrawfile__sprite.html">drawfile_sprite</a> sprite;
-<a name="l00266"></a>00266     <a class="code" href="structdrawfile__group.html">drawfile_group</a> group;
-<a name="l00267"></a>00267     <a class="code" href="structdrawfile__tagged.html">drawfile_tagged</a> tagged;
-<a name="l00268"></a>00268     <a class="code" href="structdrawfile__text__column.html">drawfile_text_column</a> text_column;
-<a name="l00269"></a>00269     <a class="code" href="structdrawfile__text__area.html">drawfile_text_area</a> text_area;
-<a name="l00270"></a>00270     <a class="code" href="structdrawfile__options.html">drawfile_options</a> options;
-<a name="l00271"></a>00271     <a class="code" href="structdrawfile__trfm__text.html">drawfile_trfm_text</a> trfm_text;
-<a name="l00272"></a>00272     <a class="code" href="structdrawfile__trfm__sprite.html">drawfile_trfm_sprite</a> trfm_sprite;
-<a name="l00273"></a>00273     <a class="code" href="structdrawfile__jpeg.html">drawfile_jpeg</a> jpeg;
-<a name="l00274"></a>00274   } data;
-<a name="l00275"></a>00275 } <a class="code" href="structdrawfile__object.html">drawfile_object</a>;
-<a name="l00276"></a>00276 
-<a name="l00277"></a><a class="code" href="structdrawfile__diagram.html">00277</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00278"></a>00278   <span class="keywordtype">char</span> tag [4];
-<a name="l00279"></a>00279   <span class="keywordtype">int</span> major_version;
-<a name="l00280"></a>00280   <span class="keywordtype">int</span> minor_version;
-<a name="l00281"></a>00281   <span class="keywordtype">char</span> source [12];
-<a name="l00282"></a>00282   wimp_box bbox;
-<a name="l00283"></a>00283   <a class="code" href="structdrawfile__object.html">drawfile_object</a> objects [1];
-<a name="l00284"></a>00284 } <a class="code" href="structdrawfile__diagram.html">drawfile_diagram</a>;
-<a name="l00285"></a>00285 
-<a name="l00286"></a>00286 <span class="keyword">typedef</span> bits drawfile_bbox_flags;
-<a name="l00287"></a>00287 
-<a name="l00288"></a><a class="code" href="structdrawfile__declare__fonts__state.html">00288</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{
-<a name="l00289"></a>00289   <a class="code" href="structdrawfile__object.html">drawfile_object</a> *object;
-<a name="l00290"></a>00290   <a class="code" href="structdrawfile__diagram.html">drawfile_diagram</a> *diagram;
-<a name="l00291"></a>00291   <a class="code" href="structdrawfile__object.html">drawfile_object</a> *font_table;
-<a name="l00292"></a>00292   drawfile_declare_fonts_flags flags;
-<a name="l00293"></a>00293   os_error *error;
-<a name="l00294"></a>00294 } <a class="code" href="structdrawfile__declare__fonts__state.html">drawfile_declare_fonts_state</a>;
-<a name="l00295"></a>00295 
-<a name="l00296"></a>00296 <span class="comment">/************************</span>
-<a name="l00297"></a>00297 <span class="comment"> * Constant definitions *</span>
-<a name="l00298"></a>00298 <span class="comment"> ************************/</span>
-<a name="l00299"></a>00299 <span class="preprocessor">#define error_DRAW_FILE_NOT_DRAW                0x20C00u</span>
-<a name="l00300"></a>00300 <span class="preprocessor"></span><span class="preprocessor">#define error_DRAW_FILE_VERSION                 0x20C01u</span>
-<a name="l00301"></a>00301 <span class="preprocessor"></span><span class="preprocessor">#define error_DRAW_FILE_FONT_TAB                0x20C02u</span>
-<a name="l00302"></a>00302 <span class="preprocessor"></span><span class="preprocessor">#define error_DRAW_FILE_BAD_FONT_NO             0x20C03u</span>
-<a name="l00303"></a>00303 <span class="preprocessor"></span><span class="preprocessor">#define error_DRAW_FILE_BAD_MODE                0x20C04u</span>
-<a name="l00304"></a>00304 <span class="preprocessor"></span><span class="preprocessor">#define error_DRAW_FILE_BAD_FILE                0x20C05u</span>
-<a name="l00305"></a>00305 <span class="preprocessor"></span><span class="preprocessor">#define error_DRAW_FILE_BAD_GROUP               0x20C06u</span>
-<a name="l00306"></a>00306 <span class="preprocessor"></span><span class="preprocessor">#define error_DRAW_FILE_BAD_TAG                 0x20C07u</span>
-<a name="l00307"></a>00307 <span class="preprocessor"></span><span class="preprocessor">#define error_DRAW_FILE_SYNTAX                  0x20C08u</span>
-<a name="l00308"></a>00308 <span class="preprocessor"></span><span class="preprocessor">#define error_DRAW_FILE_FONT_NO                 0x20C09u</span>
-<a name="l00309"></a>00309 <span class="preprocessor"></span><span class="preprocessor">#define error_DRAW_FILE_AREA_VER                0x20C0Au</span>
-<a name="l00310"></a>00310 <span class="preprocessor"></span><span class="preprocessor">#define error_DRAW_FILE_NO_AREA_VER             0x20C0Bu</span>
-<a name="l00311"></a>00311 <span class="preprocessor"></span>
-<a name="l00312"></a>00312 <span class="preprocessor">#define drawfile_PATH_MITRED                    ((drawfile_path_style_flags) 0x0u)</span>
-<a name="l00313"></a>00313 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_PATH_ROUND                     ((drawfile_path_style_flags) 0x1u)</span>
-<a name="l00314"></a>00314 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_PATH_BEVELLED                  ((drawfile_path_style_flags) 0x2u)</span>
-<a name="l00315"></a>00315 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_PATH_BUTT                      ((drawfile_path_style_flags) 0x0u)</span>
-<a name="l00316"></a>00316 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_PATH_SQUARE                    ((drawfile_path_style_flags) 0x2u)</span>
-<a name="l00317"></a>00317 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_PATH_TRIANGLE                  ((drawfile_path_style_flags) 0x3u)</span>
-<a name="l00318"></a>00318 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_PATH_JOIN_SHIFT                0</span>
-<a name="l00319"></a>00319 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_PATH_JOIN                      ((drawfile_path_style_flags) 0x3u)</span>
-<a name="l00320"></a>00320 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_PATH_END_SHIFT                 2</span>
-<a name="l00321"></a>00321 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_PATH_END                       ((drawfile_path_style_flags) 0xCu)</span>
-<a name="l00322"></a>00322 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_PATH_START_SHIFT               4</span>
-<a name="l00323"></a>00323 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_PATH_START                     ((drawfile_path_style_flags) 0x30u)</span>
-<a name="l00324"></a>00324 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_PATH_WINDING_EVEN_ODD          ((drawfile_path_style_flags) 0x40u)</span>
-<a name="l00325"></a>00325 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_PATH_DASHED                    ((drawfile_path_style_flags) 0x80u)</span>
-<a name="l00326"></a>00326 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_PATH_CAP_WIDTH_SHIFT           16</span>
-<a name="l00327"></a>00327 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_PATH_CAP_WIDTH                 ((drawfile_path_style_flags) 0xFF0000u)</span>
-<a name="l00328"></a>00328 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_PATH_CAP_LENGTH_SHIFT          24</span>
-<a name="l00329"></a>00329 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_PATH_CAP_LENGTH                ((drawfile_path_style_flags) 0xFF000000u)</span>
-<a name="l00330"></a>00330 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_TEXT_KERN                      ((drawfile_text_flags) 0x1u)</span>
-<a name="l00331"></a>00331 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_TEXT_RIGHT_TO_LEFT             ((drawfile_text_flags) 0x2u)</span>
-<a name="l00332"></a>00332 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_TEXT_UNDERLINE                 ((drawfile_text_flags) 0x4u)</span>
-<a name="l00333"></a>00333 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_RENDER_BBOXES                  ((drawfile_render_flags) 0x1u)</span>
-<a name="l00334"></a>00334 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_RENDER_SUPPRESS                ((drawfile_render_flags) 0x2u)</span>
-<a name="l00335"></a>00335 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_RENDER_GIVEN_FLATNESS          ((drawfile_render_flags) 0x4u)</span>
-<a name="l00336"></a>00336 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_RENDER_GIVEN_COLOUR_MAPPING    ((drawfile_render_flags) 0x8u)</span>
-<a name="l00337"></a>00337 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_NO_DOWNLOAD                    ((drawfile_declare_fonts_flags) 0x1u)</span>
-<a name="l00338"></a>00338 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_PAPER_SHOW                     ((drawfile_paper_options) 0x1u)</span>
-<a name="l00339"></a>00339 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_PAPER_LANDSCAPE                ((drawfile_paper_options) 0x10u)</span>
-<a name="l00340"></a>00340 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_PAPER_DEFAULT                  ((drawfile_paper_options) 0x100u)</span>
-<a name="l00341"></a>00341 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_ENTRY_MODE_LINE                ((drawfile_entry_mode) 0x1u)</span>
-<a name="l00342"></a>00342 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_ENTRY_MODE_CLOSED_LINE         ((drawfile_entry_mode) 0x2u)</span>
-<a name="l00343"></a>00343 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_ENTRY_MODE_CURVE               ((drawfile_entry_mode) 0x4u)</span>
-<a name="l00344"></a>00344 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_ENTRY_MODE_CLOSED_CURVE        ((drawfile_entry_mode) 0x8u)</span>
-<a name="l00345"></a>00345 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_ENTRY_MODE_RECTANGLE           ((drawfile_entry_mode) 0x10u)</span>
-<a name="l00346"></a>00346 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_ENTRY_MODE_ELLIPSE             ((drawfile_entry_mode) 0x20u)</span>
-<a name="l00347"></a>00347 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_ENTRY_MODE_TEXT_LINE           ((drawfile_entry_mode) 0x40u)</span>
-<a name="l00348"></a>00348 <span class="preprocessor"></span><span class="preprocessor">#define drawfile_ENTRY_MODE_SELECT              ((drawfile_entry_mode) 0x80u)</span>
-<a name="l00349"></a>00349 <span class="preprocessor"></span>
-<a name="l00350"></a>00350 <span class="comment">/*************************</span>
-<a name="l00351"></a>00351 <span class="comment"> * Function declarations *</span>
-<a name="l00352"></a>00352 <span class="comment"> *************************/</span>
-<a name="l00353"></a>00353 
-<a name="l00354"></a>00354 <span class="preprocessor">#if defined(__cplusplus)</span>
-<a name="l00355"></a>00355 <span class="preprocessor"></span>   <span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
-<a name="l00356"></a>00356 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
-<a name="l00357"></a>00357 
-<a name="l00358"></a>00358 <span class="comment">/* ------------------------------------------------------------------------</span>
-<a name="l00359"></a>00359 <span class="comment"> * Function:      drawfile_render()</span>
-<a name="l00360"></a>00360 <span class="comment"> *</span>
-<a name="l00361"></a>00361 <span class="comment"> * Description:   Calls SWI 0x45540</span>
-<a name="l00362"></a>00362 <span class="comment"> *</span>
-<a name="l00363"></a>00363 <span class="comment"> * Input:         flags - value of R0 on entry</span>
-<a name="l00364"></a>00364 <span class="comment"> *                diagram - value of R1 on entry</span>
-<a name="l00365"></a>00365 <span class="comment"> *                size - value of R2 on entry</span>
-<a name="l00366"></a>00366 <span class="comment"> *                trfm - value of R3 on entry</span>
-<a name="l00367"></a>00367 <span class="comment"> *                clip - value of R4 on entry</span>
-<a name="l00368"></a>00368 <span class="comment"> *                flatness - value of R5 on entry</span>
-<a name="l00369"></a>00369 <span class="comment"> */</span>
-<a name="l00370"></a>00370 
-<a name="l00371"></a>00371 <span class="keyword">extern</span> os_error *Drawfile_Render (drawfile_render_flags flags,
-<a name="l00372"></a>00372       <a class="code" href="structdrawfile__diagram.html">drawfile_diagram</a> <span class="keyword">const</span> *diagram,
-<a name="l00373"></a>00373       <span class="keywordtype">int</span> size,
-<a name="l00374"></a>00374       <a class="code" href="structos__trfm.html">os_trfm</a> <span class="keyword">const</span> *trfm,
-<a name="l00375"></a>00375       wimp_box <span class="keyword">const</span> *clip,
-<a name="l00376"></a>00376       <span class="keywordtype">int</span> flatness);
-<a name="l00377"></a>00377 
-<a name="l00378"></a>00378 <span class="comment">/* ------------------------------------------------------------------------</span>
-<a name="l00379"></a>00379 <span class="comment"> * Function:      drawfile_bbox()</span>
-<a name="l00380"></a>00380 <span class="comment"> *</span>
-<a name="l00381"></a>00381 <span class="comment"> * Description:   Calls SWI 0x45541</span>
-<a name="l00382"></a>00382 <span class="comment"> *</span>
-<a name="l00383"></a>00383 <span class="comment"> * Input:         flags - value of R0 on entry</span>
-<a name="l00384"></a>00384 <span class="comment"> *                diagram - value of R1 on entry</span>
-<a name="l00385"></a>00385 <span class="comment"> *                size - value of R2 on entry</span>
-<a name="l00386"></a>00386 <span class="comment"> *                trfm - value of R3 on entry</span>
-<a name="l00387"></a>00387 <span class="comment"> *                bbox - value of R4 on entry</span>
-<a name="l00388"></a>00388 <span class="comment"> */</span>
-<a name="l00389"></a>00389 
-<a name="l00390"></a>00390 <span class="keyword">extern</span> os_error *Drawfile_Bbox (drawfile_bbox_flags flags,
-<a name="l00391"></a>00391       <a class="code" href="structdrawfile__diagram.html">drawfile_diagram</a> <span class="keyword">const</span> *diagram,
-<a name="l00392"></a>00392       <span class="keywordtype">int</span> size,
-<a name="l00393"></a>00393       <a class="code" href="structos__trfm.html">os_trfm</a> <span class="keyword">const</span> *trfm,
-<a name="l00394"></a>00394       wimp_box *bbox);
-<a name="l00395"></a>00395 
-<a name="l00396"></a>00396 <span class="comment">/* ------------------------------------------------------------------------</span>
-<a name="l00397"></a>00397 <span class="comment"> * Function:      Drawfile_DeclareFonts()</span>
-<a name="l00398"></a>00398 <span class="comment"> *</span>
-<a name="l00399"></a>00399 <span class="comment"> * Description:   Calls SWI 0x45542</span>
-<a name="l00400"></a>00400 <span class="comment"> *</span>
-<a name="l00401"></a>00401 <span class="comment"> * Input:         flags - value of R0 on entry</span>
-<a name="l00402"></a>00402 <span class="comment"> *                diagram - value of R1 on entry</span>
-<a name="l00403"></a>00403 <span class="comment"> *                size - value of R2 on entry</span>
-<a name="l00404"></a>00404 <span class="comment"> */</span>
-<a name="l00405"></a>00405 
-<a name="l00406"></a>00406 <span class="keyword">extern</span> os_error *Drawfile_DeclareFonts (drawfile_declare_fonts_flags flags,
-<a name="l00407"></a>00407       <a class="code" href="structdrawfile__diagram.html">drawfile_diagram</a> <span class="keyword">const</span> *diagram,
-<a name="l00408"></a>00408       <span class="keywordtype">int</span> size);
-<a name="l00409"></a>00409 
-<a name="l00410"></a>00410 <span class="comment">/* ------------------------------------------------------------------------</span>
-<a name="l00411"></a>00411 <span class="comment"> * Function:      Drawfile_CreateDiagram()</span>
-<a name="l00412"></a>00412 <span class="comment"> *</span>
-<a name="l00413"></a>00413 <span class="comment"> */</span>
-<a name="l00414"></a>00414 
-<a name="l00415"></a>00415 <span class="keyword">extern</span> os_error * Drawfile_CreateDiagram(<a class="code" href="structdrawfile__info.html">drawfile_info</a> *info, <span class="keywordtype">size_t</span> memory,
-<a name="l00416"></a>00416         <span class="keyword">const</span> <span class="keywordtype">char</span> *creator, wimp_box box);
-<a name="l00417"></a>00417 
-<a name="l00418"></a>00418 <span class="keyword">extern</span> os_error *Drawfile_AppendObject(<a class="code" href="structdrawfile__info.html">drawfile_info</a> *info, <span class="keywordtype">size_t</span> memory,
-<a name="l00419"></a>00419         <span class="keyword">const</span> <a class="code" href="structdrawfile__object.html">drawfile_object</a> *<span class="keywordtype">object</span>, BOOL rebind);
-<a name="l00420"></a>00420 
-<a name="l00421"></a>00421 <span class="keyword">extern</span> os_error *Drawfile_RenderDiagram(<a class="code" href="structdrawfile__info.html">drawfile_info</a> *info,
-<a name="l00422"></a>00422         window_redrawblock *redraw, <span class="keywordtype">double</span> scale);
-<a name="l00423"></a>00423 
-<a name="l00424"></a>00424 <span class="keyword">extern</span> os_error *Drawfile_VerifyDiagram(<a class="code" href="structdrawfile__info.html">drawfile_info</a> *info);
-<a name="l00425"></a>00425 
-<a name="l00426"></a>00426 <span class="keyword">extern</span> <span class="keywordtype">void</span>     Drawfile_QueryBox(<a class="code" href="structdrawfile__info.html">drawfile_info</a> *info,
-<a name="l00427"></a>00427         wimp_box *rect, BOOL screenUnits);
-<a name="l00428"></a>00428 
-<a name="l00429"></a>00429 <span class="preprocessor">#if defined(__cplusplus)</span>
-<a name="l00430"></a>00430 <span class="preprocessor"></span>   }
-<a name="l00431"></a>00431 <span class="preprocessor">#endif </span><span class="comment">/* __cplusplus */</span>
-<a name="l00432"></a>00432 
-<a name="l00433"></a>00433 <span class="preprocessor">#endif </span><span class="comment">/* __drawfile.h */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/fail_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/fail.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/fail.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * fail.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998 A.J. van Os</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * An alternative form of assert()</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00011"></a>00011 
-<a name="l00012"></a>00012 <span class="preprocessor">#if !defined(NDEBUG)</span>
-<a name="l00013"></a>00013 <span class="preprocessor"></span><span class="keywordtype">void</span>
-<a name="l00014"></a>00014 __fail(<span class="keywordtype">char</span> *szExpression, <span class="keywordtype">char</span> *szFilename, <span class="keywordtype">int</span> iLineNumber)
-<a name="l00015"></a>00015 {
-<a name="l00016"></a>00016         <span class="keywordflow">if</span> (szExpression == NULL || szFilename == NULL) {
-<a name="l00017"></a>00017                 werr(1, <span class="stringliteral">&quot;Internal error: no expression&quot;</span>);
-<a name="l00018"></a>00018         }
-<a name="l00019"></a>00019 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00020"></a>00020 <span class="preprocessor"></span>        fprintf(stderr, <span class="stringliteral">&quot;%s[%3d]: Internal error in &#39;%s&#39;\n&quot;</span>,
-<a name="l00021"></a>00021                 szFilename, iLineNumber, szExpression);
-<a name="l00022"></a>00022 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00023"></a>00023         werr(1, <span class="stringliteral">&quot;Internal error in &#39;%s&#39; in file %s at line %d&quot;</span>,
-<a name="l00024"></a>00024                 szExpression, szFilename, iLineNumber);
-<a name="l00025"></a>00025 } <span class="comment">/* end of __fail */</span>
-<a name="l00026"></a>00026 <span class="preprocessor">#endif </span><span class="comment">/* !NDEBUG */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/fail_8h_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/inc/fail.h Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/inc/fail.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * fail.h</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2000 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Support for an alternative form of assert()</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#if !defined(__fail_h)</span>
-<a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor">#define __fail_h 1</span>
-<a name="l00011"></a>00011 <span class="preprocessor"></span>
-<a name="l00012"></a>00012 <span class="preprocessor">#undef fail</span>
-<a name="l00013"></a>00013 <span class="preprocessor"></span>
-<a name="l00014"></a>00014 <span class="preprocessor">#if defined(NDEBUG)</span>
-<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#define fail(e) ((void)0)</span>
-<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#define fail(e) ((e) ? __fail(#e, __FILE__, __LINE__) : (void)0)</span>
-<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* NDEBUG */</span>
-<a name="l00019"></a>00019 
-<a name="l00020"></a>00020 <span class="keyword">extern</span> <span class="keywordtype">void</span>     __fail(<span class="keywordtype">char</span> *, <span class="keywordtype">char</span> *, <span class="keywordtype">int</span>);
-<a name="l00021"></a>00021 
-<a name="l00022"></a>00022 <span class="preprocessor">#endif </span><span class="comment">/* __fail_h */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/finddata_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,170 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/finddata.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/finddata.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * finddata.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2000-2002 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Find the blocks that contain the data of MS Word files</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 
-<a name="l00014"></a>00014 <span class="comment">/*</span>
-<a name="l00015"></a>00015 <span class="comment"> * bAddDataBlocks - Add the blocks to the data block list</span>
-<a name="l00016"></a>00016 <span class="comment"> *</span>
-<a name="l00017"></a>00017 <span class="comment"> * Returns TRUE when successful, otherwise FALSE</span>
-<a name="l00018"></a>00018 <span class="comment"> */</span>
-<a name="l00019"></a>00019 BOOL
-<a name="l00020"></a>00020 bAddDataBlocks(ULONG ulDataPosFirst, ULONG ulTotalLength,
-<a name="l00021"></a>00021         ULONG ulStartBlock, <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen)
-<a name="l00022"></a>00022 {
-<a name="l00023"></a>00023         data_block_type tDataBlock;
-<a name="l00024"></a>00024         ULONG   ulDataPos, ulOffset, ulIndex;
-<a name="l00025"></a>00025         <span class="keywordtype">long</span>    lToGo;
-<a name="l00026"></a>00026         BOOL    bSuccess;
-<a name="l00027"></a>00027 
-<a name="l00028"></a>00028         fail(ulTotalLength &gt; (ULONG)LONG_MAX);
-<a name="l00029"></a>00029         fail(ulStartBlock &gt; MAX_BLOCKNUMBER &amp;&amp; ulStartBlock != END_OF_CHAIN);
-<a name="l00030"></a>00030         fail(aulBBD == NULL);
-<a name="l00031"></a>00031 
-<a name="l00032"></a>00032         NO_DBG_HEX(ulDataPosFirst);
-<a name="l00033"></a>00033         NO_DBG_DEC(ulTotalLength);
-<a name="l00034"></a>00034 
-<a name="l00035"></a>00035         lToGo = (long)ulTotalLength;
-<a name="l00036"></a>00036 
-<a name="l00037"></a>00037         ulDataPos = ulDataPosFirst;
-<a name="l00038"></a>00038         ulOffset = ulDataPosFirst;
-<a name="l00039"></a>00039         <span class="keywordflow">for</span> (ulIndex = ulStartBlock;
-<a name="l00040"></a>00040              ulIndex != END_OF_CHAIN &amp;&amp; lToGo &gt; 0;
-<a name="l00041"></a>00041              ulIndex = aulBBD[ulIndex]) {
-<a name="l00042"></a>00042                 <span class="keywordflow">if</span> (ulIndex == UNUSED_BLOCK || ulIndex &gt;= (ULONG)tBBDLen) {
-<a name="l00043"></a>00043                         DBG_DEC(ulIndex);
-<a name="l00044"></a>00044                         DBG_DEC(tBBDLen);
-<a name="l00045"></a>00045                         <span class="keywordflow">return</span> FALSE;
-<a name="l00046"></a>00046                 }
-<a name="l00047"></a>00047                 <span class="keywordflow">if</span> (ulOffset &gt;= BIG_BLOCK_SIZE) {
-<a name="l00048"></a>00048                         ulOffset -= BIG_BLOCK_SIZE;
-<a name="l00049"></a>00049                         <span class="keywordflow">continue</span>;
-<a name="l00050"></a>00050                 }
-<a name="l00051"></a>00051                 tDataBlock.ulFileOffset =
-<a name="l00052"></a>00052                         (ulIndex + 1) * BIG_BLOCK_SIZE + ulOffset;
-<a name="l00053"></a>00053                 tDataBlock.ulDataPos = ulDataPos;
-<a name="l00054"></a>00054                 tDataBlock.ulLength = min(BIG_BLOCK_SIZE - ulOffset,
-<a name="l00055"></a>00055                                                 (ULONG)lToGo);
-<a name="l00056"></a>00056                 fail(tDataBlock.ulLength &gt; BIG_BLOCK_SIZE);
-<a name="l00057"></a>00057                 ulOffset = 0;
-<a name="l00058"></a>00058                 <span class="keywordflow">if</span> (!bAdd2DataBlockList(&amp;tDataBlock)) {
-<a name="l00059"></a>00059                         DBG_HEX(tDataBlock.ulFileOffset);
-<a name="l00060"></a>00060                         DBG_HEX(tDataBlock.ulDataPos);
-<a name="l00061"></a>00061                         DBG_DEC(tDataBlock.ulLength);
-<a name="l00062"></a>00062                         <span class="keywordflow">return</span> FALSE;
-<a name="l00063"></a>00063                 }
-<a name="l00064"></a>00064                 ulDataPos += tDataBlock.ulLength;
-<a name="l00065"></a>00065                 lToGo -= (long)tDataBlock.ulLength;
-<a name="l00066"></a>00066         }
-<a name="l00067"></a>00067         bSuccess = lToGo == 0 ||
-<a name="l00068"></a>00068                 (ulTotalLength == (ULONG)LONG_MAX &amp;&amp; ulIndex == END_OF_CHAIN);
-<a name="l00069"></a>00069         DBG_DEC_C(!bSuccess, lToGo);
-<a name="l00070"></a>00070         DBG_DEC_C(!bSuccess, ulTotalLength);
-<a name="l00071"></a>00071         DBG_DEC_C(!bSuccess, ulIndex);
-<a name="l00072"></a>00072         <span class="keywordflow">return</span> bSuccess;
-<a name="l00073"></a>00073 } <span class="comment">/* end of bAddDataBlocks */</span>
-<a name="l00074"></a>00074 
-<a name="l00075"></a>00075 <span class="comment">/*</span>
-<a name="l00076"></a>00076 <span class="comment"> * bGet6DocumentData - make a list of the data blocks of Word 6/7 files</span>
-<a name="l00077"></a>00077 <span class="comment"> *</span>
-<a name="l00078"></a>00078 <span class="comment"> * Code for &quot;fast saved&quot; files.</span>
-<a name="l00079"></a>00079 <span class="comment"> *</span>
-<a name="l00080"></a>00080 <span class="comment"> * Returns TRUE when successful, otherwise FALSE</span>
-<a name="l00081"></a>00081 <span class="comment"> */</span>
-<a name="l00082"></a>00082 BOOL
-<a name="l00083"></a>00083 bGet6DocumentData(FILE *pFile, ULONG ulStartBlock,
-<a name="l00084"></a>00084         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00085"></a>00085 {
-<a name="l00086"></a>00086         UCHAR   *aucBuffer;
-<a name="l00087"></a>00087         ULONG   ulBeginTextInfo, ulOffset, ulTotLength;
-<a name="l00088"></a>00088         <span class="keywordtype">size_t</span>  tTextInfoLen;
-<a name="l00089"></a>00089         <span class="keywordtype">int</span>     iIndex, iOff, iType, iLen, iPieces;
-<a name="l00090"></a>00090 
-<a name="l00091"></a>00091         DBG_MSG(<span class="stringliteral">&quot;bGet6DocumentData&quot;</span>);
-<a name="l00092"></a>00092 
-<a name="l00093"></a>00093         fail(pFile == NULL);
-<a name="l00094"></a>00094         fail(aulBBD == NULL);
-<a name="l00095"></a>00095         fail(aucHeader == NULL);
-<a name="l00096"></a>00096 
-<a name="l00097"></a>00097         ulBeginTextInfo = ulGetLong(0x160, aucHeader);
-<a name="l00098"></a>00098         DBG_HEX(ulBeginTextInfo);
-<a name="l00099"></a>00099         tTextInfoLen = (size_t)ulGetLong(0x164, aucHeader);
-<a name="l00100"></a>00100         DBG_DEC(tTextInfoLen);
-<a name="l00101"></a>00101 
-<a name="l00102"></a>00102         aucBuffer = xmalloc(tTextInfoLen);
-<a name="l00103"></a>00103         <span class="keywordflow">if</span> (!bReadBuffer(pFile, ulStartBlock,
-<a name="l00104"></a>00104                         aulBBD, tBBDLen, BIG_BLOCK_SIZE,
-<a name="l00105"></a>00105                         aucBuffer, ulBeginTextInfo, tTextInfoLen)) {
-<a name="l00106"></a>00106                 aucBuffer = xfree(aucBuffer);
-<a name="l00107"></a>00107                 <span class="keywordflow">return</span> FALSE;
-<a name="l00108"></a>00108         }
-<a name="l00109"></a>00109         NO_DBG_PRINT_BLOCK(aucBuffer, tTextInfoLen);
-<a name="l00110"></a>00110 
-<a name="l00111"></a>00111         iOff = 0;
-<a name="l00112"></a>00112         <span class="keywordflow">while</span> (iOff &lt; (<span class="keywordtype">int</span>)tTextInfoLen) {
-<a name="l00113"></a>00113                 iType = (int)ucGetByte(iOff, aucBuffer);
-<a name="l00114"></a>00114                 iOff++;
-<a name="l00115"></a>00115                 <span class="keywordflow">if</span> (iType == 0) {
-<a name="l00116"></a>00116                         iOff++;
-<a name="l00117"></a>00117                         <span class="keywordflow">continue</span>;
-<a name="l00118"></a>00118                 }
-<a name="l00119"></a>00119                 iLen = (int)usGetWord(iOff, aucBuffer);
-<a name="l00120"></a>00120                 iOff += 2;
-<a name="l00121"></a>00121                 <span class="keywordflow">if</span> (iType == 1) {
-<a name="l00122"></a>00122                         iOff += iLen;
-<a name="l00123"></a>00123                         <span class="keywordflow">continue</span>;
-<a name="l00124"></a>00124                 }
-<a name="l00125"></a>00125                 <span class="keywordflow">if</span> (iType != 2) {
-<a name="l00126"></a>00126                         werr(0, <span class="stringliteral">&quot;Unknown type of &#39;fastsaved&#39; format&quot;</span>);
-<a name="l00127"></a>00127                         aucBuffer = xfree(aucBuffer);
-<a name="l00128"></a>00128                         <span class="keywordflow">return</span> FALSE;
-<a name="l00129"></a>00129                 }
-<a name="l00130"></a>00130                 <span class="comment">/* Type 2 */</span>
-<a name="l00131"></a>00131                 NO_DBG_DEC(iLen);
-<a name="l00132"></a>00132                 iOff += 2;
-<a name="l00133"></a>00133                 iPieces = (iLen - 4) / 12;
-<a name="l00134"></a>00134                 DBG_DEC(iPieces);
-<a name="l00135"></a>00135                 <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; iPieces; iIndex++) {
-<a name="l00136"></a>00136                         ulOffset = ulGetLong(
-<a name="l00137"></a>00137                                 iOff + (iPieces + 1) * 4 + iIndex * 8 + 2,
-<a name="l00138"></a>00138                                 aucBuffer);
-<a name="l00139"></a>00139                         ulTotLength = ulGetLong(iOff + (iIndex + 1) * 4,
-<a name="l00140"></a>00140                                                 aucBuffer) -
-<a name="l00141"></a>00141                                         ulGetLong(iOff + iIndex * 4,
-<a name="l00142"></a>00142                                                 aucBuffer);
-<a name="l00143"></a>00143                         <span class="keywordflow">if</span> (!bAddDataBlocks(ulOffset, ulTotLength,
-<a name="l00144"></a>00144                                         ulStartBlock,
-<a name="l00145"></a>00145                                         aulBBD, tBBDLen)) {
-<a name="l00146"></a>00146                                 aucBuffer = xfree(aucBuffer);
-<a name="l00147"></a>00147                                 <span class="keywordflow">return</span> FALSE;
-<a name="l00148"></a>00148                         }
-<a name="l00149"></a>00149                 }
-<a name="l00150"></a>00150                 <span class="keywordflow">break</span>;
-<a name="l00151"></a>00151         }
-<a name="l00152"></a>00152         aucBuffer = xfree(aucBuffer);
-<a name="l00153"></a>00153         <span class="keywordflow">return</span> TRUE;
-<a name="l00154"></a>00154 } <span class="comment">/* end of bGet6DocumentData */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/findtext_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,305 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/findtext.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/findtext.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * findtext.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2004 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Find the blocks that contain the text of MS Word files</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 
-<a name="l00014"></a>00014 <span class="comment">/*</span>
-<a name="l00015"></a>00015 <span class="comment"> * bAddTextBlocks - Add the blocks to the text block list</span>
-<a name="l00016"></a>00016 <span class="comment"> *</span>
-<a name="l00017"></a>00017 <span class="comment"> * Returns TRUE when successful, FALSE if not</span>
-<a name="l00018"></a>00018 <span class="comment"> */</span>
-<a name="l00019"></a>00019 BOOL
-<a name="l00020"></a>00020 bAddTextBlocks(ULONG ulCharPosFirst, ULONG ulTotalLength,
-<a name="l00021"></a>00021         BOOL bUsesUnicode, USHORT usPropMod,
-<a name="l00022"></a>00022         ULONG ulStartBlock, <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen)
-<a name="l00023"></a>00023 {
-<a name="l00024"></a>00024         text_block_type tTextBlock;
-<a name="l00025"></a>00025         ULONG   ulCharPos, ulOffset, ulIndex;
-<a name="l00026"></a>00026         <span class="keywordtype">long</span>    lToGo;
-<a name="l00027"></a>00027 
-<a name="l00028"></a>00028         fail(ulTotalLength &gt; (ULONG)LONG_MAX / 2);
-<a name="l00029"></a>00029         fail(ulStartBlock &gt; MAX_BLOCKNUMBER &amp;&amp; ulStartBlock != END_OF_CHAIN);
-<a name="l00030"></a>00030         fail(aulBBD == NULL);
-<a name="l00031"></a>00031 
-<a name="l00032"></a>00032         NO_DBG_HEX(ulCharPosFirst);
-<a name="l00033"></a>00033         NO_DBG_DEC(ulTotalLength);
-<a name="l00034"></a>00034 
-<a name="l00035"></a>00035         <span class="keywordflow">if</span> (bUsesUnicode) {
-<a name="l00036"></a>00036                 <span class="comment">/* One character equals two bytes */</span>
-<a name="l00037"></a>00037                 NO_DBG_MSG(<span class="stringliteral">&quot;Uses Unicode&quot;</span>);
-<a name="l00038"></a>00038                 lToGo = (long)ulTotalLength * 2;
-<a name="l00039"></a>00039         } <span class="keywordflow">else</span> {
-<a name="l00040"></a>00040                 <span class="comment">/* One character equals one byte */</span>
-<a name="l00041"></a>00041                 NO_DBG_MSG(<span class="stringliteral">&quot;Uses ASCII&quot;</span>);
-<a name="l00042"></a>00042                 lToGo = (long)ulTotalLength;
-<a name="l00043"></a>00043         }
-<a name="l00044"></a>00044 
-<a name="l00045"></a>00045         ulCharPos = ulCharPosFirst;
-<a name="l00046"></a>00046         ulOffset = ulCharPosFirst;
-<a name="l00047"></a>00047         <span class="keywordflow">for</span> (ulIndex = ulStartBlock;
-<a name="l00048"></a>00048              ulIndex != END_OF_CHAIN &amp;&amp; lToGo &gt; 0;
-<a name="l00049"></a>00049              ulIndex = aulBBD[ulIndex]) {
-<a name="l00050"></a>00050                 <span class="keywordflow">if</span> (ulIndex &gt;= (ULONG)tBBDLen) {
-<a name="l00051"></a>00051                         DBG_DEC(ulIndex);
-<a name="l00052"></a>00052                         DBG_DEC(tBBDLen);
-<a name="l00053"></a>00053                         werr(1, <span class="stringliteral">&quot;The Big Block Depot is damaged&quot;</span>);
-<a name="l00054"></a>00054                 }
-<a name="l00055"></a>00055                 <span class="keywordflow">if</span> (ulOffset &gt;= BIG_BLOCK_SIZE) {
-<a name="l00056"></a>00056                         ulOffset -= BIG_BLOCK_SIZE;
-<a name="l00057"></a>00057                         <span class="keywordflow">continue</span>;
-<a name="l00058"></a>00058                 }
-<a name="l00059"></a>00059                 tTextBlock.ulFileOffset =
-<a name="l00060"></a>00060                         (ulIndex + 1) * BIG_BLOCK_SIZE + ulOffset;
-<a name="l00061"></a>00061                 tTextBlock.ulCharPos = ulCharPos;
-<a name="l00062"></a>00062                 tTextBlock.ulLength = min(BIG_BLOCK_SIZE - ulOffset,
-<a name="l00063"></a>00063                                                 (ULONG)lToGo);
-<a name="l00064"></a>00064                 tTextBlock.bUsesUnicode = bUsesUnicode;
-<a name="l00065"></a>00065                 tTextBlock.usPropMod = usPropMod;
-<a name="l00066"></a>00066                 ulOffset = 0;
-<a name="l00067"></a>00067                 <span class="keywordflow">if</span> (!bAdd2TextBlockList(&amp;tTextBlock)) {
-<a name="l00068"></a>00068                         DBG_HEX(tTextBlock.ulFileOffset);
-<a name="l00069"></a>00069                         DBG_HEX(tTextBlock.ulCharPos);
-<a name="l00070"></a>00070                         DBG_DEC(tTextBlock.ulLength);
-<a name="l00071"></a>00071                         DBG_DEC(tTextBlock.bUsesUnicode);
-<a name="l00072"></a>00072                         DBG_DEC(tTextBlock.usPropMod);
-<a name="l00073"></a>00073                         <span class="keywordflow">return</span> FALSE;
-<a name="l00074"></a>00074                 }
-<a name="l00075"></a>00075                 ulCharPos += tTextBlock.ulLength;
-<a name="l00076"></a>00076                 lToGo -= (long)tTextBlock.ulLength;
-<a name="l00077"></a>00077         }
-<a name="l00078"></a>00078         DBG_DEC_C(lToGo != 0, lToGo);
-<a name="l00079"></a>00079         <span class="keywordflow">return</span> lToGo == 0;
-<a name="l00080"></a>00080 } <span class="comment">/* end of bAddTextBlocks */</span>
-<a name="l00081"></a>00081 
-<a name="l00082"></a>00082 <span class="comment">/*</span>
-<a name="l00083"></a>00083 <span class="comment"> * bGet6DocumentText - make a list of the text blocks of Word 6/7 files</span>
-<a name="l00084"></a>00084 <span class="comment"> *</span>
-<a name="l00085"></a>00085 <span class="comment"> * Code for &quot;fast saved&quot; files.</span>
-<a name="l00086"></a>00086 <span class="comment"> *</span>
-<a name="l00087"></a>00087 <span class="comment"> * Returns TRUE when successful, FALSE if not</span>
-<a name="l00088"></a>00088 <span class="comment"> */</span>
-<a name="l00089"></a>00089 BOOL
-<a name="l00090"></a>00090 bGet6DocumentText(FILE *pFile, BOOL bUsesUnicode, ULONG ulStartBlock,
-<a name="l00091"></a>00091         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00092"></a>00092 {
-<a name="l00093"></a>00093         UCHAR   *aucBuffer;
-<a name="l00094"></a>00094         ULONG   ulBeginTextInfo, ulTextOffset, ulTotLength;
-<a name="l00095"></a>00095         <span class="keywordtype">size_t</span>  tTextInfoLen;
-<a name="l00096"></a>00096         <span class="keywordtype">int</span>     iIndex, iType, iOff, iLen, iPieces;
-<a name="l00097"></a>00097         USHORT  usPropMod;
-<a name="l00098"></a>00098 
-<a name="l00099"></a>00099         DBG_MSG(<span class="stringliteral">&quot;bGet6DocumentText&quot;</span>);
-<a name="l00100"></a>00100 
-<a name="l00101"></a>00101         fail(pFile == NULL);
-<a name="l00102"></a>00102         fail(aulBBD == NULL);
-<a name="l00103"></a>00103         fail(aucHeader == NULL);
-<a name="l00104"></a>00104 
-<a name="l00105"></a>00105         ulBeginTextInfo = ulGetLong(0x160, aucHeader);  <span class="comment">/* fcClx */</span>
-<a name="l00106"></a>00106         DBG_HEX(ulBeginTextInfo);
-<a name="l00107"></a>00107         tTextInfoLen = (size_t)ulGetLong(0x164, aucHeader);     <span class="comment">/* lcbClx */</span>
-<a name="l00108"></a>00108         DBG_DEC(tTextInfoLen);
-<a name="l00109"></a>00109 
-<a name="l00110"></a>00110         aucBuffer = xmalloc(tTextInfoLen);
-<a name="l00111"></a>00111         <span class="keywordflow">if</span> (!bReadBuffer(pFile, ulStartBlock,
-<a name="l00112"></a>00112                         aulBBD, tBBDLen, BIG_BLOCK_SIZE,
-<a name="l00113"></a>00113                         aucBuffer, ulBeginTextInfo, tTextInfoLen)) {
-<a name="l00114"></a>00114                 aucBuffer = xfree(aucBuffer);
-<a name="l00115"></a>00115                 <span class="keywordflow">return</span> FALSE;
-<a name="l00116"></a>00116         }
-<a name="l00117"></a>00117         NO_DBG_PRINT_BLOCK(aucBuffer, tTextInfoLen);
-<a name="l00118"></a>00118 
-<a name="l00119"></a>00119         iOff = 0;
-<a name="l00120"></a>00120         <span class="keywordflow">while</span> ((<span class="keywordtype">size_t</span>)iOff &lt; tTextInfoLen) {
-<a name="l00121"></a>00121                 iType = (int)ucGetByte(iOff, aucBuffer);
-<a name="l00122"></a>00122                 iOff++;
-<a name="l00123"></a>00123                 <span class="keywordflow">if</span> (iType == 0) {
-<a name="l00124"></a>00124                         DBG_FIXME();
-<a name="l00125"></a>00125                         iOff++;
-<a name="l00126"></a>00126                         <span class="keywordflow">continue</span>;
-<a name="l00127"></a>00127                 }
-<a name="l00128"></a>00128                 <span class="keywordflow">if</span> (iType == 1) {
-<a name="l00129"></a>00129                         iLen = (int)usGetWord(iOff, aucBuffer);
-<a name="l00130"></a>00130                         vAdd2PropModList(aucBuffer + iOff);
-<a name="l00131"></a>00131                         iOff += iLen + 2;
-<a name="l00132"></a>00132                         <span class="keywordflow">continue</span>;
-<a name="l00133"></a>00133                 }
-<a name="l00134"></a>00134                 <span class="keywordflow">if</span> (iType != 2) {
-<a name="l00135"></a>00135                         werr(0, <span class="stringliteral">&quot;Unknown type of &#39;fastsaved&#39; format&quot;</span>);
-<a name="l00136"></a>00136                         aucBuffer = xfree(aucBuffer);
-<a name="l00137"></a>00137                         <span class="keywordflow">return</span> FALSE;
-<a name="l00138"></a>00138                 }
-<a name="l00139"></a>00139                 <span class="comment">/* Type 2 */</span>
-<a name="l00140"></a>00140                 iLen = (int)usGetWord(iOff, aucBuffer);
-<a name="l00141"></a>00141                 NO_DBG_DEC(iLen);
-<a name="l00142"></a>00142                 iOff += 4;
-<a name="l00143"></a>00143                 iPieces = (iLen - 4) / 12;
-<a name="l00144"></a>00144                 DBG_DEC(iPieces);
-<a name="l00145"></a>00145                 <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; iPieces; iIndex++) {
-<a name="l00146"></a>00146                         ulTextOffset = ulGetLong(
-<a name="l00147"></a>00147                                 iOff + (iPieces + 1) * 4 + iIndex * 8 + 2,
-<a name="l00148"></a>00148                                 aucBuffer);
-<a name="l00149"></a>00149                         usPropMod = usGetWord(
-<a name="l00150"></a>00150                                 iOff + (iPieces + 1) * 4 + iIndex * 8 + 6,
-<a name="l00151"></a>00151                                 aucBuffer);
-<a name="l00152"></a>00152                         ulTotLength = ulGetLong(iOff + (iIndex + 1) * 4,
-<a name="l00153"></a>00153                                                 aucBuffer) -
-<a name="l00154"></a>00154                                         ulGetLong(iOff + iIndex * 4,
-<a name="l00155"></a>00155                                                 aucBuffer);
-<a name="l00156"></a>00156                         NO_DBG_HEX_C(usPropMod != 0, usPropMod);
-<a name="l00157"></a>00157                         <span class="keywordflow">if</span> (!bAddTextBlocks(ulTextOffset, ulTotLength,
-<a name="l00158"></a>00158                                         bUsesUnicode, usPropMod,
-<a name="l00159"></a>00159                                         ulStartBlock,
-<a name="l00160"></a>00160                                         aulBBD, tBBDLen)) {
-<a name="l00161"></a>00161                                 aucBuffer = xfree(aucBuffer);
-<a name="l00162"></a>00162                                 <span class="keywordflow">return</span> FALSE;
-<a name="l00163"></a>00163                         }
-<a name="l00164"></a>00164                 }
-<a name="l00165"></a>00165                 <span class="keywordflow">break</span>;
-<a name="l00166"></a>00166         }
-<a name="l00167"></a>00167         aucBuffer = xfree(aucBuffer);
-<a name="l00168"></a>00168         <span class="keywordflow">return</span> TRUE;
-<a name="l00169"></a>00169 } <span class="comment">/* end of bGet6DocumentText */</span>
-<a name="l00170"></a>00170 
-<a name="l00171"></a>00171 <span class="comment">/*</span>
-<a name="l00172"></a>00172 <span class="comment"> * bGet8DocumentText - make a list of the text blocks of Word 8/97 files</span>
-<a name="l00173"></a>00173 <span class="comment"> *</span>
-<a name="l00174"></a>00174 <span class="comment"> * Returns TRUE when successful, FALSE if not</span>
-<a name="l00175"></a>00175 <span class="comment"> */</span>
-<a name="l00176"></a>00176 BOOL
-<a name="l00177"></a>00177 bGet8DocumentText(FILE *pFile, <span class="keyword">const</span> pps_info_type *pPPS,
-<a name="l00178"></a>00178         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00179"></a>00179         <span class="keyword">const</span> ULONG *aulSBD, <span class="keywordtype">size_t</span> tSBDLen,
-<a name="l00180"></a>00180         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00181"></a>00181 {
-<a name="l00182"></a>00182         <span class="keyword">const</span> ULONG     *aulBlockDepot;
-<a name="l00183"></a>00183         UCHAR   *aucBuffer;
-<a name="l00184"></a>00184         ULONG   ulTextOffset, ulBeginTextInfo;
-<a name="l00185"></a>00185         ULONG   ulTotLength, ulLen;
-<a name="l00186"></a>00186         <span class="keywordtype">long</span>    lIndex, lPieces, lOff;
-<a name="l00187"></a>00187         <span class="keywordtype">size_t</span>  tTextInfoLen, tBlockDepotLen, tBlockSize;
-<a name="l00188"></a>00188         <span class="keywordtype">int</span>     iType, iLen;
-<a name="l00189"></a>00189         BOOL    bUsesUnicode;
-<a name="l00190"></a>00190         USHORT  usPropMod;
-<a name="l00191"></a>00191 
-<a name="l00192"></a>00192         DBG_MSG(<span class="stringliteral">&quot;bGet8DocumentText&quot;</span>);
-<a name="l00193"></a>00193 
-<a name="l00194"></a>00194         fail(pFile == NULL || pPPS == NULL);
-<a name="l00195"></a>00195         fail(aulBBD == NULL || aulSBD == NULL);
-<a name="l00196"></a>00196         fail(aucHeader == NULL);
-<a name="l00197"></a>00197 
-<a name="l00198"></a>00198         ulBeginTextInfo = ulGetLong(0x1a2, aucHeader);  <span class="comment">/* fcClx */</span>
-<a name="l00199"></a>00199         DBG_HEX(ulBeginTextInfo);
-<a name="l00200"></a>00200         tTextInfoLen = (size_t)ulGetLong(0x1a6, aucHeader);     <span class="comment">/* lcbClx */</span>
-<a name="l00201"></a>00201         DBG_DEC(tTextInfoLen);
-<a name="l00202"></a>00202 
-<a name="l00203"></a>00203         DBG_DEC(pPPS-&gt;tTable.ulSB);
-<a name="l00204"></a>00204         DBG_HEX(pPPS-&gt;tTable.ulSize);
-<a name="l00205"></a>00205         <span class="keywordflow">if</span> (pPPS-&gt;tTable.ulSize == 0) {
-<a name="l00206"></a>00206                 <span class="keywordflow">return</span> FALSE;
-<a name="l00207"></a>00207         }
-<a name="l00208"></a>00208 
-<a name="l00209"></a>00209         <span class="keywordflow">if</span> (pPPS-&gt;tTable.ulSize &lt; MIN_SIZE_FOR_BBD_USE) {
-<a name="l00210"></a>00210                 <span class="comment">/* Use the Small Block Depot */</span>
-<a name="l00211"></a>00211                 aulBlockDepot = aulSBD;
-<a name="l00212"></a>00212                 tBlockDepotLen = tSBDLen;
-<a name="l00213"></a>00213                 tBlockSize = SMALL_BLOCK_SIZE;
-<a name="l00214"></a>00214         } <span class="keywordflow">else</span> {
-<a name="l00215"></a>00215                 <span class="comment">/* Use the Big Block Depot */</span>
-<a name="l00216"></a>00216                 aulBlockDepot = aulBBD;
-<a name="l00217"></a>00217                 tBlockDepotLen = tBBDLen;
-<a name="l00218"></a>00218                 tBlockSize = BIG_BLOCK_SIZE;
-<a name="l00219"></a>00219         }
-<a name="l00220"></a>00220         aucBuffer = xmalloc(tTextInfoLen);
-<a name="l00221"></a>00221         <span class="keywordflow">if</span> (!bReadBuffer(pFile, pPPS-&gt;tTable.ulSB,
-<a name="l00222"></a>00222                         aulBlockDepot, tBlockDepotLen, tBlockSize,
-<a name="l00223"></a>00223                         aucBuffer, ulBeginTextInfo, tTextInfoLen)) {
-<a name="l00224"></a>00224                 aucBuffer = xfree(aucBuffer);
-<a name="l00225"></a>00225                 <span class="keywordflow">return</span> FALSE;
-<a name="l00226"></a>00226         }
-<a name="l00227"></a>00227         NO_DBG_PRINT_BLOCK(aucBuffer, tTextInfoLen);
-<a name="l00228"></a>00228 
-<a name="l00229"></a>00229         lOff = 0;
-<a name="l00230"></a>00230         <span class="keywordflow">while</span> (lOff &lt; (<span class="keywordtype">long</span>)tTextInfoLen) {
-<a name="l00231"></a>00231                 iType = (int)ucGetByte(lOff, aucBuffer);
-<a name="l00232"></a>00232                 lOff++;
-<a name="l00233"></a>00233                 <span class="keywordflow">if</span> (iType == 0) {
-<a name="l00234"></a>00234                         DBG_FIXME();
-<a name="l00235"></a>00235                         lOff++;
-<a name="l00236"></a>00236                         <span class="keywordflow">continue</span>;
-<a name="l00237"></a>00237                 }
-<a name="l00238"></a>00238                 <span class="keywordflow">if</span> (iType == 1) {
-<a name="l00239"></a>00239                         iLen = (int)usGetWord(lOff, aucBuffer);
-<a name="l00240"></a>00240                         vAdd2PropModList(aucBuffer + lOff);
-<a name="l00241"></a>00241                         lOff += (long)iLen + 2;
-<a name="l00242"></a>00242                         <span class="keywordflow">continue</span>;
-<a name="l00243"></a>00243                 }
-<a name="l00244"></a>00244                 <span class="keywordflow">if</span> (iType != 2) {
-<a name="l00245"></a>00245                         werr(0, <span class="stringliteral">&quot;Unknown type of &#39;fastsaved&#39; format&quot;</span>);
-<a name="l00246"></a>00246                         aucBuffer = xfree(aucBuffer);
-<a name="l00247"></a>00247                         <span class="keywordflow">return</span> FALSE;
-<a name="l00248"></a>00248                 }
-<a name="l00249"></a>00249                 <span class="comment">/* Type 2 */</span>
-<a name="l00250"></a>00250                 ulLen = ulGetLong(lOff, aucBuffer);
-<a name="l00251"></a>00251                 <span class="keywordflow">if</span> (ulLen &lt; 4) {
-<a name="l00252"></a>00252                         DBG_DEC(ulLen);
-<a name="l00253"></a>00253                         <span class="keywordflow">return</span> FALSE;
-<a name="l00254"></a>00254                 }
-<a name="l00255"></a>00255                 lOff += 4;
-<a name="l00256"></a>00256                 lPieces = (long)((ulLen - 4) / 12);
-<a name="l00257"></a>00257                 DBG_DEC(lPieces);
-<a name="l00258"></a>00258                 <span class="keywordflow">for</span> (lIndex = 0; lIndex &lt; lPieces; lIndex++) {
-<a name="l00259"></a>00259                         ulTextOffset = ulGetLong(
-<a name="l00260"></a>00260                                 lOff + (lPieces + 1) * 4 + lIndex * 8 + 2,
-<a name="l00261"></a>00261                                 aucBuffer);
-<a name="l00262"></a>00262                         usPropMod = usGetWord(
-<a name="l00263"></a>00263                                 lOff + (lPieces + 1) * 4 + lIndex * 8 + 6,
-<a name="l00264"></a>00264                                 aucBuffer);
-<a name="l00265"></a>00265                         ulTotLength = ulGetLong(lOff + (lIndex + 1) * 4,
-<a name="l00266"></a>00266                                                 aucBuffer) -
-<a name="l00267"></a>00267                                         ulGetLong(lOff + lIndex * 4,
-<a name="l00268"></a>00268                                                 aucBuffer);
-<a name="l00269"></a>00269                         <span class="keywordflow">if</span> ((ulTextOffset &amp; BIT(30)) == 0) {
-<a name="l00270"></a>00270                                 bUsesUnicode = TRUE;
-<a name="l00271"></a>00271                         } <span class="keywordflow">else</span> {
-<a name="l00272"></a>00272                                 bUsesUnicode = FALSE;
-<a name="l00273"></a>00273                                 ulTextOffset &amp;= ~BIT(30);
-<a name="l00274"></a>00274                                 ulTextOffset /= 2;
-<a name="l00275"></a>00275                         }
-<a name="l00276"></a>00276                         NO_DBG_HEX_C(usPropMod != 0, usPropMod);
-<a name="l00277"></a>00277                         <span class="keywordflow">if</span> (!bAddTextBlocks(ulTextOffset, ulTotLength,
-<a name="l00278"></a>00278                                         bUsesUnicode, usPropMod,
-<a name="l00279"></a>00279                                         pPPS-&gt;tWordDocument.ulSB,
-<a name="l00280"></a>00280                                         aulBBD, tBBDLen)) {
-<a name="l00281"></a>00281                                 aucBuffer = xfree(aucBuffer);
-<a name="l00282"></a>00282                                 <span class="keywordflow">return</span> FALSE;
-<a name="l00283"></a>00283                         }
-<a name="l00284"></a>00284                 }
-<a name="l00285"></a>00285                 <span class="keywordflow">break</span>;
-<a name="l00286"></a>00286         }
-<a name="l00287"></a>00287         aucBuffer = xfree(aucBuffer);
-<a name="l00288"></a>00288         <span class="keywordflow">return</span> TRUE;
-<a name="l00289"></a>00289 } <span class="comment">/* end of bGet8DocumentText */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/fmt__text_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/fmt_text.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/fmt_text.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * fmt_text.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2004 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Functions to deal with the Formatted Text format</span>
-<a name="l00007"></a>00007 <span class="comment"> *</span>
-<a name="l00008"></a>00008 <span class="comment"> * Based on patches send by: Ofir Reichenberg &lt;ofir@qlusters.com&gt;</span>
-<a name="l00009"></a>00009 <span class="comment"> *</span>
-<a name="l00010"></a>00010 <span class="comment"> * The credit should go to him, but all the bugs are mine.</span>
-<a name="l00011"></a>00011 <span class="comment"> */</span>
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00014"></a>00014 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00015"></a>00015 
-<a name="l00016"></a>00016 <span class="comment">/* The character set */</span>
-<a name="l00017"></a>00017 <span class="keyword">static</span> encoding_type    eEncoding = encoding_neutral;
-<a name="l00018"></a>00018 <span class="comment">/* Current vertical position information */</span>
-<a name="l00019"></a>00019 <span class="keyword">static</span> <span class="keywordtype">long</span>             lYtopCurr = 0;
-<a name="l00020"></a>00020 <span class="comment">/* Local representation of the non-breaking space */</span>
-<a name="l00021"></a>00021 <span class="keyword">static</span> UCHAR            ucNbsp = 0;
-<a name="l00022"></a>00022 
-<a name="l00023"></a>00023 
-<a name="l00024"></a>00024 <span class="comment">/*</span>
-<a name="l00025"></a>00025 <span class="comment"> * vPrologueFMT - set options and perform the Formatted Text initialization</span>
-<a name="l00026"></a>00026 <span class="comment"> */</span>
-<a name="l00027"></a>00027 <span class="keywordtype">void</span>
-<a name="l00028"></a>00028 vPrologueFMT(diagram_type *pDiag, <span class="keyword">const</span> options_type *pOptions)
-<a name="l00029"></a>00029 {
-<a name="l00030"></a>00030         fail(pDiag == NULL);
-<a name="l00031"></a>00031         fail(pOptions == NULL);
-<a name="l00032"></a>00032 
-<a name="l00033"></a>00033         eEncoding = pOptions-&gt;eEncoding;
-<a name="l00034"></a>00034         pDiag-&gt;lXleft = 0;
-<a name="l00035"></a>00035         pDiag-&gt;lYtop = 0;
-<a name="l00036"></a>00036         lYtopCurr = 0;
-<a name="l00037"></a>00037 } <span class="comment">/* end of vPrologueFMT */</span>
-<a name="l00038"></a>00038 
-<a name="l00039"></a>00039 <span class="comment">/*</span>
-<a name="l00040"></a>00040 <span class="comment"> * vPrintFMT - print a Formatted Text string</span>
-<a name="l00041"></a>00041 <span class="comment"> */</span>
-<a name="l00042"></a>00042 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00043"></a>00043 vPrintFMT(FILE *pFile,
-<a name="l00044"></a>00044         <span class="keyword">const</span> <span class="keywordtype">char</span> *szString, <span class="keywordtype">size_t</span> tStringLength, USHORT usFontstyle)
-<a name="l00045"></a>00045 {
-<a name="l00046"></a>00046         <span class="keyword">const</span> UCHAR     *pucByte, *pucStart, *pucLast, *pucNonSpace;
-<a name="l00047"></a>00047 
-<a name="l00048"></a>00048         fail(szString == NULL);
-<a name="l00049"></a>00049 
-<a name="l00050"></a>00050         <span class="keywordflow">if</span> (szString == NULL || szString[0] == <span class="charliteral">&#39;\0&#39;</span> || tStringLength == 0) {
-<a name="l00051"></a>00051                 <span class="keywordflow">return</span>;
-<a name="l00052"></a>00052         }
-<a name="l00053"></a>00053 
-<a name="l00054"></a>00054         <span class="keywordflow">if</span> (eEncoding == encoding_utf_8) {
-<a name="l00055"></a>00055                 fprintf(pFile, <span class="stringliteral">&quot;%.*s&quot;</span>, (<span class="keywordtype">int</span>)tStringLength, szString);
-<a name="l00056"></a>00056                 <span class="keywordflow">return</span>;
-<a name="l00057"></a>00057         }
-<a name="l00058"></a>00058 
-<a name="l00059"></a>00059         <span class="keywordflow">if</span> (ucNbsp == 0) {
-<a name="l00060"></a>00060                 ucNbsp = ucGetNbspCharacter();
-<a name="l00061"></a>00061                 DBG_HEX_C(ucNbsp != 0xa0, ucNbsp);
-<a name="l00062"></a>00062         }
-<a name="l00063"></a>00063 
-<a name="l00064"></a>00064         pucStart = (UCHAR *)szString;
-<a name="l00065"></a>00065         pucLast = pucStart + tStringLength - 1;
-<a name="l00066"></a>00066         pucNonSpace = pucLast;
-<a name="l00067"></a>00067         <span class="keywordflow">while</span> ((*pucNonSpace == (UCHAR)<span class="charliteral">&#39; &#39;</span> || *pucNonSpace == ucNbsp) &amp;&amp;
-<a name="l00068"></a>00068                pucNonSpace &gt; pucStart) {
-<a name="l00069"></a>00069                 pucNonSpace--;
-<a name="l00070"></a>00070         }
-<a name="l00071"></a>00071 
-<a name="l00072"></a>00072         <span class="comment">/* 1: The spaces at the start */</span>
-<a name="l00073"></a>00073         pucByte = pucStart;
-<a name="l00074"></a>00074         <span class="keywordflow">while</span> ((*pucByte == (UCHAR)<span class="charliteral">&#39; &#39;</span> || *pucByte == ucNbsp) &amp;&amp;
-<a name="l00075"></a>00075                pucByte &lt;= pucLast) {
-<a name="l00076"></a>00076                 (void)putc(<span class="charliteral">&#39; &#39;</span>, pFile);
-<a name="l00077"></a>00077                 pucByte++;
-<a name="l00078"></a>00078         }
-<a name="l00079"></a>00079 
-<a name="l00080"></a>00080         <span class="keywordflow">if</span> (pucByte &gt; pucLast) {
-<a name="l00081"></a>00081                 <span class="comment">/* There is no text, just spaces */</span>
-<a name="l00082"></a>00082                 <span class="keywordflow">return</span>;
-<a name="l00083"></a>00083         }
-<a name="l00084"></a>00084 
-<a name="l00085"></a>00085         <span class="comment">/* 2: Start the *bold*, /italic/ and _underline_ */</span>
-<a name="l00086"></a>00086         <span class="keywordflow">if</span> (bIsBold(usFontstyle)) {
-<a name="l00087"></a>00087                 (void)putc(<span class="charliteral">&#39;*&#39;</span>, pFile);
-<a name="l00088"></a>00088         }
-<a name="l00089"></a>00089         <span class="keywordflow">if</span> (bIsItalic(usFontstyle)) {
-<a name="l00090"></a>00090                 (void)putc(<span class="charliteral">&#39;/&#39;</span>, pFile);
-<a name="l00091"></a>00091         }
-<a name="l00092"></a>00092         <span class="keywordflow">if</span> (bIsUnderline(usFontstyle)) {
-<a name="l00093"></a>00093                 (void)putc(<span class="charliteral">&#39;_&#39;</span>, pFile);
-<a name="l00094"></a>00094         }
-<a name="l00095"></a>00095 
-<a name="l00096"></a>00096         <span class="comment">/* 3: The text itself */</span>
-<a name="l00097"></a>00097         <span class="keywordflow">while</span> (pucByte &lt;= pucNonSpace) {
-<a name="l00098"></a>00098                 <span class="keywordflow">if</span> (*pucByte == ucNbsp) {
-<a name="l00099"></a>00099                         (void)putc(<span class="charliteral">&#39; &#39;</span>, pFile);
-<a name="l00100"></a>00100                 } <span class="keywordflow">else</span> {
-<a name="l00101"></a>00101                         (void)putc((<span class="keywordtype">char</span>)*pucByte, pFile);
-<a name="l00102"></a>00102                 }
-<a name="l00103"></a>00103                 pucByte++;
-<a name="l00104"></a>00104         }
-<a name="l00105"></a>00105 
-<a name="l00106"></a>00106         <span class="comment">/* 4: End the *bold*, /italic/ and _underline_ */</span>
-<a name="l00107"></a>00107         <span class="keywordflow">if</span> (bIsUnderline(usFontstyle)) {
-<a name="l00108"></a>00108                 (void)putc(<span class="charliteral">&#39;_&#39;</span>, pFile);
-<a name="l00109"></a>00109         }
-<a name="l00110"></a>00110         <span class="keywordflow">if</span> (bIsItalic(usFontstyle)) {
-<a name="l00111"></a>00111                 (void)putc(<span class="charliteral">&#39;/&#39;</span>, pFile);
-<a name="l00112"></a>00112         }
-<a name="l00113"></a>00113         <span class="keywordflow">if</span> (bIsBold(usFontstyle)) {
-<a name="l00114"></a>00114                 (void)putc(<span class="charliteral">&#39;*&#39;</span>, pFile);
-<a name="l00115"></a>00115         }
-<a name="l00116"></a>00116 
-<a name="l00117"></a>00117         <span class="comment">/* 5: The spaces at the end */</span>
-<a name="l00118"></a>00118         <span class="keywordflow">while</span> (pucByte &lt;= pucLast) {
-<a name="l00119"></a>00119                 (void)putc(<span class="charliteral">&#39; &#39;</span>, pFile);
-<a name="l00120"></a>00120                 pucByte++;
-<a name="l00121"></a>00121         }
-<a name="l00122"></a>00122 } <span class="comment">/* end of vPrintFMT */</span>
-<a name="l00123"></a>00123 
-<a name="l00124"></a>00124 <span class="comment">/*</span>
-<a name="l00125"></a>00125 <span class="comment"> * vMoveTo - move to the given X,Y coordinates</span>
-<a name="l00126"></a>00126 <span class="comment"> *</span>
-<a name="l00127"></a>00127 <span class="comment"> * Move the current position of the given diagram to its X,Y coordinates,</span>
-<a name="l00128"></a>00128 <span class="comment"> * start on a new page if needed</span>
-<a name="l00129"></a>00129 <span class="comment"> */</span>
-<a name="l00130"></a>00130 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00131"></a>00131 vMoveTo(diagram_type *pDiag)
-<a name="l00132"></a>00132 {
-<a name="l00133"></a>00133         <span class="keywordtype">int</span>     iCount, iNbr;
-<a name="l00134"></a>00134 
-<a name="l00135"></a>00135         fail(pDiag == NULL);
-<a name="l00136"></a>00136         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00137"></a>00137 
-<a name="l00138"></a>00138         <span class="keywordflow">if</span> (pDiag-&gt;lYtop != lYtopCurr) {
-<a name="l00139"></a>00139                 iNbr = iDrawUnits2Char(pDiag-&gt;lXleft);
-<a name="l00140"></a>00140                 <span class="keywordflow">for</span> (iCount = 0; iCount &lt; iNbr; iCount++) {
-<a name="l00141"></a>00141                         (void)putc(FILLER_CHAR, pDiag-&gt;pOutFile);
-<a name="l00142"></a>00142                 }
-<a name="l00143"></a>00143                 lYtopCurr = pDiag-&gt;lYtop;
-<a name="l00144"></a>00144         }
-<a name="l00145"></a>00145 } <span class="comment">/* end of vMoveTo */</span>
-<a name="l00146"></a>00146 
-<a name="l00147"></a>00147 <span class="comment">/*</span>
-<a name="l00148"></a>00148 <span class="comment"> * vSubstringFMT - print a sub string</span>
-<a name="l00149"></a>00149 <span class="comment"> */</span>
-<a name="l00150"></a>00150 <span class="keywordtype">void</span>
-<a name="l00151"></a>00151 vSubstringFMT(diagram_type *pDiag,
-<a name="l00152"></a>00152         <span class="keyword">const</span> <span class="keywordtype">char</span> *szString, <span class="keywordtype">size_t</span> tStringLength, <span class="keywordtype">long</span> lStringWidth,
-<a name="l00153"></a>00153         USHORT usFontstyle)
-<a name="l00154"></a>00154 {
-<a name="l00155"></a>00155         fail(pDiag == NULL || szString == NULL);
-<a name="l00156"></a>00156         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00157"></a>00157         fail(pDiag-&gt;lXleft &lt; 0);
-<a name="l00158"></a>00158         fail(tStringLength != strlen(szString));
-<a name="l00159"></a>00159 
-<a name="l00160"></a>00160         <span class="keywordflow">if</span> (szString[0] == <span class="charliteral">&#39;\0&#39;</span> || tStringLength == 0) {
-<a name="l00161"></a>00161                 <span class="keywordflow">return</span>;
-<a name="l00162"></a>00162         }
-<a name="l00163"></a>00163 
-<a name="l00164"></a>00164         vMoveTo(pDiag);
-<a name="l00165"></a>00165         vPrintFMT(pDiag-&gt;pOutFile, szString, tStringLength, usFontstyle);
-<a name="l00166"></a>00166         pDiag-&gt;lXleft += lStringWidth;
-<a name="l00167"></a>00167 } <span class="comment">/* end of vSubstringFMT */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/fontinfo_8h_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2267 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/inc/fontinfo.h Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/inc/fontinfo.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* THIS FILE IS AUTOMATICALLY GENERATED - DO NOT EDIT! */</span>
-<a name="l00002"></a>00002 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *szFontnames[32] = {
-<a name="l00003"></a>00003         <span class="stringliteral">&quot;Courier&quot;</span>,
-<a name="l00004"></a>00004         <span class="stringliteral">&quot;Courier-Bold&quot;</span>,
-<a name="l00005"></a>00005         <span class="stringliteral">&quot;Courier-Oblique&quot;</span>,
-<a name="l00006"></a>00006         <span class="stringliteral">&quot;Courier-BoldOblique&quot;</span>,
-<a name="l00007"></a>00007         <span class="stringliteral">&quot;Times-Roman&quot;</span>,
-<a name="l00008"></a>00008         <span class="stringliteral">&quot;Times-Bold&quot;</span>,
-<a name="l00009"></a>00009         <span class="stringliteral">&quot;Times-Italic&quot;</span>,
-<a name="l00010"></a>00010         <span class="stringliteral">&quot;Times-BoldItalic&quot;</span>,
-<a name="l00011"></a>00011         <span class="stringliteral">&quot;Helvetica&quot;</span>,
-<a name="l00012"></a>00012         <span class="stringliteral">&quot;Helvetica-Bold&quot;</span>,
-<a name="l00013"></a>00013         <span class="stringliteral">&quot;Helvetica-Oblique&quot;</span>,
-<a name="l00014"></a>00014         <span class="stringliteral">&quot;Helvetica-BoldOblique&quot;</span>,
-<a name="l00015"></a>00015         <span class="stringliteral">&quot;Palatino-Roman&quot;</span>,
-<a name="l00016"></a>00016         <span class="stringliteral">&quot;Palatino-Bold&quot;</span>,
-<a name="l00017"></a>00017         <span class="stringliteral">&quot;Palatino-Italic&quot;</span>,
-<a name="l00018"></a>00018         <span class="stringliteral">&quot;Palatino-BoldItalic&quot;</span>,
-<a name="l00019"></a>00019         <span class="stringliteral">&quot;Helvetica-Narrow&quot;</span>,
-<a name="l00020"></a>00020         <span class="stringliteral">&quot;Helvetica-Narrow-Bold&quot;</span>,
-<a name="l00021"></a>00021         <span class="stringliteral">&quot;Helvetica-Narrow-Oblique&quot;</span>,
-<a name="l00022"></a>00022         <span class="stringliteral">&quot;Helvetica-Narrow-BoldOblique&quot;</span>,
-<a name="l00023"></a>00023         <span class="stringliteral">&quot;Bookman-Light&quot;</span>,
-<a name="l00024"></a>00024         <span class="stringliteral">&quot;Bookman-Demi&quot;</span>,
-<a name="l00025"></a>00025         <span class="stringliteral">&quot;Bookman-LightItalic&quot;</span>,
-<a name="l00026"></a>00026         <span class="stringliteral">&quot;Bookman-DemiItalic&quot;</span>,
-<a name="l00027"></a>00027         <span class="stringliteral">&quot;AvantGarde-Book&quot;</span>,
-<a name="l00028"></a>00028         <span class="stringliteral">&quot;AvantGarde-Demi&quot;</span>,
-<a name="l00029"></a>00029         <span class="stringliteral">&quot;AvantGarde-BookOblique&quot;</span>,
-<a name="l00030"></a>00030         <span class="stringliteral">&quot;AvantGarde-DemiOblique&quot;</span>,
-<a name="l00031"></a>00031         <span class="stringliteral">&quot;NewCenturySchlbk-Roman&quot;</span>,
-<a name="l00032"></a>00032         <span class="stringliteral">&quot;NewCenturySchlbk-Bold&quot;</span>,
-<a name="l00033"></a>00033         <span class="stringliteral">&quot;NewCenturySchlbk-Italic&quot;</span>,
-<a name="l00034"></a>00034         <span class="stringliteral">&quot;NewCenturySchlbk-BoldItalic&quot;</span>,
-<a name="l00035"></a>00035 };
-<a name="l00036"></a>00036 <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> ausCharacterWidths1[32][256] = {
-<a name="l00037"></a>00037         {       <span class="comment">/* Courier */</span>
-<a name="l00038"></a>00038         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00039"></a>00039         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00040"></a>00040         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00041"></a>00041         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00042"></a>00042         <span class="comment">/*  32 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00043"></a>00043         <span class="comment">/*  40 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00044"></a>00044         <span class="comment">/*  48 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00045"></a>00045         <span class="comment">/*  56 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00046"></a>00046         <span class="comment">/*  64 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00047"></a>00047         <span class="comment">/*  72 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00048"></a>00048         <span class="comment">/*  80 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00049"></a>00049         <span class="comment">/*  88 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00050"></a>00050         <span class="comment">/*  96 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00051"></a>00051         <span class="comment">/* 104 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00052"></a>00052         <span class="comment">/* 112 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00053"></a>00053         <span class="comment">/* 120 */</span>   600,  600,  600,  600,  600,  600,  600,    0,
-<a name="l00054"></a>00054         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00055"></a>00055         <span class="comment">/* 136 */</span>     0,    0,    0,    0,  600,  600,  600,  600,
-<a name="l00056"></a>00056         <span class="comment">/* 144 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00057"></a>00057         <span class="comment">/* 152 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00058"></a>00058         <span class="comment">/* 160 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00059"></a>00059         <span class="comment">/* 168 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00060"></a>00060         <span class="comment">/* 176 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00061"></a>00061         <span class="comment">/* 184 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00062"></a>00062         <span class="comment">/* 192 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00063"></a>00063         <span class="comment">/* 200 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00064"></a>00064         <span class="comment">/* 208 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00065"></a>00065         <span class="comment">/* 216 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00066"></a>00066         <span class="comment">/* 224 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00067"></a>00067         <span class="comment">/* 232 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00068"></a>00068         <span class="comment">/* 240 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00069"></a>00069         <span class="comment">/* 248 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00070"></a>00070         },
-<a name="l00071"></a>00071         {       <span class="comment">/* Courier-Bold */</span>
-<a name="l00072"></a>00072         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00073"></a>00073         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00074"></a>00074         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00075"></a>00075         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00076"></a>00076         <span class="comment">/*  32 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00077"></a>00077         <span class="comment">/*  40 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00078"></a>00078         <span class="comment">/*  48 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00079"></a>00079         <span class="comment">/*  56 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00080"></a>00080         <span class="comment">/*  64 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00081"></a>00081         <span class="comment">/*  72 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00082"></a>00082         <span class="comment">/*  80 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00083"></a>00083         <span class="comment">/*  88 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00084"></a>00084         <span class="comment">/*  96 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00085"></a>00085         <span class="comment">/* 104 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00086"></a>00086         <span class="comment">/* 112 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00087"></a>00087         <span class="comment">/* 120 */</span>   600,  600,  600,  600,  600,  600,  600,    0,
-<a name="l00088"></a>00088         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00089"></a>00089         <span class="comment">/* 136 */</span>     0,    0,    0,    0,  600,  600,  600,  600,
-<a name="l00090"></a>00090         <span class="comment">/* 144 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00091"></a>00091         <span class="comment">/* 152 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00092"></a>00092         <span class="comment">/* 160 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00093"></a>00093         <span class="comment">/* 168 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00094"></a>00094         <span class="comment">/* 176 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00095"></a>00095         <span class="comment">/* 184 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00096"></a>00096         <span class="comment">/* 192 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00097"></a>00097         <span class="comment">/* 200 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00098"></a>00098         <span class="comment">/* 208 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00099"></a>00099         <span class="comment">/* 216 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00100"></a>00100         <span class="comment">/* 224 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00101"></a>00101         <span class="comment">/* 232 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00102"></a>00102         <span class="comment">/* 240 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00103"></a>00103         <span class="comment">/* 248 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00104"></a>00104         },
-<a name="l00105"></a>00105         {       <span class="comment">/* Courier-Oblique */</span>
-<a name="l00106"></a>00106         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00107"></a>00107         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00108"></a>00108         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00109"></a>00109         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00110"></a>00110         <span class="comment">/*  32 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00111"></a>00111         <span class="comment">/*  40 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00112"></a>00112         <span class="comment">/*  48 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00113"></a>00113         <span class="comment">/*  56 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00114"></a>00114         <span class="comment">/*  64 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00115"></a>00115         <span class="comment">/*  72 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00116"></a>00116         <span class="comment">/*  80 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00117"></a>00117         <span class="comment">/*  88 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00118"></a>00118         <span class="comment">/*  96 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00119"></a>00119         <span class="comment">/* 104 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00120"></a>00120         <span class="comment">/* 112 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00121"></a>00121         <span class="comment">/* 120 */</span>   600,  600,  600,  600,  600,  600,  600,    0,
-<a name="l00122"></a>00122         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00123"></a>00123         <span class="comment">/* 136 */</span>     0,    0,    0,    0,  600,  600,  600,  600,
-<a name="l00124"></a>00124         <span class="comment">/* 144 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00125"></a>00125         <span class="comment">/* 152 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00126"></a>00126         <span class="comment">/* 160 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00127"></a>00127         <span class="comment">/* 168 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00128"></a>00128         <span class="comment">/* 176 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00129"></a>00129         <span class="comment">/* 184 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00130"></a>00130         <span class="comment">/* 192 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00131"></a>00131         <span class="comment">/* 200 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00132"></a>00132         <span class="comment">/* 208 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00133"></a>00133         <span class="comment">/* 216 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00134"></a>00134         <span class="comment">/* 224 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00135"></a>00135         <span class="comment">/* 232 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00136"></a>00136         <span class="comment">/* 240 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00137"></a>00137         <span class="comment">/* 248 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00138"></a>00138         },
-<a name="l00139"></a>00139         {       <span class="comment">/* Courier-BoldOblique */</span>
-<a name="l00140"></a>00140         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00141"></a>00141         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00142"></a>00142         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00143"></a>00143         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00144"></a>00144         <span class="comment">/*  32 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00145"></a>00145         <span class="comment">/*  40 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00146"></a>00146         <span class="comment">/*  48 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00147"></a>00147         <span class="comment">/*  56 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00148"></a>00148         <span class="comment">/*  64 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00149"></a>00149         <span class="comment">/*  72 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00150"></a>00150         <span class="comment">/*  80 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00151"></a>00151         <span class="comment">/*  88 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00152"></a>00152         <span class="comment">/*  96 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00153"></a>00153         <span class="comment">/* 104 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00154"></a>00154         <span class="comment">/* 112 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00155"></a>00155         <span class="comment">/* 120 */</span>   600,  600,  600,  600,  600,  600,  600,    0,
-<a name="l00156"></a>00156         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00157"></a>00157         <span class="comment">/* 136 */</span>     0,    0,    0,    0,  600,  600,  600,  600,
-<a name="l00158"></a>00158         <span class="comment">/* 144 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00159"></a>00159         <span class="comment">/* 152 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00160"></a>00160         <span class="comment">/* 160 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00161"></a>00161         <span class="comment">/* 168 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00162"></a>00162         <span class="comment">/* 176 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00163"></a>00163         <span class="comment">/* 184 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00164"></a>00164         <span class="comment">/* 192 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00165"></a>00165         <span class="comment">/* 200 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00166"></a>00166         <span class="comment">/* 208 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00167"></a>00167         <span class="comment">/* 216 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00168"></a>00168         <span class="comment">/* 224 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00169"></a>00169         <span class="comment">/* 232 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00170"></a>00170         <span class="comment">/* 240 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00171"></a>00171         <span class="comment">/* 248 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l00172"></a>00172         },
-<a name="l00173"></a>00173         {       <span class="comment">/* Times-Roman */</span>
-<a name="l00174"></a>00174         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00175"></a>00175         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00176"></a>00176         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00177"></a>00177         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00178"></a>00178         <span class="comment">/*  32 */</span>   250,  333,  408,  500,  500,  833,  778,  333,
-<a name="l00179"></a>00179         <span class="comment">/*  40 */</span>   333,  333,  500,  564,  250,  333,  250,  278,
-<a name="l00180"></a>00180         <span class="comment">/*  48 */</span>   500,  500,  500,  500,  500,  500,  500,  500,
-<a name="l00181"></a>00181         <span class="comment">/*  56 */</span>   500,  500,  278,  278,  564,  564,  564,  444,
-<a name="l00182"></a>00182         <span class="comment">/*  64 */</span>   921,  722,  667,  667,  722,  611,  556,  722,
-<a name="l00183"></a>00183         <span class="comment">/*  72 */</span>   722,  333,  389,  722,  611,  889,  722,  722,
-<a name="l00184"></a>00184         <span class="comment">/*  80 */</span>   556,  722,  667,  556,  611,  722,  722,  944,
-<a name="l00185"></a>00185         <span class="comment">/*  88 */</span>   722,  722,  611,  333,  278,  333,  469,  500,
-<a name="l00186"></a>00186         <span class="comment">/*  96 */</span>   333,  444,  500,  444,  500,  444,  333,  500,
-<a name="l00187"></a>00187         <span class="comment">/* 104 */</span>   500,  278,  278,  500,  278,  778,  500,  500,
-<a name="l00188"></a>00188         <span class="comment">/* 112 */</span>   500,  500,  333,  389,  278,  500,  500,  722,
-<a name="l00189"></a>00189         <span class="comment">/* 120 */</span>   500,  500,  444,  480,  200,  480,  541,    0,
-<a name="l00190"></a>00190         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00191"></a>00191         <span class="comment">/* 136 */</span>     0,    0,    0,    0, 1000,  980, 1000,  350,
-<a name="l00192"></a>00192         <span class="comment">/* 144 */</span>   333,  333,  333,  333,  444,  444,  444,  500,
-<a name="l00193"></a>00193         <span class="comment">/* 152 */</span>  1000,  564,  889,  722,  500,  500,  556,  556,
-<a name="l00194"></a>00194         <span class="comment">/* 160 */</span>   250,  333,  500,  500,  500,  500,  200,  500,
-<a name="l00195"></a>00195         <span class="comment">/* 168 */</span>   333,  760,  276,  500,  564,  333,  760,  333,
-<a name="l00196"></a>00196         <span class="comment">/* 176 */</span>   400,  564,  300,  300,  333,  500,  453,  250,
-<a name="l00197"></a>00197         <span class="comment">/* 184 */</span>   333,  300,  310,  500,  750,  750,  750,  444,
-<a name="l00198"></a>00198         <span class="comment">/* 192 */</span>   722,  722,  722,  722,  722,  722,  889,  667,
-<a name="l00199"></a>00199         <span class="comment">/* 200 */</span>   611,  611,  611,  611,  333,  333,  333,  333,
-<a name="l00200"></a>00200         <span class="comment">/* 208 */</span>   722,  722,  722,  722,  722,  722,  722,  564,
-<a name="l00201"></a>00201         <span class="comment">/* 216 */</span>   722,  722,  722,  722,  722,  722,  556,  500,
-<a name="l00202"></a>00202         <span class="comment">/* 224 */</span>   444,  444,  444,  444,  444,  444,  667,  444,
-<a name="l00203"></a>00203         <span class="comment">/* 232 */</span>   444,  444,  444,  444,  278,  278,  278,  278,
-<a name="l00204"></a>00204         <span class="comment">/* 240 */</span>   500,  500,  500,  500,  500,  500,  500,  564,
-<a name="l00205"></a>00205         <span class="comment">/* 248 */</span>   500,  500,  500,  500,  500,  500,  500,  500,
-<a name="l00206"></a>00206         },
-<a name="l00207"></a>00207         {       <span class="comment">/* Times-Bold */</span>
-<a name="l00208"></a>00208         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00209"></a>00209         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00210"></a>00210         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00211"></a>00211         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00212"></a>00212         <span class="comment">/*  32 */</span>   250,  333,  555,  500,  500, 1000,  833,  333,
-<a name="l00213"></a>00213         <span class="comment">/*  40 */</span>   333,  333,  500,  570,  250,  333,  250,  278,
-<a name="l00214"></a>00214         <span class="comment">/*  48 */</span>   500,  500,  500,  500,  500,  500,  500,  500,
-<a name="l00215"></a>00215         <span class="comment">/*  56 */</span>   500,  500,  333,  333,  570,  570,  570,  500,
-<a name="l00216"></a>00216         <span class="comment">/*  64 */</span>   930,  722,  667,  722,  722,  667,  611,  778,
-<a name="l00217"></a>00217         <span class="comment">/*  72 */</span>   778,  389,  500,  778,  667,  944,  722,  778,
-<a name="l00218"></a>00218         <span class="comment">/*  80 */</span>   611,  778,  722,  556,  667,  722,  722, 1000,
-<a name="l00219"></a>00219         <span class="comment">/*  88 */</span>   722,  722,  667,  333,  278,  333,  581,  500,
-<a name="l00220"></a>00220         <span class="comment">/*  96 */</span>   333,  500,  556,  444,  556,  444,  333,  500,
-<a name="l00221"></a>00221         <span class="comment">/* 104 */</span>   556,  278,  333,  556,  278,  833,  556,  500,
-<a name="l00222"></a>00222         <span class="comment">/* 112 */</span>   556,  556,  444,  389,  333,  556,  500,  722,
-<a name="l00223"></a>00223         <span class="comment">/* 120 */</span>   500,  500,  444,  394,  220,  394,  520,    0,
-<a name="l00224"></a>00224         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00225"></a>00225         <span class="comment">/* 136 */</span>     0,    0,    0,    0, 1000, 1000, 1000,  350,
-<a name="l00226"></a>00226         <span class="comment">/* 144 */</span>   333,  333,  333,  333,  500,  500,  500,  500,
-<a name="l00227"></a>00227         <span class="comment">/* 152 */</span>  1000,  570, 1000,  722,  500,  500,  556,  556,
-<a name="l00228"></a>00228         <span class="comment">/* 160 */</span>   250,  333,  500,  500,  500,  500,  220,  500,
-<a name="l00229"></a>00229         <span class="comment">/* 168 */</span>   333,  747,  300,  500,  570,  333,  747,  333,
-<a name="l00230"></a>00230         <span class="comment">/* 176 */</span>   400,  570,  300,  300,  333,  556,  540,  250,
-<a name="l00231"></a>00231         <span class="comment">/* 184 */</span>   333,  300,  330,  500,  750,  750,  750,  500,
-<a name="l00232"></a>00232         <span class="comment">/* 192 */</span>   722,  722,  722,  722,  722,  722, 1000,  722,
-<a name="l00233"></a>00233         <span class="comment">/* 200 */</span>   667,  667,  667,  667,  389,  389,  389,  389,
-<a name="l00234"></a>00234         <span class="comment">/* 208 */</span>   722,  722,  778,  778,  778,  778,  778,  570,
-<a name="l00235"></a>00235         <span class="comment">/* 216 */</span>   778,  722,  722,  722,  722,  722,  611,  556,
-<a name="l00236"></a>00236         <span class="comment">/* 224 */</span>   500,  500,  500,  500,  500,  500,  722,  444,
-<a name="l00237"></a>00237         <span class="comment">/* 232 */</span>   444,  444,  444,  444,  278,  278,  278,  278,
-<a name="l00238"></a>00238         <span class="comment">/* 240 */</span>   500,  556,  500,  500,  500,  500,  500,  570,
-<a name="l00239"></a>00239         <span class="comment">/* 248 */</span>   500,  556,  556,  556,  556,  500,  556,  500,
-<a name="l00240"></a>00240         },
-<a name="l00241"></a>00241         {       <span class="comment">/* Times-Italic */</span>
-<a name="l00242"></a>00242         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00243"></a>00243         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00244"></a>00244         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00245"></a>00245         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00246"></a>00246         <span class="comment">/*  32 */</span>   250,  333,  420,  500,  500,  833,  778,  333,
-<a name="l00247"></a>00247         <span class="comment">/*  40 */</span>   333,  333,  500,  675,  250,  333,  250,  278,
-<a name="l00248"></a>00248         <span class="comment">/*  48 */</span>   500,  500,  500,  500,  500,  500,  500,  500,
-<a name="l00249"></a>00249         <span class="comment">/*  56 */</span>   500,  500,  333,  333,  675,  675,  675,  500,
-<a name="l00250"></a>00250         <span class="comment">/*  64 */</span>   920,  611,  611,  667,  722,  611,  611,  722,
-<a name="l00251"></a>00251         <span class="comment">/*  72 */</span>   722,  333,  444,  667,  556,  833,  667,  722,
-<a name="l00252"></a>00252         <span class="comment">/*  80 */</span>   611,  722,  611,  500,  556,  722,  611,  833,
-<a name="l00253"></a>00253         <span class="comment">/*  88 */</span>   611,  556,  556,  389,  278,  389,  422,  500,
-<a name="l00254"></a>00254         <span class="comment">/*  96 */</span>   333,  500,  500,  444,  500,  444,  278,  500,
-<a name="l00255"></a>00255         <span class="comment">/* 104 */</span>   500,  278,  278,  444,  278,  722,  500,  500,
-<a name="l00256"></a>00256         <span class="comment">/* 112 */</span>   500,  500,  389,  389,  278,  500,  444,  667,
-<a name="l00257"></a>00257         <span class="comment">/* 120 */</span>   444,  444,  389,  400,  275,  400,  541,    0,
-<a name="l00258"></a>00258         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00259"></a>00259         <span class="comment">/* 136 */</span>     0,    0,    0,    0,  889,  980, 1000,  350,
-<a name="l00260"></a>00260         <span class="comment">/* 144 */</span>   333,  333,  333,  333,  556,  556,  556,  500,
-<a name="l00261"></a>00261         <span class="comment">/* 152 */</span>   889,  675,  944,  667,  500,  500,  500,  500,
-<a name="l00262"></a>00262         <span class="comment">/* 160 */</span>   250,  389,  500,  500,  500,  500,  275,  500,
-<a name="l00263"></a>00263         <span class="comment">/* 168 */</span>   333,  760,  276,  500,  675,  333,  760,  333,
-<a name="l00264"></a>00264         <span class="comment">/* 176 */</span>   400,  675,  300,  300,  333,  500,  523,  250,
-<a name="l00265"></a>00265         <span class="comment">/* 184 */</span>   333,  300,  310,  500,  750,  750,  750,  500,
-<a name="l00266"></a>00266         <span class="comment">/* 192 */</span>   611,  611,  611,  611,  611,  611,  889,  667,
-<a name="l00267"></a>00267         <span class="comment">/* 200 */</span>   611,  611,  611,  611,  333,  333,  333,  333,
-<a name="l00268"></a>00268         <span class="comment">/* 208 */</span>   722,  667,  722,  722,  722,  722,  722,  675,
-<a name="l00269"></a>00269         <span class="comment">/* 216 */</span>   722,  722,  722,  722,  722,  556,  611,  500,
-<a name="l00270"></a>00270         <span class="comment">/* 224 */</span>   500,  500,  500,  500,  500,  500,  667,  444,
-<a name="l00271"></a>00271         <span class="comment">/* 232 */</span>   444,  444,  444,  444,  278,  278,  278,  278,
-<a name="l00272"></a>00272         <span class="comment">/* 240 */</span>   500,  500,  500,  500,  500,  500,  500,  675,
-<a name="l00273"></a>00273         <span class="comment">/* 248 */</span>   500,  500,  500,  500,  500,  444,  500,  444,
-<a name="l00274"></a>00274         },
-<a name="l00275"></a>00275         {       <span class="comment">/* Times-BoldItalic */</span>
-<a name="l00276"></a>00276         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00277"></a>00277         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00278"></a>00278         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00279"></a>00279         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00280"></a>00280         <span class="comment">/*  32 */</span>   250,  389,  555,  500,  500,  833,  778,  333,
-<a name="l00281"></a>00281         <span class="comment">/*  40 */</span>   333,  333,  500,  570,  250,  333,  250,  278,
-<a name="l00282"></a>00282         <span class="comment">/*  48 */</span>   500,  500,  500,  500,  500,  500,  500,  500,
-<a name="l00283"></a>00283         <span class="comment">/*  56 */</span>   500,  500,  333,  333,  570,  570,  570,  500,
-<a name="l00284"></a>00284         <span class="comment">/*  64 */</span>   832,  667,  667,  667,  722,  667,  667,  722,
-<a name="l00285"></a>00285         <span class="comment">/*  72 */</span>   778,  389,  500,  667,  611,  889,  722,  722,
-<a name="l00286"></a>00286         <span class="comment">/*  80 */</span>   611,  722,  667,  556,  611,  722,  667,  889,
-<a name="l00287"></a>00287         <span class="comment">/*  88 */</span>   667,  611,  611,  333,  278,  333,  570,  500,
-<a name="l00288"></a>00288         <span class="comment">/*  96 */</span>   333,  500,  500,  444,  500,  444,  333,  500,
-<a name="l00289"></a>00289         <span class="comment">/* 104 */</span>   556,  278,  278,  500,  278,  778,  556,  500,
-<a name="l00290"></a>00290         <span class="comment">/* 112 */</span>   500,  500,  389,  389,  278,  556,  444,  667,
-<a name="l00291"></a>00291         <span class="comment">/* 120 */</span>   500,  444,  389,  348,  220,  348,  570,    0,
-<a name="l00292"></a>00292         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00293"></a>00293         <span class="comment">/* 136 */</span>     0,    0,    0,    0, 1000, 1000, 1000,  350,
-<a name="l00294"></a>00294         <span class="comment">/* 144 */</span>   333,  333,  333,  333,  500,  500,  500,  500,
-<a name="l00295"></a>00295         <span class="comment">/* 152 */</span>  1000,  606,  944,  722,  500,  500,  556,  556,
-<a name="l00296"></a>00296         <span class="comment">/* 160 */</span>   250,  389,  500,  500,  500,  500,  220,  500,
-<a name="l00297"></a>00297         <span class="comment">/* 168 */</span>   333,  747,  266,  500,  606,  333,  747,  333,
-<a name="l00298"></a>00298         <span class="comment">/* 176 */</span>   400,  570,  300,  300,  333,  576,  500,  250,
-<a name="l00299"></a>00299         <span class="comment">/* 184 */</span>   333,  300,  300,  500,  750,  750,  750,  500,
-<a name="l00300"></a>00300         <span class="comment">/* 192 */</span>   667,  667,  667,  667,  667,  667,  944,  667,
-<a name="l00301"></a>00301         <span class="comment">/* 200 */</span>   667,  667,  667,  667,  389,  389,  389,  389,
-<a name="l00302"></a>00302         <span class="comment">/* 208 */</span>   722,  722,  722,  722,  722,  722,  722,  570,
-<a name="l00303"></a>00303         <span class="comment">/* 216 */</span>   722,  722,  722,  722,  722,  611,  611,  500,
-<a name="l00304"></a>00304         <span class="comment">/* 224 */</span>   500,  500,  500,  500,  500,  500,  722,  444,
-<a name="l00305"></a>00305         <span class="comment">/* 232 */</span>   444,  444,  444,  444,  278,  278,  278,  278,
-<a name="l00306"></a>00306         <span class="comment">/* 240 */</span>   500,  556,  500,  500,  500,  500,  500,  570,
-<a name="l00307"></a>00307         <span class="comment">/* 248 */</span>   500,  556,  556,  556,  556,  444,  500,  444,
-<a name="l00308"></a>00308         },
-<a name="l00309"></a>00309         {       <span class="comment">/* Helvetica */</span>
-<a name="l00310"></a>00310         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00311"></a>00311         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00312"></a>00312         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00313"></a>00313         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00314"></a>00314         <span class="comment">/*  32 */</span>   278,  278,  355,  556,  556,  889,  667,  221,
-<a name="l00315"></a>00315         <span class="comment">/*  40 */</span>   333,  333,  389,  584,  278,  333,  278,  278,
-<a name="l00316"></a>00316         <span class="comment">/*  48 */</span>   556,  556,  556,  556,  556,  556,  556,  556,
-<a name="l00317"></a>00317         <span class="comment">/*  56 */</span>   556,  556,  278,  278,  584,  584,  584,  556,
-<a name="l00318"></a>00318         <span class="comment">/*  64 */</span>  1015,  667,  667,  722,  722,  667,  611,  778,
-<a name="l00319"></a>00319         <span class="comment">/*  72 */</span>   722,  278,  500,  667,  556,  833,  722,  778,
-<a name="l00320"></a>00320         <span class="comment">/*  80 */</span>   667,  778,  722,  667,  611,  722,  667,  944,
-<a name="l00321"></a>00321         <span class="comment">/*  88 */</span>   667,  667,  611,  278,  278,  278,  469,  556,
-<a name="l00322"></a>00322         <span class="comment">/*  96 */</span>   222,  556,  556,  500,  556,  556,  278,  556,
-<a name="l00323"></a>00323         <span class="comment">/* 104 */</span>   556,  222,  222,  500,  222,  833,  556,  556,
-<a name="l00324"></a>00324         <span class="comment">/* 112 */</span>   556,  556,  333,  500,  278,  556,  500,  722,
-<a name="l00325"></a>00325         <span class="comment">/* 120 */</span>   500,  500,  500,  334,  260,  334,  584,    0,
-<a name="l00326"></a>00326         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00327"></a>00327         <span class="comment">/* 136 */</span>     0,    0,    0,    0, 1000, 1000, 1000,  350,
-<a name="l00328"></a>00328         <span class="comment">/* 144 */</span>   222,  221,  333,  333,  333,  333,  333,  556,
-<a name="l00329"></a>00329         <span class="comment">/* 152 */</span>  1000,  584, 1000,  944,  556,  556,  500,  500,
-<a name="l00330"></a>00330         <span class="comment">/* 160 */</span>   278,  333,  556,  556,  556,  556,  260,  556,
-<a name="l00331"></a>00331         <span class="comment">/* 168 */</span>   333,  737,  370,  556,  584,  333,  737,  333,
-<a name="l00332"></a>00332         <span class="comment">/* 176 */</span>   606,  584,  351,  351,  333,  556,  537,  278,
-<a name="l00333"></a>00333         <span class="comment">/* 184 */</span>   333,  351,  365,  556,  869,  869,  869,  611,
-<a name="l00334"></a>00334         <span class="comment">/* 192 */</span>   667,  667,  667,  667,  667,  667, 1000,  722,
-<a name="l00335"></a>00335         <span class="comment">/* 200 */</span>   667,  667,  667,  667,  278,  278,  278,  278,
-<a name="l00336"></a>00336         <span class="comment">/* 208 */</span>   722,  722,  778,  778,  778,  778,  778,  584,
-<a name="l00337"></a>00337         <span class="comment">/* 216 */</span>   778,  722,  722,  722,  722,  666,  666,  611,
-<a name="l00338"></a>00338         <span class="comment">/* 224 */</span>   556,  556,  556,  556,  556,  556,  889,  500,
-<a name="l00339"></a>00339         <span class="comment">/* 232 */</span>   556,  556,  556,  556,  278,  278,  278,  278,
-<a name="l00340"></a>00340         <span class="comment">/* 240 */</span>   556,  556,  556,  556,  556,  556,  556,  584,
-<a name="l00341"></a>00341         <span class="comment">/* 248 */</span>   611,  556,  556,  556,  556,  500,  555,  500,
-<a name="l00342"></a>00342         },
-<a name="l00343"></a>00343         {       <span class="comment">/* Helvetica-Bold */</span>
-<a name="l00344"></a>00344         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00345"></a>00345         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00346"></a>00346         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00347"></a>00347         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00348"></a>00348         <span class="comment">/*  32 */</span>   278,  333,  474,  556,  556,  889,  722,  278,
-<a name="l00349"></a>00349         <span class="comment">/*  40 */</span>   333,  333,  389,  584,  278,  333,  278,  278,
-<a name="l00350"></a>00350         <span class="comment">/*  48 */</span>   556,  556,  556,  556,  556,  556,  556,  556,
-<a name="l00351"></a>00351         <span class="comment">/*  56 */</span>   556,  556,  333,  333,  584,  584,  584,  611,
-<a name="l00352"></a>00352         <span class="comment">/*  64 */</span>   975,  722,  722,  722,  722,  667,  611,  778,
-<a name="l00353"></a>00353         <span class="comment">/*  72 */</span>   722,  278,  556,  722,  611,  833,  722,  778,
-<a name="l00354"></a>00354         <span class="comment">/*  80 */</span>   667,  778,  722,  667,  611,  722,  667,  944,
-<a name="l00355"></a>00355         <span class="comment">/*  88 */</span>   667,  667,  611,  333,  278,  333,  584,  556,
-<a name="l00356"></a>00356         <span class="comment">/*  96 */</span>   278,  556,  611,  556,  611,  556,  333,  611,
-<a name="l00357"></a>00357         <span class="comment">/* 104 */</span>   611,  278,  278,  556,  278,  889,  611,  611,
-<a name="l00358"></a>00358         <span class="comment">/* 112 */</span>   611,  611,  389,  556,  333,  611,  556,  778,
-<a name="l00359"></a>00359         <span class="comment">/* 120 */</span>   556,  556,  500,  389,  280,  389,  584,    0,
-<a name="l00360"></a>00360         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00361"></a>00361         <span class="comment">/* 136 */</span>     0,    0,    0,    0, 1000, 1000, 1000,  350,
-<a name="l00362"></a>00362         <span class="comment">/* 144 */</span>   278,  278,  333,  333,  500,  500,  500,  556,
-<a name="l00363"></a>00363         <span class="comment">/* 152 */</span>  1000,  584, 1000,  944,  556,  556,  611,  611,
-<a name="l00364"></a>00364         <span class="comment">/* 160 */</span>   278,  333,  556,  556,  556,  556,  280,  556,
-<a name="l00365"></a>00365         <span class="comment">/* 168 */</span>   333,  737,  370,  556,  584,  333,  737,  333,
-<a name="l00366"></a>00366         <span class="comment">/* 176 */</span>   606,  584,  351,  351,  333,  611,  556,  278,
-<a name="l00367"></a>00367         <span class="comment">/* 184 */</span>   333,  351,  365,  556,  869,  869,  869,  611,
-<a name="l00368"></a>00368         <span class="comment">/* 192 */</span>   722,  722,  722,  722,  722,  722, 1000,  722,
-<a name="l00369"></a>00369         <span class="comment">/* 200 */</span>   667,  667,  667,  667,  278,  278,  278,  278,
-<a name="l00370"></a>00370         <span class="comment">/* 208 */</span>   722,  722,  778,  778,  778,  778,  778,  584,
-<a name="l00371"></a>00371         <span class="comment">/* 216 */</span>   778,  722,  722,  722,  722,  667,  667,  611,
-<a name="l00372"></a>00372         <span class="comment">/* 224 */</span>   556,  556,  556,  556,  556,  556,  889,  556,
-<a name="l00373"></a>00373         <span class="comment">/* 232 */</span>   556,  556,  556,  556,  278,  278,  278,  278,
-<a name="l00374"></a>00374         <span class="comment">/* 240 */</span>   611,  611,  611,  611,  611,  611,  611,  584,
-<a name="l00375"></a>00375         <span class="comment">/* 248 */</span>   611,  611,  611,  611,  611,  556,  611,  556,
-<a name="l00376"></a>00376         },
-<a name="l00377"></a>00377         {       <span class="comment">/* Helvetica-Oblique */</span>
-<a name="l00378"></a>00378         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00379"></a>00379         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00380"></a>00380         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00381"></a>00381         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00382"></a>00382         <span class="comment">/*  32 */</span>   278,  278,  355,  556,  556,  889,  667,  222,
-<a name="l00383"></a>00383         <span class="comment">/*  40 */</span>   333,  333,  389,  584,  278,  333,  278,  278,
-<a name="l00384"></a>00384         <span class="comment">/*  48 */</span>   556,  556,  556,  556,  556,  556,  556,  556,
-<a name="l00385"></a>00385         <span class="comment">/*  56 */</span>   556,  556,  278,  278,  584,  584,  584,  556,
-<a name="l00386"></a>00386         <span class="comment">/*  64 */</span>  1015,  667,  667,  722,  722,  667,  611,  778,
-<a name="l00387"></a>00387         <span class="comment">/*  72 */</span>   722,  278,  500,  667,  556,  833,  722,  778,
-<a name="l00388"></a>00388         <span class="comment">/*  80 */</span>   667,  778,  722,  667,  611,  722,  667,  944,
-<a name="l00389"></a>00389         <span class="comment">/*  88 */</span>   667,  667,  611,  278,  278,  278,  469,  556,
-<a name="l00390"></a>00390         <span class="comment">/*  96 */</span>   222,  556,  556,  500,  556,  556,  278,  556,
-<a name="l00391"></a>00391         <span class="comment">/* 104 */</span>   556,  222,  222,  500,  222,  833,  556,  556,
-<a name="l00392"></a>00392         <span class="comment">/* 112 */</span>   556,  556,  333,  500,  278,  556,  500,  722,
-<a name="l00393"></a>00393         <span class="comment">/* 120 */</span>   500,  500,  500,  334,  260,  334,  584,    0,
-<a name="l00394"></a>00394         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00395"></a>00395         <span class="comment">/* 136 */</span>     0,    0,    0,    0, 1000, 1000, 1000,  350,
-<a name="l00396"></a>00396         <span class="comment">/* 144 */</span>   222,  222,  333,  333,  333,  333,  333,  556,
-<a name="l00397"></a>00397         <span class="comment">/* 152 */</span>  1000,  584, 1000,  944,  556,  556,  500,  500,
-<a name="l00398"></a>00398         <span class="comment">/* 160 */</span>   278,  333,  556,  556,  556,  556,  260,  556,
-<a name="l00399"></a>00399         <span class="comment">/* 168 */</span>   333,  737,  370,  556,  584,  333,  737,  333,
-<a name="l00400"></a>00400         <span class="comment">/* 176 */</span>   606,  584,  390,  390,  333,  556,  537,  278,
-<a name="l00401"></a>00401         <span class="comment">/* 184 */</span>   333,  390,  365,  556,  947,  947,  947,  611,
-<a name="l00402"></a>00402         <span class="comment">/* 192 */</span>   667,  667,  667,  667,  667,  667, 1000,  722,
-<a name="l00403"></a>00403         <span class="comment">/* 200 */</span>   667,  667,  667,  667,  278,  278,  278,  278,
-<a name="l00404"></a>00404         <span class="comment">/* 208 */</span>   722,  722,  778,  778,  778,  778,  778,  584,
-<a name="l00405"></a>00405         <span class="comment">/* 216 */</span>   778,  722,  722,  722,  722,  667,  667,  611,
-<a name="l00406"></a>00406         <span class="comment">/* 224 */</span>   556,  556,  556,  556,  556,  556,  889,  500,
-<a name="l00407"></a>00407         <span class="comment">/* 232 */</span>   556,  556,  556,  556,  278,  278,  278,  278,
-<a name="l00408"></a>00408         <span class="comment">/* 240 */</span>   556,  556,  556,  556,  556,  556,  556,  584,
-<a name="l00409"></a>00409         <span class="comment">/* 248 */</span>   611,  556,  556,  556,  556,  500,  556,  500,
-<a name="l00410"></a>00410         },
-<a name="l00411"></a>00411         {       <span class="comment">/* Helvetica-BoldOblique */</span>
-<a name="l00412"></a>00412         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00413"></a>00413         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00414"></a>00414         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00415"></a>00415         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00416"></a>00416         <span class="comment">/*  32 */</span>   278,  333,  474,  556,  556,  889,  722,  278,
-<a name="l00417"></a>00417         <span class="comment">/*  40 */</span>   333,  333,  389,  584,  278,  333,  278,  278,
-<a name="l00418"></a>00418         <span class="comment">/*  48 */</span>   556,  556,  556,  556,  556,  556,  556,  556,
-<a name="l00419"></a>00419         <span class="comment">/*  56 */</span>   556,  556,  333,  333,  584,  584,  584,  611,
-<a name="l00420"></a>00420         <span class="comment">/*  64 */</span>   975,  722,  722,  722,  722,  667,  611,  778,
-<a name="l00421"></a>00421         <span class="comment">/*  72 */</span>   722,  278,  556,  722,  611,  833,  722,  778,
-<a name="l00422"></a>00422         <span class="comment">/*  80 */</span>   667,  778,  722,  667,  611,  722,  667,  944,
-<a name="l00423"></a>00423         <span class="comment">/*  88 */</span>   667,  667,  611,  333,  278,  333,  584,  556,
-<a name="l00424"></a>00424         <span class="comment">/*  96 */</span>   278,  556,  611,  556,  611,  556,  333,  611,
-<a name="l00425"></a>00425         <span class="comment">/* 104 */</span>   611,  278,  278,  556,  278,  889,  611,  611,
-<a name="l00426"></a>00426         <span class="comment">/* 112 */</span>   611,  611,  389,  556,  333,  611,  556,  778,
-<a name="l00427"></a>00427         <span class="comment">/* 120 */</span>   556,  556,  500,  389,  280,  389,  584,    0,
-<a name="l00428"></a>00428         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00429"></a>00429         <span class="comment">/* 136 */</span>     0,    0,    0,    0, 1000, 1000, 1000,  350,
-<a name="l00430"></a>00430         <span class="comment">/* 144 */</span>   278,  278,  333,  333,  500,  500,  500,  556,
-<a name="l00431"></a>00431         <span class="comment">/* 152 */</span>  1000,  584, 1000,  944,  556,  556,  611,  611,
-<a name="l00432"></a>00432         <span class="comment">/* 160 */</span>   278,  333,  556,  556,  556,  556,  280,  556,
-<a name="l00433"></a>00433         <span class="comment">/* 168 */</span>   333,  737,  370,  556,  584,  333,  737,  333,
-<a name="l00434"></a>00434         <span class="comment">/* 176 */</span>   606,  584,  444,  444,  333,  611,  556,  278,
-<a name="l00435"></a>00435         <span class="comment">/* 184 */</span>   333,  444,  365,  556, 1055, 1055, 1055,  611,
-<a name="l00436"></a>00436         <span class="comment">/* 192 */</span>   722,  722,  722,  722,  722,  722, 1000,  722,
-<a name="l00437"></a>00437         <span class="comment">/* 200 */</span>   667,  667,  667,  667,  278,  278,  278,  278,
-<a name="l00438"></a>00438         <span class="comment">/* 208 */</span>   722,  722,  778,  778,  778,  778,  778,  584,
-<a name="l00439"></a>00439         <span class="comment">/* 216 */</span>   778,  722,  722,  722,  722,  667,  667,  611,
-<a name="l00440"></a>00440         <span class="comment">/* 224 */</span>   556,  556,  556,  556,  556,  556,  889,  556,
-<a name="l00441"></a>00441         <span class="comment">/* 232 */</span>   556,  556,  556,  556,  278,  278,  278,  278,
-<a name="l00442"></a>00442         <span class="comment">/* 240 */</span>   611,  611,  611,  611,  611,  611,  611,  584,
-<a name="l00443"></a>00443         <span class="comment">/* 248 */</span>   611,  611,  611,  611,  611,  556,  611,  556,
-<a name="l00444"></a>00444         },
-<a name="l00445"></a>00445         {       <span class="comment">/* Palatino-Roman */</span>
-<a name="l00446"></a>00446         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00447"></a>00447         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00448"></a>00448         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00449"></a>00449         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00450"></a>00450         <span class="comment">/*  32 */</span>   250,  278,  371,  500,  500,  840,  778,  278,
-<a name="l00451"></a>00451         <span class="comment">/*  40 */</span>   333,  333,  389,  606,  250,  333,  250,  606,
-<a name="l00452"></a>00452         <span class="comment">/*  48 */</span>   500,  500,  500,  500,  500,  500,  500,  500,
-<a name="l00453"></a>00453         <span class="comment">/*  56 */</span>   500,  500,  250,  250,  606,  606,  606,  444,
-<a name="l00454"></a>00454         <span class="comment">/*  64 */</span>   747,  778,  611,  709,  774,  611,  556,  763,
-<a name="l00455"></a>00455         <span class="comment">/*  72 */</span>   832,  337,  333,  726,  611,  946,  831,  786,
-<a name="l00456"></a>00456         <span class="comment">/*  80 */</span>   604,  786,  668,  525,  613,  778,  722, 1000,
-<a name="l00457"></a>00457         <span class="comment">/*  88 */</span>   667,  667,  667,  333,  606,  333,  606,  500,
-<a name="l00458"></a>00458         <span class="comment">/*  96 */</span>   278,  500,  553,  444,  611,  479,  333,  556,
-<a name="l00459"></a>00459         <span class="comment">/* 104 */</span>   582,  291,  234,  556,  291,  883,  582,  546,
-<a name="l00460"></a>00460         <span class="comment">/* 112 */</span>   601,  560,  395,  424,  326,  603,  565,  834,
-<a name="l00461"></a>00461         <span class="comment">/* 120 */</span>   516,  556,  500,  333,  606,  333,  606,    0,
-<a name="l00462"></a>00462         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00463"></a>00463         <span class="comment">/* 136 */</span>     0,    0,    0,    0, 1000,  979, 1144,  606,
-<a name="l00464"></a>00464         <span class="comment">/* 144 */</span>   278,  278,  331,  331,  500,  500,  500,  500,
-<a name="l00465"></a>00465         <span class="comment">/* 152 */</span>  1000,  606,  998,  827,  500,  500,  605,  608,
-<a name="l00466"></a>00466         <span class="comment">/* 160 */</span>   250,  278,  500,  500,  500,  500,  606,  500,
-<a name="l00467"></a>00467         <span class="comment">/* 168 */</span>   333,  747,  333,  500,  606,  333,  747,  333,
-<a name="l00468"></a>00468         <span class="comment">/* 176 */</span>   400,  606,  300,  300,  333,  603,  628,  250,
-<a name="l00469"></a>00469         <span class="comment">/* 184 */</span>   333,  300,  333,  500,  750,  750,  750,  444,
-<a name="l00470"></a>00470         <span class="comment">/* 192 */</span>   778,  778,  778,  778,  778,  778,  944,  709,
-<a name="l00471"></a>00471         <span class="comment">/* 200 */</span>   611,  611,  611,  611,  337,  337,  337,  337,
-<a name="l00472"></a>00472         <span class="comment">/* 208 */</span>   774,  831,  786,  786,  786,  786,  786,  606,
-<a name="l00473"></a>00473         <span class="comment">/* 216 */</span>   833,  778,  778,  778,  778,  667,  604,  556,
-<a name="l00474"></a>00474         <span class="comment">/* 224 */</span>   500,  500,  500,  500,  500,  500,  758,  444,
-<a name="l00475"></a>00475         <span class="comment">/* 232 */</span>   479,  479,  479,  479,  287,  287,  287,  287,
-<a name="l00476"></a>00476         <span class="comment">/* 240 */</span>   546,  582,  546,  546,  546,  546,  546,  606,
-<a name="l00477"></a>00477         <span class="comment">/* 248 */</span>   556,  603,  603,  603,  603,  556,  601,  556,
-<a name="l00478"></a>00478         },
-<a name="l00479"></a>00479         {       <span class="comment">/* Palatino-Bold */</span>
-<a name="l00480"></a>00480         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00481"></a>00481         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00482"></a>00482         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00483"></a>00483         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00484"></a>00484         <span class="comment">/*  32 */</span>   250,  278,  402,  500,  500,  889,  833,  278,
-<a name="l00485"></a>00485         <span class="comment">/*  40 */</span>   333,  333,  444,  606,  250,  333,  250,  296,
-<a name="l00486"></a>00486         <span class="comment">/*  48 */</span>   500,  500,  500,  500,  500,  500,  500,  500,
-<a name="l00487"></a>00487         <span class="comment">/*  56 */</span>   500,  500,  250,  250,  606,  606,  606,  444,
-<a name="l00488"></a>00488         <span class="comment">/*  64 */</span>   747,  778,  667,  722,  833,  611,  556,  833,
-<a name="l00489"></a>00489         <span class="comment">/*  72 */</span>   833,  389,  389,  778,  611, 1000,  833,  833,
-<a name="l00490"></a>00490         <span class="comment">/*  80 */</span>   611,  833,  722,  611,  667,  778,  778, 1000,
-<a name="l00491"></a>00491         <span class="comment">/*  88 */</span>   667,  667,  667,  333,  606,  333,  606,  500,
-<a name="l00492"></a>00492         <span class="comment">/*  96 */</span>   278,  500,  611,  444,  611,  500,  389,  556,
-<a name="l00493"></a>00493         <span class="comment">/* 104 */</span>   611,  333,  333,  611,  333,  889,  611,  556,
-<a name="l00494"></a>00494         <span class="comment">/* 112 */</span>   611,  611,  389,  444,  333,  611,  556,  833,
-<a name="l00495"></a>00495         <span class="comment">/* 120 */</span>   500,  556,  500,  310,  606,  310,  606,    0,
-<a name="l00496"></a>00496         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00497"></a>00497         <span class="comment">/* 136 */</span>     0,    0,    0,    0, 1000,  998, 1000,  606,
-<a name="l00498"></a>00498         <span class="comment">/* 144 */</span>   278,  278,  389,  389,  500,  500,  500,  500,
-<a name="l00499"></a>00499         <span class="comment">/* 152 */</span>  1000,  606, 1000,  833,  500,  500,  611,  611,
-<a name="l00500"></a>00500         <span class="comment">/* 160 */</span>   250,  278,  500,  500,  500,  500,  606,  500,
-<a name="l00501"></a>00501         <span class="comment">/* 168 */</span>   333,  747,  438,  500,  606,  333,  747,  333,
-<a name="l00502"></a>00502         <span class="comment">/* 176 */</span>   400,  606,  300,  300,  333,  611,  641,  250,
-<a name="l00503"></a>00503         <span class="comment">/* 184 */</span>   333,  300,  488,  500,  750,  750,  750,  444,
-<a name="l00504"></a>00504         <span class="comment">/* 192 */</span>   778,  778,  778,  778,  778,  778, 1000,  722,
-<a name="l00505"></a>00505         <span class="comment">/* 200 */</span>   611,  611,  611,  611,  389,  389,  389,  389,
-<a name="l00506"></a>00506         <span class="comment">/* 208 */</span>   833,  833,  833,  833,  833,  833,  833,  606,
-<a name="l00507"></a>00507         <span class="comment">/* 216 */</span>   833,  778,  778,  778,  778,  667,  611,  611,
-<a name="l00508"></a>00508         <span class="comment">/* 224 */</span>   500,  500,  500,  500,  500,  500,  778,  444,
-<a name="l00509"></a>00509         <span class="comment">/* 232 */</span>   500,  500,  500,  500,  333,  333,  333,  333,
-<a name="l00510"></a>00510         <span class="comment">/* 240 */</span>   556,  611,  556,  556,  556,  556,  556,  606,
-<a name="l00511"></a>00511         <span class="comment">/* 248 */</span>   556,  611,  611,  611,  611,  556,  611,  556,
-<a name="l00512"></a>00512         },
-<a name="l00513"></a>00513         {       <span class="comment">/* Palatino-Italic */</span>
-<a name="l00514"></a>00514         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00515"></a>00515         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00516"></a>00516         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00517"></a>00517         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00518"></a>00518         <span class="comment">/*  32 */</span>   250,  333,  500,  500,  500,  889,  778,  278,
-<a name="l00519"></a>00519         <span class="comment">/*  40 */</span>   333,  333,  389,  606,  250,  333,  250,  296,
-<a name="l00520"></a>00520         <span class="comment">/*  48 */</span>   500,  500,  500,  500,  500,  500,  500,  500,
-<a name="l00521"></a>00521         <span class="comment">/*  56 */</span>   500,  500,  250,  250,  606,  606,  606,  500,
-<a name="l00522"></a>00522         <span class="comment">/*  64 */</span>   747,  722,  611,  667,  778,  611,  556,  722,
-<a name="l00523"></a>00523         <span class="comment">/*  72 */</span>   778,  333,  333,  667,  556,  944,  778,  778,
-<a name="l00524"></a>00524         <span class="comment">/*  80 */</span>   611,  778,  667,  556,  611,  778,  722,  944,
-<a name="l00525"></a>00525         <span class="comment">/*  88 */</span>   722,  667,  667,  333,  606,  333,  606,  500,
-<a name="l00526"></a>00526         <span class="comment">/*  96 */</span>   278,  444,  463,  407,  500,  389,  278,  500,
-<a name="l00527"></a>00527         <span class="comment">/* 104 */</span>   500,  278,  278,  444,  278,  778,  556,  444,
-<a name="l00528"></a>00528         <span class="comment">/* 112 */</span>   500,  463,  389,  389,  333,  556,  500,  722,
-<a name="l00529"></a>00529         <span class="comment">/* 120 */</span>   500,  500,  444,  333,  606,  333,  606,    0,
-<a name="l00530"></a>00530         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00531"></a>00531         <span class="comment">/* 136 */</span>     0,    0,    0,    0, 1000, 1000, 1000,  500,
-<a name="l00532"></a>00532         <span class="comment">/* 144 */</span>   278,  278,  333,  333,  500,  500,  500,  500,
-<a name="l00533"></a>00533         <span class="comment">/* 152 */</span>  1000,  606, 1028,  669,  500,  500,  528,  545,
-<a name="l00534"></a>00534         <span class="comment">/* 160 */</span>   250,  333,  500,  500,  500,  500,  606,  500,
-<a name="l00535"></a>00535         <span class="comment">/* 168 */</span>   333,  747,  333,  500,  606,  333,  747,  333,
-<a name="l00536"></a>00536         <span class="comment">/* 176 */</span>   400,  606,  300,  300,  333,  556,  500,  250,
-<a name="l00537"></a>00537         <span class="comment">/* 184 */</span>   333,  300,  333,  500,  750,  750,  750,  500,
-<a name="l00538"></a>00538         <span class="comment">/* 192 */</span>   722,  722,  722,  722,  722,  722,  941,  667,
-<a name="l00539"></a>00539         <span class="comment">/* 200 */</span>   611,  611,  611,  611,  333,  333,  333,  333,
-<a name="l00540"></a>00540         <span class="comment">/* 208 */</span>   778,  778,  778,  778,  778,  778,  778,  606,
-<a name="l00541"></a>00541         <span class="comment">/* 216 */</span>   778,  778,  778,  778,  778,  667,  611,  500,
-<a name="l00542"></a>00542         <span class="comment">/* 224 */</span>   444,  444,  444,  444,  444,  444,  638,  407,
-<a name="l00543"></a>00543         <span class="comment">/* 232 */</span>   389,  389,  389,  389,  278,  278,  278,  278,
-<a name="l00544"></a>00544         <span class="comment">/* 240 */</span>   444,  556,  444,  444,  444,  444,  444,  606,
-<a name="l00545"></a>00545         <span class="comment">/* 248 */</span>   444,  556,  556,  556,  556,  500,  500,  500,
-<a name="l00546"></a>00546         },
-<a name="l00547"></a>00547         {       <span class="comment">/* Palatino-BoldItalic */</span>
-<a name="l00548"></a>00548         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00549"></a>00549         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00550"></a>00550         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00551"></a>00551         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00552"></a>00552         <span class="comment">/*  32 */</span>   250,  333,  500,  500,  500,  889,  833,  278,
-<a name="l00553"></a>00553         <span class="comment">/*  40 */</span>   333,  333,  444,  606,  250,  389,  250,  315,
-<a name="l00554"></a>00554         <span class="comment">/*  48 */</span>   500,  500,  500,  500,  500,  500,  500,  500,
-<a name="l00555"></a>00555         <span class="comment">/*  56 */</span>   500,  500,  250,  250,  606,  606,  606,  444,
-<a name="l00556"></a>00556         <span class="comment">/*  64 */</span>   833,  722,  667,  685,  778,  611,  556,  778,
-<a name="l00557"></a>00557         <span class="comment">/*  72 */</span>   778,  389,  389,  722,  611,  944,  778,  833,
-<a name="l00558"></a>00558         <span class="comment">/*  80 */</span>   667,  833,  722,  556,  611,  778,  667, 1000,
-<a name="l00559"></a>00559         <span class="comment">/*  88 */</span>   722,  611,  667,  333,  606,  333,  606,  500,
-<a name="l00560"></a>00560         <span class="comment">/*  96 */</span>   278,  556,  537,  444,  556,  444,  333,  500,
-<a name="l00561"></a>00561         <span class="comment">/* 104 */</span>   556,  333,  333,  556,  333,  833,  556,  556,
-<a name="l00562"></a>00562         <span class="comment">/* 112 */</span>   556,  537,  389,  444,  389,  556,  556,  833,
-<a name="l00563"></a>00563         <span class="comment">/* 120 */</span>   500,  556,  500,  333,  606,  333,  606,    0,
-<a name="l00564"></a>00564         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00565"></a>00565         <span class="comment">/* 136 */</span>     0,    0,    0,    0, 1000, 1000, 1000,  606,
-<a name="l00566"></a>00566         <span class="comment">/* 144 */</span>   278,  278,  333,  333,  500,  500,  500,  500,
-<a name="l00567"></a>00567         <span class="comment">/* 152 */</span>  1000,  606,  944,  778,  556,  556,  611,  611,
-<a name="l00568"></a>00568         <span class="comment">/* 160 */</span>   250,  333,  500,  500,  500,  500,  606,  556,
-<a name="l00569"></a>00569         <span class="comment">/* 168 */</span>   333,  747,  333,  500,  606,  389,  747,  333,
-<a name="l00570"></a>00570         <span class="comment">/* 176 */</span>   400,  606,  300,  300,  333,  556,  556,  250,
-<a name="l00571"></a>00571         <span class="comment">/* 184 */</span>   333,  300,  333,  500,  750,  750,  750,  444,
-<a name="l00572"></a>00572         <span class="comment">/* 192 */</span>   722,  722,  722,  722,  722,  722,  944,  685,
-<a name="l00573"></a>00573         <span class="comment">/* 200 */</span>   611,  611,  611,  611,  389,  389,  389,  389,
-<a name="l00574"></a>00574         <span class="comment">/* 208 */</span>   778,  778,  833,  833,  833,  833,  833,  606,
-<a name="l00575"></a>00575         <span class="comment">/* 216 */</span>   833,  778,  778,  778,  778,  611,  667,  556,
-<a name="l00576"></a>00576         <span class="comment">/* 224 */</span>   556,  556,  556,  556,  556,  556,  738,  444,
-<a name="l00577"></a>00577         <span class="comment">/* 232 */</span>   444,  444,  444,  444,  333,  333,  333,  333,
-<a name="l00578"></a>00578         <span class="comment">/* 240 */</span>   556,  556,  556,  556,  556,  556,  556,  606,
-<a name="l00579"></a>00579         <span class="comment">/* 248 */</span>   556,  556,  556,  556,  556,  556,  556,  556,
-<a name="l00580"></a>00580         },
-<a name="l00581"></a>00581         {       <span class="comment">/* Helvetica-Narrow */</span>
-<a name="l00582"></a>00582         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00583"></a>00583         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00584"></a>00584         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00585"></a>00585         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00586"></a>00586         <span class="comment">/*  32 */</span>   228,  228,  291,  456,  456,  729,  547,  182,
-<a name="l00587"></a>00587         <span class="comment">/*  40 */</span>   273,  273,  319,  479,  228,  273,  228,  228,
-<a name="l00588"></a>00588         <span class="comment">/*  48 */</span>   456,  456,  456,  456,  456,  456,  456,  456,
-<a name="l00589"></a>00589         <span class="comment">/*  56 */</span>   456,  456,  228,  228,  479,  479,  479,  456,
-<a name="l00590"></a>00590         <span class="comment">/*  64 */</span>   832,  547,  547,  592,  592,  547,  501,  638,
-<a name="l00591"></a>00591         <span class="comment">/*  72 */</span>   592,  228,  410,  547,  456,  683,  592,  638,
-<a name="l00592"></a>00592         <span class="comment">/*  80 */</span>   547,  638,  592,  547,  501,  592,  547,  774,
-<a name="l00593"></a>00593         <span class="comment">/*  88 */</span>   547,  547,  501,  228,  228,  228,  385,  456,
-<a name="l00594"></a>00594         <span class="comment">/*  96 */</span>   182,  456,  456,  410,  456,  456,  228,  456,
-<a name="l00595"></a>00595         <span class="comment">/* 104 */</span>   456,  182,  182,  410,  182,  683,  456,  456,
-<a name="l00596"></a>00596         <span class="comment">/* 112 */</span>   456,  456,  273,  410,  228,  456,  410,  592,
-<a name="l00597"></a>00597         <span class="comment">/* 120 */</span>   410,  410,  410,  274,  213,  274,  479,    0,
-<a name="l00598"></a>00598         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00599"></a>00599         <span class="comment">/* 136 */</span>     0,    0,    0,    0,  820,  820,  820,  287,
-<a name="l00600"></a>00600         <span class="comment">/* 144 */</span>   182,  182,  273,  273,  273,  273,  273,  456,
-<a name="l00601"></a>00601         <span class="comment">/* 152 */</span>   820,  479,  820,  774,  456,  456,  410,  410,
-<a name="l00602"></a>00602         <span class="comment">/* 160 */</span>   228,  273,  456,  456,  456,  456,  213,  456,
-<a name="l00603"></a>00603         <span class="comment">/* 168 */</span>   273,  604,  303,  456,  479,  273,  604,  273,
-<a name="l00604"></a>00604         <span class="comment">/* 176 */</span>   328,  479,  273,  273,  273,  456,  440,  228,
-<a name="l00605"></a>00605         <span class="comment">/* 184 */</span>   273,  273,  299,  456,  684,  684,  684,  501,
-<a name="l00606"></a>00606         <span class="comment">/* 192 */</span>   547,  547,  547,  547,  547,  547,  820,  592,
-<a name="l00607"></a>00607         <span class="comment">/* 200 */</span>   547,  547,  547,  547,  228,  228,  228,  228,
-<a name="l00608"></a>00608         <span class="comment">/* 208 */</span>   592,  592,  638,  638,  638,  638,  638,  479,
-<a name="l00609"></a>00609         <span class="comment">/* 216 */</span>   638,  592,  592,  592,  592,  547,  547,  501,
-<a name="l00610"></a>00610         <span class="comment">/* 224 */</span>   456,  456,  456,  456,  456,  456,  729,  410,
-<a name="l00611"></a>00611         <span class="comment">/* 232 */</span>   456,  456,  456,  456,  228,  228,  228,  228,
-<a name="l00612"></a>00612         <span class="comment">/* 240 */</span>   456,  456,  456,  456,  456,  456,  456,  479,
-<a name="l00613"></a>00613         <span class="comment">/* 248 */</span>   501,  456,  456,  456,  456,  410,  456,  410,
-<a name="l00614"></a>00614         },
-<a name="l00615"></a>00615         {       <span class="comment">/* Helvetica-Narrow-Bold */</span>
-<a name="l00616"></a>00616         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00617"></a>00617         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00618"></a>00618         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00619"></a>00619         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00620"></a>00620         <span class="comment">/*  32 */</span>   228,  273,  389,  456,  456,  729,  592,  228,
-<a name="l00621"></a>00621         <span class="comment">/*  40 */</span>   273,  273,  319,  479,  228,  273,  228,  228,
-<a name="l00622"></a>00622         <span class="comment">/*  48 */</span>   456,  456,  456,  456,  456,  456,  456,  456,
-<a name="l00623"></a>00623         <span class="comment">/*  56 */</span>   456,  456,  273,  273,  479,  479,  479,  501,
-<a name="l00624"></a>00624         <span class="comment">/*  64 */</span>   800,  592,  592,  592,  592,  547,  501,  638,
-<a name="l00625"></a>00625         <span class="comment">/*  72 */</span>   592,  228,  456,  592,  501,  683,  592,  638,
-<a name="l00626"></a>00626         <span class="comment">/*  80 */</span>   547,  638,  592,  547,  501,  592,  547,  774,
-<a name="l00627"></a>00627         <span class="comment">/*  88 */</span>   547,  547,  501,  273,  228,  273,  479,  456,
-<a name="l00628"></a>00628         <span class="comment">/*  96 */</span>   228,  456,  501,  456,  501,  456,  273,  501,
-<a name="l00629"></a>00629         <span class="comment">/* 104 */</span>   501,  228,  228,  456,  228,  729,  501,  501,
-<a name="l00630"></a>00630         <span class="comment">/* 112 */</span>   501,  501,  319,  456,  273,  501,  456,  638,
-<a name="l00631"></a>00631         <span class="comment">/* 120 */</span>   456,  456,  410,  319,  230,  319,  479,    0,
-<a name="l00632"></a>00632         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00633"></a>00633         <span class="comment">/* 136 */</span>     0,    0,    0,    0,  820,  820,  820,  287,
-<a name="l00634"></a>00634         <span class="comment">/* 144 */</span>   228,  228,  273,  273,  410,  410,  410,  456,
-<a name="l00635"></a>00635         <span class="comment">/* 152 */</span>   820,  479,  820,  774,  456,  456,  501,  501,
-<a name="l00636"></a>00636         <span class="comment">/* 160 */</span>   228,  273,  456,  456,  456,  456,  230,  456,
-<a name="l00637"></a>00637         <span class="comment">/* 168 */</span>   273,  604,  303,  456,  479,  273,  604,  273,
-<a name="l00638"></a>00638         <span class="comment">/* 176 */</span>   328,  479,  273,  273,  273,  501,  456,  228,
-<a name="l00639"></a>00639         <span class="comment">/* 184 */</span>   273,  273,  299,  456,  684,  684,  684,  501,
-<a name="l00640"></a>00640         <span class="comment">/* 192 */</span>   592,  592,  592,  592,  592,  592,  820,  592,
-<a name="l00641"></a>00641         <span class="comment">/* 200 */</span>   547,  547,  547,  547,  228,  228,  228,  228,
-<a name="l00642"></a>00642         <span class="comment">/* 208 */</span>   592,  592,  638,  638,  638,  638,  638,  479,
-<a name="l00643"></a>00643         <span class="comment">/* 216 */</span>   638,  592,  592,  592,  592,  547,  547,  501,
-<a name="l00644"></a>00644         <span class="comment">/* 224 */</span>   456,  456,  456,  456,  456,  456,  729,  456,
-<a name="l00645"></a>00645         <span class="comment">/* 232 */</span>   456,  456,  456,  456,  228,  228,  228,  228,
-<a name="l00646"></a>00646         <span class="comment">/* 240 */</span>   501,  501,  501,  501,  501,  501,  501,  479,
-<a name="l00647"></a>00647         <span class="comment">/* 248 */</span>   501,  501,  501,  501,  501,  456,  501,  456,
-<a name="l00648"></a>00648         },
-<a name="l00649"></a>00649         {       <span class="comment">/* Helvetica-Narrow-Oblique */</span>
-<a name="l00650"></a>00650         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00651"></a>00651         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00652"></a>00652         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00653"></a>00653         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00654"></a>00654         <span class="comment">/*  32 */</span>   228,  228,  291,  456,  456,  729,  547,  182,
-<a name="l00655"></a>00655         <span class="comment">/*  40 */</span>   273,  273,  319,  479,  228,  273,  228,  228,
-<a name="l00656"></a>00656         <span class="comment">/*  48 */</span>   456,  456,  456,  456,  456,  456,  456,  456,
-<a name="l00657"></a>00657         <span class="comment">/*  56 */</span>   456,  456,  228,  228,  479,  479,  479,  456,
-<a name="l00658"></a>00658         <span class="comment">/*  64 */</span>   832,  547,  547,  592,  592,  547,  501,  638,
-<a name="l00659"></a>00659         <span class="comment">/*  72 */</span>   592,  228,  410,  547,  456,  683,  592,  638,
-<a name="l00660"></a>00660         <span class="comment">/*  80 */</span>   547,  638,  592,  547,  501,  592,  547,  774,
-<a name="l00661"></a>00661         <span class="comment">/*  88 */</span>   547,  547,  501,  228,  228,  228,  385,  456,
-<a name="l00662"></a>00662         <span class="comment">/*  96 */</span>   182,  456,  456,  410,  456,  456,  228,  456,
-<a name="l00663"></a>00663         <span class="comment">/* 104 */</span>   456,  182,  182,  410,  182,  683,  456,  456,
-<a name="l00664"></a>00664         <span class="comment">/* 112 */</span>   456,  456,  273,  410,  228,  456,  410,  592,
-<a name="l00665"></a>00665         <span class="comment">/* 120 */</span>   410,  410,  410,  274,  213,  274,  479,    0,
-<a name="l00666"></a>00666         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00667"></a>00667         <span class="comment">/* 136 */</span>     0,    0,    0,    0,  820,  820,  820,  287,
-<a name="l00668"></a>00668         <span class="comment">/* 144 */</span>   182,  182,  273,  273,  273,  273,  273,  456,
-<a name="l00669"></a>00669         <span class="comment">/* 152 */</span>   820,  479,  820,  774,  456,  456,  410,  410,
-<a name="l00670"></a>00670         <span class="comment">/* 160 */</span>   228,  273,  456,  456,  456,  456,  213,  456,
-<a name="l00671"></a>00671         <span class="comment">/* 168 */</span>   273,  604,  303,  456,  479,  273,  604,  273,
-<a name="l00672"></a>00672         <span class="comment">/* 176 */</span>   328,  479,  273,  273,  273,  456,  440,  228,
-<a name="l00673"></a>00673         <span class="comment">/* 184 */</span>   273,  273,  299,  456,  684,  684,  684,  501,
-<a name="l00674"></a>00674         <span class="comment">/* 192 */</span>   547,  547,  547,  547,  547,  547,  820,  592,
-<a name="l00675"></a>00675         <span class="comment">/* 200 */</span>   547,  547,  547,  547,  228,  228,  228,  228,
-<a name="l00676"></a>00676         <span class="comment">/* 208 */</span>   592,  592,  638,  638,  638,  638,  638,  479,
-<a name="l00677"></a>00677         <span class="comment">/* 216 */</span>   638,  592,  592,  592,  592,  547,  547,  501,
-<a name="l00678"></a>00678         <span class="comment">/* 224 */</span>   456,  456,  456,  456,  456,  456,  729,  410,
-<a name="l00679"></a>00679         <span class="comment">/* 232 */</span>   456,  456,  456,  456,  228,  228,  228,  228,
-<a name="l00680"></a>00680         <span class="comment">/* 240 */</span>   456,  456,  456,  456,  456,  456,  456,  479,
-<a name="l00681"></a>00681         <span class="comment">/* 248 */</span>   501,  456,  456,  456,  456,  410,  456,  410,
-<a name="l00682"></a>00682         },
-<a name="l00683"></a>00683         {       <span class="comment">/* Helvetica-Narrow-BoldOblique */</span>
-<a name="l00684"></a>00684         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00685"></a>00685         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00686"></a>00686         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00687"></a>00687         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00688"></a>00688         <span class="comment">/*  32 */</span>   228,  273,  389,  456,  456,  729,  592,  228,
-<a name="l00689"></a>00689         <span class="comment">/*  40 */</span>   273,  273,  319,  479,  228,  273,  228,  228,
-<a name="l00690"></a>00690         <span class="comment">/*  48 */</span>   456,  456,  456,  456,  456,  456,  456,  456,
-<a name="l00691"></a>00691         <span class="comment">/*  56 */</span>   456,  456,  273,  273,  479,  479,  479,  501,
-<a name="l00692"></a>00692         <span class="comment">/*  64 */</span>   800,  592,  592,  592,  592,  547,  501,  638,
-<a name="l00693"></a>00693         <span class="comment">/*  72 */</span>   592,  228,  456,  592,  501,  683,  592,  638,
-<a name="l00694"></a>00694         <span class="comment">/*  80 */</span>   547,  638,  592,  547,  501,  592,  547,  774,
-<a name="l00695"></a>00695         <span class="comment">/*  88 */</span>   547,  547,  501,  273,  228,  273,  479,  456,
-<a name="l00696"></a>00696         <span class="comment">/*  96 */</span>   228,  456,  501,  456,  501,  456,  273,  501,
-<a name="l00697"></a>00697         <span class="comment">/* 104 */</span>   501,  228,  228,  456,  228,  729,  501,  501,
-<a name="l00698"></a>00698         <span class="comment">/* 112 */</span>   501,  501,  319,  456,  273,  501,  456,  638,
-<a name="l00699"></a>00699         <span class="comment">/* 120 */</span>   456,  456,  410,  319,  230,  319,  479,    0,
-<a name="l00700"></a>00700         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00701"></a>00701         <span class="comment">/* 136 */</span>     0,    0,    0,    0,  820,  820,  820,  287,
-<a name="l00702"></a>00702         <span class="comment">/* 144 */</span>   228,  228,  273,  273,  410,  410,  410,  456,
-<a name="l00703"></a>00703         <span class="comment">/* 152 */</span>   820,  479,  820,  774,  456,  456,  501,  501,
-<a name="l00704"></a>00704         <span class="comment">/* 160 */</span>   228,  273,  456,  456,  456,  456,  230,  456,
-<a name="l00705"></a>00705         <span class="comment">/* 168 */</span>   273,  604,  303,  456,  479,  273,  604,  273,
-<a name="l00706"></a>00706         <span class="comment">/* 176 */</span>   328,  479,  273,  273,  273,  501,  456,  228,
-<a name="l00707"></a>00707         <span class="comment">/* 184 */</span>   273,  273,  299,  456,  684,  684,  684,  501,
-<a name="l00708"></a>00708         <span class="comment">/* 192 */</span>   592,  592,  592,  592,  592,  592,  820,  592,
-<a name="l00709"></a>00709         <span class="comment">/* 200 */</span>   547,  547,  547,  547,  228,  228,  228,  228,
-<a name="l00710"></a>00710         <span class="comment">/* 208 */</span>   592,  592,  638,  638,  638,  638,  638,  479,
-<a name="l00711"></a>00711         <span class="comment">/* 216 */</span>   638,  592,  592,  592,  592,  547,  547,  501,
-<a name="l00712"></a>00712         <span class="comment">/* 224 */</span>   456,  456,  456,  456,  456,  456,  729,  456,
-<a name="l00713"></a>00713         <span class="comment">/* 232 */</span>   456,  456,  456,  456,  228,  228,  228,  228,
-<a name="l00714"></a>00714         <span class="comment">/* 240 */</span>   501,  501,  501,  501,  501,  501,  501,  479,
-<a name="l00715"></a>00715         <span class="comment">/* 248 */</span>   501,  501,  501,  501,  501,  456,  501,  456,
-<a name="l00716"></a>00716         },
-<a name="l00717"></a>00717         {       <span class="comment">/* Bookman-Light */</span>
-<a name="l00718"></a>00718         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00719"></a>00719         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00720"></a>00720         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00721"></a>00721         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00722"></a>00722         <span class="comment">/*  32 */</span>   320,  300,  380,  620,  620,  900,  800,  220,
-<a name="l00723"></a>00723         <span class="comment">/*  40 */</span>   300,  300,  440,  600,  320,  400,  320,  600,
-<a name="l00724"></a>00724         <span class="comment">/*  48 */</span>   620,  620,  620,  620,  620,  620,  620,  620,
-<a name="l00725"></a>00725         <span class="comment">/*  56 */</span>   620,  620,  320,  320,  600,  600,  600,  540,
-<a name="l00726"></a>00726         <span class="comment">/*  64 */</span>   820,  680,  740,  740,  800,  720,  640,  800,
-<a name="l00727"></a>00727         <span class="comment">/*  72 */</span>   800,  340,  600,  720,  600,  920,  740,  800,
-<a name="l00728"></a>00728         <span class="comment">/*  80 */</span>   620,  820,  720,  660,  620,  780,  700,  960,
-<a name="l00729"></a>00729         <span class="comment">/*  88 */</span>   720,  640,  640,  300,  600,  300,  600,  500,
-<a name="l00730"></a>00730         <span class="comment">/*  96 */</span>   220,  580,  620,  520,  620,  520,  320,  540,
-<a name="l00731"></a>00731         <span class="comment">/* 104 */</span>   660,  300,  300,  620,  300,  940,  660,  560,
-<a name="l00732"></a>00732         <span class="comment">/* 112 */</span>   620,  580,  440,  520,  380,  680,  520,  780,
-<a name="l00733"></a>00733         <span class="comment">/* 120 */</span>   560,  540,  480,  280,  600,  280,  600,    0,
-<a name="l00734"></a>00734         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00735"></a>00735         <span class="comment">/* 136 */</span>     0,    0,    0,    0, 1000,  980, 1280,  460,
-<a name="l00736"></a>00736         <span class="comment">/* 144 */</span>   220,  220,  240,  240,  400,  400,  400,  500,
-<a name="l00737"></a>00737         <span class="comment">/* 152 */</span>  1000,  600, 1240,  900,  540,  540,  620,  620,
-<a name="l00738"></a>00738         <span class="comment">/* 160 */</span>   320,  300,  620,  620,  620,  620,  600,  520,
-<a name="l00739"></a>00739         <span class="comment">/* 168 */</span>   420,  740,  420,  360,  600,  400,  740,  440,
-<a name="l00740"></a>00740         <span class="comment">/* 176 */</span>   400,  600,  372,  372,  340,  680,  600,  320,
-<a name="l00741"></a>00741         <span class="comment">/* 184 */</span>   320,  372,  420,  360,  930,  930,  930,  540,
-<a name="l00742"></a>00742         <span class="comment">/* 192 */</span>   680,  680,  680,  680,  680,  680, 1260,  740,
-<a name="l00743"></a>00743         <span class="comment">/* 200 */</span>   720,  720,  720,  720,  340,  340,  340,  340,
-<a name="l00744"></a>00744         <span class="comment">/* 208 */</span>   800,  740,  800,  800,  800,  800,  800,  600,
-<a name="l00745"></a>00745         <span class="comment">/* 216 */</span>   800,  780,  780,  780,  780,  640,  620,  660,
-<a name="l00746"></a>00746         <span class="comment">/* 224 */</span>   580,  580,  580,  580,  580,  580,  860,  520,
-<a name="l00747"></a>00747         <span class="comment">/* 232 */</span>   520,  520,  520,  520,  300,  300,  300,  300,
-<a name="l00748"></a>00748         <span class="comment">/* 240 */</span>   560,  660,  560,  560,  560,  560,  560,  600,
-<a name="l00749"></a>00749         <span class="comment">/* 248 */</span>   560,  680,  680,  680,  680,  540,  620,  540,
-<a name="l00750"></a>00750         },
-<a name="l00751"></a>00751         {       <span class="comment">/* Bookman-Demi */</span>
-<a name="l00752"></a>00752         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00753"></a>00753         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00754"></a>00754         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00755"></a>00755         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00756"></a>00756         <span class="comment">/*  32 */</span>   340,  360,  420,  660,  660,  940,  800,  320,
-<a name="l00757"></a>00757         <span class="comment">/*  40 */</span>   320,  320,  460,  600,  340,  360,  340,  600,
-<a name="l00758"></a>00758         <span class="comment">/*  48 */</span>   660,  660,  660,  660,  660,  660,  660,  660,
-<a name="l00759"></a>00759         <span class="comment">/*  56 */</span>   660,  660,  340,  340,  600,  600,  600,  660,
-<a name="l00760"></a>00760         <span class="comment">/*  64 */</span>   820,  720,  720,  740,  780,  720,  680,  780,
-<a name="l00761"></a>00761         <span class="comment">/*  72 */</span>   820,  400,  640,  800,  640,  940,  740,  800,
-<a name="l00762"></a>00762         <span class="comment">/*  80 */</span>   660,  800,  780,  660,  700,  740,  720,  940,
-<a name="l00763"></a>00763         <span class="comment">/*  88 */</span>   780,  700,  640,  300,  600,  300,  600,  500,
-<a name="l00764"></a>00764         <span class="comment">/*  96 */</span>   320,  580,  600,  580,  640,  580,  380,  580,
-<a name="l00765"></a>00765         <span class="comment">/* 104 */</span>   680,  360,  340,  660,  340, 1000,  680,  620,
-<a name="l00766"></a>00766         <span class="comment">/* 112 */</span>   640,  620,  460,  520,  460,  660,  600,  800,
-<a name="l00767"></a>00767         <span class="comment">/* 120 */</span>   600,  620,  560,  320,  600,  320,  600,    0,
-<a name="l00768"></a>00768         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00769"></a>00769         <span class="comment">/* 136 */</span>     0,    0,    0,    0, 1000,  980, 1360,  460,
-<a name="l00770"></a>00770         <span class="comment">/* 144 */</span>   320,  320,  220,  220,  540,  540,  540,  500,
-<a name="l00771"></a>00771         <span class="comment">/* 152 */</span>  1000,  600, 1220,  940,  440,  380,  740,  740,
-<a name="l00772"></a>00772         <span class="comment">/* 160 */</span>   340,  360,  660,  660,  660,  660,  600,  600,
-<a name="l00773"></a>00773         <span class="comment">/* 168 */</span>   500,  740,  400,  400,  600,  360,  740,  460,
-<a name="l00774"></a>00774         <span class="comment">/* 176 */</span>   400,  600,  396,  396,  400,  660,  800,  340,
-<a name="l00775"></a>00775         <span class="comment">/* 184 */</span>   360,  396,  400,  400,  990,  990,  990,  660,
-<a name="l00776"></a>00776         <span class="comment">/* 192 */</span>   720,  720,  720,  720,  720,  720, 1140,  740,
-<a name="l00777"></a>00777         <span class="comment">/* 200 */</span>   720,  720,  720,  720,  400,  400,  400,  400,
-<a name="l00778"></a>00778         <span class="comment">/* 208 */</span>   780,  740,  800,  800,  800,  800,  800,  600,
-<a name="l00779"></a>00779         <span class="comment">/* 216 */</span>   800,  740,  740,  740,  740,  700,  660,  660,
-<a name="l00780"></a>00780         <span class="comment">/* 224 */</span>   580,  580,  580,  580,  580,  580,  880,  580,
-<a name="l00781"></a>00781         <span class="comment">/* 232 */</span>   580,  580,  580,  580,  360,  360,  360,  360,
-<a name="l00782"></a>00782         <span class="comment">/* 240 */</span>   620,  680,  620,  620,  620,  620,  620,  600,
-<a name="l00783"></a>00783         <span class="comment">/* 248 */</span>   620,  660,  660,  660,  660,  620,  640,  620,
-<a name="l00784"></a>00784         },
-<a name="l00785"></a>00785         {       <span class="comment">/* Bookman-LightItalic */</span>
-<a name="l00786"></a>00786         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00787"></a>00787         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00788"></a>00788         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00789"></a>00789         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00790"></a>00790         <span class="comment">/*  32 */</span>   300,  320,  360,  620,  620,  800,  820,  280,
-<a name="l00791"></a>00791         <span class="comment">/*  40 */</span>   280,  280,  440,  600,  300,  320,  300,  600,
-<a name="l00792"></a>00792         <span class="comment">/*  48 */</span>   620,  620,  620,  620,  620,  620,  620,  620,
-<a name="l00793"></a>00793         <span class="comment">/*  56 */</span>   620,  620,  300,  300,  600,  600,  600,  540,
-<a name="l00794"></a>00794         <span class="comment">/*  64 */</span>   780,  700,  720,  720,  740,  680,  620,  760,
-<a name="l00795"></a>00795         <span class="comment">/*  72 */</span>   800,  320,  560,  720,  580,  860,  720,  760,
-<a name="l00796"></a>00796         <span class="comment">/*  80 */</span>   600,  780,  700,  640,  600,  720,  680,  960,
-<a name="l00797"></a>00797         <span class="comment">/*  88 */</span>   700,  660,  580,  260,  600,  260,  600,  500,
-<a name="l00798"></a>00798         <span class="comment">/*  96 */</span>   280,  620,  600,  480,  640,  540,  340,  560,
-<a name="l00799"></a>00799         <span class="comment">/* 104 */</span>   620,  280,  280,  600,  280,  880,  620,  540,
-<a name="l00800"></a>00800         <span class="comment">/* 112 */</span>   600,  560,  400,  540,  340,  620,  540,  880,
-<a name="l00801"></a>00801         <span class="comment">/* 120 */</span>   540,  600,  520,  360,  600,  380,  600,    0,
-<a name="l00802"></a>00802         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00803"></a>00803         <span class="comment">/* 136 */</span>     0,    0,    0,    0, 1000,  980, 1180,  460,
-<a name="l00804"></a>00804         <span class="comment">/* 144 */</span>   280,  280,  180,  180,  440,  440,  480,  500,
-<a name="l00805"></a>00805         <span class="comment">/* 152 */</span>  1000,  600, 1180,  900,  620,  620,  640,  660,
-<a name="l00806"></a>00806         <span class="comment">/* 160 */</span>   300,  320,  620,  620,  620,  620,  600,  620,
-<a name="l00807"></a>00807         <span class="comment">/* 168 */</span>   420,  740,  440,  300,  600,  320,  740,  440,
-<a name="l00808"></a>00808         <span class="comment">/* 176 */</span>   400,  600,  372,  372,  320,  620,  620,  300,
-<a name="l00809"></a>00809         <span class="comment">/* 184 */</span>   320,  372,  400,  300,  930,  930,  930,  540,
-<a name="l00810"></a>00810         <span class="comment">/* 192 */</span>   700,  700,  700,  700,  700,  700, 1220,  720,
-<a name="l00811"></a>00811         <span class="comment">/* 200 */</span>   680,  680,  680,  680,  320,  320,  320,  320,
-<a name="l00812"></a>00812         <span class="comment">/* 208 */</span>   740,  720,  760,  760,  760,  760,  760,  600,
-<a name="l00813"></a>00813         <span class="comment">/* 216 */</span>   760,  720,  720,  720,  720,  660,  600,  620,
-<a name="l00814"></a>00814         <span class="comment">/* 224 */</span>   620,  620,  620,  620,  620,  620,  880,  480,
-<a name="l00815"></a>00815         <span class="comment">/* 232 */</span>   540,  540,  540,  540,  280,  280,  280,  280,
-<a name="l00816"></a>00816         <span class="comment">/* 240 */</span>   540,  620,  540,  540,  540,  540,  540,  600,
-<a name="l00817"></a>00817         <span class="comment">/* 248 */</span>   540,  620,  620,  620,  620,  600,  600,  600,
-<a name="l00818"></a>00818         },
-<a name="l00819"></a>00819         {       <span class="comment">/* Bookman-DemiItalic */</span>
-<a name="l00820"></a>00820         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00821"></a>00821         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00822"></a>00822         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00823"></a>00823         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00824"></a>00824         <span class="comment">/*  32 */</span>   340,  320,  380,  680,  680,  880,  980,  320,
-<a name="l00825"></a>00825         <span class="comment">/*  40 */</span>   260,  260,  460,  600,  340,  280,  340,  360,
-<a name="l00826"></a>00826         <span class="comment">/*  48 */</span>   680,  680,  680,  680,  680,  680,  680,  680,
-<a name="l00827"></a>00827         <span class="comment">/*  56 */</span>   680,  680,  340,  340,  620,  600,  620,  620,
-<a name="l00828"></a>00828         <span class="comment">/*  64 */</span>   780,  720,  720,  700,  760,  720,  660,  760,
-<a name="l00829"></a>00829         <span class="comment">/*  72 */</span>   800,  380,  620,  780,  640,  860,  740,  760,
-<a name="l00830"></a>00830         <span class="comment">/*  80 */</span>   640,  760,  740,  700,  700,  740,  660, 1000,
-<a name="l00831"></a>00831         <span class="comment">/*  88 */</span>   740,  660,  680,  260,  580,  260,  620,  500,
-<a name="l00832"></a>00832         <span class="comment">/*  96 */</span>   320,  680,  600,  560,  680,  560,  420,  620,
-<a name="l00833"></a>00833         <span class="comment">/* 104 */</span>   700,  380,  320,  700,  380,  960,  680,  600,
-<a name="l00834"></a>00834         <span class="comment">/* 112 */</span>   660,  620,  500,  540,  440,  680,  540,  860,
-<a name="l00835"></a>00835         <span class="comment">/* 120 */</span>   620,  600,  560,  300,  620,  300,  620,    0,
-<a name="l00836"></a>00836         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00837"></a>00837         <span class="comment">/* 136 */</span>     0,    0,    0,    0, 1000,  940, 1360,  360,
-<a name="l00838"></a>00838         <span class="comment">/* 144 */</span>   320,  320,  220,  220,  520,  520,  520,  500,
-<a name="l00839"></a>00839         <span class="comment">/* 152 */</span>  1000,  600, 1180,  920,  420,  420,  820,  820,
-<a name="l00840"></a>00840         <span class="comment">/* 160 */</span>   340,  320,  680,  680,  680,  680,  620,  620,
-<a name="l00841"></a>00841         <span class="comment">/* 168 */</span>   520,  780,  440,  380,  620,  280,  780,  480,
-<a name="l00842"></a>00842         <span class="comment">/* 176 */</span>   400,  600,  408,  408,  340,  680,  680,  340,
-<a name="l00843"></a>00843         <span class="comment">/* 184 */</span>   360,  408,  440,  380, 1020, 1020, 1020,  620,
-<a name="l00844"></a>00844         <span class="comment">/* 192 */</span>   720,  720,  720,  720,  720,  720, 1140,  700,
-<a name="l00845"></a>00845         <span class="comment">/* 200 */</span>   720,  720,  720,  720,  380,  380,  380,  380,
-<a name="l00846"></a>00846         <span class="comment">/* 208 */</span>   760,  740,  760,  760,  760,  760,  760,  600,
-<a name="l00847"></a>00847         <span class="comment">/* 216 */</span>   760,  740,  740,  740,  740,  660,  640,  660,
-<a name="l00848"></a>00848         <span class="comment">/* 224 */</span>   680,  680,  680,  680,  680,  680,  880,  560,
-<a name="l00849"></a>00849         <span class="comment">/* 232 */</span>   560,  560,  560,  560,  380,  380,  380,  380,
-<a name="l00850"></a>00850         <span class="comment">/* 240 */</span>   600,  680,  600,  600,  600,  600,  600,  600,
-<a name="l00851"></a>00851         <span class="comment">/* 248 */</span>   600,  680,  680,  680,  680,  600,  660,  600,
-<a name="l00852"></a>00852         },
-<a name="l00853"></a>00853         {       <span class="comment">/* AvantGarde-Book */</span>
-<a name="l00854"></a>00854         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00855"></a>00855         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00856"></a>00856         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00857"></a>00857         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00858"></a>00858         <span class="comment">/*  32 */</span>   277,  295,  309,  554,  554,  775,  757,  351,
-<a name="l00859"></a>00859         <span class="comment">/*  40 */</span>   369,  369,  425,  606,  277,  332,  277,  437,
-<a name="l00860"></a>00860         <span class="comment">/*  48 */</span>   554,  554,  554,  554,  554,  554,  554,  554,
-<a name="l00861"></a>00861         <span class="comment">/*  56 */</span>   554,  554,  277,  277,  606,  606,  606,  591,
-<a name="l00862"></a>00862         <span class="comment">/*  64 */</span>   867,  740,  574,  813,  744,  536,  485,  872,
-<a name="l00863"></a>00863         <span class="comment">/*  72 */</span>   683,  226,  482,  591,  462,  919,  740,  869,
-<a name="l00864"></a>00864         <span class="comment">/*  80 */</span>   592,  871,  607,  498,  426,  655,  702,  960,
-<a name="l00865"></a>00865         <span class="comment">/*  88 */</span>   609,  592,  480,  351,  605,  351,  606,  500,
-<a name="l00866"></a>00866         <span class="comment">/*  96 */</span>   351,  683,  682,  647,  685,  650,  314,  673,
-<a name="l00867"></a>00867         <span class="comment">/* 104 */</span>   610,  200,  203,  502,  200,  938,  610,  655,
-<a name="l00868"></a>00868         <span class="comment">/* 112 */</span>   682,  682,  301,  388,  339,  608,  554,  831,
-<a name="l00869"></a>00869         <span class="comment">/* 120 */</span>   480,  536,  425,  351,  672,  351,  606,    0,
-<a name="l00870"></a>00870         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00871"></a>00871         <span class="comment">/* 136 */</span>     0,    0,    0,    0, 1000, 1000, 1174,  606,
-<a name="l00872"></a>00872         <span class="comment">/* 144 */</span>   351,  351,  251,  251,  502,  484,  502,  500,
-<a name="l00873"></a>00873         <span class="comment">/* 152 */</span>  1000,  606, 1194, 1137,  553,  553,  487,  485,
-<a name="l00874"></a>00874         <span class="comment">/* 160 */</span>   277,  295,  554,  554,  554,  554,  672,  615,
-<a name="l00875"></a>00875         <span class="comment">/* 168 */</span>   369,  747,  369,  425,  606,  332,  747,  485,
-<a name="l00876"></a>00876         <span class="comment">/* 176 */</span>   400,  606,  332,  332,  375,  608,  564,  277,
-<a name="l00877"></a>00877         <span class="comment">/* 184 */</span>   324,  332,  369,  425,  831,  831,  831,  591,
-<a name="l00878"></a>00878         <span class="comment">/* 192 */</span>   740,  740,  740,  740,  740,  740,  992,  813,
-<a name="l00879"></a>00879         <span class="comment">/* 200 */</span>   536,  536,  536,  536,  226,  226,  226,  226,
-<a name="l00880"></a>00880         <span class="comment">/* 208 */</span>   790,  740,  869,  869,  869,  869,  869,  606,
-<a name="l00881"></a>00881         <span class="comment">/* 216 */</span>   868,  655,  655,  655,  655,  592,  592,  554,
-<a name="l00882"></a>00882         <span class="comment">/* 224 */</span>   683,  683,  683,  683,  683,  683, 1157,  647,
-<a name="l00883"></a>00883         <span class="comment">/* 232 */</span>   650,  650,  650,  650,  200,  200,  200,  200,
-<a name="l00884"></a>00884         <span class="comment">/* 240 */</span>   655,  610,  655,  655,  655,  655,  655,  606,
-<a name="l00885"></a>00885         <span class="comment">/* 248 */</span>   653,  608,  608,  608,  608,  536,  682,  536,
-<a name="l00886"></a>00886         },
-<a name="l00887"></a>00887         {       <span class="comment">/* AvantGarde-Demi */</span>
-<a name="l00888"></a>00888         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00889"></a>00889         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00890"></a>00890         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00891"></a>00891         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00892"></a>00892         <span class="comment">/*  32 */</span>   280,  280,  360,  560,  560,  860,  680,  280,
-<a name="l00893"></a>00893         <span class="comment">/*  40 */</span>   380,  380,  440,  600,  280,  420,  280,  460,
-<a name="l00894"></a>00894         <span class="comment">/*  48 */</span>   560,  560,  560,  560,  560,  560,  560,  560,
-<a name="l00895"></a>00895         <span class="comment">/*  56 */</span>   560,  560,  280,  280,  600,  600,  600,  560,
-<a name="l00896"></a>00896         <span class="comment">/*  64 */</span>   740,  740,  580,  780,  700,  520,  480,  840,
-<a name="l00897"></a>00897         <span class="comment">/*  72 */</span>   680,  280,  480,  620,  440,  900,  740,  840,
-<a name="l00898"></a>00898         <span class="comment">/*  80 */</span>   560,  840,  580,  520,  420,  640,  700,  900,
-<a name="l00899"></a>00899         <span class="comment">/*  88 */</span>   680,  620,  500,  320,  640,  320,  600,  500,
-<a name="l00900"></a>00900         <span class="comment">/*  96 */</span>   280,  660,  660,  640,  660,  640,  280,  660,
-<a name="l00901"></a>00901         <span class="comment">/* 104 */</span>   600,  240,  260,  580,  240,  940,  600,  640,
-<a name="l00902"></a>00902         <span class="comment">/* 112 */</span>   660,  660,  320,  440,  300,  600,  560,  800,
-<a name="l00903"></a>00903         <span class="comment">/* 120 */</span>   560,  580,  460,  340,  600,  340,  600,    0,
-<a name="l00904"></a>00904         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00905"></a>00905         <span class="comment">/* 136 */</span>     0,    0,    0,    0, 1000, 1000, 1280,  600,
-<a name="l00906"></a>00906         <span class="comment">/* 144 */</span>   280,  280,  240,  240,  480,  480,  480,  500,
-<a name="l00907"></a>00907         <span class="comment">/* 152 */</span>  1000,  600, 1060, 1080,  560,  560,  520,  520,
-<a name="l00908"></a>00908         <span class="comment">/* 160 */</span>   280,  280,  560,  560,  560,  560,  600,  560,
-<a name="l00909"></a>00909         <span class="comment">/* 168 */</span>   500,  740,  360,  460,  600,  420,  740,  420,
-<a name="l00910"></a>00910         <span class="comment">/* 176 */</span>   400,  600,  336,  336,  420,  576,  600,  280,
-<a name="l00911"></a>00911         <span class="comment">/* 184 */</span>   340,  336,  360,  460,  840,  840,  840,  560,
-<a name="l00912"></a>00912         <span class="comment">/* 192 */</span>   740,  740,  740,  740,  740,  740,  900,  780,
-<a name="l00913"></a>00913         <span class="comment">/* 200 */</span>   520,  520,  520,  520,  280,  280,  280,  280,
-<a name="l00914"></a>00914         <span class="comment">/* 208 */</span>   742,  740,  840,  840,  840,  840,  840,  600,
-<a name="l00915"></a>00915         <span class="comment">/* 216 */</span>   840,  640,  640,  640,  640,  620,  560,  600,
-<a name="l00916"></a>00916         <span class="comment">/* 224 */</span>   660,  660,  660,  660,  660,  660, 1080,  640,
-<a name="l00917"></a>00917         <span class="comment">/* 232 */</span>   640,  640,  640,  640,  240,  240,  240,  240,
-<a name="l00918"></a>00918         <span class="comment">/* 240 */</span>   640,  600,  640,  640,  640,  640,  640,  600,
-<a name="l00919"></a>00919         <span class="comment">/* 248 */</span>   660,  600,  600,  600,  600,  580,  660,  580,
-<a name="l00920"></a>00920         },
-<a name="l00921"></a>00921         {       <span class="comment">/* AvantGarde-BookOblique */</span>
-<a name="l00922"></a>00922         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00923"></a>00923         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00924"></a>00924         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00925"></a>00925         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00926"></a>00926         <span class="comment">/*  32 */</span>   277,  295,  309,  554,  554,  775,  757,  351,
-<a name="l00927"></a>00927         <span class="comment">/*  40 */</span>   369,  369,  425,  606,  277,  332,  277,  437,
-<a name="l00928"></a>00928         <span class="comment">/*  48 */</span>   554,  554,  554,  554,  554,  554,  554,  554,
-<a name="l00929"></a>00929         <span class="comment">/*  56 */</span>   554,  554,  277,  277,  606,  606,  606,  591,
-<a name="l00930"></a>00930         <span class="comment">/*  64 */</span>   867,  740,  574,  813,  744,  536,  485,  872,
-<a name="l00931"></a>00931         <span class="comment">/*  72 */</span>   683,  226,  482,  591,  462,  919,  740,  869,
-<a name="l00932"></a>00932         <span class="comment">/*  80 */</span>   592,  871,  607,  498,  426,  655,  702,  960,
-<a name="l00933"></a>00933         <span class="comment">/*  88 */</span>   609,  592,  480,  351,  605,  351,  606,  500,
-<a name="l00934"></a>00934         <span class="comment">/*  96 */</span>   351,  683,  682,  647,  685,  650,  314,  673,
-<a name="l00935"></a>00935         <span class="comment">/* 104 */</span>   610,  200,  203,  502,  200,  938,  610,  655,
-<a name="l00936"></a>00936         <span class="comment">/* 112 */</span>   682,  682,  301,  388,  339,  608,  554,  831,
-<a name="l00937"></a>00937         <span class="comment">/* 120 */</span>   480,  536,  425,  351,  672,  351,  606,    0,
-<a name="l00938"></a>00938         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00939"></a>00939         <span class="comment">/* 136 */</span>     0,    0,    0,    0, 1000, 1000, 1174,  606,
-<a name="l00940"></a>00940         <span class="comment">/* 144 */</span>   351,  351,  251,  251,  502,  484,  502,  500,
-<a name="l00941"></a>00941         <span class="comment">/* 152 */</span>  1000,  606, 1194, 1137,  553,  553,  487,  485,
-<a name="l00942"></a>00942         <span class="comment">/* 160 */</span>   277,  295,  554,  554,  554,  554,  672,  615,
-<a name="l00943"></a>00943         <span class="comment">/* 168 */</span>   369,  747,  369,  425,  606,  332,  747,  485,
-<a name="l00944"></a>00944         <span class="comment">/* 176 */</span>   400,  606,  332,  332,  375,  608,  564,  277,
-<a name="l00945"></a>00945         <span class="comment">/* 184 */</span>   324,  332,  369,  425,  831,  831,  831,  591,
-<a name="l00946"></a>00946         <span class="comment">/* 192 */</span>   740,  740,  740,  740,  740,  740,  992,  813,
-<a name="l00947"></a>00947         <span class="comment">/* 200 */</span>   536,  536,  536,  536,  226,  226,  226,  226,
-<a name="l00948"></a>00948         <span class="comment">/* 208 */</span>   790,  740,  869,  869,  869,  869,  869,  606,
-<a name="l00949"></a>00949         <span class="comment">/* 216 */</span>   868,  655,  655,  655,  655,  592,  592,  554,
-<a name="l00950"></a>00950         <span class="comment">/* 224 */</span>   683,  683,  683,  683,  683,  683, 1157,  647,
-<a name="l00951"></a>00951         <span class="comment">/* 232 */</span>   650,  650,  650,  650,  200,  200,  200,  200,
-<a name="l00952"></a>00952         <span class="comment">/* 240 */</span>   655,  610,  655,  655,  655,  655,  655,  606,
-<a name="l00953"></a>00953         <span class="comment">/* 248 */</span>   653,  608,  608,  608,  608,  536,  682,  536,
-<a name="l00954"></a>00954         },
-<a name="l00955"></a>00955         {       <span class="comment">/* AvantGarde-DemiOblique */</span>
-<a name="l00956"></a>00956         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00957"></a>00957         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00958"></a>00958         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00959"></a>00959         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00960"></a>00960         <span class="comment">/*  32 */</span>   280,  280,  360,  560,  560,  860,  680,  280,
-<a name="l00961"></a>00961         <span class="comment">/*  40 */</span>   380,  380,  440,  600,  280,  420,  280,  460,
-<a name="l00962"></a>00962         <span class="comment">/*  48 */</span>   560,  560,  560,  560,  560,  560,  560,  560,
-<a name="l00963"></a>00963         <span class="comment">/*  56 */</span>   560,  560,  280,  280,  600,  600,  600,  560,
-<a name="l00964"></a>00964         <span class="comment">/*  64 */</span>   740,  740,  580,  780,  700,  520,  480,  840,
-<a name="l00965"></a>00965         <span class="comment">/*  72 */</span>   680,  280,  480,  620,  440,  900,  740,  840,
-<a name="l00966"></a>00966         <span class="comment">/*  80 */</span>   560,  840,  580,  520,  420,  640,  700,  900,
-<a name="l00967"></a>00967         <span class="comment">/*  88 */</span>   680,  620,  500,  320,  640,  320,  600,  500,
-<a name="l00968"></a>00968         <span class="comment">/*  96 */</span>   280,  660,  660,  640,  660,  640,  280,  660,
-<a name="l00969"></a>00969         <span class="comment">/* 104 */</span>   600,  240,  260,  580,  240,  940,  600,  640,
-<a name="l00970"></a>00970         <span class="comment">/* 112 */</span>   660,  660,  320,  440,  300,  600,  560,  800,
-<a name="l00971"></a>00971         <span class="comment">/* 120 */</span>   560,  580,  460,  340,  600,  340,  600,    0,
-<a name="l00972"></a>00972         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00973"></a>00973         <span class="comment">/* 136 */</span>     0,    0,    0,    0, 1000, 1000, 1280,  600,
-<a name="l00974"></a>00974         <span class="comment">/* 144 */</span>   280,  280,  240,  240,  480,  480,  480,  500,
-<a name="l00975"></a>00975         <span class="comment">/* 152 */</span>  1000,  600, 1060, 1080,  560,  560,  520,  520,
-<a name="l00976"></a>00976         <span class="comment">/* 160 */</span>   280,  280,  560,  560,  560,  560,  600,  560,
-<a name="l00977"></a>00977         <span class="comment">/* 168 */</span>   500,  740,  360,  460,  600,  420,  740,  420,
-<a name="l00978"></a>00978         <span class="comment">/* 176 */</span>   400,  600,  336,  336,  420,  576,  600,  280,
-<a name="l00979"></a>00979         <span class="comment">/* 184 */</span>   340,  336,  360,  460,  840,  840,  840,  560,
-<a name="l00980"></a>00980         <span class="comment">/* 192 */</span>   740,  740,  740,  740,  740,  740,  900,  780,
-<a name="l00981"></a>00981         <span class="comment">/* 200 */</span>   520,  520,  520,  520,  280,  280,  280,  280,
-<a name="l00982"></a>00982         <span class="comment">/* 208 */</span>   742,  740,  840,  840,  840,  840,  840,  600,
-<a name="l00983"></a>00983         <span class="comment">/* 216 */</span>   840,  640,  640,  640,  640,  620,  560,  600,
-<a name="l00984"></a>00984         <span class="comment">/* 224 */</span>   660,  660,  660,  660,  660,  660, 1080,  640,
-<a name="l00985"></a>00985         <span class="comment">/* 232 */</span>   640,  640,  640,  640,  240,  240,  240,  240,
-<a name="l00986"></a>00986         <span class="comment">/* 240 */</span>   640,  600,  640,  640,  640,  640,  640,  600,
-<a name="l00987"></a>00987         <span class="comment">/* 248 */</span>   660,  600,  600,  600,  600,  580,  660,  580,
-<a name="l00988"></a>00988         },
-<a name="l00989"></a>00989         {       <span class="comment">/* NewCenturySchlbk-Roman */</span>
-<a name="l00990"></a>00990         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00991"></a>00991         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00992"></a>00992         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00993"></a>00993         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l00994"></a>00994         <span class="comment">/*  32 */</span>   278,  296,  389,  556,  556,  833,  815,  204,
-<a name="l00995"></a>00995         <span class="comment">/*  40 */</span>   333,  333,  500,  606,  278,  333,  278,  278,
-<a name="l00996"></a>00996         <span class="comment">/*  48 */</span>   556,  556,  556,  556,  556,  556,  556,  556,
-<a name="l00997"></a>00997         <span class="comment">/*  56 */</span>   556,  556,  278,  278,  606,  606,  606,  444,
-<a name="l00998"></a>00998         <span class="comment">/*  64 */</span>   737,  722,  722,  722,  778,  722,  667,  778,
-<a name="l00999"></a>00999         <span class="comment">/*  72 */</span>   833,  407,  556,  778,  667,  944,  815,  778,
-<a name="l01000"></a>01000         <span class="comment">/*  80 */</span>   667,  778,  722,  630,  667,  815,  722,  981,
-<a name="l01001"></a>01001         <span class="comment">/*  88 */</span>   704,  704,  611,  333,  606,  333,  606,  500,
-<a name="l01002"></a>01002         <span class="comment">/*  96 */</span>   204,  556,  556,  444,  574,  500,  333,  537,
-<a name="l01003"></a>01003         <span class="comment">/* 104 */</span>   611,  315,  296,  593,  315,  889,  611,  500,
-<a name="l01004"></a>01004         <span class="comment">/* 112 */</span>   574,  556,  444,  463,  389,  611,  537,  778,
-<a name="l01005"></a>01005         <span class="comment">/* 120 */</span>   537,  537,  481,  333,  606,  333,  606,    0,
-<a name="l01006"></a>01006         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01007"></a>01007         <span class="comment">/* 136 */</span>     0,    0,    0,    0, 1000, 1000, 1000,  606,
-<a name="l01008"></a>01008         <span class="comment">/* 144 */</span>   204,  204,  259,  259,  389,  389,  389,  556,
-<a name="l01009"></a>01009         <span class="comment">/* 152 */</span>  1000,  606, 1000,  833,  500,  500,  611,  611,
-<a name="l01010"></a>01010         <span class="comment">/* 160 */</span>   278,  296,  556,  556,  556,  556,  606,  500,
-<a name="l01011"></a>01011         <span class="comment">/* 168 */</span>   333,  737,  334,  426,  606,  333,  737,  333,
-<a name="l01012"></a>01012         <span class="comment">/* 176 */</span>   400,  606,  333,  333,  333,  611,  606,  278,
-<a name="l01013"></a>01013         <span class="comment">/* 184 */</span>   333,  333,  300,  426,  834,  834,  834,  444,
-<a name="l01014"></a>01014         <span class="comment">/* 192 */</span>   722,  722,  722,  722,  722,  722, 1000,  722,
-<a name="l01015"></a>01015         <span class="comment">/* 200 */</span>   722,  722,  722,  722,  407,  407,  407,  407,
-<a name="l01016"></a>01016         <span class="comment">/* 208 */</span>   778,  815,  778,  778,  778,  778,  778,  606,
-<a name="l01017"></a>01017         <span class="comment">/* 216 */</span>   778,  815,  815,  815,  815,  704,  667,  574,
-<a name="l01018"></a>01018         <span class="comment">/* 224 */</span>   556,  556,  556,  556,  556,  556,  796,  444,
-<a name="l01019"></a>01019         <span class="comment">/* 232 */</span>   500,  500,  500,  500,  315,  315,  315,  315,
-<a name="l01020"></a>01020         <span class="comment">/* 240 */</span>   500,  611,  500,  500,  500,  500,  500,  606,
-<a name="l01021"></a>01021         <span class="comment">/* 248 */</span>   500,  611,  611,  611,  611,  537,  574,  537,
-<a name="l01022"></a>01022         },
-<a name="l01023"></a>01023         {       <span class="comment">/* NewCenturySchlbk-Bold */</span>
-<a name="l01024"></a>01024         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01025"></a>01025         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01026"></a>01026         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01027"></a>01027         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01028"></a>01028         <span class="comment">/*  32 */</span>   287,  296,  333,  574,  574,  833,  852,  241,
-<a name="l01029"></a>01029         <span class="comment">/*  40 */</span>   389,  389,  500,  606,  278,  333,  278,  278,
-<a name="l01030"></a>01030         <span class="comment">/*  48 */</span>   574,  574,  574,  574,  574,  574,  574,  574,
-<a name="l01031"></a>01031         <span class="comment">/*  56 */</span>   574,  574,  278,  278,  606,  606,  606,  500,
-<a name="l01032"></a>01032         <span class="comment">/*  64 */</span>   747,  759,  778,  778,  833,  759,  722,  833,
-<a name="l01033"></a>01033         <span class="comment">/*  72 */</span>   870,  444,  648,  815,  722,  981,  833,  833,
-<a name="l01034"></a>01034         <span class="comment">/*  80 */</span>   759,  833,  815,  667,  722,  833,  759,  981,
-<a name="l01035"></a>01035         <span class="comment">/*  88 */</span>   722,  722,  667,  389,  606,  389,  606,  500,
-<a name="l01036"></a>01036         <span class="comment">/*  96 */</span>   241,  611,  648,  556,  667,  574,  389,  611,
-<a name="l01037"></a>01037         <span class="comment">/* 104 */</span>   685,  370,  352,  667,  352,  963,  685,  611,
-<a name="l01038"></a>01038         <span class="comment">/* 112 */</span>   667,  648,  519,  500,  426,  685,  611,  889,
-<a name="l01039"></a>01039         <span class="comment">/* 120 */</span>   611,  611,  537,  389,  606,  389,  606,    0,
-<a name="l01040"></a>01040         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01041"></a>01041         <span class="comment">/* 136 */</span>     0,    0,    0,    0, 1000, 1000, 1000,  606,
-<a name="l01042"></a>01042         <span class="comment">/* 144 */</span>   241,  241,  333,  333,  481,  481,  481,  500,
-<a name="l01043"></a>01043         <span class="comment">/* 152 */</span>  1000,  606, 1000,  907,  500,  500,  685,  685,
-<a name="l01044"></a>01044         <span class="comment">/* 160 */</span>   287,  296,  574,  574,  574,  574,  606,  500,
-<a name="l01045"></a>01045         <span class="comment">/* 168 */</span>   333,  747,  367,  500,  606,  333,  747,  333,
-<a name="l01046"></a>01046         <span class="comment">/* 176 */</span>   400,  606,  344,  344,  333,  685,  747,  278,
-<a name="l01047"></a>01047         <span class="comment">/* 184 */</span>   333,  344,  367,  500,  861,  861,  861,  500,
-<a name="l01048"></a>01048         <span class="comment">/* 192 */</span>   759,  759,  759,  759,  759,  759,  981,  778,
-<a name="l01049"></a>01049         <span class="comment">/* 200 */</span>   759,  759,  759,  759,  444,  444,  444,  444,
-<a name="l01050"></a>01050         <span class="comment">/* 208 */</span>   833,  833,  833,  833,  833,  833,  833,  606,
-<a name="l01051"></a>01051         <span class="comment">/* 216 */</span>   833,  833,  833,  833,  833,  722,  759,  611,
-<a name="l01052"></a>01052         <span class="comment">/* 224 */</span>   611,  611,  611,  611,  611,  611,  870,  556,
-<a name="l01053"></a>01053         <span class="comment">/* 232 */</span>   574,  574,  574,  574,  370,  370,  370,  370,
-<a name="l01054"></a>01054         <span class="comment">/* 240 */</span>   611,  685,  611,  611,  611,  611,  611,  606,
-<a name="l01055"></a>01055         <span class="comment">/* 248 */</span>   611,  685,  685,  685,  685,  611,  667,  611,
-<a name="l01056"></a>01056         },
-<a name="l01057"></a>01057         {       <span class="comment">/* NewCenturySchlbk-Italic */</span>
-<a name="l01058"></a>01058         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01059"></a>01059         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01060"></a>01060         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01061"></a>01061         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01062"></a>01062         <span class="comment">/*  32 */</span>   278,  333,  400,  556,  556,  833,  852,  204,
-<a name="l01063"></a>01063         <span class="comment">/*  40 */</span>   333,  333,  500,  606,  278,  333,  278,  606,
-<a name="l01064"></a>01064         <span class="comment">/*  48 */</span>   556,  556,  556,  556,  556,  556,  556,  556,
-<a name="l01065"></a>01065         <span class="comment">/*  56 */</span>   556,  556,  278,  278,  606,  606,  606,  444,
-<a name="l01066"></a>01066         <span class="comment">/*  64 */</span>   747,  704,  722,  722,  778,  722,  667,  778,
-<a name="l01067"></a>01067         <span class="comment">/*  72 */</span>   833,  407,  611,  741,  667,  944,  815,  778,
-<a name="l01068"></a>01068         <span class="comment">/*  80 */</span>   667,  778,  741,  667,  685,  815,  704,  926,
-<a name="l01069"></a>01069         <span class="comment">/*  88 */</span>   704,  685,  667,  333,  606,  333,  606,  500,
-<a name="l01070"></a>01070         <span class="comment">/*  96 */</span>   204,  574,  556,  444,  611,  444,  333,  537,
-<a name="l01071"></a>01071         <span class="comment">/* 104 */</span>   611,  333,  315,  556,  333,  889,  611,  500,
-<a name="l01072"></a>01072         <span class="comment">/* 112 */</span>   574,  556,  444,  444,  352,  611,  519,  778,
-<a name="l01073"></a>01073         <span class="comment">/* 120 */</span>   500,  500,  463,  333,  606,  333,  606,    0,
-<a name="l01074"></a>01074         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01075"></a>01075         <span class="comment">/* 136 */</span>     0,    0,    0,    0, 1000,  950, 1000,  606,
-<a name="l01076"></a>01076         <span class="comment">/* 144 */</span>   204,  204,  333,  333,  389,  389,  389,  500,
-<a name="l01077"></a>01077         <span class="comment">/* 152 */</span>  1000,  606,  981,  778,  500,  500,  611,  611,
-<a name="l01078"></a>01078         <span class="comment">/* 160 */</span>   278,  333,  556,  556,  556,  556,  606,  500,
-<a name="l01079"></a>01079         <span class="comment">/* 168 */</span>   333,  747,  422,  426,  606,  333,  747,  333,
-<a name="l01080"></a>01080         <span class="comment">/* 176 */</span>   400,  606,  333,  333,  333,  611,  650,  278,
-<a name="l01081"></a>01081         <span class="comment">/* 184 */</span>   333,  333,  372,  426,  834,  834,  834,  444,
-<a name="l01082"></a>01082         <span class="comment">/* 192 */</span>   704,  704,  704,  704,  704,  704,  870,  722,
-<a name="l01083"></a>01083         <span class="comment">/* 200 */</span>   722,  722,  722,  722,  407,  407,  407,  407,
-<a name="l01084"></a>01084         <span class="comment">/* 208 */</span>   778,  815,  778,  778,  778,  778,  778,  606,
-<a name="l01085"></a>01085         <span class="comment">/* 216 */</span>   778,  815,  815,  815,  815,  685,  667,  556,
-<a name="l01086"></a>01086         <span class="comment">/* 224 */</span>   574,  574,  574,  574,  574,  574,  722,  444,
-<a name="l01087"></a>01087         <span class="comment">/* 232 */</span>   444,  444,  444,  444,  333,  333,  333,  333,
-<a name="l01088"></a>01088         <span class="comment">/* 240 */</span>   500,  611,  500,  500,  500,  500,  500,  606,
-<a name="l01089"></a>01089         <span class="comment">/* 248 */</span>   500,  611,  611,  611,  611,  500,  574,  500,
-<a name="l01090"></a>01090         },
-<a name="l01091"></a>01091         {       <span class="comment">/* NewCenturySchlbk-BoldItalic */</span>
-<a name="l01092"></a>01092         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01093"></a>01093         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01094"></a>01094         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01095"></a>01095         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01096"></a>01096         <span class="comment">/*  32 */</span>   287,  333,  400,  574,  574,  889,  889,  259,
-<a name="l01097"></a>01097         <span class="comment">/*  40 */</span>   407,  407,  500,  606,  287,  333,  287,  278,
-<a name="l01098"></a>01098         <span class="comment">/*  48 */</span>   574,  574,  574,  574,  574,  574,  574,  574,
-<a name="l01099"></a>01099         <span class="comment">/*  56 */</span>   574,  574,  287,  287,  606,  606,  606,  481,
-<a name="l01100"></a>01100         <span class="comment">/*  64 */</span>   747,  741,  759,  759,  833,  741,  704,  815,
-<a name="l01101"></a>01101         <span class="comment">/*  72 */</span>   870,  444,  667,  778,  704,  944,  852,  833,
-<a name="l01102"></a>01102         <span class="comment">/*  80 */</span>   741,  833,  796,  685,  722,  833,  741,  944,
-<a name="l01103"></a>01103         <span class="comment">/*  88 */</span>   741,  704,  704,  407,  606,  407,  606,  500,
-<a name="l01104"></a>01104         <span class="comment">/*  96 */</span>   259,  667,  611,  537,  667,  519,  389,  611,
-<a name="l01105"></a>01105         <span class="comment">/* 104 */</span>   685,  389,  370,  648,  389,  944,  685,  574,
-<a name="l01106"></a>01106         <span class="comment">/* 112 */</span>   648,  630,  519,  481,  407,  685,  556,  833,
-<a name="l01107"></a>01107         <span class="comment">/* 120 */</span>   574,  519,  519,  407,  606,  407,  606,    0,
-<a name="l01108"></a>01108         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01109"></a>01109         <span class="comment">/* 136 */</span>     0,    0,    0,    0, 1000,  950, 1167,  606,
-<a name="l01110"></a>01110         <span class="comment">/* 144 */</span>   259,  259,  278,  278,  481,  481,  481,  500,
-<a name="l01111"></a>01111         <span class="comment">/* 152 */</span>  1000,  606,  963,  852,  500,  500,  685,  685,
-<a name="l01112"></a>01112         <span class="comment">/* 160 */</span>   287,  333,  574,  574,  574,  574,  606,  500,
-<a name="l01113"></a>01113         <span class="comment">/* 168 */</span>   333,  747,  412,  481,  606,  333,  747,  333,
-<a name="l01114"></a>01114         <span class="comment">/* 176 */</span>   400,  606,  344,  344,  333,  685,  650,  287,
-<a name="l01115"></a>01115         <span class="comment">/* 184 */</span>   333,  344,  356,  481,  861,  861,  861,  481,
-<a name="l01116"></a>01116         <span class="comment">/* 192 */</span>   741,  741,  741,  741,  741,  741,  889,  759,
-<a name="l01117"></a>01117         <span class="comment">/* 200 */</span>   741,  741,  741,  741,  444,  444,  444,  444,
-<a name="l01118"></a>01118         <span class="comment">/* 208 */</span>   833,  852,  833,  833,  833,  833,  833,  606,
-<a name="l01119"></a>01119         <span class="comment">/* 216 */</span>   833,  833,  833,  833,  833,  704,  741,  574,
-<a name="l01120"></a>01120         <span class="comment">/* 224 */</span>   667,  667,  667,  667,  667,  667,  815,  537,
-<a name="l01121"></a>01121         <span class="comment">/* 232 */</span>   519,  519,  519,  519,  389,  389,  389,  389,
-<a name="l01122"></a>01122         <span class="comment">/* 240 */</span>   574,  685,  574,  574,  574,  574,  574,  606,
-<a name="l01123"></a>01123         <span class="comment">/* 248 */</span>   574,  685,  685,  685,  685,  519,  648,  519,
-<a name="l01124"></a>01124         },
-<a name="l01125"></a>01125 };
-<a name="l01126"></a>01126 <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> ausCharacterWidths2[32][256] = {
-<a name="l01127"></a>01127         {       <span class="comment">/* Courier */</span>
-<a name="l01128"></a>01128         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01129"></a>01129         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01130"></a>01130         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01131"></a>01131         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01132"></a>01132         <span class="comment">/*  32 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01133"></a>01133         <span class="comment">/*  40 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01134"></a>01134         <span class="comment">/*  48 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01135"></a>01135         <span class="comment">/*  56 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01136"></a>01136         <span class="comment">/*  64 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01137"></a>01137         <span class="comment">/*  72 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01138"></a>01138         <span class="comment">/*  80 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01139"></a>01139         <span class="comment">/*  88 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01140"></a>01140         <span class="comment">/*  96 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01141"></a>01141         <span class="comment">/* 104 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01142"></a>01142         <span class="comment">/* 112 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01143"></a>01143         <span class="comment">/* 120 */</span>   600,  600,  600,  600,  600,  600,  600,    0,
-<a name="l01144"></a>01144         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01145"></a>01145         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01146"></a>01146         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01147"></a>01147         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01148"></a>01148         <span class="comment">/* 160 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01149"></a>01149         <span class="comment">/* 168 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01150"></a>01150         <span class="comment">/* 176 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01151"></a>01151         <span class="comment">/* 184 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01152"></a>01152         <span class="comment">/* 192 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01153"></a>01153         <span class="comment">/* 200 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01154"></a>01154         <span class="comment">/* 208 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01155"></a>01155         <span class="comment">/* 216 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01156"></a>01156         <span class="comment">/* 224 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01157"></a>01157         <span class="comment">/* 232 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01158"></a>01158         <span class="comment">/* 240 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01159"></a>01159         <span class="comment">/* 248 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01160"></a>01160         },
-<a name="l01161"></a>01161         {       <span class="comment">/* Courier-Bold */</span>
-<a name="l01162"></a>01162         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01163"></a>01163         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01164"></a>01164         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01165"></a>01165         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01166"></a>01166         <span class="comment">/*  32 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01167"></a>01167         <span class="comment">/*  40 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01168"></a>01168         <span class="comment">/*  48 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01169"></a>01169         <span class="comment">/*  56 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01170"></a>01170         <span class="comment">/*  64 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01171"></a>01171         <span class="comment">/*  72 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01172"></a>01172         <span class="comment">/*  80 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01173"></a>01173         <span class="comment">/*  88 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01174"></a>01174         <span class="comment">/*  96 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01175"></a>01175         <span class="comment">/* 104 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01176"></a>01176         <span class="comment">/* 112 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01177"></a>01177         <span class="comment">/* 120 */</span>   600,  600,  600,  600,  600,  600,  600,    0,
-<a name="l01178"></a>01178         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01179"></a>01179         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01180"></a>01180         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01181"></a>01181         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01182"></a>01182         <span class="comment">/* 160 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01183"></a>01183         <span class="comment">/* 168 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01184"></a>01184         <span class="comment">/* 176 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01185"></a>01185         <span class="comment">/* 184 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01186"></a>01186         <span class="comment">/* 192 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01187"></a>01187         <span class="comment">/* 200 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01188"></a>01188         <span class="comment">/* 208 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01189"></a>01189         <span class="comment">/* 216 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01190"></a>01190         <span class="comment">/* 224 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01191"></a>01191         <span class="comment">/* 232 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01192"></a>01192         <span class="comment">/* 240 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01193"></a>01193         <span class="comment">/* 248 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01194"></a>01194         },
-<a name="l01195"></a>01195         {       <span class="comment">/* Courier-Oblique */</span>
-<a name="l01196"></a>01196         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01197"></a>01197         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01198"></a>01198         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01199"></a>01199         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01200"></a>01200         <span class="comment">/*  32 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01201"></a>01201         <span class="comment">/*  40 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01202"></a>01202         <span class="comment">/*  48 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01203"></a>01203         <span class="comment">/*  56 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01204"></a>01204         <span class="comment">/*  64 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01205"></a>01205         <span class="comment">/*  72 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01206"></a>01206         <span class="comment">/*  80 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01207"></a>01207         <span class="comment">/*  88 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01208"></a>01208         <span class="comment">/*  96 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01209"></a>01209         <span class="comment">/* 104 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01210"></a>01210         <span class="comment">/* 112 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01211"></a>01211         <span class="comment">/* 120 */</span>   600,  600,  600,  600,  600,  600,  600,    0,
-<a name="l01212"></a>01212         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01213"></a>01213         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01214"></a>01214         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01215"></a>01215         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01216"></a>01216         <span class="comment">/* 160 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01217"></a>01217         <span class="comment">/* 168 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01218"></a>01218         <span class="comment">/* 176 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01219"></a>01219         <span class="comment">/* 184 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01220"></a>01220         <span class="comment">/* 192 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01221"></a>01221         <span class="comment">/* 200 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01222"></a>01222         <span class="comment">/* 208 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01223"></a>01223         <span class="comment">/* 216 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01224"></a>01224         <span class="comment">/* 224 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01225"></a>01225         <span class="comment">/* 232 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01226"></a>01226         <span class="comment">/* 240 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01227"></a>01227         <span class="comment">/* 248 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01228"></a>01228         },
-<a name="l01229"></a>01229         {       <span class="comment">/* Courier-BoldOblique */</span>
-<a name="l01230"></a>01230         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01231"></a>01231         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01232"></a>01232         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01233"></a>01233         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01234"></a>01234         <span class="comment">/*  32 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01235"></a>01235         <span class="comment">/*  40 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01236"></a>01236         <span class="comment">/*  48 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01237"></a>01237         <span class="comment">/*  56 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01238"></a>01238         <span class="comment">/*  64 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01239"></a>01239         <span class="comment">/*  72 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01240"></a>01240         <span class="comment">/*  80 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01241"></a>01241         <span class="comment">/*  88 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01242"></a>01242         <span class="comment">/*  96 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01243"></a>01243         <span class="comment">/* 104 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01244"></a>01244         <span class="comment">/* 112 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01245"></a>01245         <span class="comment">/* 120 */</span>   600,  600,  600,  600,  600,  600,  600,    0,
-<a name="l01246"></a>01246         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01247"></a>01247         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01248"></a>01248         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01249"></a>01249         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01250"></a>01250         <span class="comment">/* 160 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01251"></a>01251         <span class="comment">/* 168 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01252"></a>01252         <span class="comment">/* 176 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01253"></a>01253         <span class="comment">/* 184 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01254"></a>01254         <span class="comment">/* 192 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01255"></a>01255         <span class="comment">/* 200 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01256"></a>01256         <span class="comment">/* 208 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01257"></a>01257         <span class="comment">/* 216 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01258"></a>01258         <span class="comment">/* 224 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01259"></a>01259         <span class="comment">/* 232 */</span>   600,  600,  600,  600,  600,  600,  600,  740,
-<a name="l01260"></a>01260         <span class="comment">/* 240 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01261"></a>01261         <span class="comment">/* 248 */</span>   600,  600,  600,  600,  600,  600,  600,  600,
-<a name="l01262"></a>01262         },
-<a name="l01263"></a>01263         {       <span class="comment">/* Times-Roman */</span>
-<a name="l01264"></a>01264         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01265"></a>01265         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01266"></a>01266         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01267"></a>01267         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01268"></a>01268         <span class="comment">/*  32 */</span>   250,  333,  408,  500,  500,  833,  778,  180,
-<a name="l01269"></a>01269         <span class="comment">/*  40 */</span>   333,  333,  500,  564,  250,  333,  250,  278,
-<a name="l01270"></a>01270         <span class="comment">/*  48 */</span>   500,  500,  500,  500,  500,  500,  500,  500,
-<a name="l01271"></a>01271         <span class="comment">/*  56 */</span>   500,  500,  278,  278,  564,  564,  564,  444,
-<a name="l01272"></a>01272         <span class="comment">/*  64 */</span>   921,  722,  667,  667,  722,  611,  556,  722,
-<a name="l01273"></a>01273         <span class="comment">/*  72 */</span>   722,  333,  389,  722,  611,  889,  722,  722,
-<a name="l01274"></a>01274         <span class="comment">/*  80 */</span>   556,  722,  667,  556,  611,  722,  722,  944,
-<a name="l01275"></a>01275         <span class="comment">/*  88 */</span>   722,  722,  611,  333,  278,  333,  469,  500,
-<a name="l01276"></a>01276         <span class="comment">/*  96 */</span>   333,  444,  500,  444,  500,  444,  333,  500,
-<a name="l01277"></a>01277         <span class="comment">/* 104 */</span>   500,  278,  278,  500,  278,  778,  500,  500,
-<a name="l01278"></a>01278         <span class="comment">/* 112 */</span>   500,  500,  333,  389,  278,  500,  500,  722,
-<a name="l01279"></a>01279         <span class="comment">/* 120 */</span>   500,  500,  444,  480,  200,  480,  541,    0,
-<a name="l01280"></a>01280         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01281"></a>01281         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01282"></a>01282         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01283"></a>01283         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01284"></a>01284         <span class="comment">/* 160 */</span>   250,  722,  333,  611,  500,  611,  556,  500,
-<a name="l01285"></a>01285         <span class="comment">/* 168 */</span>   333,  556,  556,  611,  611,  333,  611,  611,
-<a name="l01286"></a>01286         <span class="comment">/* 176 */</span>   333,  444,  333,  278,  333,  348,  389,  333,
-<a name="l01287"></a>01287         <span class="comment">/* 184 */</span>   333,  389,  389,  278,  444,  333,  444,  444,
-<a name="l01288"></a>01288         <span class="comment">/* 192 */</span>   667,  722,  722,  722,  722,  611,  667,  667,
-<a name="l01289"></a>01289         <span class="comment">/* 200 */</span>   667,  611,  611,  611,  611,  333,  333,  722,
-<a name="l01290"></a>01290         <span class="comment">/* 208 */</span>   722,  722,  722,  722,  722,  722,  722,  564,
-<a name="l01291"></a>01291         <span class="comment">/* 216 */</span>   667,  722,  722,  722,  722,  722,  611,  500,
-<a name="l01292"></a>01292         <span class="comment">/* 224 */</span>   333,  444,  444,  444,  444,  278,  444,  444,
-<a name="l01293"></a>01293         <span class="comment">/* 232 */</span>   444,  444,  444,  444,  444,  278,  278,  600,
-<a name="l01294"></a>01294         <span class="comment">/* 240 */</span>   500,  500,  500,  500,  500,  500,  500,  564,
-<a name="l01295"></a>01295         <span class="comment">/* 248 */</span>   333,  500,  500,  500,  500,  500,  278,  333,
-<a name="l01296"></a>01296         },
-<a name="l01297"></a>01297         {       <span class="comment">/* Times-Bold */</span>
-<a name="l01298"></a>01298         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01299"></a>01299         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01300"></a>01300         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01301"></a>01301         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01302"></a>01302         <span class="comment">/*  32 */</span>   250,  333,  555,  500,  500, 1000,  833,  278,
-<a name="l01303"></a>01303         <span class="comment">/*  40 */</span>   333,  333,  500,  570,  250,  333,  250,  278,
-<a name="l01304"></a>01304         <span class="comment">/*  48 */</span>   500,  500,  500,  500,  500,  500,  500,  500,
-<a name="l01305"></a>01305         <span class="comment">/*  56 */</span>   500,  500,  333,  333,  570,  570,  570,  500,
-<a name="l01306"></a>01306         <span class="comment">/*  64 */</span>   930,  722,  667,  722,  722,  667,  611,  778,
-<a name="l01307"></a>01307         <span class="comment">/*  72 */</span>   778,  389,  500,  778,  667,  944,  722,  778,
-<a name="l01308"></a>01308         <span class="comment">/*  80 */</span>   611,  778,  722,  556,  667,  722,  722, 1000,
-<a name="l01309"></a>01309         <span class="comment">/*  88 */</span>   722,  722,  667,  333,  278,  333,  581,  500,
-<a name="l01310"></a>01310         <span class="comment">/*  96 */</span>   333,  500,  556,  444,  556,  444,  333,  500,
-<a name="l01311"></a>01311         <span class="comment">/* 104 */</span>   556,  278,  333,  556,  278,  833,  556,  500,
-<a name="l01312"></a>01312         <span class="comment">/* 112 */</span>   556,  556,  444,  389,  333,  556,  500,  722,
-<a name="l01313"></a>01313         <span class="comment">/* 120 */</span>   500,  500,  444,  394,  220,  394,  520,    0,
-<a name="l01314"></a>01314         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01315"></a>01315         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01316"></a>01316         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01317"></a>01317         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01318"></a>01318         <span class="comment">/* 160 */</span>   250,  722,  333,  667,  500,  667,  556,  500,
-<a name="l01319"></a>01319         <span class="comment">/* 168 */</span>   333,  556,  556,  667,  667,  333,  667,  667,
-<a name="l01320"></a>01320         <span class="comment">/* 176 */</span>   333,  500,  333,  278,  333,  396,  389,  333,
-<a name="l01321"></a>01321         <span class="comment">/* 184 */</span>   333,  389,  389,  400,  444,  333,  444,  444,
-<a name="l01322"></a>01322         <span class="comment">/* 192 */</span>   722,  722,  722,  722,  722,  667,  722,  722,
-<a name="l01323"></a>01323         <span class="comment">/* 200 */</span>   722,  667,  667,  667,  667,  389,  389,  722,
-<a name="l01324"></a>01324         <span class="comment">/* 208 */</span>   722,  722,  722,  778,  778,  778,  778,  570,
-<a name="l01325"></a>01325         <span class="comment">/* 216 */</span>   722,  722,  722,  722,  722,  722,  667,  556,
-<a name="l01326"></a>01326         <span class="comment">/* 224 */</span>   444,  500,  500,  500,  500,  278,  444,  444,
-<a name="l01327"></a>01327         <span class="comment">/* 232 */</span>   444,  444,  444,  444,  444,  278,  278,  665,
-<a name="l01328"></a>01328         <span class="comment">/* 240 */</span>   556,  556,  556,  500,  500,  500,  500,  570,
-<a name="l01329"></a>01329         <span class="comment">/* 248 */</span>   444,  556,  556,  556,  556,  500,  333,  333,
-<a name="l01330"></a>01330         },
-<a name="l01331"></a>01331         {       <span class="comment">/* Times-Italic */</span>
-<a name="l01332"></a>01332         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01333"></a>01333         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01334"></a>01334         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01335"></a>01335         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01336"></a>01336         <span class="comment">/*  32 */</span>   250,  333,  420,  500,  500,  833,  778,  214,
-<a name="l01337"></a>01337         <span class="comment">/*  40 */</span>   333,  333,  500,  675,  250,  333,  250,  278,
-<a name="l01338"></a>01338         <span class="comment">/*  48 */</span>   500,  500,  500,  500,  500,  500,  500,  500,
-<a name="l01339"></a>01339         <span class="comment">/*  56 */</span>   500,  500,  333,  333,  675,  675,  675,  500,
-<a name="l01340"></a>01340         <span class="comment">/*  64 */</span>   920,  611,  611,  667,  722,  611,  611,  722,
-<a name="l01341"></a>01341         <span class="comment">/*  72 */</span>   722,  333,  444,  667,  556,  833,  667,  722,
-<a name="l01342"></a>01342         <span class="comment">/*  80 */</span>   611,  722,  611,  500,  556,  722,  611,  833,
-<a name="l01343"></a>01343         <span class="comment">/*  88 */</span>   611,  556,  556,  389,  278,  389,  422,  500,
-<a name="l01344"></a>01344         <span class="comment">/*  96 */</span>   333,  500,  500,  444,  500,  444,  278,  500,
-<a name="l01345"></a>01345         <span class="comment">/* 104 */</span>   500,  278,  278,  444,  278,  722,  500,  500,
-<a name="l01346"></a>01346         <span class="comment">/* 112 */</span>   500,  500,  389,  389,  278,  500,  444,  667,
-<a name="l01347"></a>01347         <span class="comment">/* 120 */</span>   444,  444,  389,  400,  275,  400,  541,    0,
-<a name="l01348"></a>01348         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01349"></a>01349         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01350"></a>01350         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01351"></a>01351         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01352"></a>01352         <span class="comment">/* 160 */</span>   250,  611,  333,  556,  500,  556,  500,  500,
-<a name="l01353"></a>01353         <span class="comment">/* 168 */</span>   333,  500,  500,  556,  556,  333,  556,  556,
-<a name="l01354"></a>01354         <span class="comment">/* 176 */</span>   333,  500,  333,  278,  333,  278,  389,  333,
-<a name="l01355"></a>01355         <span class="comment">/* 184 */</span>   333,  389,  389,  278,  389,  333,  389,  389,
-<a name="l01356"></a>01356         <span class="comment">/* 192 */</span>   611,  611,  611,  611,  611,  556,  667,  667,
-<a name="l01357"></a>01357         <span class="comment">/* 200 */</span>   667,  611,  611,  611,  611,  333,  333,  722,
-<a name="l01358"></a>01358         <span class="comment">/* 208 */</span>   722,  667,  667,  722,  722,  722,  722,  675,
-<a name="l01359"></a>01359         <span class="comment">/* 216 */</span>   611,  722,  722,  722,  722,  556,  556,  500,
-<a name="l01360"></a>01360         <span class="comment">/* 224 */</span>   389,  500,  500,  500,  500,  278,  444,  444,
-<a name="l01361"></a>01361         <span class="comment">/* 232 */</span>   444,  444,  444,  444,  444,  278,  278,  521,
-<a name="l01362"></a>01362         <span class="comment">/* 240 */</span>   500,  500,  500,  500,  500,  500,  500,  675,
-<a name="l01363"></a>01363         <span class="comment">/* 248 */</span>   389,  500,  500,  500,  500,  444,  278,  333,
-<a name="l01364"></a>01364         },
-<a name="l01365"></a>01365         {       <span class="comment">/* Times-BoldItalic */</span>
-<a name="l01366"></a>01366         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01367"></a>01367         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01368"></a>01368         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01369"></a>01369         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01370"></a>01370         <span class="comment">/*  32 */</span>   250,  389,  555,  500,  500,  833,  778,  278,
-<a name="l01371"></a>01371         <span class="comment">/*  40 */</span>   333,  333,  500,  570,  250,  333,  250,  278,
-<a name="l01372"></a>01372         <span class="comment">/*  48 */</span>   500,  500,  500,  500,  500,  500,  500,  500,
-<a name="l01373"></a>01373         <span class="comment">/*  56 */</span>   500,  500,  333,  333,  570,  570,  570,  500,
-<a name="l01374"></a>01374         <span class="comment">/*  64 */</span>   832,  667,  667,  667,  722,  667,  667,  722,
-<a name="l01375"></a>01375         <span class="comment">/*  72 */</span>   778,  389,  500,  667,  611,  889,  722,  722,
-<a name="l01376"></a>01376         <span class="comment">/*  80 */</span>   611,  722,  667,  556,  611,  722,  667,  889,
-<a name="l01377"></a>01377         <span class="comment">/*  88 */</span>   667,  611,  611,  333,  278,  333,  570,  500,
-<a name="l01378"></a>01378         <span class="comment">/*  96 */</span>   333,  500,  500,  444,  500,  444,  333,  500,
-<a name="l01379"></a>01379         <span class="comment">/* 104 */</span>   556,  278,  278,  500,  278,  778,  556,  500,
-<a name="l01380"></a>01380         <span class="comment">/* 112 */</span>   500,  500,  389,  389,  278,  556,  444,  667,
-<a name="l01381"></a>01381         <span class="comment">/* 120 */</span>   500,  444,  389,  348,  220,  348,  570,    0,
-<a name="l01382"></a>01382         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01383"></a>01383         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01384"></a>01384         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01385"></a>01385         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01386"></a>01386         <span class="comment">/* 160 */</span>   250,  667,  333,  611,  500,  611,  556,  500,
-<a name="l01387"></a>01387         <span class="comment">/* 168 */</span>   333,  556,  556,  611,  611,  333,  611,  611,
-<a name="l01388"></a>01388         <span class="comment">/* 176 */</span>   333,  500,  333,  278,  333,  382,  389,  333,
-<a name="l01389"></a>01389         <span class="comment">/* 184 */</span>   333,  389,  389,  345,  389,  333,  389,  389,
-<a name="l01390"></a>01390         <span class="comment">/* 192 */</span>   667,  667,  667,  667,  667,  611,  667,  667,
-<a name="l01391"></a>01391         <span class="comment">/* 200 */</span>   667,  667,  667,  667,  667,  389,  389,  722,
-<a name="l01392"></a>01392         <span class="comment">/* 208 */</span>   722,  722,  722,  722,  722,  722,  722,  570,
-<a name="l01393"></a>01393         <span class="comment">/* 216 */</span>   667,  722,  722,  722,  722,  611,  611,  500,
-<a name="l01394"></a>01394         <span class="comment">/* 224 */</span>   389,  500,  500,  500,  500,  278,  444,  444,
-<a name="l01395"></a>01395         <span class="comment">/* 232 */</span>   444,  444,  444,  444,  444,  278,  278,  600,
-<a name="l01396"></a>01396         <span class="comment">/* 240 */</span>   500,  556,  556,  500,  500,  500,  500,  570,
-<a name="l01397"></a>01397         <span class="comment">/* 248 */</span>   389,  556,  556,  556,  556,  444,  278,  333,
-<a name="l01398"></a>01398         },
-<a name="l01399"></a>01399         {       <span class="comment">/* Helvetica */</span>
-<a name="l01400"></a>01400         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01401"></a>01401         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01402"></a>01402         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01403"></a>01403         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01404"></a>01404         <span class="comment">/*  32 */</span>   278,  278,  355,  556,  556,  889,  667,  191,
-<a name="l01405"></a>01405         <span class="comment">/*  40 */</span>   333,  333,  389,  584,  278,  333,  278,  278,
-<a name="l01406"></a>01406         <span class="comment">/*  48 */</span>   556,  556,  556,  556,  556,  556,  556,  556,
-<a name="l01407"></a>01407         <span class="comment">/*  56 */</span>   556,  556,  278,  278,  584,  584,  584,  556,
-<a name="l01408"></a>01408         <span class="comment">/*  64 */</span>  1015,  667,  667,  722,  722,  667,  611,  778,
-<a name="l01409"></a>01409         <span class="comment">/*  72 */</span>   722,  278,  500,  667,  556,  833,  722,  778,
-<a name="l01410"></a>01410         <span class="comment">/*  80 */</span>   667,  778,  722,  667,  611,  722,  667,  944,
-<a name="l01411"></a>01411         <span class="comment">/*  88 */</span>   667,  667,  611,  278,  278,  278,  469,  556,
-<a name="l01412"></a>01412         <span class="comment">/*  96 */</span>   333,  556,  556,  500,  556,  556,  278,  556,
-<a name="l01413"></a>01413         <span class="comment">/* 104 */</span>   556,  222,  222,  500,  222,  833,  556,  556,
-<a name="l01414"></a>01414         <span class="comment">/* 112 */</span>   556,  556,  333,  500,  278,  556,  500,  722,
-<a name="l01415"></a>01415         <span class="comment">/* 120 */</span>   500,  500,  500,  334,  260,  334,  584,    0,
-<a name="l01416"></a>01416         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01417"></a>01417         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01418"></a>01418         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01419"></a>01419         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01420"></a>01420         <span class="comment">/* 160 */</span>   278,  667,  333,  556,  556,  556,  667,  556,
-<a name="l01421"></a>01421         <span class="comment">/* 168 */</span>   333,  667,  667,  611,  611,  333,  611,  611,
-<a name="l01422"></a>01422         <span class="comment">/* 176 */</span>   333,  556,  333,  222,  333,  292,  500,  333,
-<a name="l01423"></a>01423         <span class="comment">/* 184 */</span>   333,  500,  500,  308,  500,  333,  500,  500,
-<a name="l01424"></a>01424         <span class="comment">/* 192 */</span>   722,  667,  667,  667,  667,  556,  722,  722,
-<a name="l01425"></a>01425         <span class="comment">/* 200 */</span>   722,  667,  667,  667,  667,  278,  278,  722,
-<a name="l01426"></a>01426         <span class="comment">/* 208 */</span>   722,  722,  722,  778,  778,  778,  778,  584,
-<a name="l01427"></a>01427         <span class="comment">/* 216 */</span>   722,  722,  722,  722,  722,  666,  611,  611,
-<a name="l01428"></a>01428         <span class="comment">/* 224 */</span>   333,  556,  556,  556,  556,  222,  500,  500,
-<a name="l01429"></a>01429         <span class="comment">/* 232 */</span>   500,  556,  556,  556,  556,  278,  278,  635,
-<a name="l01430"></a>01430         <span class="comment">/* 240 */</span>   556,  556,  556,  556,  556,  556,  556,  584,
-<a name="l01431"></a>01431         <span class="comment">/* 248 */</span>   333,  556,  556,  556,  556,  500,  278,  333,
-<a name="l01432"></a>01432         },
-<a name="l01433"></a>01433         {       <span class="comment">/* Helvetica-Bold */</span>
-<a name="l01434"></a>01434         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01435"></a>01435         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01436"></a>01436         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01437"></a>01437         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01438"></a>01438         <span class="comment">/*  32 */</span>   278,  333,  474,  556,  556,  889,  722,  238,
-<a name="l01439"></a>01439         <span class="comment">/*  40 */</span>   333,  333,  389,  584,  278,  333,  278,  278,
-<a name="l01440"></a>01440         <span class="comment">/*  48 */</span>   556,  556,  556,  556,  556,  556,  556,  556,
-<a name="l01441"></a>01441         <span class="comment">/*  56 */</span>   556,  556,  333,  333,  584,  584,  584,  611,
-<a name="l01442"></a>01442         <span class="comment">/*  64 */</span>   975,  722,  722,  722,  722,  667,  611,  778,
-<a name="l01443"></a>01443         <span class="comment">/*  72 */</span>   722,  278,  556,  722,  611,  833,  722,  778,
-<a name="l01444"></a>01444         <span class="comment">/*  80 */</span>   667,  778,  722,  667,  611,  722,  667,  944,
-<a name="l01445"></a>01445         <span class="comment">/*  88 */</span>   667,  667,  611,  333,  278,  333,  584,  556,
-<a name="l01446"></a>01446         <span class="comment">/*  96 */</span>   333,  556,  611,  556,  611,  556,  333,  611,
-<a name="l01447"></a>01447         <span class="comment">/* 104 */</span>   611,  278,  278,  556,  278,  889,  611,  611,
-<a name="l01448"></a>01448         <span class="comment">/* 112 */</span>   611,  611,  389,  556,  333,  611,  556,  778,
-<a name="l01449"></a>01449         <span class="comment">/* 120 */</span>   556,  556,  500,  389,  280,  389,  584,    0,
-<a name="l01450"></a>01450         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01451"></a>01451         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01452"></a>01452         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01453"></a>01453         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01454"></a>01454         <span class="comment">/* 160 */</span>   278,  722,  333,  611,  556,  611,  667,  556,
-<a name="l01455"></a>01455         <span class="comment">/* 168 */</span>   333,  667,  667,  611,  611,  333,  611,  611,
-<a name="l01456"></a>01456         <span class="comment">/* 176 */</span>   333,  556,  333,  278,  333,  369,  556,  333,
-<a name="l01457"></a>01457         <span class="comment">/* 184 */</span>   333,  556,  556,  385,  500,  333,  500,  500,
-<a name="l01458"></a>01458         <span class="comment">/* 192 */</span>   722,  722,  722,  722,  722,  611,  722,  722,
-<a name="l01459"></a>01459         <span class="comment">/* 200 */</span>   722,  667,  667,  667,  667,  278,  278,  722,
-<a name="l01460"></a>01460         <span class="comment">/* 208 */</span>   722,  722,  722,  778,  778,  778,  778,  584,
-<a name="l01461"></a>01461         <span class="comment">/* 216 */</span>   722,  722,  722,  722,  722,  667,  611,  611,
-<a name="l01462"></a>01462         <span class="comment">/* 224 */</span>   389,  556,  556,  556,  556,  278,  556,  556,
-<a name="l01463"></a>01463         <span class="comment">/* 232 */</span>   556,  556,  556,  556,  556,  278,  278,  707,
-<a name="l01464"></a>01464         <span class="comment">/* 240 */</span>   611,  611,  611,  611,  611,  611,  611,  584,
-<a name="l01465"></a>01465         <span class="comment">/* 248 */</span>   389,  611,  611,  611,  611,  556,  333,  333,
-<a name="l01466"></a>01466         },
-<a name="l01467"></a>01467         {       <span class="comment">/* Helvetica-Oblique */</span>
-<a name="l01468"></a>01468         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01469"></a>01469         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01470"></a>01470         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01471"></a>01471         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01472"></a>01472         <span class="comment">/*  32 */</span>   278,  278,  355,  556,  556,  889,  667,  191,
-<a name="l01473"></a>01473         <span class="comment">/*  40 */</span>   333,  333,  389,  584,  278,  333,  278,  278,
-<a name="l01474"></a>01474         <span class="comment">/*  48 */</span>   556,  556,  556,  556,  556,  556,  556,  556,
-<a name="l01475"></a>01475         <span class="comment">/*  56 */</span>   556,  556,  278,  278,  584,  584,  584,  556,
-<a name="l01476"></a>01476         <span class="comment">/*  64 */</span>  1015,  667,  667,  722,  722,  667,  611,  778,
-<a name="l01477"></a>01477         <span class="comment">/*  72 */</span>   722,  278,  500,  667,  556,  833,  722,  778,
-<a name="l01478"></a>01478         <span class="comment">/*  80 */</span>   667,  778,  722,  667,  611,  722,  667,  944,
-<a name="l01479"></a>01479         <span class="comment">/*  88 */</span>   667,  667,  611,  278,  278,  278,  469,  556,
-<a name="l01480"></a>01480         <span class="comment">/*  96 */</span>   333,  556,  556,  500,  556,  556,  278,  556,
-<a name="l01481"></a>01481         <span class="comment">/* 104 */</span>   556,  222,  222,  500,  222,  833,  556,  556,
-<a name="l01482"></a>01482         <span class="comment">/* 112 */</span>   556,  556,  333,  500,  278,  556,  500,  722,
-<a name="l01483"></a>01483         <span class="comment">/* 120 */</span>   500,  500,  500,  334,  260,  334,  584,    0,
-<a name="l01484"></a>01484         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01485"></a>01485         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01486"></a>01486         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01487"></a>01487         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01488"></a>01488         <span class="comment">/* 160 */</span>   278,  667,  333,  556,  556,  556,  667,  556,
-<a name="l01489"></a>01489         <span class="comment">/* 168 */</span>   333,  667,  667,  611,  611,  333,  611,  611,
-<a name="l01490"></a>01490         <span class="comment">/* 176 */</span>   333,  556,  333,  222,  333,  307,  500,  333,
-<a name="l01491"></a>01491         <span class="comment">/* 184 */</span>   333,  500,  500,  319,  500,  333,  500,  500,
-<a name="l01492"></a>01492         <span class="comment">/* 192 */</span>   722,  667,  667,  667,  667,  556,  722,  722,
-<a name="l01493"></a>01493         <span class="comment">/* 200 */</span>   722,  667,  667,  667,  667,  278,  278,  722,
-<a name="l01494"></a>01494         <span class="comment">/* 208 */</span>   722,  722,  722,  778,  778,  778,  778,  584,
-<a name="l01495"></a>01495         <span class="comment">/* 216 */</span>   722,  722,  722,  722,  722,  667,  611,  611,
-<a name="l01496"></a>01496         <span class="comment">/* 224 */</span>   333,  556,  556,  556,  556,  222,  500,  500,
-<a name="l01497"></a>01497         <span class="comment">/* 232 */</span>   500,  556,  556,  556,  556,  278,  278,  650,
-<a name="l01498"></a>01498         <span class="comment">/* 240 */</span>   556,  556,  556,  556,  556,  556,  556,  584,
-<a name="l01499"></a>01499         <span class="comment">/* 248 */</span>   333,  556,  556,  556,  556,  500,  278,  333,
-<a name="l01500"></a>01500         },
-<a name="l01501"></a>01501         {       <span class="comment">/* Helvetica-BoldOblique */</span>
-<a name="l01502"></a>01502         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01503"></a>01503         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01504"></a>01504         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01505"></a>01505         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01506"></a>01506         <span class="comment">/*  32 */</span>   278,  333,  474,  556,  556,  889,  722,  238,
-<a name="l01507"></a>01507         <span class="comment">/*  40 */</span>   333,  333,  389,  584,  278,  333,  278,  278,
-<a name="l01508"></a>01508         <span class="comment">/*  48 */</span>   556,  556,  556,  556,  556,  556,  556,  556,
-<a name="l01509"></a>01509         <span class="comment">/*  56 */</span>   556,  556,  333,  333,  584,  584,  584,  611,
-<a name="l01510"></a>01510         <span class="comment">/*  64 */</span>   975,  722,  722,  722,  722,  667,  611,  778,
-<a name="l01511"></a>01511         <span class="comment">/*  72 */</span>   722,  278,  556,  722,  611,  833,  722,  778,
-<a name="l01512"></a>01512         <span class="comment">/*  80 */</span>   667,  778,  722,  667,  611,  722,  667,  944,
-<a name="l01513"></a>01513         <span class="comment">/*  88 */</span>   667,  667,  611,  333,  278,  333,  584,  556,
-<a name="l01514"></a>01514         <span class="comment">/*  96 */</span>   333,  556,  611,  556,  611,  556,  333,  611,
-<a name="l01515"></a>01515         <span class="comment">/* 104 */</span>   611,  278,  278,  556,  278,  889,  611,  611,
-<a name="l01516"></a>01516         <span class="comment">/* 112 */</span>   611,  611,  389,  556,  333,  611,  556,  778,
-<a name="l01517"></a>01517         <span class="comment">/* 120 */</span>   556,  556,  500,  389,  280,  389,  584,    0,
-<a name="l01518"></a>01518         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01519"></a>01519         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01520"></a>01520         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01521"></a>01521         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01522"></a>01522         <span class="comment">/* 160 */</span>   278,  722,  333,  611,  556,  611,  667,  556,
-<a name="l01523"></a>01523         <span class="comment">/* 168 */</span>   333,  667,  667,  611,  611,  333,  611,  611,
-<a name="l01524"></a>01524         <span class="comment">/* 176 */</span>   333,  556,  333,  278,  333,  384,  556,  333,
-<a name="l01525"></a>01525         <span class="comment">/* 184 */</span>   333,  556,  556,  404,  500,  333,  500,  500,
-<a name="l01526"></a>01526         <span class="comment">/* 192 */</span>   722,  722,  722,  722,  722,  611,  722,  722,
-<a name="l01527"></a>01527         <span class="comment">/* 200 */</span>   722,  667,  667,  667,  667,  278,  278,  722,
-<a name="l01528"></a>01528         <span class="comment">/* 208 */</span>   722,  722,  722,  778,  778,  778,  778,  584,
-<a name="l01529"></a>01529         <span class="comment">/* 216 */</span>   722,  722,  722,  722,  722,  667,  611,  611,
-<a name="l01530"></a>01530         <span class="comment">/* 224 */</span>   389,  556,  556,  556,  556,  278,  556,  556,
-<a name="l01531"></a>01531         <span class="comment">/* 232 */</span>   556,  556,  556,  556,  556,  278,  278,  722,
-<a name="l01532"></a>01532         <span class="comment">/* 240 */</span>   611,  611,  611,  611,  611,  611,  611,  584,
-<a name="l01533"></a>01533         <span class="comment">/* 248 */</span>   389,  611,  611,  611,  611,  556,  333,  333,
-<a name="l01534"></a>01534         },
-<a name="l01535"></a>01535         {       <span class="comment">/* Palatino-Roman */</span>
-<a name="l01536"></a>01536         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01537"></a>01537         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01538"></a>01538         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01539"></a>01539         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01540"></a>01540         <span class="comment">/*  32 */</span>   250,  278,  371,  500,  500,  840,  778,  208,
-<a name="l01541"></a>01541         <span class="comment">/*  40 */</span>   333,  333,  389,  606,  250,  333,  250,  606,
-<a name="l01542"></a>01542         <span class="comment">/*  48 */</span>   500,  500,  500,  500,  500,  500,  500,  500,
-<a name="l01543"></a>01543         <span class="comment">/*  56 */</span>   500,  500,  250,  250,  606,  606,  606,  444,
-<a name="l01544"></a>01544         <span class="comment">/*  64 */</span>   747,  778,  611,  709,  774,  611,  556,  763,
-<a name="l01545"></a>01545         <span class="comment">/*  72 */</span>   832,  337,  333,  726,  611,  946,  831,  786,
-<a name="l01546"></a>01546         <span class="comment">/*  80 */</span>   604,  786,  668,  525,  613,  778,  722, 1000,
-<a name="l01547"></a>01547         <span class="comment">/*  88 */</span>   667,  667,  667,  333,  606,  333,  606,  500,
-<a name="l01548"></a>01548         <span class="comment">/*  96 */</span>   333,  500,  553,  444,  611,  479,  333,  556,
-<a name="l01549"></a>01549         <span class="comment">/* 104 */</span>   582,  291,  234,  556,  291,  883,  582,  546,
-<a name="l01550"></a>01550         <span class="comment">/* 112 */</span>   601,  560,  395,  424,  326,  603,  565,  834,
-<a name="l01551"></a>01551         <span class="comment">/* 120 */</span>   516,  556,  500,  333,  606,  333,  606,    0,
-<a name="l01552"></a>01552         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01553"></a>01553         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01554"></a>01554         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01555"></a>01555         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01556"></a>01556         <span class="comment">/* 160 */</span>   250,  778,  333,  611,  500,  611,  525,  500,
-<a name="l01557"></a>01557         <span class="comment">/* 168 */</span>   333,  525,  525,  613,  667,  333,  667,  667,
-<a name="l01558"></a>01558         <span class="comment">/* 176 */</span>   333,  500,  313,  291,  333,  375,  424,  333,
-<a name="l01559"></a>01559         <span class="comment">/* 184 */</span>   333,  424,  424,  375,  500,  380,  500,  500,
-<a name="l01560"></a>01560         <span class="comment">/* 192 */</span>   668,  778,  778,  778,  778,  611,  709,  709,
-<a name="l01561"></a>01561         <span class="comment">/* 200 */</span>   709,  611,  611,  611,  611,  337,  337,  774,
-<a name="l01562"></a>01562         <span class="comment">/* 208 */</span>   774,  831,  831,  786,  786,  786,  786,  606,
-<a name="l01563"></a>01563         <span class="comment">/* 216 */</span>   668,  778,  778,  778,  778,  667,  613,  556,
-<a name="l01564"></a>01564         <span class="comment">/* 224 */</span>   395,  500,  500,  500,  500,  291,  444,  444,
-<a name="l01565"></a>01565         <span class="comment">/* 232 */</span>   444,  479,  479,  479,  479,  287,  287,  671,
-<a name="l01566"></a>01566         <span class="comment">/* 240 */</span>   611,  582,  582,  546,  546,  546,  546,  606,
-<a name="l01567"></a>01567         <span class="comment">/* 248 */</span>   395,  603,  603,  603,  603,  556,  326,  250,
-<a name="l01568"></a>01568         },
-<a name="l01569"></a>01569         {       <span class="comment">/* Palatino-Bold */</span>
-<a name="l01570"></a>01570         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01571"></a>01571         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01572"></a>01572         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01573"></a>01573         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01574"></a>01574         <span class="comment">/*  32 */</span>   250,  278,  402,  500,  500,  889,  833,  227,
-<a name="l01575"></a>01575         <span class="comment">/*  40 */</span>   333,  333,  444,  606,  250,  333,  250,  296,
-<a name="l01576"></a>01576         <span class="comment">/*  48 */</span>   500,  500,  500,  500,  500,  500,  500,  500,
-<a name="l01577"></a>01577         <span class="comment">/*  56 */</span>   500,  500,  250,  250,  606,  606,  606,  444,
-<a name="l01578"></a>01578         <span class="comment">/*  64 */</span>   747,  778,  667,  722,  833,  611,  556,  833,
-<a name="l01579"></a>01579         <span class="comment">/*  72 */</span>   833,  389,  389,  778,  611, 1000,  833,  833,
-<a name="l01580"></a>01580         <span class="comment">/*  80 */</span>   611,  833,  722,  611,  667,  778,  778, 1000,
-<a name="l01581"></a>01581         <span class="comment">/*  88 */</span>   667,  667,  667,  333,  606,  333,  606,  500,
-<a name="l01582"></a>01582         <span class="comment">/*  96 */</span>   333,  500,  611,  444,  611,  500,  389,  556,
-<a name="l01583"></a>01583         <span class="comment">/* 104 */</span>   611,  333,  333,  611,  333,  889,  611,  556,
-<a name="l01584"></a>01584         <span class="comment">/* 112 */</span>   611,  611,  389,  444,  333,  611,  556,  833,
-<a name="l01585"></a>01585         <span class="comment">/* 120 */</span>   500,  556,  500,  310,  606,  310,  606,    0,
-<a name="l01586"></a>01586         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01587"></a>01587         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01588"></a>01588         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01589"></a>01589         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01590"></a>01590         <span class="comment">/* 160 */</span>   250,  778,  333,  611,  500,  611,  611,  500,
-<a name="l01591"></a>01591         <span class="comment">/* 168 */</span>   333,  611,  611,  667,  667,  333,  667,  667,
-<a name="l01592"></a>01592         <span class="comment">/* 176 */</span>   333,  500,  333,  333,  333,  433,  444,  333,
-<a name="l01593"></a>01593         <span class="comment">/* 184 */</span>   333,  444,  444,  402,  500,  333,  500,  500,
-<a name="l01594"></a>01594         <span class="comment">/* 192 */</span>   722,  778,  778,  778,  778,  611,  722,  722,
-<a name="l01595"></a>01595         <span class="comment">/* 200 */</span>   722,  611,  611,  611,  611,  389,  389,  833,
-<a name="l01596"></a>01596         <span class="comment">/* 208 */</span>   833,  833,  833,  833,  833,  833,  833,  606,
-<a name="l01597"></a>01597         <span class="comment">/* 216 */</span>   722,  778,  778,  778,  778,  667,  667,  611,
-<a name="l01598"></a>01598         <span class="comment">/* 224 */</span>   389,  500,  500,  500,  500,  333,  444,  444,
-<a name="l01599"></a>01599         <span class="comment">/* 232 */</span>   444,  500,  500,  500,  500,  333,  333,  711,
-<a name="l01600"></a>01600         <span class="comment">/* 240 */</span>   611,  611,  611,  556,  556,  556,  556,  606,
-<a name="l01601"></a>01601         <span class="comment">/* 248 */</span>   389,  611,  611,  611,  611,  556,  333,  333,
-<a name="l01602"></a>01602         },
-<a name="l01603"></a>01603         {       <span class="comment">/* Palatino-Italic */</span>
-<a name="l01604"></a>01604         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01605"></a>01605         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01606"></a>01606         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01607"></a>01607         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01608"></a>01608         <span class="comment">/*  32 */</span>   250,  333,  500,  500,  500,  889,  778,  333,
-<a name="l01609"></a>01609         <span class="comment">/*  40 */</span>   333,  333,  389,  606,  250,  333,  250,  296,
-<a name="l01610"></a>01610         <span class="comment">/*  48 */</span>   500,  500,  500,  500,  500,  500,  500,  500,
-<a name="l01611"></a>01611         <span class="comment">/*  56 */</span>   500,  500,  250,  250,  606,  606,  606,  500,
-<a name="l01612"></a>01612         <span class="comment">/*  64 */</span>   747,  722,  611,  667,  778,  611,  556,  722,
-<a name="l01613"></a>01613         <span class="comment">/*  72 */</span>   778,  333,  333,  667,  556,  944,  778,  778,
-<a name="l01614"></a>01614         <span class="comment">/*  80 */</span>   611,  778,  667,  556,  611,  778,  722,  944,
-<a name="l01615"></a>01615         <span class="comment">/*  88 */</span>   722,  667,  667,  333,  606,  333,  606,  500,
-<a name="l01616"></a>01616         <span class="comment">/*  96 */</span>   333,  444,  463,  407,  500,  389,  278,  500,
-<a name="l01617"></a>01617         <span class="comment">/* 104 */</span>   500,  278,  278,  444,  278,  778,  556,  444,
-<a name="l01618"></a>01618         <span class="comment">/* 112 */</span>   500,  463,  389,  389,  333,  556,  500,  722,
-<a name="l01619"></a>01619         <span class="comment">/* 120 */</span>   500,  500,  444,  333,  606,  333,  606,    0,
-<a name="l01620"></a>01620         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01621"></a>01621         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01622"></a>01622         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01623"></a>01623         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01624"></a>01624         <span class="comment">/* 160 */</span>   250,  722,  333,  556,  500,  556,  556,  500,
-<a name="l01625"></a>01625         <span class="comment">/* 168 */</span>   333,  556,  556,  611,  667,  333,  667,  667,
-<a name="l01626"></a>01626         <span class="comment">/* 176 */</span>   333,  444,  333,  278,  333,  346,  389,  333,
-<a name="l01627"></a>01627         <span class="comment">/* 184 */</span>   333,  389,  389,  361,  444,  333,  444,  444,
-<a name="l01628"></a>01628         <span class="comment">/* 192 */</span>   667,  722,  722,  722,  722,  556,  667,  667,
-<a name="l01629"></a>01629         <span class="comment">/* 200 */</span>   667,  611,  611,  611,  611,  333,  333,  778,
-<a name="l01630"></a>01630         <span class="comment">/* 208 */</span>   778,  778,  778,  778,  778,  778,  778,  606,
-<a name="l01631"></a>01631         <span class="comment">/* 216 */</span>   667,  778,  778,  778,  778,  667,  611,  500,
-<a name="l01632"></a>01632         <span class="comment">/* 224 */</span>   389,  444,  444,  444,  444,  278,  407,  407,
-<a name="l01633"></a>01633         <span class="comment">/* 232 */</span>   407,  389,  389,  389,  389,  278,  278,  577,
-<a name="l01634"></a>01634         <span class="comment">/* 240 */</span>   500,  556,  556,  444,  444,  444,  444,  606,
-<a name="l01635"></a>01635         <span class="comment">/* 248 */</span>   389,  556,  556,  556,  556,  500,  333,  333,
-<a name="l01636"></a>01636         },
-<a name="l01637"></a>01637         {       <span class="comment">/* Palatino-BoldItalic */</span>
-<a name="l01638"></a>01638         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01639"></a>01639         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01640"></a>01640         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01641"></a>01641         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01642"></a>01642         <span class="comment">/*  32 */</span>   250,  333,  500,  500,  500,  889,  833,  250,
-<a name="l01643"></a>01643         <span class="comment">/*  40 */</span>   333,  333,  444,  606,  250,  389,  250,  315,
-<a name="l01644"></a>01644         <span class="comment">/*  48 */</span>   500,  500,  500,  500,  500,  500,  500,  500,
-<a name="l01645"></a>01645         <span class="comment">/*  56 */</span>   500,  500,  250,  250,  606,  606,  606,  444,
-<a name="l01646"></a>01646         <span class="comment">/*  64 */</span>   833,  722,  667,  685,  778,  611,  556,  778,
-<a name="l01647"></a>01647         <span class="comment">/*  72 */</span>   778,  389,  389,  722,  611,  944,  778,  833,
-<a name="l01648"></a>01648         <span class="comment">/*  80 */</span>   667,  833,  722,  556,  611,  778,  667, 1000,
-<a name="l01649"></a>01649         <span class="comment">/*  88 */</span>   722,  611,  667,  333,  606,  333,  606,  500,
-<a name="l01650"></a>01650         <span class="comment">/*  96 */</span>   333,  556,  537,  444,  556,  444,  333,  500,
-<a name="l01651"></a>01651         <span class="comment">/* 104 */</span>   556,  333,  333,  556,  333,  833,  556,  556,
-<a name="l01652"></a>01652         <span class="comment">/* 112 */</span>   556,  537,  389,  444,  389,  556,  556,  833,
-<a name="l01653"></a>01653         <span class="comment">/* 120 */</span>   500,  556,  500,  333,  606,  333,  606,    0,
-<a name="l01654"></a>01654         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01655"></a>01655         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01656"></a>01656         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01657"></a>01657         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01658"></a>01658         <span class="comment">/* 160 */</span>   250,  722,  333,  611,  500,  611,  556,  556,
-<a name="l01659"></a>01659         <span class="comment">/* 168 */</span>   333,  556,  556,  611,  667,  389,  667,  667,
-<a name="l01660"></a>01660         <span class="comment">/* 176 */</span>   556,  556,  333,  333,  333,  429,  444,  333,
-<a name="l01661"></a>01661         <span class="comment">/* 184 */</span>   333,  444,  444,  389,  500,  333,  500,  500,
-<a name="l01662"></a>01662         <span class="comment">/* 192 */</span>   722,  722,  722,  722,  722,  611,  685,  685,
-<a name="l01663"></a>01663         <span class="comment">/* 200 */</span>   685,  611,  611,  611,  611,  389,  389,  778,
-<a name="l01664"></a>01664         <span class="comment">/* 208 */</span>   778,  778,  778,  833,  833,  833,  833,  606,
-<a name="l01665"></a>01665         <span class="comment">/* 216 */</span>   722,  778,  778,  778,  778,  611,  611,  556,
-<a name="l01666"></a>01666         <span class="comment">/* 224 */</span>   389,  556,  556,  556,  556,  333,  444,  444,
-<a name="l01667"></a>01667         <span class="comment">/* 232 */</span>   444,  444,  444,  444,  444,  333,  333,  667,
-<a name="l01668"></a>01668         <span class="comment">/* 240 */</span>   556,  556,  556,  556,  556,  556,  556,  606,
-<a name="l01669"></a>01669         <span class="comment">/* 248 */</span>   389,  556,  556,  556,  556,  556,  389,  333,
-<a name="l01670"></a>01670         },
-<a name="l01671"></a>01671         {       <span class="comment">/* Helvetica-Narrow */</span>
-<a name="l01672"></a>01672         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01673"></a>01673         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01674"></a>01674         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01675"></a>01675         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01676"></a>01676         <span class="comment">/*  32 */</span>   228,  228,  291,  456,  456,  729,  547,  157,
-<a name="l01677"></a>01677         <span class="comment">/*  40 */</span>   273,  273,  319,  479,  228,  273,  228,  228,
-<a name="l01678"></a>01678         <span class="comment">/*  48 */</span>   456,  456,  456,  456,  456,  456,  456,  456,
-<a name="l01679"></a>01679         <span class="comment">/*  56 */</span>   456,  456,  228,  228,  479,  479,  479,  456,
-<a name="l01680"></a>01680         <span class="comment">/*  64 */</span>   832,  547,  547,  592,  592,  547,  501,  638,
-<a name="l01681"></a>01681         <span class="comment">/*  72 */</span>   592,  228,  410,  547,  456,  683,  592,  638,
-<a name="l01682"></a>01682         <span class="comment">/*  80 */</span>   547,  638,  592,  547,  501,  592,  547,  774,
-<a name="l01683"></a>01683         <span class="comment">/*  88 */</span>   547,  547,  501,  228,  228,  228,  385,  456,
-<a name="l01684"></a>01684         <span class="comment">/*  96 */</span>   273,  456,  456,  410,  456,  456,  228,  456,
-<a name="l01685"></a>01685         <span class="comment">/* 104 */</span>   456,  182,  182,  410,  182,  683,  456,  456,
-<a name="l01686"></a>01686         <span class="comment">/* 112 */</span>   456,  456,  273,  410,  228,  456,  410,  592,
-<a name="l01687"></a>01687         <span class="comment">/* 120 */</span>   410,  410,  410,  274,  213,  274,  479,    0,
-<a name="l01688"></a>01688         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01689"></a>01689         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01690"></a>01690         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01691"></a>01691         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01692"></a>01692         <span class="comment">/* 160 */</span>   228,  547,  273,  456,  456,  456,  547,  456,
-<a name="l01693"></a>01693         <span class="comment">/* 168 */</span>   273,  547,  547,  501,  501,  273,  501,  501,
-<a name="l01694"></a>01694         <span class="comment">/* 176 */</span>   273,  456,  273,  182,  273,  212,  410,  273,
-<a name="l01695"></a>01695         <span class="comment">/* 184 */</span>   273,  410,  410,  248,  410,  273,  410,  410,
-<a name="l01696"></a>01696         <span class="comment">/* 192 */</span>   592,  547,  547,  547,  547,  456,  592,  592,
-<a name="l01697"></a>01697         <span class="comment">/* 200 */</span>   592,  547,  547,  547,  547,  228,  228,  592,
-<a name="l01698"></a>01698         <span class="comment">/* 208 */</span>   592,  592,  592,  638,  638,  638,  638,  479,
-<a name="l01699"></a>01699         <span class="comment">/* 216 */</span>   592,  592,  592,  592,  592,  547,  501,  501,
-<a name="l01700"></a>01700         <span class="comment">/* 224 */</span>   273,  456,  456,  456,  456,  182,  410,  410,
-<a name="l01701"></a>01701         <span class="comment">/* 232 */</span>   410,  456,  456,  456,  456,  228,  228,  496,
-<a name="l01702"></a>01702         <span class="comment">/* 240 */</span>   456,  456,  456,  456,  456,  456,  456,  479,
-<a name="l01703"></a>01703         <span class="comment">/* 248 */</span>   273,  456,  456,  456,  456,  410,  228,  273,
-<a name="l01704"></a>01704         },
-<a name="l01705"></a>01705         {       <span class="comment">/* Helvetica-Narrow-Bold */</span>
-<a name="l01706"></a>01706         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01707"></a>01707         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01708"></a>01708         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01709"></a>01709         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01710"></a>01710         <span class="comment">/*  32 */</span>   228,  273,  389,  456,  456,  729,  592,  195,
-<a name="l01711"></a>01711         <span class="comment">/*  40 */</span>   273,  273,  319,  479,  228,  273,  228,  228,
-<a name="l01712"></a>01712         <span class="comment">/*  48 */</span>   456,  456,  456,  456,  456,  456,  456,  456,
-<a name="l01713"></a>01713         <span class="comment">/*  56 */</span>   456,  456,  273,  273,  479,  479,  479,  501,
-<a name="l01714"></a>01714         <span class="comment">/*  64 */</span>   800,  592,  592,  592,  592,  547,  501,  638,
-<a name="l01715"></a>01715         <span class="comment">/*  72 */</span>   592,  228,  456,  592,  501,  683,  592,  638,
-<a name="l01716"></a>01716         <span class="comment">/*  80 */</span>   547,  638,  592,  547,  501,  592,  547,  774,
-<a name="l01717"></a>01717         <span class="comment">/*  88 */</span>   547,  547,  501,  273,  228,  273,  479,  456,
-<a name="l01718"></a>01718         <span class="comment">/*  96 */</span>   273,  456,  501,  456,  501,  456,  273,  501,
-<a name="l01719"></a>01719         <span class="comment">/* 104 */</span>   501,  228,  228,  456,  228,  729,  501,  501,
-<a name="l01720"></a>01720         <span class="comment">/* 112 */</span>   501,  501,  319,  456,  273,  501,  456,  638,
-<a name="l01721"></a>01721         <span class="comment">/* 120 */</span>   456,  456,  410,  319,  230,  319,  479,    0,
-<a name="l01722"></a>01722         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01723"></a>01723         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01724"></a>01724         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01725"></a>01725         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01726"></a>01726         <span class="comment">/* 160 */</span>   228,  592,  273,  501,  456,  501,  547,  456,
-<a name="l01727"></a>01727         <span class="comment">/* 168 */</span>   273,  547,  547,  501,  501,  273,  501,  501,
-<a name="l01728"></a>01728         <span class="comment">/* 176 */</span>   273,  456,  273,  228,  273,  280,  456,  273,
-<a name="l01729"></a>01729         <span class="comment">/* 184 */</span>   273,  456,  456,  338,  410,  273,  410,  410,
-<a name="l01730"></a>01730         <span class="comment">/* 192 */</span>   592,  592,  592,  592,  592,  501,  592,  592,
-<a name="l01731"></a>01731         <span class="comment">/* 200 */</span>   592,  547,  547,  547,  547,  228,  228,  592,
-<a name="l01732"></a>01732         <span class="comment">/* 208 */</span>   592,  592,  592,  638,  638,  638,  638,  479,
-<a name="l01733"></a>01733         <span class="comment">/* 216 */</span>   592,  592,  592,  592,  592,  547,  501,  501,
-<a name="l01734"></a>01734         <span class="comment">/* 224 */</span>   319,  456,  456,  456,  456,  228,  456,  456,
-<a name="l01735"></a>01735         <span class="comment">/* 232 */</span>   456,  456,  456,  456,  456,  228,  228,  561,
-<a name="l01736"></a>01736         <span class="comment">/* 240 */</span>   501,  501,  501,  501,  501,  501,  501,  479,
-<a name="l01737"></a>01737         <span class="comment">/* 248 */</span>   319,  501,  501,  501,  501,  456,  273,  273,
-<a name="l01738"></a>01738         },
-<a name="l01739"></a>01739         {       <span class="comment">/* Helvetica-Narrow-Oblique */</span>
-<a name="l01740"></a>01740         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01741"></a>01741         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01742"></a>01742         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01743"></a>01743         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01744"></a>01744         <span class="comment">/*  32 */</span>   228,  228,  291,  456,  456,  729,  547,  157,
-<a name="l01745"></a>01745         <span class="comment">/*  40 */</span>   273,  273,  319,  479,  228,  273,  228,  228,
-<a name="l01746"></a>01746         <span class="comment">/*  48 */</span>   456,  456,  456,  456,  456,  456,  456,  456,
-<a name="l01747"></a>01747         <span class="comment">/*  56 */</span>   456,  456,  228,  228,  479,  479,  479,  456,
-<a name="l01748"></a>01748         <span class="comment">/*  64 */</span>   832,  547,  547,  592,  592,  547,  501,  638,
-<a name="l01749"></a>01749         <span class="comment">/*  72 */</span>   592,  228,  410,  547,  456,  683,  592,  638,
-<a name="l01750"></a>01750         <span class="comment">/*  80 */</span>   547,  638,  592,  547,  501,  592,  547,  774,
-<a name="l01751"></a>01751         <span class="comment">/*  88 */</span>   547,  547,  501,  228,  228,  228,  385,  456,
-<a name="l01752"></a>01752         <span class="comment">/*  96 */</span>   273,  456,  456,  410,  456,  456,  228,  456,
-<a name="l01753"></a>01753         <span class="comment">/* 104 */</span>   456,  182,  182,  410,  182,  683,  456,  456,
-<a name="l01754"></a>01754         <span class="comment">/* 112 */</span>   456,  456,  273,  410,  228,  456,  410,  592,
-<a name="l01755"></a>01755         <span class="comment">/* 120 */</span>   410,  410,  410,  274,  213,  274,  479,    0,
-<a name="l01756"></a>01756         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01757"></a>01757         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01758"></a>01758         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01759"></a>01759         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01760"></a>01760         <span class="comment">/* 160 */</span>   228,  547,  273,  456,  456,  456,  547,  456,
-<a name="l01761"></a>01761         <span class="comment">/* 168 */</span>   273,  547,  547,  501,  501,  273,  501,  501,
-<a name="l01762"></a>01762         <span class="comment">/* 176 */</span>   273,  456,  273,  182,  273,  217,  410,  273,
-<a name="l01763"></a>01763         <span class="comment">/* 184 */</span>   273,  410,  410,  254,  410,  273,  410,  410,
-<a name="l01764"></a>01764         <span class="comment">/* 192 */</span>   592,  547,  547,  547,  547,  456,  592,  592,
-<a name="l01765"></a>01765         <span class="comment">/* 200 */</span>   592,  547,  547,  547,  547,  228,  228,  592,
-<a name="l01766"></a>01766         <span class="comment">/* 208 */</span>   592,  592,  592,  638,  638,  638,  638,  479,
-<a name="l01767"></a>01767         <span class="comment">/* 216 */</span>   592,  592,  592,  592,  592,  547,  501,  501,
-<a name="l01768"></a>01768         <span class="comment">/* 224 */</span>   273,  456,  456,  456,  456,  182,  410,  410,
-<a name="l01769"></a>01769         <span class="comment">/* 232 */</span>   410,  456,  456,  456,  456,  228,  228,  503,
-<a name="l01770"></a>01770         <span class="comment">/* 240 */</span>   456,  456,  456,  456,  456,  456,  456,  479,
-<a name="l01771"></a>01771         <span class="comment">/* 248 */</span>   273,  456,  456,  456,  456,  410,  228,  273,
-<a name="l01772"></a>01772         },
-<a name="l01773"></a>01773         {       <span class="comment">/* Helvetica-Narrow-BoldOblique */</span>
-<a name="l01774"></a>01774         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01775"></a>01775         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01776"></a>01776         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01777"></a>01777         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01778"></a>01778         <span class="comment">/*  32 */</span>   228,  273,  389,  456,  456,  729,  592,  195,
-<a name="l01779"></a>01779         <span class="comment">/*  40 */</span>   273,  273,  319,  479,  228,  273,  228,  228,
-<a name="l01780"></a>01780         <span class="comment">/*  48 */</span>   456,  456,  456,  456,  456,  456,  456,  456,
-<a name="l01781"></a>01781         <span class="comment">/*  56 */</span>   456,  456,  273,  273,  479,  479,  479,  501,
-<a name="l01782"></a>01782         <span class="comment">/*  64 */</span>   800,  592,  592,  592,  592,  547,  501,  638,
-<a name="l01783"></a>01783         <span class="comment">/*  72 */</span>   592,  228,  456,  592,  501,  683,  592,  638,
-<a name="l01784"></a>01784         <span class="comment">/*  80 */</span>   547,  638,  592,  547,  501,  592,  547,  774,
-<a name="l01785"></a>01785         <span class="comment">/*  88 */</span>   547,  547,  501,  273,  228,  273,  479,  456,
-<a name="l01786"></a>01786         <span class="comment">/*  96 */</span>   273,  456,  501,  456,  501,  456,  273,  501,
-<a name="l01787"></a>01787         <span class="comment">/* 104 */</span>   501,  228,  228,  456,  228,  729,  501,  501,
-<a name="l01788"></a>01788         <span class="comment">/* 112 */</span>   501,  501,  319,  456,  273,  501,  456,  638,
-<a name="l01789"></a>01789         <span class="comment">/* 120 */</span>   456,  456,  410,  319,  230,  319,  479,    0,
-<a name="l01790"></a>01790         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01791"></a>01791         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01792"></a>01792         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01793"></a>01793         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01794"></a>01794         <span class="comment">/* 160 */</span>   228,  592,  273,  501,  456,  501,  547,  456,
-<a name="l01795"></a>01795         <span class="comment">/* 168 */</span>   273,  547,  547,  501,  501,  273,  501,  501,
-<a name="l01796"></a>01796         <span class="comment">/* 176 */</span>   273,  456,  273,  228,  273,  283,  456,  273,
-<a name="l01797"></a>01797         <span class="comment">/* 184 */</span>   273,  456,  456,  312,  410,  273,  410,  410,
-<a name="l01798"></a>01798         <span class="comment">/* 192 */</span>   592,  592,  592,  592,  592,  501,  592,  592,
-<a name="l01799"></a>01799         <span class="comment">/* 200 */</span>   592,  547,  547,  547,  547,  228,  228,  592,
-<a name="l01800"></a>01800         <span class="comment">/* 208 */</span>   592,  592,  592,  638,  638,  638,  638,  479,
-<a name="l01801"></a>01801         <span class="comment">/* 216 */</span>   592,  592,  592,  592,  592,  547,  501,  501,
-<a name="l01802"></a>01802         <span class="comment">/* 224 */</span>   319,  456,  456,  456,  456,  228,  456,  456,
-<a name="l01803"></a>01803         <span class="comment">/* 232 */</span>   456,  456,  456,  456,  456,  228,  228,  561,
-<a name="l01804"></a>01804         <span class="comment">/* 240 */</span>   501,  501,  501,  501,  501,  501,  501,  479,
-<a name="l01805"></a>01805         <span class="comment">/* 248 */</span>   319,  501,  501,  501,  501,  456,  273,  273,
-<a name="l01806"></a>01806         },
-<a name="l01807"></a>01807         {       <span class="comment">/* Bookman-Light */</span>
-<a name="l01808"></a>01808         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01809"></a>01809         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01810"></a>01810         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01811"></a>01811         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01812"></a>01812         <span class="comment">/*  32 */</span>   320,  300,  380,  620,  620,  900,  800,  220,
-<a name="l01813"></a>01813         <span class="comment">/*  40 */</span>   300,  300,  440,  600,  320,  400,  320,  600,
-<a name="l01814"></a>01814         <span class="comment">/*  48 */</span>   620,  620,  620,  620,  620,  620,  620,  620,
-<a name="l01815"></a>01815         <span class="comment">/*  56 */</span>   620,  620,  320,  320,  600,  600,  600,  540,
-<a name="l01816"></a>01816         <span class="comment">/*  64 */</span>   820,  680,  740,  740,  800,  720,  640,  800,
-<a name="l01817"></a>01817         <span class="comment">/*  72 */</span>   800,  340,  600,  720,  600,  920,  740,  800,
-<a name="l01818"></a>01818         <span class="comment">/*  80 */</span>   620,  820,  720,  660,  620,  780,  700,  960,
-<a name="l01819"></a>01819         <span class="comment">/*  88 */</span>   720,  640,  640,  300,  600,  300,  600,  500,
-<a name="l01820"></a>01820         <span class="comment">/*  96 */</span>   340,  580,  620,  520,  620,  520,  320,  540,
-<a name="l01821"></a>01821         <span class="comment">/* 104 */</span>   660,  300,  300,  620,  300,  940,  660,  560,
-<a name="l01822"></a>01822         <span class="comment">/* 112 */</span>   620,  580,  440,  520,  380,  680,  520,  780,
-<a name="l01823"></a>01823         <span class="comment">/* 120 */</span>   560,  540,  480,  280,  600,  280,  600,    0,
-<a name="l01824"></a>01824         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01825"></a>01825         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01826"></a>01826         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01827"></a>01827         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01828"></a>01828         <span class="comment">/* 160 */</span>   320,  680,  460,  600,  620,  600,  660,  520,
-<a name="l01829"></a>01829         <span class="comment">/* 168 */</span>   420,  660,  660,  620,  640,  400,  640,  640,
-<a name="l01830"></a>01830         <span class="comment">/* 176 */</span>   320,  580,  320,  320,  340,  336,  520,  420,
-<a name="l01831"></a>01831         <span class="comment">/* 184 */</span>   320,  520,  520,  380,  480,  380,  480,  480,
-<a name="l01832"></a>01832         <span class="comment">/* 192 */</span>   720,  680,  680,  680,  680,  600,  740,  740,
-<a name="l01833"></a>01833         <span class="comment">/* 200 */</span>   740,  720,  720,  720,  720,  340,  340,  800,
-<a name="l01834"></a>01834         <span class="comment">/* 208 */</span>   800,  740,  740,  800,  800,  800,  800,  600,
-<a name="l01835"></a>01835         <span class="comment">/* 216 */</span>   720,  780,  780,  780,  780,  640,  620,  660,
-<a name="l01836"></a>01836         <span class="comment">/* 224 */</span>   440,  580,  580,  580,  580,  300,  520,  520,
-<a name="l01837"></a>01837         <span class="comment">/* 232 */</span>   520,  520,  520,  520,  520,  300,  300,  620,
-<a name="l01838"></a>01838         <span class="comment">/* 240 */</span>   620,  660,  660,  560,  560,  560,  560,  600,
-<a name="l01839"></a>01839         <span class="comment">/* 248 */</span>   440,  680,  680,  680,  680,  540,  380,  260,
-<a name="l01840"></a>01840         },
-<a name="l01841"></a>01841         {       <span class="comment">/* Bookman-Demi */</span>
-<a name="l01842"></a>01842         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01843"></a>01843         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01844"></a>01844         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01845"></a>01845         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01846"></a>01846         <span class="comment">/*  32 */</span>   340,  360,  420,  660,  660,  940,  800,  240,
-<a name="l01847"></a>01847         <span class="comment">/*  40 */</span>   320,  320,  460,  600,  340,  360,  340,  600,
-<a name="l01848"></a>01848         <span class="comment">/*  48 */</span>   660,  660,  660,  660,  660,  660,  660,  660,
-<a name="l01849"></a>01849         <span class="comment">/*  56 */</span>   660,  660,  340,  340,  600,  600,  600,  660,
-<a name="l01850"></a>01850         <span class="comment">/*  64 */</span>   820,  720,  720,  740,  780,  720,  680,  780,
-<a name="l01851"></a>01851         <span class="comment">/*  72 */</span>   820,  400,  640,  800,  640,  940,  740,  800,
-<a name="l01852"></a>01852         <span class="comment">/*  80 */</span>   660,  800,  780,  660,  700,  740,  720,  940,
-<a name="l01853"></a>01853         <span class="comment">/*  88 */</span>   780,  700,  640,  300,  600,  300,  600,  500,
-<a name="l01854"></a>01854         <span class="comment">/*  96 */</span>   400,  580,  600,  580,  640,  580,  380,  580,
-<a name="l01855"></a>01855         <span class="comment">/* 104 */</span>   680,  360,  340,  660,  340, 1000,  680,  620,
-<a name="l01856"></a>01856         <span class="comment">/* 112 */</span>   640,  620,  460,  520,  460,  660,  600,  800,
-<a name="l01857"></a>01857         <span class="comment">/* 120 */</span>   600,  620,  560,  320,  600,  320,  600,    0,
-<a name="l01858"></a>01858         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01859"></a>01859         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01860"></a>01860         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01861"></a>01861         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01862"></a>01862         <span class="comment">/* 160 */</span>   340,  720,  500,  640,  660,  640,  660,  600,
-<a name="l01863"></a>01863         <span class="comment">/* 168 */</span>   500,  660,  660,  700,  640,  360,  640,  640,
-<a name="l01864"></a>01864         <span class="comment">/* 176 */</span>   340,  580,  320,  340,  400,  430,  520,  500,
-<a name="l01865"></a>01865         <span class="comment">/* 184 */</span>   360,  520,  520,  470,  560,  440,  560,  560,
-<a name="l01866"></a>01866         <span class="comment">/* 192 */</span>   780,  720,  720,  720,  720,  640,  740,  740,
-<a name="l01867"></a>01867         <span class="comment">/* 200 */</span>   740,  720,  720,  720,  720,  400,  400,  780,
-<a name="l01868"></a>01868         <span class="comment">/* 208 */</span>   780,  740,  740,  800,  800,  800,  800,  600,
-<a name="l01869"></a>01869         <span class="comment">/* 216 */</span>   780,  740,  740,  740,  740,  700,  700,  660,
-<a name="l01870"></a>01870         <span class="comment">/* 224 */</span>   460,  580,  580,  580,  580,  340,  580,  580,
-<a name="l01871"></a>01871         <span class="comment">/* 232 */</span>   580,  580,  580,  580,  580,  360,  360,  720,
-<a name="l01872"></a>01872         <span class="comment">/* 240 */</span>   640,  680,  680,  620,  620,  620,  620,  600,
-<a name="l01873"></a>01873         <span class="comment">/* 248 */</span>   460,  660,  660,  660,  660,  620,  460,  320,
-<a name="l01874"></a>01874         },
-<a name="l01875"></a>01875         {       <span class="comment">/* Bookman-LightItalic */</span>
-<a name="l01876"></a>01876         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01877"></a>01877         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01878"></a>01878         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01879"></a>01879         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01880"></a>01880         <span class="comment">/*  32 */</span>   300,  320,  360,  620,  620,  800,  820,  200,
-<a name="l01881"></a>01881         <span class="comment">/*  40 */</span>   280,  280,  440,  600,  300,  320,  300,  600,
-<a name="l01882"></a>01882         <span class="comment">/*  48 */</span>   620,  620,  620,  620,  620,  620,  620,  620,
-<a name="l01883"></a>01883         <span class="comment">/*  56 */</span>   620,  620,  300,  300,  600,  600,  600,  540,
-<a name="l01884"></a>01884         <span class="comment">/*  64 */</span>   780,  700,  720,  720,  740,  680,  620,  760,
-<a name="l01885"></a>01885         <span class="comment">/*  72 */</span>   800,  320,  560,  720,  580,  860,  720,  760,
-<a name="l01886"></a>01886         <span class="comment">/*  80 */</span>   600,  780,  700,  640,  600,  720,  680,  960,
-<a name="l01887"></a>01887         <span class="comment">/*  88 */</span>   700,  660,  580,  260,  600,  260,  600,  500,
-<a name="l01888"></a>01888         <span class="comment">/*  96 */</span>   340,  620,  600,  480,  640,  540,  340,  560,
-<a name="l01889"></a>01889         <span class="comment">/* 104 */</span>   620,  280,  280,  600,  280,  880,  620,  540,
-<a name="l01890"></a>01890         <span class="comment">/* 112 */</span>   600,  560,  400,  540,  340,  620,  540,  880,
-<a name="l01891"></a>01891         <span class="comment">/* 120 */</span>   540,  600,  520,  360,  600,  380,  600,    0,
-<a name="l01892"></a>01892         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01893"></a>01893         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01894"></a>01894         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01895"></a>01895         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01896"></a>01896         <span class="comment">/* 160 */</span>   300,  700,  440,  580,  620,  580,  640,  620,
-<a name="l01897"></a>01897         <span class="comment">/* 168 */</span>   420,  640,  640,  600,  580,  320,  580,  580,
-<a name="l01898"></a>01898         <span class="comment">/* 176 */</span>   300,  620,  260,  340,  320,  380,  540,  440,
-<a name="l01899"></a>01899         <span class="comment">/* 184 */</span>   320,  540,  540,  340,  520,  340,  520,  520,
-<a name="l01900"></a>01900         <span class="comment">/* 192 */</span>   700,  700,  700,  700,  700,  580,  720,  720,
-<a name="l01901"></a>01901         <span class="comment">/* 200 */</span>   720,  680,  680,  680,  680,  320,  320,  740,
-<a name="l01902"></a>01902         <span class="comment">/* 208 */</span>   740,  720,  720,  760,  760,  760,  760,  600,
-<a name="l01903"></a>01903         <span class="comment">/* 216 */</span>   700,  720,  720,  720,  720,  660,  600,  620,
-<a name="l01904"></a>01904         <span class="comment">/* 224 */</span>   400,  620,  620,  620,  620,  280,  480,  480,
-<a name="l01905"></a>01905         <span class="comment">/* 232 */</span>   480,  540,  540,  540,  540,  280,  280,  730,
-<a name="l01906"></a>01906         <span class="comment">/* 240 */</span>   640,  620,  620,  540,  540,  540,  540,  600,
-<a name="l01907"></a>01907         <span class="comment">/* 248 */</span>   400,  620,  620,  620,  620,  600,  340,  260,
-<a name="l01908"></a>01908         },
-<a name="l01909"></a>01909         {       <span class="comment">/* Bookman-DemiItalic */</span>
-<a name="l01910"></a>01910         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01911"></a>01911         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01912"></a>01912         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01913"></a>01913         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01914"></a>01914         <span class="comment">/*  32 */</span>   340,  320,  380,  680,  680,  880,  980,  180,
-<a name="l01915"></a>01915         <span class="comment">/*  40 */</span>   260,  260,  460,  600,  340,  280,  340,  360,
-<a name="l01916"></a>01916         <span class="comment">/*  48 */</span>   680,  680,  680,  680,  680,  680,  680,  680,
-<a name="l01917"></a>01917         <span class="comment">/*  56 */</span>   680,  680,  340,  340,  620,  600,  620,  620,
-<a name="l01918"></a>01918         <span class="comment">/*  64 */</span>   780,  720,  720,  700,  760,  720,  660,  760,
-<a name="l01919"></a>01919         <span class="comment">/*  72 */</span>   800,  380,  620,  780,  640,  860,  740,  760,
-<a name="l01920"></a>01920         <span class="comment">/*  80 */</span>   640,  760,  740,  700,  700,  740,  660, 1000,
-<a name="l01921"></a>01921         <span class="comment">/*  88 */</span>   740,  660,  680,  260,  580,  260,  620,  500,
-<a name="l01922"></a>01922         <span class="comment">/*  96 */</span>   380,  680,  600,  560,  680,  560,  420,  620,
-<a name="l01923"></a>01923         <span class="comment">/* 104 */</span>   700,  380,  320,  700,  380,  960,  680,  600,
-<a name="l01924"></a>01924         <span class="comment">/* 112 */</span>   660,  620,  500,  540,  440,  680,  540,  860,
-<a name="l01925"></a>01925         <span class="comment">/* 120 */</span>   620,  600,  560,  300,  620,  300,  620,    0,
-<a name="l01926"></a>01926         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01927"></a>01927         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01928"></a>01928         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01929"></a>01929         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01930"></a>01930         <span class="comment">/* 160 */</span>   340,  720,  460,  640,  680,  640,  700,  620,
-<a name="l01931"></a>01931         <span class="comment">/* 168 */</span>   520,  700,  700,  700,  680,  280,  680,  680,
-<a name="l01932"></a>01932         <span class="comment">/* 176 */</span>   360,  680,  320,  380,  340,  509,  540,  480,
-<a name="l01933"></a>01933         <span class="comment">/* 184 */</span>   360,  540,  540,  520,  560,  560,  560,  560,
-<a name="l01934"></a>01934         <span class="comment">/* 192 */</span>   740,  720,  720,  720,  720,  640,  700,  700,
-<a name="l01935"></a>01935         <span class="comment">/* 200 */</span>   700,  720,  720,  720,  720,  380,  380,  760,
-<a name="l01936"></a>01936         <span class="comment">/* 208 */</span>   760,  740,  740,  760,  760,  760,  760,  600,
-<a name="l01937"></a>01937         <span class="comment">/* 216 */</span>   740,  740,  740,  740,  740,  660,  700,  660,
-<a name="l01938"></a>01938         <span class="comment">/* 224 */</span>   500,  680,  680,  680,  680,  380,  560,  560,
-<a name="l01939"></a>01939         <span class="comment">/* 232 */</span>   560,  560,  560,  560,  560,  380,  380,  810,
-<a name="l01940"></a>01940         <span class="comment">/* 240 */</span>   680,  680,  680,  600,  600,  600,  600,  600,
-<a name="l01941"></a>01941         <span class="comment">/* 248 */</span>   500,  680,  680,  680,  680,  600,  440,  380,
-<a name="l01942"></a>01942         },
-<a name="l01943"></a>01943         {       <span class="comment">/* AvantGarde-Book */</span>
-<a name="l01944"></a>01944         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01945"></a>01945         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01946"></a>01946         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01947"></a>01947         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01948"></a>01948         <span class="comment">/*  32 */</span>   277,  295,  309,  554,  554,  775,  757,  198,
-<a name="l01949"></a>01949         <span class="comment">/*  40 */</span>   369,  369,  425,  606,  277,  332,  277,  437,
-<a name="l01950"></a>01950         <span class="comment">/*  48 */</span>   554,  554,  554,  554,  554,  554,  554,  554,
-<a name="l01951"></a>01951         <span class="comment">/*  56 */</span>   554,  554,  277,  277,  606,  606,  606,  591,
-<a name="l01952"></a>01952         <span class="comment">/*  64 */</span>   867,  740,  574,  813,  744,  536,  485,  872,
-<a name="l01953"></a>01953         <span class="comment">/*  72 */</span>   683,  226,  482,  591,  462,  919,  740,  869,
-<a name="l01954"></a>01954         <span class="comment">/*  80 */</span>   592,  871,  607,  498,  426,  655,  702,  960,
-<a name="l01955"></a>01955         <span class="comment">/*  88 */</span>   609,  592,  480,  351,  605,  351,  606,  500,
-<a name="l01956"></a>01956         <span class="comment">/*  96 */</span>   378,  683,  682,  647,  685,  650,  314,  673,
-<a name="l01957"></a>01957         <span class="comment">/* 104 */</span>   610,  200,  203,  502,  200,  938,  610,  655,
-<a name="l01958"></a>01958         <span class="comment">/* 112 */</span>   682,  682,  301,  388,  339,  608,  554,  831,
-<a name="l01959"></a>01959         <span class="comment">/* 120 */</span>   480,  536,  425,  351,  672,  351,  606,    0,
-<a name="l01960"></a>01960         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01961"></a>01961         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01962"></a>01962         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01963"></a>01963         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01964"></a>01964         <span class="comment">/* 160 */</span>   277,  740,  453,  517,  554,  462,  498,  615,
-<a name="l01965"></a>01965         <span class="comment">/* 168 */</span>   369,  498,  498,  426,  480,  332,  480,  480,
-<a name="l01966"></a>01966         <span class="comment">/* 176 */</span>   332,  683,  302,  300,  375,  245,  388,  502,
-<a name="l01967"></a>01967         <span class="comment">/* 184 */</span>   324,  388,  388,  339,  425,  552,  425,  425,
-<a name="l01968"></a>01968         <span class="comment">/* 192 */</span>   607,  740,  740,  740,  740,  462,  813,  813,
-<a name="l01969"></a>01969         <span class="comment">/* 200 */</span>   813,  536,  536,  536,  536,  226,  226,  744,
-<a name="l01970"></a>01970         <span class="comment">/* 208 */</span>   790,  740,  740,  869,  869,  869,  869,  606,
-<a name="l01971"></a>01971         <span class="comment">/* 216 */</span>   607,  655,  655,  655,  655,  592,  426,  554,
-<a name="l01972"></a>01972         <span class="comment">/* 224 */</span>   301,  683,  683,  683,  683,  200,  647,  647,
-<a name="l01973"></a>01973         <span class="comment">/* 232 */</span>   647,  650,  650,  650,  650,  200,  200,  725,
-<a name="l01974"></a>01974         <span class="comment">/* 240 */</span>   685,  610,  610,  655,  655,  655,  655,  606,
-<a name="l01975"></a>01975         <span class="comment">/* 248 */</span>   301,  608,  608,  608,  608,  536,  339,  222,
-<a name="l01976"></a>01976         },
-<a name="l01977"></a>01977         {       <span class="comment">/* AvantGarde-Demi */</span>
-<a name="l01978"></a>01978         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01979"></a>01979         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01980"></a>01980         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01981"></a>01981         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01982"></a>01982         <span class="comment">/*  32 */</span>   280,  280,  360,  560,  560,  860,  680,  220,
-<a name="l01983"></a>01983         <span class="comment">/*  40 */</span>   380,  380,  440,  600,  280,  420,  280,  460,
-<a name="l01984"></a>01984         <span class="comment">/*  48 */</span>   560,  560,  560,  560,  560,  560,  560,  560,
-<a name="l01985"></a>01985         <span class="comment">/*  56 */</span>   560,  560,  280,  280,  600,  600,  600,  560,
-<a name="l01986"></a>01986         <span class="comment">/*  64 */</span>   740,  740,  580,  780,  700,  520,  480,  840,
-<a name="l01987"></a>01987         <span class="comment">/*  72 */</span>   680,  280,  480,  620,  440,  900,  740,  840,
-<a name="l01988"></a>01988         <span class="comment">/*  80 */</span>   560,  840,  580,  520,  420,  640,  700,  900,
-<a name="l01989"></a>01989         <span class="comment">/*  88 */</span>   680,  620,  500,  320,  640,  320,  600,  500,
-<a name="l01990"></a>01990         <span class="comment">/*  96 */</span>   420,  660,  660,  640,  660,  640,  280,  660,
-<a name="l01991"></a>01991         <span class="comment">/* 104 */</span>   600,  240,  260,  580,  240,  940,  600,  640,
-<a name="l01992"></a>01992         <span class="comment">/* 112 */</span>   660,  660,  320,  440,  300,  600,  560,  800,
-<a name="l01993"></a>01993         <span class="comment">/* 120 */</span>   560,  580,  460,  340,  600,  340,  600,    0,
-<a name="l01994"></a>01994         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01995"></a>01995         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01996"></a>01996         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01997"></a>01997         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l01998"></a>01998         <span class="comment">/* 160 */</span>   280,  740,  480,  480,  560,  440,  520,  560,
-<a name="l01999"></a>01999         <span class="comment">/* 168 */</span>   500,  520,  520,  420,  500,  420,  500,  500,
-<a name="l02000"></a>02000         <span class="comment">/* 176 */</span>   360,  660,  340,  320,  420,  330,  440,  540,
-<a name="l02001"></a>02001         <span class="comment">/* 184 */</span>   340,  440,  440,  369,  460,  700,  460,  460,
-<a name="l02002"></a>02002         <span class="comment">/* 192 */</span>   580,  740,  740,  740,  740,  440,  780,  780,
-<a name="l02003"></a>02003         <span class="comment">/* 200 */</span>   780,  520,  520,  520,  520,  280,  280,  700,
-<a name="l02004"></a>02004         <span class="comment">/* 208 */</span>   742,  740,  740,  840,  840,  840,  840,  600,
-<a name="l02005"></a>02005         <span class="comment">/* 216 */</span>   580,  640,  640,  640,  640,  620,  420,  600,
-<a name="l02006"></a>02006         <span class="comment">/* 224 */</span>   320,  660,  660,  660,  660,  240,  640,  640,
-<a name="l02007"></a>02007         <span class="comment">/* 232 */</span>   640,  640,  640,  640,  640,  240,  240,  754,
-<a name="l02008"></a>02008         <span class="comment">/* 240 */</span>   660,  600,  600,  640,  640,  640,  640,  600,
-<a name="l02009"></a>02009         <span class="comment">/* 248 */</span>   320,  600,  600,  600,  600,  580,  300,  280,
-<a name="l02010"></a>02010         },
-<a name="l02011"></a>02011         {       <span class="comment">/* AvantGarde-BookOblique */</span>
-<a name="l02012"></a>02012         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02013"></a>02013         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02014"></a>02014         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02015"></a>02015         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02016"></a>02016         <span class="comment">/*  32 */</span>   277,  295,  309,  554,  554,  775,  757,  198,
-<a name="l02017"></a>02017         <span class="comment">/*  40 */</span>   369,  369,  425,  606,  277,  332,  277,  437,
-<a name="l02018"></a>02018         <span class="comment">/*  48 */</span>   554,  554,  554,  554,  554,  554,  554,  554,
-<a name="l02019"></a>02019         <span class="comment">/*  56 */</span>   554,  554,  277,  277,  606,  606,  606,  591,
-<a name="l02020"></a>02020         <span class="comment">/*  64 */</span>   867,  740,  574,  813,  744,  536,  485,  872,
-<a name="l02021"></a>02021         <span class="comment">/*  72 */</span>   683,  226,  482,  591,  462,  919,  740,  869,
-<a name="l02022"></a>02022         <span class="comment">/*  80 */</span>   592,  871,  607,  498,  426,  655,  702,  960,
-<a name="l02023"></a>02023         <span class="comment">/*  88 */</span>   609,  592,  480,  351,  605,  351,  606,  500,
-<a name="l02024"></a>02024         <span class="comment">/*  96 */</span>   378,  683,  682,  647,  685,  650,  314,  673,
-<a name="l02025"></a>02025         <span class="comment">/* 104 */</span>   610,  200,  203,  502,  200,  938,  610,  655,
-<a name="l02026"></a>02026         <span class="comment">/* 112 */</span>   682,  682,  301,  388,  339,  608,  554,  831,
-<a name="l02027"></a>02027         <span class="comment">/* 120 */</span>   480,  536,  425,  351,  672,  351,  606,    0,
-<a name="l02028"></a>02028         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02029"></a>02029         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02030"></a>02030         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02031"></a>02031         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02032"></a>02032         <span class="comment">/* 160 */</span>   277,  740,  453,  517,  554,  462,  498,  615,
-<a name="l02033"></a>02033         <span class="comment">/* 168 */</span>   369,  498,  498,  426,  480,  332,  480,  480,
-<a name="l02034"></a>02034         <span class="comment">/* 176 */</span>   332,  683,  302,  300,  375,  231,  388,  502,
-<a name="l02035"></a>02035         <span class="comment">/* 184 */</span>   324,  388,  388,  339,  425,  552,  425,  425,
-<a name="l02036"></a>02036         <span class="comment">/* 192 */</span>   607,  740,  740,  740,  740,  462,  813,  813,
-<a name="l02037"></a>02037         <span class="comment">/* 200 */</span>   813,  536,  536,  536,  536,  226,  226,  744,
-<a name="l02038"></a>02038         <span class="comment">/* 208 */</span>   790,  740,  740,  869,  869,  869,  869,  606,
-<a name="l02039"></a>02039         <span class="comment">/* 216 */</span>   607,  655,  655,  655,  655,  592,  426,  554,
-<a name="l02040"></a>02040         <span class="comment">/* 224 */</span>   301,  683,  683,  683,  683,  200,  647,  647,
-<a name="l02041"></a>02041         <span class="comment">/* 232 */</span>   647,  650,  650,  650,  650,  200,  200,  714,
-<a name="l02042"></a>02042         <span class="comment">/* 240 */</span>   685,  610,  610,  655,  655,  655,  655,  606,
-<a name="l02043"></a>02043         <span class="comment">/* 248 */</span>   301,  608,  608,  608,  608,  536,  339,  222,
-<a name="l02044"></a>02044         },
-<a name="l02045"></a>02045         {       <span class="comment">/* AvantGarde-DemiOblique */</span>
-<a name="l02046"></a>02046         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02047"></a>02047         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02048"></a>02048         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02049"></a>02049         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02050"></a>02050         <span class="comment">/*  32 */</span>   280,  280,  360,  560,  560,  860,  680,  220,
-<a name="l02051"></a>02051         <span class="comment">/*  40 */</span>   380,  380,  440,  600,  280,  420,  280,  460,
-<a name="l02052"></a>02052         <span class="comment">/*  48 */</span>   560,  560,  560,  560,  560,  560,  560,  560,
-<a name="l02053"></a>02053         <span class="comment">/*  56 */</span>   560,  560,  280,  280,  600,  600,  600,  560,
-<a name="l02054"></a>02054         <span class="comment">/*  64 */</span>   740,  740,  580,  780,  700,  520,  480,  840,
-<a name="l02055"></a>02055         <span class="comment">/*  72 */</span>   680,  280,  480,  620,  440,  900,  740,  840,
-<a name="l02056"></a>02056         <span class="comment">/*  80 */</span>   560,  840,  580,  520,  420,  640,  700,  900,
-<a name="l02057"></a>02057         <span class="comment">/*  88 */</span>   680,  620,  500,  320,  640,  320,  600,  500,
-<a name="l02058"></a>02058         <span class="comment">/*  96 */</span>   420,  660,  660,  640,  660,  640,  280,  660,
-<a name="l02059"></a>02059         <span class="comment">/* 104 */</span>   600,  240,  260,  580,  240,  940,  600,  640,
-<a name="l02060"></a>02060         <span class="comment">/* 112 */</span>   660,  660,  320,  440,  300,  600,  560,  800,
-<a name="l02061"></a>02061         <span class="comment">/* 120 */</span>   560,  580,  460,  340,  600,  340,  600,    0,
-<a name="l02062"></a>02062         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02063"></a>02063         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02064"></a>02064         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02065"></a>02065         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02066"></a>02066         <span class="comment">/* 160 */</span>   280,  740,  480,  480,  560,  440,  520,  560,
-<a name="l02067"></a>02067         <span class="comment">/* 168 */</span>   500,  520,  520,  420,  500,  420,  500,  500,
-<a name="l02068"></a>02068         <span class="comment">/* 176 */</span>   360,  660,  340,  320,  420,  326,  440,  540,
-<a name="l02069"></a>02069         <span class="comment">/* 184 */</span>   340,  440,  440,  364,  460,  700,  460,  460,
-<a name="l02070"></a>02070         <span class="comment">/* 192 */</span>   580,  740,  740,  740,  740,  440,  780,  780,
-<a name="l02071"></a>02071         <span class="comment">/* 200 */</span>   780,  520,  520,  520,  520,  280,  280,  700,
-<a name="l02072"></a>02072         <span class="comment">/* 208 */</span>   742,  740,  740,  840,  840,  840,  840,  600,
-<a name="l02073"></a>02073         <span class="comment">/* 216 */</span>   580,  640,  640,  640,  640,  620,  420,  600,
-<a name="l02074"></a>02074         <span class="comment">/* 224 */</span>   320,  660,  660,  660,  660,  240,  640,  640,
-<a name="l02075"></a>02075         <span class="comment">/* 232 */</span>   640,  640,  640,  640,  640,  240,  240,  752,
-<a name="l02076"></a>02076         <span class="comment">/* 240 */</span>   660,  600,  600,  640,  640,  640,  640,  600,
-<a name="l02077"></a>02077         <span class="comment">/* 248 */</span>   320,  600,  600,  600,  600,  580,  300,  280,
-<a name="l02078"></a>02078         },
-<a name="l02079"></a>02079         {       <span class="comment">/* NewCenturySchlbk-Roman */</span>
-<a name="l02080"></a>02080         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02081"></a>02081         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02082"></a>02082         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02083"></a>02083         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02084"></a>02084         <span class="comment">/*  32 */</span>   278,  296,  389,  556,  556,  833,  815,  204,
-<a name="l02085"></a>02085         <span class="comment">/*  40 */</span>   333,  333,  500,  606,  278,  333,  278,  278,
-<a name="l02086"></a>02086         <span class="comment">/*  48 */</span>   556,  556,  556,  556,  556,  556,  556,  556,
-<a name="l02087"></a>02087         <span class="comment">/*  56 */</span>   556,  556,  278,  278,  606,  606,  606,  444,
-<a name="l02088"></a>02088         <span class="comment">/*  64 */</span>   737,  722,  722,  722,  778,  722,  667,  778,
-<a name="l02089"></a>02089         <span class="comment">/*  72 */</span>   833,  407,  556,  778,  667,  944,  815,  778,
-<a name="l02090"></a>02090         <span class="comment">/*  80 */</span>   667,  778,  722,  630,  667,  815,  722,  981,
-<a name="l02091"></a>02091         <span class="comment">/*  88 */</span>   704,  704,  611,  333,  606,  333,  606,  500,
-<a name="l02092"></a>02092         <span class="comment">/*  96 */</span>   333,  556,  556,  444,  574,  500,  333,  537,
-<a name="l02093"></a>02093         <span class="comment">/* 104 */</span>   611,  315,  296,  593,  315,  889,  611,  500,
-<a name="l02094"></a>02094         <span class="comment">/* 112 */</span>   574,  556,  444,  463,  389,  611,  537,  778,
-<a name="l02095"></a>02095         <span class="comment">/* 120 */</span>   537,  537,  481,  333,  606,  333,  606,    0,
-<a name="l02096"></a>02096         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02097"></a>02097         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02098"></a>02098         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02099"></a>02099         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02100"></a>02100         <span class="comment">/* 160 */</span>   278,  722,  333,  667,  556,  667,  630,  500,
-<a name="l02101"></a>02101         <span class="comment">/* 168 */</span>   333,  630,  630,  667,  611,  333,  611,  611,
-<a name="l02102"></a>02102         <span class="comment">/* 176 */</span>   333,  556,  333,  315,  333,  339,  463,  333,
-<a name="l02103"></a>02103         <span class="comment">/* 184 */</span>   333,  463,  463,  389,  481,  333,  481,  481,
-<a name="l02104"></a>02104         <span class="comment">/* 192 */</span>   722,  722,  722,  722,  722,  667,  722,  722,
-<a name="l02105"></a>02105         <span class="comment">/* 200 */</span>   722,  722,  722,  722,  722,  407,  407,  778,
-<a name="l02106"></a>02106         <span class="comment">/* 208 */</span>   778,  815,  815,  778,  778,  778,  778,  606,
-<a name="l02107"></a>02107         <span class="comment">/* 216 */</span>   722,  815,  815,  815,  815,  704,  667,  574,
-<a name="l02108"></a>02108         <span class="comment">/* 224 */</span>   444,  556,  556,  556,  556,  315,  444,  444,
-<a name="l02109"></a>02109         <span class="comment">/* 232 */</span>   444,  500,  500,  500,  500,  315,  315,  606,
-<a name="l02110"></a>02110         <span class="comment">/* 240 */</span>   574,  611,  611,  500,  500,  500,  500,  606,
-<a name="l02111"></a>02111         <span class="comment">/* 248 */</span>   444,  611,  611,  611,  611,  537,  389,  333,
-<a name="l02112"></a>02112         },
-<a name="l02113"></a>02113         {       <span class="comment">/* NewCenturySchlbk-Bold */</span>
-<a name="l02114"></a>02114         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02115"></a>02115         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02116"></a>02116         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02117"></a>02117         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02118"></a>02118         <span class="comment">/*  32 */</span>   287,  296,  333,  574,  574,  833,  852,  241,
-<a name="l02119"></a>02119         <span class="comment">/*  40 */</span>   389,  389,  500,  606,  278,  333,  278,  278,
-<a name="l02120"></a>02120         <span class="comment">/*  48 */</span>   574,  574,  574,  574,  574,  574,  574,  574,
-<a name="l02121"></a>02121         <span class="comment">/*  56 */</span>   574,  574,  278,  278,  606,  606,  606,  500,
-<a name="l02122"></a>02122         <span class="comment">/*  64 */</span>   747,  759,  778,  778,  833,  759,  722,  833,
-<a name="l02123"></a>02123         <span class="comment">/*  72 */</span>   870,  444,  648,  815,  722,  981,  833,  833,
-<a name="l02124"></a>02124         <span class="comment">/*  80 */</span>   759,  833,  815,  667,  722,  833,  759,  981,
-<a name="l02125"></a>02125         <span class="comment">/*  88 */</span>   722,  722,  667,  389,  606,  389,  606,  500,
-<a name="l02126"></a>02126         <span class="comment">/*  96 */</span>   333,  611,  648,  556,  667,  574,  389,  611,
-<a name="l02127"></a>02127         <span class="comment">/* 104 */</span>   685,  370,  352,  667,  352,  963,  685,  611,
-<a name="l02128"></a>02128         <span class="comment">/* 112 */</span>   667,  648,  519,  500,  426,  685,  611,  889,
-<a name="l02129"></a>02129         <span class="comment">/* 120 */</span>   611,  611,  537,  389,  606,  389,  606,    0,
-<a name="l02130"></a>02130         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02131"></a>02131         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02132"></a>02132         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02133"></a>02133         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02134"></a>02134         <span class="comment">/* 160 */</span>   287,  759,  333,  722,  574,  722,  667,  500,
-<a name="l02135"></a>02135         <span class="comment">/* 168 */</span>   333,  667,  667,  722,  667,  333,  667,  667,
-<a name="l02136"></a>02136         <span class="comment">/* 176 */</span>   333,  611,  333,  352,  333,  436,  500,  333,
-<a name="l02137"></a>02137         <span class="comment">/* 184 */</span>   333,  500,  500,  446,  537,  333,  537,  537,
-<a name="l02138"></a>02138         <span class="comment">/* 192 */</span>   815,  759,  759,  759,  759,  722,  778,  778,
-<a name="l02139"></a>02139         <span class="comment">/* 200 */</span>   778,  759,  759,  759,  759,  444,  444,  833,
-<a name="l02140"></a>02140         <span class="comment">/* 208 */</span>   833,  833,  833,  833,  833,  833,  833,  606,
-<a name="l02141"></a>02141         <span class="comment">/* 216 */</span>   815,  833,  833,  833,  833,  722,  722,  611,
-<a name="l02142"></a>02142         <span class="comment">/* 224 */</span>   519,  611,  611,  611,  611,  352,  556,  556,
-<a name="l02143"></a>02143         <span class="comment">/* 232 */</span>   556,  574,  574,  574,  574,  370,  370,  747,
-<a name="l02144"></a>02144         <span class="comment">/* 240 */</span>   667,  685,  685,  611,  611,  611,  611,  606,
-<a name="l02145"></a>02145         <span class="comment">/* 248 */</span>   519,  685,  685,  685,  685,  611,  426,  333,
-<a name="l02146"></a>02146         },
-<a name="l02147"></a>02147         {       <span class="comment">/* NewCenturySchlbk-Italic */</span>
-<a name="l02148"></a>02148         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02149"></a>02149         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02150"></a>02150         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02151"></a>02151         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02152"></a>02152         <span class="comment">/*  32 */</span>   278,  333,  400,  556,  556,  833,  852,  278,
-<a name="l02153"></a>02153         <span class="comment">/*  40 */</span>   333,  333,  500,  606,  278,  333,  278,  606,
-<a name="l02154"></a>02154         <span class="comment">/*  48 */</span>   556,  556,  556,  556,  556,  556,  556,  556,
-<a name="l02155"></a>02155         <span class="comment">/*  56 */</span>   556,  556,  278,  278,  606,  606,  606,  444,
-<a name="l02156"></a>02156         <span class="comment">/*  64 */</span>   747,  704,  722,  722,  778,  722,  667,  778,
-<a name="l02157"></a>02157         <span class="comment">/*  72 */</span>   833,  407,  611,  741,  667,  944,  815,  778,
-<a name="l02158"></a>02158         <span class="comment">/*  80 */</span>   667,  778,  741,  667,  685,  815,  704,  926,
-<a name="l02159"></a>02159         <span class="comment">/*  88 */</span>   704,  685,  667,  333,  606,  333,  606,  500,
-<a name="l02160"></a>02160         <span class="comment">/*  96 */</span>   333,  574,  556,  444,  611,  444,  333,  537,
-<a name="l02161"></a>02161         <span class="comment">/* 104 */</span>   611,  333,  315,  556,  333,  889,  611,  500,
-<a name="l02162"></a>02162         <span class="comment">/* 112 */</span>   574,  556,  444,  444,  352,  611,  519,  778,
-<a name="l02163"></a>02163         <span class="comment">/* 120 */</span>   500,  500,  463,  333,  606,  333,  606,    0,
-<a name="l02164"></a>02164         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02165"></a>02165         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02166"></a>02166         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02167"></a>02167         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02168"></a>02168         <span class="comment">/* 160 */</span>   278,  704,  333,  667,  556,  667,  667,  500,
-<a name="l02169"></a>02169         <span class="comment">/* 168 */</span>   333,  667,  667,  685,  667,  333,  667,  667,
-<a name="l02170"></a>02170         <span class="comment">/* 176 */</span>   333,  574,  333,  333,  333,  359,  444,  333,
-<a name="l02171"></a>02171         <span class="comment">/* 184 */</span>   333,  444,  444,  368,  463,  333,  463,  463,
-<a name="l02172"></a>02172         <span class="comment">/* 192 */</span>   741,  704,  704,  704,  704,  667,  722,  722,
-<a name="l02173"></a>02173         <span class="comment">/* 200 */</span>   722,  722,  722,  722,  722,  407,  407,  778,
-<a name="l02174"></a>02174         <span class="comment">/* 208 */</span>   778,  815,  815,  778,  778,  778,  778,  606,
-<a name="l02175"></a>02175         <span class="comment">/* 216 */</span>   741,  815,  815,  815,  815,  685,  685,  556,
-<a name="l02176"></a>02176         <span class="comment">/* 224 */</span>   444,  574,  574,  574,  574,  333,  444,  444,
-<a name="l02177"></a>02177         <span class="comment">/* 232 */</span>   444,  444,  444,  444,  444,  333,  333,  651,
-<a name="l02178"></a>02178         <span class="comment">/* 240 */</span>   611,  611,  611,  500,  500,  500,  500,  606,
-<a name="l02179"></a>02179         <span class="comment">/* 248 */</span>   444,  611,  611,  611,  611,  500,  352,  333,
-<a name="l02180"></a>02180         },
-<a name="l02181"></a>02181         {       <span class="comment">/* NewCenturySchlbk-BoldItalic */</span>
-<a name="l02182"></a>02182         <span class="comment">/*   0 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02183"></a>02183         <span class="comment">/*   8 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02184"></a>02184         <span class="comment">/*  16 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02185"></a>02185         <span class="comment">/*  24 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02186"></a>02186         <span class="comment">/*  32 */</span>   287,  333,  400,  574,  574,  889,  889,  287,
-<a name="l02187"></a>02187         <span class="comment">/*  40 */</span>   407,  407,  500,  606,  287,  333,  287,  278,
-<a name="l02188"></a>02188         <span class="comment">/*  48 */</span>   574,  574,  574,  574,  574,  574,  574,  574,
-<a name="l02189"></a>02189         <span class="comment">/*  56 */</span>   574,  574,  287,  287,  606,  606,  606,  481,
-<a name="l02190"></a>02190         <span class="comment">/*  64 */</span>   747,  741,  759,  759,  833,  741,  704,  815,
-<a name="l02191"></a>02191         <span class="comment">/*  72 */</span>   870,  444,  667,  778,  704,  944,  852,  833,
-<a name="l02192"></a>02192         <span class="comment">/*  80 */</span>   741,  833,  796,  685,  722,  833,  741,  944,
-<a name="l02193"></a>02193         <span class="comment">/*  88 */</span>   741,  704,  704,  407,  606,  407,  606,  500,
-<a name="l02194"></a>02194         <span class="comment">/*  96 */</span>   333,  667,  611,  537,  667,  519,  389,  611,
-<a name="l02195"></a>02195         <span class="comment">/* 104 */</span>   685,  389,  370,  648,  389,  944,  685,  574,
-<a name="l02196"></a>02196         <span class="comment">/* 112 */</span>   648,  630,  519,  481,  407,  685,  556,  833,
-<a name="l02197"></a>02197         <span class="comment">/* 120 */</span>   574,  519,  519,  407,  606,  407,  606,    0,
-<a name="l02198"></a>02198         <span class="comment">/* 128 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02199"></a>02199         <span class="comment">/* 136 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02200"></a>02200         <span class="comment">/* 144 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02201"></a>02201         <span class="comment">/* 152 */</span>     0,    0,    0,    0,    0,    0,    0,    0,
-<a name="l02202"></a>02202         <span class="comment">/* 160 */</span>   287,  741,  333,  704,  574,  704,  685,  500,
-<a name="l02203"></a>02203         <span class="comment">/* 168 */</span>   333,  685,  685,  722,  704,  333,  704,  704,
-<a name="l02204"></a>02204         <span class="comment">/* 176 */</span>   333,  667,  333,  389,  333,  486,  481,  333,
-<a name="l02205"></a>02205         <span class="comment">/* 184 */</span>   333,  481,  481,  483,  519,  333,  519,  519,
-<a name="l02206"></a>02206         <span class="comment">/* 192 */</span>   796,  741,  741,  741,  741,  704,  759,  759,
-<a name="l02207"></a>02207         <span class="comment">/* 200 */</span>   759,  741,  741,  741,  741,  444,  444,  833,
-<a name="l02208"></a>02208         <span class="comment">/* 208 */</span>   833,  852,  852,  833,  833,  833,  833,  606,
-<a name="l02209"></a>02209         <span class="comment">/* 216 */</span>   796,  833,  833,  833,  833,  704,  722,  574,
-<a name="l02210"></a>02210         <span class="comment">/* 224 */</span>   519,  667,  667,  667,  667,  389,  537,  537,
-<a name="l02211"></a>02211         <span class="comment">/* 232 */</span>   537,  519,  519,  519,  519,  389,  389,  780,
-<a name="l02212"></a>02212         <span class="comment">/* 240 */</span>   667,  685,  685,  574,  574,  574,  574,  606,
-<a name="l02213"></a>02213         <span class="comment">/* 248 */</span>   519,  685,  685,  685,  685,  519,  407,  333,
-<a name="l02214"></a>02214         },
-<a name="l02215"></a>02215 };
-<a name="l02216"></a>02216 <span class="preprocessor">#if 0 </span><span class="comment">/* Until this array is needed */</span>
-<a name="l02217"></a>02217 <span class="keyword">static</span> <span class="keywordtype">int</span> aiUnderlineInfo[32][2] = {
-<a name="l02218"></a>02218         { -100, 50 },
-<a name="l02219"></a>02219         { -100, 50 },
-<a name="l02220"></a>02220         { -100, 50 },
-<a name="l02221"></a>02221         { -100, 50 },
-<a name="l02222"></a>02222         { -100, 50 },
-<a name="l02223"></a>02223         { -100, 50 },
-<a name="l02224"></a>02224         { -100, 50 },
-<a name="l02225"></a>02225         { -100, 50 },
-<a name="l02226"></a>02226         { -151, 50 },
-<a name="l02227"></a>02227         { -155, 69 },
-<a name="l02228"></a>02228         { -151, 50 },
-<a name="l02229"></a>02229         { -111, 69 },
-<a name="l02230"></a>02230         { -100, 50 },
-<a name="l02231"></a>02231         { -100, 50 },
-<a name="l02232"></a>02232         { -100, 50 },
-<a name="l02233"></a>02233         { -100, 50 },
-<a name="l02234"></a>02234         { -100, 50 },
-<a name="l02235"></a>02235         { -100, 50 },
-<a name="l02236"></a>02236         { -100, 50 },
-<a name="l02237"></a>02237         { -100, 50 },
-<a name="l02238"></a>02238         { -125, 60 },
-<a name="l02239"></a>02239         { -125, 60 },
-<a name="l02240"></a>02240         { -125, 60 },
-<a name="l02241"></a>02241         { -125, 60 },
-<a name="l02242"></a>02242         { -96, 58 },
-<a name="l02243"></a>02243         { -93, 90 },
-<a name="l02244"></a>02244         { -96, 58 },
-<a name="l02245"></a>02245         { -93, 90 },
-<a name="l02246"></a>02246         { -104, 61 },
-<a name="l02247"></a>02247         { -103, 90 },
-<a name="l02248"></a>02248         { -102, 42 },
-<a name="l02249"></a>02249         { -102, 54 },
-<a name="l02250"></a>02250 };
-<a name="l02251"></a>02251 <span class="preprocessor">#endif </span><span class="comment">/* 0 */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/fontlist_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,189 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/fontlist.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/fontlist.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * fontlist.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2004 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Build, read and destroy a list of Word font information</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;stddef.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 
-<a name="l00014"></a>00014 <span class="comment">/*</span>
-<a name="l00015"></a>00015 <span class="comment"> * Private structure to hide the way the information</span>
-<a name="l00016"></a>00016 <span class="comment"> * is stored from the rest of the program</span>
-<a name="l00017"></a>00017 <span class="comment"> */</span>
-<a name="l00018"></a>00018 <span class="keyword">typedef</span> <span class="keyword">struct </span>font_desc_tag {
-<a name="l00019"></a>00019         font_block_type tInfo;
-<a name="l00020"></a>00020         <span class="keyword">struct </span>font_desc_tag    *pNext;
-<a name="l00021"></a>00021 } font_mem_type;
-<a name="l00022"></a>00022 
-<a name="l00023"></a>00023 <span class="comment">/* Variables needed to write the Font Information List */</span>
-<a name="l00024"></a>00024 <span class="keyword">static</span> font_mem_type    *pAnchor = NULL;
-<a name="l00025"></a>00025 <span class="keyword">static</span> font_mem_type    *pFontLast = NULL;
-<a name="l00026"></a>00026 
-<a name="l00027"></a>00027 
-<a name="l00028"></a>00028 <span class="comment">/*</span>
-<a name="l00029"></a>00029 <span class="comment"> * vDestroyFontInfoList - destroy the Font Information List</span>
-<a name="l00030"></a>00030 <span class="comment"> */</span>
-<a name="l00031"></a>00031 <span class="keywordtype">void</span>
-<a name="l00032"></a>00032 vDestroyFontInfoList(<span class="keywordtype">void</span>)
-<a name="l00033"></a>00033 {
-<a name="l00034"></a>00034         font_mem_type   *pCurr, *pNext;
-<a name="l00035"></a>00035 
-<a name="l00036"></a>00036         DBG_MSG(<span class="stringliteral">&quot;vDestroyFontInfoList&quot;</span>);
-<a name="l00037"></a>00037 
-<a name="l00038"></a>00038         <span class="comment">/* Free the Font Information List */</span>
-<a name="l00039"></a>00039         pCurr = pAnchor;
-<a name="l00040"></a>00040         <span class="keywordflow">while</span> (pCurr != NULL) {
-<a name="l00041"></a>00041                 pNext = pCurr-&gt;pNext;
-<a name="l00042"></a>00042                 pCurr = xfree(pCurr);
-<a name="l00043"></a>00043                 pCurr = pNext;
-<a name="l00044"></a>00044         }
-<a name="l00045"></a>00045         pAnchor = NULL;
-<a name="l00046"></a>00046         <span class="comment">/* Reset all control variables */</span>
-<a name="l00047"></a>00047         pFontLast = NULL;
-<a name="l00048"></a>00048 } <span class="comment">/* end of vDestroyFontInfoList */</span>
-<a name="l00049"></a>00049 
-<a name="l00050"></a>00050 <span class="comment">/*</span>
-<a name="l00051"></a>00051 <span class="comment"> * vCorrectFontValues - correct font values to values Antiword can use</span>
-<a name="l00052"></a>00052 <span class="comment"> */</span>
-<a name="l00053"></a>00053 <span class="keywordtype">void</span>
-<a name="l00054"></a>00054 vCorrectFontValues(font_block_type *pFontBlock)
-<a name="l00055"></a>00055 {
-<a name="l00056"></a>00056         UINT    uiRealSize;
-<a name="l00057"></a>00057         USHORT  usRealStyle;
-<a name="l00058"></a>00058 
-<a name="l00059"></a>00059         uiRealSize = pFontBlock-&gt;usFontSize;
-<a name="l00060"></a>00060         usRealStyle = pFontBlock-&gt;usFontStyle;
-<a name="l00061"></a>00061         <span class="keywordflow">if</span> (bIsSmallCapitals(pFontBlock-&gt;usFontStyle)) {
-<a name="l00062"></a>00062                 <span class="comment">/* Small capitals become normal capitals in a smaller font */</span>
-<a name="l00063"></a>00063                 uiRealSize = (uiRealSize * 4 + 2) / 5;
-<a name="l00064"></a>00064                 usRealStyle &amp;= ~FONT_SMALL_CAPITALS;
-<a name="l00065"></a>00065                 usRealStyle |= FONT_CAPITALS;
-<a name="l00066"></a>00066         }
-<a name="l00067"></a>00067         <span class="keywordflow">if</span> (bIsSuperscript(pFontBlock-&gt;usFontStyle) ||
-<a name="l00068"></a>00068             bIsSubscript(pFontBlock-&gt;usFontStyle)) {
-<a name="l00069"></a>00069                 <span class="comment">/* Superscript and subscript use a smaller fontsize */</span>
-<a name="l00070"></a>00070                 uiRealSize = (uiRealSize * 2 + 1) / 3;
-<a name="l00071"></a>00071         }
-<a name="l00072"></a>00072 
-<a name="l00073"></a>00073         <span class="keywordflow">if</span> (uiRealSize &lt; MIN_FONT_SIZE) {
-<a name="l00074"></a>00074                 DBG_DEC(uiRealSize);
-<a name="l00075"></a>00075                 uiRealSize = MIN_FONT_SIZE;
-<a name="l00076"></a>00076         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (uiRealSize &gt; MAX_FONT_SIZE) {
-<a name="l00077"></a>00077                 DBG_DEC(uiRealSize);
-<a name="l00078"></a>00078                 uiRealSize = MAX_FONT_SIZE;
-<a name="l00079"></a>00079         }
-<a name="l00080"></a>00080 
-<a name="l00081"></a>00081         pFontBlock-&gt;usFontSize = (USHORT)uiRealSize;
-<a name="l00082"></a>00082         <span class="keywordflow">if</span> (pFontBlock-&gt;ucFontColor == 8) {
-<a name="l00083"></a>00083                 <span class="comment">/* White text to light gray text */</span>
-<a name="l00084"></a>00084                 pFontBlock-&gt;ucFontColor = 16;
-<a name="l00085"></a>00085         }
-<a name="l00086"></a>00086         pFontBlock-&gt;usFontStyle = usRealStyle;
-<a name="l00087"></a>00087 } <span class="comment">/* end of vCorrectFontValues */</span>
-<a name="l00088"></a>00088 
-<a name="l00089"></a>00089 <span class="comment">/*</span>
-<a name="l00090"></a>00090 <span class="comment"> * vAdd2FontInfoList - Add an element to the Font Information List</span>
-<a name="l00091"></a>00091 <span class="comment"> */</span>
-<a name="l00092"></a>00092 <span class="keywordtype">void</span>
-<a name="l00093"></a>00093 vAdd2FontInfoList(<span class="keyword">const</span> font_block_type *pFontBlock)
-<a name="l00094"></a>00094 {
-<a name="l00095"></a>00095         font_mem_type   *pListMember;
-<a name="l00096"></a>00096 
-<a name="l00097"></a>00097         fail(pFontBlock == NULL);
-<a name="l00098"></a>00098 
-<a name="l00099"></a>00099         NO_DBG_MSG(<span class="stringliteral">&quot;bAdd2FontInfoList&quot;</span>);
-<a name="l00100"></a>00100 
-<a name="l00101"></a>00101         <span class="keywordflow">if</span> (pFontBlock-&gt;ulFileOffset == FC_INVALID) {
-<a name="l00102"></a>00102                 <span class="comment">/*</span>
-<a name="l00103"></a>00103 <span class="comment">                 * This offset is really past the end of the file,</span>
-<a name="l00104"></a>00104 <span class="comment">                 * so don&#39;t waste any memory by storing it.</span>
-<a name="l00105"></a>00105 <span class="comment">                 */</span>
-<a name="l00106"></a>00106                 <span class="keywordflow">return</span>;
-<a name="l00107"></a>00107         }
-<a name="l00108"></a>00108 
-<a name="l00109"></a>00109         NO_DBG_HEX(pFontBlock-&gt;ulFileOffset);
-<a name="l00110"></a>00110         NO_DBG_DEC_C(pFontBlock-&gt;ucFontNumber != 0,
-<a name="l00111"></a>00111                                         pFontBlock-&gt;ucFontNumber);
-<a name="l00112"></a>00112         NO_DBG_DEC_C(pFontBlock-&gt;usFontSize != DEFAULT_FONT_SIZE,
-<a name="l00113"></a>00113                                         pFontBlock-&gt;usFontSize);
-<a name="l00114"></a>00114         NO_DBG_DEC_C(pFontBlock-&gt;ucFontColor != 0,
-<a name="l00115"></a>00115                                         pFontBlock-&gt;ucFontColor);
-<a name="l00116"></a>00116         NO_DBG_HEX_C(pFontBlock-&gt;usFontStyle != 0x00,
-<a name="l00117"></a>00117                                         pFontBlock-&gt;usFontStyle);
-<a name="l00118"></a>00118 
-<a name="l00119"></a>00119         <span class="keywordflow">if</span> (pFontLast != NULL &amp;&amp;
-<a name="l00120"></a>00120             pFontLast-&gt;tInfo.ulFileOffset == pFontBlock-&gt;ulFileOffset) {
-<a name="l00121"></a>00121                 <span class="comment">/*</span>
-<a name="l00122"></a>00122 <span class="comment">                 * If two consecutive fonts share the same</span>
-<a name="l00123"></a>00123 <span class="comment">                 * offset, remember only the last font</span>
-<a name="l00124"></a>00124 <span class="comment">                 */</span>
-<a name="l00125"></a>00125                 fail(pFontLast-&gt;pNext != NULL);
-<a name="l00126"></a>00126                 pFontLast-&gt;tInfo = *pFontBlock;
-<a name="l00127"></a>00127                 <span class="keywordflow">return</span>;
-<a name="l00128"></a>00128         }
-<a name="l00129"></a>00129 
-<a name="l00130"></a>00130         <span class="comment">/* Create list member */</span>
-<a name="l00131"></a>00131         pListMember = xmalloc(<span class="keyword">sizeof</span>(font_mem_type));
-<a name="l00132"></a>00132         <span class="comment">/* Fill the list member */</span>
-<a name="l00133"></a>00133         pListMember-&gt;tInfo = *pFontBlock;
-<a name="l00134"></a>00134         pListMember-&gt;pNext = NULL;
-<a name="l00135"></a>00135         <span class="comment">/* Correct the values where needed */</span>
-<a name="l00136"></a>00136         vCorrectFontValues(&amp;pListMember-&gt;tInfo);
-<a name="l00137"></a>00137         <span class="comment">/* Add the new member to the list */</span>
-<a name="l00138"></a>00138         <span class="keywordflow">if</span> (pAnchor == NULL) {
-<a name="l00139"></a>00139                 pAnchor = pListMember;
-<a name="l00140"></a>00140         } <span class="keywordflow">else</span> {
-<a name="l00141"></a>00141                 fail(pFontLast == NULL);
-<a name="l00142"></a>00142                 pFontLast-&gt;pNext = pListMember;
-<a name="l00143"></a>00143         }
-<a name="l00144"></a>00144         pFontLast = pListMember;
-<a name="l00145"></a>00145 } <span class="comment">/* end of vAdd2FontInfoList */</span>
-<a name="l00146"></a>00146 
-<a name="l00147"></a>00147 <span class="comment">/*</span>
-<a name="l00148"></a>00148 <span class="comment"> * Get the record that follows the given recored in the Font Information List</span>
-<a name="l00149"></a>00149 <span class="comment"> */</span>
-<a name="l00150"></a>00150 <span class="keyword">const</span> font_block_type *
-<a name="l00151"></a>00151 pGetNextFontInfoListItem(<span class="keyword">const</span> font_block_type *pCurr)
-<a name="l00152"></a>00152 {
-<a name="l00153"></a>00153         <span class="keyword">const</span> font_mem_type     *pRecord;
-<a name="l00154"></a>00154         <span class="keywordtype">size_t</span>  tOffset;
-<a name="l00155"></a>00155 
-<a name="l00156"></a>00156         <span class="keywordflow">if</span> (pCurr == NULL) {
-<a name="l00157"></a>00157                 <span class="keywordflow">if</span> (pAnchor == NULL) {
-<a name="l00158"></a>00158                         <span class="comment">/* There are no records */</span>
-<a name="l00159"></a>00159                         <span class="keywordflow">return</span> NULL;
-<a name="l00160"></a>00160                 }
-<a name="l00161"></a>00161                 <span class="comment">/* The first record is the only one without a predecessor */</span>
-<a name="l00162"></a>00162                 <span class="keywordflow">return</span> &amp;pAnchor-&gt;tInfo;
-<a name="l00163"></a>00163         }
-<a name="l00164"></a>00164         tOffset = offsetof(font_mem_type, tInfo);
-<a name="l00165"></a>00165         <span class="comment">/* Many casts to prevent alignment warnings */</span>
-<a name="l00166"></a>00166         pRecord = (font_mem_type *)(<span class="keywordtype">void</span> *)((<span class="keywordtype">char</span> *)pCurr - tOffset);
-<a name="l00167"></a>00167         fail(pCurr != &amp;pRecord-&gt;tInfo);
-<a name="l00168"></a>00168         <span class="keywordflow">if</span> (pRecord-&gt;pNext == NULL) {
-<a name="l00169"></a>00169                 <span class="comment">/* The last record has no successor */</span>
-<a name="l00170"></a>00170                 <span class="keywordflow">return</span> NULL;
-<a name="l00171"></a>00171         }
-<a name="l00172"></a>00172         <span class="keywordflow">return</span> &amp;pRecord-&gt;pNext-&gt;tInfo;
-<a name="l00173"></a>00173 } <span class="comment">/* end of pGetNextFontInfoListItem */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/fonts_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1034 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/fonts.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/fonts.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * fonts.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2004 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Functions to deal with fonts (generic)</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;ctype.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 <span class="comment">/* Maximum line length in the font file */</span>
-<a name="l00014"></a>00014 <span class="preprocessor">#define FONT_LINE_LENGTH        81</span>
-<a name="l00015"></a>00015 <span class="preprocessor"></span>
-<a name="l00016"></a>00016 <span class="comment">/* Pitch */</span>
-<a name="l00017"></a>00017 <span class="preprocessor">#define PITCH_UNKNOWN           0</span>
-<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define PITCH_FIXED             1</span>
-<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define PITCH_VARIABLE          2</span>
-<a name="l00020"></a>00020 <span class="preprocessor"></span>
-<a name="l00021"></a>00021 <span class="comment">/* Font Family */</span>
-<a name="l00022"></a>00022 <span class="preprocessor">#define FAMILY_UNKNOWN          0</span>
-<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#define FAMILY_ROMAN            1</span>
-<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define FAMILY_SWISS            2</span>
-<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define FAMILY_MODERN           3</span>
-<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define FAMILY_SCRIPT           4</span>
-<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define FAMILY_DECORATIVE       5</span>
-<a name="l00028"></a>00028 <span class="preprocessor"></span>
-<a name="l00029"></a>00029 <span class="comment">/* Font Translation Table */</span>
-<a name="l00030"></a>00030 <span class="keyword">static</span> <span class="keywordtype">size_t</span>           tFontTableRecords = 0;
-<a name="l00031"></a>00031 <span class="keyword">static</span> font_table_type  *pFontTable = NULL;
-<a name="l00032"></a>00032 
-<a name="l00033"></a>00033 <span class="comment">/*</span>
-<a name="l00034"></a>00034 <span class="comment"> * Find the given font in the font table</span>
-<a name="l00035"></a>00035 <span class="comment"> *</span>
-<a name="l00036"></a>00036 <span class="comment"> * returns the index into the FontTable, -1 if not found</span>
-<a name="l00037"></a>00037 <span class="comment"> */</span>
-<a name="l00038"></a>00038 <span class="keywordtype">int</span>
-<a name="l00039"></a>00039 iGetFontByNumber(UCHAR ucWordFontNumber, USHORT usFontStyle)
-<a name="l00040"></a>00040 {
-<a name="l00041"></a>00041         <span class="keywordtype">int</span>     iIndex;
-<a name="l00042"></a>00042 
-<a name="l00043"></a>00043         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; (int)tFontTableRecords; iIndex++) {
-<a name="l00044"></a>00044                 <span class="keywordflow">if</span> (ucWordFontNumber == pFontTable[iIndex].ucWordFontNumber &amp;&amp;
-<a name="l00045"></a>00045                     usFontStyle == pFontTable[iIndex].usFontStyle &amp;&amp;
-<a name="l00046"></a>00046                     pFontTable[iIndex].szOurFontname[0] != <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00047"></a>00047                         <span class="keywordflow">return</span> iIndex;
-<a name="l00048"></a>00048                 }
-<a name="l00049"></a>00049         }
-<a name="l00050"></a>00050         DBG_DEC(ucWordFontNumber);
-<a name="l00051"></a>00051         DBG_HEX(usFontStyle);
-<a name="l00052"></a>00052         <span class="keywordflow">return</span> -1;
-<a name="l00053"></a>00053 } <span class="comment">/* end of iGetFontByNumber */</span>
-<a name="l00054"></a>00054 
-<a name="l00055"></a>00055 <span class="comment">/*</span>
-<a name="l00056"></a>00056 <span class="comment"> * szGetOurFontname - Get our font name</span>
-<a name="l00057"></a>00057 <span class="comment"> *</span>
-<a name="l00058"></a>00058 <span class="comment"> * return our font name from the given index, NULL if not found</span>
-<a name="l00059"></a>00059 <span class="comment"> */</span>
-<a name="l00060"></a>00060 <span class="keyword">const</span> <span class="keywordtype">char</span> *
-<a name="l00061"></a>00061 szGetOurFontname(<span class="keywordtype">int</span> iIndex)
-<a name="l00062"></a>00062 {
-<a name="l00063"></a>00063         <span class="keywordflow">if</span> (iIndex &lt; 0 || iIndex &gt;= (<span class="keywordtype">int</span>)tFontTableRecords) {
-<a name="l00064"></a>00064                 <span class="keywordflow">return</span> NULL;
-<a name="l00065"></a>00065         }
-<a name="l00066"></a>00066         <span class="keywordflow">return</span> pFontTable[iIndex].szOurFontname;
-<a name="l00067"></a>00067 } <span class="comment">/* end of szGetOurFontname */</span>
-<a name="l00068"></a>00068 
-<a name="l00069"></a>00069 <span class="comment">/*</span>
-<a name="l00070"></a>00070 <span class="comment"> * Find the given font in the font table</span>
-<a name="l00071"></a>00071 <span class="comment"> *</span>
-<a name="l00072"></a>00072 <span class="comment"> * returns the Word font number, -1 if not found</span>
-<a name="l00073"></a>00073 <span class="comment"> */</span>
-<a name="l00074"></a>00074 <span class="keywordtype">int</span>
-<a name="l00075"></a>00075 iFontname2Fontnumber(<span class="keyword">const</span> <span class="keywordtype">char</span> *szOurFontname, USHORT usFontStyle)
-<a name="l00076"></a>00076 {
-<a name="l00077"></a>00077         <span class="keywordtype">int</span>     iIndex;
-<a name="l00078"></a>00078 
-<a name="l00079"></a>00079         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; (int)tFontTableRecords; iIndex++) {
-<a name="l00080"></a>00080                 <span class="keywordflow">if</span> (pFontTable[iIndex].usFontStyle == usFontStyle &amp;&amp;
-<a name="l00081"></a>00081                     STREQ(pFontTable[iIndex].szOurFontname, szOurFontname)) {
-<a name="l00082"></a>00082                         <span class="keywordflow">return</span> (<span class="keywordtype">int</span>)pFontTable[iIndex].ucWordFontNumber;
-<a name="l00083"></a>00083                 }
-<a name="l00084"></a>00084         }
-<a name="l00085"></a>00085         <span class="keywordflow">return</span> -1;
-<a name="l00086"></a>00086 } <span class="comment">/* end of iFontname2Fontnumber */</span>
-<a name="l00087"></a>00087 
-<a name="l00088"></a>00088 <span class="comment">/*</span>
-<a name="l00089"></a>00089 <span class="comment"> * szGetDefaultFont - get the default font that matches the parameters</span>
-<a name="l00090"></a>00090 <span class="comment"> */</span>
-<a name="l00091"></a>00091 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *
-<a name="l00092"></a>00092 szGetDefaultFont(UCHAR ucFFN, <span class="keywordtype">int</span> iEmphasis)
-<a name="l00093"></a>00093 {
-<a name="l00094"></a>00094         UCHAR   ucPrq, ucFf;
-<a name="l00095"></a>00095 
-<a name="l00096"></a>00096         fail(iEmphasis &lt; 0 || iEmphasis &gt; 3);
-<a name="l00097"></a>00097 
-<a name="l00098"></a>00098         ucPrq = ucFFN &amp; 0x03;
-<a name="l00099"></a>00099         ucFf = (ucFFN &amp; 0x70) &gt;&gt; 4;
-<a name="l00100"></a>00100         NO_DBG_DEC(ucPrq);
-<a name="l00101"></a>00101         NO_DBG_DEC(ucFf);
-<a name="l00102"></a>00102         <span class="keywordflow">if</span> (ucPrq == PITCH_FIXED) {
-<a name="l00103"></a>00103                 <span class="comment">/* Set to the default monospaced font */</span>
-<a name="l00104"></a>00104                 <span class="keywordflow">switch</span> (iEmphasis) {
-<a name="l00105"></a>00105                 <span class="keywordflow">case</span> 1: <span class="keywordflow">return</span> FONT_MONOSPACED_BOLD;
-<a name="l00106"></a>00106                 <span class="keywordflow">case</span> 2: <span class="keywordflow">return</span> FONT_MONOSPACED_ITALIC;
-<a name="l00107"></a>00107                 <span class="keywordflow">case</span> 3: <span class="keywordflow">return</span> FONT_MONOSPACED_BOLDITALIC;
-<a name="l00108"></a>00108                 <span class="keywordflow">default</span>: <span class="keywordflow">return</span> FONT_MONOSPACED_PLAIN;
-<a name="l00109"></a>00109                 }
-<a name="l00110"></a>00110         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ucFf == FAMILY_ROMAN) {
-<a name="l00111"></a>00111                 <span class="comment">/* Set to the default serif font */</span>
-<a name="l00112"></a>00112                 <span class="keywordflow">switch</span> (iEmphasis) {
-<a name="l00113"></a>00113                 <span class="keywordflow">case</span> 1: <span class="keywordflow">return</span> FONT_SERIF_BOLD;
-<a name="l00114"></a>00114                 <span class="keywordflow">case</span> 2: <span class="keywordflow">return</span> FONT_SERIF_ITALIC;
-<a name="l00115"></a>00115                 <span class="keywordflow">case</span> 3: <span class="keywordflow">return</span> FONT_SERIF_BOLDITALIC;
-<a name="l00116"></a>00116                 <span class="keywordflow">default</span>: <span class="keywordflow">return</span> FONT_SERIF_PLAIN;
-<a name="l00117"></a>00117                 }
-<a name="l00118"></a>00118         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ucFf == FAMILY_SWISS) {
-<a name="l00119"></a>00119                 <span class="comment">/* Set to the default sans serif font */</span>
-<a name="l00120"></a>00120                 <span class="keywordflow">switch</span> (iEmphasis) {
-<a name="l00121"></a>00121                 <span class="keywordflow">case</span> 1: <span class="keywordflow">return</span> FONT_SANS_SERIF_BOLD;
-<a name="l00122"></a>00122                 <span class="keywordflow">case</span> 2: <span class="keywordflow">return</span> FONT_SANS_SERIF_ITALIC;
-<a name="l00123"></a>00123                 <span class="keywordflow">case</span> 3: <span class="keywordflow">return</span> FONT_SANS_SERIF_BOLDITALIC;
-<a name="l00124"></a>00124                 <span class="keywordflow">default</span>: <span class="keywordflow">return</span> FONT_SANS_SERIF_PLAIN;
-<a name="l00125"></a>00125                 }
-<a name="l00126"></a>00126         } <span class="keywordflow">else</span> {
-<a name="l00127"></a>00127                 <span class="comment">/* Set to the default default font */</span>
-<a name="l00128"></a>00128                 <span class="keywordflow">switch</span> (iEmphasis) {
-<a name="l00129"></a>00129                 <span class="keywordflow">case</span> 1: <span class="keywordflow">return</span> FONT_SERIF_BOLD;
-<a name="l00130"></a>00130                 <span class="keywordflow">case</span> 2: <span class="keywordflow">return</span> FONT_SERIF_ITALIC;
-<a name="l00131"></a>00131                 <span class="keywordflow">case</span> 3: <span class="keywordflow">return</span> FONT_SERIF_BOLDITALIC;
-<a name="l00132"></a>00132                 <span class="keywordflow">default</span>: <span class="keywordflow">return</span> FONT_SERIF_PLAIN;
-<a name="l00133"></a>00133                 }
-<a name="l00134"></a>00134         }
-<a name="l00135"></a>00135 } <span class="comment">/* end of szGetDefaultFont */</span>
-<a name="l00136"></a>00136 
-<a name="l00137"></a>00137 <span class="comment">/*</span>
-<a name="l00138"></a>00138 <span class="comment"> * See if the fontname from the Word file matches the fontname from the</span>
-<a name="l00139"></a>00139 <span class="comment"> * font translation file.</span>
-<a name="l00140"></a>00140 <span class="comment"> * If iBytesPerChar is one than aucWord is in ISO-8859-x (Word 2/6/7),</span>
-<a name="l00141"></a>00141 <span class="comment"> * if iBytesPerChar is two than aucWord is in Unicode (Word 8/9/10).</span>
-<a name="l00142"></a>00142 <span class="comment"> */</span>
-<a name="l00143"></a>00143 <span class="keyword">static</span> BOOL
-<a name="l00144"></a>00144 bFontEqual(<span class="keyword">const</span> UCHAR *aucWord, <span class="keyword">const</span> <span class="keywordtype">char</span> *szTable, <span class="keywordtype">int</span> iBytesPerChar)
-<a name="l00145"></a>00145 {
-<a name="l00146"></a>00146         <span class="keyword">const</span> UCHAR     *pucTmp;
-<a name="l00147"></a>00147         <span class="keyword">const</span> <span class="keywordtype">char</span>      *pcTmp;
-<a name="l00148"></a>00148 
-<a name="l00149"></a>00149         fail(aucWord == NULL || szTable == NULL);
-<a name="l00150"></a>00150         fail(iBytesPerChar != 1 &amp;&amp; iBytesPerChar != 2);
-<a name="l00151"></a>00151 
-<a name="l00152"></a>00152         <span class="keywordflow">for</span> (pucTmp = aucWord, pcTmp = szTable;
-<a name="l00153"></a>00153              *pucTmp != 0;
-<a name="l00154"></a>00154              pucTmp += iBytesPerChar, pcTmp++) {
-<a name="l00155"></a>00155                 <span class="keywordflow">if</span> (ulToUpper((ULONG)*pucTmp) !=
-<a name="l00156"></a>00156                     ulToUpper((ULONG)(UCHAR)*pcTmp)) {
-<a name="l00157"></a>00157                         <span class="keywordflow">return</span> FALSE;
-<a name="l00158"></a>00158                 }
-<a name="l00159"></a>00159         }
-<a name="l00160"></a>00160         <span class="keywordflow">return</span> *pcTmp == <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00161"></a>00161 } <span class="comment">/* end of bFontEqual */</span>
-<a name="l00162"></a>00162 
-<a name="l00163"></a>00163 <span class="comment">/*</span>
-<a name="l00164"></a>00164 <span class="comment"> * vFontname2Table - add fontnames to the font table</span>
-<a name="l00165"></a>00165 <span class="comment"> */</span>
-<a name="l00166"></a>00166 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00167"></a>00167 vFontname2Table(<span class="keyword">const</span> UCHAR *aucFont, <span class="keyword">const</span> UCHAR *aucAltFont,
-<a name="l00168"></a>00168         <span class="keywordtype">int</span> iBytesPerChar, <span class="keywordtype">int</span> iEmphasis, UCHAR ucFFN,
-<a name="l00169"></a>00169         <span class="keyword">const</span> <span class="keywordtype">char</span> *szWordFont, <span class="keyword">const</span> <span class="keywordtype">char</span> *szOurFont,
-<a name="l00170"></a>00170         font_table_type *pFontTableRecord)
-<a name="l00171"></a>00171 {
-<a name="l00172"></a>00172         BOOL    bMatchFound;
-<a name="l00173"></a>00173 
-<a name="l00174"></a>00174         fail(aucFont == NULL || aucFont[0] == 0);
-<a name="l00175"></a>00175         fail(aucAltFont != NULL &amp;&amp; aucAltFont[0] == 0);
-<a name="l00176"></a>00176         fail(iBytesPerChar != 1 &amp;&amp; iBytesPerChar != 2);
-<a name="l00177"></a>00177         fail(iEmphasis &lt; 0 || iEmphasis &gt; 3);
-<a name="l00178"></a>00178         fail(szWordFont == NULL || szWordFont[0] == <span class="charliteral">&#39;\0&#39;</span>);
-<a name="l00179"></a>00179         fail(szOurFont == NULL || szOurFont[0] == <span class="charliteral">&#39;\0&#39;</span>);
-<a name="l00180"></a>00180         fail(pFontTableRecord == NULL);
-<a name="l00181"></a>00181 
-<a name="l00182"></a>00182         bMatchFound = bFontEqual(aucFont, szWordFont, iBytesPerChar);
-<a name="l00183"></a>00183 
-<a name="l00184"></a>00184         <span class="keywordflow">if</span> (!bMatchFound &amp;&amp; aucAltFont != NULL) {
-<a name="l00185"></a>00185                 bMatchFound = bFontEqual(aucAltFont, szWordFont, iBytesPerChar);
-<a name="l00186"></a>00186         }
-<a name="l00187"></a>00187 
-<a name="l00188"></a>00188         <span class="keywordflow">if</span> (!bMatchFound &amp;&amp;
-<a name="l00189"></a>00189             pFontTableRecord-&gt;szWordFontname[0] == <span class="charliteral">&#39;\0&#39;</span> &amp;&amp;
-<a name="l00190"></a>00190             szWordFont[0] == <span class="charliteral">&#39;*&#39;</span> &amp;&amp;
-<a name="l00191"></a>00191             szWordFont[1] == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00192"></a>00192                 <span class="comment">/*</span>
-<a name="l00193"></a>00193 <span class="comment">                 * szWordFont contains a &quot;*&quot;, so szOurFont will contain the</span>
-<a name="l00194"></a>00194 <span class="comment">                 * &quot;default default&quot; font. See if we can do better than that.</span>
-<a name="l00195"></a>00195 <span class="comment">                 */</span>
-<a name="l00196"></a>00196                 szOurFont = szGetDefaultFont(ucFFN, iEmphasis);
-<a name="l00197"></a>00197                 bMatchFound = TRUE;
-<a name="l00198"></a>00198         }
-<a name="l00199"></a>00199 
-<a name="l00200"></a>00200         <span class="keywordflow">if</span> (bMatchFound) {
-<a name="l00201"></a>00201                 <span class="keywordflow">switch</span> (iBytesPerChar) {
-<a name="l00202"></a>00202                 <span class="keywordflow">case</span> 1:
-<a name="l00203"></a>00203                         (void)strncpy(pFontTableRecord-&gt;szWordFontname,
-<a name="l00204"></a>00204                                 (<span class="keyword">const</span> <span class="keywordtype">char</span> *)aucFont,
-<a name="l00205"></a>00205                                 <span class="keyword">sizeof</span>(pFontTableRecord-&gt;szWordFontname) - 1);
-<a name="l00206"></a>00206                         <span class="keywordflow">break</span>;
-<a name="l00207"></a>00207                 <span class="keywordflow">case</span> 2:
-<a name="l00208"></a>00208                         (void)unincpy(pFontTableRecord-&gt;szWordFontname,
-<a name="l00209"></a>00209                                 aucFont,
-<a name="l00210"></a>00210                                 <span class="keyword">sizeof</span>(pFontTableRecord-&gt;szWordFontname) - 1);
-<a name="l00211"></a>00211                         <span class="keywordflow">break</span>;
-<a name="l00212"></a>00212                 <span class="keywordflow">default</span>:
-<a name="l00213"></a>00213                         DBG_FIXME();
-<a name="l00214"></a>00214                         pFontTableRecord-&gt;szWordFontname[0] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00215"></a>00215                         <span class="keywordflow">break</span>;
-<a name="l00216"></a>00216                 }
-<a name="l00217"></a>00217                 pFontTableRecord-&gt;szWordFontname[
-<a name="l00218"></a>00218                         <span class="keyword">sizeof</span>(pFontTableRecord-&gt;szWordFontname) - 1] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00219"></a>00219                 (void)strncpy(pFontTableRecord-&gt;szOurFontname, szOurFont,
-<a name="l00220"></a>00220                         <span class="keyword">sizeof</span>(pFontTableRecord-&gt;szOurFontname) - 1);
-<a name="l00221"></a>00221                 pFontTableRecord-&gt;szOurFontname[
-<a name="l00222"></a>00222                         <span class="keyword">sizeof</span>(pFontTableRecord-&gt;szOurFontname) - 1] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00223"></a>00223                 NO_DBG_MSG(pFontTableRecord-&gt;szWordFontname);
-<a name="l00224"></a>00224                 NO_DBG_MSG(pFontTableRecord-&gt;szOurFontname);
-<a name="l00225"></a>00225                 pFontTableRecord-&gt;ucFFN = ucFFN;
-<a name="l00226"></a>00226                 pFontTableRecord-&gt;ucEmphasis = (UCHAR)iEmphasis;
-<a name="l00227"></a>00227         }
-<a name="l00228"></a>00228 } <span class="comment">/* end of vFontname2Table */</span>
-<a name="l00229"></a>00229 
-<a name="l00230"></a>00230 <span class="comment">/*</span>
-<a name="l00231"></a>00231 <span class="comment"> * vCreateFontTable - Create and initialize the internal font table</span>
-<a name="l00232"></a>00232 <span class="comment"> */</span>
-<a name="l00233"></a>00233 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00234"></a>00234 vCreateFontTable(<span class="keywordtype">void</span>)
-<a name="l00235"></a>00235 {
-<a name="l00236"></a>00236         font_table_type *pTmp;
-<a name="l00237"></a>00237         <span class="keywordtype">int</span>     iNbr;
-<a name="l00238"></a>00238 
-<a name="l00239"></a>00239         <span class="keywordflow">if</span> (tFontTableRecords == 0) {
-<a name="l00240"></a>00240                 pFontTable = xfree(pFontTable);
-<a name="l00241"></a>00241                 <span class="keywordflow">return</span>;
-<a name="l00242"></a>00242         }
-<a name="l00243"></a>00243 
-<a name="l00244"></a>00244         <span class="comment">/* Create the font table */</span>
-<a name="l00245"></a>00245         pFontTable = xcalloc(tFontTableRecords, <span class="keyword">sizeof</span>(*pFontTable));
-<a name="l00246"></a>00246 
-<a name="l00247"></a>00247         <span class="comment">/* Initialize the font table */</span>
-<a name="l00248"></a>00248         <span class="keywordflow">for</span> (iNbr = 0, pTmp = pFontTable;
-<a name="l00249"></a>00249              pTmp &lt; pFontTable + tFontTableRecords;
-<a name="l00250"></a>00250              iNbr++, pTmp++) {
-<a name="l00251"></a>00251                 pTmp-&gt;ucWordFontNumber = (UCHAR)(iNbr / 4);
-<a name="l00252"></a>00252                 <span class="keywordflow">switch</span> (iNbr % 4) {
-<a name="l00253"></a>00253                 <span class="keywordflow">case</span> 0:
-<a name="l00254"></a>00254                         pTmp-&gt;usFontStyle = FONT_REGULAR;
-<a name="l00255"></a>00255                         <span class="keywordflow">break</span>;
-<a name="l00256"></a>00256                 <span class="keywordflow">case</span> 1:
-<a name="l00257"></a>00257                         pTmp-&gt;usFontStyle = FONT_BOLD;
-<a name="l00258"></a>00258                         <span class="keywordflow">break</span>;
-<a name="l00259"></a>00259                 <span class="keywordflow">case</span> 2:
-<a name="l00260"></a>00260                         pTmp-&gt;usFontStyle = FONT_ITALIC;
-<a name="l00261"></a>00261                         <span class="keywordflow">break</span>;
-<a name="l00262"></a>00262                 <span class="keywordflow">case</span> 3:
-<a name="l00263"></a>00263                         pTmp-&gt;usFontStyle = FONT_BOLD|FONT_ITALIC;
-<a name="l00264"></a>00264                         <span class="keywordflow">break</span>;
-<a name="l00265"></a>00265                 <span class="keywordflow">default</span>:
-<a name="l00266"></a>00266                         DBG_DEC(iNbr);
-<a name="l00267"></a>00267                         <span class="keywordflow">break</span>;
-<a name="l00268"></a>00268                 }
-<a name="l00269"></a>00269         }
-<a name="l00270"></a>00270 } <span class="comment">/* end of vCreateFontTable */</span>
-<a name="l00271"></a>00271 
-<a name="l00272"></a>00272 <span class="comment">/*</span>
-<a name="l00273"></a>00273 <span class="comment"> * vMinimizeFontTable - make the font table as small as possible</span>
-<a name="l00274"></a>00274 <span class="comment"> */</span>
-<a name="l00275"></a>00275 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00276"></a>00276 vMinimizeFontTable(<span class="keywordtype">void</span>)
-<a name="l00277"></a>00277 {
-<a name="l00278"></a>00278         font_block_type         tFontNext;
-<a name="l00279"></a>00279         <span class="keyword">const</span> style_block_type  *pStyle;
-<a name="l00280"></a>00280         <span class="keyword">const</span> font_block_type   *pFont;
-<a name="l00281"></a>00281         font_table_type         *pTmp;
-<a name="l00282"></a>00282         <span class="keywordtype">int</span>     iUnUsed;
-<a name="l00283"></a>00283         BOOL    bMustAddTableFont;
-<a name="l00284"></a>00284 
-<a name="l00285"></a>00285         NO_DBG_MSG(<span class="stringliteral">&quot;vMinimizeFontTable&quot;</span>);
-<a name="l00286"></a>00286 
-<a name="l00287"></a>00287         <span class="keywordflow">if</span> (tFontTableRecords == 0) {
-<a name="l00288"></a>00288                 pFontTable = xfree(pFontTable);
-<a name="l00289"></a>00289                 <span class="keywordflow">return</span>;
-<a name="l00290"></a>00290         }
-<a name="l00291"></a>00291 
-<a name="l00292"></a>00292         <span class="comment">/* See if we must add a font for our tables */</span>
-<a name="l00293"></a>00293         bMustAddTableFont = TRUE;
-<a name="l00294"></a>00294 
-<a name="l00295"></a>00295 <span class="preprocessor">#if 0</span>
-<a name="l00296"></a>00296 <span class="preprocessor"></span>        DBG_MSG(<span class="stringliteral">&quot;Before&quot;</span>);
-<a name="l00297"></a>00297         DBG_DEC(tFontTableRecords);
-<a name="l00298"></a>00298         <span class="keywordflow">for</span> (pTmp = pFontTable;
-<a name="l00299"></a>00299              pTmp &lt; pFontTable + tFontTableRecords;
-<a name="l00300"></a>00300              pTmp++) {
-<a name="l00301"></a>00301                 DBG_DEC(pTmp-&gt;ucWordFontNumber);
-<a name="l00302"></a>00302                 DBG_HEX(pTmp-&gt;usFontStyle);
-<a name="l00303"></a>00303                 DBG_MSG(pTmp-&gt;szWordFontname);
-<a name="l00304"></a>00304                 DBG_MSG(pTmp-&gt;szOurFontname);
-<a name="l00305"></a>00305         }
-<a name="l00306"></a>00306 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00307"></a>00307 
-<a name="l00308"></a>00308         <span class="comment">/* See which fonts/styles we really need */</span>
-<a name="l00309"></a>00309 
-<a name="l00310"></a>00310         <span class="comment">/* Default font/style is by definition in use */</span>
-<a name="l00311"></a>00311         pFontTable[0].ucInUse = 1;
-<a name="l00312"></a>00312 
-<a name="l00313"></a>00313         <span class="comment">/* Make InUse 1 for all the fonts/styles that WILL be used */</span>
-<a name="l00314"></a>00314         pFont = NULL;
-<a name="l00315"></a>00315         <span class="keywordflow">while</span>((pFont = pGetNextFontInfoListItem(pFont)) != NULL) {
-<a name="l00316"></a>00316                 pTmp = pFontTable + 4 * (int)pFont-&gt;ucFontNumber;
-<a name="l00317"></a>00317                 if (bIsBold(pFont-&gt;usFontStyle)) {
-<a name="l00318"></a>00318                         pTmp++;
-<a name="l00319"></a>00319                 }
-<a name="l00320"></a>00320                 <span class="keywordflow">if</span> (bIsItalic(pFont-&gt;usFontStyle)) {
-<a name="l00321"></a>00321                         pTmp += 2;
-<a name="l00322"></a>00322                 }
-<a name="l00323"></a>00323                 <span class="keywordflow">if</span> (pTmp &gt;= pFontTable + tFontTableRecords) {
-<a name="l00324"></a>00324                         <span class="keywordflow">continue</span>;
-<a name="l00325"></a>00325                 }
-<a name="l00326"></a>00326                 <span class="keywordflow">if</span> (STREQ(pTmp-&gt;szOurFontname, TABLE_FONT)) {
-<a name="l00327"></a>00327                         <span class="comment">/* The table font is already present */</span>
-<a name="l00328"></a>00328                         bMustAddTableFont = FALSE;
-<a name="l00329"></a>00329                 }
-<a name="l00330"></a>00330                 pTmp-&gt;ucInUse = 1;
-<a name="l00331"></a>00331         }
-<a name="l00332"></a>00332 
-<a name="l00333"></a>00333         <span class="comment">/* Make InUse 1 for all the fonts/styles that MIGHT be used */</span>
-<a name="l00334"></a>00334         pStyle = NULL;
-<a name="l00335"></a>00335         <span class="keywordflow">while</span>((pStyle = pGetNextStyleInfoListItem(pStyle)) != NULL) {
-<a name="l00336"></a>00336                 vFillFontFromStylesheet(pStyle-&gt;usIstdNext, &amp;tFontNext);
-<a name="l00337"></a>00337                 vCorrectFontValues(&amp;tFontNext);
-<a name="l00338"></a>00338                 pTmp = pFontTable + 4 * (int)tFontNext.ucFontNumber;
-<a name="l00339"></a>00339                 if (bIsBold(tFontNext.usFontStyle)) {
-<a name="l00340"></a>00340                         pTmp++;
-<a name="l00341"></a>00341                 }
-<a name="l00342"></a>00342                 <span class="keywordflow">if</span> (bIsItalic(tFontNext.usFontStyle)) {
-<a name="l00343"></a>00343                         pTmp += 2;
-<a name="l00344"></a>00344                 }
-<a name="l00345"></a>00345                 <span class="keywordflow">if</span> (pTmp &gt;= pFontTable + tFontTableRecords) {
-<a name="l00346"></a>00346                         <span class="keywordflow">continue</span>;
-<a name="l00347"></a>00347                 }
-<a name="l00348"></a>00348                 <span class="keywordflow">if</span> (STREQ(pTmp-&gt;szOurFontname, TABLE_FONT)) {
-<a name="l00349"></a>00349                         <span class="comment">/* The table font is already present */</span>
-<a name="l00350"></a>00350                         bMustAddTableFont = FALSE;
-<a name="l00351"></a>00351                 }
-<a name="l00352"></a>00352                 pTmp-&gt;ucInUse = 1;
-<a name="l00353"></a>00353         }
-<a name="l00354"></a>00354 
-<a name="l00355"></a>00355         <span class="comment">/* Remove the unused font entries from the font table */</span>
-<a name="l00356"></a>00356         iUnUsed = 0;
-<a name="l00357"></a>00357         <span class="keywordflow">for</span> (pTmp = pFontTable;
-<a name="l00358"></a>00358              pTmp &lt; pFontTable + tFontTableRecords;
-<a name="l00359"></a>00359              pTmp++) {
-<a name="l00360"></a>00360                 <span class="keywordflow">if</span> (pTmp-&gt;ucInUse == 0) {
-<a name="l00361"></a>00361                         iUnUsed++;
-<a name="l00362"></a>00362                         <span class="keywordflow">continue</span>;
-<a name="l00363"></a>00363                 }
-<a name="l00364"></a>00364                 <span class="keywordflow">if</span> (iUnUsed &gt; 0) {
-<a name="l00365"></a>00365                         fail(pTmp - iUnUsed &lt;= pFontTable);
-<a name="l00366"></a>00366                         *(pTmp - iUnUsed) = *pTmp;
-<a name="l00367"></a>00367                 }
-<a name="l00368"></a>00368         }
-<a name="l00369"></a>00369         fail(iUnUsed &lt; 0);
-<a name="l00370"></a>00370         fail(tFontTableRecords &lt;= (<span class="keywordtype">size_t</span>)iUnUsed);
-<a name="l00371"></a>00371         tFontTableRecords -= (size_t)iUnUsed;
-<a name="l00372"></a>00372 
-<a name="l00373"></a>00373         <span class="keywordflow">if</span> (bMustAddTableFont) {
-<a name="l00374"></a>00374                 pTmp = pFontTable + tFontTableRecords;
-<a name="l00375"></a>00375                 fail(pTmp &lt;= pFontTable);
-<a name="l00376"></a>00376                 pTmp-&gt;ucWordFontNumber = (pTmp - 1)-&gt;ucWordFontNumber + 1;
-<a name="l00377"></a>00377                 pTmp-&gt;usFontStyle = FONT_REGULAR;
-<a name="l00378"></a>00378                 pTmp-&gt;ucInUse = 1;
-<a name="l00379"></a>00379                 strcpy(pTmp-&gt;szWordFontname, <span class="stringliteral">&quot;Extra Table Font&quot;</span>);
-<a name="l00380"></a>00380                 strcpy(pTmp-&gt;szOurFontname, TABLE_FONT);
-<a name="l00381"></a>00381                 tFontTableRecords++;
-<a name="l00382"></a>00382                 iUnUsed--;
-<a name="l00383"></a>00383         }
-<a name="l00384"></a>00384         <span class="keywordflow">if</span> (iUnUsed &gt; 0) {
-<a name="l00385"></a>00385                 <span class="comment">/* Resize the font table */</span>
-<a name="l00386"></a>00386                 pFontTable = xrealloc(pFontTable,
-<a name="l00387"></a>00387                                 tFontTableRecords * <span class="keyword">sizeof</span>(*pFontTable));
-<a name="l00388"></a>00388         }
-<a name="l00389"></a>00389 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00390"></a>00390 <span class="preprocessor"></span>        DBG_MSG(<span class="stringliteral">&quot;After&quot;</span>);
-<a name="l00391"></a>00391         DBG_DEC(tFontTableRecords);
-<a name="l00392"></a>00392         <span class="keywordflow">for</span> (pTmp = pFontTable;
-<a name="l00393"></a>00393              pTmp &lt; pFontTable + tFontTableRecords;
-<a name="l00394"></a>00394              pTmp++) {
-<a name="l00395"></a>00395                 DBG_DEC(pTmp-&gt;ucWordFontNumber);
-<a name="l00396"></a>00396                 DBG_HEX(pTmp-&gt;usFontStyle);
-<a name="l00397"></a>00397                 DBG_MSG(pTmp-&gt;szWordFontname);
-<a name="l00398"></a>00398                 DBG_MSG(pTmp-&gt;szOurFontname);
-<a name="l00399"></a>00399         }
-<a name="l00400"></a>00400 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00401"></a>00401 } <span class="comment">/* end of vMinimizeFontTable */</span>
-<a name="l00402"></a>00402 
-<a name="l00403"></a>00403 <span class="comment">/*</span>
-<a name="l00404"></a>00404 <span class="comment"> * bReadFontFile - read and check a line from the font translation file</span>
-<a name="l00405"></a>00405 <span class="comment"> *</span>
-<a name="l00406"></a>00406 <span class="comment"> * returns TRUE when a correct line has been read, otherwise FALSE</span>
-<a name="l00407"></a>00407 <span class="comment"> */</span>
-<a name="l00408"></a>00408 <span class="keyword">static</span> BOOL
-<a name="l00409"></a>00409 bReadFontFile(FILE *pFontTableFile, <span class="keywordtype">char</span> *szWordFont,
-<a name="l00410"></a>00410         <span class="keywordtype">int</span> *piItalic, <span class="keywordtype">int</span> *piBold, <span class="keywordtype">char</span> *szOurFont, <span class="keywordtype">int</span> *piSpecial)
-<a name="l00411"></a>00411 {
-<a name="l00412"></a>00412         <span class="keywordtype">char</span>    *pcTmp;
-<a name="l00413"></a>00413         <span class="keywordtype">int</span>     iFields;
-<a name="l00414"></a>00414         <span class="keywordtype">char</span>    szLine[FONT_LINE_LENGTH];
-<a name="l00415"></a>00415 
-<a name="l00416"></a>00416         fail(szWordFont == NULL || szOurFont == NULL);
-<a name="l00417"></a>00417         fail(piItalic == NULL || piBold == NULL || piSpecial == NULL);
-<a name="l00418"></a>00418 
-<a name="l00419"></a>00419         <span class="keywordflow">while</span> (fgets(szLine, (<span class="keywordtype">int</span>)<span class="keyword">sizeof</span>(szLine), pFontTableFile) != NULL) {
-<a name="l00420"></a>00420                 <span class="keywordflow">if</span> (szLine[0] == <span class="charliteral">&#39;#&#39;</span> ||
-<a name="l00421"></a>00421                     szLine[0] == <span class="charliteral">&#39;\n&#39;</span> ||
-<a name="l00422"></a>00422                     szLine[0] == <span class="charliteral">&#39;\r&#39;</span>) {
-<a name="l00423"></a>00423                         <span class="keywordflow">continue</span>;
-<a name="l00424"></a>00424                 }
-<a name="l00425"></a>00425                 iFields = sscanf(szLine, <span class="stringliteral">&quot;%[^,],%d,%d,%1s%[^,],%d&quot;</span>,
-<a name="l00426"></a>00426                         szWordFont, piItalic, piBold,
-<a name="l00427"></a>00427                         &amp;szOurFont[0], &amp;szOurFont[1], piSpecial);
-<a name="l00428"></a>00428                 <span class="keywordflow">if</span> (iFields != 6) {
-<a name="l00429"></a>00429                         pcTmp = strchr(szLine, <span class="charliteral">&#39;\r&#39;</span>);
-<a name="l00430"></a>00430                         <span class="keywordflow">if</span> (pcTmp != NULL) {
-<a name="l00431"></a>00431                                 *pcTmp = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00432"></a>00432                         }
-<a name="l00433"></a>00433                         pcTmp = strchr(szLine, <span class="charliteral">&#39;\n&#39;</span>);
-<a name="l00434"></a>00434                         <span class="keywordflow">if</span> (pcTmp != NULL) {
-<a name="l00435"></a>00435                                 *pcTmp = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00436"></a>00436                         }
-<a name="l00437"></a>00437                         DBG_DEC(iFields);
-<a name="l00438"></a>00438                         werr(0, <span class="stringliteral">&quot;Syntax error in: &#39;%s&#39;&quot;</span>, szLine);
-<a name="l00439"></a>00439                         <span class="keywordflow">continue</span>;
-<a name="l00440"></a>00440                 }
-<a name="l00441"></a>00441                 <span class="keywordflow">if</span> (strlen(szWordFont) &gt;=
-<a name="l00442"></a>00442                                 <span class="keyword">sizeof</span>(pFontTable[0].szWordFontname)) {
-<a name="l00443"></a>00443                         werr(0, <span class="stringliteral">&quot;Word fontname too long: &#39;%s&#39;&quot;</span>, szWordFont);
-<a name="l00444"></a>00444                         <span class="keywordflow">continue</span>;
-<a name="l00445"></a>00445                 }
-<a name="l00446"></a>00446                 <span class="keywordflow">if</span> (strlen(szOurFont) &gt;=
-<a name="l00447"></a>00447                                 <span class="keyword">sizeof</span>(pFontTable[0].szOurFontname)) {
-<a name="l00448"></a>00448                         werr(0, <span class="stringliteral">&quot;Local fontname too long: &#39;%s&#39;&quot;</span>, szOurFont);
-<a name="l00449"></a>00449                         <span class="keywordflow">continue</span>;
-<a name="l00450"></a>00450                 }
-<a name="l00451"></a>00451                 <span class="comment">/* The current line passed all the tests */</span>
-<a name="l00452"></a>00452                 <span class="keywordflow">return</span> TRUE;
-<a name="l00453"></a>00453         }
-<a name="l00454"></a>00454         <span class="keywordflow">return</span> FALSE;
-<a name="l00455"></a>00455 } <span class="comment">/* end of bReadFontFile */</span>
-<a name="l00456"></a>00456 
-<a name="l00457"></a>00457 <span class="comment">/*</span>
-<a name="l00458"></a>00458 <span class="comment"> * vCreate0FontTable - create a font table from Word for DOS</span>
-<a name="l00459"></a>00459 <span class="comment"> */</span>
-<a name="l00460"></a>00460 <span class="keywordtype">void</span>
-<a name="l00461"></a>00461 vCreate0FontTable(<span class="keywordtype">void</span>)
-<a name="l00462"></a>00462 {
-<a name="l00463"></a>00463         FILE    *pFontTableFile;
-<a name="l00464"></a>00464         font_table_type *pTmp;
-<a name="l00465"></a>00465         UCHAR   *aucFont;
-<a name="l00466"></a>00466         <span class="keywordtype">int</span>     iBold, iItalic, iSpecial, iEmphasis, iFtc;
-<a name="l00467"></a>00467         UCHAR   ucPrq, ucFf, ucFFN;
-<a name="l00468"></a>00468         <span class="keywordtype">char</span>    szWordFont[FONT_LINE_LENGTH], szOurFont[FONT_LINE_LENGTH];
-<a name="l00469"></a>00469 
-<a name="l00470"></a>00470         tFontTableRecords = 0;
-<a name="l00471"></a>00471         pFontTable = xfree(pFontTable);
-<a name="l00472"></a>00472 
-<a name="l00473"></a>00473         pFontTableFile = pOpenFontTableFile();
-<a name="l00474"></a>00474         <span class="keywordflow">if</span> (pFontTableFile == NULL) {
-<a name="l00475"></a>00475                 <span class="comment">/* No translation table file, no translation table */</span>
-<a name="l00476"></a>00476                 <span class="keywordflow">return</span>;
-<a name="l00477"></a>00477         }
-<a name="l00478"></a>00478 
-<a name="l00479"></a>00479         <span class="comment">/* Get the maximum number of entries in the font table */</span>
-<a name="l00480"></a>00480         tFontTableRecords = 64;
-<a name="l00481"></a>00481         tFontTableRecords *= 4; <span class="comment">/* Plain, Bold, Italic and Bold/italic */</span>
-<a name="l00482"></a>00482         tFontTableRecords++;    <span class="comment">/* One extra for the table-font */</span>
-<a name="l00483"></a>00483         vCreateFontTable();
-<a name="l00484"></a>00484 
-<a name="l00485"></a>00485         <span class="comment">/* Read the font translation file */</span>
-<a name="l00486"></a>00486         iItalic = 0;
-<a name="l00487"></a>00487         iBold = 0;
-<a name="l00488"></a>00488         iSpecial = 0;
-<a name="l00489"></a>00489         <span class="keywordflow">while</span> (bReadFontFile(pFontTableFile, szWordFont,
-<a name="l00490"></a>00490                         &amp;iItalic, &amp;iBold, szOurFont, &amp;iSpecial)) {
-<a name="l00491"></a>00491                 iEmphasis = 0;
-<a name="l00492"></a>00492                 <span class="keywordflow">if</span> (iBold != 0) {
-<a name="l00493"></a>00493                         iEmphasis++;
-<a name="l00494"></a>00494                 }
-<a name="l00495"></a>00495                 <span class="keywordflow">if</span> (iItalic != 0) {
-<a name="l00496"></a>00496                         iEmphasis += 2;
-<a name="l00497"></a>00497                 }
-<a name="l00498"></a>00498                 <span class="keywordflow">for</span> (iFtc = 0, pTmp = pFontTable + iEmphasis;
-<a name="l00499"></a>00499                      pTmp &lt; pFontTable + tFontTableRecords;
-<a name="l00500"></a>00500                      iFtc++, pTmp += 4) {
-<a name="l00501"></a>00501                         <span class="keywordflow">if</span> (iFtc &gt;= 16 &amp;&amp; iFtc &lt;= 55) {
-<a name="l00502"></a>00502                                 ucPrq = PITCH_VARIABLE;
-<a name="l00503"></a>00503                                 ucFf = FAMILY_ROMAN;
-<a name="l00504"></a>00504                                 aucFont = (UCHAR *)<span class="stringliteral">&quot;Times&quot;</span>;
-<a name="l00505"></a>00505                         } <span class="keywordflow">else</span> {
-<a name="l00506"></a>00506                                 ucPrq = PITCH_FIXED;
-<a name="l00507"></a>00507                                 ucFf = FAMILY_MODERN;
-<a name="l00508"></a>00508                                 aucFont = (UCHAR *)<span class="stringliteral">&quot;Courier&quot;</span>;
-<a name="l00509"></a>00509                         }
-<a name="l00510"></a>00510                         ucFFN = (ucFf &lt;&lt; 4) | ucPrq;
-<a name="l00511"></a>00511                         vFontname2Table(aucFont, NULL, 1, iEmphasis,
-<a name="l00512"></a>00512                                         ucFFN, szWordFont, szOurFont, pTmp);
-<a name="l00513"></a>00513                 }
-<a name="l00514"></a>00514         }
-<a name="l00515"></a>00515         (void)fclose(pFontTableFile);
-<a name="l00516"></a>00516         vMinimizeFontTable();
-<a name="l00517"></a>00517 } <span class="comment">/* end of vCreate0FontTable */</span>
-<a name="l00518"></a>00518 
-<a name="l00519"></a>00519 <span class="comment">/*</span>
-<a name="l00520"></a>00520 <span class="comment"> * vCreate2FontTable - create a font table from WinWord 1/2</span>
-<a name="l00521"></a>00521 <span class="comment"> */</span>
-<a name="l00522"></a>00522 <span class="keywordtype">void</span>
-<a name="l00523"></a>00523 vCreate2FontTable(FILE *pFile, <span class="keywordtype">int</span> iWordVersion, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00524"></a>00524 {
-<a name="l00525"></a>00525         FILE    *pFontTableFile;
-<a name="l00526"></a>00526         font_table_type *pTmp;
-<a name="l00527"></a>00527         UCHAR   *aucFont;
-<a name="l00528"></a>00528         UCHAR   *aucBuffer;
-<a name="l00529"></a>00529         ULONG   ulBeginFontInfo;
-<a name="l00530"></a>00530         <span class="keywordtype">size_t</span>  tFontInfoLen;
-<a name="l00531"></a>00531         <span class="keywordtype">int</span>     iPos, iOff, iRecLen;
-<a name="l00532"></a>00532         <span class="keywordtype">int</span>     iBold, iItalic, iSpecial, iEmphasis;
-<a name="l00533"></a>00533         UCHAR   ucFFN;
-<a name="l00534"></a>00534         <span class="keywordtype">char</span>    szWordFont[FONT_LINE_LENGTH], szOurFont[FONT_LINE_LENGTH];
-<a name="l00535"></a>00535 
-<a name="l00536"></a>00536         fail(pFile == NULL || aucHeader == NULL);
-<a name="l00537"></a>00537         fail(iWordVersion != 1 &amp;&amp; iWordVersion != 2);
-<a name="l00538"></a>00538 
-<a name="l00539"></a>00539         tFontTableRecords = 0;
-<a name="l00540"></a>00540         pFontTable = xfree(pFontTable);
-<a name="l00541"></a>00541 
-<a name="l00542"></a>00542         pFontTableFile = pOpenFontTableFile();
-<a name="l00543"></a>00543         <span class="keywordflow">if</span> (pFontTableFile == NULL) {
-<a name="l00544"></a>00544                 <span class="comment">/* No translation table file, no translation table */</span>
-<a name="l00545"></a>00545                 <span class="keywordflow">return</span>;
-<a name="l00546"></a>00546         }
-<a name="l00547"></a>00547 
-<a name="l00548"></a>00548         ulBeginFontInfo = ulGetLong(0xb2, aucHeader); <span class="comment">/* fcSttbfffn */</span>
-<a name="l00549"></a>00549         DBG_HEX(ulBeginFontInfo);
-<a name="l00550"></a>00550         tFontInfoLen = (size_t)usGetWord(0xb6, aucHeader); <span class="comment">/* cbSttbfffn */</span>
-<a name="l00551"></a>00551         DBG_DEC(tFontInfoLen);
-<a name="l00552"></a>00552 
-<a name="l00553"></a>00553         <span class="keywordflow">if</span> (ulBeginFontInfo &gt; (ULONG)LONG_MAX || tFontInfoLen == 0) {
-<a name="l00554"></a>00554                 <span class="comment">/* Don&#39;t ask me why this is needed */</span>
-<a name="l00555"></a>00555                 DBG_HEX_C(tFontInfoLen != 0, ulBeginFontInfo);
-<a name="l00556"></a>00556                 (void)fclose(pFontTableFile);
-<a name="l00557"></a>00557                 <span class="keywordflow">return</span>;
-<a name="l00558"></a>00558         }
-<a name="l00559"></a>00559 
-<a name="l00560"></a>00560         aucBuffer = xmalloc(tFontInfoLen);
-<a name="l00561"></a>00561         <span class="keywordflow">if</span> (!bReadBytes(aucBuffer, tFontInfoLen, ulBeginFontInfo, pFile)) {
-<a name="l00562"></a>00562                 aucBuffer = xfree(aucBuffer);
-<a name="l00563"></a>00563                 (void)fclose(pFontTableFile);
-<a name="l00564"></a>00564                 <span class="keywordflow">return</span>;
-<a name="l00565"></a>00565         }
-<a name="l00566"></a>00566         NO_DBG_PRINT_BLOCK(aucBuffer, tFontInfoLen);
-<a name="l00567"></a>00567         DBG_DEC(usGetWord(0, aucBuffer));
-<a name="l00568"></a>00568 
-<a name="l00569"></a>00569         <span class="comment">/* Compute the maximum number of entries in the font table */</span>
-<a name="l00570"></a>00570         <span class="keywordflow">if</span> (iWordVersion == 1) {
-<a name="l00571"></a>00571                 fail(tFontInfoLen &lt; 2);
-<a name="l00572"></a>00572                 <span class="comment">/* WinWord 1 has three implicit fonts */</span>
-<a name="l00573"></a>00573                 tFontTableRecords = 3;
-<a name="l00574"></a>00574                 iOff = 2;
-<a name="l00575"></a>00575         } <span class="keywordflow">else</span> {
-<a name="l00576"></a>00576                 fail(tFontInfoLen &lt; 6);
-<a name="l00577"></a>00577                 <span class="comment">/* WinWord 2 and up have no implicit fonts */</span>
-<a name="l00578"></a>00578                 tFontTableRecords = 0;
-<a name="l00579"></a>00579                 iOff = 3;
-<a name="l00580"></a>00580         }
-<a name="l00581"></a>00581         iPos = 2;
-<a name="l00582"></a>00582         <span class="keywordflow">while</span> (iPos + iOff &lt; (<span class="keywordtype">int</span>)tFontInfoLen) {
-<a name="l00583"></a>00583                 iRecLen = (int)ucGetByte(iPos, aucBuffer);
-<a name="l00584"></a>00584                 NO_DBG_DEC(iRecLen);
-<a name="l00585"></a>00585                 NO_DBG_MSG(aucBuffer + iPos + iOff);
-<a name="l00586"></a>00586                 iPos += iRecLen + 1;
-<a name="l00587"></a>00587                 tFontTableRecords++;
-<a name="l00588"></a>00588         }
-<a name="l00589"></a>00589         tFontTableRecords *= 4; <span class="comment">/* Plain, Bold, Italic and Bold/Italic */</span>
-<a name="l00590"></a>00590         tFontTableRecords++;    <span class="comment">/* One extra for the table-font */</span>
-<a name="l00591"></a>00591         vCreateFontTable();
-<a name="l00592"></a>00592 
-<a name="l00593"></a>00593         <span class="comment">/* Add the tree implicit fonts (in four variations) */</span>
-<a name="l00594"></a>00594         <span class="keywordflow">if</span> (iWordVersion == 1) {
-<a name="l00595"></a>00595                 fail(tFontTableRecords &lt; 13);
-<a name="l00596"></a>00596                 vFontname2Table((UCHAR *)<span class="stringliteral">&quot;Tms Rmn&quot;</span>, NULL, 1, 0,
-<a name="l00597"></a>00597                         (UCHAR)((FAMILY_ROMAN &lt;&lt; 4) | PITCH_VARIABLE),
-<a name="l00598"></a>00598                         <span class="stringliteral">&quot;*&quot;</span>, <span class="stringliteral">&quot;Times-Roman&quot;</span>, pFontTable + 0);
-<a name="l00599"></a>00599                 vFontname2Table((UCHAR *)<span class="stringliteral">&quot;Tms Rmn&quot;</span>, NULL, 1, 1,
-<a name="l00600"></a>00600                         (UCHAR)((FAMILY_ROMAN &lt;&lt; 4) | PITCH_VARIABLE),
-<a name="l00601"></a>00601                         <span class="stringliteral">&quot;*&quot;</span>, <span class="stringliteral">&quot;Times-Bold&quot;</span>, pFontTable + 1);
-<a name="l00602"></a>00602                 vFontname2Table((UCHAR *)<span class="stringliteral">&quot;Tms Rmn&quot;</span>, NULL, 1, 2,
-<a name="l00603"></a>00603                         (UCHAR)((FAMILY_ROMAN &lt;&lt; 4) | PITCH_VARIABLE),
-<a name="l00604"></a>00604                         <span class="stringliteral">&quot;*&quot;</span>, <span class="stringliteral">&quot;Times-Italic&quot;</span>, pFontTable + 2);
-<a name="l00605"></a>00605                 vFontname2Table((UCHAR *)<span class="stringliteral">&quot;Tms Rmn&quot;</span>, NULL, 1, 3,
-<a name="l00606"></a>00606                         (UCHAR)((FAMILY_ROMAN &lt;&lt; 4) | PITCH_VARIABLE),
-<a name="l00607"></a>00607                         <span class="stringliteral">&quot;*&quot;</span>, <span class="stringliteral">&quot;Times-BoldItalic&quot;</span>, pFontTable + 3);
-<a name="l00608"></a>00608                 vFontname2Table((UCHAR *)<span class="stringliteral">&quot;Symbol&quot;</span>, NULL, 1, 0,
-<a name="l00609"></a>00609                         (UCHAR)((FAMILY_ROMAN &lt;&lt; 4) | PITCH_VARIABLE),
-<a name="l00610"></a>00610                         <span class="stringliteral">&quot;*&quot;</span>, <span class="stringliteral">&quot;Times-Roman&quot;</span>, pFontTable + 4);
-<a name="l00611"></a>00611                 vFontname2Table((UCHAR *)<span class="stringliteral">&quot;Symbol&quot;</span>, NULL, 1, 1,
-<a name="l00612"></a>00612                         (UCHAR)((FAMILY_ROMAN &lt;&lt; 4) | PITCH_VARIABLE),
-<a name="l00613"></a>00613                         <span class="stringliteral">&quot;*&quot;</span>, <span class="stringliteral">&quot;Times-Bold&quot;</span>, pFontTable + 5);
-<a name="l00614"></a>00614                 vFontname2Table((UCHAR *)<span class="stringliteral">&quot;Symbol&quot;</span>, NULL, 1, 2,
-<a name="l00615"></a>00615                         (UCHAR)((FAMILY_ROMAN &lt;&lt; 4) | PITCH_VARIABLE),
-<a name="l00616"></a>00616                         <span class="stringliteral">&quot;*&quot;</span>, <span class="stringliteral">&quot;Times-Italic&quot;</span>, pFontTable + 6);
-<a name="l00617"></a>00617                 vFontname2Table((UCHAR *)<span class="stringliteral">&quot;Symbol&quot;</span>, NULL, 1, 3,
-<a name="l00618"></a>00618                         (UCHAR)((FAMILY_ROMAN &lt;&lt; 4) | PITCH_VARIABLE),
-<a name="l00619"></a>00619                         <span class="stringliteral">&quot;*&quot;</span>, <span class="stringliteral">&quot;Times-BoldItalic&quot;</span>, pFontTable + 7);
-<a name="l00620"></a>00620                 vFontname2Table((UCHAR *)<span class="stringliteral">&quot;Helv&quot;</span>, NULL, 1, 0,
-<a name="l00621"></a>00621                         (UCHAR)((FAMILY_SWISS &lt;&lt; 4) | PITCH_VARIABLE),
-<a name="l00622"></a>00622                         <span class="stringliteral">&quot;*&quot;</span>, <span class="stringliteral">&quot;Helvetica&quot;</span>, pFontTable + 8);
-<a name="l00623"></a>00623                 vFontname2Table((UCHAR *)<span class="stringliteral">&quot;Helv&quot;</span>, NULL, 1, 1,
-<a name="l00624"></a>00624                         (UCHAR)((FAMILY_SWISS &lt;&lt; 4) | PITCH_VARIABLE),
-<a name="l00625"></a>00625                         <span class="stringliteral">&quot;*&quot;</span>, <span class="stringliteral">&quot;Helvetica-Bold&quot;</span>, pFontTable + 9);
-<a name="l00626"></a>00626                 vFontname2Table((UCHAR *)<span class="stringliteral">&quot;Helv&quot;</span>, NULL, 1, 2,
-<a name="l00627"></a>00627                         (UCHAR)((FAMILY_SWISS &lt;&lt; 4) | PITCH_VARIABLE),
-<a name="l00628"></a>00628                         <span class="stringliteral">&quot;*&quot;</span>, <span class="stringliteral">&quot;Helvetica-Oblique&quot;</span>, pFontTable + 10);
-<a name="l00629"></a>00629                 vFontname2Table((UCHAR *)<span class="stringliteral">&quot;Helv&quot;</span>, NULL, 1, 3,
-<a name="l00630"></a>00630                         (UCHAR)((FAMILY_SWISS &lt;&lt; 4) | PITCH_VARIABLE),
-<a name="l00631"></a>00631                         <span class="stringliteral">&quot;*&quot;</span>, <span class="stringliteral">&quot;Helvetica-BoldOblique&quot;</span>, pFontTable + 11);
-<a name="l00632"></a>00632         }
-<a name="l00633"></a>00633 
-<a name="l00634"></a>00634         <span class="comment">/* Read the font translation file */</span>
-<a name="l00635"></a>00635         iItalic = 0;
-<a name="l00636"></a>00636         iBold = 0;
-<a name="l00637"></a>00637         iSpecial = 0;
-<a name="l00638"></a>00638         <span class="keywordflow">while</span> (bReadFontFile(pFontTableFile, szWordFont,
-<a name="l00639"></a>00639                         &amp;iItalic, &amp;iBold, szOurFont, &amp;iSpecial)) {
-<a name="l00640"></a>00640                 iEmphasis = 0;
-<a name="l00641"></a>00641                 <span class="keywordflow">if</span> (iBold != 0) {
-<a name="l00642"></a>00642                         iEmphasis++;
-<a name="l00643"></a>00643                 }
-<a name="l00644"></a>00644                 <span class="keywordflow">if</span> (iItalic != 0) {
-<a name="l00645"></a>00645                         iEmphasis += 2;
-<a name="l00646"></a>00646                 }
-<a name="l00647"></a>00647                 pTmp = pFontTable + iEmphasis;
-<a name="l00648"></a>00648                 iPos = 2;
-<a name="l00649"></a>00649                 <span class="keywordflow">while</span> (iPos + iOff &lt; (<span class="keywordtype">int</span>)tFontInfoLen) {
-<a name="l00650"></a>00650                         iRecLen = (int)ucGetByte(iPos, aucBuffer);
-<a name="l00651"></a>00651                         ucFFN = ucGetByte(iPos + 1, aucBuffer);
-<a name="l00652"></a>00652                         aucFont = aucBuffer + iPos + iOff;
-<a name="l00653"></a>00653                         vFontname2Table(aucFont, NULL, 1, iEmphasis,
-<a name="l00654"></a>00654                                         ucFFN, szWordFont, szOurFont, pTmp);
-<a name="l00655"></a>00655                         pTmp += 4;
-<a name="l00656"></a>00656                         iPos += iRecLen + 1;
-<a name="l00657"></a>00657                 }
-<a name="l00658"></a>00658         }
-<a name="l00659"></a>00659         (void)fclose(pFontTableFile);
-<a name="l00660"></a>00660         aucBuffer = xfree(aucBuffer);
-<a name="l00661"></a>00661         vMinimizeFontTable();
-<a name="l00662"></a>00662 } <span class="comment">/* end of vCreate2FontTable */</span>
-<a name="l00663"></a>00663 
-<a name="l00664"></a>00664 <span class="comment">/*</span>
-<a name="l00665"></a>00665 <span class="comment"> * vCreate6FontTable - create a font table from Word 6/7</span>
-<a name="l00666"></a>00666 <span class="comment"> */</span>
-<a name="l00667"></a>00667 <span class="keywordtype">void</span>
-<a name="l00668"></a>00668 vCreate6FontTable(FILE *pFile, ULONG ulStartBlock,
-<a name="l00669"></a>00669         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00670"></a>00670         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00671"></a>00671 {
-<a name="l00672"></a>00672         FILE    *pFontTableFile;
-<a name="l00673"></a>00673         font_table_type *pTmp;
-<a name="l00674"></a>00674         UCHAR   *aucFont, *aucAltFont;
-<a name="l00675"></a>00675         UCHAR   *aucBuffer;
-<a name="l00676"></a>00676         ULONG   ulBeginFontInfo;
-<a name="l00677"></a>00677         <span class="keywordtype">size_t</span>  tFontInfoLen;
-<a name="l00678"></a>00678         <span class="keywordtype">int</span>     iPos, iRecLen, iOffsetAltName;
-<a name="l00679"></a>00679         <span class="keywordtype">int</span>     iBold, iItalic, iSpecial, iEmphasis;
-<a name="l00680"></a>00680         UCHAR   ucFFN;
-<a name="l00681"></a>00681         <span class="keywordtype">char</span>    szWordFont[FONT_LINE_LENGTH], szOurFont[FONT_LINE_LENGTH];
-<a name="l00682"></a>00682 
-<a name="l00683"></a>00683         fail(pFile == NULL || aucHeader == NULL);
-<a name="l00684"></a>00684         fail(ulStartBlock &gt; MAX_BLOCKNUMBER &amp;&amp; ulStartBlock != END_OF_CHAIN);
-<a name="l00685"></a>00685         fail(aulBBD == NULL);
-<a name="l00686"></a>00686 
-<a name="l00687"></a>00687         tFontTableRecords = 0;
-<a name="l00688"></a>00688         pFontTable = xfree(pFontTable);
-<a name="l00689"></a>00689 
-<a name="l00690"></a>00690         pFontTableFile = pOpenFontTableFile();
-<a name="l00691"></a>00691         <span class="keywordflow">if</span> (pFontTableFile == NULL) {
-<a name="l00692"></a>00692                 <span class="comment">/* No translation table file, no translation table */</span>
-<a name="l00693"></a>00693                 <span class="keywordflow">return</span>;
-<a name="l00694"></a>00694         }
-<a name="l00695"></a>00695 
-<a name="l00696"></a>00696         ulBeginFontInfo = ulGetLong(0xd0, aucHeader); <span class="comment">/* fcSttbfffn */</span>
-<a name="l00697"></a>00697         DBG_HEX(ulBeginFontInfo);
-<a name="l00698"></a>00698         tFontInfoLen = (size_t)ulGetLong(0xd4, aucHeader); <span class="comment">/* lcbSttbfffn */</span>
-<a name="l00699"></a>00699         DBG_DEC(tFontInfoLen);
-<a name="l00700"></a>00700         fail(tFontInfoLen &lt; 9);
-<a name="l00701"></a>00701 
-<a name="l00702"></a>00702         aucBuffer = xmalloc(tFontInfoLen);
-<a name="l00703"></a>00703         <span class="keywordflow">if</span> (!bReadBuffer(pFile, ulStartBlock,
-<a name="l00704"></a>00704                         aulBBD, tBBDLen, BIG_BLOCK_SIZE,
-<a name="l00705"></a>00705                         aucBuffer, ulBeginFontInfo, tFontInfoLen)) {
-<a name="l00706"></a>00706                 aucBuffer = xfree(aucBuffer);
-<a name="l00707"></a>00707                 (void)fclose(pFontTableFile);
-<a name="l00708"></a>00708                 <span class="keywordflow">return</span>;
-<a name="l00709"></a>00709         }
-<a name="l00710"></a>00710         DBG_DEC(usGetWord(0, aucBuffer));
-<a name="l00711"></a>00711 
-<a name="l00712"></a>00712         <span class="comment">/* Compute the maximum number of entries in the font table */</span>
-<a name="l00713"></a>00713         tFontTableRecords = 0;
-<a name="l00714"></a>00714         iPos = 2;
-<a name="l00715"></a>00715         <span class="keywordflow">while</span> (iPos + 6 &lt; (<span class="keywordtype">int</span>)tFontInfoLen) {
-<a name="l00716"></a>00716                 iRecLen = (int)ucGetByte(iPos, aucBuffer);
-<a name="l00717"></a>00717                 NO_DBG_DEC(iRecLen);
-<a name="l00718"></a>00718                 iOffsetAltName = (int)ucGetByte(iPos + 5, aucBuffer);
-<a name="l00719"></a>00719                 NO_DBG_MSG(aucBuffer + iPos + 6);
-<a name="l00720"></a>00720                 NO_DBG_MSG_C(iOffsetAltName &gt; 0,
-<a name="l00721"></a>00721                                 aucBuffer + iPos + 6 + iOffsetAltName);
-<a name="l00722"></a>00722                 iPos += iRecLen + 1;
-<a name="l00723"></a>00723                 tFontTableRecords++;
-<a name="l00724"></a>00724         }
-<a name="l00725"></a>00725         tFontTableRecords *= 4; <span class="comment">/* Plain, Bold, Italic and Bold/italic */</span>
-<a name="l00726"></a>00726         tFontTableRecords++;    <span class="comment">/* One extra for the table-font */</span>
-<a name="l00727"></a>00727         vCreateFontTable();
-<a name="l00728"></a>00728 
-<a name="l00729"></a>00729         <span class="comment">/* Read the font translation file */</span>
-<a name="l00730"></a>00730         iItalic = 0;
-<a name="l00731"></a>00731         iBold = 0;
-<a name="l00732"></a>00732         iSpecial = 0;
-<a name="l00733"></a>00733         <span class="keywordflow">while</span> (bReadFontFile(pFontTableFile, szWordFont,
-<a name="l00734"></a>00734                         &amp;iItalic, &amp;iBold, szOurFont, &amp;iSpecial)) {
-<a name="l00735"></a>00735                 iEmphasis = 0;
-<a name="l00736"></a>00736                 <span class="keywordflow">if</span> (iBold != 0) {
-<a name="l00737"></a>00737                         iEmphasis++;
-<a name="l00738"></a>00738                 }
-<a name="l00739"></a>00739                 <span class="keywordflow">if</span> (iItalic != 0) {
-<a name="l00740"></a>00740                         iEmphasis += 2;
-<a name="l00741"></a>00741                 }
-<a name="l00742"></a>00742                 pTmp = pFontTable + iEmphasis;
-<a name="l00743"></a>00743                 iPos = 2;
-<a name="l00744"></a>00744                 <span class="keywordflow">while</span> (iPos + 6 &lt; (<span class="keywordtype">int</span>)tFontInfoLen) {
-<a name="l00745"></a>00745                         iRecLen = (int)ucGetByte(iPos, aucBuffer);
-<a name="l00746"></a>00746                         ucFFN = ucGetByte(iPos + 1, aucBuffer);
-<a name="l00747"></a>00747                         aucFont = aucBuffer + iPos + 6;
-<a name="l00748"></a>00748                         iOffsetAltName = (int)ucGetByte(iPos + 5, aucBuffer);
-<a name="l00749"></a>00749                         <span class="keywordflow">if</span> (iOffsetAltName &lt;= 0) {
-<a name="l00750"></a>00750                                 aucAltFont = NULL;
-<a name="l00751"></a>00751                         } <span class="keywordflow">else</span> {
-<a name="l00752"></a>00752                                 aucAltFont = aucFont + iOffsetAltName;
-<a name="l00753"></a>00753                                 NO_DBG_MSG(aucFont);
-<a name="l00754"></a>00754                                 NO_DBG_MSG(aucAltFont);
-<a name="l00755"></a>00755                         }
-<a name="l00756"></a>00756                         vFontname2Table(aucFont, aucAltFont, 1, iEmphasis,
-<a name="l00757"></a>00757                                         ucFFN, szWordFont, szOurFont, pTmp);
-<a name="l00758"></a>00758                         pTmp += 4;
-<a name="l00759"></a>00759                         iPos += iRecLen + 1;
-<a name="l00760"></a>00760                 }
-<a name="l00761"></a>00761         }
-<a name="l00762"></a>00762         (void)fclose(pFontTableFile);
-<a name="l00763"></a>00763         aucBuffer = xfree(aucBuffer);
-<a name="l00764"></a>00764         vMinimizeFontTable();
-<a name="l00765"></a>00765 } <span class="comment">/* end of vCreate6FontTable */</span>
-<a name="l00766"></a>00766 
-<a name="l00767"></a>00767 <span class="comment">/*</span>
-<a name="l00768"></a>00768 <span class="comment"> * vCreate8FontTable - create a font table from Word 8/9/10</span>
-<a name="l00769"></a>00769 <span class="comment"> */</span>
-<a name="l00770"></a>00770 <span class="keywordtype">void</span>
-<a name="l00771"></a>00771 vCreate8FontTable(FILE *pFile, <span class="keyword">const</span> pps_info_type *pPPS,
-<a name="l00772"></a>00772         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00773"></a>00773         <span class="keyword">const</span> ULONG *aulSBD, <span class="keywordtype">size_t</span> tSBDLen,
-<a name="l00774"></a>00774         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00775"></a>00775 {
-<a name="l00776"></a>00776         FILE    *pFontTableFile;
-<a name="l00777"></a>00777         font_table_type *pTmp;
-<a name="l00778"></a>00778         <span class="keyword">const</span> ULONG     *aulBlockDepot;
-<a name="l00779"></a>00779         UCHAR   *aucFont, *aucAltFont;
-<a name="l00780"></a>00780         UCHAR   *aucBuffer;
-<a name="l00781"></a>00781         ULONG   ulBeginFontInfo;
-<a name="l00782"></a>00782         <span class="keywordtype">size_t</span>  tFontInfoLen, tBlockDepotLen, tBlockSize;
-<a name="l00783"></a>00783         <span class="keywordtype">int</span>     iPos, iRecLen, iOffsetAltName;
-<a name="l00784"></a>00784         <span class="keywordtype">int</span>     iBold, iItalic, iSpecial, iEmphasis;
-<a name="l00785"></a>00785         UCHAR   ucFFN;
-<a name="l00786"></a>00786         <span class="keywordtype">char</span>    szWordFont[FONT_LINE_LENGTH], szOurFont[FONT_LINE_LENGTH];
-<a name="l00787"></a>00787 
-<a name="l00788"></a>00788         fail(pFile == NULL || pPPS == NULL || aucHeader == NULL);
-<a name="l00789"></a>00789         fail(aulBBD == NULL || aulSBD == NULL);
-<a name="l00790"></a>00790 
-<a name="l00791"></a>00791         tFontTableRecords = 0;
-<a name="l00792"></a>00792         pFontTable = xfree(pFontTable);
-<a name="l00793"></a>00793 
-<a name="l00794"></a>00794         pFontTableFile = pOpenFontTableFile();
-<a name="l00795"></a>00795         <span class="keywordflow">if</span> (pFontTableFile == NULL) {
-<a name="l00796"></a>00796                 <span class="comment">/* No translation table file, no translation table */</span>
-<a name="l00797"></a>00797                 <span class="keywordflow">return</span>;
-<a name="l00798"></a>00798         }
-<a name="l00799"></a>00799 
-<a name="l00800"></a>00800         ulBeginFontInfo = ulGetLong(0x112, aucHeader); <span class="comment">/* fcSttbfffn */</span>
-<a name="l00801"></a>00801         DBG_HEX(ulBeginFontInfo);
-<a name="l00802"></a>00802         tFontInfoLen = (size_t)ulGetLong(0x116, aucHeader); <span class="comment">/* lcbSttbfffn */</span>
-<a name="l00803"></a>00803         DBG_DEC(tFontInfoLen);
-<a name="l00804"></a>00804         fail(tFontInfoLen &lt; 46);
-<a name="l00805"></a>00805 
-<a name="l00806"></a>00806         DBG_DEC(pPPS-&gt;tTable.ulSB);
-<a name="l00807"></a>00807         DBG_HEX(pPPS-&gt;tTable.ulSize);
-<a name="l00808"></a>00808         <span class="keywordflow">if</span> (pPPS-&gt;tTable.ulSize == 0) {
-<a name="l00809"></a>00809                 DBG_MSG(<span class="stringliteral">&quot;No fontname table&quot;</span>);
-<a name="l00810"></a>00810                 (void)fclose(pFontTableFile);
-<a name="l00811"></a>00811                 <span class="keywordflow">return</span>;
-<a name="l00812"></a>00812         }
-<a name="l00813"></a>00813 
-<a name="l00814"></a>00814         <span class="keywordflow">if</span> (pPPS-&gt;tTable.ulSize &lt; MIN_SIZE_FOR_BBD_USE) {
-<a name="l00815"></a>00815                 <span class="comment">/* Use the Small Block Depot */</span>
-<a name="l00816"></a>00816                 aulBlockDepot = aulSBD;
-<a name="l00817"></a>00817                 tBlockDepotLen = tSBDLen;
-<a name="l00818"></a>00818                 tBlockSize = SMALL_BLOCK_SIZE;
-<a name="l00819"></a>00819         } <span class="keywordflow">else</span> {
-<a name="l00820"></a>00820                 <span class="comment">/* Use the Big Block Depot */</span>
-<a name="l00821"></a>00821                 aulBlockDepot = aulBBD;
-<a name="l00822"></a>00822                 tBlockDepotLen = tBBDLen;
-<a name="l00823"></a>00823                 tBlockSize = BIG_BLOCK_SIZE;
-<a name="l00824"></a>00824         }
-<a name="l00825"></a>00825         aucBuffer = xmalloc(tFontInfoLen);
-<a name="l00826"></a>00826         <span class="keywordflow">if</span> (!bReadBuffer(pFile, pPPS-&gt;tTable.ulSB,
-<a name="l00827"></a>00827                         aulBlockDepot, tBlockDepotLen, tBlockSize,
-<a name="l00828"></a>00828                         aucBuffer, ulBeginFontInfo, tFontInfoLen)) {
-<a name="l00829"></a>00829                 aucBuffer = xfree(aucBuffer);
-<a name="l00830"></a>00830                 (void)fclose(pFontTableFile);
-<a name="l00831"></a>00831                 <span class="keywordflow">return</span>;
-<a name="l00832"></a>00832         }
-<a name="l00833"></a>00833         NO_DBG_PRINT_BLOCK(aucBuffer, tFontInfoLen);
-<a name="l00834"></a>00834 
-<a name="l00835"></a>00835         <span class="comment">/* Get the maximum number of entries in the font table */</span>
-<a name="l00836"></a>00836         tFontTableRecords = (size_t)usGetWord(0, aucBuffer);
-<a name="l00837"></a>00837         tFontTableRecords *= 4; <span class="comment">/* Plain, Bold, Italic and Bold/italic */</span>
-<a name="l00838"></a>00838         tFontTableRecords++;    <span class="comment">/* One extra for the table-font */</span>
-<a name="l00839"></a>00839         vCreateFontTable();
-<a name="l00840"></a>00840 
-<a name="l00841"></a>00841         <span class="comment">/* Read the font translation file */</span>
-<a name="l00842"></a>00842         iItalic = 0;
-<a name="l00843"></a>00843         iBold = 0;
-<a name="l00844"></a>00844         iSpecial = 0;
-<a name="l00845"></a>00845         <span class="keywordflow">while</span> (bReadFontFile(pFontTableFile, szWordFont,
-<a name="l00846"></a>00846                         &amp;iItalic, &amp;iBold, szOurFont, &amp;iSpecial)) {
-<a name="l00847"></a>00847                 iEmphasis = 0;
-<a name="l00848"></a>00848                 <span class="keywordflow">if</span> (iBold != 0) {
-<a name="l00849"></a>00849                         iEmphasis++;
-<a name="l00850"></a>00850                 }
-<a name="l00851"></a>00851                 <span class="keywordflow">if</span> (iItalic != 0) {
-<a name="l00852"></a>00852                         iEmphasis += 2;
-<a name="l00853"></a>00853                 }
-<a name="l00854"></a>00854                 pTmp = pFontTable + iEmphasis;
-<a name="l00855"></a>00855                 iPos = 4;
-<a name="l00856"></a>00856                 <span class="keywordflow">while</span> (iPos + 40 &lt; (<span class="keywordtype">int</span>)tFontInfoLen) {
-<a name="l00857"></a>00857                         iRecLen = (int)ucGetByte(iPos, aucBuffer);
-<a name="l00858"></a>00858                         ucFFN = ucGetByte(iPos + 1, aucBuffer);
-<a name="l00859"></a>00859                         aucFont = aucBuffer + iPos + 40;
-<a name="l00860"></a>00860                         iOffsetAltName = (int)unilen(aucFont);
-<a name="l00861"></a>00861                         <span class="keywordflow">if</span> (iPos + 40 + iOffsetAltName + 4 &gt;= iRecLen) {
-<a name="l00862"></a>00862                                 aucAltFont = NULL;
-<a name="l00863"></a>00863                         } <span class="keywordflow">else</span> {
-<a name="l00864"></a>00864                                 aucAltFont = aucFont + iOffsetAltName + 2;
-<a name="l00865"></a>00865                                 NO_DBG_UNICODE(aucFont);
-<a name="l00866"></a>00866                                 NO_DBG_UNICODE(aucAltFont);
-<a name="l00867"></a>00867                         }
-<a name="l00868"></a>00868                         vFontname2Table(aucFont, aucAltFont, 2, iEmphasis,
-<a name="l00869"></a>00869                                         ucFFN, szWordFont, szOurFont, pTmp);
-<a name="l00870"></a>00870                         pTmp += 4;
-<a name="l00871"></a>00871                         iPos += iRecLen + 1;
-<a name="l00872"></a>00872                 }
-<a name="l00873"></a>00873         }
-<a name="l00874"></a>00874         (void)fclose(pFontTableFile);
-<a name="l00875"></a>00875         aucBuffer = xfree(aucBuffer);
-<a name="l00876"></a>00876         vMinimizeFontTable();
-<a name="l00877"></a>00877 } <span class="comment">/* end of vCreate8FontTable */</span>
-<a name="l00878"></a>00878 
-<a name="l00879"></a>00879 <span class="comment">/*</span>
-<a name="l00880"></a>00880 <span class="comment"> * Destroy the internal font table by freeing its memory</span>
-<a name="l00881"></a>00881 <span class="comment"> */</span>
-<a name="l00882"></a>00882 <span class="keywordtype">void</span>
-<a name="l00883"></a>00883 vDestroyFontTable(<span class="keywordtype">void</span>)
-<a name="l00884"></a>00884 {
-<a name="l00885"></a>00885         DBG_MSG(<span class="stringliteral">&quot;vDestroyFontTable&quot;</span>);
-<a name="l00886"></a>00886 
-<a name="l00887"></a>00887         tFontTableRecords = 0;
-<a name="l00888"></a>00888         pFontTable = xfree(pFontTable);
-<a name="l00889"></a>00889 } <span class="comment">/* end of vDestroyFontTable */</span>
-<a name="l00890"></a>00890 
-<a name="l00891"></a>00891 <span class="comment">/*</span>
-<a name="l00892"></a>00892 <span class="comment"> * pGetNextFontTableRecord</span>
-<a name="l00893"></a>00893 <span class="comment"> *</span>
-<a name="l00894"></a>00894 <span class="comment"> * returns the next record in the table or NULL if there is no next record</span>
-<a name="l00895"></a>00895 <span class="comment"> */</span>
-<a name="l00896"></a>00896 <span class="keyword">const</span> font_table_type *
-<a name="l00897"></a>00897 pGetNextFontTableRecord(<span class="keyword">const</span> font_table_type *pRecordCurr)
-<a name="l00898"></a>00898 {
-<a name="l00899"></a>00899         <span class="keywordtype">size_t</span>  tIndexCurr;
-<a name="l00900"></a>00900 
-<a name="l00901"></a>00901         <span class="keywordflow">if</span> (pRecordCurr == NULL) {
-<a name="l00902"></a>00902                 <span class="comment">/* No current record, so start with the first one */</span>
-<a name="l00903"></a>00903                 <span class="keywordflow">return</span> &amp;pFontTable[0];
-<a name="l00904"></a>00904         }
-<a name="l00905"></a>00905 
-<a name="l00906"></a>00906         <span class="keywordflow">if</span> (pRecordCurr &lt; pFontTable ||
-<a name="l00907"></a>00907             pRecordCurr &gt;= pFontTable + tFontTableRecords) {
-<a name="l00908"></a>00908                 <span class="comment">/* Not a pointer in the array */</span>
-<a name="l00909"></a>00909                 DBG_HEX(pRecordCurr);
-<a name="l00910"></a>00910                 DBG_HEX(pFontTable);
-<a name="l00911"></a>00911                 <span class="keywordflow">return</span> NULL;
-<a name="l00912"></a>00912         }
-<a name="l00913"></a>00913 
-<a name="l00914"></a>00914         tIndexCurr = (size_t)(pRecordCurr - pFontTable);
-<a name="l00915"></a>00915         <span class="keywordflow">if</span> (tIndexCurr + 1 &lt; tFontTableRecords) {
-<a name="l00916"></a>00916                 <span class="comment">/* There is a next record, so return it */</span>
-<a name="l00917"></a>00917                 <span class="keywordflow">return</span> &amp;pFontTable[tIndexCurr + 1];
-<a name="l00918"></a>00918         }
-<a name="l00919"></a>00919         <span class="comment">/* There is no next record */</span>
-<a name="l00920"></a>00920         <span class="keywordflow">return</span> NULL;
-<a name="l00921"></a>00921 } <span class="comment">/* end of pGetNextFontTableRecord */</span>
-<a name="l00922"></a>00922 
-<a name="l00923"></a>00923 <span class="comment">/*</span>
-<a name="l00924"></a>00924 <span class="comment"> * tGetFontTableLength</span>
-<a name="l00925"></a>00925 <span class="comment"> *</span>
-<a name="l00926"></a>00926 <span class="comment"> * returns the number of records in the internal font table</span>
-<a name="l00927"></a>00927 <span class="comment"> */</span>
-<a name="l00928"></a>00928 <span class="keywordtype">size_t</span>
-<a name="l00929"></a>00929 tGetFontTableLength(<span class="keywordtype">void</span>)
-<a name="l00930"></a>00930 {
-<a name="l00931"></a>00931         <span class="keywordflow">return</span> tFontTableRecords;
-<a name="l00932"></a>00932 } <span class="comment">/* end of tGetFontTableLength */</span>
-<a name="l00933"></a>00933 
-<a name="l00934"></a>00934 <span class="preprocessor">#if !defined(__riscos)</span>
-<a name="l00935"></a>00935 <span class="preprocessor"></span><span class="comment">/*</span>
-<a name="l00936"></a>00936 <span class="comment"> * vCorrect4PDF - only include PDF default fonts</span>
-<a name="l00937"></a>00937 <span class="comment"> */</span>
-<a name="l00938"></a>00938 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00939"></a>00939 vCorrect4PDF(<span class="keywordtype">void</span>)
-<a name="l00940"></a>00940 {
-<a name="l00941"></a>00941         font_table_type *pTmp;
-<a name="l00942"></a>00942         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szOurFont;
-<a name="l00943"></a>00943 
-<a name="l00944"></a>00944         <span class="keywordflow">for</span> (pTmp = pFontTable; pTmp &lt; pFontTable + tFontTableRecords; pTmp++) {
-<a name="l00945"></a>00945                 <span class="keywordflow">if</span> (STRCEQ(pTmp-&gt;szOurFontname, FONT_MONOSPACED_PLAIN) ||
-<a name="l00946"></a>00946                     STRCEQ(pTmp-&gt;szOurFontname, FONT_MONOSPACED_BOLD) ||
-<a name="l00947"></a>00947                     STRCEQ(pTmp-&gt;szOurFontname, FONT_MONOSPACED_ITALIC) ||
-<a name="l00948"></a>00948                     STRCEQ(pTmp-&gt;szOurFontname, FONT_MONOSPACED_BOLDITALIC) ||
-<a name="l00949"></a>00949                     STRCEQ(pTmp-&gt;szOurFontname, FONT_SERIF_PLAIN) ||
-<a name="l00950"></a>00950                     STRCEQ(pTmp-&gt;szOurFontname, FONT_SERIF_BOLD) ||
-<a name="l00951"></a>00951                     STRCEQ(pTmp-&gt;szOurFontname, FONT_SERIF_ITALIC) ||
-<a name="l00952"></a>00952                     STRCEQ(pTmp-&gt;szOurFontname, FONT_SERIF_BOLDITALIC) ||
-<a name="l00953"></a>00953                     STRCEQ(pTmp-&gt;szOurFontname, FONT_SANS_SERIF_PLAIN) ||
-<a name="l00954"></a>00954                     STRCEQ(pTmp-&gt;szOurFontname, FONT_SANS_SERIF_BOLD) ||
-<a name="l00955"></a>00955                     STRCEQ(pTmp-&gt;szOurFontname, FONT_SANS_SERIF_ITALIC) ||
-<a name="l00956"></a>00956                     STRCEQ(pTmp-&gt;szOurFontname, FONT_SANS_SERIF_BOLDITALIC)) {
-<a name="l00957"></a>00957                         <span class="comment">/* Already a default font */</span>
-<a name="l00958"></a>00958                         <span class="keywordflow">continue</span>;
-<a name="l00959"></a>00959                 }
-<a name="l00960"></a>00960                 szOurFont =
-<a name="l00961"></a>00961                         szGetDefaultFont(pTmp-&gt;ucFFN, (<span class="keywordtype">int</span>)pTmp-&gt;ucEmphasis);
-<a name="l00962"></a>00962                 (void)strncpy(pTmp-&gt;szOurFontname, szOurFont,
-<a name="l00963"></a>00963                         <span class="keyword">sizeof</span>(pTmp-&gt;szOurFontname) - 1);
-<a name="l00964"></a>00964                 pTmp-&gt;szOurFontname[<span class="keyword">sizeof</span>(pTmp-&gt;szOurFontname) - 1] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00965"></a>00965         }
-<a name="l00966"></a>00966 } <span class="comment">/* end of vCorrect4PDF */</span>
-<a name="l00967"></a>00967 
-<a name="l00968"></a>00968 <span class="comment">/*</span>
-<a name="l00969"></a>00969 <span class="comment"> * vCorrect4CyrPS - only include monospaced fonts</span>
-<a name="l00970"></a>00970 <span class="comment"> */</span>
-<a name="l00971"></a>00971 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00972"></a>00972 vCorrect4CyrPS(<span class="keywordtype">void</span>)
-<a name="l00973"></a>00973 {
-<a name="l00974"></a>00974         font_table_type *pTmp;
-<a name="l00975"></a>00975         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szOurFont;
-<a name="l00976"></a>00976         UCHAR   ucFFN;
-<a name="l00977"></a>00977 
-<a name="l00978"></a>00978         ucFFN = (FAMILY_UNKNOWN &lt;&lt; 4) | PITCH_FIXED;
-<a name="l00979"></a>00979         <span class="keywordflow">for</span> (pTmp = pFontTable; pTmp &lt; pFontTable + tFontTableRecords; pTmp++) {
-<a name="l00980"></a>00980                 szOurFont = szGetDefaultFont(ucFFN, (<span class="keywordtype">int</span>)pTmp-&gt;ucEmphasis);
-<a name="l00981"></a>00981                 (void)strncpy(pTmp-&gt;szOurFontname, szOurFont,
-<a name="l00982"></a>00982                         <span class="keyword">sizeof</span>(pTmp-&gt;szOurFontname) - 1);
-<a name="l00983"></a>00983                 pTmp-&gt;szOurFontname[<span class="keyword">sizeof</span>(pTmp-&gt;szOurFontname) - 1] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00984"></a>00984         }
-<a name="l00985"></a>00985 } <span class="comment">/* end of vCorrect4CyrPS */</span>
-<a name="l00986"></a>00986 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00987"></a>00987 
-<a name="l00988"></a>00988 <span class="comment">/*</span>
-<a name="l00989"></a>00989 <span class="comment"> * vCorrectFontTable - correct the font table in special cases</span>
-<a name="l00990"></a>00990 <span class="comment"> */</span>
-<a name="l00991"></a>00991 <span class="keywordtype">void</span>
-<a name="l00992"></a>00992 vCorrectFontTable(conversion_type eConversionType, encoding_type eEncoding)
-<a name="l00993"></a>00993 {
-<a name="l00994"></a>00994 <span class="preprocessor">#if !defined(__riscos)</span>
-<a name="l00995"></a>00995 <span class="preprocessor"></span>        <span class="keywordflow">if</span> (eConversionType == conversion_pdf) {
-<a name="l00996"></a>00996                 vCorrect4PDF();
-<a name="l00997"></a>00997         }
-<a name="l00998"></a>00998         <span class="keywordflow">if</span> (eConversionType == conversion_ps &amp;&amp;
-<a name="l00999"></a>00999             eEncoding == encoding_cyrillic) {
-<a name="l01000"></a>01000                 vCorrect4CyrPS();
-<a name="l01001"></a>01001         }
-<a name="l01002"></a>01002 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l01003"></a>01003 } <span class="comment">/* end of vCorrectFontTable */</span>
-<a name="l01004"></a>01004 
-<a name="l01005"></a>01005 <span class="comment">/*</span>
-<a name="l01006"></a>01006 <span class="comment"> * lComputeSpaceWidth - compute the width of a space character</span>
-<a name="l01007"></a>01007 <span class="comment"> *</span>
-<a name="l01008"></a>01008 <span class="comment"> * Returns the space width in millipoints</span>
-<a name="l01009"></a>01009 <span class="comment"> */</span>
-<a name="l01010"></a>01010 <span class="keywordtype">long</span>
-<a name="l01011"></a>01011 lComputeSpaceWidth(drawfile_fontref tFontRef, USHORT usFontSize)
-<a name="l01012"></a>01012 {
-<a name="l01013"></a>01013         <span class="keywordtype">char</span>    szSpace[] = <span class="stringliteral">&quot; &quot;</span>;
-<a name="l01014"></a>01014 
-<a name="l01015"></a>01015         fail(usFontSize &lt; MIN_FONT_SIZE || usFontSize &gt; MAX_FONT_SIZE);
-<a name="l01016"></a>01016 
-<a name="l01017"></a>01017         <span class="keywordflow">return</span> lComputeStringWidth(szSpace, 1, tFontRef, usFontSize);
-<a name="l01018"></a>01018 } <span class="comment">/* end of lComputeSpaceWidth */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/fonts__r_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,267 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/fonts_r.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/fonts_r.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * fonts_r.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1999-2002 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Functions to deal with fonts (RiscOs version)</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;DeskLib:Font.h&quot;</span>
-<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;drawfile.h&quot;</span>
-<a name="l00013"></a>00013 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00014"></a>00014 
-<a name="l00015"></a>00015 <span class="keyword">static</span> font_handle      tFontCurr = (font_handle)-1;
-<a name="l00016"></a>00016 
-<a name="l00017"></a>00017 <span class="comment">/*</span>
-<a name="l00018"></a>00018 <span class="comment"> * pOpenFontTableFile - open the Font translation file</span>
-<a name="l00019"></a>00019 <span class="comment"> * Copy the file to the proper place if necessary.</span>
-<a name="l00020"></a>00020 <span class="comment"> *</span>
-<a name="l00021"></a>00021 <span class="comment"> * Returns the file pointer or NULL</span>
-<a name="l00022"></a>00022 <span class="comment"> */</span>
-<a name="l00023"></a>00023 FILE *
-<a name="l00024"></a>00024 pOpenFontTableFile(<span class="keywordtype">void</span>)
-<a name="l00025"></a>00025 {
-<a name="l00026"></a>00026         FILE    *pFileR, *pFileW;
-<a name="l00027"></a>00027         <span class="keywordtype">char</span>    *szFontNamesFile;
-<a name="l00028"></a>00028         <span class="keywordtype">size_t</span>  tSize;
-<a name="l00029"></a>00029         BOOL    bFailed;
-<a name="l00030"></a>00030         <span class="keywordtype">char</span>    acBuffer[256];
-<a name="l00031"></a>00031 
-<a name="l00032"></a>00032         pFileR = fopen(<span class="stringliteral">&quot;&lt;AntiWord$FontNamesFile&gt;&quot;</span>, <span class="stringliteral">&quot;r&quot;</span>);
-<a name="l00033"></a>00033         <span class="keywordflow">if</span> (pFileR != NULL) {
-<a name="l00034"></a>00034                 <span class="comment">/* The font table is already in the right directory */</span>
-<a name="l00035"></a>00035                 <span class="keywordflow">return</span> pFileR;
-<a name="l00036"></a>00036         }
-<a name="l00037"></a>00037 
-<a name="l00038"></a>00038         szFontNamesFile = getenv(<span class="stringliteral">&quot;AntiWord$FontNamesSave&quot;</span>);
-<a name="l00039"></a>00039         <span class="keywordflow">if</span> (szFontNamesFile == NULL) {
-<a name="l00040"></a>00040                 werr(0, <span class="stringliteral">&quot;Warning: Name of the FontNames file not found&quot;</span>);
-<a name="l00041"></a>00041                 <span class="keywordflow">return</span> NULL;
-<a name="l00042"></a>00042         }
-<a name="l00043"></a>00043         DBG_MSG(szFontNamesFile);
-<a name="l00044"></a>00044 
-<a name="l00045"></a>00045         pFileR = fopen(<span class="stringliteral">&quot;&lt;AntiWord$Dir&gt;.Resources.Default&quot;</span>, <span class="stringliteral">&quot;r&quot;</span>);
-<a name="l00046"></a>00046         <span class="keywordflow">if</span> (pFileR == NULL) {
-<a name="l00047"></a>00047                 werr(0, <span class="stringliteral">&quot;I can&#39;t find &#39;Resources.Default&#39;&quot;</span>);
-<a name="l00048"></a>00048                 <span class="keywordflow">return</span> NULL;
-<a name="l00049"></a>00049         }
-<a name="l00050"></a>00050         <span class="comment">/* Here the default font translation table is known to exist */</span>
-<a name="l00051"></a>00051 
-<a name="l00052"></a>00052         <span class="keywordflow">if</span> (!bMakeDirectory(szFontNamesFile)) {
-<a name="l00053"></a>00053                 werr(0,
-<a name="l00054"></a>00054                 <span class="stringliteral">&quot;I can&#39;t make a directory for the FontNames file&quot;</span>);
-<a name="l00055"></a>00055                 <span class="keywordflow">return</span> NULL;
-<a name="l00056"></a>00056         }
-<a name="l00057"></a>00057         <span class="comment">/* Here the proper directory is known to exist */</span>
-<a name="l00058"></a>00058 
-<a name="l00059"></a>00059         pFileW = fopen(szFontNamesFile, <span class="stringliteral">&quot;w&quot;</span>);
-<a name="l00060"></a>00060         <span class="keywordflow">if</span> (pFileW == NULL) {
-<a name="l00061"></a>00061                 (void)fclose(pFileR);
-<a name="l00062"></a>00062                 werr(0, <span class="stringliteral">&quot;I can&#39;t create a default FontNames file&quot;</span>);
-<a name="l00063"></a>00063                 <span class="keywordflow">return</span> NULL;
-<a name="l00064"></a>00064         }
-<a name="l00065"></a>00065         <span class="comment">/* Here the proper directory is known to be writeable */</span>
-<a name="l00066"></a>00066 
-<a name="l00067"></a>00067         <span class="comment">/* Copy the default FontNames file */</span>
-<a name="l00068"></a>00068         bFailed = FALSE;
-<a name="l00069"></a>00069         <span class="keywordflow">while</span> (!feof(pFileR)) {
-<a name="l00070"></a>00070                 tSize = fread(acBuffer, 1, <span class="keyword">sizeof</span>(acBuffer), pFileR);
-<a name="l00071"></a>00071                 <span class="keywordflow">if</span> (ferror(pFileR)) {
-<a name="l00072"></a>00072                         DBG_MSG(<span class="stringliteral">&quot;Read error&quot;</span>);
-<a name="l00073"></a>00073                         bFailed = TRUE;
-<a name="l00074"></a>00074                         <span class="keywordflow">break</span>;
-<a name="l00075"></a>00075                 }
-<a name="l00076"></a>00076                 <span class="keywordflow">if</span> (fwrite(acBuffer, 1, tSize, pFileW) != tSize) {
-<a name="l00077"></a>00077                         DBG_MSG(<span class="stringliteral">&quot;Write error&quot;</span>);
-<a name="l00078"></a>00078                         bFailed = TRUE;
-<a name="l00079"></a>00079                         <span class="keywordflow">break</span>;
-<a name="l00080"></a>00080                 }
-<a name="l00081"></a>00081         }
-<a name="l00082"></a>00082         (void)fclose(pFileW);
-<a name="l00083"></a>00083         (void)fclose(pFileR);
-<a name="l00084"></a>00084         <span class="keywordflow">if</span> (bFailed) {
-<a name="l00085"></a>00085                 DBG_MSG(<span class="stringliteral">&quot;Copying the FontNames file failed&quot;</span>);
-<a name="l00086"></a>00086                 (void)<span class="keyword">remove</span>(szFontNamesFile);
-<a name="l00087"></a>00087                 <span class="keywordflow">return</span> NULL;
-<a name="l00088"></a>00088         }
-<a name="l00089"></a>00089         <span class="keywordflow">return</span> fopen(szFontNamesFile, <span class="stringliteral">&quot;r&quot;</span>);
-<a name="l00090"></a>00090 } <span class="comment">/* end of pOpenFontTableFile */</span>
-<a name="l00091"></a>00091 
-<a name="l00092"></a>00092 <span class="comment">/*</span>
-<a name="l00093"></a>00093 <span class="comment"> * vCloseFont - close the current font, if any</span>
-<a name="l00094"></a>00094 <span class="comment"> */</span>
-<a name="l00095"></a>00095 <span class="keywordtype">void</span>
-<a name="l00096"></a>00096 vCloseFont(<span class="keywordtype">void</span>)
-<a name="l00097"></a>00097 {
-<a name="l00098"></a>00098         os_error        *e;
-<a name="l00099"></a>00099 
-<a name="l00100"></a>00100         NO_DBG_MSG(<span class="stringliteral">&quot;vCloseFont&quot;</span>);
-<a name="l00101"></a>00101 
-<a name="l00102"></a>00102         <span class="keywordflow">if</span> (tFontCurr == (font_handle)-1) {
-<a name="l00103"></a>00103                 <span class="keywordflow">return</span>;
-<a name="l00104"></a>00104         }
-<a name="l00105"></a>00105         e = Font_LoseFont(tFontCurr);
-<a name="l00106"></a>00106         <span class="keywordflow">if</span> (e != NULL) {
-<a name="l00107"></a>00107                 werr(0, <span class="stringliteral">&quot;Close font error %d: %s&quot;</span>, e-&gt;errnum, e-&gt;errmess);
-<a name="l00108"></a>00108         }
-<a name="l00109"></a>00109         tFontCurr = (font_handle)-1;
-<a name="l00110"></a>00110 } <span class="comment">/* end of vCloseFont */</span>
-<a name="l00111"></a>00111 
-<a name="l00112"></a>00112 <span class="comment">/*</span>
-<a name="l00113"></a>00113 <span class="comment"> * tOpenFont - make the specified font the current font</span>
-<a name="l00114"></a>00114 <span class="comment"> *</span>
-<a name="l00115"></a>00115 <span class="comment"> * Returns the font reference number for use in a draw file</span>
-<a name="l00116"></a>00116 <span class="comment"> */</span>
-<a name="l00117"></a>00117 drawfile_fontref
-<a name="l00118"></a>00118 tOpenFont(UCHAR ucWordFontNumber, USHORT usFontStyle, USHORT usWordFontSize)
-<a name="l00119"></a>00119 {
-<a name="l00120"></a>00120         os_error        *e;
-<a name="l00121"></a>00121         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szOurFontname;
-<a name="l00122"></a>00122         font_handle     tFont;
-<a name="l00123"></a>00123         <span class="keywordtype">int</span>     iFontnumber;
-<a name="l00124"></a>00124 
-<a name="l00125"></a>00125         NO_DBG_MSG(<span class="stringliteral">&quot;tOpenFont&quot;</span>);
-<a name="l00126"></a>00126         NO_DBG_DEC(ucWordFontNumber);
-<a name="l00127"></a>00127         NO_DBG_HEX(usFontStyle);
-<a name="l00128"></a>00128         NO_DBG_DEC(usWordFontSize);
-<a name="l00129"></a>00129 
-<a name="l00130"></a>00130         <span class="comment">/* Keep the relevant bits */</span>
-<a name="l00131"></a>00131         usFontStyle &amp;= FONT_BOLD|FONT_ITALIC;
-<a name="l00132"></a>00132         NO_DBG_HEX(usFontStyle);
-<a name="l00133"></a>00133 
-<a name="l00134"></a>00134         iFontnumber = iGetFontByNumber(ucWordFontNumber, usFontStyle);
-<a name="l00135"></a>00135         szOurFontname = szGetOurFontname(iFontnumber);
-<a name="l00136"></a>00136         <span class="keywordflow">if</span> (szOurFontname == NULL || szOurFontname[0] == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00137"></a>00137                 tFontCurr = (font_handle)-1;
-<a name="l00138"></a>00138                 <span class="keywordflow">return</span> (byte)0;
-<a name="l00139"></a>00139         }
-<a name="l00140"></a>00140         NO_DBG_MSG(szOurFontname);
-<a name="l00141"></a>00141         e = Font_FindFont(&amp;tFont, (<span class="keywordtype">char</span> *)szOurFontname,
-<a name="l00142"></a>00142                         (<span class="keywordtype">int</span>)usWordFontSize * 8, (<span class="keywordtype">int</span>)usWordFontSize * 8,
-<a name="l00143"></a>00143                         0, 0);
-<a name="l00144"></a>00144         <span class="keywordflow">if</span> (e != NULL) {
-<a name="l00145"></a>00145                 <span class="keywordflow">switch</span> (e-&gt;errnum) {
-<a name="l00146"></a>00146                 <span class="keywordflow">case</span> 523:
-<a name="l00147"></a>00147                         werr(0, <span class="stringliteral">&quot;%s&quot;</span>, e-&gt;errmess);
-<a name="l00148"></a>00148                         <span class="keywordflow">break</span>;
-<a name="l00149"></a>00149                 <span class="keywordflow">default</span>:
-<a name="l00150"></a>00150                         werr(0, <span class="stringliteral">&quot;Open font error %d: %s&quot;</span>,
-<a name="l00151"></a>00151                                 e-&gt;errnum, e-&gt;errmess);
-<a name="l00152"></a>00152                         <span class="keywordflow">break</span>;
-<a name="l00153"></a>00153                 }
-<a name="l00154"></a>00154                 tFontCurr = (font_handle)-1;
-<a name="l00155"></a>00155                 <span class="keywordflow">return</span> (drawfile_fontref)0;
-<a name="l00156"></a>00156         }
-<a name="l00157"></a>00157         tFontCurr = tFont;
-<a name="l00158"></a>00158         NO_DBG_DEC(tFontCurr);
-<a name="l00159"></a>00159         <span class="keywordflow">return</span> (drawfile_fontref)(iFontnumber + 1);
-<a name="l00160"></a>00160 } <span class="comment">/* end of tOpenFont */</span>
-<a name="l00161"></a>00161 
-<a name="l00162"></a>00162 <span class="comment">/*</span>
-<a name="l00163"></a>00163 <span class="comment"> * tOpenTableFont - make the table font the current font</span>
-<a name="l00164"></a>00164 <span class="comment"> *</span>
-<a name="l00165"></a>00165 <span class="comment"> * Returns the font reference number for use in a draw file</span>
-<a name="l00166"></a>00166 <span class="comment"> */</span>
-<a name="l00167"></a>00167 drawfile_fontref
-<a name="l00168"></a>00168 tOpenTableFont(USHORT usWordFontSize)
-<a name="l00169"></a>00169 {
-<a name="l00170"></a>00170         <span class="keywordtype">int</span>     iWordFontnumber;
-<a name="l00171"></a>00171 
-<a name="l00172"></a>00172         NO_DBG_MSG(<span class="stringliteral">&quot;tOpenTableFont&quot;</span>);
-<a name="l00173"></a>00173 
-<a name="l00174"></a>00174         iWordFontnumber = iFontname2Fontnumber(TABLE_FONT, FONT_REGULAR);
-<a name="l00175"></a>00175         <span class="keywordflow">if</span> (iWordFontnumber &lt; 0 || iWordFontnumber &gt; (<span class="keywordtype">int</span>)UCHAR_MAX) {
-<a name="l00176"></a>00176                 DBG_DEC(iWordFontnumber);
-<a name="l00177"></a>00177                 tFontCurr = (font_handle)-1;
-<a name="l00178"></a>00178                 <span class="keywordflow">return</span> (drawfile_fontref)0;
-<a name="l00179"></a>00179         }
-<a name="l00180"></a>00180 
-<a name="l00181"></a>00181         <span class="keywordflow">return</span> tOpenFont((UCHAR)iWordFontnumber, FONT_REGULAR, usWordFontSize);
-<a name="l00182"></a>00182 } <span class="comment">/* end of tOpenTableFont */</span>
-<a name="l00183"></a>00183 
-<a name="l00184"></a>00184 <span class="comment">/*</span>
-<a name="l00185"></a>00185 <span class="comment"> * lComputeStringWidth - compute the string width</span>
-<a name="l00186"></a>00186 <span class="comment"> *</span>
-<a name="l00187"></a>00187 <span class="comment"> * Returns the string width in millipoints</span>
-<a name="l00188"></a>00188 <span class="comment"> */</span>
-<a name="l00189"></a>00189 <span class="keywordtype">long</span>
-<a name="l00190"></a>00190 lComputeStringWidth(<span class="keyword">const</span> <span class="keywordtype">char</span> *szString, <span class="keywordtype">size_t</span> tStringLength,
-<a name="l00191"></a>00191         drawfile_fontref tFontRef, USHORT usFontSize)
-<a name="l00192"></a>00192 {
-<a name="l00193"></a>00193         font_string     tStr;
-<a name="l00194"></a>00194         os_error        *e;
-<a name="l00195"></a>00195 
-<a name="l00196"></a>00196         fail(szString == NULL);
-<a name="l00197"></a>00197         fail(usFontSize &lt; MIN_FONT_SIZE || usFontSize &gt; MAX_FONT_SIZE);
-<a name="l00198"></a>00198 
-<a name="l00199"></a>00199         <span class="keywordflow">if</span> (szString[0] == <span class="charliteral">&#39;\0&#39;</span> || tStringLength == 0) {
-<a name="l00200"></a>00200                 <span class="comment">/* Empty string */</span>
-<a name="l00201"></a>00201                 <span class="keywordflow">return</span> 0;
-<a name="l00202"></a>00202         }
-<a name="l00203"></a>00203         <span class="keywordflow">if</span> (tStringLength == 1 &amp;&amp; szString[0] == TABLE_SEPARATOR) {
-<a name="l00204"></a>00204                 <span class="comment">/* Font_strwidth doesn&#39;t like control characters */</span>
-<a name="l00205"></a>00205                 <span class="keywordflow">return</span> 0;
-<a name="l00206"></a>00206         }
-<a name="l00207"></a>00207         <span class="keywordflow">if</span> (tFontCurr == (font_handle)-1) {
-<a name="l00208"></a>00208                 <span class="comment">/* No current font, use systemfont */</span>
-<a name="l00209"></a>00209                 <span class="keywordflow">return</span> lChar2MilliPoints(tStringLength);
-<a name="l00210"></a>00210         }
-<a name="l00211"></a>00211         tStr.s = (<span class="keywordtype">char</span> *)szString;
-<a name="l00212"></a>00212         tStr.x = INT_MAX;
-<a name="l00213"></a>00213         tStr.y = INT_MAX;
-<a name="l00214"></a>00214         tStr.split = -1;
-<a name="l00215"></a>00215         tStr.term = tStringLength;
-<a name="l00216"></a>00216         e = Font_StringWidth(&amp;tStr);
-<a name="l00217"></a>00217         <span class="keywordflow">if</span> (e == NULL) {
-<a name="l00218"></a>00218                 <span class="keywordflow">return</span> (<span class="keywordtype">long</span>)tStr.x;
-<a name="l00219"></a>00219         }
-<a name="l00220"></a>00220         DBG_DEC(e-&gt;errnum);
-<a name="l00221"></a>00221         DBG_MSG(e-&gt;errmess);
-<a name="l00222"></a>00222         DBG_DEC(tStringLength);
-<a name="l00223"></a>00223         DBG_MSG(szString);
-<a name="l00224"></a>00224         werr(0, <span class="stringliteral">&quot;String width error %d: %s&quot;</span>, e-&gt;errnum, e-&gt;errmess);
-<a name="l00225"></a>00225         <span class="keywordflow">return</span> lChar2MilliPoints(tStringLength);
-<a name="l00226"></a>00226 } <span class="comment">/* end of lComputeStringWidth */</span>
-<a name="l00227"></a>00227 
-<a name="l00228"></a>00228 <span class="comment">/*</span>
-<a name="l00229"></a>00229 <span class="comment"> * tCountColumns - count the number of columns in a string</span>
-<a name="l00230"></a>00230 <span class="comment"> *</span>
-<a name="l00231"></a>00231 <span class="comment"> * Returns the number of columns</span>
-<a name="l00232"></a>00232 <span class="comment"> */</span>
-<a name="l00233"></a>00233 <span class="keywordtype">size_t</span>
-<a name="l00234"></a>00234 tCountColumns(<span class="keyword">const</span> <span class="keywordtype">char</span> *szString, <span class="keywordtype">size_t</span> tLength)
-<a name="l00235"></a>00235 {
-<a name="l00236"></a>00236         fail(szString == NULL);
-<a name="l00237"></a>00237 
-<a name="l00238"></a>00238         <span class="comment">/* One byte, one character, one column */</span>
-<a name="l00239"></a>00239         <span class="keywordflow">return</span> tLength;
-<a name="l00240"></a>00240 } <span class="comment">/* end of tCountColumns */</span>
-<a name="l00241"></a>00241 
-<a name="l00242"></a>00242 <span class="comment">/*</span>
-<a name="l00243"></a>00243 <span class="comment"> * tGetCharacterLength - the length of the specified character in bytes</span>
-<a name="l00244"></a>00244 <span class="comment"> *</span>
-<a name="l00245"></a>00245 <span class="comment"> * Returns the length in bytes</span>
-<a name="l00246"></a>00246 <span class="comment"> */</span>
-<a name="l00247"></a>00247 <span class="keywordtype">size_t</span>
-<a name="l00248"></a>00248 tGetCharacterLength(<span class="keyword">const</span> <span class="keywordtype">char</span> *szString)
-<a name="l00249"></a>00249 {
-<a name="l00250"></a>00250         <span class="keywordflow">return</span> 1;
-<a name="l00251"></a>00251 } <span class="comment">/* end of tGetCharacterLength */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/fonts__u_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,327 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/fonts_u.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/fonts_u.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * fonts_u.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1999-2004 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Functions to deal with fonts (Unix version)</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00013"></a>00013 <span class="preprocessor">#include &quot;fontinfo.h&quot;</span>
-<a name="l00014"></a>00014 
-<a name="l00015"></a>00015 <span class="comment">/* Don&#39;t use fonts, just plain text */</span>
-<a name="l00016"></a>00016 <span class="keyword">static</span> BOOL             bUsePlainText = TRUE;
-<a name="l00017"></a>00017 <span class="comment">/* Which character set should be used */</span>
-<a name="l00018"></a>00018 <span class="keyword">static</span> encoding_type    eEncoding = encoding_neutral;
-<a name="l00019"></a>00019 
-<a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="comment">/*</span>
-<a name="l00022"></a>00022 <span class="comment"> * pOpenFontTableFile - open the Font translation file</span>
-<a name="l00023"></a>00023 <span class="comment"> *</span>
-<a name="l00024"></a>00024 <span class="comment"> * Returns the file pointer or NULL</span>
-<a name="l00025"></a>00025 <span class="comment"> */</span>
-<a name="l00026"></a>00026 FILE *
-<a name="l00027"></a>00027 pOpenFontTableFile(<span class="keywordtype">void</span>)
-<a name="l00028"></a>00028 {
-<a name="l00029"></a>00029         FILE            *pFile;
-<a name="l00030"></a>00030         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szHome, *szAntiword, *szGlobalFile;
-<a name="l00031"></a>00031         <span class="keywordtype">char</span>            szEnvironmentFile[PATH_MAX+1];
-<a name="l00032"></a>00032         <span class="keywordtype">char</span>            szLocalFile[PATH_MAX+1];
-<a name="l00033"></a>00033 
-<a name="l00034"></a>00034         szEnvironmentFile[0] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00035"></a>00035         szLocalFile[0] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00036"></a>00036 
-<a name="l00037"></a>00037         <span class="comment">/* Try the environment version of the fontnames file */</span>
-<a name="l00038"></a>00038         szAntiword = szGetAntiwordDirectory();
-<a name="l00039"></a>00039         <span class="keywordflow">if</span> (szAntiword != NULL &amp;&amp; szAntiword[0] != <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00040"></a>00040                 <span class="keywordflow">if</span> (strlen(szAntiword) +
-<a name="l00041"></a>00041                     <span class="keyword">sizeof</span>(FILE_SEPARATOR FONTNAMES_FILE) &gt;=
-<a name="l00042"></a>00042                     <span class="keyword">sizeof</span>(szEnvironmentFile)) {
-<a name="l00043"></a>00043                         werr(0,
-<a name="l00044"></a>00044                         <span class="stringliteral">&quot;The name of your ANTIWORDHOME directory is too long&quot;</span>);
-<a name="l00045"></a>00045                         <span class="keywordflow">return</span> NULL;
-<a name="l00046"></a>00046                 }
-<a name="l00047"></a>00047                 sprintf(szEnvironmentFile, <span class="stringliteral">&quot;%s%s&quot;</span>,
-<a name="l00048"></a>00048                         szAntiword,
-<a name="l00049"></a>00049                         FILE_SEPARATOR FONTNAMES_FILE);
-<a name="l00050"></a>00050                 DBG_MSG(szEnvironmentFile);
-<a name="l00051"></a>00051 
-<a name="l00052"></a>00052                 pFile = fopen(szEnvironmentFile, <span class="stringliteral">&quot;r&quot;</span>);
-<a name="l00053"></a>00053                 <span class="keywordflow">if</span> (pFile != NULL) {
-<a name="l00054"></a>00054                         <span class="keywordflow">return</span> pFile;
-<a name="l00055"></a>00055                 }
-<a name="l00056"></a>00056         }
-<a name="l00057"></a>00057 
-<a name="l00058"></a>00058         <span class="comment">/* Try the local version of the fontnames file */</span>
-<a name="l00059"></a>00059         szHome = szGetHomeDirectory();
-<a name="l00060"></a>00060         <span class="keywordflow">if</span> (strlen(szHome) +
-<a name="l00061"></a>00061             <span class="keyword">sizeof</span>(FILE_SEPARATOR ANTIWORD_DIR FILE_SEPARATOR FONTNAMES_FILE) &gt;=
-<a name="l00062"></a>00062             <span class="keyword">sizeof</span>(szLocalFile)) {
-<a name="l00063"></a>00063                 werr(0, <span class="stringliteral">&quot;The name of your HOME directory is too long&quot;</span>);
-<a name="l00064"></a>00064                 <span class="keywordflow">return</span> NULL;
-<a name="l00065"></a>00065         }
-<a name="l00066"></a>00066 
-<a name="l00067"></a>00067 <span class="preprocessor">        #ifndef SYMBIAN</span>
-<a name="l00068"></a>00068 <span class="preprocessor"></span>        sprintf(szLocalFile, <span class="stringliteral">&quot;%s%s&quot;</span>,
-<a name="l00069"></a>00069                 szHome,
-<a name="l00070"></a>00070                 FILE_SEPARATOR ANTIWORD_DIR FILE_SEPARATOR FONTNAMES_FILE);
-<a name="l00071"></a>00071                 DBG_MSG(szLocalFile);
-<a name="l00072"></a>00072 <span class="preprocessor">        #else</span>
-<a name="l00073"></a>00073 <span class="preprocessor"></span>        sprintf(szLocalFile, <span class="stringliteral">&quot;%s%s&quot;</span>,
-<a name="l00074"></a>00074                 szHome,
-<a name="l00075"></a>00075                 FONTNAMES_FILE);
-<a name="l00076"></a>00076                 DBG_MSG(szLocalFile);
-<a name="l00077"></a>00077 <span class="preprocessor">        #endif </span><span class="comment">/*SYMBIAN*/</span>
-<a name="l00078"></a>00078         pFile = fopen(szLocalFile, <span class="stringliteral">&quot;r&quot;</span>);
-<a name="l00079"></a>00079         <span class="keywordflow">if</span> (pFile != NULL) {
-<a name="l00080"></a>00080                 <span class="keywordflow">return</span> pFile;
-<a name="l00081"></a>00081         }
-<a name="l00082"></a>00082 
-<a name="l00083"></a>00083         <span class="comment">/* Try the global version of the fontnames file */</span>
-<a name="l00084"></a>00084         szGlobalFile = GLOBAL_ANTIWORD_DIR FILE_SEPARATOR FONTNAMES_FILE;
-<a name="l00085"></a>00085         DBG_MSG(szGlobalFile);
-<a name="l00086"></a>00086 
-<a name="l00087"></a>00087         pFile = fopen(szGlobalFile, <span class="stringliteral">&quot;r&quot;</span>);
-<a name="l00088"></a>00088         <span class="keywordflow">if</span> (pFile != NULL) {
-<a name="l00089"></a>00089                 <span class="keywordflow">return</span> pFile;
-<a name="l00090"></a>00090         }
-<a name="l00091"></a>00091 
-<a name="l00092"></a>00092         <span class="keywordflow">if</span> (szEnvironmentFile[0] != <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00093"></a>00093                 werr(0, <span class="stringliteral">&quot;I can not open your fontnames file.\n&quot;</span>
-<a name="l00094"></a>00094                         <span class="stringliteral">&quot;Neither &#39;%s&#39; nor\n&quot;</span>
-<a name="l00095"></a>00095                         <span class="stringliteral">&quot;&#39;%s&#39; nor\n&quot;</span>
-<a name="l00096"></a>00096                         <span class="stringliteral">&quot;&#39;%s&#39; can be opened for reading.&quot;</span>,
-<a name="l00097"></a>00097                         szEnvironmentFile, szLocalFile, szGlobalFile);
-<a name="l00098"></a>00098         } <span class="keywordflow">else</span> {
-<a name="l00099"></a>00099                 werr(0, <span class="stringliteral">&quot;I can not open your fontnames file.\n&quot;</span>
-<a name="l00100"></a>00100                         <span class="stringliteral">&quot;Neither &#39;%s&#39; nor\n&quot;</span>
-<a name="l00101"></a>00101                         <span class="stringliteral">&quot;&#39;%s&#39; can be opened for reading.&quot;</span>,
-<a name="l00102"></a>00102                         szLocalFile, szGlobalFile);
-<a name="l00103"></a>00103         }
-<a name="l00104"></a>00104         <span class="keywordflow">return</span> NULL;
-<a name="l00105"></a>00105 } <span class="comment">/* end of pOpenFontTableFile */</span>
-<a name="l00106"></a>00106 
-<a name="l00107"></a>00107 <span class="comment">/*</span>
-<a name="l00108"></a>00108 <span class="comment"> * vCloseFont - close the current font, if any</span>
-<a name="l00109"></a>00109 <span class="comment"> */</span>
-<a name="l00110"></a>00110 <span class="keywordtype">void</span>
-<a name="l00111"></a>00111 vCloseFont(<span class="keywordtype">void</span>)
-<a name="l00112"></a>00112 {
-<a name="l00113"></a>00113         NO_DBG_MSG(<span class="stringliteral">&quot;vCloseFont&quot;</span>);
-<a name="l00114"></a>00114         <span class="comment">/* For safety: to be overwritten at the next call of tOpenfont() */</span>
-<a name="l00115"></a>00115         eEncoding = encoding_neutral;
-<a name="l00116"></a>00116         bUsePlainText = TRUE;
-<a name="l00117"></a>00117 } <span class="comment">/* end of vCloseFont */</span>
-<a name="l00118"></a>00118 
-<a name="l00119"></a>00119 <span class="comment">/*</span>
-<a name="l00120"></a>00120 <span class="comment"> * tOpenFont - make the specified font the current font</span>
-<a name="l00121"></a>00121 <span class="comment"> *</span>
-<a name="l00122"></a>00122 <span class="comment"> * Returns the font reference number</span>
-<a name="l00123"></a>00123 <span class="comment"> */</span>
-<a name="l00124"></a>00124 drawfile_fontref
-<a name="l00125"></a>00125 tOpenFont(UCHAR ucWordFontNumber, USHORT usFontStyle, USHORT usWordFontSize)
-<a name="l00126"></a>00126 {
-<a name="l00127"></a>00127         options_type    tOptions;
-<a name="l00128"></a>00128         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szOurFontname;
-<a name="l00129"></a>00129         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00130"></a>00130         <span class="keywordtype">int</span>     iFontnumber;
-<a name="l00131"></a>00131 
-<a name="l00132"></a>00132         NO_DBG_MSG(<span class="stringliteral">&quot;tOpenFont&quot;</span>);
-<a name="l00133"></a>00133         NO_DBG_DEC(ucWordFontNumber);
-<a name="l00134"></a>00134         NO_DBG_HEX(usFontStyle);
-<a name="l00135"></a>00135         NO_DBG_DEC(usWordFontSize);
-<a name="l00136"></a>00136 
-<a name="l00137"></a>00137         <span class="comment">/* Keep the relevant bits */</span>
-<a name="l00138"></a>00138         usFontStyle &amp;= FONT_BOLD|FONT_ITALIC;
-<a name="l00139"></a>00139         NO_DBG_HEX(usFontStyle);
-<a name="l00140"></a>00140 
-<a name="l00141"></a>00141         vGetOptions(&amp;tOptions);
-<a name="l00142"></a>00142         eEncoding = tOptions.eEncoding;
-<a name="l00143"></a>00143         bUsePlainText = tOptions.eConversionType != conversion_draw &amp;&amp;
-<a name="l00144"></a>00144                         tOptions.eConversionType != conversion_ps &amp;&amp;
-<a name="l00145"></a>00145                         tOptions.eConversionType != conversion_pdf;
-<a name="l00146"></a>00146 
-<a name="l00147"></a>00147         <span class="keywordflow">if</span> (bUsePlainText) {
-<a name="l00148"></a>00148                 <span class="comment">/* Plain text, no fonts */</span>
-<a name="l00149"></a>00149                 <span class="keywordflow">return</span> (drawfile_fontref)0;
-<a name="l00150"></a>00150         }
-<a name="l00151"></a>00151 
-<a name="l00152"></a>00152         iFontnumber = iGetFontByNumber(ucWordFontNumber, usFontStyle);
-<a name="l00153"></a>00153         szOurFontname = szGetOurFontname(iFontnumber);
-<a name="l00154"></a>00154         <span class="keywordflow">if</span> (szOurFontname == NULL || szOurFontname[0] == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00155"></a>00155                 DBG_DEC(iFontnumber);
-<a name="l00156"></a>00156                 <span class="keywordflow">return</span> (drawfile_fontref)0;
-<a name="l00157"></a>00157         }
-<a name="l00158"></a>00158         NO_DBG_MSG(szOurFontname);
-<a name="l00159"></a>00159 
-<a name="l00160"></a>00160         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; elementsof(szFontnames); tIndex++) {
-<a name="l00161"></a>00161                 <span class="keywordflow">if</span> (STREQ(szFontnames[tIndex], szOurFontname)) {
-<a name="l00162"></a>00162                         NO_DBG_DEC(tIndex);
-<a name="l00163"></a>00163                         <span class="keywordflow">return</span> (drawfile_fontref)tIndex;
-<a name="l00164"></a>00164                 }
-<a name="l00165"></a>00165         }
-<a name="l00166"></a>00166         <span class="keywordflow">return</span> (drawfile_fontref)0;
-<a name="l00167"></a>00167 } <span class="comment">/* end of tOpenFont */</span>
-<a name="l00168"></a>00168 
-<a name="l00169"></a>00169 <span class="comment">/*</span>
-<a name="l00170"></a>00170 <span class="comment"> * tOpenTableFont - make the table font the current font</span>
-<a name="l00171"></a>00171 <span class="comment"> *</span>
-<a name="l00172"></a>00172 <span class="comment"> * Returns the font reference number</span>
-<a name="l00173"></a>00173 <span class="comment"> */</span>
-<a name="l00174"></a>00174 drawfile_fontref
-<a name="l00175"></a>00175 tOpenTableFont(USHORT usWordFontSize)
-<a name="l00176"></a>00176 {
-<a name="l00177"></a>00177         options_type    tOptions;
-<a name="l00178"></a>00178         <span class="keywordtype">int</span>     iWordFontnumber;
-<a name="l00179"></a>00179 
-<a name="l00180"></a>00180         NO_DBG_MSG(<span class="stringliteral">&quot;tOpenTableFont&quot;</span>);
-<a name="l00181"></a>00181 
-<a name="l00182"></a>00182         vGetOptions(&amp;tOptions);
-<a name="l00183"></a>00183         eEncoding = tOptions.eEncoding;
-<a name="l00184"></a>00184         bUsePlainText = tOptions.eConversionType != conversion_draw &amp;&amp;
-<a name="l00185"></a>00185                         tOptions.eConversionType != conversion_ps &amp;&amp;
-<a name="l00186"></a>00186                         tOptions.eConversionType != conversion_pdf;
-<a name="l00187"></a>00187 
-<a name="l00188"></a>00188         <span class="keywordflow">if</span> (bUsePlainText) {
-<a name="l00189"></a>00189                 <span class="comment">/* Plain text, no fonts */</span>
-<a name="l00190"></a>00190                 <span class="keywordflow">return</span> (drawfile_fontref)0;
-<a name="l00191"></a>00191         }
-<a name="l00192"></a>00192 
-<a name="l00193"></a>00193         iWordFontnumber = iFontname2Fontnumber(TABLE_FONT, FONT_REGULAR);
-<a name="l00194"></a>00194         <span class="keywordflow">if</span> (iWordFontnumber &lt; 0 || iWordFontnumber &gt; (<span class="keywordtype">int</span>)UCHAR_MAX) {
-<a name="l00195"></a>00195                 DBG_DEC(iWordFontnumber);
-<a name="l00196"></a>00196                 <span class="keywordflow">return</span> (drawfile_fontref)0;
-<a name="l00197"></a>00197         }
-<a name="l00198"></a>00198 
-<a name="l00199"></a>00199         <span class="keywordflow">return</span> tOpenFont((UCHAR)iWordFontnumber, FONT_REGULAR, usWordFontSize);
-<a name="l00200"></a>00200 } <span class="comment">/* end of tOpenTableFont */</span>
-<a name="l00201"></a>00201 
-<a name="l00202"></a>00202 <span class="comment">/*</span>
-<a name="l00203"></a>00203 <span class="comment"> * szGetFontname - get the fontname</span>
-<a name="l00204"></a>00204 <span class="comment"> */</span>
-<a name="l00205"></a>00205 <span class="keyword">const</span> <span class="keywordtype">char</span> *
-<a name="l00206"></a>00206 szGetFontname(drawfile_fontref tFontRef)
-<a name="l00207"></a>00207 {
-<a name="l00208"></a>00208         fail((<span class="keywordtype">size_t</span>)(UCHAR)tFontRef &gt;= elementsof(szFontnames));
-<a name="l00209"></a>00209         <span class="keywordflow">return</span> szFontnames[(int)(UCHAR)tFontRef];
-<a name="l00210"></a>00210 } <span class="comment">/* end of szGetFontname */</span>
-<a name="l00211"></a>00211 
-<a name="l00212"></a>00212 <span class="comment">/*</span>
-<a name="l00213"></a>00213 <span class="comment"> * lComputeStringWidth - compute the string width</span>
-<a name="l00214"></a>00214 <span class="comment"> *</span>
-<a name="l00215"></a>00215 <span class="comment"> * Note: the fontsize is specified in half-points!</span>
-<a name="l00216"></a>00216 <span class="comment"> *       the stringlength is specified in bytes, not characters!</span>
-<a name="l00217"></a>00217 <span class="comment"> *</span>
-<a name="l00218"></a>00218 <span class="comment"> * Returns the string width in millipoints</span>
-<a name="l00219"></a>00219 <span class="comment"> */</span>
-<a name="l00220"></a>00220 <span class="keywordtype">long</span>
-<a name="l00221"></a>00221 lComputeStringWidth(const <span class="keywordtype">char</span> *szString, <span class="keywordtype">size_t</span> tStringLength,
-<a name="l00222"></a>00222         drawfile_fontref tFontRef, USHORT usFontSize)
-<a name="l00223"></a>00223 {
-<a name="l00224"></a>00224         USHORT  *ausCharWidths;
-<a name="l00225"></a>00225         UCHAR   *pucChar;
-<a name="l00226"></a>00226         <span class="keywordtype">long</span>    lRelWidth;
-<a name="l00227"></a>00227         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00228"></a>00228         <span class="keywordtype">int</span>     iFontRef;
-<a name="l00229"></a>00229 
-<a name="l00230"></a>00230         fail(szString == NULL);
-<a name="l00231"></a>00231         fail(usFontSize &lt; MIN_FONT_SIZE || usFontSize &gt; MAX_FONT_SIZE);
-<a name="l00232"></a>00232 
-<a name="l00233"></a>00233         <span class="keywordflow">if</span> (szString[0] == <span class="charliteral">&#39;\0&#39;</span> || tStringLength == 0) {
-<a name="l00234"></a>00234                 <span class="comment">/* Empty string */</span>
-<a name="l00235"></a>00235                 <span class="keywordflow">return</span> 0;
-<a name="l00236"></a>00236         }
-<a name="l00237"></a>00237 
-<a name="l00238"></a>00238         <span class="keywordflow">if</span> (eEncoding == encoding_utf_8) {
-<a name="l00239"></a>00239                 fail(!bUsePlainText);
-<a name="l00240"></a>00240                 <span class="keywordflow">return</span> lChar2MilliPoints(
-<a name="l00241"></a>00241                         utf8_strwidth(szString, tStringLength));
-<a name="l00242"></a>00242         }
-<a name="l00243"></a>00243 
-<a name="l00244"></a>00244         <span class="keywordflow">if</span> (bUsePlainText) {
-<a name="l00245"></a>00245                 <span class="comment">/* No current font, use &quot;systemfont&quot; */</span>
-<a name="l00246"></a>00246                 <span class="keywordflow">return</span> lChar2MilliPoints(tStringLength);
-<a name="l00247"></a>00247         }
-<a name="l00248"></a>00248 
-<a name="l00249"></a>00249         <span class="keywordflow">if</span> (eEncoding == encoding_cyrillic) {
-<a name="l00250"></a>00250                 <span class="comment">/* FIXME: until the character tables are available */</span>
-<a name="l00251"></a>00251                 <span class="keywordflow">return</span> (tStringLength * 600L * (<span class="keywordtype">long</span>)usFontSize + 1) / 2;
-<a name="l00252"></a>00252         }
-<a name="l00253"></a>00253 
-<a name="l00254"></a>00254         DBG_DEC_C(eEncoding != encoding_latin_1 &amp;&amp;
-<a name="l00255"></a>00255                 eEncoding != encoding_latin_2, eEncoding);
-<a name="l00256"></a>00256         fail(eEncoding != encoding_latin_1 &amp;&amp;
-<a name="l00257"></a>00257                 eEncoding != encoding_latin_2);
-<a name="l00258"></a>00258 
-<a name="l00259"></a>00259         <span class="comment">/* Compute the relative string width */</span>
-<a name="l00260"></a>00260         iFontRef = (int)(UCHAR)tFontRef;
-<a name="l00261"></a>00261         <span class="keywordflow">if</span> (eEncoding == encoding_latin_2) {
-<a name="l00262"></a>00262                 ausCharWidths = ausCharacterWidths2[iFontRef];
-<a name="l00263"></a>00263         } <span class="keywordflow">else</span> {
-<a name="l00264"></a>00264                 ausCharWidths = ausCharacterWidths1[iFontRef];
-<a name="l00265"></a>00265         }
-<a name="l00266"></a>00266         lRelWidth = 0;
-<a name="l00267"></a>00267         <span class="keywordflow">for</span> (tIndex = 0, pucChar = (UCHAR *)szString;
-<a name="l00268"></a>00268              tIndex &lt; tStringLength;
-<a name="l00269"></a>00269              tIndex++, pucChar++) {
-<a name="l00270"></a>00270                 lRelWidth += (long)ausCharWidths[(<span class="keywordtype">int</span>)*pucChar];
-<a name="l00271"></a>00271         }
-<a name="l00272"></a>00272 
-<a name="l00273"></a>00273         <span class="comment">/* Compute the absolute string width */</span>
-<a name="l00274"></a>00274         <span class="keywordflow">return</span> (lRelWidth * (<span class="keywordtype">long</span>)usFontSize + 1) / 2;
-<a name="l00275"></a>00275 } <span class="comment">/* end of lComputeStringWidth */</span>
-<a name="l00276"></a>00276 
-<a name="l00277"></a>00277 <span class="comment">/*</span>
-<a name="l00278"></a>00278 <span class="comment"> * tCountColumns - count the number of columns in a string</span>
-<a name="l00279"></a>00279 <span class="comment"> *</span>
-<a name="l00280"></a>00280 <span class="comment"> * Note: the length is specified in bytes!</span>
-<a name="l00281"></a>00281 <span class="comment"> *       A UTF-8 a character can be 0, 1 or 2 columns wide.</span>
-<a name="l00282"></a>00282 <span class="comment"> *</span>
-<a name="l00283"></a>00283 <span class="comment"> * Returns the number of columns</span>
-<a name="l00284"></a>00284 <span class="comment"> */</span>
-<a name="l00285"></a>00285 <span class="keywordtype">size_t</span>
-<a name="l00286"></a>00286 tCountColumns(<span class="keyword">const</span> <span class="keywordtype">char</span> *szString, <span class="keywordtype">size_t</span> tLength)
-<a name="l00287"></a>00287 {
-<a name="l00288"></a>00288         fail(szString == NULL);
-<a name="l00289"></a>00289 
-<a name="l00290"></a>00290         <span class="keywordflow">if</span> (eEncoding != encoding_utf_8) {
-<a name="l00291"></a>00291                 <span class="comment">/* One byte, one character, one column */</span>
-<a name="l00292"></a>00292                 <span class="keywordflow">return</span> tLength;
-<a name="l00293"></a>00293         }
-<a name="l00294"></a>00294         <span class="keywordflow">return</span> (<span class="keywordtype">size_t</span>)utf8_strwidth(szString, tLength);
-<a name="l00295"></a>00295 } <span class="comment">/* end of tCountColumns */</span>
-<a name="l00296"></a>00296 
-<a name="l00297"></a>00297 <span class="comment">/*</span>
-<a name="l00298"></a>00298 <span class="comment"> * tGetCharacterLength - the length of the specified character in bytes</span>
-<a name="l00299"></a>00299 <span class="comment"> *</span>
-<a name="l00300"></a>00300 <span class="comment"> * Returns the length in bytes</span>
-<a name="l00301"></a>00301 <span class="comment"> */</span>
-<a name="l00302"></a>00302 <span class="keywordtype">size_t</span>
-<a name="l00303"></a>00303 tGetCharacterLength(<span class="keyword">const</span> <span class="keywordtype">char</span> *szString)
-<a name="l00304"></a>00304 {
-<a name="l00305"></a>00305         fail(szString == NULL);
-<a name="l00306"></a>00306 
-<a name="l00307"></a>00307         <span class="keywordflow">if</span> (eEncoding != encoding_utf_8) {
-<a name="l00308"></a>00308                 <span class="keywordflow">return</span> 1;
-<a name="l00309"></a>00309         }
-<a name="l00310"></a>00310         <span class="keywordflow">return</span> (<span class="keywordtype">size_t</span>)utf8_chrlength(szString);
-<a name="l00311"></a>00311 } <span class="comment">/* end of tGetCharacterLength */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/guid-72f72df3-653c-414c-a357-7613ad8bc169.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: antiword</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<div class="contents">
-
-
-<h1><a class="anchor" id="guid-72f72df3-653c-414c-a357-7613ad8bc169">antiword </a></h1><p>Source files:</p>
-<ul>
-<li><a href="antiword__reg_8rss_source.html">data\antiword_reg.rss</a></li>
-<li><a href="antiword_8mmp_source.html">group\antiword.mmp</a></li>
-<li><a href="_p_i_p_s_2antiword_2group_2_bld_8inf_source.html">group\bld.inf</a></li>
-<li><a href="antiword_8h_source.html">inc\antiword.h</a></li>
-<li><a href="debug_8h_source.html">inc\debug.h</a></li>
-<li><a href="draw_8h_source.html">inc\draw.h</a></li>
-<li><a href="drawfile_8h_source.html">inc\drawfile.h</a></li>
-<li><a href="fail_8h_source.html">inc\fail.h</a></li>
-<li><a href="fontinfo_8h_source.html">inc\fontinfo.h</a></li>
-<li><a href="version_8h_source.html">inc\version.h</a></li>
-<li><a href="wordconst_8h_source.html">inc\wordconst.h</a></li>
-<li><a href="wordtypes_8h_source.html">inc\wordtypes.h</a></li>
-<li><a href="_p_i_p_s_2antiword_2sis_2backup__registration_8xml_source.html">sis\backup_registration.xml</a></li>
-<li><a href="asc85enc_8c_source.html">src\asc85enc.c</a></li>
-<li><a href="blocklist_8c_source.html">src\blocklist.c</a></li>
-<li><a href="chartrans_8c_source.html">src\chartrans.c</a></li>
-<li><a href="datalist_8c_source.html">src\datalist.c</a></li>
-<li><a href="depot_8c_source.html">src\depot.c</a></li>
-<li><a href="dib2eps_8c_source.html">src\dib2eps.c</a></li>
-<li><a href="dib2sprt_8c_source.html">src\dib2sprt.c</a></li>
-<li><a href="doclist_8c_source.html">src\doclist.c</a></li>
-<li><a href="draw_8c_source.html">src\draw.c</a></li>
-<li><a href="drawfile_8c_source.html">src\drawfile.c</a></li>
-<li><a href="fail_8c_source.html">src\fail.c</a></li>
-<li><a href="finddata_8c_source.html">src\finddata.c</a></li>
-<li><a href="findtext_8c_source.html">src\findtext.c</a></li>
-<li><a href="fmt__text_8c_source.html">src\fmt_text.c</a></li>
-<li><a href="fontlist_8c_source.html">src\fontlist.c</a></li>
-<li><a href="fonts_8c_source.html">src\fonts.c</a></li>
-<li><a href="fonts__r_8c_source.html">src\fonts_r.c</a></li>
-<li><a href="fonts__u_8c_source.html">src\fonts_u.c</a></li>
-<li><a href="hdrftrlist_8c_source.html">src\hdrftrlist.c</a></li>
-<li><a href="icons_8c_source.html">src\icons.c</a></li>
-<li><a href="imgexam_8c_source.html">src\imgexam.c</a></li>
-<li><a href="imgtrans_8c_source.html">src\imgtrans.c</a></li>
-<li><a href="jpeg2eps_8c_source.html">src\jpeg2eps.c</a></li>
-<li><a href="jpeg2sprt_8c_source.html">src\jpeg2sprt.c</a></li>
-<li><a href="listlist_8c_source.html">src\listlist.c</a></li>
-<li><a href="main__ros_8c_source.html">src\main_ros.c</a></li>
-<li><a href="main__u_8c_source.html">src\main_u.c</a></li>
-<li><a href="misc_8c_source.html">src\misc.c</a></li>
-<li><a href="notes_8c_source.html">src\notes.c</a></li>
-<li><a href="options_8c_source.html">src\options.c</a></li>
-<li><a href="out2window_8c_source.html">src\out2window.c</a></li>
-<li><a href="output_8c_source.html">src\output.c</a></li>
-<li><a href="pdf_8c_source.html">src\pdf.c</a></li>
-<li><a href="pictlist_8c_source.html">src\pictlist.c</a></li>
-<li><a href="png2eps_8c_source.html">src\png2eps.c</a></li>
-<li><a href="png2sprt_8c_source.html">src\png2sprt.c</a></li>
-<li><a href="postscript_8c_source.html">src\postscript.c</a></li>
-<li><a href="prop0_8c_source.html">src\prop0.c</a></li>
-<li><a href="prop2_8c_source.html">src\prop2.c</a></li>
-<li><a href="prop6_8c_source.html">src\prop6.c</a></li>
-<li><a href="prop8_8c_source.html">src\prop8.c</a></li>
-<li><a href="properties_8c_source.html">src\properties.c</a></li>
-<li><a href="propmod_8c_source.html">src\propmod.c</a></li>
-<li><a href="riscos_8c_source.html">src\riscos.c</a></li>
-<li><a href="rowlist_8c_source.html">src\rowlist.c</a></li>
-<li><a href="saveas_8c_source.html">src\saveas.c</a></li>
-<li><a href="sectlist_8c_source.html">src\sectlist.c</a></li>
-<li><a href="startup_8c_source.html">src\startup.c</a></li>
-<li><a href="stylelist_8c_source.html">src\stylelist.c</a></li>
-<li><a href="stylesheet_8c_source.html">src\stylesheet.c</a></li>
-<li><a href="summary_8c_source.html">src\summary.c</a></li>
-<li><a href="tabstop_8c_source.html">src\tabstop.c</a></li>
-<li><a href="text_8c_source.html">src\text.c</a></li>
-<li><a href="unix_8c_source.html">src\unix.c</a></li>
-<li><a href="utf8_8c_source.html">src\utf8.c</a></li>
-<li><a href="word2text_8c_source.html">src\word2text.c</a></li>
-<li><a href="worddos_8c_source.html">src\worddos.c</a></li>
-<li><a href="wordlib_8c_source.html">src\wordlib.c</a></li>
-<li><a href="wordmac_8c_source.html">src\wordmac.c</a></li>
-<li><a href="wordole_8c_source.html">src\wordole.c</a></li>
-<li><a href="wordwin_8c_source.html">src\wordwin.c</a></li>
-<li><a href="xmalloc_8c_source.html">src\xmalloc.c</a></li>
-<li><a href="xml_8c_source.html">src\xml.c</a> </li>
-</ul>
-</div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/hdrftrlist_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,387 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/hdrftrlist.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/hdrftrlist.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * hdrftrlist.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2004,2005 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Build, read and destroy list(s) of Word Header/footer information</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00011"></a>00011 
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 <span class="preprocessor">#define HDR_EVEN_PAGES  0</span>
-<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define HDR_ODD_PAGES   1</span>
-<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#define FTR_EVEN_PAGES  2</span>
-<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#define FTR_ODD_PAGES   3</span>
-<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#define HDR_FIRST_PAGE  4</span>
-<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define FTR_FIRST_PAGE  5</span>
-<a name="l00019"></a>00019 <span class="preprocessor"></span>
-<a name="l00020"></a>00020 <span class="comment">/*</span>
-<a name="l00021"></a>00021 <span class="comment"> * Private structures to hide the way the information</span>
-<a name="l00022"></a>00022 <span class="comment"> * is stored from the rest of the program</span>
-<a name="l00023"></a>00023 <span class="comment"> */</span>
-<a name="l00024"></a>00024 <span class="keyword">typedef</span> <span class="keyword">struct </span>hdrftr_local_tag {
-<a name="l00025"></a>00025         hdrftr_block_type       tInfo;
-<a name="l00026"></a>00026         ULONG                   ulCharPosStart;
-<a name="l00027"></a>00027         ULONG                   ulCharPosNext;
-<a name="l00028"></a>00028         BOOL                    bUseful;
-<a name="l00029"></a>00029         BOOL                    bTextOriginal;
-<a name="l00030"></a>00030 } hdrftr_local_type;
-<a name="l00031"></a>00031 <span class="keyword">typedef</span> <span class="keyword">struct </span>hdrftr_mem_tag {
-<a name="l00032"></a>00032         hdrftr_local_type       atElement[6];
-<a name="l00033"></a>00033 } hdrftr_mem_type;
-<a name="l00034"></a>00034 
-<a name="l00035"></a>00035 <span class="comment">/* Variables needed to write the Header/footer Information List */</span>
-<a name="l00036"></a>00036 <span class="keyword">static</span> hdrftr_mem_type  *pHdrFtrList = NULL;
-<a name="l00037"></a>00037 <span class="keyword">static</span> <span class="keywordtype">size_t</span>           tHdrFtrLen = 0;
-<a name="l00038"></a>00038 
-<a name="l00039"></a>00039 
-<a name="l00040"></a>00040 <span class="comment">/*</span>
-<a name="l00041"></a>00041 <span class="comment"> * vDestroyHdrFtrInfoList - destroy the Header/footer Information List</span>
-<a name="l00042"></a>00042 <span class="comment"> */</span>
-<a name="l00043"></a>00043 <span class="keywordtype">void</span>
-<a name="l00044"></a>00044 vDestroyHdrFtrInfoList(<span class="keywordtype">void</span>)
-<a name="l00045"></a>00045 {
-<a name="l00046"></a>00046         hdrftr_mem_type *pRecord;
-<a name="l00047"></a>00047         output_type     *pCurr, *pNext;
-<a name="l00048"></a>00048         <span class="keywordtype">size_t</span>          tHdrFtr, tIndex;
-<a name="l00049"></a>00049 
-<a name="l00050"></a>00050         DBG_MSG(<span class="stringliteral">&quot;vDestroyHdrFtrInfoList&quot;</span>);
-<a name="l00051"></a>00051 
-<a name="l00052"></a>00052         <span class="comment">/* Free the Header/footer Information List */</span>
-<a name="l00053"></a>00053         <span class="keywordflow">for</span> (tHdrFtr = 0; tHdrFtr &lt; tHdrFtrLen; tHdrFtr++) {
-<a name="l00054"></a>00054                 pRecord = pHdrFtrList + tHdrFtr;
-<a name="l00055"></a>00055                 <span class="keywordflow">for</span> (tIndex = 0;
-<a name="l00056"></a>00056                      tIndex &lt; elementsof(pRecord-&gt;atElement);
-<a name="l00057"></a>00057                      tIndex++) {
-<a name="l00058"></a>00058                         <span class="keywordflow">if</span> (!pRecord-&gt;atElement[tIndex].bTextOriginal) {
-<a name="l00059"></a>00059                                 <span class="keywordflow">continue</span>;
-<a name="l00060"></a>00060                         }
-<a name="l00061"></a>00061                         pCurr = pRecord-&gt;atElement[tIndex].tInfo.pText;
-<a name="l00062"></a>00062                         <span class="keywordflow">while</span> (pCurr != NULL) {
-<a name="l00063"></a>00063                                 pCurr-&gt;szStorage = xfree(pCurr-&gt;szStorage);
-<a name="l00064"></a>00064                                 pNext = pCurr-&gt;pNext;
-<a name="l00065"></a>00065                                 pCurr = xfree(pCurr);
-<a name="l00066"></a>00066                                 pCurr = pNext;
-<a name="l00067"></a>00067                         }
-<a name="l00068"></a>00068                 }
-<a name="l00069"></a>00069         }
-<a name="l00070"></a>00070         pHdrFtrList = xfree(pHdrFtrList);
-<a name="l00071"></a>00071         <span class="comment">/* Reset all control variables */</span>
-<a name="l00072"></a>00072         tHdrFtrLen = 0;
-<a name="l00073"></a>00073 } <span class="comment">/* end of vDestroyHdrFtrInfoList */</span>
-<a name="l00074"></a>00074 
-<a name="l00075"></a>00075 <span class="comment">/*</span>
-<a name="l00076"></a>00076 <span class="comment"> * vCreat8HdrFtrInfoList - Create the Header/footer Information List</span>
-<a name="l00077"></a>00077 <span class="comment"> */</span>
-<a name="l00078"></a>00078 <span class="keywordtype">void</span>
-<a name="l00079"></a>00079 vCreat8HdrFtrInfoList(<span class="keyword">const</span> ULONG *aulCharPos, <span class="keywordtype">size_t</span> tLength)
-<a name="l00080"></a>00080 {
-<a name="l00081"></a>00081         hdrftr_mem_type *pListMember;
-<a name="l00082"></a>00082         <span class="keywordtype">size_t</span>  tHdrFtr, tIndex, tMainIndex;
-<a name="l00083"></a>00083 
-<a name="l00084"></a>00084         fail(aulCharPos == NULL);
-<a name="l00085"></a>00085 
-<a name="l00086"></a>00086         DBG_DEC(tLength);
-<a name="l00087"></a>00087         <span class="keywordflow">if</span> (tLength &lt;= 1) {
-<a name="l00088"></a>00088                 <span class="keywordflow">return</span>;
-<a name="l00089"></a>00089         }
-<a name="l00090"></a>00090         tHdrFtrLen = tLength / 12;
-<a name="l00091"></a>00091         <span class="keywordflow">if</span> (tLength % 12 != 0 &amp;&amp; tLength % 12 != 1) {
-<a name="l00092"></a>00092                 tHdrFtrLen++;
-<a name="l00093"></a>00093         }
-<a name="l00094"></a>00094         DBG_DEC(tHdrFtrLen);
-<a name="l00095"></a>00095 
-<a name="l00096"></a>00096         pHdrFtrList = xcalloc(tHdrFtrLen, <span class="keyword">sizeof</span>(hdrftr_mem_type));
-<a name="l00097"></a>00097 
-<a name="l00098"></a>00098         <span class="keywordflow">for</span> (tHdrFtr = 0; tHdrFtr &lt; tHdrFtrLen; tHdrFtr++) {
-<a name="l00099"></a>00099                 pListMember = pHdrFtrList + tHdrFtr;
-<a name="l00100"></a>00100                 <span class="keywordflow">for</span> (tIndex = 0, tMainIndex = tHdrFtr * 12;
-<a name="l00101"></a>00101                      tIndex &lt; 6 &amp;&amp; tMainIndex &lt; tLength;
-<a name="l00102"></a>00102                      tIndex++, tMainIndex++) {
-<a name="l00103"></a>00103                         pListMember-&gt;atElement[tIndex].tInfo.pText = NULL;
-<a name="l00104"></a>00104                         pListMember-&gt;atElement[tIndex].ulCharPosStart =
-<a name="l00105"></a>00105                                                 aulCharPos[tMainIndex];
-<a name="l00106"></a>00106                         <span class="keywordflow">if</span> (tMainIndex + 1 &lt; tLength) {
-<a name="l00107"></a>00107                                 pListMember-&gt;atElement[tIndex].ulCharPosNext =
-<a name="l00108"></a>00108                                         aulCharPos[tMainIndex + 1];
-<a name="l00109"></a>00109                         } <span class="keywordflow">else</span> {
-<a name="l00110"></a>00110                                 pListMember-&gt;atElement[tIndex].ulCharPosNext =
-<a name="l00111"></a>00111                                         aulCharPos[tMainIndex];
-<a name="l00112"></a>00112                         }
-<a name="l00113"></a>00113                 }
-<a name="l00114"></a>00114         }
-<a name="l00115"></a>00115 } <span class="comment">/* end of vCreat8HdrFtrInfoList */</span>
-<a name="l00116"></a>00116 
-<a name="l00117"></a>00117 <span class="comment">/*</span>
-<a name="l00118"></a>00118 <span class="comment"> * vCreat6HdrFtrInfoList - Create the Header/footer Information List</span>
-<a name="l00119"></a>00119 <span class="comment"> */</span>
-<a name="l00120"></a>00120 <span class="keywordtype">void</span>
-<a name="l00121"></a>00121 vCreat6HdrFtrInfoList(<span class="keyword">const</span> ULONG *aulCharPos, <span class="keywordtype">size_t</span> tLength)
-<a name="l00122"></a>00122 {
-<a name="l00123"></a>00123         <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">size_t</span>     atIndex[] =
-<a name="l00124"></a>00124                 { SIZE_T_MAX, SIZE_T_MAX, FTR_FIRST_PAGE, HDR_FIRST_PAGE,
-<a name="l00125"></a>00125                   FTR_ODD_PAGES, FTR_EVEN_PAGES, HDR_ODD_PAGES, HDR_EVEN_PAGES,
-<a name="l00126"></a>00126                 };
-<a name="l00127"></a>00127         hdrftr_mem_type *pListMember;
-<a name="l00128"></a>00128         <span class="keywordtype">size_t</span>  tHdrFtr, tTmp, tIndex, tMainIndex, tBit;
-<a name="l00129"></a>00129         UCHAR   ucDopSpecification, ucSepSpecification;
-<a name="l00130"></a>00130 
-<a name="l00131"></a>00131         fail(aulCharPos == NULL);
-<a name="l00132"></a>00132 
-<a name="l00133"></a>00133         DBG_DEC(tLength);
-<a name="l00134"></a>00134         <span class="keywordflow">if</span> (tLength &lt;= 1) {
-<a name="l00135"></a>00135                 <span class="keywordflow">return</span>;
-<a name="l00136"></a>00136         }
-<a name="l00137"></a>00137         tHdrFtrLen = tGetNumberOfSections();
-<a name="l00138"></a>00138         <span class="keywordflow">if</span> (tHdrFtrLen == 0) {
-<a name="l00139"></a>00139                 tHdrFtrLen = 1;
-<a name="l00140"></a>00140         }
-<a name="l00141"></a>00141         DBG_DEC(tHdrFtrLen);
-<a name="l00142"></a>00142 
-<a name="l00143"></a>00143         pHdrFtrList = xcalloc(tHdrFtrLen, <span class="keyword">sizeof</span>(hdrftr_mem_type));
-<a name="l00144"></a>00144 
-<a name="l00145"></a>00145         <span class="comment">/* Get the start index in aulCharPos */</span>
-<a name="l00146"></a>00146         ucDopSpecification = ucGetDopHdrFtrSpecification();
-<a name="l00147"></a>00147         DBG_HEX(ucDopSpecification &amp; 0xe0);
-<a name="l00148"></a>00148         tMainIndex = 0;
-<a name="l00149"></a>00149         <span class="keywordflow">for</span> (tBit = 7; tBit &gt;= 5; tBit--) {
-<a name="l00150"></a>00150                 <span class="keywordflow">if</span> ((ucDopSpecification &amp; BIT(tBit)) != 0) {
-<a name="l00151"></a>00151                         tMainIndex++;
-<a name="l00152"></a>00152                 }
-<a name="l00153"></a>00153         }
-<a name="l00154"></a>00154         DBG_DEC(tMainIndex);
-<a name="l00155"></a>00155 
-<a name="l00156"></a>00156         <span class="keywordflow">for</span> (tHdrFtr = 0; tHdrFtr &lt; tHdrFtrLen; tHdrFtr++) {
-<a name="l00157"></a>00157                 ucSepSpecification = ucGetSepHdrFtrSpecification(tHdrFtr);
-<a name="l00158"></a>00158                 DBG_HEX(ucSepSpecification &amp; 0xfc);
-<a name="l00159"></a>00159                 pListMember = pHdrFtrList + tHdrFtr;
-<a name="l00160"></a>00160                 <span class="keywordflow">for</span> (tTmp = 0;
-<a name="l00161"></a>00161                      tTmp &lt; elementsof(pListMember-&gt;atElement);
-<a name="l00162"></a>00162                      tTmp++) {
-<a name="l00163"></a>00163                         pListMember-&gt;atElement[tTmp].tInfo.pText = NULL;
-<a name="l00164"></a>00164                 }
-<a name="l00165"></a>00165                 <span class="keywordflow">for</span> (tBit = 7; tBit &gt;= 2; tBit--) {
-<a name="l00166"></a>00166                         <span class="keywordflow">if</span> (tMainIndex &gt;= tLength) {
-<a name="l00167"></a>00167                                 <span class="keywordflow">break</span>;
-<a name="l00168"></a>00168                         }
-<a name="l00169"></a>00169                         <span class="keywordflow">if</span> ((ucSepSpecification &amp; BIT(tBit)) == 0) {
-<a name="l00170"></a>00170                                 <span class="keywordflow">continue</span>;
-<a name="l00171"></a>00171                         }
-<a name="l00172"></a>00172                         tIndex = atIndex[tBit];
-<a name="l00173"></a>00173                         fail(tIndex &gt;= 6);
-<a name="l00174"></a>00174                         pListMember-&gt;atElement[tIndex].ulCharPosStart =
-<a name="l00175"></a>00175                                 aulCharPos[tMainIndex];
-<a name="l00176"></a>00176                         <span class="keywordflow">if</span> (tMainIndex + 1 &lt; tLength) {
-<a name="l00177"></a>00177                                 pListMember-&gt;atElement[tIndex].ulCharPosNext =
-<a name="l00178"></a>00178                                         aulCharPos[tMainIndex + 1];
-<a name="l00179"></a>00179                         } <span class="keywordflow">else</span> {
-<a name="l00180"></a>00180                                 pListMember-&gt;atElement[tIndex].ulCharPosNext =
-<a name="l00181"></a>00181                                         aulCharPos[tMainIndex];
-<a name="l00182"></a>00182                         }
-<a name="l00183"></a>00183                         tMainIndex++;
-<a name="l00184"></a>00184                 }
-<a name="l00185"></a>00185         }
-<a name="l00186"></a>00186 } <span class="comment">/* end of vCreat6HdrFtrInfoList */</span>
-<a name="l00187"></a>00187 
-<a name="l00188"></a>00188 <span class="comment">/*</span>
-<a name="l00189"></a>00189 <span class="comment"> * vCreat2HdrFtrInfoList - Create the Header/footer Information List</span>
-<a name="l00190"></a>00190 <span class="comment"> */</span>
-<a name="l00191"></a>00191 <span class="keywordtype">void</span>
-<a name="l00192"></a>00192 vCreat2HdrFtrInfoList(<span class="keyword">const</span> ULONG *aulCharPos, <span class="keywordtype">size_t</span> tLength)
-<a name="l00193"></a>00193 {
-<a name="l00194"></a>00194         vCreat6HdrFtrInfoList(aulCharPos, tLength);
-<a name="l00195"></a>00195 } <span class="comment">/* end of vCreat2HdrFtrInfoList */</span>
-<a name="l00196"></a>00196 
-<a name="l00197"></a>00197 <span class="comment">/*</span>
-<a name="l00198"></a>00198 <span class="comment"> * pGetHdrFtrInfo - get the Header/footer information</span>
-<a name="l00199"></a>00199 <span class="comment"> */</span>
-<a name="l00200"></a>00200 <span class="keyword">const</span> hdrftr_block_type *
-<a name="l00201"></a>00201 pGetHdrFtrInfo(<span class="keywordtype">int</span> iSectionIndex,
-<a name="l00202"></a>00202         BOOL bWantHeader, BOOL bOddPage, BOOL bFirstInSection)
-<a name="l00203"></a>00203 {
-<a name="l00204"></a>00204         hdrftr_mem_type *pCurr;
-<a name="l00205"></a>00205 
-<a name="l00206"></a>00206         fail(iSectionIndex &lt; 0);
-<a name="l00207"></a>00207         fail(pHdrFtrList == NULL &amp;&amp; tHdrFtrLen != 0);
-<a name="l00208"></a>00208 
-<a name="l00209"></a>00209         <span class="keywordflow">if</span> (pHdrFtrList == NULL || tHdrFtrLen == 0) {
-<a name="l00210"></a>00210                 <span class="comment">/* No information */</span>
-<a name="l00211"></a>00211                 <span class="keywordflow">return</span> NULL;
-<a name="l00212"></a>00212         }
-<a name="l00213"></a>00213 
-<a name="l00214"></a>00214         <span class="keywordflow">if</span> (iSectionIndex &lt; 0) {
-<a name="l00215"></a>00215                 iSectionIndex = 0;
-<a name="l00216"></a>00216         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (iSectionIndex &gt;= (<span class="keywordtype">int</span>)tHdrFtrLen) {
-<a name="l00217"></a>00217                 iSectionIndex = (int)(tHdrFtrLen - 1);
-<a name="l00218"></a>00218         }
-<a name="l00219"></a>00219 
-<a name="l00220"></a>00220         pCurr = pHdrFtrList + iSectionIndex;
-<a name="l00221"></a>00221 
-<a name="l00222"></a>00222         <span class="keywordflow">if</span> (bFirstInSection) {
-<a name="l00223"></a>00223                 <span class="keywordflow">if</span> (bWantHeader) {
-<a name="l00224"></a>00224                         <span class="keywordflow">return</span> &amp;pCurr-&gt;atElement[HDR_FIRST_PAGE].tInfo;
-<a name="l00225"></a>00225                 } <span class="keywordflow">else</span> {
-<a name="l00226"></a>00226                         <span class="keywordflow">return</span> &amp;pCurr-&gt;atElement[FTR_FIRST_PAGE].tInfo;
-<a name="l00227"></a>00227                 }
-<a name="l00228"></a>00228         } <span class="keywordflow">else</span> {
-<a name="l00229"></a>00229                 <span class="keywordflow">if</span> (bWantHeader) {
-<a name="l00230"></a>00230                         <span class="keywordflow">if</span> (bOddPage) {
-<a name="l00231"></a>00231                                 <span class="keywordflow">return</span> &amp;pCurr-&gt;atElement[HDR_ODD_PAGES].tInfo;
-<a name="l00232"></a>00232                         } <span class="keywordflow">else</span> {
-<a name="l00233"></a>00233                                 <span class="keywordflow">return</span> &amp;pCurr-&gt;atElement[HDR_EVEN_PAGES].tInfo;
-<a name="l00234"></a>00234                         }
-<a name="l00235"></a>00235                 } <span class="keywordflow">else</span> {
-<a name="l00236"></a>00236                         <span class="keywordflow">if</span> (bOddPage) {
-<a name="l00237"></a>00237                                 <span class="keywordflow">return</span> &amp;pCurr-&gt;atElement[FTR_ODD_PAGES].tInfo;
-<a name="l00238"></a>00238                         } <span class="keywordflow">else</span> {
-<a name="l00239"></a>00239                                 <span class="keywordflow">return</span> &amp;pCurr-&gt;atElement[FTR_EVEN_PAGES].tInfo;
-<a name="l00240"></a>00240                         }
-<a name="l00241"></a>00241                 }
-<a name="l00242"></a>00242         }
-<a name="l00243"></a>00243 } <span class="comment">/* end of pGetHdrFtrInfo */</span>
-<a name="l00244"></a>00244 
-<a name="l00245"></a>00245 <span class="comment">/*</span>
-<a name="l00246"></a>00246 <span class="comment"> * lComputeHdrFtrHeight - compute the height of a header or footer</span>
-<a name="l00247"></a>00247 <span class="comment"> *</span>
-<a name="l00248"></a>00248 <span class="comment"> * Returns the height in DrawUnits</span>
-<a name="l00249"></a>00249 <span class="comment"> */</span>
-<a name="l00250"></a>00250 <span class="keyword">static</span> <span class="keywordtype">long</span>
-<a name="l00251"></a>00251 lComputeHdrFtrHeight(<span class="keyword">const</span> output_type *pAnchor)
-<a name="l00252"></a>00252 {
-<a name="l00253"></a>00253         <span class="keyword">const</span> output_type *pCurr;
-<a name="l00254"></a>00254         <span class="keywordtype">long</span>    lTotal;
-<a name="l00255"></a>00255         USHORT  usFontSizeMax;
-<a name="l00256"></a>00256 
-<a name="l00257"></a>00257         lTotal = 0;
-<a name="l00258"></a>00258         usFontSizeMax = 0;
-<a name="l00259"></a>00259         <span class="keywordflow">for</span> (pCurr = pAnchor; pCurr != NULL; pCurr = pCurr-&gt;pNext) {
-<a name="l00260"></a>00260                 <span class="keywordflow">if</span> (pCurr-&gt;tNextFree == 1) {
-<a name="l00261"></a>00261                         <span class="keywordflow">if</span> (pCurr-&gt;szStorage[0] == PAR_END) {
-<a name="l00262"></a>00262                                 <span class="comment">/* End of a paragraph */</span>
-<a name="l00263"></a>00263                                 lTotal += lComputeLeading(usFontSizeMax);
-<a name="l00264"></a>00264                                 lTotal += lMilliPoints2DrawUnits(
-<a name="l00265"></a>00265                                                 (<span class="keywordtype">long</span>)pCurr-&gt;usFontSize * 200);
-<a name="l00266"></a>00266                                 usFontSizeMax = 0;
-<a name="l00267"></a>00267                                 <span class="keywordflow">continue</span>;
-<a name="l00268"></a>00268                         }
-<a name="l00269"></a>00269                         <span class="keywordflow">if</span> (pCurr-&gt;szStorage[0] == HARD_RETURN) {
-<a name="l00270"></a>00270                                 <span class="comment">/* End of a line */</span>
-<a name="l00271"></a>00271                                 lTotal += lComputeLeading(usFontSizeMax);
-<a name="l00272"></a>00272                                 usFontSizeMax = 0;
-<a name="l00273"></a>00273                                 <span class="keywordflow">continue</span>;
-<a name="l00274"></a>00274                         }
-<a name="l00275"></a>00275                 }
-<a name="l00276"></a>00276                 <span class="keywordflow">if</span> (pCurr-&gt;usFontSize &gt; usFontSizeMax) {
-<a name="l00277"></a>00277                         usFontSizeMax = pCurr-&gt;usFontSize;
-<a name="l00278"></a>00278                 }
-<a name="l00279"></a>00279         }
-<a name="l00280"></a>00280         <span class="keywordflow">if</span> (usFontSizeMax != 0) {
-<a name="l00281"></a>00281                 <span class="comment">/* Height of the last paragraph */</span>
-<a name="l00282"></a>00282                 lTotal += lComputeLeading(usFontSizeMax);
-<a name="l00283"></a>00283         }
-<a name="l00284"></a>00284         <span class="keywordflow">return</span> lTotal;
-<a name="l00285"></a>00285 } <span class="comment">/* end of lComputeHdrFtrHeight */</span>
-<a name="l00286"></a>00286 
-<a name="l00287"></a>00287 <span class="comment">/*</span>
-<a name="l00288"></a>00288 <span class="comment"> * vPrepareHdrFtrText - prepare the header/footer text</span>
-<a name="l00289"></a>00289 <span class="comment"> */</span>
-<a name="l00290"></a>00290 <span class="keywordtype">void</span>
-<a name="l00291"></a>00291 vPrepareHdrFtrText(FILE *pFile)
-<a name="l00292"></a>00292 {
-<a name="l00293"></a>00293         hdrftr_mem_type         *pCurr, *pPrev;
-<a name="l00294"></a>00294         hdrftr_local_type       *pTmp;
-<a name="l00295"></a>00295         output_type             *pText;
-<a name="l00296"></a>00296         <span class="keywordtype">size_t</span>          tHdrFtr, tIndex;
-<a name="l00297"></a>00297 
-<a name="l00298"></a>00298         fail(pFile == NULL);
-<a name="l00299"></a>00299         fail(pHdrFtrList == NULL &amp;&amp; tHdrFtrLen != 0);
-<a name="l00300"></a>00300 
-<a name="l00301"></a>00301         <span class="keywordflow">if</span> (pHdrFtrList == NULL || tHdrFtrLen == 0) {
-<a name="l00302"></a>00302                 <span class="comment">/* No information */</span>
-<a name="l00303"></a>00303                 <span class="keywordflow">return</span>;
-<a name="l00304"></a>00304         }
-<a name="l00305"></a>00305 
-<a name="l00306"></a>00306         <span class="comment">/* Fill text, text height and useful-ness */</span>
-<a name="l00307"></a>00307         <span class="keywordflow">for</span> (tHdrFtr = 0; tHdrFtr &lt; tHdrFtrLen; tHdrFtr++) {
-<a name="l00308"></a>00308                 pCurr = pHdrFtrList + tHdrFtr;
-<a name="l00309"></a>00309                 <span class="keywordflow">for</span> (tIndex = 0;
-<a name="l00310"></a>00310                      tIndex &lt; elementsof(pHdrFtrList-&gt;atElement);
-<a name="l00311"></a>00311                      tIndex++) {
-<a name="l00312"></a>00312                         pTmp = &amp;pCurr-&gt;atElement[tIndex];
-<a name="l00313"></a>00313                         pTmp-&gt;bUseful =
-<a name="l00314"></a>00314                                 pTmp-&gt;ulCharPosStart != pTmp-&gt;ulCharPosNext;
-<a name="l00315"></a>00315                         <span class="keywordflow">if</span> (pTmp-&gt;bUseful) {
-<a name="l00316"></a>00316                                 pText = pHdrFtrDecryptor(pFile,
-<a name="l00317"></a>00317                                                 pTmp-&gt;ulCharPosStart,
-<a name="l00318"></a>00318                                                 pTmp-&gt;ulCharPosNext);
-<a name="l00319"></a>00319                                 pTmp-&gt;tInfo.pText = pText;
-<a name="l00320"></a>00320                                 pTmp-&gt;tInfo.lHeight =
-<a name="l00321"></a>00321                                                 lComputeHdrFtrHeight(pText);
-<a name="l00322"></a>00322                                 pTmp-&gt;bTextOriginal = pText != NULL;
-<a name="l00323"></a>00323                         } <span class="keywordflow">else</span> {
-<a name="l00324"></a>00324                                 pTmp-&gt;tInfo.pText = NULL;
-<a name="l00325"></a>00325                                 pTmp-&gt;tInfo.lHeight = 0;
-<a name="l00326"></a>00326                                 pTmp-&gt;bTextOriginal = FALSE;
-<a name="l00327"></a>00327                         }
-<a name="l00328"></a>00328                 }
-<a name="l00329"></a>00329         }
-<a name="l00330"></a>00330 
-<a name="l00331"></a>00331         <span class="comment">/* Replace not-useful records by using inheritance */</span>
-<a name="l00332"></a>00332         <span class="keywordflow">if</span> (pHdrFtrList-&gt;atElement[HDR_FIRST_PAGE].bUseful) {
-<a name="l00333"></a>00333                 pTmp = &amp;pHdrFtrList-&gt;atElement[HDR_ODD_PAGES];
-<a name="l00334"></a>00334                 <span class="keywordflow">if</span> (!pTmp-&gt;bUseful) {
-<a name="l00335"></a>00335                         *pTmp = pHdrFtrList-&gt;atElement[HDR_FIRST_PAGE];
-<a name="l00336"></a>00336                         pTmp-&gt;bTextOriginal = FALSE;
-<a name="l00337"></a>00337                 }
-<a name="l00338"></a>00338                 pTmp = &amp;pHdrFtrList-&gt;atElement[HDR_EVEN_PAGES];
-<a name="l00339"></a>00339                 <span class="keywordflow">if</span> (!pTmp-&gt;bUseful) {
-<a name="l00340"></a>00340                         *pTmp = pHdrFtrList-&gt;atElement[HDR_FIRST_PAGE];
-<a name="l00341"></a>00341                         pTmp-&gt;bTextOriginal = FALSE;
-<a name="l00342"></a>00342                 }
-<a name="l00343"></a>00343         }
-<a name="l00344"></a>00344         <span class="keywordflow">if</span> (pHdrFtrList-&gt;atElement[FTR_FIRST_PAGE].bUseful) {
-<a name="l00345"></a>00345                 pTmp = &amp;pHdrFtrList-&gt;atElement[FTR_ODD_PAGES];
-<a name="l00346"></a>00346                 <span class="keywordflow">if</span> (!pTmp-&gt;bUseful) {
-<a name="l00347"></a>00347                         *pTmp = pHdrFtrList-&gt;atElement[FTR_FIRST_PAGE];
-<a name="l00348"></a>00348                         pTmp-&gt;bTextOriginal = FALSE;
-<a name="l00349"></a>00349                 }
-<a name="l00350"></a>00350                 pTmp = &amp;pHdrFtrList-&gt;atElement[FTR_EVEN_PAGES];
-<a name="l00351"></a>00351                 <span class="keywordflow">if</span> (!pTmp-&gt;bUseful) {
-<a name="l00352"></a>00352                         *pTmp = pHdrFtrList-&gt;atElement[FTR_FIRST_PAGE];
-<a name="l00353"></a>00353                         pTmp-&gt;bTextOriginal = FALSE;
-<a name="l00354"></a>00354                 }
-<a name="l00355"></a>00355         }
-<a name="l00356"></a>00356         <span class="keywordflow">for</span> (tHdrFtr = 1, pCurr = &amp;pHdrFtrList[1];
-<a name="l00357"></a>00357              tHdrFtr &lt; tHdrFtrLen;
-<a name="l00358"></a>00358              tHdrFtr++, pCurr++) {
-<a name="l00359"></a>00359                 pPrev = pCurr - 1;
-<a name="l00360"></a>00360                 <span class="keywordflow">for</span> (tIndex = 0;
-<a name="l00361"></a>00361                      tIndex &lt; elementsof(pHdrFtrList-&gt;atElement);
-<a name="l00362"></a>00362                      tIndex++) {
-<a name="l00363"></a>00363                         <span class="keywordflow">if</span> (!pCurr-&gt;atElement[tIndex].bUseful &amp;&amp;
-<a name="l00364"></a>00364                             pPrev-&gt;atElement[tIndex].bUseful) {
-<a name="l00365"></a>00365                                 pCurr-&gt;atElement[tIndex] =
-<a name="l00366"></a>00366                                                 pPrev-&gt;atElement[tIndex];
-<a name="l00367"></a>00367                                 pCurr-&gt;atElement[tIndex].bTextOriginal = FALSE;
-<a name="l00368"></a>00368                         }
-<a name="l00369"></a>00369                 }
-<a name="l00370"></a>00370         }
-<a name="l00371"></a>00371 } <span class="comment">/* end of vPrepareHdrFtrText */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/icons_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/icons.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/icons.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * icons.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2001 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Update window icons</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &quot;DeskLib:Error.h&quot;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;DeskLib:WimpSWIs.h&quot;</span>
-<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00013"></a>00013 
-<a name="l00014"></a>00014 <span class="keywordtype">void</span>
-<a name="l00015"></a>00015 vUpdateIcon(window_handle tWindow, icon_block *pIcon)
-<a name="l00016"></a>00016 {
-<a name="l00017"></a>00017         window_redrawblock      tRedraw;
-<a name="l00018"></a>00018         BOOL            bMore;
-<a name="l00019"></a>00019 
-<a name="l00020"></a>00020         tRedraw.window = tWindow;
-<a name="l00021"></a>00021         tRedraw.rect = pIcon-&gt;workarearect;
-<a name="l00022"></a>00022         Error_CheckFatal(Wimp_UpdateWindow(&amp;tRedraw, &amp;bMore));
-<a name="l00023"></a>00023         <span class="keywordflow">while</span> (bMore) {
-<a name="l00024"></a>00024                 Error_CheckFatal(Wimp_PlotIcon(pIcon));
-<a name="l00025"></a>00025                 Error_CheckFatal(Wimp_GetRectangle(&amp;tRedraw, &amp;bMore));
-<a name="l00026"></a>00026         }
-<a name="l00027"></a>00027 } <span class="comment">/* end of vUpdateIcon */</span>
-<a name="l00028"></a>00028 
-<a name="l00029"></a>00029 <span class="keywordtype">void</span>
-<a name="l00030"></a>00030 vUpdateRadioButton(window_handle tWindow, icon_handle tIconNumber,
-<a name="l00031"></a>00031         BOOL bSelected)
-<a name="l00032"></a>00032 {
-<a name="l00033"></a>00033         icon_block      tIcon;
-<a name="l00034"></a>00034 
-<a name="l00035"></a>00035         Error_CheckFatal(Wimp_GetIconState(tWindow, tIconNumber, &amp;tIcon));
-<a name="l00036"></a>00036         DBG_DEC(tIconNumber);
-<a name="l00037"></a>00037         DBG_HEX(tIcon.flags.data.selected);
-<a name="l00038"></a>00038         <span class="keywordflow">if</span> (bSelected == (tIcon.flags.data.selected == 1)) {
-<a name="l00039"></a>00039                 <span class="comment">/* No update needed */</span>
-<a name="l00040"></a>00040                 <span class="keywordflow">return</span>;
-<a name="l00041"></a>00041         }
-<a name="l00042"></a>00042         Error_CheckFatal(Wimp_SetIconState(tWindow, tIconNumber,
-<a name="l00043"></a>00043                         bSelected ? 0x00200000 : 0, 0x00200000));
-<a name="l00044"></a>00044         vUpdateIcon(tWindow, &amp;tIcon);
-<a name="l00045"></a>00045 } <span class="comment">/* end of vUpdateRadioButton */</span>
-<a name="l00046"></a>00046 
-<a name="l00047"></a>00047 <span class="comment">/*</span>
-<a name="l00048"></a>00048 <span class="comment"> * vUpdateWriteable - update a writeable icon with a string</span>
-<a name="l00049"></a>00049 <span class="comment"> */</span>
-<a name="l00050"></a>00050 <span class="keywordtype">void</span>
-<a name="l00051"></a>00051 vUpdateWriteable(window_handle tWindow, icon_handle tIconNumber,
-<a name="l00052"></a>00052         <span class="keyword">const</span> <span class="keywordtype">char</span> *szString)
-<a name="l00053"></a>00053 {
-<a name="l00054"></a>00054         icon_block      tIcon;
-<a name="l00055"></a>00055         caret_block     tCaret;
-<a name="l00056"></a>00056         <span class="keywordtype">int</span>             iLen;
-<a name="l00057"></a>00057 
-<a name="l00058"></a>00058         fail(szString == NULL);
-<a name="l00059"></a>00059 
-<a name="l00060"></a>00060         NO_DBG_DEC(tIconNumber);
-<a name="l00061"></a>00061         NO_DBG_MSG(szString);
-<a name="l00062"></a>00062 
-<a name="l00063"></a>00063         Error_CheckFatal(Wimp_GetIconState(tWindow, tIconNumber, &amp;tIcon));
-<a name="l00064"></a>00064         NO_DBG_HEX(tIcon.flags);
-<a name="l00065"></a>00065         <span class="keywordflow">if</span> (!tIcon.flags.data.text || !tIcon.flags.data.indirected) {
-<a name="l00066"></a>00066                 werr(1, <span class="stringliteral">&quot;Icon %d must be indirected text&quot;</span>, (<span class="keywordtype">int</span>)tIconNumber);
-<a name="l00067"></a>00067                 <span class="keywordflow">return</span>;
-<a name="l00068"></a>00068         }
-<a name="l00069"></a>00069         strncpy(tIcon.data.indirecttext.buffer,
-<a name="l00070"></a>00070                 szString,
-<a name="l00071"></a>00071                 tIcon.data.indirecttext.bufflen - 1);
-<a name="l00072"></a>00072         <span class="comment">/* Ensure the caret is behind the last character of the text */</span>
-<a name="l00073"></a>00073         Error_CheckFatal(Wimp_GetCaretPosition(&amp;tCaret));
-<a name="l00074"></a>00074         <span class="keywordflow">if</span> (tCaret.window == tWindow &amp;&amp; tCaret.icon == tIconNumber) {
-<a name="l00075"></a>00075                 iLen = strlen(tIcon.data.indirecttext.buffer);
-<a name="l00076"></a>00076                 <span class="keywordflow">if</span> (tCaret.index != iLen) {
-<a name="l00077"></a>00077                         tCaret.index = iLen;
-<a name="l00078"></a>00078                         Error_CheckFatal(Wimp_SetCaretPosition(&amp;tCaret));
-<a name="l00079"></a>00079                 }
-<a name="l00080"></a>00080         }
-<a name="l00081"></a>00081         Error_CheckFatal(Wimp_SetIconState(tWindow, tIconNumber, 0, 0));
-<a name="l00082"></a>00082         vUpdateIcon(tWindow, &amp;tIcon);
-<a name="l00083"></a>00083 } <span class="comment">/* end of vUpdateWriteable */</span>
-<a name="l00084"></a>00084 
-<a name="l00085"></a>00085 <span class="comment">/*</span>
-<a name="l00086"></a>00086 <span class="comment"> * vUpdateWriteableNumber - update a writeable icon with a number</span>
-<a name="l00087"></a>00087 <span class="comment"> */</span>
-<a name="l00088"></a>00088 <span class="keywordtype">void</span>
-<a name="l00089"></a>00089 vUpdateWriteableNumber(window_handle tWindow, icon_handle tIconNumber,
-<a name="l00090"></a>00090         <span class="keywordtype">int</span> iNumber)
-<a name="l00091"></a>00091 {
-<a name="l00092"></a>00092         <span class="keywordtype">char</span>    szTmp[1+3*<span class="keyword">sizeof</span>(int)+1];
-<a name="l00093"></a>00093 
-<a name="l00094"></a>00094         (void)sprintf(szTmp, <span class="stringliteral">&quot;%d&quot;</span>, iNumber);
-<a name="l00095"></a>00095         vUpdateWriteable(tWindow, tIconNumber, szTmp);
-<a name="l00096"></a>00096 } <span class="comment">/* end of vUpdateWriteableNumber */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/imgexam_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1060 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/imgexam.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/imgexam.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * imgexam.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2000-2004 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Functions to examine image headers</span>
-<a name="l00007"></a>00007 <span class="comment"> *</span>
-<a name="l00008"></a>00008 <span class="comment"> *================================================================</span>
-<a name="l00009"></a>00009 <span class="comment"> * Part of this software is based on:</span>
-<a name="l00010"></a>00010 <span class="comment"> * jpeg2ps - convert JPEG compressed images to PostScript Level 2</span>
-<a name="l00011"></a>00011 <span class="comment"> * Copyright (C) 1994-99 Thomas Merz (tm@muc.de)</span>
-<a name="l00012"></a>00012 <span class="comment"> *================================================================</span>
-<a name="l00013"></a>00013 <span class="comment"> * The credit should go to him, but all the bugs are mine.</span>
-<a name="l00014"></a>00014 <span class="comment"> */</span>
-<a name="l00015"></a>00015 
-<a name="l00016"></a>00016 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
-<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00018"></a>00018 <span class="preprocessor">#include &lt;ctype.h&gt;</span>
-<a name="l00019"></a>00019 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="comment">/* BMP compression types */</span>
-<a name="l00022"></a>00022 <span class="preprocessor">#define BI_RGB          0</span>
-<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#define BI_RLE8         1</span>
-<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define BI_RLE4         2</span>
-<a name="l00025"></a>00025 <span class="preprocessor"></span>
-<a name="l00026"></a>00026 <span class="comment">/* PNG colortype bits */</span>
-<a name="l00027"></a>00027 <span class="preprocessor">#define PNG_CB_PALETTE          0x01</span>
-<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define PNG_CB_COLOR            0x02</span>
-<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define PNG_CB_ALPHA            0x04</span>
-<a name="l00030"></a>00030 <span class="preprocessor"></span>
-<a name="l00031"></a>00031 <span class="comment">/* Instance signature */</span>
-<a name="l00032"></a>00032 <span class="preprocessor">#define MSOBI_WMF       0x0216</span>
-<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#define MSOBI_EMF       0x03d4</span>
-<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#define MSOBI_PICT      0x0542</span>
-<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#define MSOBI_PNG       0x06e0</span>
-<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#define MSOBI_JPEG      0x046a</span>
-<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define MSOBI_DIB       0x07a8</span>
-<a name="l00038"></a>00038 <span class="preprocessor"></span>
-<a name="l00039"></a>00039 <span class="comment">/* The following enum is stolen from the IJG JPEG library */</span>
-<a name="l00040"></a>00040 <span class="keyword">typedef</span> <span class="keyword">enum</span> {          <span class="comment">/* JPEG marker codes                    */</span>
-<a name="l00041"></a>00041         M_SOF0  = 0xc0, <span class="comment">/* baseline DCT                         */</span>
-<a name="l00042"></a>00042         M_SOF1  = 0xc1, <span class="comment">/* extended sequential DCT              */</span>
-<a name="l00043"></a>00043         M_SOF2  = 0xc2, <span class="comment">/* progressive DCT                      */</span>
-<a name="l00044"></a>00044         M_SOF3  = 0xc3, <span class="comment">/* lossless (sequential)                */</span>
-<a name="l00045"></a>00045 
-<a name="l00046"></a>00046         M_SOF5  = 0xc5, <span class="comment">/* differential sequential DCT          */</span>
-<a name="l00047"></a>00047         M_SOF6  = 0xc6, <span class="comment">/* differential progressive DCT         */</span>
-<a name="l00048"></a>00048         M_SOF7  = 0xc7, <span class="comment">/* differential lossless                */</span>
-<a name="l00049"></a>00049 
-<a name="l00050"></a>00050         M_JPG   = 0xc8, <span class="comment">/* JPEG extensions                      */</span>
-<a name="l00051"></a>00051         M_SOF9  = 0xc9, <span class="comment">/* extended sequential DCT              */</span>
-<a name="l00052"></a>00052         M_SOF10 = 0xca, <span class="comment">/* progressive DCT                      */</span>
-<a name="l00053"></a>00053         M_SOF11 = 0xcb, <span class="comment">/* lossless (sequential)                */</span>
-<a name="l00054"></a>00054 
-<a name="l00055"></a>00055         M_SOF13 = 0xcd, <span class="comment">/* differential sequential DCT          */</span>
-<a name="l00056"></a>00056         M_SOF14 = 0xce, <span class="comment">/* differential progressive DCT         */</span>
-<a name="l00057"></a>00057         M_SOF15 = 0xcf, <span class="comment">/* differential lossless                */</span>
-<a name="l00058"></a>00058 
-<a name="l00059"></a>00059         M_DHT   = 0xc4, <span class="comment">/* define Huffman tables                */</span>
-<a name="l00060"></a>00060 
-<a name="l00061"></a>00061         M_DAC   = 0xcc, <span class="comment">/* define arithmetic conditioning table */</span>
-<a name="l00062"></a>00062 
-<a name="l00063"></a>00063         M_RST0  = 0xd0, <span class="comment">/* restart                              */</span>
-<a name="l00064"></a>00064         M_RST1  = 0xd1, <span class="comment">/* restart                              */</span>
-<a name="l00065"></a>00065         M_RST2  = 0xd2, <span class="comment">/* restart                              */</span>
-<a name="l00066"></a>00066         M_RST3  = 0xd3, <span class="comment">/* restart                              */</span>
-<a name="l00067"></a>00067         M_RST4  = 0xd4, <span class="comment">/* restart                              */</span>
-<a name="l00068"></a>00068         M_RST5  = 0xd5, <span class="comment">/* restart                              */</span>
-<a name="l00069"></a>00069         M_RST6  = 0xd6, <span class="comment">/* restart                              */</span>
-<a name="l00070"></a>00070         M_RST7  = 0xd7, <span class="comment">/* restart                              */</span>
-<a name="l00071"></a>00071 
-<a name="l00072"></a>00072         M_SOI   = 0xd8, <span class="comment">/* start of image                       */</span>
-<a name="l00073"></a>00073         M_EOI   = 0xd9, <span class="comment">/* end of image                         */</span>
-<a name="l00074"></a>00074         M_SOS   = 0xda, <span class="comment">/* start of scan                        */</span>
-<a name="l00075"></a>00075         M_DQT   = 0xdb, <span class="comment">/* define quantization tables           */</span>
-<a name="l00076"></a>00076         M_DNL   = 0xdc, <span class="comment">/* define number of lines               */</span>
-<a name="l00077"></a>00077         M_DRI   = 0xdd, <span class="comment">/* define restart interval              */</span>
-<a name="l00078"></a>00078         M_DHP   = 0xde, <span class="comment">/* define hierarchical progression      */</span>
-<a name="l00079"></a>00079         M_EXP   = 0xdf, <span class="comment">/* expand reference image(s)            */</span>
-<a name="l00080"></a>00080 
-<a name="l00081"></a>00081         M_APP0  = 0xe0, <span class="comment">/* application marker, used for JFIF    */</span>
-<a name="l00082"></a>00082         M_APP1  = 0xe1, <span class="comment">/* application marker                   */</span>
-<a name="l00083"></a>00083         M_APP2  = 0xe2, <span class="comment">/* application marker                   */</span>
-<a name="l00084"></a>00084         M_APP3  = 0xe3, <span class="comment">/* application marker                   */</span>
-<a name="l00085"></a>00085         M_APP4  = 0xe4, <span class="comment">/* application marker                   */</span>
-<a name="l00086"></a>00086         M_APP5  = 0xe5, <span class="comment">/* application marker                   */</span>
-<a name="l00087"></a>00087         M_APP6  = 0xe6, <span class="comment">/* application marker                   */</span>
-<a name="l00088"></a>00088         M_APP7  = 0xe7, <span class="comment">/* application marker                   */</span>
-<a name="l00089"></a>00089         M_APP8  = 0xe8, <span class="comment">/* application marker                   */</span>
-<a name="l00090"></a>00090         M_APP9  = 0xe9, <span class="comment">/* application marker                   */</span>
-<a name="l00091"></a>00091         M_APP10 = 0xea, <span class="comment">/* application marker                   */</span>
-<a name="l00092"></a>00092         M_APP11 = 0xeb, <span class="comment">/* application marker                   */</span>
-<a name="l00093"></a>00093         M_APP12 = 0xec, <span class="comment">/* application marker                   */</span>
-<a name="l00094"></a>00094         M_APP13 = 0xed, <span class="comment">/* application marker                   */</span>
-<a name="l00095"></a>00095         M_APP14 = 0xee, <span class="comment">/* application marker, used by Adobe    */</span>
-<a name="l00096"></a>00096         M_APP15 = 0xef, <span class="comment">/* application marker                   */</span>
-<a name="l00097"></a>00097 
-<a name="l00098"></a>00098         M_JPG0  = 0xf0, <span class="comment">/* reserved for JPEG extensions         */</span>
-<a name="l00099"></a>00099         M_JPG13 = 0xfd, <span class="comment">/* reserved for JPEG extensions         */</span>
-<a name="l00100"></a>00100         M_COM   = 0xfe, <span class="comment">/* comment                              */</span>
-<a name="l00101"></a>00101 
-<a name="l00102"></a>00102         M_TEM   = 0x01  <span class="comment">/* temporary use                        */</span>
-<a name="l00103"></a>00103 } JPEG_MARKER;
-<a name="l00104"></a>00104 
-<a name="l00105"></a>00105 
-<a name="l00106"></a>00106 <span class="comment">/*</span>
-<a name="l00107"></a>00107 <span class="comment"> * bFillPaletteDIB - fill the palette part of the imagesdata</span>
-<a name="l00108"></a>00108 <span class="comment"> *</span>
-<a name="l00109"></a>00109 <span class="comment"> * returns TRUE if the images must be a color image, otherwise FALSE;</span>
-<a name="l00110"></a>00110 <span class="comment"> */</span>
-<a name="l00111"></a>00111 <span class="keyword">static</span> BOOL
-<a name="l00112"></a>00112 bFillPaletteDIB(FILE *pFile, imagedata_type *pImg, BOOL bNewFormat)
-<a name="l00113"></a>00113 {
-<a name="l00114"></a>00114         <span class="keywordtype">int</span>     iIndex;
-<a name="l00115"></a>00115         BOOL    bIsColorPalette;
-<a name="l00116"></a>00116 
-<a name="l00117"></a>00117         fail(pFile == NULL);
-<a name="l00118"></a>00118         fail(pImg == NULL);
-<a name="l00119"></a>00119 
-<a name="l00120"></a>00120         <span class="keywordflow">if</span> (pImg-&gt;uiBitsPerComponent &gt; 8) {
-<a name="l00121"></a>00121                 <span class="comment">/* No palette, image uses more than 256 colors */</span>
-<a name="l00122"></a>00122                 <span class="keywordflow">return</span> TRUE;
-<a name="l00123"></a>00123         }
-<a name="l00124"></a>00124 
-<a name="l00125"></a>00125         <span class="keywordflow">if</span> (pImg-&gt;iColorsUsed &lt;= 0) {
-<a name="l00126"></a>00126                 <span class="comment">/* Not specified, so compute the number of colors used */</span>
-<a name="l00127"></a>00127                 pImg-&gt;iColorsUsed = 1 &lt;&lt; pImg-&gt;uiBitsPerComponent;
-<a name="l00128"></a>00128         }
-<a name="l00129"></a>00129 
-<a name="l00130"></a>00130         fail(pImg-&gt;iColorsUsed &gt; 256);
-<a name="l00131"></a>00131         <span class="keywordflow">if</span> (pImg-&gt;iColorsUsed &gt; 256) {
-<a name="l00132"></a>00132                 pImg-&gt;iColorsUsed = 256;
-<a name="l00133"></a>00133         }
-<a name="l00134"></a>00134 
-<a name="l00135"></a>00135         bIsColorPalette = FALSE;
-<a name="l00136"></a>00136         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; pImg-&gt;iColorsUsed; iIndex++) {
-<a name="l00137"></a>00137                 <span class="comment">/* From BGR order to RGB order */</span>
-<a name="l00138"></a>00138                 pImg-&gt;aucPalette[iIndex][2] = (UCHAR)iNextByte(pFile);
-<a name="l00139"></a>00139                 pImg-&gt;aucPalette[iIndex][1] = (UCHAR)iNextByte(pFile);
-<a name="l00140"></a>00140                 pImg-&gt;aucPalette[iIndex][0] = (UCHAR)iNextByte(pFile);
-<a name="l00141"></a>00141                 <span class="keywordflow">if</span> (bNewFormat) {
-<a name="l00142"></a>00142                         (void)iNextByte(pFile);
-<a name="l00143"></a>00143                 }
-<a name="l00144"></a>00144                 NO_DBG_PRINT_BLOCK(pImg-&gt;aucPalette[iIndex], 3);
-<a name="l00145"></a>00145                 <span class="keywordflow">if</span> (pImg-&gt;aucPalette[iIndex][0] !=
-<a name="l00146"></a>00146                      pImg-&gt;aucPalette[iIndex][1] ||
-<a name="l00147"></a>00147                     pImg-&gt;aucPalette[iIndex][1] !=
-<a name="l00148"></a>00148                      pImg-&gt;aucPalette[iIndex][2]) {
-<a name="l00149"></a>00149                         bIsColorPalette = TRUE;
-<a name="l00150"></a>00150                 }
-<a name="l00151"></a>00151         }
-<a name="l00152"></a>00152 
-<a name="l00153"></a>00153         <span class="keywordflow">return</span> bIsColorPalette;
-<a name="l00154"></a>00154 } <span class="comment">/* end of bFillPaletteDIB */</span>
-<a name="l00155"></a>00155 
-<a name="l00156"></a>00156 <span class="comment">/*</span>
-<a name="l00157"></a>00157 <span class="comment"> * bExamineDIB - Examine a DIB header</span>
-<a name="l00158"></a>00158 <span class="comment"> *</span>
-<a name="l00159"></a>00159 <span class="comment"> * return TRUE if successful, otherwise FALSE</span>
-<a name="l00160"></a>00160 <span class="comment"> */</span>
-<a name="l00161"></a>00161 <span class="keyword">static</span> BOOL
-<a name="l00162"></a>00162 bExamineDIB(FILE *pFile, imagedata_type *pImg)
-<a name="l00163"></a>00163 {
-<a name="l00164"></a>00164         <span class="keywordtype">size_t</span>  tHeaderSize;
-<a name="l00165"></a>00165         <span class="keywordtype">int</span>     iPlanes, iCompression;
-<a name="l00166"></a>00166 
-<a name="l00167"></a>00167         tHeaderSize = (size_t)ulNextLong(pFile);
-<a name="l00168"></a>00168         <span class="keywordflow">switch</span> (tHeaderSize) {
-<a name="l00169"></a>00169         <span class="keywordflow">case</span> 12:
-<a name="l00170"></a>00170                 pImg-&gt;iWidth = (int)usNextWord(pFile);
-<a name="l00171"></a>00171                 pImg-&gt;iHeight = (int)usNextWord(pFile);
-<a name="l00172"></a>00172                 iPlanes = (int)usNextWord(pFile);
-<a name="l00173"></a>00173                 pImg-&gt;uiBitsPerComponent = (UINT)usNextWord(pFile);
-<a name="l00174"></a>00174                 iCompression = BI_RGB;
-<a name="l00175"></a>00175                 pImg-&gt;iColorsUsed = 0;
-<a name="l00176"></a>00176                 <span class="keywordflow">break</span>;
-<a name="l00177"></a>00177         <span class="keywordflow">case</span> 40:
-<a name="l00178"></a>00178         <span class="keywordflow">case</span> 64:
-<a name="l00179"></a>00179                 pImg-&gt;iWidth = (int)ulNextLong(pFile);
-<a name="l00180"></a>00180                 pImg-&gt;iHeight = (int)ulNextLong(pFile);
-<a name="l00181"></a>00181                 iPlanes = (int)usNextWord(pFile);
-<a name="l00182"></a>00182                 pImg-&gt;uiBitsPerComponent = (UINT)usNextWord(pFile);
-<a name="l00183"></a>00183                 iCompression = (int)ulNextLong(pFile);
-<a name="l00184"></a>00184                 (void)tSkipBytes(pFile, 12);
-<a name="l00185"></a>00185                 pImg-&gt;iColorsUsed = (int)ulNextLong(pFile);
-<a name="l00186"></a>00186                 (void)tSkipBytes(pFile, tHeaderSize - 36);
-<a name="l00187"></a>00187                 <span class="keywordflow">break</span>;
-<a name="l00188"></a>00188         <span class="keywordflow">default</span>:
-<a name="l00189"></a>00189                 DBG_DEC(tHeaderSize);
-<a name="l00190"></a>00190                 <span class="keywordflow">return</span> FALSE;
-<a name="l00191"></a>00191         }
-<a name="l00192"></a>00192         DBG_DEC(pImg-&gt;iWidth);
-<a name="l00193"></a>00193         DBG_DEC(pImg-&gt;iHeight);
-<a name="l00194"></a>00194         DBG_DEC(pImg-&gt;uiBitsPerComponent);
-<a name="l00195"></a>00195         DBG_DEC(iCompression);
-<a name="l00196"></a>00196         DBG_DEC(pImg-&gt;iColorsUsed);
-<a name="l00197"></a>00197 
-<a name="l00198"></a>00198         <span class="comment">/* Do some sanity checks with the parameters */</span>
-<a name="l00199"></a>00199         <span class="keywordflow">if</span> (iPlanes != 1) {
-<a name="l00200"></a>00200                 DBG_DEC(iPlanes);
-<a name="l00201"></a>00201                 <span class="keywordflow">return</span> FALSE;
-<a name="l00202"></a>00202         }
-<a name="l00203"></a>00203         <span class="keywordflow">if</span> (pImg-&gt;iWidth &lt;= 0 || pImg-&gt;iHeight &lt;= 0) {
-<a name="l00204"></a>00204                 DBG_DEC(pImg-&gt;iWidth);
-<a name="l00205"></a>00205                 DBG_DEC(pImg-&gt;iHeight);
-<a name="l00206"></a>00206                 <span class="keywordflow">return</span> FALSE;
-<a name="l00207"></a>00207         }
-<a name="l00208"></a>00208         <span class="keywordflow">if</span> (pImg-&gt;uiBitsPerComponent != 1 &amp;&amp; pImg-&gt;uiBitsPerComponent != 4 &amp;&amp;
-<a name="l00209"></a>00209             pImg-&gt;uiBitsPerComponent != 8 &amp;&amp; pImg-&gt;uiBitsPerComponent != 24) {
-<a name="l00210"></a>00210                 DBG_DEC(pImg-&gt;uiBitsPerComponent);
-<a name="l00211"></a>00211                 <span class="keywordflow">return</span> FALSE;
-<a name="l00212"></a>00212         }
-<a name="l00213"></a>00213         <span class="keywordflow">if</span> (iCompression != BI_RGB &amp;&amp;
-<a name="l00214"></a>00214             (pImg-&gt;uiBitsPerComponent == 1 || pImg-&gt;uiBitsPerComponent == 24)) {
-<a name="l00215"></a>00215                 <span class="keywordflow">return</span> FALSE;
-<a name="l00216"></a>00216         }
-<a name="l00217"></a>00217         <span class="keywordflow">if</span> (iCompression == BI_RLE8 &amp;&amp; pImg-&gt;uiBitsPerComponent == 4) {
-<a name="l00218"></a>00218                 <span class="keywordflow">return</span> FALSE;
-<a name="l00219"></a>00219         }
-<a name="l00220"></a>00220         <span class="keywordflow">if</span> (iCompression == BI_RLE4 &amp;&amp; pImg-&gt;uiBitsPerComponent == 8) {
-<a name="l00221"></a>00221                 <span class="keywordflow">return</span> FALSE;
-<a name="l00222"></a>00222         }
-<a name="l00223"></a>00223 
-<a name="l00224"></a>00224         <span class="keywordflow">switch</span> (iCompression) {
-<a name="l00225"></a>00225         <span class="keywordflow">case</span> BI_RGB:
-<a name="l00226"></a>00226                 pImg-&gt;eCompression = compression_none;
-<a name="l00227"></a>00227                 <span class="keywordflow">break</span>;
-<a name="l00228"></a>00228         <span class="keywordflow">case</span> BI_RLE4:
-<a name="l00229"></a>00229                 pImg-&gt;eCompression = compression_rle4;
-<a name="l00230"></a>00230                 <span class="keywordflow">break</span>;
-<a name="l00231"></a>00231         <span class="keywordflow">case</span> BI_RLE8:
-<a name="l00232"></a>00232                 pImg-&gt;eCompression = compression_rle8;
-<a name="l00233"></a>00233                 <span class="keywordflow">break</span>;
-<a name="l00234"></a>00234         <span class="keywordflow">default</span>:
-<a name="l00235"></a>00235                 DBG_DEC(iCompression);
-<a name="l00236"></a>00236                 <span class="keywordflow">return</span> FALSE;
-<a name="l00237"></a>00237         }
-<a name="l00238"></a>00238 
-<a name="l00239"></a>00239         pImg-&gt;bColorImage = bFillPaletteDIB(pFile, pImg, tHeaderSize &gt; 12);
-<a name="l00240"></a>00240 
-<a name="l00241"></a>00241         <span class="keywordflow">if</span> (pImg-&gt;uiBitsPerComponent &lt;= 8) {
-<a name="l00242"></a>00242                 pImg-&gt;iComponents = 1;
-<a name="l00243"></a>00243         } <span class="keywordflow">else</span> {
-<a name="l00244"></a>00244                 pImg-&gt;iComponents = (int)(pImg-&gt;uiBitsPerComponent / 8);
-<a name="l00245"></a>00245         }
-<a name="l00246"></a>00246 
-<a name="l00247"></a>00247         <span class="keywordflow">return</span> TRUE;
-<a name="l00248"></a>00248 } <span class="comment">/* end of bExamineDIB */</span>
-<a name="l00249"></a>00249 
-<a name="l00250"></a>00250 <span class="comment">/*</span>
-<a name="l00251"></a>00251 <span class="comment"> * iNextMarker - read the next JPEG marker</span>
-<a name="l00252"></a>00252 <span class="comment"> */</span>
-<a name="l00253"></a>00253 <span class="keyword">static</span> <span class="keywordtype">int</span>
-<a name="l00254"></a>00254 iNextMarker(FILE *pFile)
-<a name="l00255"></a>00255 {
-<a name="l00256"></a>00256         <span class="keywordtype">int</span>     iMarker;
-<a name="l00257"></a>00257 
-<a name="l00258"></a>00258         <span class="keywordflow">do</span> {
-<a name="l00259"></a>00259                 <span class="keywordflow">do</span> {
-<a name="l00260"></a>00260                         iMarker = iNextByte(pFile);
-<a name="l00261"></a>00261                 } <span class="keywordflow">while</span> (iMarker != 0xff &amp;&amp; iMarker != EOF);
-<a name="l00262"></a>00262                 <span class="keywordflow">if</span> (iMarker == EOF) {
-<a name="l00263"></a>00263                         <span class="keywordflow">return</span> EOF;
-<a name="l00264"></a>00264                 }
-<a name="l00265"></a>00265                 <span class="keywordflow">do</span> {
-<a name="l00266"></a>00266                         iMarker = iNextByte(pFile);
-<a name="l00267"></a>00267                 } <span class="keywordflow">while</span> (iMarker == 0xff);
-<a name="l00268"></a>00268         } <span class="keywordflow">while</span> (iMarker == 0x00);                      <span class="comment">/* repeat if ff/00 */</span>
-<a name="l00269"></a>00269 
-<a name="l00270"></a>00270         <span class="keywordflow">return</span> iMarker;
-<a name="l00271"></a>00271 } <span class="comment">/* end of iNextMarker */</span>
-<a name="l00272"></a>00272 
-<a name="l00273"></a>00273 <span class="comment">/*</span>
-<a name="l00274"></a>00274 <span class="comment"> * bExamineJPEG - Examine a JPEG header</span>
-<a name="l00275"></a>00275 <span class="comment"> *</span>
-<a name="l00276"></a>00276 <span class="comment"> * return TRUE if successful, otherwise FALSE</span>
-<a name="l00277"></a>00277 <span class="comment"> */</span>
-<a name="l00278"></a>00278 <span class="keyword">static</span> BOOL
-<a name="l00279"></a>00279 bExamineJPEG(FILE *pFile, imagedata_type *pImg)
-<a name="l00280"></a>00280 {
-<a name="l00281"></a>00281         <span class="keywordtype">size_t</span>  tLength;
-<a name="l00282"></a>00282         <span class="keywordtype">int</span>     iMarker, iIndex;
-<a name="l00283"></a>00283         <span class="keywordtype">char</span>    appstring[10];
-<a name="l00284"></a>00284         BOOL    bSOFDone;
-<a name="l00285"></a>00285 
-<a name="l00286"></a>00286         tLength = 0;
-<a name="l00287"></a>00287         bSOFDone = FALSE;
-<a name="l00288"></a>00288 
-<a name="l00289"></a>00289         <span class="comment">/* process JPEG markers */</span>
-<a name="l00290"></a>00290         <span class="keywordflow">while</span> (!bSOFDone &amp;&amp; (iMarker = iNextMarker(pFile)) != (<span class="keywordtype">int</span>)M_EOI) {
-<a name="l00291"></a>00291                 <span class="keywordflow">switch</span> (iMarker) {
-<a name="l00292"></a>00292                 <span class="keywordflow">case</span> EOF:
-<a name="l00293"></a>00293                         DBG_MSG(<span class="stringliteral">&quot;Error: unexpected end of JPEG file&quot;</span>);
-<a name="l00294"></a>00294                         <span class="keywordflow">return</span> FALSE;
-<a name="l00295"></a>00295         <span class="comment">/* The following are not officially supported in PostScript level 2 */</span>
-<a name="l00296"></a>00296                 <span class="keywordflow">case</span> M_SOF2:
-<a name="l00297"></a>00297                 <span class="keywordflow">case</span> M_SOF3:
-<a name="l00298"></a>00298                 <span class="keywordflow">case</span> M_SOF5:
-<a name="l00299"></a>00299                 <span class="keywordflow">case</span> M_SOF6:
-<a name="l00300"></a>00300                 <span class="keywordflow">case</span> M_SOF7:
-<a name="l00301"></a>00301                 <span class="keywordflow">case</span> M_SOF9:
-<a name="l00302"></a>00302                 <span class="keywordflow">case</span> M_SOF10:
-<a name="l00303"></a>00303                 <span class="keywordflow">case</span> M_SOF11:
-<a name="l00304"></a>00304                 <span class="keywordflow">case</span> M_SOF13:
-<a name="l00305"></a>00305                 <span class="keywordflow">case</span> M_SOF14:
-<a name="l00306"></a>00306                 <span class="keywordflow">case</span> M_SOF15:
-<a name="l00307"></a>00307                         DBG_HEX(iMarker);
-<a name="l00308"></a>00308                         <span class="keywordflow">return</span> FALSE;
-<a name="l00309"></a>00309                 <span class="keywordflow">case</span> M_SOF0:
-<a name="l00310"></a>00310                 <span class="keywordflow">case</span> M_SOF1:
-<a name="l00311"></a>00311                         tLength = (size_t)usNextWordBE(pFile);
-<a name="l00312"></a>00312                         pImg-&gt;uiBitsPerComponent = (UINT)iNextByte(pFile);
-<a name="l00313"></a>00313                         pImg-&gt;iHeight = (int)usNextWordBE(pFile);
-<a name="l00314"></a>00314                         pImg-&gt;iWidth = (int)usNextWordBE(pFile);
-<a name="l00315"></a>00315                         pImg-&gt;iComponents = iNextByte(pFile);
-<a name="l00316"></a>00316                         bSOFDone = TRUE;
-<a name="l00317"></a>00317                         <span class="keywordflow">break</span>;
-<a name="l00318"></a>00318                 <span class="keywordflow">case</span> M_APP14:
-<a name="l00319"></a>00319                 <span class="comment">/*</span>
-<a name="l00320"></a>00320 <span class="comment">                 * Check for Adobe application marker. It is known (per Adobe&#39;s</span>
-<a name="l00321"></a>00321 <span class="comment">                 * TN5116) to contain the string &quot;Adobe&quot; at the start of the</span>
-<a name="l00322"></a>00322 <span class="comment">                 * APP14 marker.</span>
-<a name="l00323"></a>00323 <span class="comment">                 */</span>
-<a name="l00324"></a>00324                         tLength = (size_t)usNextWordBE(pFile);
-<a name="l00325"></a>00325                         <span class="keywordflow">if</span> (tLength &lt; 12) {
-<a name="l00326"></a>00326                                 (void)tSkipBytes(pFile, tLength - 2);
-<a name="l00327"></a>00327                         } <span class="keywordflow">else</span> {
-<a name="l00328"></a>00328                                 <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; 5; iIndex++) {
-<a name="l00329"></a>00329                                         appstring[iIndex] =
-<a name="l00330"></a>00330                                                         (char)iNextByte(pFile);
-<a name="l00331"></a>00331                                 }
-<a name="l00332"></a>00332                                 appstring[5] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00333"></a>00333                                 <span class="keywordflow">if</span> (STREQ(appstring, <span class="stringliteral">&quot;Adobe&quot;</span>)) {
-<a name="l00334"></a>00334                                         pImg-&gt;bAdobe = TRUE;
-<a name="l00335"></a>00335                                 }
-<a name="l00336"></a>00336                                 (void)tSkipBytes(pFile, tLength - 7);
-<a name="l00337"></a>00337                         }
-<a name="l00338"></a>00338                         <span class="keywordflow">break</span>;
-<a name="l00339"></a>00339                 <span class="keywordflow">case</span> M_SOI:             <span class="comment">/* ignore markers without parameters */</span>
-<a name="l00340"></a>00340                 <span class="keywordflow">case</span> M_EOI:
-<a name="l00341"></a>00341                 <span class="keywordflow">case</span> M_TEM:
-<a name="l00342"></a>00342                 <span class="keywordflow">case</span> M_RST0:
-<a name="l00343"></a>00343                 <span class="keywordflow">case</span> M_RST1:
-<a name="l00344"></a>00344                 <span class="keywordflow">case</span> M_RST2:
-<a name="l00345"></a>00345                 <span class="keywordflow">case</span> M_RST3:
-<a name="l00346"></a>00346                 <span class="keywordflow">case</span> M_RST4:
-<a name="l00347"></a>00347                 <span class="keywordflow">case</span> M_RST5:
-<a name="l00348"></a>00348                 <span class="keywordflow">case</span> M_RST6:
-<a name="l00349"></a>00349                 <span class="keywordflow">case</span> M_RST7:
-<a name="l00350"></a>00350                         <span class="keywordflow">break</span>;
-<a name="l00351"></a>00351                 <span class="keywordflow">default</span>:                <span class="comment">/* skip variable length markers */</span>
-<a name="l00352"></a>00352                         tLength = (size_t)usNextWordBE(pFile);
-<a name="l00353"></a>00353                         (void)tSkipBytes(pFile, tLength - 2);
-<a name="l00354"></a>00354                         <span class="keywordflow">break</span>;
-<a name="l00355"></a>00355                 }
-<a name="l00356"></a>00356         }
-<a name="l00357"></a>00357 
-<a name="l00358"></a>00358         DBG_DEC(pImg-&gt;iWidth);
-<a name="l00359"></a>00359         DBG_DEC(pImg-&gt;iHeight);
-<a name="l00360"></a>00360         DBG_DEC(pImg-&gt;uiBitsPerComponent);
-<a name="l00361"></a>00361         DBG_DEC(pImg-&gt;iComponents);
-<a name="l00362"></a>00362 
-<a name="l00363"></a>00363         <span class="comment">/* Do some sanity checks with the parameters */</span>
-<a name="l00364"></a>00364         <span class="keywordflow">if</span> (pImg-&gt;iHeight &lt;= 0 ||
-<a name="l00365"></a>00365             pImg-&gt;iWidth &lt;= 0 ||
-<a name="l00366"></a>00366             pImg-&gt;iComponents &lt;= 0) {
-<a name="l00367"></a>00367                 DBG_DEC(pImg-&gt;iHeight);
-<a name="l00368"></a>00368                 DBG_DEC(pImg-&gt;iWidth);
-<a name="l00369"></a>00369                 DBG_DEC(pImg-&gt;iComponents);
-<a name="l00370"></a>00370                 <span class="keywordflow">return</span> FALSE;
-<a name="l00371"></a>00371         }
-<a name="l00372"></a>00372 
-<a name="l00373"></a>00373         <span class="comment">/* Some broken JPEG files have this but they print anyway... */</span>
-<a name="l00374"></a>00374         <span class="keywordflow">if</span> (pImg-&gt;iComponents * 3 + 8 != (<span class="keywordtype">int</span>)tLength) {
-<a name="l00375"></a>00375                 DBG_MSG(<span class="stringliteral">&quot;Warning: SOF marker has incorrect length - ignored&quot;</span>);
-<a name="l00376"></a>00376         }
-<a name="l00377"></a>00377 
-<a name="l00378"></a>00378         <span class="keywordflow">if</span> (pImg-&gt;uiBitsPerComponent != 8) {
-<a name="l00379"></a>00379                 DBG_DEC(pImg-&gt;uiBitsPerComponent);
-<a name="l00380"></a>00380                 DBG_MSG(<span class="stringliteral">&quot;Not supported in PostScript level 2&quot;</span>);
-<a name="l00381"></a>00381                 <span class="keywordflow">return</span> FALSE;
-<a name="l00382"></a>00382         }
-<a name="l00383"></a>00383 
-<a name="l00384"></a>00384         <span class="keywordflow">if</span> (pImg-&gt;iComponents != 1 &amp;&amp;
-<a name="l00385"></a>00385             pImg-&gt;iComponents != 3 &amp;&amp;
-<a name="l00386"></a>00386             pImg-&gt;iComponents != 4) {
-<a name="l00387"></a>00387                 DBG_DEC(pImg-&gt;iComponents);
-<a name="l00388"></a>00388                 <span class="keywordflow">return</span> FALSE;
-<a name="l00389"></a>00389         }
-<a name="l00390"></a>00390 
-<a name="l00391"></a>00391         pImg-&gt;bColorImage = pImg-&gt;iComponents &gt;= 3;
-<a name="l00392"></a>00392         pImg-&gt;iColorsUsed = 0;
-<a name="l00393"></a>00393         pImg-&gt;eCompression = compression_jpeg;
-<a name="l00394"></a>00394 
-<a name="l00395"></a>00395         <span class="keywordflow">return</span> TRUE;
-<a name="l00396"></a>00396 } <span class="comment">/* end of bExamineJPEG */</span>
-<a name="l00397"></a>00397 
-<a name="l00398"></a>00398 <span class="comment">/*</span>
-<a name="l00399"></a>00399 <span class="comment"> * bFillPalettePNG - fill the palette part of the imagesdata</span>
-<a name="l00400"></a>00400 <span class="comment"> *</span>
-<a name="l00401"></a>00401 <span class="comment"> * returns TRUE if sucessful, otherwise FALSE;</span>
-<a name="l00402"></a>00402 <span class="comment"> */</span>
-<a name="l00403"></a>00403 <span class="keyword">static</span> BOOL
-<a name="l00404"></a>00404 bFillPalettePNG(FILE *pFile, imagedata_type *pImg, <span class="keywordtype">size_t</span> tLength)
-<a name="l00405"></a>00405 {
-<a name="l00406"></a>00406         <span class="keywordtype">int</span>     iIndex, iEntries;
-<a name="l00407"></a>00407 
-<a name="l00408"></a>00408         fail(pFile == NULL);
-<a name="l00409"></a>00409         fail(pImg == NULL);
-<a name="l00410"></a>00410 
-<a name="l00411"></a>00411         <span class="keywordflow">if</span> (pImg-&gt;uiBitsPerComponent &gt; 8) {
-<a name="l00412"></a>00412                 <span class="comment">/* No palette, image uses more than 256 colors */</span>
-<a name="l00413"></a>00413                 <span class="keywordflow">return</span> TRUE;
-<a name="l00414"></a>00414         }
-<a name="l00415"></a>00415 
-<a name="l00416"></a>00416         <span class="keywordflow">if</span> (!pImg-&gt;bColorImage) {
-<a name="l00417"></a>00417                 <span class="comment">/* Only color images can have a palette */</span>
-<a name="l00418"></a>00418                 <span class="keywordflow">return</span> FALSE;
-<a name="l00419"></a>00419         }
-<a name="l00420"></a>00420 
-<a name="l00421"></a>00421         <span class="keywordflow">if</span> (tLength % 3 != 0) {
-<a name="l00422"></a>00422                 <span class="comment">/* Each palette entry takes three bytes */</span>
-<a name="l00423"></a>00423                 DBG_DEC(tLength);
-<a name="l00424"></a>00424                 <span class="keywordflow">return</span> FALSE;
-<a name="l00425"></a>00425         }
-<a name="l00426"></a>00426 
-<a name="l00427"></a>00427         iEntries = (int)(tLength / 3);
-<a name="l00428"></a>00428         DBG_DEC(iEntries);
-<a name="l00429"></a>00429         pImg-&gt;iColorsUsed = 1 &lt;&lt; pImg-&gt;uiBitsPerComponent;
-<a name="l00430"></a>00430         DBG_DEC(pImg-&gt;iColorsUsed);
-<a name="l00431"></a>00431 
-<a name="l00432"></a>00432         <span class="keywordflow">if</span> (iEntries &gt; 256) {
-<a name="l00433"></a>00433                 DBG_DEC(iEntries);
-<a name="l00434"></a>00434                 <span class="keywordflow">return</span> FALSE;
-<a name="l00435"></a>00435         }
-<a name="l00436"></a>00436 
-<a name="l00437"></a>00437         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; iEntries; iIndex++) {
-<a name="l00438"></a>00438                 pImg-&gt;aucPalette[iIndex][0] = (UCHAR)iNextByte(pFile);
-<a name="l00439"></a>00439                 pImg-&gt;aucPalette[iIndex][1] = (UCHAR)iNextByte(pFile);
-<a name="l00440"></a>00440                 pImg-&gt;aucPalette[iIndex][2] = (UCHAR)iNextByte(pFile);
-<a name="l00441"></a>00441                 NO_DBG_PRINT_BLOCK(pImg-&gt;aucPalette[iIndex], 3);
-<a name="l00442"></a>00442         }
-<a name="l00443"></a>00443         <span class="keywordflow">for</span> (;iIndex &lt; pImg-&gt;iColorsUsed; iIndex++) {
-<a name="l00444"></a>00444                 pImg-&gt;aucPalette[iIndex][0] = 0;
-<a name="l00445"></a>00445                 pImg-&gt;aucPalette[iIndex][1] = 0;
-<a name="l00446"></a>00446                 pImg-&gt;aucPalette[iIndex][2] = 0;
-<a name="l00447"></a>00447         }
-<a name="l00448"></a>00448 
-<a name="l00449"></a>00449         <span class="keywordflow">return</span> TRUE;
-<a name="l00450"></a>00450 } <span class="comment">/* end of bFillPalettePNG */</span>
-<a name="l00451"></a>00451 
-<a name="l00452"></a>00452 <span class="comment">/*</span>
-<a name="l00453"></a>00453 <span class="comment"> * bExaminePNG - Examine a PNG header</span>
-<a name="l00454"></a>00454 <span class="comment"> *</span>
-<a name="l00455"></a>00455 <span class="comment"> * return TRUE if successful, otherwise FALSE</span>
-<a name="l00456"></a>00456 <span class="comment"> */</span>
-<a name="l00457"></a>00457 <span class="keyword">static</span> BOOL
-<a name="l00458"></a>00458 bExaminePNG(FILE *pFile, imagedata_type *pImg)
-<a name="l00459"></a>00459 {
-<a name="l00460"></a>00460         <span class="keywordtype">size_t</span>          tLength;
-<a name="l00461"></a>00461         ULONG           ulLong1, ulLong2, ulName;
-<a name="l00462"></a>00462         <span class="keywordtype">int</span>             iIndex, iTmp;
-<a name="l00463"></a>00463         <span class="keywordtype">int</span>             iCompressionMethod, iFilterMethod, iInterlaceMethod;
-<a name="l00464"></a>00464         <span class="keywordtype">int</span>             iColor, iIncrement;
-<a name="l00465"></a>00465         BOOL            bHasPalette, bHasAlpha;
-<a name="l00466"></a>00466         UCHAR   aucBuf[4];
-<a name="l00467"></a>00467 
-<a name="l00468"></a>00468         <span class="comment">/* Check signature */</span>
-<a name="l00469"></a>00469         ulLong1 = ulNextLongBE(pFile);
-<a name="l00470"></a>00470         ulLong2 = ulNextLongBE(pFile);
-<a name="l00471"></a>00471         <span class="keywordflow">if</span> (ulLong1 != 0x89504e47UL || ulLong2 != 0x0d0a1a0aUL) {
-<a name="l00472"></a>00472                 DBG_HEX(ulLong1);
-<a name="l00473"></a>00473                 DBG_HEX(ulLong2);
-<a name="l00474"></a>00474                 <span class="keywordflow">return</span> FALSE;
-<a name="l00475"></a>00475         }
-<a name="l00476"></a>00476 
-<a name="l00477"></a>00477         ulName = 0x00;
-<a name="l00478"></a>00478         bHasPalette = FALSE;
-<a name="l00479"></a>00479 
-<a name="l00480"></a>00480         <span class="comment">/* Examine chunks */</span>
-<a name="l00481"></a>00481         <span class="keywordflow">while</span> (ulName != PNG_CN_IEND) {
-<a name="l00482"></a>00482                 tLength = (size_t)ulNextLongBE(pFile);
-<a name="l00483"></a>00483                 ulName = 0x00;
-<a name="l00484"></a>00484                 <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; (int)elementsof(aucBuf); iIndex++) {
-<a name="l00485"></a>00485                         aucBuf[iIndex] = (UCHAR)iNextByte(pFile);
-<a name="l00486"></a>00486                         <span class="keywordflow">if</span> (!isalpha(aucBuf[iIndex])) {
-<a name="l00487"></a>00487                                 DBG_HEX(aucBuf[iIndex]);
-<a name="l00488"></a>00488                                 <span class="keywordflow">return</span> FALSE;
-<a name="l00489"></a>00489                         }
-<a name="l00490"></a>00490                         ulName &lt;&lt;= 8;
-<a name="l00491"></a>00491                         ulName |= aucBuf[iIndex];
-<a name="l00492"></a>00492                 }
-<a name="l00493"></a>00493 
-<a name="l00494"></a>00494                 <span class="keywordflow">switch</span> (ulName) {
-<a name="l00495"></a>00495                 <span class="keywordflow">case</span> PNG_CN_IHDR:
-<a name="l00496"></a>00496                         <span class="comment">/* Header chunck */</span>
-<a name="l00497"></a>00497                         <span class="keywordflow">if</span> (tLength &lt; 13) {
-<a name="l00498"></a>00498                                 DBG_DEC(tLength);
-<a name="l00499"></a>00499                                 <span class="keywordflow">return</span> FALSE;
-<a name="l00500"></a>00500                         }
-<a name="l00501"></a>00501                         pImg-&gt;iWidth = (int)ulNextLongBE(pFile);
-<a name="l00502"></a>00502                         pImg-&gt;iHeight = (int)ulNextLongBE(pFile);
-<a name="l00503"></a>00503                         pImg-&gt;uiBitsPerComponent = (UINT)iNextByte(pFile);
-<a name="l00504"></a>00504                         iTmp = iNextByte(pFile);
-<a name="l00505"></a>00505                         NO_DBG_HEX(iTmp);
-<a name="l00506"></a>00506                         pImg-&gt;bColorImage = (iTmp &amp; PNG_CB_COLOR) != 0;
-<a name="l00507"></a>00507                         bHasPalette = (iTmp &amp; PNG_CB_PALETTE) != 0;
-<a name="l00508"></a>00508                         bHasAlpha = (iTmp &amp; PNG_CB_ALPHA) != 0;
-<a name="l00509"></a>00509                         <span class="keywordflow">if</span> (bHasPalette &amp;&amp; pImg-&gt;uiBitsPerComponent &gt; 8) {
-<a name="l00510"></a>00510                                 <span class="comment">/* This should not happen */</span>
-<a name="l00511"></a>00511                                 <span class="keywordflow">return</span> FALSE;
-<a name="l00512"></a>00512                         }
-<a name="l00513"></a>00513                         pImg-&gt;iComponents =
-<a name="l00514"></a>00514                                 (bHasPalette || !pImg-&gt;bColorImage) ? 1 : 3;
-<a name="l00515"></a>00515                         <span class="keywordflow">if</span> (bHasAlpha) {
-<a name="l00516"></a>00516                                 pImg-&gt;iComponents++;
-<a name="l00517"></a>00517                         }
-<a name="l00518"></a>00518                         iCompressionMethod = iNextByte(pFile);
-<a name="l00519"></a>00519                         <span class="keywordflow">if</span> (iCompressionMethod != 0) {
-<a name="l00520"></a>00520                                 DBG_DEC(iCompressionMethod);
-<a name="l00521"></a>00521                                 <span class="keywordflow">return</span> FALSE;
-<a name="l00522"></a>00522                         }
-<a name="l00523"></a>00523                         iFilterMethod = iNextByte(pFile);
-<a name="l00524"></a>00524                         <span class="keywordflow">if</span> (iFilterMethod != 0) {
-<a name="l00525"></a>00525                                 DBG_DEC(iFilterMethod);
-<a name="l00526"></a>00526                                 <span class="keywordflow">return</span> FALSE;
-<a name="l00527"></a>00527                         }
-<a name="l00528"></a>00528                         iInterlaceMethod = iNextByte(pFile);
-<a name="l00529"></a>00529                         <span class="keywordflow">if</span> (iInterlaceMethod != 0) {
-<a name="l00530"></a>00530                                 DBG_DEC(iInterlaceMethod);
-<a name="l00531"></a>00531                                 <span class="keywordflow">return</span> FALSE;
-<a name="l00532"></a>00532                         }
-<a name="l00533"></a>00533                         pImg-&gt;iColorsUsed = 0;
-<a name="l00534"></a>00534                         (void)tSkipBytes(pFile, tLength - 13 + 4);
-<a name="l00535"></a>00535                         <span class="keywordflow">break</span>;
-<a name="l00536"></a>00536                 <span class="keywordflow">case</span> PNG_CN_PLTE:
-<a name="l00537"></a>00537                         <span class="keywordflow">if</span> (!bHasPalette) {
-<a name="l00538"></a>00538                                 <span class="keywordflow">return</span> FALSE;
-<a name="l00539"></a>00539                         }
-<a name="l00540"></a>00540                         <span class="keywordflow">if</span> (!bFillPalettePNG(pFile, pImg, tLength)) {
-<a name="l00541"></a>00541                                 <span class="keywordflow">return</span> FALSE;
-<a name="l00542"></a>00542                         }
-<a name="l00543"></a>00543                         (void)tSkipBytes(pFile, 4);
-<a name="l00544"></a>00544                         <span class="keywordflow">break</span>;
-<a name="l00545"></a>00545                 <span class="keywordflow">default</span>:
-<a name="l00546"></a>00546                         (void)tSkipBytes(pFile, tLength + 4);
-<a name="l00547"></a>00547                         <span class="keywordflow">break</span>;
-<a name="l00548"></a>00548                 }
-<a name="l00549"></a>00549         }
-<a name="l00550"></a>00550 
-<a name="l00551"></a>00551         DBG_DEC(pImg-&gt;iWidth);
-<a name="l00552"></a>00552         DBG_DEC(pImg-&gt;iHeight);
-<a name="l00553"></a>00553         DBG_DEC(pImg-&gt;uiBitsPerComponent);
-<a name="l00554"></a>00554         DBG_DEC(pImg-&gt;iColorsUsed);
-<a name="l00555"></a>00555         DBG_DEC(pImg-&gt;iComponents);
-<a name="l00556"></a>00556 
-<a name="l00557"></a>00557         <span class="comment">/* Do some sanity checks with the parameters */</span>
-<a name="l00558"></a>00558         <span class="keywordflow">if</span> (pImg-&gt;iWidth &lt;= 0 || pImg-&gt;iHeight &lt;= 0) {
-<a name="l00559"></a>00559                 <span class="keywordflow">return</span> FALSE;
-<a name="l00560"></a>00560         }
-<a name="l00561"></a>00561 
-<a name="l00562"></a>00562         <span class="keywordflow">if</span> (pImg-&gt;uiBitsPerComponent != 1 &amp;&amp; pImg-&gt;uiBitsPerComponent != 2 &amp;&amp;
-<a name="l00563"></a>00563             pImg-&gt;uiBitsPerComponent != 4 &amp;&amp; pImg-&gt;uiBitsPerComponent != 8 &amp;&amp;
-<a name="l00564"></a>00564             pImg-&gt;uiBitsPerComponent != 16) {
-<a name="l00565"></a>00565                 DBG_DEC(pImg-&gt;uiBitsPerComponent);
-<a name="l00566"></a>00566                 <span class="keywordflow">return</span>  FALSE;
-<a name="l00567"></a>00567         }
-<a name="l00568"></a>00568 
-<a name="l00569"></a>00569         <span class="keywordflow">if</span> (pImg-&gt;iComponents != 1 &amp;&amp; pImg-&gt;iComponents != 3) {
-<a name="l00570"></a>00570                 <span class="comment">/* Not supported */</span>
-<a name="l00571"></a>00571                 DBG_DEC(pImg-&gt;iComponents);
-<a name="l00572"></a>00572                 <span class="keywordflow">return</span> FALSE;
-<a name="l00573"></a>00573         }
-<a name="l00574"></a>00574 
-<a name="l00575"></a>00575         <span class="keywordflow">if</span> (pImg-&gt;uiBitsPerComponent &gt; 8) {
-<a name="l00576"></a>00576                 <span class="comment">/* Not supported */</span>
-<a name="l00577"></a>00577                 DBG_DEC(pImg-&gt;uiBitsPerComponent);
-<a name="l00578"></a>00578                 <span class="keywordflow">return</span> FALSE;
-<a name="l00579"></a>00579         }
-<a name="l00580"></a>00580 
-<a name="l00581"></a>00581         <span class="keywordflow">if</span> (pImg-&gt;iColorsUsed == 0 &amp;&amp;
-<a name="l00582"></a>00582             pImg-&gt;iComponents == 1 &amp;&amp;
-<a name="l00583"></a>00583             pImg-&gt;uiBitsPerComponent &lt;= 4) {
-<a name="l00584"></a>00584                 <span class="comment">/*</span>
-<a name="l00585"></a>00585 <span class="comment">                 * No palette is supplied, but PostScript needs one in these</span>
-<a name="l00586"></a>00586 <span class="comment">                 * cases, so we add a default palette here</span>
-<a name="l00587"></a>00587 <span class="comment">                 */</span>
-<a name="l00588"></a>00588                 pImg-&gt;iColorsUsed = 1 &lt;&lt; pImg-&gt;uiBitsPerComponent;
-<a name="l00589"></a>00589                 iIncrement = 0xff / (pImg-&gt;iColorsUsed - 1);
-<a name="l00590"></a>00590                 <span class="keywordflow">for</span> (iIndex = 0, iColor = 0x00;
-<a name="l00591"></a>00591                      iIndex &lt; pImg-&gt;iColorsUsed;
-<a name="l00592"></a>00592                      iIndex++, iColor += iIncrement) {
-<a name="l00593"></a>00593                         pImg-&gt;aucPalette[iIndex][0] = (UCHAR)iColor;
-<a name="l00594"></a>00594                         pImg-&gt;aucPalette[iIndex][1] = (UCHAR)iColor;
-<a name="l00595"></a>00595                         pImg-&gt;aucPalette[iIndex][2] = (UCHAR)iColor;
-<a name="l00596"></a>00596                 }
-<a name="l00597"></a>00597                 <span class="comment">/* Just to be sure */</span>
-<a name="l00598"></a>00598                 pImg-&gt;bColorImage = FALSE;
-<a name="l00599"></a>00599         }
-<a name="l00600"></a>00600 
-<a name="l00601"></a>00601         pImg-&gt;eCompression = compression_zlib;
-<a name="l00602"></a>00602 
-<a name="l00603"></a>00603         <span class="keywordflow">return</span> TRUE;
-<a name="l00604"></a>00604 } <span class="comment">/* end of bExaminePNG */</span>
-<a name="l00605"></a>00605 
-<a name="l00606"></a>00606 <span class="comment">/*</span>
-<a name="l00607"></a>00607 <span class="comment"> * bExamineWMF - Examine a WMF header</span>
-<a name="l00608"></a>00608 <span class="comment"> *</span>
-<a name="l00609"></a>00609 <span class="comment"> * return TRUE if successful, otherwise FALSE</span>
-<a name="l00610"></a>00610 <span class="comment"> */</span>
-<a name="l00611"></a>00611 <span class="keyword">static</span> BOOL
-<a name="l00612"></a>00612 bExamineWMF(FILE *pFile, imagedata_type *pImg)
-<a name="l00613"></a>00613 {
-<a name="l00614"></a>00614         ULONG   ulFileSize, ulMaxRecord, ulMagic;
-<a name="l00615"></a>00615         USHORT  usType, usHeaderSize, usVersion, usNoObjects;
-<a name="l00616"></a>00616 
-<a name="l00617"></a>00617         usType = usNextWord(pFile);
-<a name="l00618"></a>00618         usHeaderSize = usNextWord(pFile);
-<a name="l00619"></a>00619         ulMagic = ((ULONG)usHeaderSize &lt;&lt; 16) | (ULONG)usType;
-<a name="l00620"></a>00620         usVersion = usNextWord(pFile);
-<a name="l00621"></a>00621         ulFileSize = ulNextLong(pFile);
-<a name="l00622"></a>00622         usNoObjects = usNextWord(pFile);
-<a name="l00623"></a>00623         ulMaxRecord = ulNextLong(pFile);
-<a name="l00624"></a>00624 
-<a name="l00625"></a>00625         DBG_HEX(ulMagic);
-<a name="l00626"></a>00626         DBG_DEC(usType);
-<a name="l00627"></a>00627         DBG_DEC(usHeaderSize);
-<a name="l00628"></a>00628         DBG_HEX(usVersion);
-<a name="l00629"></a>00629         DBG_DEC(ulFileSize);
-<a name="l00630"></a>00630         DBG_DEC(usNoObjects);
-<a name="l00631"></a>00631         DBG_DEC(ulMaxRecord);
-<a name="l00632"></a>00632 
-<a name="l00633"></a>00633         <span class="keywordflow">return</span> FALSE;
-<a name="l00634"></a>00634 } <span class="comment">/* end of bExamineWMF */</span>
-<a name="l00635"></a>00635 
-<a name="l00636"></a>00636 <span class="preprocessor">#if !defined(__riscos)</span>
-<a name="l00637"></a>00637 <span class="preprocessor"></span><span class="comment">/*</span>
-<a name="l00638"></a>00638 <span class="comment"> * vImage2Papersize - make sure the image fits on the paper</span>
-<a name="l00639"></a>00639 <span class="comment"> *</span>
-<a name="l00640"></a>00640 <span class="comment"> * This function should not be needed if Word would do a proper job</span>
-<a name="l00641"></a>00641 <span class="comment"> */</span>
-<a name="l00642"></a>00642 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00643"></a>00643 vImage2Papersize(imagedata_type *pImg)
-<a name="l00644"></a>00644 {
-<a name="l00645"></a>00645         <span class="keyword">static</span> <span class="keywordtype">int</span>      iNetPageHeight = -1;
-<a name="l00646"></a>00646         <span class="keyword">static</span> <span class="keywordtype">int</span>      iNetPageWidth = -1;
-<a name="l00647"></a>00647         options_type    tOptions;
-<a name="l00648"></a>00648         <span class="keywordtype">double</span>  dVerFactor, dHorFactor, dFactor;
-<a name="l00649"></a>00649 
-<a name="l00650"></a>00650         DBG_MSG(<span class="stringliteral">&quot;vImage2Papersize&quot;</span>);
-<a name="l00651"></a>00651 
-<a name="l00652"></a>00652         fail(pImg == NULL);
-<a name="l00653"></a>00653 
-<a name="l00654"></a>00654         <span class="keywordflow">if</span> (iNetPageHeight &lt; 0 || iNetPageWidth &lt; 0) {
-<a name="l00655"></a>00655                 <span class="comment">/* Get the page dimensions from the options */</span>
-<a name="l00656"></a>00656                 vGetOptions(&amp;tOptions);
-<a name="l00657"></a>00657                 <span class="comment">/* Add 999 to err on the save side */</span>
-<a name="l00658"></a>00658                 iNetPageHeight = tOptions.iPageHeight -
-<a name="l00659"></a>00659                                 (lDrawUnits2MilliPoints(
-<a name="l00660"></a>00660                                         PS_TOP_MARGIN + PS_BOTTOM_MARGIN) +
-<a name="l00661"></a>00661                                         999) / 1000;
-<a name="l00662"></a>00662                 iNetPageWidth = tOptions.iPageWidth -
-<a name="l00663"></a>00663                                 (lDrawUnits2MilliPoints(
-<a name="l00664"></a>00664                                         PS_LEFT_MARGIN + PS_RIGHT_MARGIN) +
-<a name="l00665"></a>00665                                         999) / 1000;
-<a name="l00666"></a>00666                 DBG_DEC(iNetPageHeight);
-<a name="l00667"></a>00667                 DBG_DEC(iNetPageWidth);
-<a name="l00668"></a>00668         }
-<a name="l00669"></a>00669 
-<a name="l00670"></a>00670         <span class="keywordflow">if</span> (pImg-&gt;iVerSizeScaled &lt; iNetPageHeight &amp;&amp;
-<a name="l00671"></a>00671             pImg-&gt;iHorSizeScaled &lt; iNetPageWidth) {
-<a name="l00672"></a>00672                 <span class="comment">/* The image fits on the paper */</span>
-<a name="l00673"></a>00673                 <span class="keywordflow">return</span>;
-<a name="l00674"></a>00674         }
-<a name="l00675"></a>00675 
-<a name="l00676"></a>00676         dVerFactor = (double)iNetPageHeight / (<span class="keywordtype">double</span>)pImg-&gt;iVerSizeScaled;
-<a name="l00677"></a>00677         dHorFactor = (double)iNetPageWidth / (<span class="keywordtype">double</span>)pImg-&gt;iHorSizeScaled;
-<a name="l00678"></a>00678         dFactor = min(dVerFactor, dHorFactor);
-<a name="l00679"></a>00679         DBG_FLT(dFactor);
-<a name="l00680"></a>00680         <span class="comment">/* Round down, just to be on the save side */</span>
-<a name="l00681"></a>00681         pImg-&gt;iVerSizeScaled = (int)(pImg-&gt;iVerSizeScaled * dFactor);
-<a name="l00682"></a>00682         pImg-&gt;iHorSizeScaled = (int)(pImg-&gt;iHorSizeScaled * dFactor);
-<a name="l00683"></a>00683 } <span class="comment">/* end of vImage2Papersize */</span>
-<a name="l00684"></a>00684 <span class="preprocessor">#endif </span><span class="comment">/* !__riscos */</span>
-<a name="l00685"></a>00685 
-<a name="l00686"></a>00686 <span class="comment">/*</span>
-<a name="l00687"></a>00687 <span class="comment"> * tFind6Image - skip until the image is found</span>
-<a name="l00688"></a>00688 <span class="comment"> *</span>
-<a name="l00689"></a>00689 <span class="comment"> * Find the image in Word 6/7 files</span>
-<a name="l00690"></a>00690 <span class="comment"> *</span>
-<a name="l00691"></a>00691 <span class="comment"> * returns the new position when a image is found, otherwise -1</span>
-<a name="l00692"></a>00692 <span class="comment"> */</span>
-<a name="l00693"></a>00693 <span class="keyword">static</span> <span class="keywordtype">size_t</span>
-<a name="l00694"></a>00694 tFind6Image(FILE *pFile, <span class="keywordtype">size_t</span> tPosition, <span class="keywordtype">size_t</span> tLength,
-<a name="l00695"></a>00695         imagetype_enum *peImageType)
-<a name="l00696"></a>00696 {
-<a name="l00697"></a>00697         ULONG   ulMarker;
-<a name="l00698"></a>00698         <span class="keywordtype">size_t</span>  tRecordLength, tToSkip;
-<a name="l00699"></a>00699         USHORT  usMarker;
-<a name="l00700"></a>00700 
-<a name="l00701"></a>00701         fail(pFile == NULL);
-<a name="l00702"></a>00702         fail(peImageType == NULL);
-<a name="l00703"></a>00703 
-<a name="l00704"></a>00704         *peImageType = imagetype_is_unknown;
-<a name="l00705"></a>00705         <span class="keywordflow">if</span> (tPosition + 18 &gt;= tLength) {
-<a name="l00706"></a>00706                 <span class="keywordflow">return</span> (<span class="keywordtype">size_t</span>)-1;
-<a name="l00707"></a>00707         }
-<a name="l00708"></a>00708 
-<a name="l00709"></a>00709         ulMarker = ulNextLong(pFile);
-<a name="l00710"></a>00710         <span class="keywordflow">if</span> (ulMarker != 0x00090001) {
-<a name="l00711"></a>00711                 DBG_HEX(ulMarker);
-<a name="l00712"></a>00712                 <span class="keywordflow">return</span> (<span class="keywordtype">size_t</span>)-1;
-<a name="l00713"></a>00713         }
-<a name="l00714"></a>00714         usMarker = usNextWord(pFile);
-<a name="l00715"></a>00715         <span class="keywordflow">if</span> (usMarker != 0x0300) {
-<a name="l00716"></a>00716                 DBG_HEX(usMarker);
-<a name="l00717"></a>00717                 <span class="keywordflow">return</span> (<span class="keywordtype">size_t</span>)-1;
-<a name="l00718"></a>00718         }
-<a name="l00719"></a>00719         (void)tSkipBytes(pFile, 10);
-<a name="l00720"></a>00720         usMarker = usNextWord(pFile);
-<a name="l00721"></a>00721         <span class="keywordflow">if</span> (usMarker != 0x0000) {
-<a name="l00722"></a>00722                 DBG_HEX(usMarker);
-<a name="l00723"></a>00723                 <span class="keywordflow">return</span> (<span class="keywordtype">size_t</span>)-1;
-<a name="l00724"></a>00724         }
-<a name="l00725"></a>00725         tPosition += 18;
-<a name="l00726"></a>00726 
-<a name="l00727"></a>00727         <span class="keywordflow">while</span> (tPosition + 6 &lt;= tLength) {
-<a name="l00728"></a>00728                 tRecordLength = (size_t)ulNextLong(pFile);
-<a name="l00729"></a>00729                 usMarker = usNextWord(pFile);
-<a name="l00730"></a>00730                 tPosition += 6;
-<a name="l00731"></a>00731                 NO_DBG_DEC(tRecordLength);
-<a name="l00732"></a>00732                 NO_DBG_HEX(usMarker);
-<a name="l00733"></a>00733                 <span class="keywordflow">switch</span> (usMarker) {
-<a name="l00734"></a>00734                 <span class="keywordflow">case</span> 0x0000:
-<a name="l00735"></a>00735                         DBG_HEX(ulGetDataOffset(pFile));
-<a name="l00736"></a>00736                         <span class="keywordflow">return</span> (<span class="keywordtype">size_t</span>)-1;
-<a name="l00737"></a>00737                 <span class="keywordflow">case</span> 0x0b41:
-<a name="l00738"></a>00738                         DBG_MSG(<span class="stringliteral">&quot;DIB&quot;</span>);
-<a name="l00739"></a>00739                         *peImageType = imagetype_is_dib;
-<a name="l00740"></a>00740                         tPosition += tSkipBytes(pFile, 20);
-<a name="l00741"></a>00741                         <span class="keywordflow">return</span> tPosition;
-<a name="l00742"></a>00742                 <span class="keywordflow">case</span> 0x0f43:
-<a name="l00743"></a>00743                         DBG_MSG(<span class="stringliteral">&quot;DIB&quot;</span>);
-<a name="l00744"></a>00744                         *peImageType = imagetype_is_dib;
-<a name="l00745"></a>00745                         tPosition += tSkipBytes(pFile, 22);
-<a name="l00746"></a>00746                         <span class="keywordflow">return</span> tPosition;
-<a name="l00747"></a>00747                 <span class="keywordflow">default</span>:
-<a name="l00748"></a>00748                         <span class="keywordflow">if</span> (tRecordLength &lt; 3) {
-<a name="l00749"></a>00749                                 <span class="keywordflow">break</span>;
-<a name="l00750"></a>00750                         }
-<a name="l00751"></a>00751                         <span class="keywordflow">if</span> (tRecordLength &gt; SIZE_T_MAX / 2) {
-<a name="l00752"></a>00752                                 <span class="comment">/*</span>
-<a name="l00753"></a>00753 <span class="comment">                                 * No need to compute the number of bytes</span>
-<a name="l00754"></a>00754 <span class="comment">                                 * to skip</span>
-<a name="l00755"></a>00755 <span class="comment">                                 */</span>
-<a name="l00756"></a>00756                                 DBG_DEC(tRecordLength);
-<a name="l00757"></a>00757                                 DBG_HEX(tRecordLength);
-<a name="l00758"></a>00758                                 DBG_FIXME();
-<a name="l00759"></a>00759                                 <span class="keywordflow">return</span> (<span class="keywordtype">size_t</span>)-1;
-<a name="l00760"></a>00760                         }
-<a name="l00761"></a>00761                         tToSkip = tRecordLength * 2 - 6;
-<a name="l00762"></a>00762                         <span class="keywordflow">if</span> (tToSkip &gt; tLength - tPosition) {
-<a name="l00763"></a>00763                                 <span class="comment">/* You can&#39;t skip this number of bytes */</span>
-<a name="l00764"></a>00764                                 DBG_DEC(tToSkip);
-<a name="l00765"></a>00765                                 DBG_DEC(tLength - tPosition);
-<a name="l00766"></a>00766                                 <span class="keywordflow">return</span> (<span class="keywordtype">size_t</span>)-1;
-<a name="l00767"></a>00767                         }
-<a name="l00768"></a>00768                         tPosition += tSkipBytes(pFile, tToSkip);
-<a name="l00769"></a>00769                         <span class="keywordflow">break</span>;
-<a name="l00770"></a>00770                 }
-<a name="l00771"></a>00771         }
-<a name="l00772"></a>00772 
-<a name="l00773"></a>00773         <span class="keywordflow">return</span> (<span class="keywordtype">size_t</span>)-1;
-<a name="l00774"></a>00774 } <span class="comment">/* end of tFind6Image */</span>
-<a name="l00775"></a>00775 
-<a name="l00776"></a>00776 <span class="comment">/*</span>
-<a name="l00777"></a>00777 <span class="comment"> * tFind8Image - skip until the image is found</span>
-<a name="l00778"></a>00778 <span class="comment"> *</span>
-<a name="l00779"></a>00779 <span class="comment"> * Find the image in Word 8/9/10 files</span>
-<a name="l00780"></a>00780 <span class="comment"> *</span>
-<a name="l00781"></a>00781 <span class="comment"> * returns the new position when a image is found, otherwise -1</span>
-<a name="l00782"></a>00782 <span class="comment"> */</span>
-<a name="l00783"></a>00783 <span class="keyword">static</span> <span class="keywordtype">size_t</span>
-<a name="l00784"></a>00784 tFind8Image(FILE *pFile, <span class="keywordtype">size_t</span> tPosition, <span class="keywordtype">size_t</span> tLength,
-<a name="l00785"></a>00785         imagetype_enum *peImageType)
-<a name="l00786"></a>00786 {
-<a name="l00787"></a>00787         <span class="keywordtype">size_t</span>  tRecordLength, tNameLen;
-<a name="l00788"></a>00788         USHORT  usRecordVersion, usRecordType, usRecordInstance;
-<a name="l00789"></a>00789         USHORT  usTmp;
-<a name="l00790"></a>00790 
-<a name="l00791"></a>00791         fail(pFile == NULL);
-<a name="l00792"></a>00792         fail(peImageType == NULL);
-<a name="l00793"></a>00793 
-<a name="l00794"></a>00794         *peImageType = imagetype_is_unknown;
-<a name="l00795"></a>00795         <span class="keywordflow">while</span> (tPosition + 8 &lt;= tLength) {
-<a name="l00796"></a>00796                 usTmp = usNextWord(pFile);
-<a name="l00797"></a>00797                 usRecordVersion = usTmp &amp; 0x000f;
-<a name="l00798"></a>00798                 usRecordInstance = usTmp &gt;&gt; 4;
-<a name="l00799"></a>00799                 usRecordType = usNextWord(pFile);
-<a name="l00800"></a>00800                 tRecordLength = (size_t)ulNextLong(pFile);
-<a name="l00801"></a>00801                 tPosition += 8;
-<a name="l00802"></a>00802                 NO_DBG_HEX(usRecordVersion);
-<a name="l00803"></a>00803                 NO_DBG_HEX(usRecordInstance);
-<a name="l00804"></a>00804                 NO_DBG_HEX(usRecordType);
-<a name="l00805"></a>00805                 NO_DBG_DEC(tRecordLength);
-<a name="l00806"></a>00806                 <span class="keywordflow">switch</span> (usRecordType) {
-<a name="l00807"></a>00807                 <span class="keywordflow">case</span> 0xf000: <span class="keywordflow">case</span> 0xf001: <span class="keywordflow">case</span> 0xf002: <span class="keywordflow">case</span> 0xf003:
-<a name="l00808"></a>00808                 <span class="keywordflow">case</span> 0xf004: <span class="keywordflow">case</span> 0xf005:
-<a name="l00809"></a>00809                         <span class="keywordflow">break</span>;
-<a name="l00810"></a>00810                 <span class="keywordflow">case</span> 0xf007:
-<a name="l00811"></a>00811                         tPosition += tSkipBytes(pFile, 33);
-<a name="l00812"></a>00812                         tNameLen = (size_t)iNextByte(pFile);
-<a name="l00813"></a>00813                         tPosition++;
-<a name="l00814"></a>00814                         DBG_DEC_C(tNameLen != 0, tNameLen);
-<a name="l00815"></a>00815                         tPosition += tSkipBytes(pFile, 2 + tNameLen * 2);
-<a name="l00816"></a>00816                         <span class="keywordflow">break</span>;
-<a name="l00817"></a>00817                 <span class="keywordflow">case</span> 0xf008:
-<a name="l00818"></a>00818                         tPosition += tSkipBytes(pFile, 8);
-<a name="l00819"></a>00819                         <span class="keywordflow">break</span>;
-<a name="l00820"></a>00820                 <span class="keywordflow">case</span> 0xf009:
-<a name="l00821"></a>00821                         tPosition += tSkipBytes(pFile, 16);
-<a name="l00822"></a>00822                         <span class="keywordflow">break</span>;
-<a name="l00823"></a>00823                 <span class="keywordflow">case</span> 0xf006: <span class="keywordflow">case</span> 0xf00a: <span class="keywordflow">case</span> 0xf00b: <span class="keywordflow">case</span> 0xf00d:
-<a name="l00824"></a>00824                 <span class="keywordflow">case</span> 0xf00e: <span class="keywordflow">case</span> 0xf00f: <span class="keywordflow">case</span> 0xf010: <span class="keywordflow">case</span> 0xf011:
-<a name="l00825"></a>00825                 <span class="keywordflow">case</span> 0xf122:
-<a name="l00826"></a>00826                         tPosition += tSkipBytes(pFile, tRecordLength);
-<a name="l00827"></a>00827                         <span class="keywordflow">break</span>;
-<a name="l00828"></a>00828                 <span class="keywordflow">case</span> 0xf01a:
-<a name="l00829"></a>00829                         DBG_MSG(<span class="stringliteral">&quot;EMF&quot;</span>);
-<a name="l00830"></a>00830                         *peImageType = imagetype_is_emf;
-<a name="l00831"></a>00831                         tPosition += tSkipBytes(pFile, 50);
-<a name="l00832"></a>00832                         <span class="keywordflow">if</span> ((usRecordInstance ^ MSOBI_EMF) == 1) {
-<a name="l00833"></a>00833                                 tPosition += tSkipBytes(pFile, 16);
-<a name="l00834"></a>00834                         }
-<a name="l00835"></a>00835                         <span class="keywordflow">return</span> tPosition;
-<a name="l00836"></a>00836                 <span class="keywordflow">case</span> 0xf01b:
-<a name="l00837"></a>00837                         DBG_MSG(<span class="stringliteral">&quot;WMF&quot;</span>);
-<a name="l00838"></a>00838                         *peImageType = imagetype_is_wmf;
-<a name="l00839"></a>00839                         tPosition += tSkipBytes(pFile, 50);
-<a name="l00840"></a>00840                         <span class="keywordflow">if</span> ((usRecordInstance ^ MSOBI_WMF) == 1) {
-<a name="l00841"></a>00841                                 tPosition += tSkipBytes(pFile, 16);
-<a name="l00842"></a>00842                         }
-<a name="l00843"></a>00843                         <span class="keywordflow">return</span> tPosition;
-<a name="l00844"></a>00844                 <span class="keywordflow">case</span> 0xf01c:
-<a name="l00845"></a>00845                         DBG_MSG(<span class="stringliteral">&quot;PICT&quot;</span>);
-<a name="l00846"></a>00846                         *peImageType = imagetype_is_pict;
-<a name="l00847"></a>00847                         tPosition += tSkipBytes(pFile, 50);
-<a name="l00848"></a>00848                         <span class="keywordflow">if</span> ((usRecordInstance ^ MSOBI_PICT) == 1) {
-<a name="l00849"></a>00849                                 tPosition += tSkipBytes(pFile, 16);
-<a name="l00850"></a>00850                         }
-<a name="l00851"></a>00851                         <span class="keywordflow">return</span> tPosition;
-<a name="l00852"></a>00852                 <span class="keywordflow">case</span> 0xf01d:
-<a name="l00853"></a>00853                         DBG_MSG(<span class="stringliteral">&quot;JPEG&quot;</span>);
-<a name="l00854"></a>00854                         *peImageType = imagetype_is_jpeg;
-<a name="l00855"></a>00855                         tPosition += tSkipBytes(pFile, 17);
-<a name="l00856"></a>00856                         <span class="keywordflow">if</span> ((usRecordInstance ^ MSOBI_JPEG) == 1) {
-<a name="l00857"></a>00857                                 tPosition += tSkipBytes(pFile, 16);
-<a name="l00858"></a>00858                         }
-<a name="l00859"></a>00859                         <span class="keywordflow">return</span> tPosition;
-<a name="l00860"></a>00860                 <span class="keywordflow">case</span> 0xf01e:
-<a name="l00861"></a>00861                         DBG_MSG(<span class="stringliteral">&quot;PNG&quot;</span>);
-<a name="l00862"></a>00862                         *peImageType = imagetype_is_png;
-<a name="l00863"></a>00863                         tPosition += tSkipBytes(pFile, 17);
-<a name="l00864"></a>00864                         <span class="keywordflow">if</span> ((usRecordInstance ^ MSOBI_PNG) == 1) {
-<a name="l00865"></a>00865                                 tPosition += tSkipBytes(pFile, 16);
-<a name="l00866"></a>00866                         }
-<a name="l00867"></a>00867                         <span class="keywordflow">return</span> tPosition;
-<a name="l00868"></a>00868                 <span class="keywordflow">case</span> 0xf01f:
-<a name="l00869"></a>00869                         DBG_MSG(<span class="stringliteral">&quot;DIB&quot;</span>);
-<a name="l00870"></a>00870                         <span class="comment">/* DIB is a BMP minus its 14 byte header */</span>
-<a name="l00871"></a>00871                         *peImageType = imagetype_is_dib;
-<a name="l00872"></a>00872                         tPosition += tSkipBytes(pFile, 17);
-<a name="l00873"></a>00873                         <span class="keywordflow">if</span> ((usRecordInstance ^ MSOBI_DIB) == 1) {
-<a name="l00874"></a>00874                                 tPosition += tSkipBytes(pFile, 16);
-<a name="l00875"></a>00875                         }
-<a name="l00876"></a>00876                         <span class="keywordflow">return</span> tPosition;
-<a name="l00877"></a>00877                 <span class="keywordflow">case</span> 0xf00c:
-<a name="l00878"></a>00878                 <span class="keywordflow">default</span>:
-<a name="l00879"></a>00879                         DBG_HEX(usRecordType);
-<a name="l00880"></a>00880                         DBG_DEC_C(tRecordLength % 4 != 0, tRecordLength);
-<a name="l00881"></a>00881                         DBG_FIXME();
-<a name="l00882"></a>00882                         <span class="keywordflow">return</span> (<span class="keywordtype">size_t</span>)-1;
-<a name="l00883"></a>00883                 }
-<a name="l00884"></a>00884         }
-<a name="l00885"></a>00885 
-<a name="l00886"></a>00886         <span class="keywordflow">return</span> (<span class="keywordtype">size_t</span>)-1;
-<a name="l00887"></a>00887 } <span class="comment">/* end of tFind8Image */</span>
-<a name="l00888"></a>00888 
-<a name="l00889"></a>00889 <span class="comment">/*</span>
-<a name="l00890"></a>00890 <span class="comment"> * eExamineImage - Examine the image</span>
-<a name="l00891"></a>00891 <span class="comment"> *</span>
-<a name="l00892"></a>00892 <span class="comment"> * Returns an indication of the amount of information found</span>
-<a name="l00893"></a>00893 <span class="comment"> */</span>
-<a name="l00894"></a>00894 image_info_enum
-<a name="l00895"></a>00895 eExamineImage(FILE *pFile, ULONG ulFileOffsetImage, imagedata_type *pImg)
-<a name="l00896"></a>00896 {
-<a name="l00897"></a>00897         <span class="keywordtype">long</span>    lTmp;
-<a name="l00898"></a>00898         <span class="keywordtype">size_t</span>  tWordHeaderLen, tLength, tPos;
-<a name="l00899"></a>00899         <span class="keywordtype">int</span>     iType, iHorSize, iVerSize;
-<a name="l00900"></a>00900         USHORT  usHorScalingFactor, usVerScalingFactor;
-<a name="l00901"></a>00901 
-<a name="l00902"></a>00902         <span class="keywordflow">if</span> (ulFileOffsetImage == FC_INVALID) {
-<a name="l00903"></a>00903                 <span class="keywordflow">return</span> image_no_information;
-<a name="l00904"></a>00904         }
-<a name="l00905"></a>00905         DBG_HEX(ulFileOffsetImage);
-<a name="l00906"></a>00906 
-<a name="l00907"></a>00907         <span class="keywordflow">if</span> (!bSetDataOffset(pFile, ulFileOffsetImage)) {
-<a name="l00908"></a>00908                 <span class="keywordflow">return</span> image_no_information;
-<a name="l00909"></a>00909         }
-<a name="l00910"></a>00910 
-<a name="l00911"></a>00911         tLength = (size_t)ulNextLong(pFile);
-<a name="l00912"></a>00912         DBG_DEC(tLength);
-<a name="l00913"></a>00913         <span class="keywordflow">if</span> (tLength &lt; 46) {
-<a name="l00914"></a>00914                 <span class="comment">/* Smaller than the smallest known header */</span>
-<a name="l00915"></a>00915                 DBG_FIXME();
-<a name="l00916"></a>00916                 <span class="keywordflow">return</span> image_no_information;
-<a name="l00917"></a>00917         }
-<a name="l00918"></a>00918         tWordHeaderLen = (size_t)usNextWord(pFile);
-<a name="l00919"></a>00919         DBG_DEC(tWordHeaderLen);
-<a name="l00920"></a>00920         fail(tWordHeaderLen != 46 &amp;&amp;
-<a name="l00921"></a>00921                 tWordHeaderLen != 58 &amp;&amp;
-<a name="l00922"></a>00922                 tWordHeaderLen != 68);
-<a name="l00923"></a>00923 
-<a name="l00924"></a>00924         <span class="keywordflow">if</span> (tLength &lt; tWordHeaderLen) {
-<a name="l00925"></a>00925                 <span class="comment">/* Smaller than the current header */</span>
-<a name="l00926"></a>00926                 <span class="keywordflow">return</span> image_no_information;
-<a name="l00927"></a>00927         }
-<a name="l00928"></a>00928         iType = (int)usNextWord(pFile);
-<a name="l00929"></a>00929         DBG_DEC(iType);
-<a name="l00930"></a>00930         (void)tSkipBytes(pFile, 28 - 8);
-<a name="l00931"></a>00931 
-<a name="l00932"></a>00932         lTmp = lTwips2MilliPoints(usNextWord(pFile));
-<a name="l00933"></a>00933         iHorSize = (int)(lTmp / 1000);
-<a name="l00934"></a>00934         <span class="keywordflow">if</span> (lTmp % 1000 != 0) {
-<a name="l00935"></a>00935                 iHorSize++;
-<a name="l00936"></a>00936         }
-<a name="l00937"></a>00937         DBG_DEC(iHorSize);
-<a name="l00938"></a>00938         lTmp = lTwips2MilliPoints(usNextWord(pFile));
-<a name="l00939"></a>00939         iVerSize = (int)(lTmp / 1000);
-<a name="l00940"></a>00940         <span class="keywordflow">if</span> (lTmp % 1000 != 0) {
-<a name="l00941"></a>00941                 iVerSize++;
-<a name="l00942"></a>00942         }
-<a name="l00943"></a>00943         DBG_DEC(iVerSize);
-<a name="l00944"></a>00944 
-<a name="l00945"></a>00945         usHorScalingFactor = usNextWord(pFile);
-<a name="l00946"></a>00946         DBG_DEC(usHorScalingFactor);
-<a name="l00947"></a>00947         usVerScalingFactor = usNextWord(pFile);
-<a name="l00948"></a>00948         DBG_DEC(usVerScalingFactor);
-<a name="l00949"></a>00949 
-<a name="l00950"></a>00950         <span class="comment">/* Sanity checks */</span>
-<a name="l00951"></a>00951         lTmp = (long)iHorSize * (<span class="keywordtype">long</span>)usHorScalingFactor;
-<a name="l00952"></a>00952         <span class="keywordflow">if</span> (lTmp &lt; 2835) {
-<a name="l00953"></a>00953                 <span class="comment">/* This image would be less than 1 millimeter wide */</span>
-<a name="l00954"></a>00954                 DBG_DEC(lTmp);
-<a name="l00955"></a>00955                 <span class="keywordflow">return</span> image_no_information;
-<a name="l00956"></a>00956         }
-<a name="l00957"></a>00957         lTmp = (long)iVerSize * (<span class="keywordtype">long</span>)usVerScalingFactor;
-<a name="l00958"></a>00958         <span class="keywordflow">if</span> (lTmp &lt; 2835) {
-<a name="l00959"></a>00959                 <span class="comment">/* This image would be less than 1 millimeter high */</span>
-<a name="l00960"></a>00960                 DBG_DEC(lTmp);
-<a name="l00961"></a>00961                 <span class="keywordflow">return</span> image_no_information;
-<a name="l00962"></a>00962         }
-<a name="l00963"></a>00963 
-<a name="l00964"></a>00964         <span class="comment">/* Skip the rest of the header */</span>
-<a name="l00965"></a>00965         (void)tSkipBytes(pFile, tWordHeaderLen - 36);
-<a name="l00966"></a>00966         tPos = tWordHeaderLen;
-<a name="l00967"></a>00967 
-<a name="l00968"></a>00968         (void)memset(pImg, 0, <span class="keyword">sizeof</span>(*pImg));
-<a name="l00969"></a>00969 
-<a name="l00970"></a>00970         <span class="keywordflow">switch</span> (iType) {
-<a name="l00971"></a>00971         <span class="keywordflow">case</span>   7:
-<a name="l00972"></a>00972         <span class="keywordflow">case</span>   8:
-<a name="l00973"></a>00973                 tPos = tFind6Image(pFile, tPos, tLength, &amp;pImg-&gt;eImageType);
-<a name="l00974"></a>00974                 <span class="keywordflow">if</span> (tPos == (<span class="keywordtype">size_t</span>)-1) {
-<a name="l00975"></a>00975                         <span class="comment">/* No image found */</span>
-<a name="l00976"></a>00976                         <span class="keywordflow">return</span> image_no_information;
-<a name="l00977"></a>00977                 }
-<a name="l00978"></a>00978                 DBG_HEX(tPos);
-<a name="l00979"></a>00979                 <span class="keywordflow">break</span>;
-<a name="l00980"></a>00980         <span class="keywordflow">case</span>  94:       <span class="comment">/* Word 6/7, no image just a pathname */</span>
-<a name="l00981"></a>00981                 pImg-&gt;eImageType = imagetype_is_external;
-<a name="l00982"></a>00982                 DBG_HEX(ulFileOffsetImage + tPos);
-<a name="l00983"></a>00983                 <span class="keywordflow">break</span>;
-<a name="l00984"></a>00984         <span class="keywordflow">case</span> 100:
-<a name="l00985"></a>00985                 tPos = tFind8Image(pFile, tPos, tLength, &amp;pImg-&gt;eImageType);
-<a name="l00986"></a>00986                 <span class="keywordflow">if</span> (tPos == (<span class="keywordtype">size_t</span>)-1) {
-<a name="l00987"></a>00987                         <span class="comment">/* No image found */</span>
-<a name="l00988"></a>00988                         <span class="keywordflow">return</span> image_no_information;
-<a name="l00989"></a>00989                 }
-<a name="l00990"></a>00990                 DBG_HEX(tPos);
-<a name="l00991"></a>00991                 <span class="keywordflow">break</span>;
-<a name="l00992"></a>00992         <span class="keywordflow">case</span> 102:       <span class="comment">/* Word 8/9/10, no image just a pathname or URL */</span>
-<a name="l00993"></a>00993                 pImg-&gt;eImageType = imagetype_is_external;
-<a name="l00994"></a>00994                 DBG_HEX(ulFileOffsetImage + tPos);
-<a name="l00995"></a>00995                 <span class="keywordflow">break</span>;
-<a name="l00996"></a>00996         <span class="keywordflow">default</span>:
-<a name="l00997"></a>00997                 DBG_DEC(iType);
-<a name="l00998"></a>00998                 DBG_HEX(ulFileOffsetImage + tPos);
-<a name="l00999"></a>00999                 DBG_FIXME();
-<a name="l01000"></a>01000                 <span class="keywordflow">return</span> image_no_information;
-<a name="l01001"></a>01001         }
-<a name="l01002"></a>01002 
-<a name="l01003"></a>01003         <span class="comment">/* Minimal information is now available */</span>
-<a name="l01004"></a>01004         pImg-&gt;tLength = tLength;
-<a name="l01005"></a>01005         pImg-&gt;tPosition = tPos;
-<a name="l01006"></a>01006         pImg-&gt;iHorSizeScaled =
-<a name="l01007"></a>01007                 (int)(((<span class="keywordtype">long</span>)iHorSize * (<span class="keywordtype">long</span>)usHorScalingFactor + 500) / 1000);
-<a name="l01008"></a>01008         pImg-&gt;iVerSizeScaled =
-<a name="l01009"></a>01009                 (int)(((<span class="keywordtype">long</span>)iVerSize * (long)usVerScalingFactor + 500) / 1000);
-<a name="l01010"></a>01010 <span class="preprocessor">#if !defined(__riscos)</span>
-<a name="l01011"></a>01011 <span class="preprocessor"></span>        vImage2Papersize(pImg);
-<a name="l01012"></a>01012 <span class="preprocessor">#endif </span><span class="comment">/* !__riscos */</span>
-<a name="l01013"></a>01013 
-<a name="l01014"></a>01014         <span class="comment">/* Image type specific examinations */</span>
-<a name="l01015"></a>01015         <span class="keywordflow">switch</span> (pImg-&gt;eImageType) {
-<a name="l01016"></a>01016         <span class="keywordflow">case</span> imagetype_is_dib:
-<a name="l01017"></a>01017                 <span class="keywordflow">if</span> (bExamineDIB(pFile, pImg)) {
-<a name="l01018"></a>01018                         <span class="keywordflow">return</span> image_full_information;
-<a name="l01019"></a>01019                 }
-<a name="l01020"></a>01020                 <span class="keywordflow">return</span> image_minimal_information;
-<a name="l01021"></a>01021         <span class="keywordflow">case</span> imagetype_is_jpeg:
-<a name="l01022"></a>01022                 <span class="keywordflow">if</span> (bExamineJPEG(pFile, pImg)) {
-<a name="l01023"></a>01023                         <span class="keywordflow">return</span> image_full_information;
-<a name="l01024"></a>01024                 }
-<a name="l01025"></a>01025                 <span class="keywordflow">return</span> image_minimal_information;
-<a name="l01026"></a>01026         <span class="keywordflow">case</span> imagetype_is_png:
-<a name="l01027"></a>01027                 <span class="keywordflow">if</span> (bExaminePNG(pFile, pImg)) {
-<a name="l01028"></a>01028                         <span class="keywordflow">return</span> image_full_information;
-<a name="l01029"></a>01029                 }
-<a name="l01030"></a>01030                 <span class="keywordflow">return</span> image_minimal_information;
-<a name="l01031"></a>01031         <span class="keywordflow">case</span> imagetype_is_wmf:
-<a name="l01032"></a>01032                 <span class="keywordflow">if</span> (bExamineWMF(pFile, pImg)) {
-<a name="l01033"></a>01033                         <span class="keywordflow">return</span> image_full_information;
-<a name="l01034"></a>01034                 }
-<a name="l01035"></a>01035                 <span class="keywordflow">return</span> image_minimal_information;
-<a name="l01036"></a>01036         <span class="keywordflow">case</span> imagetype_is_emf:
-<a name="l01037"></a>01037         <span class="keywordflow">case</span> imagetype_is_pict:
-<a name="l01038"></a>01038         <span class="keywordflow">case</span> imagetype_is_external:
-<a name="l01039"></a>01039                 <span class="keywordflow">return</span> image_minimal_information;
-<a name="l01040"></a>01040         <span class="keywordflow">case</span> imagetype_is_unknown:
-<a name="l01041"></a>01041         <span class="keywordflow">default</span>:
-<a name="l01042"></a>01042                 <span class="keywordflow">return</span> image_no_information;
-<a name="l01043"></a>01043         }
-<a name="l01044"></a>01044 } <span class="comment">/* end of eExamineImage */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/imgtrans_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/imgtrans.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/imgtrans.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * imgtrans.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2000-2002 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Generic functions to translate Word images</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00011"></a>00011 
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 <span class="comment">/*</span>
-<a name="l00014"></a>00014 <span class="comment"> * bTranslateImage - translate the image</span>
-<a name="l00015"></a>00015 <span class="comment"> *</span>
-<a name="l00016"></a>00016 <span class="comment"> * This function reads the type of the given image and and gets it translated.</span>
-<a name="l00017"></a>00017 <span class="comment"> *</span>
-<a name="l00018"></a>00018 <span class="comment"> * return TRUE when sucessful, otherwise FALSE</span>
-<a name="l00019"></a>00019 <span class="comment"> */</span>
-<a name="l00020"></a>00020 BOOL
-<a name="l00021"></a>00021 bTranslateImage(diagram_type *pDiag, FILE *pFile, BOOL bMinimalInformation,
-<a name="l00022"></a>00022         ULONG ulFileOffsetImage, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00023"></a>00023 {
-<a name="l00024"></a>00024         options_type    tOptions;
-<a name="l00025"></a>00025 
-<a name="l00026"></a>00026         DBG_MSG(<span class="stringliteral">&quot;bTranslateImage&quot;</span>);
-<a name="l00027"></a>00027 
-<a name="l00028"></a>00028         fail(pDiag == NULL);
-<a name="l00029"></a>00029         fail(pFile == NULL);
-<a name="l00030"></a>00030         fail(ulFileOffsetImage == FC_INVALID);
-<a name="l00031"></a>00031         fail(pImg == NULL);
-<a name="l00032"></a>00032         fail(pImg-&gt;iHorSizeScaled &lt;= 0);
-<a name="l00033"></a>00033         fail(pImg-&gt;iVerSizeScaled &lt;= 0);
-<a name="l00034"></a>00034 
-<a name="l00035"></a>00035         vGetOptions(&amp;tOptions);
-<a name="l00036"></a>00036         fail(tOptions.eImageLevel == level_no_images);
-<a name="l00037"></a>00037 
-<a name="l00038"></a>00038         <span class="keywordflow">if</span> (bMinimalInformation) {
-<a name="l00039"></a>00039                 <span class="keywordflow">return</span> bAddDummyImage(pDiag, pImg);
-<a name="l00040"></a>00040         }
-<a name="l00041"></a>00041 
-<a name="l00042"></a>00042         <span class="keywordflow">switch</span> (pImg-&gt;eImageType) {
-<a name="l00043"></a>00043         <span class="keywordflow">case</span> imagetype_is_dib:
-<a name="l00044"></a>00044                 <span class="keywordflow">return</span> bTranslateDIB(pDiag, pFile,
-<a name="l00045"></a>00045                                 ulFileOffsetImage + pImg-&gt;tPosition,
-<a name="l00046"></a>00046                                 pImg);
-<a name="l00047"></a>00047         <span class="keywordflow">case</span> imagetype_is_jpeg:
-<a name="l00048"></a>00048                 <span class="keywordflow">return</span> bTranslateJPEG(pDiag, pFile,
-<a name="l00049"></a>00049                                 ulFileOffsetImage + pImg-&gt;tPosition,
-<a name="l00050"></a>00050                                 pImg-&gt;tLength - pImg-&gt;tPosition,
-<a name="l00051"></a>00051                                 pImg);
-<a name="l00052"></a>00052         <span class="keywordflow">case</span> imagetype_is_png:
-<a name="l00053"></a>00053                 <span class="keywordflow">if</span> (tOptions.eImageLevel == level_ps_2) {
-<a name="l00054"></a>00054                         <span class="keywordflow">return</span> bAddDummyImage(pDiag, pImg);
-<a name="l00055"></a>00055                 }
-<a name="l00056"></a>00056                 <span class="keywordflow">return</span> bTranslatePNG(pDiag, pFile,
-<a name="l00057"></a>00057                                 ulFileOffsetImage + pImg-&gt;tPosition,
-<a name="l00058"></a>00058                                 pImg-&gt;tLength - pImg-&gt;tPosition,
-<a name="l00059"></a>00059                                 pImg);
-<a name="l00060"></a>00060         <span class="keywordflow">case</span> imagetype_is_emf:
-<a name="l00061"></a>00061         <span class="keywordflow">case</span> imagetype_is_wmf:
-<a name="l00062"></a>00062         <span class="keywordflow">case</span> imagetype_is_pict:
-<a name="l00063"></a>00063         <span class="keywordflow">case</span> imagetype_is_external:
-<a name="l00064"></a>00064                 <span class="comment">/* FIXME */</span>
-<a name="l00065"></a>00065                 <span class="keywordflow">return</span> bAddDummyImage(pDiag, pImg);
-<a name="l00066"></a>00066         <span class="keywordflow">case</span> imagetype_is_unknown:
-<a name="l00067"></a>00067         <span class="keywordflow">default</span>:
-<a name="l00068"></a>00068                 DBG_DEC(pImg-&gt;eImageType);
-<a name="l00069"></a>00069                 <span class="keywordflow">return</span> bAddDummyImage(pDiag, pImg);
-<a name="l00070"></a>00070         }
-<a name="l00071"></a>00071 } <span class="comment">/* end of bTranslateImage */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/jpeg2eps_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/jpeg2eps.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/jpeg2eps.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * jpeg2eps.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2000-2002 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Functions to translate jpeg pictures into eps</span>
-<a name="l00007"></a>00007 <span class="comment"> *</span>
-<a name="l00008"></a>00008 <span class="comment"> */</span>
-<a name="l00009"></a>00009 
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keywordtype">int</span>      iPicCounter = 0;
-<a name="l00015"></a>00015 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00016"></a>00016 
-<a name="l00017"></a>00017 
-<a name="l00018"></a>00018 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="comment">/*</span>
-<a name="l00020"></a>00020 <span class="comment"> * vCopy2File</span>
-<a name="l00021"></a>00021 <span class="comment"> */</span>
-<a name="l00022"></a>00022 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00023"></a>00023 vCopy2File(FILE *pFile, ULONG ulFileOffset, <span class="keywordtype">size_t</span> tPictureLen)
-<a name="l00024"></a>00024 {
-<a name="l00025"></a>00025         FILE    *pOutFile;
-<a name="l00026"></a>00026         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00027"></a>00027         <span class="keywordtype">int</span>     iTmp;
-<a name="l00028"></a>00028         <span class="keywordtype">char</span>    szFilename[30];
-<a name="l00029"></a>00029 
-<a name="l00030"></a>00030         <span class="keywordflow">if</span> (!bSetDataOffset(pFile, ulFileOffset)) {
-<a name="l00031"></a>00031                 <span class="keywordflow">return</span>;
-<a name="l00032"></a>00032         }
-<a name="l00033"></a>00033 
-<a name="l00034"></a>00034         sprintf(szFilename, <span class="stringliteral">&quot;/tmp/pic/pic%04d.jpg&quot;</span>, ++iPicCounter);
-<a name="l00035"></a>00035         pOutFile = fopen(szFilename, <span class="stringliteral">&quot;wb&quot;</span>);
-<a name="l00036"></a>00036         <span class="keywordflow">if</span> (pOutFile == NULL) {
-<a name="l00037"></a>00037                 <span class="keywordflow">return</span>;
-<a name="l00038"></a>00038         }
-<a name="l00039"></a>00039         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tPictureLen; tIndex++) {
-<a name="l00040"></a>00040                 iTmp = iNextByte(pFile);
-<a name="l00041"></a>00041                 <span class="keywordflow">if</span> (putc(iTmp, pOutFile) == EOF) {
-<a name="l00042"></a>00042                         <span class="keywordflow">break</span>;
-<a name="l00043"></a>00043                 }
-<a name="l00044"></a>00044         }
-<a name="l00045"></a>00045         (void)fclose(pOutFile);
-<a name="l00046"></a>00046 } <span class="comment">/* end of vCopy2File */</span>
-<a name="l00047"></a>00047 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00048"></a>00048 
-<a name="l00049"></a>00049 <span class="comment">/*</span>
-<a name="l00050"></a>00050 <span class="comment"> * bTranslateJPEG - translate a JPEG picture</span>
-<a name="l00051"></a>00051 <span class="comment"> *</span>
-<a name="l00052"></a>00052 <span class="comment"> * This function translates a picture from jpeg to eps</span>
-<a name="l00053"></a>00053 <span class="comment"> *</span>
-<a name="l00054"></a>00054 <span class="comment"> * return TRUE when sucessful, otherwise FALSE</span>
-<a name="l00055"></a>00055 <span class="comment"> */</span>
-<a name="l00056"></a>00056 BOOL
-<a name="l00057"></a>00057 bTranslateJPEG(diagram_type *pDiag, FILE *pFile,
-<a name="l00058"></a>00058         ULONG ulFileOffset, <span class="keywordtype">size_t</span> tPictureLen, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00059"></a>00059 {
-<a name="l00060"></a>00060 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00061"></a>00061 <span class="preprocessor"></span>        vCopy2File(pFile, ulFileOffset, tPictureLen);
-<a name="l00062"></a>00062 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00063"></a>00063 
-<a name="l00064"></a>00064         <span class="comment">/* Seek to start position of JPEG data */</span>
-<a name="l00065"></a>00065         <span class="keywordflow">if</span> (!bSetDataOffset(pFile, ulFileOffset)) {
-<a name="l00066"></a>00066                 <span class="keywordflow">return</span> FALSE;
-<a name="l00067"></a>00067         }
-<a name="l00068"></a>00068 
-<a name="l00069"></a>00069         vImagePrologue(pDiag, pImg);
-<a name="l00070"></a>00070         vASCII85EncodeFile(pFile, pDiag-&gt;pOutFile, tPictureLen);
-<a name="l00071"></a>00071         vImageEpilogue(pDiag);
-<a name="l00072"></a>00072 
-<a name="l00073"></a>00073         <span class="keywordflow">return</span> TRUE;
-<a name="l00074"></a>00074 } <span class="comment">/* end of bTranslateJPEG */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/jpeg2sprt_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,116 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/jpeg2sprt.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/jpeg2sprt.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * jpeg2sprt.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2000-2002 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Functions to translate jpeg pictures into sprites</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00011"></a>00011 
-<a name="l00012"></a>00012 <span class="preprocessor">#if 0 </span><span class="comment">/* defined(DEBUG) */</span>
-<a name="l00013"></a>00013 <span class="keyword">static</span> <span class="keywordtype">int</span> iPicCounter = 0;
-<a name="l00014"></a>00014 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00015"></a>00015 
-<a name="l00016"></a>00016 
-<a name="l00017"></a>00017 <span class="preprocessor">#if 0 </span><span class="comment">/* defined(DEBUG) */</span>
-<a name="l00018"></a>00018 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00019"></a>00019 vCopy2File(UCHAR *pucJpeg, <span class="keywordtype">size_t</span> tJpegSize)
-<a name="l00020"></a>00020 {
-<a name="l00021"></a>00021         FILE    *pOutFile;
-<a name="l00022"></a>00022         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00023"></a>00023         <span class="keywordtype">char</span>    szFilename[30];
-<a name="l00024"></a>00024 
-<a name="l00025"></a>00025         sprintf(szFilename, <span class="stringliteral">&quot;&lt;Wimp$ScrapDir&gt;.jpeg%04d&quot;</span>, ++iPicCounter);
-<a name="l00026"></a>00026         pOutFile = fopen(szFilename, <span class="stringliteral">&quot;wb&quot;</span>);
-<a name="l00027"></a>00027         <span class="keywordflow">if</span> (pOutFile == NULL) {
-<a name="l00028"></a>00028                 <span class="keywordflow">return</span>;
-<a name="l00029"></a>00029         }
-<a name="l00030"></a>00030         DBG_MSG(szFilename);
-<a name="l00031"></a>00031         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tJpegSize; tIndex++) {
-<a name="l00032"></a>00032                 <span class="keywordflow">if</span> (putc(pucJpeg[tIndex], pOutFile) == EOF) {
-<a name="l00033"></a>00033                         <span class="keywordflow">break</span>;
-<a name="l00034"></a>00034                 }
-<a name="l00035"></a>00035         }
-<a name="l00036"></a>00036         (void)fclose(pOutFile);
-<a name="l00037"></a>00037         vSetFiletype(szFilename, FILETYPE_JPEG);
-<a name="l00038"></a>00038 } <span class="comment">/* end of vCopy2File */</span>
-<a name="l00039"></a>00039 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00040"></a>00040 
-<a name="l00041"></a>00041 <span class="comment">/*</span>
-<a name="l00042"></a>00042 <span class="comment"> * bSave2Draw - save the JPEG picture to the Draw file</span>
-<a name="l00043"></a>00043 <span class="comment"> *</span>
-<a name="l00044"></a>00044 <span class="comment"> * This function puts a JPEG picture in a Draw file</span>
-<a name="l00045"></a>00045 <span class="comment"> *</span>
-<a name="l00046"></a>00046 <span class="comment"> * return TRUE when sucessful, otherwise FALSE</span>
-<a name="l00047"></a>00047 <span class="comment"> */</span>
-<a name="l00048"></a>00048 BOOL
-<a name="l00049"></a>00049 bSave2Draw(diagram_type *pDiag, FILE *pFile,
-<a name="l00050"></a>00050         <span class="keywordtype">size_t</span> tJpegSize, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00051"></a>00051 {
-<a name="l00052"></a>00052         UCHAR   *pucJpeg, *pucTmp;
-<a name="l00053"></a>00053         <span class="keywordtype">size_t</span>  tLen;
-<a name="l00054"></a>00054         <span class="keywordtype">int</span>     iByte;
-<a name="l00055"></a>00055 
-<a name="l00056"></a>00056         pucJpeg = xmalloc(tJpegSize);
-<a name="l00057"></a>00057         <span class="keywordflow">for</span> (pucTmp = pucJpeg, tLen = 0; tLen &lt; tJpegSize; pucTmp++, tLen++) {
-<a name="l00058"></a>00058                 iByte = iNextByte(pFile);
-<a name="l00059"></a>00059                 <span class="keywordflow">if</span> (iByte == EOF) {
-<a name="l00060"></a>00060                         <span class="keywordflow">return</span> FALSE;
-<a name="l00061"></a>00061                 }
-<a name="l00062"></a>00062                 *pucTmp = (UCHAR)iByte;
-<a name="l00063"></a>00063         }
-<a name="l00064"></a>00064 
-<a name="l00065"></a>00065 <span class="preprocessor">#if 0 </span><span class="comment">/* defined(DEBUG) */</span>
-<a name="l00066"></a>00066         vCopy2File(pucJpeg, tJpegSize);
-<a name="l00067"></a>00067 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00068"></a>00068 
-<a name="l00069"></a>00069         <span class="comment">/* Add the JPEG to the Draw file */</span>
-<a name="l00070"></a>00070         vImage2Diagram(pDiag, pImg, pucJpeg, tJpegSize);
-<a name="l00071"></a>00071 
-<a name="l00072"></a>00072         xfree(pucJpeg);
-<a name="l00073"></a>00073         <span class="keywordflow">return</span> TRUE;
-<a name="l00074"></a>00074 } <span class="comment">/* end of bSave2Draw */</span>
-<a name="l00075"></a>00075 
-<a name="l00076"></a>00076 <span class="comment">/*</span>
-<a name="l00077"></a>00077 <span class="comment"> * bTranslateJPEG - translate a JPEG picture</span>
-<a name="l00078"></a>00078 <span class="comment"> *</span>
-<a name="l00079"></a>00079 <span class="comment"> * This function translates a picture from jpeg to sprite</span>
-<a name="l00080"></a>00080 <span class="comment"> *</span>
-<a name="l00081"></a>00081 <span class="comment"> * return TRUE when sucessful, otherwise FALSE</span>
-<a name="l00082"></a>00082 <span class="comment"> */</span>
-<a name="l00083"></a>00083 <span class="preprocessor">#if 0</span>
-<a name="l00084"></a>00084 <span class="preprocessor"></span>BOOL
-<a name="l00085"></a>00085 bTranslateJPEG(diagram_type *pDiag, FILE *pFile,
-<a name="l00086"></a>00086         ULONG ulFileOffset, <span class="keywordtype">size_t</span> tPictureLen, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00087"></a>00087 {
-<a name="l00088"></a>00088         <span class="comment">/* Seek to start position of JPEG data */</span>
-<a name="l00089"></a>00089         <span class="keywordflow">if</span> (!bSetDataOffset(pFile, ulFileOffset)) {
-<a name="l00090"></a>00090                 <span class="keywordflow">return</span> FALSE;
-<a name="l00091"></a>00091         }
-<a name="l00092"></a>00092 
-<a name="l00093"></a>00093         <span class="keywordflow">if</span> (iGetRiscOsVersion() &gt;= 360) {
-<a name="l00094"></a>00094                 <span class="keywordflow">return</span> bSave2Draw(pDiag, pFile, tPictureLen, pImg);
-<a name="l00095"></a>00095         }
-<a name="l00096"></a>00096         <span class="comment">/* JPEG is not supported until RISC OS 3.6 */</span>
-<a name="l00097"></a>00097         <span class="keywordflow">return</span> bAddDummyImage(pDiag, pImg);
-<a name="l00098"></a>00098 } <span class="comment">/* end of bTranslateJPEG */</span>
-<a name="l00099"></a>00099 
-<a name="l00100"></a>00100 <span class="preprocessor">#endif</span><span class="comment">/*0*/</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/listlist_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,346 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/listlist.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/listlist.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * listlist.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2002,2003 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Build, read and destroy a list of Word list information</span>
-<a name="l00007"></a>00007 <span class="comment"> *</span>
-<a name="l00008"></a>00008 <span class="comment"> * Note:</span>
-<a name="l00009"></a>00009 <span class="comment"> * This list only exists when the Word document is saved by Word 8 or later</span>
-<a name="l00010"></a>00010 <span class="comment"> */</span>
-<a name="l00011"></a>00011 
-<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00013"></a>00013 
-<a name="l00014"></a>00014 <span class="comment">/*</span>
-<a name="l00015"></a>00015 <span class="comment"> * Private structure to hide the way the information</span>
-<a name="l00016"></a>00016 <span class="comment"> * is stored from the rest of the program</span>
-<a name="l00017"></a>00017 <span class="comment"> */</span>
-<a name="l00018"></a>00018 <span class="keyword">typedef</span> <span class="keyword">struct </span>list_desc_tag {
-<a name="l00019"></a>00019         list_block_type         tInfo;
-<a name="l00020"></a>00020         ULONG                   ulListID;
-<a name="l00021"></a>00021         USHORT                  usIstd;
-<a name="l00022"></a>00022         UCHAR                   ucListLevel;
-<a name="l00023"></a>00023         <span class="keyword">struct </span>list_desc_tag    *pNext;
-<a name="l00024"></a>00024 } list_desc_type;
-<a name="l00025"></a>00025 
-<a name="l00026"></a>00026 <span class="keyword">typedef</span> <span class="keyword">struct </span>list_value_tag {
-<a name="l00027"></a>00027         USHORT                  usValue;
-<a name="l00028"></a>00028         USHORT                  usListIndex;
-<a name="l00029"></a>00029         UCHAR                   ucListLevel;
-<a name="l00030"></a>00030         <span class="keyword">struct </span>list_value_tag   *pNext;
-<a name="l00031"></a>00031 } list_value_type;
-<a name="l00032"></a>00032 
-<a name="l00033"></a>00033 <span class="comment">/* Variables needed to describe the LFO list (pllfo) */</span>
-<a name="l00034"></a>00034 <span class="keyword">static</span> ULONG            *aulLfoList = NULL;
-<a name="l00035"></a>00035 <span class="keyword">static</span> USHORT           usLfoLen = 0;
-<a name="l00036"></a>00036 <span class="comment">/* Variables needed to write the List Information List */</span>
-<a name="l00037"></a>00037 <span class="keyword">static</span> list_desc_type   *pAnchor = NULL;
-<a name="l00038"></a>00038 <span class="keyword">static</span> list_desc_type   *pBlockLast = NULL;
-<a name="l00039"></a>00039 <span class="comment">/* Variable needed for numbering new lists */</span>
-<a name="l00040"></a>00040 <span class="keyword">static</span> list_value_type  *pValues = NULL;
-<a name="l00041"></a>00041 <span class="comment">/* Variables needed for numbering old lists */</span>
-<a name="l00042"></a>00042 <span class="keyword">static</span> <span class="keywordtype">int</span>      iOldListSeqNumber = 0;
-<a name="l00043"></a>00043 <span class="keyword">static</span> USHORT   usOldListValue = 0;
-<a name="l00044"></a>00044 
-<a name="l00045"></a>00045 
-<a name="l00046"></a>00046 <span class="comment">/*</span>
-<a name="l00047"></a>00047 <span class="comment"> * vDestroyListInfoList - destroy the List Information List</span>
-<a name="l00048"></a>00048 <span class="comment"> */</span>
-<a name="l00049"></a>00049 <span class="keywordtype">void</span>
-<a name="l00050"></a>00050 vDestroyListInfoList(<span class="keywordtype">void</span>)
-<a name="l00051"></a>00051 {
-<a name="l00052"></a>00052         list_desc_type  *pCurr, *pNext;
-<a name="l00053"></a>00053         list_value_type *pValueCurr, *pValueNext;
-<a name="l00054"></a>00054 
-<a name="l00055"></a>00055         DBG_MSG(<span class="stringliteral">&quot;vDestroyListInfoList&quot;</span>);
-<a name="l00056"></a>00056 
-<a name="l00057"></a>00057         <span class="comment">/* Free the LFO list */</span>
-<a name="l00058"></a>00058         usLfoLen = 0;
-<a name="l00059"></a>00059         aulLfoList = xfree(aulLfoList);
-<a name="l00060"></a>00060 
-<a name="l00061"></a>00061         <span class="comment">/* Free the List Information List */</span>
-<a name="l00062"></a>00062         pCurr = pAnchor;
-<a name="l00063"></a>00063         <span class="keywordflow">while</span> (pCurr != NULL) {
-<a name="l00064"></a>00064                 pNext = pCurr-&gt;pNext;
-<a name="l00065"></a>00065                 pCurr = xfree(pCurr);
-<a name="l00066"></a>00066                 pCurr = pNext;
-<a name="l00067"></a>00067         }
-<a name="l00068"></a>00068         pAnchor = NULL;
-<a name="l00069"></a>00069         <span class="comment">/* Reset all control variables */</span>
-<a name="l00070"></a>00070         pBlockLast = NULL;
-<a name="l00071"></a>00071 
-<a name="l00072"></a>00072         <span class="comment">/* Free the values list */</span>
-<a name="l00073"></a>00073         pValueCurr = pValues;
-<a name="l00074"></a>00074         <span class="keywordflow">while</span> (pValueCurr != NULL) {
-<a name="l00075"></a>00075                 pValueNext = pValueCurr-&gt;pNext;
-<a name="l00076"></a>00076                 pValueCurr = xfree(pValueCurr);
-<a name="l00077"></a>00077                 pValueCurr = pValueNext;
-<a name="l00078"></a>00078         }
-<a name="l00079"></a>00079         pValues = NULL;
-<a name="l00080"></a>00080         <span class="comment">/* Reset the values for the old lists */</span>
-<a name="l00081"></a>00081         iOldListSeqNumber = 0;
-<a name="l00082"></a>00082         usOldListValue = 0;
-<a name="l00083"></a>00083 } <span class="comment">/* end of vDestroyListInfoList */</span>
-<a name="l00084"></a>00084 
-<a name="l00085"></a>00085 <span class="comment">/*</span>
-<a name="l00086"></a>00086 <span class="comment"> * vBuildLfoList - build the LFO list (pllfo)</span>
-<a name="l00087"></a>00087 <span class="comment"> */</span>
-<a name="l00088"></a>00088 <span class="keywordtype">void</span>
-<a name="l00089"></a>00089 vBuildLfoList(<span class="keyword">const</span> UCHAR *aucBuffer, <span class="keywordtype">size_t</span> tBufLen)
-<a name="l00090"></a>00090 {
-<a name="l00091"></a>00091         <span class="keywordtype">size_t</span>  tRecords;
-<a name="l00092"></a>00092         <span class="keywordtype">int</span>     iIndex;
-<a name="l00093"></a>00093 
-<a name="l00094"></a>00094         fail(aucBuffer == NULL);
-<a name="l00095"></a>00095 
-<a name="l00096"></a>00096         <span class="keywordflow">if</span> (tBufLen &lt; 4) {
-<a name="l00097"></a>00097                 <span class="keywordflow">return</span>;
-<a name="l00098"></a>00098         }
-<a name="l00099"></a>00099         tRecords = (size_t)ulGetLong(0, aucBuffer);
-<a name="l00100"></a>00100         NO_DBG_DEC(tRecords);
-<a name="l00101"></a>00101         <span class="keywordflow">if</span> (4 + 16 * tRecords &gt; tBufLen || tRecords &gt;= 0x7fff) {
-<a name="l00102"></a>00102                 <span class="comment">/* Just a sanity check */</span>
-<a name="l00103"></a>00103                 DBG_DEC(tRecords);
-<a name="l00104"></a>00104                 DBG_DEC(4 + 16 * tRecords);
-<a name="l00105"></a>00105                 DBG_DEC(tBufLen);
-<a name="l00106"></a>00106                 <span class="keywordflow">return</span>;
-<a name="l00107"></a>00107         }
-<a name="l00108"></a>00108         aulLfoList = xcalloc(tRecords, <span class="keyword">sizeof</span>(ULONG));
-<a name="l00109"></a>00109         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; (int)tRecords; iIndex++) {
-<a name="l00110"></a>00110                 aulLfoList[iIndex] = ulGetLong(4 + 16 * iIndex, aucBuffer);
-<a name="l00111"></a>00111                 NO_DBG_HEX(aulLfoList[iIndex]);
-<a name="l00112"></a>00112         }
-<a name="l00113"></a>00113         usLfoLen = (USHORT)tRecords;
-<a name="l00114"></a>00114 } <span class="comment">/* end of vBuildLfoList */</span>
-<a name="l00115"></a>00115 
-<a name="l00116"></a>00116 <span class="comment">/*</span>
-<a name="l00117"></a>00117 <span class="comment"> * vAdd2ListInfoList - add an element to the List Information list</span>
-<a name="l00118"></a>00118 <span class="comment"> */</span>
-<a name="l00119"></a>00119 <span class="keywordtype">void</span>
-<a name="l00120"></a>00120 vAdd2ListInfoList(ULONG ulListID, USHORT usIstd, UCHAR ucListLevel,
-<a name="l00121"></a>00121         <span class="keyword">const</span> list_block_type *pListBlock)
-<a name="l00122"></a>00122 {
-<a name="l00123"></a>00123         list_desc_type  *pListMember;
-<a name="l00124"></a>00124 
-<a name="l00125"></a>00125         fail(pListBlock == NULL);
-<a name="l00126"></a>00126 
-<a name="l00127"></a>00127         NO_DBG_HEX(ulListID);
-<a name="l00128"></a>00128         NO_DBG_DEC(usIstd);
-<a name="l00129"></a>00129         NO_DBG_DEC(ucListLevel);
-<a name="l00130"></a>00130         NO_DBG_DEC(pListBlock-&gt;ulStartAt);
-<a name="l00131"></a>00131         NO_DBG_DEC(pListBlock-&gt;bNoRestart);
-<a name="l00132"></a>00132         NO_DBG_DEC(pListBlock-&gt;sLeftIndent);
-<a name="l00133"></a>00133         NO_DBG_HEX(pListBlock-&gt;ucNFC);
-<a name="l00134"></a>00134         NO_DBG_HEX(pListBlock-&gt;usListChar);
-<a name="l00135"></a>00135 
-<a name="l00136"></a>00136         <span class="comment">/* Create list member */</span>
-<a name="l00137"></a>00137         pListMember = xmalloc(<span class="keyword">sizeof</span>(list_desc_type));
-<a name="l00138"></a>00138         <span class="comment">/* Fill the list member */</span>
-<a name="l00139"></a>00139         pListMember-&gt;tInfo = *pListBlock;
-<a name="l00140"></a>00140         pListMember-&gt;ulListID = ulListID;
-<a name="l00141"></a>00141         pListMember-&gt;usIstd = usIstd;
-<a name="l00142"></a>00142         pListMember-&gt;ucListLevel = ucListLevel;
-<a name="l00143"></a>00143         pListMember-&gt;pNext = NULL;
-<a name="l00144"></a>00144         <span class="comment">/* Correct the values where needed */</span>
-<a name="l00145"></a>00145         <span class="keywordflow">if</span> (pListMember-&gt;tInfo.ulStartAt &gt; 0xffff) {
-<a name="l00146"></a>00146                 DBG_DEC(pListMember-&gt;tInfo.ulStartAt);
-<a name="l00147"></a>00147                 pListMember-&gt;tInfo.ulStartAt = 1;
-<a name="l00148"></a>00148         }
-<a name="l00149"></a>00149         <span class="comment">/* Add the new member to the list */</span>
-<a name="l00150"></a>00150         <span class="keywordflow">if</span> (pAnchor == NULL) {
-<a name="l00151"></a>00151                 pAnchor = pListMember;
-<a name="l00152"></a>00152         } <span class="keywordflow">else</span> {
-<a name="l00153"></a>00153                 fail(pBlockLast == NULL);
-<a name="l00154"></a>00154                 pBlockLast-&gt;pNext = pListMember;
-<a name="l00155"></a>00155         }
-<a name="l00156"></a>00156         pBlockLast = pListMember;
-<a name="l00157"></a>00157 } <span class="comment">/* end of vAdd2ListInfoList */</span>
-<a name="l00158"></a>00158 
-<a name="l00159"></a>00159 <span class="comment">/*</span>
-<a name="l00160"></a>00160 <span class="comment"> * Get a matching record from the List Information List</span>
-<a name="l00161"></a>00161 <span class="comment"> *</span>
-<a name="l00162"></a>00162 <span class="comment"> * Returns NULL if no matching records is found</span>
-<a name="l00163"></a>00163 <span class="comment"> */</span>
-<a name="l00164"></a>00164 <span class="keyword">const</span> list_block_type *
-<a name="l00165"></a>00165 pGetListInfo(USHORT usListIndex, UCHAR ucListLevel)
-<a name="l00166"></a>00166 {
-<a name="l00167"></a>00167         list_desc_type  *pCurr;
-<a name="l00168"></a>00168         list_block_type *pNearMatch;
-<a name="l00169"></a>00169         ULONG   ulListID;
-<a name="l00170"></a>00170 
-<a name="l00171"></a>00171         <span class="keywordflow">if</span> (usListIndex == 0) {
-<a name="l00172"></a>00172                 <span class="keywordflow">return</span> NULL;
-<a name="l00173"></a>00173         }
-<a name="l00174"></a>00174         <span class="keywordflow">if</span> (usListIndex - 1 &gt;= usLfoLen || ucListLevel &gt; 8) {
-<a name="l00175"></a>00175                 DBG_DEC(usListIndex);
-<a name="l00176"></a>00176                 DBG_DEC(ucListLevel);
-<a name="l00177"></a>00177                 <span class="keywordflow">return</span> NULL;
-<a name="l00178"></a>00178         }
-<a name="l00179"></a>00179         fail(aulLfoList == NULL);
-<a name="l00180"></a>00180         ulListID = aulLfoList[usListIndex - 1];
-<a name="l00181"></a>00181         NO_DBG_HEX(ulListID);
-<a name="l00182"></a>00182 
-<a name="l00183"></a>00183         pNearMatch = NULL;
-<a name="l00184"></a>00184         <span class="keywordflow">for</span> (pCurr = pAnchor; pCurr != NULL; pCurr = pCurr-&gt;pNext) {
-<a name="l00185"></a>00185                 <span class="keywordflow">if</span> (pCurr-&gt;ulListID != ulListID) {
-<a name="l00186"></a>00186                         <span class="comment">/* No match */</span>
-<a name="l00187"></a>00187                         <span class="keywordflow">continue</span>;
-<a name="l00188"></a>00188                 }
-<a name="l00189"></a>00189                 <span class="keywordflow">if</span> (pCurr-&gt;ucListLevel == ucListLevel) {
-<a name="l00190"></a>00190                         <span class="comment">/* Exact match */</span>
-<a name="l00191"></a>00191                         <span class="keywordflow">return</span> &amp;pCurr-&gt;tInfo;
-<a name="l00192"></a>00192                 }
-<a name="l00193"></a>00193                 <span class="keywordflow">if</span> (pCurr-&gt;ucListLevel == 0) {
-<a name="l00194"></a>00194                         <span class="comment">/* Near match */</span>
-<a name="l00195"></a>00195                         pNearMatch = &amp;pCurr-&gt;tInfo;
-<a name="l00196"></a>00196                 }
-<a name="l00197"></a>00197         }
-<a name="l00198"></a>00198         <span class="comment">/* No exact match, use a near match if any */</span>
-<a name="l00199"></a>00199         <span class="keywordflow">return</span> pNearMatch;
-<a name="l00200"></a>00200 } <span class="comment">/* end of pGetListInfo */</span>
-<a name="l00201"></a>00201 
-<a name="l00202"></a>00202 <span class="comment">/*</span>
-<a name="l00203"></a>00203 <span class="comment"> * Get a matching record from the List Information List</span>
-<a name="l00204"></a>00204 <span class="comment"> *</span>
-<a name="l00205"></a>00205 <span class="comment"> * Returns NULL if no matching records is found</span>
-<a name="l00206"></a>00206 <span class="comment"> */</span>
-<a name="l00207"></a>00207 <span class="keyword">const</span> list_block_type *
-<a name="l00208"></a>00208 pGetListInfoByIstd(USHORT usIstd)
-<a name="l00209"></a>00209 {
-<a name="l00210"></a>00210         list_desc_type  *pCurr;
-<a name="l00211"></a>00211 
-<a name="l00212"></a>00212         <span class="keywordflow">if</span> (usIstd == ISTD_INVALID || usIstd == STI_NIL || usIstd == STI_USER) {
-<a name="l00213"></a>00213                 <span class="keywordflow">return</span> NULL;
-<a name="l00214"></a>00214         }
-<a name="l00215"></a>00215 
-<a name="l00216"></a>00216         <span class="keywordflow">for</span> (pCurr = pAnchor; pCurr != NULL; pCurr = pCurr-&gt;pNext) {
-<a name="l00217"></a>00217                 <span class="keywordflow">if</span> (pCurr-&gt;usIstd == usIstd) {
-<a name="l00218"></a>00218                         <span class="keywordflow">return</span> &amp;pCurr-&gt;tInfo;
-<a name="l00219"></a>00219                 }
-<a name="l00220"></a>00220         }
-<a name="l00221"></a>00221         <span class="keywordflow">return</span> NULL;
-<a name="l00222"></a>00222 } <span class="comment">/* end of pGetListInfoByIstd */</span>
-<a name="l00223"></a>00223 
-<a name="l00224"></a>00224 <span class="comment">/*</span>
-<a name="l00225"></a>00225 <span class="comment"> * vRestartListValues - reset the less significant list levels</span>
-<a name="l00226"></a>00226 <span class="comment"> */</span>
-<a name="l00227"></a>00227 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00228"></a>00228 vRestartListValues(USHORT usListIndex, UCHAR ucListLevel)
-<a name="l00229"></a>00229 {
-<a name="l00230"></a>00230         list_value_type *pPrev, *pCurr, *pNext;
-<a name="l00231"></a>00231         <span class="keywordtype">int</span>             iCounter;
-<a name="l00232"></a>00232 
-<a name="l00233"></a>00233         iCounter = 0;
-<a name="l00234"></a>00234         pPrev = NULL;
-<a name="l00235"></a>00235         pCurr = pValues;
-<a name="l00236"></a>00236 
-<a name="l00237"></a>00237         <span class="keywordflow">while</span> (pCurr != NULL) {
-<a name="l00238"></a>00238                 <span class="keywordflow">if</span> (pCurr-&gt;usListIndex != usListIndex ||
-<a name="l00239"></a>00239                     pCurr-&gt;ucListLevel &lt;= ucListLevel) {
-<a name="l00240"></a>00240                         pPrev = pCurr;
-<a name="l00241"></a>00241                         pCurr = pCurr-&gt;pNext;
-<a name="l00242"></a>00242                         <span class="keywordflow">continue</span>;
-<a name="l00243"></a>00243                 }
-<a name="l00244"></a>00244                 <span class="comment">/* Reset the level by deleting the record */</span>
-<a name="l00245"></a>00245                 pNext = pCurr-&gt;pNext;
-<a name="l00246"></a>00246                 <span class="keywordflow">if</span> (pPrev == NULL) {
-<a name="l00247"></a>00247                         pValues = pNext;
-<a name="l00248"></a>00248                 } <span class="keywordflow">else</span> {
-<a name="l00249"></a>00249                         pPrev-&gt;pNext = pNext;
-<a name="l00250"></a>00250                 }
-<a name="l00251"></a>00251                 DBG_DEC(pCurr-&gt;usListIndex);
-<a name="l00252"></a>00252                 DBG_DEC(pCurr-&gt;ucListLevel);
-<a name="l00253"></a>00253                 pCurr = xfree(pCurr);
-<a name="l00254"></a>00254                 pCurr = pNext;
-<a name="l00255"></a>00255                 iCounter++;
-<a name="l00256"></a>00256         }
-<a name="l00257"></a>00257         DBG_DEC_C(iCounter &gt; 0, iCounter);
-<a name="l00258"></a>00258 } <span class="comment">/* end of vRestartListValues */</span>
-<a name="l00259"></a>00259 
-<a name="l00260"></a>00260 <span class="comment">/*</span>
-<a name="l00261"></a>00261 <span class="comment"> * usGetListValue - Get the current value of the given list</span>
-<a name="l00262"></a>00262 <span class="comment"> *</span>
-<a name="l00263"></a>00263 <span class="comment"> * Returns the value of the given list</span>
-<a name="l00264"></a>00264 <span class="comment"> */</span>
-<a name="l00265"></a>00265 USHORT
-<a name="l00266"></a>00266 usGetListValue(<span class="keywordtype">int</span> iListSeqNumber, <span class="keywordtype">int</span> iWordVersion,
-<a name="l00267"></a>00267         <span class="keyword">const</span> style_block_type *pStyle)
-<a name="l00268"></a>00268 {
-<a name="l00269"></a>00269         list_value_type *pCurr;
-<a name="l00270"></a>00270         USHORT          usValue;
-<a name="l00271"></a>00271 
-<a name="l00272"></a>00272         fail(iListSeqNumber &lt; 0);
-<a name="l00273"></a>00273         fail(iListSeqNumber &lt; iOldListSeqNumber);
-<a name="l00274"></a>00274         fail(iWordVersion &lt; 0);
-<a name="l00275"></a>00275         fail(pStyle == NULL);
-<a name="l00276"></a>00276 
-<a name="l00277"></a>00277         <span class="keywordflow">if</span> (iListSeqNumber &lt;= 0) {
-<a name="l00278"></a>00278                 <span class="keywordflow">return</span> 0;
-<a name="l00279"></a>00279         }
-<a name="l00280"></a>00280 
-<a name="l00281"></a>00281         <span class="keywordflow">if</span> (iWordVersion &lt; 8) {
-<a name="l00282"></a>00282                 <span class="comment">/* Old style list */</span>
-<a name="l00283"></a>00283                 <span class="keywordflow">if</span> (iListSeqNumber == iOldListSeqNumber ||
-<a name="l00284"></a>00284                     (iListSeqNumber == iOldListSeqNumber + 1 &amp;&amp;
-<a name="l00285"></a>00285                      eGetNumType(pStyle-&gt;ucNumLevel) == level_type_sequence)) {
-<a name="l00286"></a>00286                         <span class="keywordflow">if</span> (!pStyle-&gt;bNumPause) {
-<a name="l00287"></a>00287                                 usOldListValue++;
-<a name="l00288"></a>00288                         }
-<a name="l00289"></a>00289                 } <span class="keywordflow">else</span> {
-<a name="l00290"></a>00290                         usOldListValue = pStyle-&gt;usStartAt;
-<a name="l00291"></a>00291                 }
-<a name="l00292"></a>00292                 iOldListSeqNumber = iListSeqNumber;
-<a name="l00293"></a>00293                 <span class="keywordflow">return</span> usOldListValue;
-<a name="l00294"></a>00294         }
-<a name="l00295"></a>00295 
-<a name="l00296"></a>00296         <span class="comment">/* New style list */</span>
-<a name="l00297"></a>00297         <span class="keywordflow">if</span> (pStyle-&gt;usListIndex == 0 ||
-<a name="l00298"></a>00298             pStyle-&gt;usListIndex - 1 &gt;= usLfoLen ||
-<a name="l00299"></a>00299             pStyle-&gt;ucListLevel &gt; 8) {
-<a name="l00300"></a>00300                 <span class="comment">/* Out of range; no need to search */</span>
-<a name="l00301"></a>00301                 <span class="keywordflow">return</span> 0;
-<a name="l00302"></a>00302         }
-<a name="l00303"></a>00303 
-<a name="l00304"></a>00304         <span class="keywordflow">for</span> (pCurr = pValues; pCurr != NULL; pCurr = pCurr-&gt;pNext) {
-<a name="l00305"></a>00305                 <span class="keywordflow">if</span> (pCurr-&gt;usListIndex == pStyle-&gt;usListIndex &amp;&amp;
-<a name="l00306"></a>00306                     pCurr-&gt;ucListLevel == pStyle-&gt;ucListLevel) {
-<a name="l00307"></a>00307                         <span class="comment">/* Record found; increment and return the value */</span>
-<a name="l00308"></a>00308                         pCurr-&gt;usValue++;
-<a name="l00309"></a>00309                         usValue = pCurr-&gt;usValue;
-<a name="l00310"></a>00310                         <span class="keywordflow">if</span> (!pStyle-&gt;bNoRestart) {
-<a name="l00311"></a>00311                                 vRestartListValues(pStyle-&gt;usListIndex,
-<a name="l00312"></a>00312                                                 pStyle-&gt;ucListLevel);
-<a name="l00313"></a>00313                         }
-<a name="l00314"></a>00314                         <span class="keywordflow">return</span> usValue;
-<a name="l00315"></a>00315                 }
-<a name="l00316"></a>00316         }
-<a name="l00317"></a>00317 
-<a name="l00318"></a>00318         <span class="comment">/* Record not found; create it and add it to the front of the list */</span>
-<a name="l00319"></a>00319         pCurr = xmalloc(<span class="keyword">sizeof</span>(list_value_type));
-<a name="l00320"></a>00320         pCurr-&gt;usValue = pStyle-&gt;usStartAt;
-<a name="l00321"></a>00321         pCurr-&gt;usListIndex = pStyle-&gt;usListIndex;
-<a name="l00322"></a>00322         pCurr-&gt;ucListLevel = pStyle-&gt;ucListLevel;
-<a name="l00323"></a>00323         pCurr-&gt;pNext = pValues;
-<a name="l00324"></a>00324         pValues = pCurr;
-<a name="l00325"></a>00325         usValue = pCurr-&gt;usValue;
-<a name="l00326"></a>00326         <span class="keywordflow">if</span> (!pStyle-&gt;bNoRestart) {
-<a name="l00327"></a>00327                 vRestartListValues(pStyle-&gt;usListIndex, pStyle-&gt;ucListLevel);
-<a name="l00328"></a>00328         }
-<a name="l00329"></a>00329         <span class="keywordflow">return</span> usValue;
-<a name="l00330"></a>00330 } <span class="comment">/* end of usGetListValue */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/main__ros_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,536 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/main_ros.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/main_ros.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * main_ros.c</span>
-<a name="l00003"></a>00003 <span class="comment"> *</span>
-<a name="l00004"></a>00004 <span class="comment"> * Released under GPL</span>
-<a name="l00005"></a>00005 <span class="comment"> *</span>
-<a name="l00006"></a>00006 <span class="comment"> * Copyright (C) 1998-2005 A.J. van Os</span>
-<a name="l00007"></a>00007 <span class="comment"> *</span>
-<a name="l00008"></a>00008 <span class="comment"> * This program is free software; you can redistribute it and/or</span>
-<a name="l00009"></a>00009 <span class="comment"> * modify it under the terms of the GNU General Public License</span>
-<a name="l00010"></a>00010 <span class="comment"> * as published by the Free Software Foundation; either version 2</span>
-<a name="l00011"></a>00011 <span class="comment"> * of the License, or (at your option) any later version.</span>
-<a name="l00012"></a>00012 <span class="comment"> *</span>
-<a name="l00013"></a>00013 <span class="comment"> * This program is distributed in the hope that it will be useful,</span>
-<a name="l00014"></a>00014 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
-<a name="l00015"></a>00015 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
-<a name="l00016"></a>00016 <span class="comment"> * GNU General Public License for more details.</span>
-<a name="l00017"></a>00017 <span class="comment"> *</span>
-<a name="l00018"></a>00018 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
-<a name="l00019"></a>00019 <span class="comment"> * along with this program; if not, write to the Free Software</span>
-<a name="l00020"></a>00020 <span class="comment"> * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.</span>
-<a name="l00021"></a>00021 <span class="comment"> *</span>
-<a name="l00022"></a>00022 <span class="comment"> * Description:</span>
-<a name="l00023"></a>00023 <span class="comment"> * The main program of !Antiword (RISC OS version)</span>
-<a name="l00024"></a>00024 <span class="comment"> */</span>
-<a name="l00025"></a>00025 
-<a name="l00026"></a>00026 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
-<a name="l00027"></a>00027 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00029"></a>00029 <span class="preprocessor">#include &quot;DeskLib:Dialog2.h&quot;</span>
-<a name="l00030"></a>00030 <span class="preprocessor">#include &quot;DeskLib:Error.h&quot;</span>
-<a name="l00031"></a>00031 <span class="preprocessor">#include &quot;DeskLib:Event.h&quot;</span>
-<a name="l00032"></a>00032 <span class="preprocessor">#include &quot;DeskLib:EventMsg.h&quot;</span>
-<a name="l00033"></a>00033 <span class="preprocessor">#include &quot;DeskLib:Handler.h&quot;</span>
-<a name="l00034"></a>00034 <span class="preprocessor">#include &quot;DeskLib:Menu.h&quot;</span>
-<a name="l00035"></a>00035 <span class="preprocessor">#include &quot;DeskLib:Resource.h&quot;</span>
-<a name="l00036"></a>00036 <span class="preprocessor">#include &quot;DeskLib:Screen.h&quot;</span>
-<a name="l00037"></a>00037 <span class="preprocessor">#include &quot;DeskLib:Template.h&quot;</span>
-<a name="l00038"></a>00038 <span class="preprocessor">#include &quot;DeskLib:Window.h&quot;</span>
-<a name="l00039"></a>00039 <span class="preprocessor">#if defined(__GNUC__)</span>
-<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#include &quot;flexlib:flex.h&quot;</span>
-<a name="l00041"></a>00041 <span class="preprocessor">#endif </span><span class="comment">/* __GNUC__ */</span>
-<a name="l00042"></a>00042 <span class="preprocessor">#include &quot;version.h&quot;</span>
-<a name="l00043"></a>00043 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00044"></a>00044 
-<a name="l00045"></a>00045 
-<a name="l00046"></a>00046 <span class="comment">/* The name of this program */</span>
-<a name="l00047"></a>00047 <span class="keyword">static</span> <span class="keywordtype">char</span>     *szTask = <span class="stringliteral">&quot;!Antiword&quot;</span>;
-<a name="l00048"></a>00048 
-<a name="l00049"></a>00049 <span class="comment">/* The window handle of the choices window */</span>
-<a name="l00050"></a>00050 <span class="keyword">static</span> window_handle    tChoicesWindow = 0;
-<a name="l00051"></a>00051 
-<a name="l00052"></a>00052 <span class="comment">/* Dummy diagram with the iconbar menu pointer */</span>
-<a name="l00053"></a>00053 <span class="keyword">static</span> diagram_type     tDummyDiagram;
-<a name="l00054"></a>00054 
-<a name="l00055"></a>00055 <span class="comment">/* Program information Box */</span>
-<a name="l00056"></a>00056 <span class="keyword">static</span> dialog2_block    *pInfoBox = NULL;
-<a name="l00057"></a>00057 
-<a name="l00058"></a>00058 <span class="comment">/* Info box fields */</span>
-<a name="l00059"></a>00059 <span class="preprocessor">#define PURPOSE_INFO_FIELD      2</span>
-<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor">#define AUTHOR_INFO_FIELD       3</span>
-<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#define VERSION_INFO_FIELD      4</span>
-<a name="l00062"></a>00062 <span class="preprocessor"></span><span class="preprocessor">#define STATUS_INFO_FIELD       5</span>
-<a name="l00063"></a>00063 <span class="preprocessor"></span>
-<a name="l00064"></a>00064 <span class="comment">/* Iconbar menu fields */</span>
-<a name="l00065"></a>00065 <span class="preprocessor">#define ICONBAR_INFO_FIELD      0</span>
-<a name="l00066"></a>00066 <span class="preprocessor"></span><span class="preprocessor">#define ICONBAR_CHOICES_FIELD   1</span>
-<a name="l00067"></a>00067 <span class="preprocessor"></span><span class="preprocessor">#define ICONBAR_QUIT_FIELD      2</span>
-<a name="l00068"></a>00068 <span class="preprocessor"></span>
-<a name="l00069"></a>00069 
-<a name="l00070"></a>00070 <span class="comment">/*</span>
-<a name="l00071"></a>00071 <span class="comment"> * bBarInfo - Show iconbar information</span>
-<a name="l00072"></a>00072 <span class="comment"> */</span>
-<a name="l00073"></a>00073 <span class="keyword">static</span> BOOL
-<a name="l00074"></a>00074 bBarInfo(event_pollblock *pEvent, <span class="keywordtype">void</span> *pvReference)
-<a name="l00075"></a>00075 {
-<a name="l00076"></a>00076         diagram_type    *pDiag;
-<a name="l00077"></a>00077 
-<a name="l00078"></a>00078         TRACE_MSG(<span class="stringliteral">&quot;bBarInfo&quot;</span>);
-<a name="l00079"></a>00079 
-<a name="l00080"></a>00080         fail(pEvent == NULL);
-<a name="l00081"></a>00081         fail(pEvent-&gt;type != event_SEND);
-<a name="l00082"></a>00082         fail(pEvent-&gt;data.message.header.action != message_MENUWARN);
-<a name="l00083"></a>00083         fail(pvReference == NULL);
-<a name="l00084"></a>00084 
-<a name="l00085"></a>00085         pDiag = (diagram_type *)pvReference;
-<a name="l00086"></a>00086 
-<a name="l00087"></a>00087         <span class="keywordflow">if</span> (menu_currentopen != pDiag-&gt;pSaveMenu ||
-<a name="l00088"></a>00088             pEvent-&gt;data.message.data.menuwarn.selection[0] != ICONBAR_INFO_FIELD) {
-<a name="l00089"></a>00089                 <span class="keywordflow">return</span> FALSE;
-<a name="l00090"></a>00090         }
-<a name="l00091"></a>00091 
-<a name="l00092"></a>00092         Dialog2_OpenDialogMenuLeaf(pEvent, pInfoBox);
-<a name="l00093"></a>00093         <span class="keywordflow">return</span> TRUE;
-<a name="l00094"></a>00094 } <span class="comment">/* end of bBarInfo */</span>
-<a name="l00095"></a>00095 
-<a name="l00096"></a>00096 <span class="comment">/*</span>
-<a name="l00097"></a>00097 <span class="comment"> * vBarInfoSetText - Set the iconbar infobox text</span>
-<a name="l00098"></a>00098 <span class="comment"> */</span>
-<a name="l00099"></a>00099 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00100"></a>00100 vBarInfoSetText(dialog2_block *pBox)
-<a name="l00101"></a>00101 {
-<a name="l00102"></a>00102         TRACE_MSG(<span class="stringliteral">&quot;vBarInfoSetText&quot;</span>);
-<a name="l00103"></a>00103 
-<a name="l00104"></a>00104         fail(pBox == NULL);
-<a name="l00105"></a>00105         fail(pBox != pInfoBox);
-<a name="l00106"></a>00106 
-<a name="l00107"></a>00107         Icon_SetText(pBox-&gt;window, PURPOSE_INFO_FIELD, PURPOSESTRING);
-<a name="l00108"></a>00108         Icon_SetText(pBox-&gt;window, AUTHOR_INFO_FIELD, AUTHORSTRING);
-<a name="l00109"></a>00109         Icon_SetText(pBox-&gt;window, VERSION_INFO_FIELD, VERSIONSTRING);
-<a name="l00110"></a>00110         Icon_SetText(pBox-&gt;window, STATUS_INFO_FIELD, STATUSSTRING);
-<a name="l00111"></a>00111 } <span class="comment">/* end of vBarInfoSetText */</span>
-<a name="l00112"></a>00112 
-<a name="l00113"></a>00113 <span class="comment">/*</span>
-<a name="l00114"></a>00114 <span class="comment"> * bMouseButtonClick - respond to mouse button click</span>
-<a name="l00115"></a>00115 <span class="comment"> */</span>
-<a name="l00116"></a>00116 <span class="keyword">static</span> BOOL
-<a name="l00117"></a>00117 bMouseButtonClick(event_pollblock *pEvent, <span class="keywordtype">void</span> *pvReference)
-<a name="l00118"></a>00118 {
-<a name="l00119"></a>00119         diagram_type    *pDiag;
-<a name="l00120"></a>00120         menu_ptr        pMenu;
-<a name="l00121"></a>00121         <span class="keywordtype">int</span>             iPosY;
-<a name="l00122"></a>00122 
-<a name="l00123"></a>00123         TRACE_MSG(<span class="stringliteral">&quot;bMouseButtonClick&quot;</span>);
-<a name="l00124"></a>00124 
-<a name="l00125"></a>00125         fail(pEvent == NULL);
-<a name="l00126"></a>00126         fail(pEvent-&gt;type != event_CLICK);
-<a name="l00127"></a>00127         fail(pvReference == NULL);
-<a name="l00128"></a>00128 
-<a name="l00129"></a>00129         pDiag = (diagram_type *)pvReference;
-<a name="l00130"></a>00130 
-<a name="l00131"></a>00131         <span class="keywordflow">if</span> (pEvent-&gt;data.mouse.button.data.menu) {
-<a name="l00132"></a>00132                 pMenu = pDiag-&gt;pSaveMenu;
-<a name="l00133"></a>00133                 iPosY = (pMenu == tDummyDiagram.pSaveMenu) ?
-<a name="l00134"></a>00134                                         -1 : pEvent-&gt;data.mouse.pos.y;
-<a name="l00135"></a>00135                 Menu_Show(pMenu, pEvent-&gt;data.mouse.pos.x, iPosY);
-<a name="l00136"></a>00136                 <span class="keywordflow">return</span> TRUE;
-<a name="l00137"></a>00137         }
-<a name="l00138"></a>00138         <span class="keywordflow">if</span> (pEvent-&gt;data.mouse.window == pDiag-&gt;tMainWindow &amp;&amp;
-<a name="l00139"></a>00139             pEvent-&gt;data.mouse.icon == -1) {
-<a name="l00140"></a>00140                 vMainButtonClick(&amp;pEvent-&gt;data.mouse);
-<a name="l00141"></a>00141                 <span class="keywordflow">return</span> TRUE;
-<a name="l00142"></a>00142         }
-<a name="l00143"></a>00143         <span class="keywordflow">if</span> (pEvent-&gt;data.mouse.window == pDiag-&gt;tScaleWindow &amp;&amp;
-<a name="l00144"></a>00144             pEvent-&gt;data.mouse.icon &gt;= 0) {
-<a name="l00145"></a>00145                 vScaleButtonClick(&amp;pEvent-&gt;data.mouse, pDiag);
-<a name="l00146"></a>00146                 <span class="keywordflow">return</span> TRUE;
-<a name="l00147"></a>00147         }
-<a name="l00148"></a>00148         <span class="keywordflow">return</span> FALSE;
-<a name="l00149"></a>00149 } <span class="comment">/* end of bMouseButtonClick */</span>
-<a name="l00150"></a>00150 
-<a name="l00151"></a>00151 <span class="comment">/*</span>
-<a name="l00152"></a>00152 <span class="comment"> * bAutoRedrawWindow - the redraw is handled by the WIMP</span>
-<a name="l00153"></a>00153 <span class="comment"> */</span>
-<a name="l00154"></a>00154 <span class="keyword">static</span> BOOL
-<a name="l00155"></a>00155 bAutoRedrawWindow(event_pollblock *pEvent, <span class="keywordtype">void</span> *pvReference)
-<a name="l00156"></a>00156 {
-<a name="l00157"></a>00157         <span class="keywordflow">return</span> TRUE;
-<a name="l00158"></a>00158 } <span class="comment">/* end of bAutoRedrawWindow */</span>
-<a name="l00159"></a>00159 
-<a name="l00160"></a>00160 <span class="keyword">static</span> BOOL
-<a name="l00161"></a>00161 bSaveSelect(event_pollblock *pEvent, <span class="keywordtype">void</span> *pvReference)
-<a name="l00162"></a>00162 {
-<a name="l00163"></a>00163         TRACE_MSG(<span class="stringliteral">&quot;bSaveSelect&quot;</span>);
-<a name="l00164"></a>00164 
-<a name="l00165"></a>00165         fail(pEvent == NULL);
-<a name="l00166"></a>00166         fail(pEvent-&gt;type != event_MENU);
-<a name="l00167"></a>00167         fail(pvReference == NULL);
-<a name="l00168"></a>00168 
-<a name="l00169"></a>00169         DBG_DEC(pEvent-&gt;data.selection[0]);
-<a name="l00170"></a>00170 
-<a name="l00171"></a>00171         <span class="keywordflow">switch</span> (pEvent-&gt;data.selection[0]) {
-<a name="l00172"></a>00172         <span class="keywordflow">case</span> SAVEMENU_SCALEVIEW:
-<a name="l00173"></a>00173                 <span class="keywordflow">return</span> bScaleOpenAction(pEvent, pvReference);
-<a name="l00174"></a>00174         <span class="keywordflow">case</span> SAVEMENU_SAVEDRAW:
-<a name="l00175"></a>00175                 <span class="keywordflow">return</span> bSaveDrawfile(pEvent, pvReference);
-<a name="l00176"></a>00176         <span class="keywordflow">case</span> SAVEMENU_SAVETEXT:
-<a name="l00177"></a>00177                 <span class="keywordflow">return</span> bSaveTextfile(pEvent, pvReference);
-<a name="l00178"></a>00178         <span class="keywordflow">default</span>:
-<a name="l00179"></a>00179                 DBG_DEC(pEvent-&gt;data.selection[0]);
-<a name="l00180"></a>00180                 <span class="keywordflow">return</span> FALSE;
-<a name="l00181"></a>00181         }
-<a name="l00182"></a>00182 } <span class="comment">/* end of bSaveSelect */</span>
-<a name="l00183"></a>00183 
-<a name="l00184"></a>00184 <span class="comment">/*</span>
-<a name="l00185"></a>00185 <span class="comment"> * Create the window for the text from the given file</span>
-<a name="l00186"></a>00186 <span class="comment"> */</span>
-<a name="l00187"></a>00187 <span class="keyword">static</span> diagram_type *
-<a name="l00188"></a>00188 pCreateTextWindow(<span class="keyword">const</span> <span class="keywordtype">char</span> *szFilename)
-<a name="l00189"></a>00189 {
-<a name="l00190"></a>00190         diagram_type    *pDiag;
-<a name="l00191"></a>00191 
-<a name="l00192"></a>00192         TRACE_MSG(<span class="stringliteral">&quot;pCreateTextWindow&quot;</span>);
-<a name="l00193"></a>00193 
-<a name="l00194"></a>00194         fail(szFilename == NULL || szFilename[0] == <span class="charliteral">&#39;\0&#39;</span>);
-<a name="l00195"></a>00195 
-<a name="l00196"></a>00196         <span class="comment">/* Create the diagram */</span>
-<a name="l00197"></a>00197         pDiag = pCreateDiagram(szTask+1, szFilename);
-<a name="l00198"></a>00198         <span class="keywordflow">if</span> (pDiag == NULL) {
-<a name="l00199"></a>00199                 werr(0, <span class="stringliteral">&quot;Sorry, no new diagram object&quot;</span>);
-<a name="l00200"></a>00200                 <span class="keywordflow">return</span> NULL;
-<a name="l00201"></a>00201         }
-<a name="l00202"></a>00202 
-<a name="l00203"></a>00203         <span class="comment">/* Prepare a save menu for this diagram */</span>
-<a name="l00204"></a>00204         pDiag-&gt;pSaveMenu = Menu_New(szTask+1,
-<a name="l00205"></a>00205                 <span class="stringliteral">&quot;&gt;Scale view,&quot;</span>
-<a name="l00206"></a>00206                 <span class="stringliteral">&quot;&gt;Save (Drawfile)   F3,&quot;</span>
-<a name="l00207"></a>00207                 <span class="stringliteral">&quot;&gt;Save (Text only) \213F3&quot;</span>);
-<a name="l00208"></a>00208         <span class="keywordflow">if</span> (pDiag-&gt;pSaveMenu == NULL) {
-<a name="l00209"></a>00209                 werr(1, <span class="stringliteral">&quot;Sorry, no Savemenu object&quot;</span>);
-<a name="l00210"></a>00210         }
-<a name="l00211"></a>00211         Menu_Warn(pDiag-&gt;pSaveMenu, SAVEMENU_SCALEVIEW,
-<a name="l00212"></a>00212                                         TRUE, bScaleOpenAction, pDiag);
-<a name="l00213"></a>00213         Menu_Warn(pDiag-&gt;pSaveMenu, SAVEMENU_SAVEDRAW,
-<a name="l00214"></a>00214                                         TRUE, bSaveDrawfile, pDiag);
-<a name="l00215"></a>00215         Menu_Warn(pDiag-&gt;pSaveMenu, SAVEMENU_SAVETEXT,
-<a name="l00216"></a>00216                                         TRUE, bSaveTextfile, pDiag);
-<a name="l00217"></a>00217 
-<a name="l00218"></a>00218         <span class="comment">/* Claim events for the main window */</span>
-<a name="l00219"></a>00219         Event_Claim(event_REDRAW, pDiag-&gt;tMainWindow, icon_ANY,
-<a name="l00220"></a>00220                                         bRedrawMainWindow, pDiag);
-<a name="l00221"></a>00221         Event_Claim(event_CLOSE, pDiag-&gt;tMainWindow, icon_ANY,
-<a name="l00222"></a>00222                                         bDestroyDiagram, pDiag);
-<a name="l00223"></a>00223         Event_Claim(event_CLICK, pDiag-&gt;tMainWindow, icon_ANY,
-<a name="l00224"></a>00224                                         bMouseButtonClick, pDiag);
-<a name="l00225"></a>00225         Event_Claim(event_KEY, pDiag-&gt;tMainWindow, icon_ANY,
-<a name="l00226"></a>00226                                         bMainKeyPressed, pDiag);
-<a name="l00227"></a>00227 
-<a name="l00228"></a>00228         <span class="comment">/* Claim events for the scale window */</span>
-<a name="l00229"></a>00229         Event_Claim(event_REDRAW, pDiag-&gt;tScaleWindow, icon_ANY,
-<a name="l00230"></a>00230                                         bAutoRedrawWindow, NULL);
-<a name="l00231"></a>00231         Event_Claim(event_CLICK, pDiag-&gt;tScaleWindow, icon_ANY,
-<a name="l00232"></a>00232                                         bMouseButtonClick, pDiag);
-<a name="l00233"></a>00233         Event_Claim(event_KEY, pDiag-&gt;tScaleWindow, icon_ANY,
-<a name="l00234"></a>00234                                         bScaleKeyPressed, pDiag);
-<a name="l00235"></a>00235 
-<a name="l00236"></a>00236         <span class="comment">/* Set the window title */</span>
-<a name="l00237"></a>00237         vSetTitle(pDiag);
-<a name="l00238"></a>00238         <span class="keywordflow">return</span> pDiag;
-<a name="l00239"></a>00239 } <span class="comment">/* end of pCreateTextWindow */</span>
-<a name="l00240"></a>00240 
-<a name="l00241"></a>00241 <span class="comment">/*</span>
-<a name="l00242"></a>00242 <span class="comment"> * vProcessFile - process one file</span>
-<a name="l00243"></a>00243 <span class="comment"> */</span>
-<a name="l00244"></a>00244 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00245"></a>00245 vProcessFile(<span class="keyword">const</span> <span class="keywordtype">char</span> *szFilename, <span class="keywordtype">int</span> iFiletype)
-<a name="l00246"></a>00246 {
-<a name="l00247"></a>00247         options_type    tOptions;
-<a name="l00248"></a>00248         FILE            *pFile;
-<a name="l00249"></a>00249         diagram_type    *pDiag;
-<a name="l00250"></a>00250         <span class="keywordtype">long</span>            lFilesize;
-<a name="l00251"></a>00251         <span class="keywordtype">int</span>             iWordVersion;
-<a name="l00252"></a>00252 
-<a name="l00253"></a>00253         TRACE_MSG(<span class="stringliteral">&quot;vProcessFile&quot;</span>);
-<a name="l00254"></a>00254 
-<a name="l00255"></a>00255         fail(szFilename == NULL || szFilename[0] == <span class="charliteral">&#39;\0&#39;</span>);
-<a name="l00256"></a>00256 
-<a name="l00257"></a>00257         DBG_MSG(szFilename);
-<a name="l00258"></a>00258 
-<a name="l00259"></a>00259         pFile = fopen(szFilename, <span class="stringliteral">&quot;rb&quot;</span>);
-<a name="l00260"></a>00260         <span class="keywordflow">if</span> (pFile == NULL) {
-<a name="l00261"></a>00261                 werr(0, <span class="stringliteral">&quot;I can&#39;t open &#39;%s&#39; for reading&quot;</span>, szFilename);
-<a name="l00262"></a>00262                 <span class="keywordflow">return</span>;
-<a name="l00263"></a>00263         }
-<a name="l00264"></a>00264 
-<a name="l00265"></a>00265         lFilesize = lGetFilesize(szFilename);
-<a name="l00266"></a>00266         <span class="keywordflow">if</span> (lFilesize &lt; 0) {
-<a name="l00267"></a>00267                 (void)fclose(pFile);
-<a name="l00268"></a>00268                 werr(0, <span class="stringliteral">&quot;I can&#39;t get the size of &#39;%s&#39;&quot;</span>, szFilename);
-<a name="l00269"></a>00269                 <span class="keywordflow">return</span>;
-<a name="l00270"></a>00270         }
-<a name="l00271"></a>00271 
-<a name="l00272"></a>00272         iWordVersion = iGuessVersionNumber(pFile, lFilesize);
-<a name="l00273"></a>00273         <span class="keywordflow">if</span> (iWordVersion &lt; 0 || iWordVersion == 3) {
-<a name="l00274"></a>00274                 <span class="keywordflow">if</span> (bIsRtfFile(pFile)) {
-<a name="l00275"></a>00275                         werr(0, <span class="stringliteral">&quot;%s is not a Word Document.&quot;</span>
-<a name="l00276"></a>00276                                 <span class="stringliteral">&quot; It is probably a Rich Text Format file&quot;</span>,
-<a name="l00277"></a>00277                                 szFilename);
-<a name="l00278"></a>00278                 } <span class="keywordflow">if</span> (bIsWordPerfectFile(pFile)) {
-<a name="l00279"></a>00279                         werr(0, <span class="stringliteral">&quot;%s is not a Word Document.&quot;</span>
-<a name="l00280"></a>00280                                 <span class="stringliteral">&quot; It is probably a Word Perfect file&quot;</span>,
-<a name="l00281"></a>00281                                 szFilename);
-<a name="l00282"></a>00282                 } <span class="keywordflow">else</span> {
-<a name="l00283"></a>00283                         werr(0, <span class="stringliteral">&quot;%s is not a Word Document.&quot;</span>, szFilename);
-<a name="l00284"></a>00284                 }
-<a name="l00285"></a>00285                 (void)fclose(pFile);
-<a name="l00286"></a>00286                 <span class="keywordflow">return</span>;
-<a name="l00287"></a>00287         }
-<a name="l00288"></a>00288         <span class="comment">/* Reset any reading done during file-testing */</span>
-<a name="l00289"></a>00289         rewind(pFile);
-<a name="l00290"></a>00290 
-<a name="l00291"></a>00291         <span class="keywordflow">if</span> (iFiletype != FILETYPE_MSWORD) {
-<a name="l00292"></a>00292                 vGetOptions(&amp;tOptions);
-<a name="l00293"></a>00293                 <span class="keywordflow">if</span> (tOptions.bAutofiletypeAllowed) {
-<a name="l00294"></a>00294                         vSetFiletype(szFilename, FILETYPE_MSWORD);
-<a name="l00295"></a>00295                 }
-<a name="l00296"></a>00296         }
-<a name="l00297"></a>00297 
-<a name="l00298"></a>00298         pDiag = pCreateTextWindow(szFilename);
-<a name="l00299"></a>00299         <span class="keywordflow">if</span> (pDiag == NULL) {
-<a name="l00300"></a>00300                 (void)fclose(pFile);
-<a name="l00301"></a>00301                 <span class="keywordflow">return</span>;
-<a name="l00302"></a>00302         }
-<a name="l00303"></a>00303 
-<a name="l00304"></a>00304         (void)bWordDecryptor(pFile, lFilesize, pDiag);
-<a name="l00305"></a>00305         Error_CheckFatal(Drawfile_VerifyDiagram(&amp;pDiag-&gt;tInfo));
-<a name="l00306"></a>00306         vShowDiagram(pDiag);
-<a name="l00307"></a>00307         TRACE_MSG(<span class="stringliteral">&quot;After vShowDiagram&quot;</span>);
-<a name="l00308"></a>00308 
-<a name="l00309"></a>00309         TRACE_MSG(<span class="stringliteral">&quot;before debug print&quot;</span>);
-<a name="l00310"></a>00310         DBG_HEX(pFile);
-<a name="l00311"></a>00311         TRACE_MSG(<span class="stringliteral">&quot;before fclose&quot;</span>);
-<a name="l00312"></a>00312         (void)fclose(pFile);
-<a name="l00313"></a>00313         TRACE_MSG(<span class="stringliteral">&quot;after fclose&quot;</span>);
-<a name="l00314"></a>00314 } <span class="comment">/* end of vProcessFile */</span>
-<a name="l00315"></a>00315 
-<a name="l00316"></a>00316 <span class="comment">/*</span>
-<a name="l00317"></a>00317 <span class="comment"> * vSendAck - send an acknowledge</span>
-<a name="l00318"></a>00318 <span class="comment"> */</span>
-<a name="l00319"></a>00319 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00320"></a>00320 vSendAck(event_pollblock *pEvent)
-<a name="l00321"></a>00321 {
-<a name="l00322"></a>00322         message_block   tMessage;
-<a name="l00323"></a>00323 
-<a name="l00324"></a>00324         TRACE_MSG(<span class="stringliteral">&quot;vSendAck&quot;</span>);
-<a name="l00325"></a>00325 
-<a name="l00326"></a>00326         fail(pEvent == NULL);
-<a name="l00327"></a>00327         fail(pEvent-&gt;type != event_SEND &amp;&amp; pEvent-&gt;type != event_SENDWANTACK);
-<a name="l00328"></a>00328         fail(pEvent-&gt;data.message.header.action != message_DATALOAD &amp;&amp;
-<a name="l00329"></a>00329                 pEvent-&gt;data.message.header.action != message_DATAOPEN);
-<a name="l00330"></a>00330 
-<a name="l00331"></a>00331         tMessage.header.action = message_DATALOADACK;
-<a name="l00332"></a>00332         tMessage.header.size = <span class="keyword">sizeof</span>(tMessage);
-<a name="l00333"></a>00333         tMessage.header.yourref = pEvent-&gt;data.message.header.myref;
-<a name="l00334"></a>00334         Error_CheckFatal(Wimp_SendMessage(event_SEND, &amp;tMessage,
-<a name="l00335"></a>00335                                 pEvent-&gt;data.message.header.sender, 0));
-<a name="l00336"></a>00336 } <span class="comment">/* end of vSendAck */</span>
-<a name="l00337"></a>00337 
-<a name="l00338"></a>00338 <span class="keyword">static</span> BOOL
-<a name="l00339"></a>00339 bEventMsgHandler(event_pollblock *pEvent, <span class="keywordtype">void</span> *pvReference)
-<a name="l00340"></a>00340 {
-<a name="l00341"></a>00341         TRACE_MSG(<span class="stringliteral">&quot;bEventMsgHandler&quot;</span>);
-<a name="l00342"></a>00342 
-<a name="l00343"></a>00343         fail(pEvent == NULL);
-<a name="l00344"></a>00344 
-<a name="l00345"></a>00345         <span class="keywordflow">switch</span> (pEvent-&gt;type) {
-<a name="l00346"></a>00346         <span class="keywordflow">case</span> event_SEND:
-<a name="l00347"></a>00347         <span class="keywordflow">case</span> event_SENDWANTACK:
-<a name="l00348"></a>00348                 <span class="keywordflow">switch</span> (pEvent-&gt;data.message.header.action) {
-<a name="l00349"></a>00349                 <span class="keywordflow">case</span> message_CLOSEDOWN:
-<a name="l00350"></a>00350                         exit(EXIT_SUCCESS);
-<a name="l00351"></a>00351                         <span class="keywordflow">break</span>;
-<a name="l00352"></a>00352                 <span class="keywordflow">case</span> message_DATALOAD:
-<a name="l00353"></a>00353                 <span class="keywordflow">case</span> message_DATAOPEN:
-<a name="l00354"></a>00354                         vProcessFile(
-<a name="l00355"></a>00355                                 pEvent-&gt;data.message.data.dataload.filename,
-<a name="l00356"></a>00356                                 pEvent-&gt;data.message.data.dataload.filetype);
-<a name="l00357"></a>00357                         vSendAck(pEvent);
-<a name="l00358"></a>00358                         <span class="keywordflow">break</span>;
-<a name="l00359"></a>00359                 <span class="keywordflow">default</span>:
-<a name="l00360"></a>00360                         DBG_DEC(pEvent-&gt;data.message.header.action);
-<a name="l00361"></a>00361                         <span class="keywordflow">break</span>;
-<a name="l00362"></a>00362                 }
-<a name="l00363"></a>00363                 <span class="keywordflow">return</span> TRUE;
-<a name="l00364"></a>00364         <span class="keywordflow">default</span>:
-<a name="l00365"></a>00365                 DBG_DEC(pEvent-&gt;type);
-<a name="l00366"></a>00366                 <span class="keywordflow">return</span> FALSE;
-<a name="l00367"></a>00367         }
-<a name="l00368"></a>00368 } <span class="comment">/* end of bEventMsgHandler */</span>
-<a name="l00369"></a>00369 
-<a name="l00370"></a>00370 <span class="comment">/*</span>
-<a name="l00371"></a>00371 <span class="comment"> * bMenuSelect - select from the iconbar menu</span>
-<a name="l00372"></a>00372 <span class="comment"> */</span>
-<a name="l00373"></a>00373 <span class="keyword">static</span> BOOL
-<a name="l00374"></a>00374 bMenuSelect(event_pollblock *pEvent, <span class="keywordtype">void</span> *pvReference)
-<a name="l00375"></a>00375 {
-<a name="l00376"></a>00376         TRACE_MSG(<span class="stringliteral">&quot;bMenuSelect&quot;</span>);
-<a name="l00377"></a>00377 
-<a name="l00378"></a>00378         fail(pEvent == NULL);
-<a name="l00379"></a>00379         fail(pEvent-&gt;type != event_MENU);
-<a name="l00380"></a>00380 
-<a name="l00381"></a>00381         DBG_DEC(pEvent-&gt;data.selection[0]);
-<a name="l00382"></a>00382 
-<a name="l00383"></a>00383         <span class="keywordflow">switch</span> (pEvent-&gt;data.selection[0]) {
-<a name="l00384"></a>00384         <span class="keywordflow">case</span> ICONBAR_INFO_FIELD:
-<a name="l00385"></a>00385                 <span class="keywordflow">return</span> bBarInfo(pEvent, pvReference);
-<a name="l00386"></a>00386         <span class="keywordflow">case</span> ICONBAR_CHOICES_FIELD:
-<a name="l00387"></a>00387                 vChoicesOpenAction(tChoicesWindow);
-<a name="l00388"></a>00388                 Window_BringToFront(tChoicesWindow);
-<a name="l00389"></a>00389                 <span class="keywordflow">break</span>;
-<a name="l00390"></a>00390         <span class="keywordflow">case</span> ICONBAR_QUIT_FIELD:
-<a name="l00391"></a>00391                 TRACE_MSG(<span class="stringliteral">&quot;before exit&quot;</span>);
-<a name="l00392"></a>00392                 exit(EXIT_SUCCESS);
-<a name="l00393"></a>00393                 <span class="keywordflow">break</span>;
-<a name="l00394"></a>00394         <span class="keywordflow">default</span>:
-<a name="l00395"></a>00395                 DBG_DEC(pEvent-&gt;data.selection[0]);
-<a name="l00396"></a>00396                 <span class="keywordflow">break</span>;
-<a name="l00397"></a>00397         }
-<a name="l00398"></a>00398         <span class="keywordflow">return</span> TRUE;
-<a name="l00399"></a>00399 } <span class="comment">/* end of bMenuSelect */</span>
-<a name="l00400"></a>00400 
-<a name="l00401"></a>00401 <span class="comment">/*</span>
-<a name="l00402"></a>00402 <span class="comment"> * bMenuClick - respond to an menu click</span>
-<a name="l00403"></a>00403 <span class="comment"> */</span>
-<a name="l00404"></a>00404 <span class="keyword">static</span> BOOL
-<a name="l00405"></a>00405 bMenuClick(event_pollblock *pEvent, <span class="keywordtype">void</span> *pvReference)
-<a name="l00406"></a>00406 {
-<a name="l00407"></a>00407         TRACE_MSG(<span class="stringliteral">&quot;bMenuClick&quot;</span>);
-<a name="l00408"></a>00408 
-<a name="l00409"></a>00409         fail(pEvent == NULL);
-<a name="l00410"></a>00410         fail(pEvent-&gt;type != event_MENU);
-<a name="l00411"></a>00411 
-<a name="l00412"></a>00412         <span class="keywordflow">if</span> (menu_currentopen == tDummyDiagram.pSaveMenu) {
-<a name="l00413"></a>00413                 <span class="keywordflow">return</span> bMenuSelect(pEvent, pvReference);
-<a name="l00414"></a>00414         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pvReference == NULL) {
-<a name="l00415"></a>00415                 <span class="keywordflow">return</span> FALSE;
-<a name="l00416"></a>00416         }
-<a name="l00417"></a>00417         <span class="keywordflow">return</span> bSaveSelect(pEvent, pvReference);
-<a name="l00418"></a>00418 } <span class="comment">/* end of bMenuClick */</span>
-<a name="l00419"></a>00419 
-<a name="l00420"></a>00420 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00421"></a>00421 vTemplates(<span class="keywordtype">void</span>)
-<a name="l00422"></a>00422 {
-<a name="l00423"></a>00423         TRACE_MSG(<span class="stringliteral">&quot;vTemplates&quot;</span>);
-<a name="l00424"></a>00424 
-<a name="l00425"></a>00425         Template_Initialise();
-<a name="l00426"></a>00426         Template_LoadFile(<span class="stringliteral">&quot;Templates&quot;</span>);
-<a name="l00427"></a>00427 
-<a name="l00428"></a>00428         tChoicesWindow = Window_Create(<span class="stringliteral">&quot;Choices&quot;</span>, template_TITLEMIN);
-<a name="l00429"></a>00429         <span class="keywordflow">if</span> (tChoicesWindow == 0) {
-<a name="l00430"></a>00430                 werr(1, <span class="stringliteral">&quot;I can&#39;t find the &#39;Choices&#39; template&quot;</span>);
-<a name="l00431"></a>00431         }
-<a name="l00432"></a>00432 
-<a name="l00433"></a>00433         <span class="comment">/* Claim events for the choices window */</span>
-<a name="l00434"></a>00434         Event_Claim(event_REDRAW, tChoicesWindow, icon_ANY,
-<a name="l00435"></a>00435                                         bAutoRedrawWindow, NULL);
-<a name="l00436"></a>00436         Event_Claim(event_CLICK, tChoicesWindow, icon_ANY,
-<a name="l00437"></a>00437                                         bChoicesMouseClick, NULL);
-<a name="l00438"></a>00438         Event_Claim(event_KEY, tChoicesWindow, icon_ANY,
-<a name="l00439"></a>00439                                         bChoicesKeyPressed, NULL);
-<a name="l00440"></a>00440 } <span class="comment">/* end of vTemplates */</span>
-<a name="l00441"></a>00441 
-<a name="l00442"></a>00442 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00443"></a>00443 vInitialise(<span class="keywordtype">void</span>)
-<a name="l00444"></a>00444 {
-<a name="l00445"></a>00445         <span class="keywordtype">int</span>     aiMessages[] = {0};
-<a name="l00446"></a>00446         icon_handle     tBarIcon;
-<a name="l00447"></a>00447 
-<a name="l00448"></a>00448 
-<a name="l00449"></a>00449         TRACE_MSG(<span class="stringliteral">&quot;vInitialise&quot;</span>);
-<a name="l00450"></a>00450 
-<a name="l00451"></a>00451         Resource_Initialise(szTask+1);
-<a name="l00452"></a>00452         Event_Initialise3(szTask+1, 310, aiMessages);
-<a name="l00453"></a>00453         EventMsg_Initialise();
-<a name="l00454"></a>00454         Screen_CacheModeInfo();
-<a name="l00455"></a>00455 <span class="preprocessor">#if defined(__GNUC__)</span>
-<a name="l00456"></a>00456 <span class="preprocessor"></span>        flex_init(szTask+1, 0, 0);
-<a name="l00457"></a>00457         flex_set_budge(1);
-<a name="l00458"></a>00458 <span class="preprocessor">#endif </span><span class="comment">/* __GNUC__ */</span>
-<a name="l00459"></a>00459         vTemplates();
-<a name="l00460"></a>00460 
-<a name="l00461"></a>00461         <span class="comment">/* Prepare iconbar menu */</span>
-<a name="l00462"></a>00462         tDummyDiagram.tInfo.data = NULL;
-<a name="l00463"></a>00463         tDummyDiagram.tInfo.length = 0;
-<a name="l00464"></a>00464         tDummyDiagram.pSaveMenu = Menu_New(szTask+1, <span class="stringliteral">&quot;&gt;Info,Choices...,Quit&quot;</span>);
-<a name="l00465"></a>00465         <span class="keywordflow">if</span> (tDummyDiagram.pSaveMenu == NULL) {
-<a name="l00466"></a>00466                 werr(1, <span class="stringliteral">&quot;Sorry, no Barmenu object&quot;</span>);
-<a name="l00467"></a>00467         }
-<a name="l00468"></a>00468         pInfoBox = Dialog2_CreateDialogBlock(<span class="stringliteral">&quot;ProgInfo&quot;</span>, -1, -1,
-<a name="l00469"></a>00469                                         vBarInfoSetText, NULL, NULL);
-<a name="l00470"></a>00470 
-<a name="l00471"></a>00471         <span class="keywordflow">if</span> (pInfoBox == NULL) {
-<a name="l00472"></a>00472                 werr(1, <span class="stringliteral">&quot;Sorry, no Infobox object&quot;</span>);
-<a name="l00473"></a>00473         }
-<a name="l00474"></a>00474         Menu_Warn(tDummyDiagram.pSaveMenu, ICONBAR_INFO_FIELD,
-<a name="l00475"></a>00475                                         TRUE, bBarInfo, &amp;tDummyDiagram);
-<a name="l00476"></a>00476 
-<a name="l00477"></a>00477         <span class="comment">/* Create an icon on the icon bar */</span>
-<a name="l00478"></a>00478         tBarIcon = Icon_BarIcon(szTask, iconbar_RIGHT);
-<a name="l00479"></a>00479         Event_Claim(event_CLICK, window_ICONBAR, tBarIcon,
-<a name="l00480"></a>00480                                         bMouseButtonClick, &amp;tDummyDiagram);
-<a name="l00481"></a>00481 
-<a name="l00482"></a>00482         <span class="comment">/* Generic claims */</span>
-<a name="l00483"></a>00483         Event_Claim(event_OPEN, window_ANY, icon_ANY,
-<a name="l00484"></a>00484                                         Handler_OpenWindow, NULL);
-<a name="l00485"></a>00485         Event_Claim(event_CLOSE, window_ANY, icon_ANY,
-<a name="l00486"></a>00486                                         Handler_CloseWindow, NULL);
-<a name="l00487"></a>00487         Event_Claim(event_MENU, window_ANY, icon_ANY,
-<a name="l00488"></a>00488                                         bMenuClick, NULL);
-<a name="l00489"></a>00489         EventMsg_Claim(message_DATALOAD, window_ICONBAR,
-<a name="l00490"></a>00490                                         bEventMsgHandler, NULL);
-<a name="l00491"></a>00491         EventMsg_Claim(message_MODECHANGE, window_ANY,
-<a name="l00492"></a>00492                                         Handler_ModeChange, NULL);
-<a name="l00493"></a>00493 } <span class="comment">/* end of vInitialise */</span>
-<a name="l00494"></a>00494 
-<a name="l00495"></a>00495 <span class="keywordtype">int</span>
-<a name="l00496"></a>00496 <a class="code" href="redirectprintf_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)
-<a name="l00497"></a>00497 {
-<a name="l00498"></a>00498         <span class="keywordtype">int</span>     iFirst, iFiletype;
-<a name="l00499"></a>00499 
-<a name="l00500"></a>00500         TRACE_MSG(<span class="stringliteral">&quot;main&quot;</span>);
-<a name="l00501"></a>00501 
-<a name="l00502"></a>00502         vInitialise();
-<a name="l00503"></a>00503         iFirst = iReadOptions(argc, argv);
-<a name="l00504"></a>00504         <span class="keywordflow">if</span> (iFirst != 1) {
-<a name="l00505"></a>00505                 <span class="keywordflow">return</span> EXIT_FAILURE;
-<a name="l00506"></a>00506         }
-<a name="l00507"></a>00507 
-<a name="l00508"></a>00508         <span class="keywordflow">if</span> (argc &gt; 1) {
-<a name="l00509"></a>00509                 iFiletype = iGetFiletype(argv[1]);
-<a name="l00510"></a>00510                 <span class="keywordflow">if</span> (iFiletype &lt; 0) {
-<a name="l00511"></a>00511                         <span class="keywordflow">return</span> EXIT_FAILURE;
-<a name="l00512"></a>00512                 }
-<a name="l00513"></a>00513                 vProcessFile(argv[1], iFiletype);
-<a name="l00514"></a>00514                 TRACE_MSG(<span class="stringliteral">&quot;main after vProcessFile&quot;</span>);
-<a name="l00515"></a>00515         }
-<a name="l00516"></a>00516 
-<a name="l00517"></a>00517         <span class="keywordflow">for</span> (;;) {
-<a name="l00518"></a>00518                 Event_Poll();
-<a name="l00519"></a>00519         }
-<a name="l00520"></a>00520 } <span class="comment">/* end of main */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/main__u_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,441 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/main_u.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/main_u.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * main_u.c</span>
-<a name="l00003"></a>00003 <span class="comment"> *</span>
-<a name="l00004"></a>00004 <span class="comment"> * Released under GPL</span>
-<a name="l00005"></a>00005 <span class="comment"> *</span>
-<a name="l00006"></a>00006 <span class="comment"> * Copyright (C) 1998-2004 A.J. van Os</span>
-<a name="l00007"></a>00007 <span class="comment"> *</span>
-<a name="l00008"></a>00008 <span class="comment"> * This program is free software; you can redistribute it and/or</span>
-<a name="l00009"></a>00009 <span class="comment"> * modify it under the terms of the GNU General Public License</span>
-<a name="l00010"></a>00010 <span class="comment"> * as published by the Free Software Foundation; either version 2</span>
-<a name="l00011"></a>00011 <span class="comment"> * of the License, or (at your option) any later version.</span>
-<a name="l00012"></a>00012 <span class="comment"> *</span>
-<a name="l00013"></a>00013 <span class="comment"> * This program is distributed in the hope that it will be useful,</span>
-<a name="l00014"></a>00014 <span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
-<a name="l00015"></a>00015 <span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
-<a name="l00016"></a>00016 <span class="comment"> * GNU General Public License for more details.</span>
-<a name="l00017"></a>00017 <span class="comment"> *</span>
-<a name="l00018"></a>00018 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
-<a name="l00019"></a>00019 <span class="comment"> * along with this program; if not, write to the Free Software</span>
-<a name="l00020"></a>00020 <span class="comment"> * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.</span>
-<a name="l00021"></a>00021 <span class="comment"> *</span>
-<a name="l00022"></a>00022 <span class="comment"> * Description:</span>
-<a name="l00023"></a>00023 <span class="comment"> * The main program of &#39;antiword&#39; (Unix version)</span>
-<a name="l00024"></a>00024 <span class="comment"> */</span>
-<a name="l00025"></a>00025 <span class="preprocessor">#ifdef SYMBIAN</span>
-<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="comment">//GCCE header</span>
-<a name="l00027"></a>00027 <span class="comment">//#include &lt;staticlibinit_gcce.h&gt;</span>
-<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00029"></a>00029 <span class="preprocessor">#endif </span><span class="comment">/*SYMBIAN*/</span>
-<a name="l00030"></a>00030 
-<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
-<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00033"></a>00033 <span class="preprocessor">#if defined(__dos)</span>
-<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#include &lt;fcntl.h&gt;</span>
-<a name="l00035"></a>00035 <span class="preprocessor">#include &lt;io.h&gt;</span>
-<a name="l00036"></a>00036 <span class="preprocessor">#endif </span><span class="comment">/* __dos */</span>
-<a name="l00037"></a>00037 <span class="preprocessor">#if defined(__CYGWIN__) || defined(__CYGMING__)</span>
-<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#  ifdef X_LOCALE</span>
-<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#    include &lt;X11/Xlocale.h&gt;</span>
-<a name="l00040"></a>00040 <span class="preprocessor">#  else</span>
-<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#    include &lt;locale.h&gt;</span>
-<a name="l00042"></a>00042 <span class="preprocessor">#  endif</span>
-<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#include &lt;locale.h&gt;</span>
-<a name="l00045"></a>00045 <span class="preprocessor">#endif </span><span class="comment">/* __CYGWIN__ || __CYGMING__ */</span>
-<a name="l00046"></a>00046 <span class="preprocessor">#if defined(N_PLAT_NLM)</span>
-<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#if !defined(_VA_LIST)</span>
-<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#include &quot;NW-only/nw_os.h&quot;</span>
-<a name="l00049"></a>00049 <span class="preprocessor">#endif </span><span class="comment">/* !_VA_LIST */</span>
-<a name="l00050"></a>00050 <span class="preprocessor">#include &quot;getopt.h&quot;</span>
-<a name="l00051"></a>00051 <span class="preprocessor">#endif </span><span class="comment">/* N_PLAT_NLM */</span>
-<a name="l00052"></a>00052 <span class="preprocessor">#include &quot;version.h&quot;</span>
-<a name="l00053"></a>00053 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00054"></a>00054 <span class="preprocessor">#include &lt;unistd.h&gt;</span> 
-<a name="l00055"></a>00055 
-<a name="l00056"></a>00056 <span class="comment">/* The name of this program */</span>
-<a name="l00057"></a>00057 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>       *szTask = NULL;
-<a name="l00058"></a>00058 
-<a name="l00059"></a>00059 
-<a name="l00060"></a>00060 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00061"></a>00061 vUsage(<span class="keywordtype">void</span>)
-<a name="l00062"></a>00062 {
-<a name="l00063"></a>00063         fprintf(stderr, <span class="stringliteral">&quot;\tName: %s\n&quot;</span>, szTask);
-<a name="l00064"></a>00064         fprintf(stderr, <span class="stringliteral">&quot;\tPurpose: &quot;</span>PURPOSESTRING<span class="stringliteral">&quot;\n&quot;</span>);
-<a name="l00065"></a>00065         fprintf(stderr, <span class="stringliteral">&quot;\tAuthor: &quot;</span>AUTHORSTRING<span class="stringliteral">&quot;\n&quot;</span>);
-<a name="l00066"></a>00066         fprintf(stderr, <span class="stringliteral">&quot;\tVersion: &quot;</span>VERSIONSTRING);
-<a name="l00067"></a>00067 <span class="preprocessor">#if defined(__dos)</span>
-<a name="l00068"></a>00068 <span class="preprocessor"></span>        fprintf(stderr, VERSIONSTRING2);
-<a name="l00069"></a>00069 <span class="preprocessor">#endif </span><span class="comment">/* __dos */</span>
-<a name="l00070"></a>00070         fprintf(stderr, <span class="stringliteral">&quot;\n&quot;</span>);
-<a name="l00071"></a>00071         fprintf(stderr, <span class="stringliteral">&quot;\tStatus: &quot;</span>STATUSSTRING<span class="stringliteral">&quot;\n&quot;</span>);
-<a name="l00072"></a>00072         fprintf(stderr,
-<a name="l00073"></a>00073                 <span class="stringliteral">&quot;\tUsage: %s [switches] wordfile1 [wordfile2 ...]\n&quot;</span>, szTask);
-<a name="l00074"></a>00074         fprintf(stderr,
-<a name="l00075"></a>00075                 <span class="stringliteral">&quot;\tSwitches: [-f|-t|-a papersize|-p papersize|-x dtd]&quot;</span>
-<a name="l00076"></a>00076                 <span class="stringliteral">&quot;[-m mapping][-w #][-i #][-Ls]\n&quot;</span>);
-<a name="l00077"></a>00077         fprintf(stderr, <span class="stringliteral">&quot;\t-f formatted text output\n&quot;</span>);
-<a name="l00078"></a>00078         fprintf(stderr, <span class="stringliteral">&quot;\t-t text output (default)\n&quot;</span>);
-<a name="l00079"></a>00079         fprintf(stderr, <span class="stringliteral">&quot;\t-a &lt;paper size name&gt; Adobe PDF output\n&quot;</span>);
-<a name="l00080"></a>00080         fprintf(stderr, <span class="stringliteral">&quot;\t-p &lt;paper size name&gt; PostScript output\n&quot;</span>);
-<a name="l00081"></a>00081         fprintf(stderr, <span class="stringliteral">&quot;\t   paper size like: a4, letter or legal\n&quot;</span>);
-<a name="l00082"></a>00082         fprintf(stderr, <span class="stringliteral">&quot;\t-x &lt;dtd&gt; XML output\n&quot;</span>);
-<a name="l00083"></a>00083         fprintf(stderr, <span class="stringliteral">&quot;\t   like: db (DocBook)\n&quot;</span>);
-<a name="l00084"></a>00084         fprintf(stderr, <span class="stringliteral">&quot;\t-m &lt;mapping&gt; character mapping file\n&quot;</span>);
-<a name="l00085"></a>00085         fprintf(stderr, <span class="stringliteral">&quot;\t-w &lt;width&gt; in characters of text output\n&quot;</span>);
-<a name="l00086"></a>00086         fprintf(stderr, <span class="stringliteral">&quot;\t-i &lt;level&gt; image level (PostScript only)\n&quot;</span>);
-<a name="l00087"></a>00087         fprintf(stderr, <span class="stringliteral">&quot;\t-L use landscape mode (PostScript only)\n&quot;</span>);
-<a name="l00088"></a>00088         fprintf(stderr, <span class="stringliteral">&quot;\t-r Show removed text\n&quot;</span>);
-<a name="l00089"></a>00089         fprintf(stderr, <span class="stringliteral">&quot;\t-s Show hidden (by Word) text\n&quot;</span>);
-<a name="l00090"></a>00090 } <span class="comment">/* end of vUsage */</span>
-<a name="l00091"></a>00091 
-<a name="l00092"></a>00092 <span class="comment">/*</span>
-<a name="l00093"></a>00093 <span class="comment"> * pStdin2TmpFile - save stdin in a temporary file</span>
-<a name="l00094"></a>00094 <span class="comment"> *</span>
-<a name="l00095"></a>00095 <span class="comment"> * returns: the pointer to the temporary file or NULL</span>
-<a name="l00096"></a>00096 <span class="comment"> */</span>
-<a name="l00097"></a>00097 <span class="keyword">static</span> FILE *
-<a name="l00098"></a>00098 pStdin2TmpFile(<span class="keywordtype">long</span> *lFilesize)
-<a name="l00099"></a>00099 {
-<a name="l00100"></a>00100         FILE    *pTmpFile;
-<a name="l00101"></a>00101         <span class="keywordtype">size_t</span>  tSize;
-<a name="l00102"></a>00102         BOOL    bFailure;
-<a name="l00103"></a>00103         UCHAR   aucBytes[BUFSIZ];
-<a name="l00104"></a>00104 
-<a name="l00105"></a>00105         DBG_MSG(<span class="stringliteral">&quot;pStdin2TmpFile&quot;</span>);
-<a name="l00106"></a>00106 
-<a name="l00107"></a>00107         fail(lFilesize == NULL);
-<a name="l00108"></a>00108 
-<a name="l00109"></a>00109         <span class="comment">/* Open the temporary file */</span>
-<a name="l00110"></a>00110         pTmpFile = tmpfile();
-<a name="l00111"></a>00111         <span class="keywordflow">if</span> (pTmpFile == NULL) {
-<a name="l00112"></a>00112                 <span class="keywordflow">return</span> NULL;
-<a name="l00113"></a>00113         }
-<a name="l00114"></a>00114 
-<a name="l00115"></a>00115 <span class="preprocessor">#if defined(__dos)</span>
-<a name="l00116"></a>00116 <span class="preprocessor"></span>        <span class="comment">/* Stdin must be read as a binary stream */</span>
-<a name="l00117"></a>00117         setmode(fileno(stdin), O_BINARY);
-<a name="l00118"></a>00118 <span class="preprocessor">#endif </span><span class="comment">/* __dos */</span>
-<a name="l00119"></a>00119 
-<a name="l00120"></a>00120         <span class="comment">/* Copy stdin to the temporary file */</span>
-<a name="l00121"></a>00121         *lFilesize = 0;
-<a name="l00122"></a>00122         bFailure = TRUE;
-<a name="l00123"></a>00123         <span class="keywordflow">for</span> (;;) {
-<a name="l00124"></a>00124                 tSize = fread(aucBytes, 1, <span class="keyword">sizeof</span>(aucBytes), stdin);
-<a name="l00125"></a>00125                 <span class="keywordflow">if</span> (tSize == 0) {
-<a name="l00126"></a>00126                         bFailure = feof(stdin) == 0;
-<a name="l00127"></a>00127                         <span class="keywordflow">break</span>;
-<a name="l00128"></a>00128                 }
-<a name="l00129"></a>00129                 <span class="keywordflow">if</span> (fwrite(aucBytes, 1, tSize, pTmpFile) != tSize) {
-<a name="l00130"></a>00130                         bFailure = TRUE;
-<a name="l00131"></a>00131                         <span class="keywordflow">break</span>;
-<a name="l00132"></a>00132                 }
-<a name="l00133"></a>00133                 *lFilesize += (long)tSize;
-<a name="l00134"></a>00134         }
-<a name="l00135"></a>00135 
-<a name="l00136"></a>00136 <span class="preprocessor">#if defined(__dos)</span>
-<a name="l00137"></a>00137 <span class="preprocessor"></span>        <span class="comment">/* Switch stdin back to a text stream */</span>
-<a name="l00138"></a>00138         setmode(fileno(stdin), O_TEXT);
-<a name="l00139"></a>00139 <span class="preprocessor">#endif </span><span class="comment">/* __dos */</span>
-<a name="l00140"></a>00140 
-<a name="l00141"></a>00141         <span class="comment">/* Deal with the result of the copy action */</span>
-<a name="l00142"></a>00142         <span class="keywordflow">if</span> (bFailure) {
-<a name="l00143"></a>00143                 *lFilesize = 0;
-<a name="l00144"></a>00144                 (void)fclose(pTmpFile);
-<a name="l00145"></a>00145                 <span class="keywordflow">return</span> NULL;
-<a name="l00146"></a>00146         }
-<a name="l00147"></a>00147         rewind(pTmpFile);
-<a name="l00148"></a>00148         <span class="keywordflow">return</span> pTmpFile;
-<a name="l00149"></a>00149 } <span class="comment">/* end of pStdin2TmpFile */</span>
-<a name="l00150"></a>00150 
-<a name="l00151"></a>00151 <span class="comment">/*</span>
-<a name="l00152"></a>00152 <span class="comment"> * bProcessFile - process a single file</span>
-<a name="l00153"></a>00153 <span class="comment"> *</span>
-<a name="l00154"></a>00154 <span class="comment"> * returns: TRUE when the given file is a supported Word file, otherwise FALSE</span>
-<a name="l00155"></a>00155 <span class="comment"> */</span>
-<a name="l00156"></a>00156 <span class="preprocessor">#ifndef SYMBIAN </span>
-<a name="l00157"></a>00157 <span class="preprocessor"></span><span class="keyword">static</span> BOOL
-<a name="l00158"></a>00158 bProcessFile(<span class="keyword">const</span> <span class="keywordtype">char</span> *szFilename )
-<a name="l00159"></a>00159 <span class="preprocessor">#else</span>
-<a name="l00160"></a>00160 <span class="preprocessor"></span><span class="keyword">static</span> BOOL
-<a name="l00161"></a>00161 bProcessFile(<span class="keyword">const</span> <span class="keywordtype">char</span> *szFilename, FILE *ofp)
-<a name="l00162"></a>00162 <span class="preprocessor">#endif </span><span class="comment">/*SYMBIAN*/</span>
-<a name="l00163"></a>00163 {
-<a name="l00164"></a>00164         FILE            *pFile;
-<a name="l00165"></a>00165         diagram_type    *pDiag;
-<a name="l00166"></a>00166         <span class="keywordtype">long</span>            lFilesize;
-<a name="l00167"></a>00167         <span class="keywordtype">int</span>             iWordVersion;
-<a name="l00168"></a>00168         BOOL            bResult;
-<a name="l00169"></a>00169 
-<a name="l00170"></a>00170         fail(szFilename == NULL || szFilename[0] == <span class="charliteral">&#39;\0&#39;</span>);
-<a name="l00171"></a>00171 
-<a name="l00172"></a>00172         DBG_MSG(szFilename);
-<a name="l00173"></a>00173 
-<a name="l00174"></a>00174         <span class="keywordflow">if</span> (szFilename[0] == <span class="charliteral">&#39;-&#39;</span> &amp;&amp; szFilename[1] == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00175"></a>00175                 pFile = pStdin2TmpFile(&amp;lFilesize);
-<a name="l00176"></a>00176                 <span class="keywordflow">if</span> (pFile == NULL) {
-<a name="l00177"></a>00177                         werr(0, <span class="stringliteral">&quot;I can&#39;t save the standard input to a file&quot;</span>);
-<a name="l00178"></a>00178                         <span class="keywordflow">return</span> FALSE;
-<a name="l00179"></a>00179                 }
-<a name="l00180"></a>00180         } <span class="keywordflow">else</span> {
-<a name="l00181"></a>00181                 pFile = fopen(szFilename, <span class="stringliteral">&quot;rb&quot;</span>);
-<a name="l00182"></a>00182                 <span class="keywordflow">if</span> (pFile == NULL) {
-<a name="l00183"></a>00183                         werr(0, <span class="stringliteral">&quot;I can&#39;t open &#39;%s&#39; for reading&quot;</span>, szFilename);
-<a name="l00184"></a>00184                         <span class="keywordflow">return</span> FALSE;
-<a name="l00185"></a>00185                 }
-<a name="l00186"></a>00186 
-<a name="l00187"></a>00187                 lFilesize = lGetFilesize(szFilename);
-<a name="l00188"></a>00188                 <span class="keywordflow">if</span> (lFilesize &lt; 0) {
-<a name="l00189"></a>00189                         (void)fclose(pFile);
-<a name="l00190"></a>00190                         werr(0, <span class="stringliteral">&quot;I can&#39;t get the size of &#39;%s&#39;&quot;</span>, szFilename);
-<a name="l00191"></a>00191                         <span class="keywordflow">return</span> FALSE;
-<a name="l00192"></a>00192                 }
-<a name="l00193"></a>00193         }
-<a name="l00194"></a>00194 
-<a name="l00195"></a>00195         iWordVersion = iGuessVersionNumber(pFile, lFilesize);
-<a name="l00196"></a>00196         <span class="keywordflow">if</span> (iWordVersion &lt; 0 || iWordVersion == 3) {
-<a name="l00197"></a>00197                 <span class="keywordflow">if</span> (bIsRtfFile(pFile)) {
-<a name="l00198"></a>00198                         werr(0, <span class="stringliteral">&quot;%s is not a Word Document.&quot;</span>
-<a name="l00199"></a>00199                                 <span class="stringliteral">&quot; It is probably a Rich Text Format file&quot;</span>,
-<a name="l00200"></a>00200                                 szFilename);
-<a name="l00201"></a>00201                 } <span class="keywordflow">if</span> (bIsWordPerfectFile(pFile)) {
-<a name="l00202"></a>00202                         werr(0, <span class="stringliteral">&quot;%s is not a Word Document.&quot;</span>
-<a name="l00203"></a>00203                                 <span class="stringliteral">&quot; It is probably a Word Perfect file&quot;</span>,
-<a name="l00204"></a>00204                                 szFilename);
-<a name="l00205"></a>00205                 } <span class="keywordflow">else</span> {
-<a name="l00206"></a>00206 <span class="preprocessor">#if defined(__dos)</span>
-<a name="l00207"></a>00207 <span class="preprocessor"></span>                        werr(0, <span class="stringliteral">&quot;%s is not a Word Document or the filename&quot;</span>
-<a name="l00208"></a>00208                                 <span class="stringliteral">&quot; is not in the 8+3 format.&quot;</span>, szFilename);
-<a name="l00209"></a>00209 <span class="preprocessor">#else</span>
-<a name="l00210"></a>00210 <span class="preprocessor"></span>                        werr(0, <span class="stringliteral">&quot;%s is not a Word Document.&quot;</span>, szFilename);
-<a name="l00211"></a>00211 <span class="preprocessor">#endif </span><span class="comment">/* __dos */</span>
-<a name="l00212"></a>00212                 }
-<a name="l00213"></a>00213                 (void)fclose(pFile);
-<a name="l00214"></a>00214                 <span class="keywordflow">return</span> FALSE;
-<a name="l00215"></a>00215         }
-<a name="l00216"></a>00216         <span class="comment">/* Reset any reading done during file testing */</span>
-<a name="l00217"></a>00217         rewind(pFile);
-<a name="l00218"></a>00218         
-<a name="l00219"></a>00219 <span class="preprocessor">        #ifndef SYMBIAN</span>
-<a name="l00220"></a>00220 <span class="preprocessor"></span>        pDiag = pCreateDiagram(szTask, szFilename);
-<a name="l00221"></a>00221 <span class="preprocessor">        #else</span>
-<a name="l00222"></a>00222 <span class="preprocessor"></span>        pDiag = pCreateDiagram(szTask, szFilename, ofp );
-<a name="l00223"></a>00223 <span class="preprocessor">        #endif </span><span class="comment">/*SYMBIAN*/</span>
-<a name="l00224"></a>00224         <span class="keywordflow">if</span> (pDiag == NULL) {
-<a name="l00225"></a>00225                 (void)fclose(pFile);
-<a name="l00226"></a>00226                 <span class="keywordflow">return</span> FALSE;
-<a name="l00227"></a>00227         }
-<a name="l00228"></a>00228 
-<a name="l00229"></a>00229         bResult = bWordDecryptor(pFile, lFilesize, pDiag);
-<a name="l00230"></a>00230         vDestroyDiagram(pDiag);
-<a name="l00231"></a>00231 
-<a name="l00232"></a>00232         (void)fclose(pFile);
-<a name="l00233"></a>00233         <span class="keywordflow">return</span> bResult;
-<a name="l00234"></a>00234 } <span class="comment">/* end of bProcessFile */</span>
-<a name="l00235"></a>00235 
-<a name="l00236"></a>00236 
-<a name="l00237"></a>00237 <span class="preprocessor">#ifdef SYMBIAN</span>
-<a name="l00238"></a>00238 <span class="preprocessor"></span><span class="keywordtype">int</span> fillArg( <span class="keywordtype">char</span> **argv, <span class="keywordtype">char</span> *inpStr)
-<a name="l00239"></a>00239 {
-<a name="l00240"></a>00240         <span class="keywordtype">int</span> count =0;
-<a name="l00241"></a>00241         <span class="keyword">const</span> <span class="keywordtype">char</span> *search = <span class="stringliteral">&quot; &quot;</span>;
-<a name="l00242"></a>00242         
-<a name="l00243"></a>00243         <span class="keywordtype">char</span> *token = strtok( inpStr, search);
-<a name="l00244"></a>00244         argv[0] = token;
-<a name="l00245"></a>00245         count = 1;
-<a name="l00246"></a>00246         <span class="keywordflow">while</span>( token != NULL )
-<a name="l00247"></a>00247         {
-<a name="l00248"></a>00248                 token = strtok( NULL, search);
-<a name="l00249"></a>00249                 argv[count++] = token;
-<a name="l00250"></a>00250         }
-<a name="l00251"></a>00251         <span class="keywordflow">return</span> count-1;
-<a name="l00252"></a>00252 }
-<a name="l00253"></a>00253 <span class="preprocessor">#endif </span><span class="comment">/*SYMBIAN*/</span>
-<a name="l00254"></a>00254 <span class="keywordtype">int</span>
-<a name="l00255"></a>00255 <a class="code" href="redirectprintf_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)
-<a name="l00256"></a>00256 {
-<a name="l00257"></a>00257 <span class="preprocessor">        #ifdef SYMBIAN</span>
-<a name="l00258"></a>00258 <span class="preprocessor"></span>        FILE *ofp = NULL;
-<a name="l00259"></a>00259         <span class="keywordtype">char</span> *buf;
-<a name="l00260"></a>00260 <span class="preprocessor">        #endif </span><span class="comment">/*SYMBIAN*/</span>
-<a name="l00261"></a>00261         
-<a name="l00262"></a>00262         options_type    tOptions;
-<a name="l00263"></a>00263         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szWordfile;
-<a name="l00264"></a>00264         <span class="keywordtype">int</span>     iFirst, iIndex, iGoodCount;
-<a name="l00265"></a>00265         BOOL    bUsage, bMultiple, bUseTXT, bUseXML;
-<a name="l00266"></a>00266 
-<a name="l00267"></a>00267         <span class="keywordflow">if</span> (argc &lt;= 0) {
-<a name="l00268"></a>00268                 <span class="keywordflow">return</span> EXIT_FAILURE;
-<a name="l00269"></a>00269         }
-<a name="l00270"></a>00270 
-<a name="l00271"></a>00271 <span class="preprocessor">        #ifdef SYMBIAN</span>
-<a name="l00272"></a>00272 <span class="preprocessor"></span>        <span class="comment">//Adding HOME environment Variable explicitly</span>
-<a name="l00273"></a>00273         
-<a name="l00274"></a>00274     buf = (<span class="keywordtype">char</span> *)malloc(FILENAME_MAX);
-<a name="l00275"></a>00275     <span class="comment">// get path to the private folder</span>
-<a name="l00276"></a>00276     getcwd(buf, FILENAME_MAX);
-<a name="l00277"></a>00277 <span class="preprocessor">        #ifndef __WINS__</span>
-<a name="l00278"></a>00278 <span class="preprocessor"></span>        <span class="comment">// acquire installation location and get the drive letter </span>
-<a name="l00279"></a>00279         buf[0] = argv[0][0]; <span class="comment">// argv[0] contains full path to exe including drive</span>
-<a name="l00280"></a>00280 <span class="preprocessor">        #endif</span>
-<a name="l00281"></a>00281 <span class="preprocessor"></span>
-<a name="l00282"></a>00282     strcat(buf, <span class="stringliteral">&quot;\\Resources\\&quot;</span>);
-<a name="l00283"></a>00283         <span class="keywordflow">if</span> (setenv(<span class="stringliteral">&quot;HOME&quot;</span>, buf, 1) != 0) {
-<a name="l00284"></a>00284                 <span class="keywordflow">return</span> EXIT_FAILURE;
-<a name="l00285"></a>00285         }
-<a name="l00286"></a>00286     free(buf);
-<a name="l00287"></a>00287 <span class="preprocessor">        #endif </span><span class="comment">/*SYMBIAN*/</span>
-<a name="l00288"></a>00288 
-<a name="l00289"></a>00289         szTask = szBasename(argv[0]);
-<a name="l00290"></a>00290 
-<a name="l00291"></a>00291         <span class="keywordflow">if</span> (argc &lt;= 1) {
-<a name="l00292"></a>00292 <span class="preprocessor">#ifdef SYMBIAN</span>
-<a name="l00293"></a>00293 <span class="preprocessor"></span>                <span class="keywordtype">char</span>* inpStr = (<span class="keywordtype">char</span>*) malloc(_POSIX_ARG_MAX);
-<a name="l00294"></a>00294                 <span class="comment">/*If there is no command-line input, Prompt for it!*/</span>
-<a name="l00295"></a>00295                 vUsage();
-<a name="l00296"></a>00296                 
-<a name="l00297"></a>00297                 fprintf(stdout, <span class="stringliteral">&quot;\n\nEnter the input Command String:&quot;</span>);
-<a name="l00298"></a>00298                 fgets( inpStr, _POSIX_ARG_MAX, stdin );
-<a name="l00299"></a>00299                 
-<a name="l00300"></a>00300                 argc = fillArg( argv, inpStr);
-<a name="l00301"></a>00301                 <span class="comment">/* Check whether the first argument is valid or not */</span>
-<a name="l00302"></a>00302                 <span class="keywordflow">if</span> ( strcasecmp ( <span class="stringliteral">&quot;antiword&quot;</span>, argv[0]))
-<a name="l00303"></a>00303                 {
-<a name="l00304"></a>00304                         fprintf(stdout, <span class="stringliteral">&quot;\nInvalid command syntax, Please read the syntax properly\n\n\n&quot;</span>);
-<a name="l00305"></a>00305                         bUsage = TRUE;
-<a name="l00306"></a>00306                         getchar();
-<a name="l00307"></a>00307                 }
-<a name="l00308"></a>00308                 <span class="keywordflow">else</span>
-<a name="l00309"></a>00309                 {
-<a name="l00310"></a>00310                         iFirst = iReadOptions(argc, argv);
-<a name="l00311"></a>00311                         bUsage = iFirst &lt;= 0;
-<a name="l00312"></a>00312                 }
-<a name="l00313"></a>00313 <span class="preprocessor">                #else </span>
-<a name="l00314"></a>00314 <span class="preprocessor"></span>                bUsage = TRUE;
-<a name="l00315"></a>00315                 iFirst = 1;
-<a name="l00316"></a>00316                 free(inputStr);
-<a name="l00317"></a>00317 <span class="preprocessor">#endif </span><span class="comment">/*SYMBIAN*/</span>
-<a name="l00318"></a>00318         } <span class="keywordflow">else</span> {
-<a name="l00319"></a>00319                 iFirst = iReadOptions(argc, argv);
-<a name="l00320"></a>00320                 bUsage = iFirst &lt;= 0;
-<a name="l00321"></a>00321         }
-<a name="l00322"></a>00322         <span class="keywordflow">if</span> (bUsage) {
-<a name="l00323"></a>00323                 vUsage();
-<a name="l00324"></a>00324 <span class="preprocessor">                #ifdef SYMBIAN</span>
-<a name="l00325"></a>00325 <span class="preprocessor"></span>                getchar();
-<a name="l00326"></a>00326 <span class="preprocessor">                #endif </span><span class="comment">/*SYMBIAN*/</span>
-<a name="l00327"></a>00327                 <span class="keywordflow">return</span> iFirst &lt; 0 ? EXIT_FAILURE : EXIT_SUCCESS;
-<a name="l00328"></a>00328         }
-<a name="l00329"></a>00329 
-<a name="l00330"></a>00330 <span class="preprocessor">#if defined(N_PLAT_NLM) &amp;&amp; !defined(_VA_LIST)</span>
-<a name="l00331"></a>00331 <span class="preprocessor"></span>        nwinit();
-<a name="l00332"></a>00332 <span class="preprocessor">#endif </span><span class="comment">/* N_PLAT_NLM &amp;&amp; !_VA_LIST */</span>
-<a name="l00333"></a>00333 
-<a name="l00334"></a>00334         vGetOptions(&amp;tOptions);
-<a name="l00335"></a>00335 
-<a name="l00336"></a>00336 <span class="preprocessor">#if !defined(__dos)</span>
-<a name="l00337"></a>00337 <span class="preprocessor"></span>        <span class="keywordflow">if</span> (is_locale_utf8()) {
-<a name="l00338"></a>00338 <span class="preprocessor">#if defined(__STDC_ISO_10646__)</span>
-<a name="l00339"></a>00339 <span class="preprocessor"></span>                <span class="comment">/*</span>
-<a name="l00340"></a>00340 <span class="comment">                 * If the user wants UTF-8 and the envirionment variables</span>
-<a name="l00341"></a>00341 <span class="comment">                 * support UTF-8, than set the locale accordingly</span>
-<a name="l00342"></a>00342 <span class="comment">                 */</span>
-<a name="l00343"></a>00343                 <span class="keywordflow">if</span> (tOptions.eEncoding == encoding_utf_8) {
-<a name="l00344"></a>00344                         <span class="keywordflow">if</span> (setlocale(LC_CTYPE, <span class="stringliteral">&quot;&quot;</span>) == NULL) {
-<a name="l00345"></a>00345                                 werr(1, <span class="stringliteral">&quot;Can&#39;t set the UTF-8 locale! &quot;</span>
-<a name="l00346"></a>00346                                         <span class="stringliteral">&quot;Check LANG, LC_CTYPE, LC_ALL.&quot;</span>);
-<a name="l00347"></a>00347                         }
-<a name="l00348"></a>00348                         DBG_MSG(<span class="stringliteral">&quot;The UTF-8 locale has been set&quot;</span>);
-<a name="l00349"></a>00349                 } <span class="keywordflow">else</span> {
-<a name="l00350"></a>00350                         (void)setlocale(LC_CTYPE, <span class="stringliteral">&quot;C&quot;</span>);
-<a name="l00351"></a>00351                 }
-<a name="l00352"></a>00352 <span class="preprocessor">#endif </span><span class="comment">/* __STDC_ISO_10646__ */</span>
-<a name="l00353"></a>00353         } <span class="keywordflow">else</span> {
-<a name="l00354"></a>00354                 <span class="keywordflow">if</span> (setlocale(LC_CTYPE, <span class="stringliteral">&quot;&quot;</span>) == NULL) {
-<a name="l00355"></a>00355                         werr(0, <span class="stringliteral">&quot;Can&#39;t set the locale! Will use defaults&quot;</span>);
-<a name="l00356"></a>00356                         (void)setlocale(LC_CTYPE, <span class="stringliteral">&quot;C&quot;</span>);
-<a name="l00357"></a>00357                 }
-<a name="l00358"></a>00358                 DBG_MSG(<span class="stringliteral">&quot;The locale has been set&quot;</span>);
-<a name="l00359"></a>00359         }
-<a name="l00360"></a>00360 <span class="preprocessor">#endif </span><span class="comment">/* !__dos */</span>
-<a name="l00361"></a>00361 
-<a name="l00362"></a>00362         bMultiple = argc - iFirst &gt; 1;
-<a name="l00363"></a>00363         bUseTXT = tOptions.eConversionType == conversion_text ||
-<a name="l00364"></a>00364                 tOptions.eConversionType == conversion_fmt_text;
-<a name="l00365"></a>00365         bUseXML = tOptions.eConversionType == conversion_xml;
-<a name="l00366"></a>00366         iGoodCount = 0;
-<a name="l00367"></a>00367 
-<a name="l00368"></a>00368 <span class="preprocessor">#if defined(__dos)</span>
-<a name="l00369"></a>00369 <span class="preprocessor"></span>        <span class="keywordflow">if</span> (tOptions.eConversionType == conversion_pdf) {
-<a name="l00370"></a>00370                 <span class="comment">/* PDF must be written as a binary stream */</span>
-<a name="l00371"></a>00371                 setmode(fileno(stdout), O_BINARY);
-<a name="l00372"></a>00372         }
-<a name="l00373"></a>00373 <span class="preprocessor">#endif </span><span class="comment">/* __dos */</span>
-<a name="l00374"></a>00374 
-<a name="l00375"></a>00375         <span class="keywordflow">if</span> (bUseXML) {
-<a name="l00376"></a>00376                 fprintf(stdout,
-<a name="l00377"></a>00377         <span class="stringliteral">&quot;&lt;?xml version=\&quot;1.0\&quot; encoding=\&quot;utf-8\&quot;?&gt;\n&quot;</span>
-<a name="l00378"></a>00378         <span class="stringliteral">&quot;&lt;!DOCTYPE %s PUBLIC \&quot;-//OASIS//DTD DocBook XML V4.1.2//EN\&quot;\n&quot;</span>
-<a name="l00379"></a>00379         <span class="stringliteral">&quot;\t\&quot;http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd\&quot;&gt;\n&quot;</span>,
-<a name="l00380"></a>00380                 bMultiple ? <span class="stringliteral">&quot;set&quot;</span> : <span class="stringliteral">&quot;book&quot;</span>);
-<a name="l00381"></a>00381                 <span class="keywordflow">if</span> (bMultiple) {
-<a name="l00382"></a>00382                         fprintf(stdout, <span class="stringliteral">&quot;&lt;set&gt;\n&quot;</span>);
-<a name="l00383"></a>00383                 }
-<a name="l00384"></a>00384         }
-<a name="l00385"></a>00385 
-<a name="l00386"></a>00386         <span class="comment">//Output file</span>
-<a name="l00387"></a>00387 <span class="preprocessor">        #ifdef SYMBIAN</span>
-<a name="l00388"></a>00388 <span class="preprocessor"></span>        ofp = fopen( argv[argc-1], <span class="stringliteral">&quot;w&quot;</span>);
-<a name="l00389"></a>00389         <span class="keywordflow">if</span> ( ofp == NULL)
-<a name="l00390"></a>00390                 {
-<a name="l00391"></a>00391                         printf(<span class="stringliteral">&quot;Unable to open the output file: %s\n&quot;</span>,argv[argc-1]);
-<a name="l00392"></a>00392                         exit(0);
-<a name="l00393"></a>00393                 }
-<a name="l00394"></a>00394 <span class="preprocessor">        #endif </span><span class="comment">/*SYMBIAN*/</span>
-<a name="l00395"></a>00395 
-<a name="l00396"></a>00396         <span class="keywordflow">for</span> (iIndex = iFirst; iIndex &lt; argc-1; iIndex++) {
-<a name="l00397"></a>00397                 <span class="keywordflow">if</span> (bMultiple &amp;&amp; bUseTXT) {
-<a name="l00398"></a>00398                         szWordfile = szBasename(argv[iIndex]);
-<a name="l00399"></a>00399                         fprintf(stdout, <span class="stringliteral">&quot;::::::::::::::\n&quot;</span>);
-<a name="l00400"></a>00400                         fprintf(stdout, <span class="stringliteral">&quot;%s\n&quot;</span>, szWordfile);
-<a name="l00401"></a>00401                         fprintf(stdout, <span class="stringliteral">&quot;::::::::::::::\n&quot;</span>);
-<a name="l00402"></a>00402                 }
-<a name="l00403"></a>00403 <span class="preprocessor">                #ifndef SYMBIAN</span>
-<a name="l00404"></a>00404 <span class="preprocessor"></span>                <span class="keywordflow">if</span> (bProcessFile(argv[iIndex])) {
-<a name="l00405"></a>00405 <span class="preprocessor">                #else</span>
-<a name="l00406"></a>00406 <span class="preprocessor"></span>                <span class="keywordflow">if</span> (bProcessFile(argv[iIndex],ofp )) {
-<a name="l00407"></a>00407 <span class="preprocessor">                #endif  </span><span class="comment">/*SYMBIAN*/</span>
-<a name="l00408"></a>00408                 
-<a name="l00409"></a>00409                         iGoodCount++;
-<a name="l00410"></a>00410                 }
-<a name="l00411"></a>00411         }
-<a name="l00412"></a>00412 
-<a name="l00413"></a>00413         <span class="keywordflow">if</span> (bMultiple &amp;&amp; bUseXML) {
-<a name="l00414"></a>00414                 fprintf(stdout, <span class="stringliteral">&quot;&lt;/set&gt;\n&quot;</span>);
-<a name="l00415"></a>00415         }
-<a name="l00416"></a>00416 
-<a name="l00417"></a>00417         DBG_DEC(iGoodCount);
-<a name="l00418"></a>00418 <span class="preprocessor">        #ifdef SYMBIAN</span>
-<a name="l00419"></a>00419 <span class="preprocessor"></span>        fclose(ofp);
-<a name="l00420"></a>00420         fprintf(stdout, <span class="stringliteral">&quot;\n\nConversion is successful!!, check out this file : %s\n&quot;</span>, argv[argc-1]);
-<a name="l00421"></a>00421         getchar();
-<a name="l00422"></a>00422 <span class="preprocessor">        #endif </span><span class="comment">/*SYMBIAN*/</span>
-<a name="l00423"></a>00423         
-<a name="l00424"></a>00424         <span class="keywordflow">return</span> iGoodCount &lt;= 0 ? EXIT_FAILURE : EXIT_SUCCESS;
-<a name="l00425"></a>00425 } <span class="comment">/* end of main */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/misc_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,910 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/misc.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/misc.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * misc.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2005 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Miscellaneous functions</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00012"></a>00012 <span class="preprocessor">#include &lt;ctype.h&gt;</span>
-<a name="l00013"></a>00013 <span class="preprocessor">#include &lt;time.h&gt;</span>
-<a name="l00014"></a>00014 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#include &quot;DeskLib:SWI.h&quot;</span>
-<a name="l00016"></a>00016 <span class="preprocessor">#else</span>
-<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#include &lt;errno.h&gt;</span>
-<a name="l00018"></a>00018 <span class="preprocessor">#include &lt;sys/types.h&gt;</span>
-<a name="l00019"></a>00019 <span class="preprocessor">#include &lt;sys/stat.h&gt;</span>
-<a name="l00020"></a>00020 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00021"></a>00021 <span class="preprocessor">#if !defined(S_ISREG)</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define S_ISREG(x)      (((x) &amp; S_IFMT) == S_IFREG)</span>
-<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* !S_ISREG */</span>
-<a name="l00024"></a>00024 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00025"></a>00025 <span class="preprocessor">#if defined(__vms)</span>
-<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#include &lt;unixlib.h&gt;</span>
-<a name="l00027"></a>00027 <span class="preprocessor">#endif</span>
-<a name="l00028"></a>00028 <span class="preprocessor"></span>
-<a name="l00029"></a>00029 <span class="preprocessor">#if !defined(__riscos)</span>
-<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="comment">/*</span>
-<a name="l00031"></a>00031 <span class="comment"> * szGetHomeDirectory - get the name of the home directory</span>
-<a name="l00032"></a>00032 <span class="comment"> */</span>
-<a name="l00033"></a>00033 <span class="keyword">const</span> <span class="keywordtype">char</span> *
-<a name="l00034"></a>00034 szGetHomeDirectory(<span class="keywordtype">void</span>)
-<a name="l00035"></a>00035 {
-<a name="l00036"></a>00036         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szHome;
-<a name="l00037"></a>00037 
-<a name="l00038"></a>00038 <span class="preprocessor">#if defined(__vms)</span>
-<a name="l00039"></a>00039 <span class="preprocessor"></span>        szHome = decc$translate_vms(getenv(<span class="stringliteral">&quot;HOME&quot;</span>));
-<a name="l00040"></a>00040 <span class="preprocessor">#elif defined(__Plan9__)</span>
-<a name="l00041"></a>00041 <span class="preprocessor"></span>        szHome = getenv(<span class="stringliteral">&quot;home&quot;</span>);
-<a name="l00042"></a>00042 <span class="preprocessor">#else</span>
-<a name="l00043"></a>00043 <span class="preprocessor"></span>        szHome = getenv(<span class="stringliteral">&quot;HOME&quot;</span>);
-<a name="l00044"></a>00044 <span class="preprocessor">#endif </span><span class="comment">/* __vms */</span>
-<a name="l00045"></a>00045 
-<a name="l00046"></a>00046         <span class="keywordflow">if</span> (szHome == NULL || szHome[0] == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00047"></a>00047 <span class="preprocessor">#if defined(N_PLAT_NLM)</span>
-<a name="l00048"></a>00048 <span class="preprocessor"></span>                szHome = <span class="stringliteral">&quot;SYS:&quot;</span>;
-<a name="l00049"></a>00049 <span class="preprocessor">#elif defined(__dos)</span>
-<a name="l00050"></a>00050 <span class="preprocessor"></span>                szHome = <span class="stringliteral">&quot;C:&quot;</span>;
-<a name="l00051"></a>00051 <span class="preprocessor">#else</span>
-<a name="l00052"></a>00052 <span class="preprocessor"></span>                werr(0, <span class="stringliteral">&quot;I can&#39;t find the name of your HOME directory&quot;</span>);
-<a name="l00053"></a>00053                 szHome = <span class="stringliteral">&quot;&quot;</span>;
-<a name="l00054"></a>00054 <span class="preprocessor">#endif </span><span class="comment">/* __dos */</span>
-<a name="l00055"></a>00055         }
-<a name="l00056"></a>00056         <span class="keywordflow">return</span> szHome;
-<a name="l00057"></a>00057 } <span class="comment">/* end of szGetHomeDirectory */</span>
-<a name="l00058"></a>00058 
-<a name="l00059"></a>00059 <span class="comment">/*</span>
-<a name="l00060"></a>00060 <span class="comment"> * szGetAntiwordDirectory - get the name of the Antiword directory</span>
-<a name="l00061"></a>00061 <span class="comment"> */</span>
-<a name="l00062"></a>00062 <span class="keyword">const</span> <span class="keywordtype">char</span> *
-<a name="l00063"></a>00063 szGetAntiwordDirectory(<span class="keywordtype">void</span>)
-<a name="l00064"></a>00064 {
-<a name="l00065"></a>00065 <span class="preprocessor">#if defined(__vms)</span>
-<a name="l00066"></a>00066 <span class="preprocessor"></span>        <span class="keywordflow">return</span> decc$translate_vms(getenv(<span class="stringliteral">&quot;ANTIWORDHOME&quot;</span>));
-<a name="l00067"></a>00067 <span class="preprocessor">#else</span>
-<a name="l00068"></a>00068 <span class="preprocessor"></span>        <span class="keywordflow">return</span> getenv(<span class="stringliteral">&quot;ANTIWORDHOME&quot;</span>);
-<a name="l00069"></a>00069 <span class="preprocessor">#endif </span><span class="comment">/* __vms */</span>
-<a name="l00070"></a>00070 } <span class="comment">/* end of szGetAntiwordDirectory */</span>
-<a name="l00071"></a>00071 <span class="preprocessor">#endif </span><span class="comment">/* !__riscos */</span>
-<a name="l00072"></a>00072 
-<a name="l00073"></a>00073 <span class="comment">/*</span>
-<a name="l00074"></a>00074 <span class="comment"> * Get the size of the specified file.</span>
-<a name="l00075"></a>00075 <span class="comment"> * Returns -1 if the file does not exist or is not a proper file.</span>
-<a name="l00076"></a>00076 <span class="comment"> */</span>
-<a name="l00077"></a>00077 <span class="keywordtype">long</span>
-<a name="l00078"></a>00078 lGetFilesize(<span class="keyword">const</span> <span class="keywordtype">char</span> *szFilename)
-<a name="l00079"></a>00079 {
-<a name="l00080"></a>00080 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00081"></a>00081 <span class="preprocessor"></span>        os_error        *e;
-<a name="l00082"></a>00082         <span class="keywordtype">int</span>     iType, iSize;
-<a name="l00083"></a>00083 
-<a name="l00084"></a>00084         e = SWI(2, 5, SWI_OS_File | XOS_Bit,
-<a name="l00085"></a>00085                 17, szFilename,
-<a name="l00086"></a>00086                 &amp;iType, NULL, NULL, NULL, &amp;iSize);
-<a name="l00087"></a>00087         <span class="keywordflow">if</span> (e != NULL) {
-<a name="l00088"></a>00088                 werr(0, <span class="stringliteral">&quot;Get Filesize error %d: %s&quot;</span>,
-<a name="l00089"></a>00089                         e-&gt;errnum, e-&gt;errmess);
-<a name="l00090"></a>00090                 <span class="keywordflow">return</span> -1;
-<a name="l00091"></a>00091         }
-<a name="l00092"></a>00092         <span class="keywordflow">if</span> (iType != 1) {
-<a name="l00093"></a>00093                 <span class="comment">/* It&#39;s not a proper file or the file does not exist */</span>
-<a name="l00094"></a>00094                 <span class="keywordflow">return</span> -1;
-<a name="l00095"></a>00095         }
-<a name="l00096"></a>00096         <span class="keywordflow">return</span> (<span class="keywordtype">long</span>)iSize;
-<a name="l00097"></a>00097 <span class="preprocessor">#else</span>
-<a name="l00098"></a>00098 <span class="preprocessor"></span>        <span class="keyword">struct </span>stat     tBuffer;
-<a name="l00099"></a>00099 
-<a name="l00100"></a>00100         errno = 0;
-<a name="l00101"></a>00101         <span class="keywordflow">if</span> (stat(szFilename, &amp;tBuffer) != 0) {
-<a name="l00102"></a>00102                 werr(0, <span class="stringliteral">&quot;Get Filesize error %d&quot;</span>, errno);
-<a name="l00103"></a>00103                 <span class="keywordflow">return</span> -1;
-<a name="l00104"></a>00104         }
-<a name="l00105"></a>00105         <span class="keywordflow">if</span> (!S_ISREG(tBuffer.st_mode)) {
-<a name="l00106"></a>00106                 <span class="comment">/* It&#39;s not a regular file */</span>
-<a name="l00107"></a>00107                 <span class="keywordflow">return</span> -1;
-<a name="l00108"></a>00108         }
-<a name="l00109"></a>00109         <span class="keywordflow">return</span> (<span class="keywordtype">long</span>)tBuffer.st_size;
-<a name="l00110"></a>00110 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00111"></a>00111 } <span class="comment">/* end of lGetFilesize */</span>
-<a name="l00112"></a>00112 
-<a name="l00113"></a>00113 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00114"></a>00114 <span class="preprocessor"></span><span class="keywordtype">void</span>
-<a name="l00115"></a>00115 vPrintBlock(<span class="keyword">const</span> <span class="keywordtype">char</span>  *szFile, <span class="keywordtype">int</span> iLine,
-<a name="l00116"></a>00116                 <span class="keyword">const</span> UCHAR *aucBlock, <span class="keywordtype">size_t</span> tLength)
-<a name="l00117"></a>00117 {
-<a name="l00118"></a>00118         <span class="keywordtype">int</span> i, j;
-<a name="l00119"></a>00119 
-<a name="l00120"></a>00120         fail(szFile == NULL || iLine &lt; 0 || aucBlock == NULL);
-<a name="l00121"></a>00121 
-<a name="l00122"></a>00122         fprintf(stderr, <span class="stringliteral">&quot;%s[%3d]:\n&quot;</span>, szFile, iLine);
-<a name="l00123"></a>00123         <span class="keywordflow">for</span> (i = 0; i &lt; 32; i++) {
-<a name="l00124"></a>00124                 <span class="keywordflow">if</span> (16 * i &gt;= (<span class="keywordtype">int</span>)tLength) {
-<a name="l00125"></a>00125                         <span class="keywordflow">return</span>;
-<a name="l00126"></a>00126                 }
-<a name="l00127"></a>00127                 fprintf(stderr, <span class="stringliteral">&quot;%03x: &quot;</span>, (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)(16 * i));
-<a name="l00128"></a>00128                 <span class="keywordflow">for</span> (j = 0; j &lt; 16; j++) {
-<a name="l00129"></a>00129                         <span class="keywordflow">if</span> (16 * i + j &lt; (<span class="keywordtype">int</span>)tLength) {
-<a name="l00130"></a>00130                                 fprintf(stderr, <span class="stringliteral">&quot;%02x &quot;</span>,
-<a name="l00131"></a>00131                                         (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)aucBlock[16 * i + j]);
-<a name="l00132"></a>00132                         }
-<a name="l00133"></a>00133                 }
-<a name="l00134"></a>00134                 fprintf(stderr, <span class="stringliteral">&quot;\n&quot;</span>);
-<a name="l00135"></a>00135         }
-<a name="l00136"></a>00136 } <span class="comment">/* end of vPrintBlock */</span>
-<a name="l00137"></a>00137 
-<a name="l00138"></a>00138 <span class="keywordtype">void</span>
-<a name="l00139"></a>00139 vPrintUnicode(<span class="keyword">const</span> <span class="keywordtype">char</span> *szFile, <span class="keywordtype">int</span> iLine, <span class="keyword">const</span> UCHAR *aucUni, <span class="keywordtype">size_t</span> tLen)
-<a name="l00140"></a>00140 {
-<a name="l00141"></a>00141         <span class="keywordtype">char</span>    *szASCII;
-<a name="l00142"></a>00142 
-<a name="l00143"></a>00143         fail(tLen % 2 != 0);
-<a name="l00144"></a>00144 
-<a name="l00145"></a>00145         tLen /= 2;      <span class="comment">/* Length in bytes to length in characters */</span>
-<a name="l00146"></a>00146         szASCII = xmalloc(tLen + 1);
-<a name="l00147"></a>00147         (void)unincpy(szASCII, aucUni, tLen);
-<a name="l00148"></a>00148         szASCII[tLen] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00149"></a>00149         (void)fprintf(stderr, <span class="stringliteral">&quot;%s[%3d]: %.*s\n&quot;</span>,
-<a name="l00150"></a>00150                                 szFile, iLine, (<span class="keywordtype">int</span>)tLen, szASCII);
-<a name="l00151"></a>00151         szASCII = xfree(szASCII);
-<a name="l00152"></a>00152 } <span class="comment">/* end of vPrintUnicode */</span>
-<a name="l00153"></a>00153 
-<a name="l00154"></a>00154 BOOL
-<a name="l00155"></a>00155 bCheckDoubleLinkedList(output_type *pAnchor)
-<a name="l00156"></a>00156 {
-<a name="l00157"></a>00157         output_type     *pCurr, *pLast;
-<a name="l00158"></a>00158         <span class="keywordtype">int</span>             iInList;
-<a name="l00159"></a>00159 
-<a name="l00160"></a>00160         pLast = pAnchor;
-<a name="l00161"></a>00161         iInList = 0;
-<a name="l00162"></a>00162         <span class="keywordflow">for</span> (pCurr = pAnchor; pCurr != NULL; pCurr = pCurr-&gt;pNext) {
-<a name="l00163"></a>00163                 pLast = pCurr;
-<a name="l00164"></a>00164                 iInList++;
-<a name="l00165"></a>00165         }
-<a name="l00166"></a>00166         NO_DBG_DEC(iInList);
-<a name="l00167"></a>00167         <span class="keywordflow">for</span> (pCurr = pLast; pCurr != NULL; pCurr = pCurr-&gt;pPrev) {
-<a name="l00168"></a>00168                 pLast = pCurr;
-<a name="l00169"></a>00169                 iInList--;
-<a name="l00170"></a>00170         }
-<a name="l00171"></a>00171         DBG_DEC_C(iInList != 0, iInList);
-<a name="l00172"></a>00172         <span class="keywordflow">return</span> pAnchor == pLast &amp;&amp; iInList == 0;
-<a name="l00173"></a>00173 } <span class="comment">/* end of bCheckDoubleLinkedList */</span>
-<a name="l00174"></a>00174 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00175"></a>00175 
-<a name="l00176"></a>00176 <span class="comment">/*</span>
-<a name="l00177"></a>00177 <span class="comment"> * bReadBytes</span>
-<a name="l00178"></a>00178 <span class="comment"> * This function reads the specified number of bytes from the specified file,</span>
-<a name="l00179"></a>00179 <span class="comment"> * starting from the specified offset.</span>
-<a name="l00180"></a>00180 <span class="comment"> * Returns TRUE when successfull, otherwise FALSE</span>
-<a name="l00181"></a>00181 <span class="comment"> */</span>
-<a name="l00182"></a>00182 BOOL
-<a name="l00183"></a>00183 bReadBytes(UCHAR *aucBytes, <span class="keywordtype">size_t</span> tMemb, ULONG ulOffset, FILE *pFile)
-<a name="l00184"></a>00184 {
-<a name="l00185"></a>00185         fail(aucBytes == NULL || pFile == NULL || ulOffset &gt; (ULONG)LONG_MAX);
-<a name="l00186"></a>00186 
-<a name="l00187"></a>00187         <span class="keywordflow">if</span> (ulOffset &gt; (ULONG)LONG_MAX) {
-<a name="l00188"></a>00188                 <span class="keywordflow">return</span> FALSE;
-<a name="l00189"></a>00189         }
-<a name="l00190"></a>00190         <span class="keywordflow">if</span> (fseek(pFile, (<span class="keywordtype">long</span>)ulOffset, SEEK_SET) != 0) {
-<a name="l00191"></a>00191                 <span class="keywordflow">return</span> FALSE;
-<a name="l00192"></a>00192         }
-<a name="l00193"></a>00193         <span class="keywordflow">if</span> (fread(aucBytes, <span class="keyword">sizeof</span>(UCHAR), tMemb, pFile) != tMemb) {
-<a name="l00194"></a>00194                 <span class="keywordflow">return</span> FALSE;
-<a name="l00195"></a>00195         }
-<a name="l00196"></a>00196         <span class="keywordflow">return</span> TRUE;
-<a name="l00197"></a>00197 } <span class="comment">/* end of bReadBytes */</span>
-<a name="l00198"></a>00198 
-<a name="l00199"></a>00199 <span class="comment">/*</span>
-<a name="l00200"></a>00200 <span class="comment"> * bReadBuffer</span>
-<a name="l00201"></a>00201 <span class="comment"> * This function fills the specified buffer with the specified number of bytes,</span>
-<a name="l00202"></a>00202 <span class="comment"> * starting at the specified offset within the Big/Small Block Depot.</span>
-<a name="l00203"></a>00203 <span class="comment"> *</span>
-<a name="l00204"></a>00204 <span class="comment"> * Returns TRUE when successful, otherwise FALSE</span>
-<a name="l00205"></a>00205 <span class="comment"> */</span>
-<a name="l00206"></a>00206 BOOL
-<a name="l00207"></a>00207 bReadBuffer(FILE *pFile, ULONG ulStartBlock,
-<a name="l00208"></a>00208         <span class="keyword">const</span> ULONG *aulBlockDepot, <span class="keywordtype">size_t</span> tBlockDepotLen, <span class="keywordtype">size_t</span> tBlockSize,
-<a name="l00209"></a>00209         UCHAR *aucBuffer, ULONG ulOffset, <span class="keywordtype">size_t</span> tToRead)
-<a name="l00210"></a>00210 {
-<a name="l00211"></a>00211         ULONG   ulBegin, ulIndex;
-<a name="l00212"></a>00212         <span class="keywordtype">size_t</span>  tLen;
-<a name="l00213"></a>00213 
-<a name="l00214"></a>00214         fail(pFile == NULL);
-<a name="l00215"></a>00215         fail(ulStartBlock &gt; MAX_BLOCKNUMBER &amp;&amp; ulStartBlock != END_OF_CHAIN);
-<a name="l00216"></a>00216         fail(aulBlockDepot == NULL);
-<a name="l00217"></a>00217         fail(tBlockSize != BIG_BLOCK_SIZE &amp;&amp; tBlockSize != SMALL_BLOCK_SIZE);
-<a name="l00218"></a>00218         fail(aucBuffer == NULL);
-<a name="l00219"></a>00219         fail(tToRead == 0);
-<a name="l00220"></a>00220 
-<a name="l00221"></a>00221         <span class="keywordflow">for</span> (ulIndex = ulStartBlock;
-<a name="l00222"></a>00222              ulIndex != END_OF_CHAIN &amp;&amp; tToRead != 0;
-<a name="l00223"></a>00223              ulIndex = aulBlockDepot[ulIndex]) {
-<a name="l00224"></a>00224                 <span class="keywordflow">if</span> (ulIndex &gt;= (ULONG)tBlockDepotLen) {
-<a name="l00225"></a>00225                         DBG_DEC(ulIndex);
-<a name="l00226"></a>00226                         DBG_DEC(tBlockDepotLen);
-<a name="l00227"></a>00227                         <span class="keywordflow">if</span> (tBlockSize &gt;= BIG_BLOCK_SIZE) {
-<a name="l00228"></a>00228                                 werr(1, <span class="stringliteral">&quot;The Big Block Depot is damaged&quot;</span>);
-<a name="l00229"></a>00229                         } <span class="keywordflow">else</span> {
-<a name="l00230"></a>00230                                 werr(1, <span class="stringliteral">&quot;The Small Block Depot is damaged&quot;</span>);
-<a name="l00231"></a>00231                         }
-<a name="l00232"></a>00232                 }
-<a name="l00233"></a>00233                 <span class="keywordflow">if</span> (ulOffset &gt;= (ULONG)tBlockSize) {
-<a name="l00234"></a>00234                         ulOffset -= tBlockSize;
-<a name="l00235"></a>00235                         <span class="keywordflow">continue</span>;
-<a name="l00236"></a>00236                 }
-<a name="l00237"></a>00237                 ulBegin = ulDepotOffset(ulIndex, tBlockSize) + ulOffset;
-<a name="l00238"></a>00238                 tLen = min(tBlockSize - (<span class="keywordtype">size_t</span>)ulOffset, tToRead);
-<a name="l00239"></a>00239                 ulOffset = 0;
-<a name="l00240"></a>00240                 <span class="keywordflow">if</span> (!bReadBytes(aucBuffer, tLen, ulBegin, pFile)) {
-<a name="l00241"></a>00241                         werr(0, <span class="stringliteral">&quot;Read big block 0x%lx not possible&quot;</span>, ulBegin);
-<a name="l00242"></a>00242                         <span class="keywordflow">return</span> FALSE;
-<a name="l00243"></a>00243                 }
-<a name="l00244"></a>00244                 aucBuffer += tLen;
-<a name="l00245"></a>00245                 tToRead -= tLen;
-<a name="l00246"></a>00246         }
-<a name="l00247"></a>00247         DBG_DEC_C(tToRead != 0, tToRead);
-<a name="l00248"></a>00248         <span class="keywordflow">return</span> tToRead == 0;
-<a name="l00249"></a>00249 } <span class="comment">/* end of bReadBuffer */</span>
-<a name="l00250"></a>00250 
-<a name="l00251"></a>00251 <span class="comment">/*</span>
-<a name="l00252"></a>00252 <span class="comment"> * Convert a Word colornumber into a true color for use in a drawfile</span>
-<a name="l00253"></a>00253 <span class="comment"> *</span>
-<a name="l00254"></a>00254 <span class="comment"> * Returns the true color</span>
-<a name="l00255"></a>00255 <span class="comment"> */</span>
-<a name="l00256"></a>00256 ULONG
-<a name="l00257"></a>00257 ulColor2Color(UCHAR ucFontColor)
-<a name="l00258"></a>00258 {
-<a name="l00259"></a>00259         <span class="keyword">static</span> <span class="keyword">const</span> ULONG      aulColorTable[] = {
-<a name="l00260"></a>00260                 <span class="comment">/*  0 */</span>        0x00000000UL,   <span class="comment">/* Automatic */</span>
-<a name="l00261"></a>00261                 <span class="comment">/*  1 */</span>        0x00000000UL,   <span class="comment">/* Black */</span>
-<a name="l00262"></a>00262                 <span class="comment">/*  2 */</span>        0xff000000UL,   <span class="comment">/* Blue */</span>
-<a name="l00263"></a>00263                 <span class="comment">/*  3 */</span>        0xffff0000UL,   <span class="comment">/* Turquoise */</span>
-<a name="l00264"></a>00264                 <span class="comment">/*  4 */</span>        0x00ff0000UL,   <span class="comment">/* Bright Green */</span>
-<a name="l00265"></a>00265                 <span class="comment">/*  5 */</span>        0xff00ff00UL,   <span class="comment">/* Pink */</span>
-<a name="l00266"></a>00266                 <span class="comment">/*  6 */</span>        0x0000ff00UL,   <span class="comment">/* Red */</span>
-<a name="l00267"></a>00267                 <span class="comment">/*  7 */</span>        0x00ffff00UL,   <span class="comment">/* Yellow */</span>
-<a name="l00268"></a>00268                 <span class="comment">/*  8 */</span>        0xffffff00UL,   <span class="comment">/* White */</span>
-<a name="l00269"></a>00269                 <span class="comment">/*  9 */</span>        0x80000000UL,   <span class="comment">/* Dark Blue */</span>
-<a name="l00270"></a>00270                 <span class="comment">/* 10 */</span>        0x80800000UL,   <span class="comment">/* Teal */</span>
-<a name="l00271"></a>00271                 <span class="comment">/* 11 */</span>        0x00800000UL,   <span class="comment">/* Green */</span>
-<a name="l00272"></a>00272                 <span class="comment">/* 12 */</span>        0x80008000UL,   <span class="comment">/* Violet */</span>
-<a name="l00273"></a>00273                 <span class="comment">/* 13 */</span>        0x00008000UL,   <span class="comment">/* Dark Red */</span>
-<a name="l00274"></a>00274                 <span class="comment">/* 14 */</span>        0x00808000UL,   <span class="comment">/* Dark Yellow */</span>
-<a name="l00275"></a>00275                 <span class="comment">/* 15 */</span>        0x80808000UL,   <span class="comment">/* Gray 50% */</span>
-<a name="l00276"></a>00276                 <span class="comment">/* 16 */</span>        0xc0c0c000UL,   <span class="comment">/* Gray 25% */</span>
-<a name="l00277"></a>00277         };
-<a name="l00278"></a>00278         <span class="keywordflow">if</span> ((<span class="keywordtype">size_t</span>)ucFontColor &gt;= elementsof(aulColorTable)) {
-<a name="l00279"></a>00279                 <span class="keywordflow">return</span> aulColorTable[0];
-<a name="l00280"></a>00280         }
-<a name="l00281"></a>00281         <span class="keywordflow">return</span> aulColorTable[(int)ucFontColor];
-<a name="l00282"></a>00282 } <span class="comment">/* end of ulColor2Color */</span>
-<a name="l00283"></a>00283 
-<a name="l00284"></a>00284 <span class="comment">/*</span>
-<a name="l00285"></a>00285 <span class="comment"> * iFindSplit - find a place to split the string</span>
-<a name="l00286"></a>00286 <span class="comment"> *</span>
-<a name="l00287"></a>00287 <span class="comment"> * returns the index of the split character or -1 if no split found.</span>
-<a name="l00288"></a>00288 <span class="comment"> */</span>
-<a name="l00289"></a>00289 <span class="keyword">static</span> <span class="keywordtype">int</span>
-<a name="l00290"></a>00290 iFindSplit(<span class="keyword">const</span> <span class="keywordtype">char</span> *szString, <span class="keywordtype">size_t</span> tStringLen)
-<a name="l00291"></a>00291 {
-<a name="l00292"></a>00292         <span class="keywordtype">size_t</span>  tSplit;
-<a name="l00293"></a>00293 
-<a name="l00294"></a>00294         <span class="keywordflow">if</span> (tStringLen == 0) {
-<a name="l00295"></a>00295                 <span class="keywordflow">return</span> -1;
-<a name="l00296"></a>00296         }
-<a name="l00297"></a>00297         tSplit = tStringLen - 1;
-<a name="l00298"></a>00298         <span class="keywordflow">while</span> (tSplit &gt;= 1) {
-<a name="l00299"></a>00299                 <span class="keywordflow">if</span> (szString[tSplit] == <span class="charliteral">&#39; &#39;</span> ||
-<a name="l00300"></a>00300                     (szString[tSplit] == <span class="charliteral">&#39;-&#39;</span> &amp;&amp; szString[tSplit - 1] != <span class="charliteral">&#39; &#39;</span>)) {
-<a name="l00301"></a>00301                         <span class="keywordflow">return</span> (<span class="keywordtype">int</span>)tSplit;
-<a name="l00302"></a>00302                 }
-<a name="l00303"></a>00303                 tSplit--;
-<a name="l00304"></a>00304         }
-<a name="l00305"></a>00305         <span class="keywordflow">return</span> -1;
-<a name="l00306"></a>00306 } <span class="comment">/* end of iFindSplit */</span>
-<a name="l00307"></a>00307 
-<a name="l00308"></a>00308 <span class="comment">/*</span>
-<a name="l00309"></a>00309 <span class="comment"> * pSplitList - split the specified list in a printable part and a leftover part</span>
-<a name="l00310"></a>00310 <span class="comment"> *</span>
-<a name="l00311"></a>00311 <span class="comment"> * returns the pointer to the leftover part</span>
-<a name="l00312"></a>00312 <span class="comment"> */</span>
-<a name="l00313"></a>00313 output_type *
-<a name="l00314"></a>00314 pSplitList(output_type *pAnchor)
-<a name="l00315"></a>00315 {
-<a name="l00316"></a>00316         output_type     *pCurr, *pLeftOver;
-<a name="l00317"></a>00317         <span class="keywordtype">int</span>             iIndex;
-<a name="l00318"></a>00318 
-<a name="l00319"></a>00319         fail(pAnchor == NULL);
-<a name="l00320"></a>00320 
-<a name="l00321"></a>00321         <span class="keywordflow">for</span> (pCurr = pAnchor; pCurr-&gt;pNext != NULL; pCurr = pCurr-&gt;pNext)
-<a name="l00322"></a>00322                 ;       <span class="comment">/* EMPTY */</span>
-<a name="l00323"></a>00323         iIndex = -1;
-<a name="l00324"></a>00324         <span class="keywordflow">for</span> (; pCurr != NULL; pCurr = pCurr-&gt;pPrev) {
-<a name="l00325"></a>00325                 iIndex = iFindSplit(pCurr-&gt;szStorage, pCurr-&gt;tNextFree);
-<a name="l00326"></a>00326                 <span class="keywordflow">if</span> (iIndex &gt;= 0) {
-<a name="l00327"></a>00327                         <span class="keywordflow">break</span>;
-<a name="l00328"></a>00328                 }
-<a name="l00329"></a>00329         }
-<a name="l00330"></a>00330 
-<a name="l00331"></a>00331         <span class="keywordflow">if</span> (pCurr == NULL || iIndex &lt; 0) {
-<a name="l00332"></a>00332                 <span class="comment">/* No split, no leftover */</span>
-<a name="l00333"></a>00333                 <span class="keywordflow">return</span> NULL;
-<a name="l00334"></a>00334         }
-<a name="l00335"></a>00335         <span class="comment">/* Split over the iIndex-th character */</span>
-<a name="l00336"></a>00336         NO_DBG_MSG(<span class="stringliteral">&quot;pLeftOver&quot;</span>);
-<a name="l00337"></a>00337         pLeftOver = xmalloc(<span class="keyword">sizeof</span>(*pLeftOver));
-<a name="l00338"></a>00338         fail(pCurr-&gt;tNextFree &lt; (<span class="keywordtype">size_t</span>)iIndex);
-<a name="l00339"></a>00339         pLeftOver-&gt;tStorageSize = pCurr-&gt;tNextFree - (size_t)iIndex;
-<a name="l00340"></a>00340         pLeftOver-&gt;szStorage = xmalloc(pLeftOver-&gt;tStorageSize);
-<a name="l00341"></a>00341         pLeftOver-&gt;tNextFree = pCurr-&gt;tNextFree - (size_t)iIndex - 1;
-<a name="l00342"></a>00342         (void)strncpy(pLeftOver-&gt;szStorage,
-<a name="l00343"></a>00343                 pCurr-&gt;szStorage + iIndex + 1, pLeftOver-&gt;tNextFree);
-<a name="l00344"></a>00344         pLeftOver-&gt;szStorage[pLeftOver-&gt;tNextFree] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00345"></a>00345         NO_DBG_MSG(pLeftOver-&gt;szStorage);
-<a name="l00346"></a>00346         pLeftOver-&gt;ucFontColor = pCurr-&gt;ucFontColor;
-<a name="l00347"></a>00347         pLeftOver-&gt;usFontStyle = pCurr-&gt;usFontStyle;
-<a name="l00348"></a>00348         pLeftOver-&gt;tFontRef = pCurr-&gt;tFontRef;
-<a name="l00349"></a>00349         pLeftOver-&gt;usFontSize = pCurr-&gt;usFontSize;
-<a name="l00350"></a>00350         pLeftOver-&gt;lStringWidth = lComputeStringWidth(
-<a name="l00351"></a>00351                                         pLeftOver-&gt;szStorage,
-<a name="l00352"></a>00352                                         pLeftOver-&gt;tNextFree,
-<a name="l00353"></a>00353                                         pLeftOver-&gt;tFontRef,
-<a name="l00354"></a>00354                                         pLeftOver-&gt;usFontSize);
-<a name="l00355"></a>00355         pLeftOver-&gt;pPrev = NULL;
-<a name="l00356"></a>00356         pLeftOver-&gt;pNext = pCurr-&gt;pNext;
-<a name="l00357"></a>00357         <span class="keywordflow">if</span> (pLeftOver-&gt;pNext != NULL) {
-<a name="l00358"></a>00358                 pLeftOver-&gt;pNext-&gt;pPrev = pLeftOver;
-<a name="l00359"></a>00359         }
-<a name="l00360"></a>00360         fail(!bCheckDoubleLinkedList(pLeftOver));
-<a name="l00361"></a>00361 
-<a name="l00362"></a>00362         NO_DBG_MSG(<span class="stringliteral">&quot;pAnchor&quot;</span>);
-<a name="l00363"></a>00363         NO_DBG_HEX(pCurr-&gt;szStorage[iIndex]);
-<a name="l00364"></a>00364         <span class="keywordflow">while</span> (iIndex &gt;= 0 &amp;&amp; isspace((<span class="keywordtype">int</span>)(UCHAR)pCurr-&gt;szStorage[iIndex])) {
-<a name="l00365"></a>00365                 iIndex--;
-<a name="l00366"></a>00366         }
-<a name="l00367"></a>00367         pCurr-&gt;tNextFree = (size_t)iIndex + 1;
-<a name="l00368"></a>00368         pCurr-&gt;szStorage[pCurr-&gt;tNextFree] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00369"></a>00369         NO_DBG_MSG(pCurr-&gt;szStorage);
-<a name="l00370"></a>00370         pCurr-&gt;lStringWidth = lComputeStringWidth(
-<a name="l00371"></a>00371                                         pCurr-&gt;szStorage,
-<a name="l00372"></a>00372                                         pCurr-&gt;tNextFree,
-<a name="l00373"></a>00373                                         pCurr-&gt;tFontRef,
-<a name="l00374"></a>00374                                         pCurr-&gt;usFontSize);
-<a name="l00375"></a>00375         pCurr-&gt;pNext = NULL;
-<a name="l00376"></a>00376         fail(!bCheckDoubleLinkedList(pAnchor));
-<a name="l00377"></a>00377 
-<a name="l00378"></a>00378         <span class="keywordflow">return</span> pLeftOver;
-<a name="l00379"></a>00379 } <span class="comment">/* end of pSplitList */</span>
-<a name="l00380"></a>00380 
-<a name="l00381"></a>00381 <span class="comment">/*</span>
-<a name="l00382"></a>00382 <span class="comment"> * tNumber2Roman - convert a number to Roman Numerals</span>
-<a name="l00383"></a>00383 <span class="comment"> *</span>
-<a name="l00384"></a>00384 <span class="comment"> * returns the number of characters written</span>
-<a name="l00385"></a>00385 <span class="comment"> */</span>
-<a name="l00386"></a>00386 <span class="keywordtype">size_t</span>
-<a name="l00387"></a>00387 tNumber2Roman(UINT uiNumber, BOOL bUpperCase, <span class="keywordtype">char</span> *szOutput)
-<a name="l00388"></a>00388 {
-<a name="l00389"></a>00389         <span class="keywordtype">char</span>    *outp, *p, *q;
-<a name="l00390"></a>00390         UINT    uiNextVal, uiValue;
-<a name="l00391"></a>00391 
-<a name="l00392"></a>00392         fail(szOutput == NULL);
-<a name="l00393"></a>00393 
-<a name="l00394"></a>00394         uiNumber %= 4000;       <span class="comment">/* Very high numbers can&#39;t be represented */</span>
-<a name="l00395"></a>00395         <span class="keywordflow">if</span> (uiNumber == 0) {
-<a name="l00396"></a>00396                 szOutput[0] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00397"></a>00397                 <span class="keywordflow">return</span> 0;
-<a name="l00398"></a>00398         }
-<a name="l00399"></a>00399 
-<a name="l00400"></a>00400         outp = szOutput;
-<a name="l00401"></a>00401         p = bUpperCase ? <span class="stringliteral">&quot;M\2D\5C\2L\5X\2V\5I&quot;</span> : <span class="stringliteral">&quot;m\2d\5c\2l\5x\2v\5i&quot;</span>;
-<a name="l00402"></a>00402         uiValue = 1000;
-<a name="l00403"></a>00403         <span class="keywordflow">for</span> (;;) {
-<a name="l00404"></a>00404                 <span class="keywordflow">while</span> (uiNumber &gt;= uiValue) {
-<a name="l00405"></a>00405                         *outp++ = *p;
-<a name="l00406"></a>00406                         uiNumber -= uiValue;
-<a name="l00407"></a>00407                 }
-<a name="l00408"></a>00408                 <span class="keywordflow">if</span> (uiNumber == 0) {
-<a name="l00409"></a>00409                         *outp = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00410"></a>00410                         fail(outp &lt; szOutput);
-<a name="l00411"></a>00411                         <span class="keywordflow">return</span> (<span class="keywordtype">size_t</span>)(outp - szOutput);
-<a name="l00412"></a>00412                 }
-<a name="l00413"></a>00413                 q = p + 1;
-<a name="l00414"></a>00414                 uiNextVal = uiValue / (UINT)(UCHAR)*q;
-<a name="l00415"></a>00415                 <span class="keywordflow">if</span> ((<span class="keywordtype">int</span>)*q == 2) {             <span class="comment">/* magic */</span>
-<a name="l00416"></a>00416                         uiNextVal /= (UINT)(UCHAR)*(q += 2);
-<a name="l00417"></a>00417                 }
-<a name="l00418"></a>00418                 <span class="keywordflow">if</span> (uiNumber + uiNextVal &gt;= uiValue) {
-<a name="l00419"></a>00419                         *outp++ = *++q;
-<a name="l00420"></a>00420                         uiNumber += uiNextVal;
-<a name="l00421"></a>00421                 } <span class="keywordflow">else</span> {
-<a name="l00422"></a>00422                         p++;
-<a name="l00423"></a>00423                         uiValue /= (UINT)(UCHAR)(*p++);
-<a name="l00424"></a>00424                 }
-<a name="l00425"></a>00425         }
-<a name="l00426"></a>00426 } <span class="comment">/* end of tNumber2Roman */</span>
-<a name="l00427"></a>00427 
-<a name="l00428"></a>00428 <span class="comment">/*</span>
-<a name="l00429"></a>00429 <span class="comment"> * iNumber2Alpha - convert a number to alphabetic &quot;numbers&quot;</span>
-<a name="l00430"></a>00430 <span class="comment"> *</span>
-<a name="l00431"></a>00431 <span class="comment"> * returns the number of characters written</span>
-<a name="l00432"></a>00432 <span class="comment"> */</span>
-<a name="l00433"></a>00433 <span class="keywordtype">size_t</span>
-<a name="l00434"></a>00434 tNumber2Alpha(UINT uiNumber, BOOL bUpperCase, <span class="keywordtype">char</span> *szOutput)
-<a name="l00435"></a>00435 {
-<a name="l00436"></a>00436         <span class="keywordtype">char</span>    *outp;
-<a name="l00437"></a>00437         UINT    uiTmp;
-<a name="l00438"></a>00438 
-<a name="l00439"></a>00439         fail(szOutput == NULL);
-<a name="l00440"></a>00440 
-<a name="l00441"></a>00441         <span class="keywordflow">if</span> (uiNumber == 0) {
-<a name="l00442"></a>00442                 szOutput[0] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00443"></a>00443                 <span class="keywordflow">return</span> 0;
-<a name="l00444"></a>00444         }
-<a name="l00445"></a>00445 
-<a name="l00446"></a>00446         outp = szOutput;
-<a name="l00447"></a>00447         uiTmp = (UINT)(bUpperCase ? <span class="charliteral">&#39;A&#39;</span>: <span class="charliteral">&#39;a&#39;</span>);
-<a name="l00448"></a>00448         <span class="keywordflow">if</span> (uiNumber &lt;= 26) {
-<a name="l00449"></a>00449                 uiNumber -= 1;
-<a name="l00450"></a>00450                 *outp++ = (char)(uiTmp + uiNumber);
-<a name="l00451"></a>00451         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (uiNumber &lt;= 26U + 26U*26U) {
-<a name="l00452"></a>00452                 uiNumber -= 26 + 1;
-<a name="l00453"></a>00453                 *outp++ = (char)(uiTmp + uiNumber / 26);
-<a name="l00454"></a>00454                 *outp++ = (char)(uiTmp + uiNumber % 26);
-<a name="l00455"></a>00455         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (uiNumber &lt;= 26U + 26U*26U + 26U*26U*26U) {
-<a name="l00456"></a>00456                 uiNumber -= 26 + 26*26 + 1;
-<a name="l00457"></a>00457                 *outp++ = (char)(uiTmp + uiNumber / (26*26));
-<a name="l00458"></a>00458                 *outp++ = (char)(uiTmp + uiNumber / 26 % 26);
-<a name="l00459"></a>00459                 *outp++ = (char)(uiTmp + uiNumber % 26);
-<a name="l00460"></a>00460         }
-<a name="l00461"></a>00461         *outp = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00462"></a>00462         fail(outp &lt; szOutput);
-<a name="l00463"></a>00463         <span class="keywordflow">return</span> (<span class="keywordtype">size_t</span>)(outp - szOutput);
-<a name="l00464"></a>00464 } <span class="comment">/* end of tNumber2Alpha */</span>
-<a name="l00465"></a>00465 
-<a name="l00466"></a>00466 <span class="comment">/*</span>
-<a name="l00467"></a>00467 <span class="comment"> * unincpy - copy a counted Unicode string to an single-byte string</span>
-<a name="l00468"></a>00468 <span class="comment"> */</span>
-<a name="l00469"></a>00469 <span class="keywordtype">char</span> *
-<a name="l00470"></a>00470 unincpy(<span class="keywordtype">char</span> *s1, <span class="keyword">const</span> UCHAR *s2, <span class="keywordtype">size_t</span> n)
-<a name="l00471"></a>00471 {
-<a name="l00472"></a>00472         <span class="keywordtype">char</span>    *pcDest;
-<a name="l00473"></a>00473         ULONG   ulChar;
-<a name="l00474"></a>00474         <span class="keywordtype">size_t</span>  tLen;
-<a name="l00475"></a>00475         USHORT  usUni;
-<a name="l00476"></a>00476 
-<a name="l00477"></a>00477         <span class="keywordflow">for</span> (pcDest = s1, tLen = 0; tLen &lt; n; pcDest++, tLen++) {
-<a name="l00478"></a>00478                 usUni = usGetWord(tLen * 2, s2);
-<a name="l00479"></a>00479                 <span class="keywordflow">if</span> (usUni == 0) {
-<a name="l00480"></a>00480                         <span class="keywordflow">break</span>;
-<a name="l00481"></a>00481                 }
-<a name="l00482"></a>00482                 ulChar = ulTranslateCharacters(usUni, 0, 8,
-<a name="l00483"></a>00483                                 conversion_unknown, encoding_neutral, FALSE);
-<a name="l00484"></a>00484                 <span class="keywordflow">if</span> (ulChar == IGNORE_CHARACTER) {
-<a name="l00485"></a>00485                         ulChar = (ULONG)<span class="charliteral">&#39;?&#39;</span>;
-<a name="l00486"></a>00486                 }
-<a name="l00487"></a>00487                 *pcDest = (char)ulChar;
-<a name="l00488"></a>00488         }
-<a name="l00489"></a>00489         <span class="keywordflow">for</span> (; tLen &lt; n; tLen++) {
-<a name="l00490"></a>00490                 *pcDest++ = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00491"></a>00491         }
-<a name="l00492"></a>00492         <span class="keywordflow">return</span> s1;
-<a name="l00493"></a>00493 } <span class="comment">/* end of unincpy */</span>
-<a name="l00494"></a>00494 
-<a name="l00495"></a>00495 <span class="comment">/*</span>
-<a name="l00496"></a>00496 <span class="comment"> * unilen - calculate the length of a Unicode string</span>
-<a name="l00497"></a>00497 <span class="comment"> *</span>
-<a name="l00498"></a>00498 <span class="comment"> * returns the length in bytes</span>
-<a name="l00499"></a>00499 <span class="comment"> */</span>
-<a name="l00500"></a>00500 <span class="keywordtype">size_t</span>
-<a name="l00501"></a>00501 unilen(<span class="keyword">const</span> UCHAR *s)
-<a name="l00502"></a>00502 {
-<a name="l00503"></a>00503         <span class="keywordtype">size_t</span>  tLen;
-<a name="l00504"></a>00504         USHORT  usUni;
-<a name="l00505"></a>00505 
-<a name="l00506"></a>00506         tLen = 0;
-<a name="l00507"></a>00507         <span class="keywordflow">for</span> (;;) {
-<a name="l00508"></a>00508                 usUni = usGetWord(tLen, s);
-<a name="l00509"></a>00509                 <span class="keywordflow">if</span> (usUni == 0) {
-<a name="l00510"></a>00510                         <span class="keywordflow">return</span> tLen;
-<a name="l00511"></a>00511                 }
-<a name="l00512"></a>00512                 tLen += 2;
-<a name="l00513"></a>00513         }
-<a name="l00514"></a>00514 } <span class="comment">/* end of unilen */</span>
-<a name="l00515"></a>00515 
-<a name="l00516"></a>00516 <span class="comment">/*</span>
-<a name="l00517"></a>00517 <span class="comment"> * szBaseName - get the basename of the specified filename</span>
-<a name="l00518"></a>00518 <span class="comment"> */</span>
-<a name="l00519"></a>00519 <span class="keyword">const</span> <span class="keywordtype">char</span> *
-<a name="l00520"></a>00520 szBasename(<span class="keyword">const</span> <span class="keywordtype">char</span> *szFilename)
-<a name="l00521"></a>00521 {
-<a name="l00522"></a>00522         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szTmp;
-<a name="l00523"></a>00523 
-<a name="l00524"></a>00524         fail(szFilename == NULL);
-<a name="l00525"></a>00525 
-<a name="l00526"></a>00526         <span class="keywordflow">if</span> (szFilename == NULL || szFilename[0] == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00527"></a>00527                 <span class="keywordflow">return</span> <span class="stringliteral">&quot;null&quot;</span>;
-<a name="l00528"></a>00528         }
-<a name="l00529"></a>00529 
-<a name="l00530"></a>00530         szTmp = strrchr(szFilename, FILE_SEPARATOR[0]);
-<a name="l00531"></a>00531         <span class="keywordflow">if</span> (szTmp == NULL) {
-<a name="l00532"></a>00532                 <span class="keywordflow">return</span> szFilename;
-<a name="l00533"></a>00533         }
-<a name="l00534"></a>00534         <span class="keywordflow">return</span> ++szTmp;
-<a name="l00535"></a>00535 } <span class="comment">/* end of szBasename */</span>
-<a name="l00536"></a>00536 
-<a name="l00537"></a>00537 <span class="comment">/*</span>
-<a name="l00538"></a>00538 <span class="comment"> * lComputeLeading - compute the leading</span>
-<a name="l00539"></a>00539 <span class="comment"> *</span>
-<a name="l00540"></a>00540 <span class="comment"> * NOTE: the fontsize is specified in half points</span>
-<a name="l00541"></a>00541 <span class="comment"> *</span>
-<a name="l00542"></a>00542 <span class="comment"> * Returns the leading in drawunits</span>
-<a name="l00543"></a>00543 <span class="comment"> */</span>
-<a name="l00544"></a>00544 <span class="keywordtype">long</span>
-<a name="l00545"></a>00545 lComputeLeading(USHORT usFontSize)
-<a name="l00546"></a>00546 {
-<a name="l00547"></a>00547         <span class="keywordtype">long</span>    lLeading;
-<a name="l00548"></a>00548 
-<a name="l00549"></a>00549         lLeading = (long)usFontSize * 500L;
-<a name="l00550"></a>00550         <span class="keywordflow">if</span> (usFontSize &lt; 18) {          <span class="comment">/* Small text: 112% */</span>
-<a name="l00551"></a>00551                 lLeading *= 112;
-<a name="l00552"></a>00552         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (usFontSize &lt; 28) {   <span class="comment">/* Normal text: 124% */</span>
-<a name="l00553"></a>00553                 lLeading *= 124;
-<a name="l00554"></a>00554         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (usFontSize &lt; 48) {   <span class="comment">/* Small headlines: 104% */</span>
-<a name="l00555"></a>00555                 lLeading *= 104;
-<a name="l00556"></a>00556         } <span class="keywordflow">else</span> {                        <span class="comment">/* Large headlines: 100% */</span>
-<a name="l00557"></a>00557                 lLeading *= 100;
-<a name="l00558"></a>00558         }
-<a name="l00559"></a>00559         lLeading = lMilliPoints2DrawUnits(lLeading);
-<a name="l00560"></a>00560         lLeading += 50;
-<a name="l00561"></a>00561         lLeading /= 100;
-<a name="l00562"></a>00562         <span class="keywordflow">return</span> lLeading;
-<a name="l00563"></a>00563 } <span class="comment">/* end of lComputeLeading */</span>
-<a name="l00564"></a>00564 
-<a name="l00565"></a>00565 <span class="comment">/*</span>
-<a name="l00566"></a>00566 <span class="comment"> * Convert a UCS character to an UTF-8 string</span>
-<a name="l00567"></a>00567 <span class="comment"> *</span>
-<a name="l00568"></a>00568 <span class="comment"> * Returns the string length of the result</span>
-<a name="l00569"></a>00569 <span class="comment"> */</span>
-<a name="l00570"></a>00570 <span class="keywordtype">size_t</span>
-<a name="l00571"></a>00571 tUcs2Utf8(ULONG ulChar, <span class="keywordtype">char</span> *szResult, <span class="keywordtype">size_t</span> tMaxResultLen)
-<a name="l00572"></a>00572 {
-<a name="l00573"></a>00573         <span class="keywordflow">if</span> (szResult == NULL || tMaxResultLen == 0) {
-<a name="l00574"></a>00574                 <span class="keywordflow">return</span> 0;
-<a name="l00575"></a>00575         }
-<a name="l00576"></a>00576 
-<a name="l00577"></a>00577         <span class="keywordflow">if</span> (ulChar &lt; 0x80 &amp;&amp; tMaxResultLen &gt;= 2) {
-<a name="l00578"></a>00578                 szResult[0] = (char)ulChar;
-<a name="l00579"></a>00579                 szResult[1] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00580"></a>00580                 <span class="keywordflow">return</span> 1;
-<a name="l00581"></a>00581         }
-<a name="l00582"></a>00582         <span class="keywordflow">if</span> (ulChar &lt; 0x800 &amp;&amp; tMaxResultLen &gt;= 3) {
-<a name="l00583"></a>00583                 szResult[0] = (char)(0xc0 | ulChar &gt;&gt; 6);
-<a name="l00584"></a>00584                 szResult[1] = (char)(0x80 | (ulChar &amp; 0x3f));
-<a name="l00585"></a>00585                 szResult[2] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00586"></a>00586                 <span class="keywordflow">return</span> 2;
-<a name="l00587"></a>00587         }
-<a name="l00588"></a>00588         <span class="keywordflow">if</span> (ulChar &lt; 0x10000 &amp;&amp; tMaxResultLen &gt;= 4) {
-<a name="l00589"></a>00589                 szResult[0] = (char)(0xe0 | ulChar &gt;&gt; 12);
-<a name="l00590"></a>00590                 szResult[1] = (char)(0x80 | (ulChar &gt;&gt; 6 &amp; 0x3f));
-<a name="l00591"></a>00591                 szResult[2] = (char)(0x80 | (ulChar &amp; 0x3f));
-<a name="l00592"></a>00592                 szResult[3] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00593"></a>00593                 <span class="keywordflow">return</span> 3;
-<a name="l00594"></a>00594         }
-<a name="l00595"></a>00595         <span class="keywordflow">if</span> (ulChar &lt; 0x200000 &amp;&amp; tMaxResultLen &gt;= 5) {
-<a name="l00596"></a>00596                 szResult[0] = (char)(0xf0 | ulChar &gt;&gt; 18);
-<a name="l00597"></a>00597                 szResult[1] = (char)(0x80 | (ulChar &gt;&gt; 12 &amp; 0x3f));
-<a name="l00598"></a>00598                 szResult[2] = (char)(0x80 | (ulChar &gt;&gt; 6 &amp; 0x3f));
-<a name="l00599"></a>00599                 szResult[3] = (char)(0x80 | (ulChar &amp; 0x3f));
-<a name="l00600"></a>00600                 szResult[4] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00601"></a>00601                 <span class="keywordflow">return</span> 4;
-<a name="l00602"></a>00602         }
-<a name="l00603"></a>00603         szResult[0] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00604"></a>00604         <span class="keywordflow">return</span> 0;
-<a name="l00605"></a>00605 } <span class="comment">/* end of tUcs2Utf8 */</span>
-<a name="l00606"></a>00606 
-<a name="l00607"></a>00607 <span class="comment">/*</span>
-<a name="l00608"></a>00608 <span class="comment"> * vGetBulletValue - get the bullet value for the conversing type and encoding</span>
-<a name="l00609"></a>00609 <span class="comment"> */</span>
-<a name="l00610"></a>00610 <span class="keywordtype">void</span>
-<a name="l00611"></a>00611 vGetBulletValue(conversion_type eConversionType, encoding_type eEncoding,
-<a name="l00612"></a>00612         <span class="keywordtype">char</span> *szResult, <span class="keywordtype">size_t</span> tMaxResultLen)
-<a name="l00613"></a>00613 {
-<a name="l00614"></a>00614         fail(szResult == NULL);
-<a name="l00615"></a>00615         fail(tMaxResultLen &lt; 2);
-<a name="l00616"></a>00616 
-<a name="l00617"></a>00617         <span class="keywordflow">if</span> (eEncoding == encoding_utf_8) {
-<a name="l00618"></a>00618                 (void)tUcs2Utf8(UNICODE_BULLET, szResult, tMaxResultLen);
-<a name="l00619"></a>00619         } <span class="keywordflow">else</span> {
-<a name="l00620"></a>00620                 szResult[0] = (char)ucGetBulletCharacter(eConversionType,
-<a name="l00621"></a>00621                                                         eEncoding);
-<a name="l00622"></a>00622                 szResult[1] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00623"></a>00623         }
-<a name="l00624"></a>00624 } <span class="comment">/* end of vGetBulletValue */</span>
-<a name="l00625"></a>00625 
-<a name="l00626"></a>00626 <span class="comment">/*</span>
-<a name="l00627"></a>00627 <span class="comment"> * bAllZero - are all bytes zero?</span>
-<a name="l00628"></a>00628 <span class="comment"> */</span>
-<a name="l00629"></a>00629 BOOL
-<a name="l00630"></a>00630 bAllZero(<span class="keyword">const</span> UCHAR *aucBytes, <span class="keywordtype">size_t</span> tLength)
-<a name="l00631"></a>00631 {
-<a name="l00632"></a>00632         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00633"></a>00633 
-<a name="l00634"></a>00634         <span class="keywordflow">if</span> (aucBytes == NULL || tLength == 0) {
-<a name="l00635"></a>00635                 <span class="keywordflow">return</span> TRUE;
-<a name="l00636"></a>00636         }
-<a name="l00637"></a>00637 
-<a name="l00638"></a>00638         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tLength; tIndex++) {
-<a name="l00639"></a>00639                 <span class="keywordflow">if</span> (aucBytes[tIndex] != 0) {
-<a name="l00640"></a>00640                         <span class="keywordflow">return</span> FALSE;
-<a name="l00641"></a>00641                 }
-<a name="l00642"></a>00642         }
-<a name="l00643"></a>00643         <span class="keywordflow">return</span> TRUE;
-<a name="l00644"></a>00644 } <span class="comment">/* end of bAllZero */</span>
-<a name="l00645"></a>00645 
-<a name="l00646"></a>00646 <span class="preprocessor">#if !defined(__riscos)</span>
-<a name="l00647"></a>00647 <span class="preprocessor"></span><span class="comment">/*</span>
-<a name="l00648"></a>00648 <span class="comment"> * GetCodesetFromLocale - get the codeset from the current locale</span>
-<a name="l00649"></a>00649 <span class="comment"> *</span>
-<a name="l00650"></a>00650 <span class="comment"> * Original version: Copyright (C) 1999  Bruno Haible</span>
-<a name="l00651"></a>00651 <span class="comment"> * Syntax:</span>
-<a name="l00652"></a>00652 <span class="comment"> * language[_territory][.codeset][@modifier][+special][,[sponsor][_revision]]</span>
-<a name="l00653"></a>00653 <span class="comment"> *</span>
-<a name="l00654"></a>00654 <span class="comment"> * Returns TRUE when sucessful, otherwise FALSE</span>
-<a name="l00655"></a>00655 <span class="comment"> */</span>
-<a name="l00656"></a>00656 <span class="keyword">static</span> BOOL
-<a name="l00657"></a>00657 bGetCodesetFromLocale(<span class="keywordtype">char</span> *szCodeset, <span class="keywordtype">size_t</span> tMaxCodesetLength, BOOL *pbEuro)
-<a name="l00658"></a>00658 {
-<a name="l00659"></a>00659 <span class="preprocessor">#if !defined(__dos)</span>
-<a name="l00660"></a>00660 <span class="preprocessor"></span>        <span class="keyword">const</span> <span class="keywordtype">char</span>      *szLocale;
-<a name="l00661"></a>00661         <span class="keyword">const</span> <span class="keywordtype">char</span>      *pcTmp;
-<a name="l00662"></a>00662         <span class="keywordtype">size_t</span>          tIndex;
-<a name="l00663"></a>00663         <span class="keywordtype">char</span>            szModifier[6];
-<a name="l00664"></a>00664 <span class="preprocessor">#endif </span><span class="comment">/* __dos */</span>
-<a name="l00665"></a>00665 
-<a name="l00666"></a>00666         <span class="keywordflow">if</span> (pbEuro != NULL) {
-<a name="l00667"></a>00667                 *pbEuro = FALSE;        <span class="comment">/* Until proven otherwise */</span>
-<a name="l00668"></a>00668         }
-<a name="l00669"></a>00669         <span class="keywordflow">if</span> (szCodeset == NULL || tMaxCodesetLength == 0) {
-<a name="l00670"></a>00670                 <span class="keywordflow">return</span> FALSE;
-<a name="l00671"></a>00671         }
-<a name="l00672"></a>00672 
-<a name="l00673"></a>00673 <span class="preprocessor">#if defined(__dos)</span>
-<a name="l00674"></a>00674 <span class="preprocessor"></span>        <span class="keywordflow">if</span> (tMaxCodesetLength &lt; 2 + <span class="keyword">sizeof</span>(<span class="keywordtype">int</span>) * 3 + 1) {
-<a name="l00675"></a>00675                 DBG_DEC(tMaxCodesetLength);
-<a name="l00676"></a>00676                 DBG_DEC(2 + <span class="keyword">sizeof</span>(<span class="keywordtype">int</span>) * 3 + 1);
-<a name="l00677"></a>00677                 <span class="keywordflow">return</span> FALSE;
-<a name="l00678"></a>00678         }
-<a name="l00679"></a>00679         <span class="comment">/* Get the active codepage from DOS */</span>
-<a name="l00680"></a>00680         sprintf(szCodeset, <span class="stringliteral">&quot;cp%d&quot;</span>, iGetCodepage());
-<a name="l00681"></a>00681         DBG_MSG(szCodeset);
-<a name="l00682"></a>00682 <span class="preprocessor">#else</span>
-<a name="l00683"></a>00683 <span class="preprocessor"></span>        <span class="comment">/* Get the locale from the environment */</span>
-<a name="l00684"></a>00684         szLocale = getenv(<span class="stringliteral">&quot;LC_ALL&quot;</span>);
-<a name="l00685"></a>00685         <span class="keywordflow">if</span> (szLocale == NULL || szLocale[0] == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00686"></a>00686                 szLocale = getenv(<span class="stringliteral">&quot;LC_CTYPE&quot;</span>);
-<a name="l00687"></a>00687                 <span class="keywordflow">if</span> (szLocale == NULL || szLocale[0] == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00688"></a>00688                         szLocale = getenv(<span class="stringliteral">&quot;LANG&quot;</span>);
-<a name="l00689"></a>00689                 }
-<a name="l00690"></a>00690         }
-<a name="l00691"></a>00691         <span class="keywordflow">if</span> (szLocale == NULL || szLocale[0] == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00692"></a>00692                 <span class="comment">/* No locale, so no codeset name and no modifier */</span>
-<a name="l00693"></a>00693                 <span class="keywordflow">return</span> FALSE;
-<a name="l00694"></a>00694         }
-<a name="l00695"></a>00695         DBG_MSG(szLocale);
-<a name="l00696"></a>00696         pcTmp = strchr(szLocale, <span class="charliteral">&#39;.&#39;</span>);
-<a name="l00697"></a>00697         <span class="keywordflow">if</span> (pcTmp == NULL) {
-<a name="l00698"></a>00698                 <span class="comment">/* No codeset name */</span>
-<a name="l00699"></a>00699                 szCodeset[0] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00700"></a>00700         } <span class="keywordflow">else</span> {
-<a name="l00701"></a>00701                 <span class="comment">/* Copy the codeset name */</span>
-<a name="l00702"></a>00702                 pcTmp++;
-<a name="l00703"></a>00703                 <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tMaxCodesetLength; tIndex++) {
-<a name="l00704"></a>00704                         <span class="keywordflow">if</span> (*pcTmp == <span class="charliteral">&#39;@&#39;</span> || *pcTmp == <span class="charliteral">&#39;+&#39;</span> ||
-<a name="l00705"></a>00705                             *pcTmp == <span class="charliteral">&#39;,&#39;</span> || *pcTmp == <span class="charliteral">&#39;_&#39;</span> ||
-<a name="l00706"></a>00706                             *pcTmp == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00707"></a>00707                                 szCodeset[tIndex] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00708"></a>00708                                 <span class="keywordflow">break</span>;
-<a name="l00709"></a>00709                         }
-<a name="l00710"></a>00710                         szCodeset[tIndex] = *pcTmp;
-<a name="l00711"></a>00711                         pcTmp++;
-<a name="l00712"></a>00712                 }
-<a name="l00713"></a>00713                 szCodeset[tMaxCodesetLength - 1] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00714"></a>00714         }
-<a name="l00715"></a>00715         <span class="keywordflow">if</span> (pbEuro == NULL) {
-<a name="l00716"></a>00716                 <span class="comment">/* No need to get the modifier */</span>
-<a name="l00717"></a>00717                 <span class="keywordflow">return</span> TRUE;
-<a name="l00718"></a>00718         }
-<a name="l00719"></a>00719         pcTmp = strchr(szLocale, <span class="charliteral">&#39;@&#39;</span>);
-<a name="l00720"></a>00720         <span class="keywordflow">if</span> (pcTmp != NULL) {
-<a name="l00721"></a>00721                 <span class="comment">/* Copy the modifier */</span>
-<a name="l00722"></a>00722                 pcTmp++;
-<a name="l00723"></a>00723                 <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; <span class="keyword">sizeof</span>(szModifier); tIndex++) {
-<a name="l00724"></a>00724                         <span class="keywordflow">if</span> (*pcTmp == <span class="charliteral">&#39;+&#39;</span> || *pcTmp == <span class="charliteral">&#39;,&#39;</span> ||
-<a name="l00725"></a>00725                             *pcTmp == <span class="charliteral">&#39;_&#39;</span> || *pcTmp == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00726"></a>00726                                 szModifier[tIndex] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00727"></a>00727                                 <span class="keywordflow">break</span>;
-<a name="l00728"></a>00728                         }
-<a name="l00729"></a>00729                         szModifier[tIndex] = *pcTmp;
-<a name="l00730"></a>00730                         pcTmp++;
-<a name="l00731"></a>00731                 }
-<a name="l00732"></a>00732                 szModifier[<span class="keyword">sizeof</span>(szModifier) - 1] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00733"></a>00733                 *pbEuro = STRCEQ(szModifier, <span class="stringliteral">&quot;Euro&quot;</span>);
-<a name="l00734"></a>00734         }
-<a name="l00735"></a>00735 <span class="preprocessor">#endif </span><span class="comment">/* __dos */</span>
-<a name="l00736"></a>00736         <span class="keywordflow">return</span> TRUE;
-<a name="l00737"></a>00737 } <span class="comment">/* end of bGetCodesetFromLocale */</span>
-<a name="l00738"></a>00738 
-<a name="l00739"></a>00739 <span class="comment">/*</span>
-<a name="l00740"></a>00740 <span class="comment"> * GetNormalizedCodeset - get the normalized codeset from the current locale</span>
-<a name="l00741"></a>00741 <span class="comment"> *</span>
-<a name="l00742"></a>00742 <span class="comment"> * Returns TRUE when sucessful, otherwise FALSE</span>
-<a name="l00743"></a>00743 <span class="comment"> */</span>
-<a name="l00744"></a>00744 BOOL
-<a name="l00745"></a>00745 bGetNormalizedCodeset(<span class="keywordtype">char</span> *szCodeset, <span class="keywordtype">size_t</span> tMaxCodesetLength, BOOL *pbEuro)
-<a name="l00746"></a>00746 {
-<a name="l00747"></a>00747         BOOL    bOnlyDigits;
-<a name="l00748"></a>00748         <span class="keyword">const</span> <span class="keywordtype">char</span>      *pcSrc;
-<a name="l00749"></a>00749         <span class="keywordtype">char</span>    *pcDest;
-<a name="l00750"></a>00750         <span class="keywordtype">char</span>    *szTmp, *szCodesetNorm;
-<a name="l00751"></a>00751 
-<a name="l00752"></a>00752         <span class="keywordflow">if</span> (pbEuro != NULL) {
-<a name="l00753"></a>00753                 *pbEuro = FALSE;        <span class="comment">/* Until proven otherwise */</span>
-<a name="l00754"></a>00754         }
-<a name="l00755"></a>00755         <span class="keywordflow">if</span> (szCodeset == NULL || tMaxCodesetLength &lt; 4) {
-<a name="l00756"></a>00756                 <span class="keywordflow">return</span> FALSE;
-<a name="l00757"></a>00757         }
-<a name="l00758"></a>00758 
-<a name="l00759"></a>00759         <span class="comment">/* Get the codeset name */</span>
-<a name="l00760"></a>00760         szTmp = xmalloc(tMaxCodesetLength - 3);
-<a name="l00761"></a>00761         <span class="keywordflow">if</span> (!bGetCodesetFromLocale(szTmp, tMaxCodesetLength - 3, pbEuro)) {
-<a name="l00762"></a>00762                 szTmp = xfree(szTmp);
-<a name="l00763"></a>00763                 <span class="keywordflow">return</span> FALSE;
-<a name="l00764"></a>00764         }
-<a name="l00765"></a>00765         <span class="comment">/* Normalize the codeset name */</span>
-<a name="l00766"></a>00766         szCodesetNorm = xmalloc(tMaxCodesetLength - 3);
-<a name="l00767"></a>00767         bOnlyDigits = TRUE;
-<a name="l00768"></a>00768         pcDest = szCodesetNorm;
-<a name="l00769"></a>00769         <span class="keywordflow">for</span> (pcSrc = szTmp; *pcSrc != <span class="charliteral">&#39;\0&#39;</span>; pcSrc++) {
-<a name="l00770"></a>00770                 <span class="keywordflow">if</span> (isalnum(*pcSrc)) {
-<a name="l00771"></a>00771                         *pcDest = tolower(*pcSrc);
-<a name="l00772"></a>00772                         <span class="keywordflow">if</span> (!isdigit(*pcDest)) {
-<a name="l00773"></a>00773                                 bOnlyDigits = FALSE;
-<a name="l00774"></a>00774                         }
-<a name="l00775"></a>00775                         pcDest++;
-<a name="l00776"></a>00776                 }
-<a name="l00777"></a>00777         }
-<a name="l00778"></a>00778         *pcDest = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00779"></a>00779         DBG_MSG(szCodesetNorm);
-<a name="l00780"></a>00780         <span class="comment">/* Add &quot;iso&quot; when szCodesetNorm contains all digits */</span>
-<a name="l00781"></a>00781         <span class="keywordflow">if</span> (bOnlyDigits &amp;&amp; szCodesetNorm[0] != <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00782"></a>00782                 fail(strlen(szCodesetNorm) + 3 &gt;= tMaxCodesetLength);
-<a name="l00783"></a>00783                 sprintf(szCodeset, <span class="stringliteral">&quot;iso%s&quot;</span>, szCodesetNorm);
-<a name="l00784"></a>00784         } <span class="keywordflow">else</span> {
-<a name="l00785"></a>00785                 fail(strlen(szCodesetNorm) &gt;= tMaxCodesetLength);
-<a name="l00786"></a>00786                 strncpy(szCodeset, szCodesetNorm, pcDest - szCodesetNorm + 1);
-<a name="l00787"></a>00787                 szCodeset[tMaxCodesetLength - 1] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00788"></a>00788         }
-<a name="l00789"></a>00789         DBG_MSG(szCodeset);
-<a name="l00790"></a>00790         <span class="comment">/* Clean up and leave */</span>
-<a name="l00791"></a>00791         szCodesetNorm = xfree(szCodesetNorm);
-<a name="l00792"></a>00792         szTmp = xfree(szTmp);
-<a name="l00793"></a>00793         <span class="keywordflow">return</span> TRUE;
-<a name="l00794"></a>00794 } <span class="comment">/* end of bGetNormalizedCodeset */</span>
-<a name="l00795"></a>00795 
-<a name="l00796"></a>00796 <span class="comment">/*</span>
-<a name="l00797"></a>00797 <span class="comment"> * szGetDefaultMappingFile - get the default mapping file</span>
-<a name="l00798"></a>00798 <span class="comment"> *</span>
-<a name="l00799"></a>00799 <span class="comment"> * Returns the basename of the default mapping file</span>
-<a name="l00800"></a>00800 <span class="comment"> */</span>
-<a name="l00801"></a>00801 <span class="keyword">const</span> <span class="keywordtype">char</span> *
-<a name="l00802"></a>00802 szGetDefaultMappingFile(<span class="keywordtype">void</span>)
-<a name="l00803"></a>00803 {
-<a name="l00804"></a>00804         <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">struct </span>{
-<a name="l00805"></a>00805                 <span class="keyword">const</span> <span class="keywordtype">char</span>      *szCodeset;
-<a name="l00806"></a>00806                 <span class="keyword">const</span> <span class="keywordtype">char</span>      *szMappingFile;
-<a name="l00807"></a>00807         } atMappingFile[] = {
-<a name="l00808"></a>00808                 { <span class="stringliteral">&quot;iso88591&quot;</span>,   MAPPING_FILE_8859_1 },
-<a name="l00809"></a>00809                 { <span class="stringliteral">&quot;iso88592&quot;</span>,   MAPPING_FILE_8859_2 },
-<a name="l00810"></a>00810                 { <span class="stringliteral">&quot;iso88593&quot;</span>,   <span class="stringliteral">&quot;8859-3.txt&quot;</span> },
-<a name="l00811"></a>00811                 { <span class="stringliteral">&quot;iso88594&quot;</span>,   <span class="stringliteral">&quot;8859-4.txt&quot;</span> },
-<a name="l00812"></a>00812                 { <span class="stringliteral">&quot;iso88595&quot;</span>,   <span class="stringliteral">&quot;8859-5.txt&quot;</span> },
-<a name="l00813"></a>00813                 { <span class="stringliteral">&quot;iso88596&quot;</span>,   MAPPING_FILE_8859_5 },
-<a name="l00814"></a>00814                 { <span class="stringliteral">&quot;iso88597&quot;</span>,   <span class="stringliteral">&quot;8859-7.txt&quot;</span> },
-<a name="l00815"></a>00815                 { <span class="stringliteral">&quot;iso88598&quot;</span>,   <span class="stringliteral">&quot;8859-8.txt&quot;</span> },
-<a name="l00816"></a>00816                 { <span class="stringliteral">&quot;iso88599&quot;</span>,   <span class="stringliteral">&quot;8859-9.txt&quot;</span> },
-<a name="l00817"></a>00817                 { <span class="stringliteral">&quot;iso885910&quot;</span>,  <span class="stringliteral">&quot;8859-10.txt&quot;</span> },
-<a name="l00818"></a>00818                 { <span class="stringliteral">&quot;iso885913&quot;</span>,  <span class="stringliteral">&quot;8859-13.txt&quot;</span> },
-<a name="l00819"></a>00819                 { <span class="stringliteral">&quot;iso885914&quot;</span>,  <span class="stringliteral">&quot;8859-14.txt&quot;</span> },
-<a name="l00820"></a>00820                 { <span class="stringliteral">&quot;iso885915&quot;</span>,  MAPPING_FILE_8859_15 },
-<a name="l00821"></a>00821                 { <span class="stringliteral">&quot;iso885916&quot;</span>,  <span class="stringliteral">&quot;8859-16.txt&quot;</span> },
-<a name="l00822"></a>00822                 { <span class="stringliteral">&quot;koi8r&quot;</span>,      MAPPING_FILE_KOI8_R },
-<a name="l00823"></a>00823                 { <span class="stringliteral">&quot;koi8u&quot;</span>,      MAPPING_FILE_KOI8_U },
-<a name="l00824"></a>00824                 { <span class="stringliteral">&quot;utf8&quot;</span>,       MAPPING_FILE_UTF_8 },
-<a name="l00825"></a>00825                 { <span class="stringliteral">&quot;cp437&quot;</span>,      MAPPING_FILE_CP437 },
-<a name="l00826"></a>00826                 { <span class="stringliteral">&quot;cp850&quot;</span>,      <span class="stringliteral">&quot;cp850.txt&quot;</span> },
-<a name="l00827"></a>00827                 { <span class="stringliteral">&quot;cp852&quot;</span>,      MAPPING_FILE_CP852 },
-<a name="l00828"></a>00828                 { <span class="stringliteral">&quot;cp862&quot;</span>,      <span class="stringliteral">&quot;cp862.txt&quot;</span> },
-<a name="l00829"></a>00829                 { <span class="stringliteral">&quot;cp864&quot;</span>,      <span class="stringliteral">&quot;cp864.txt&quot;</span> },
-<a name="l00830"></a>00830                 { <span class="stringliteral">&quot;cp866&quot;</span>,      MAPPING_FILE_CP866 },
-<a name="l00831"></a>00831                 { <span class="stringliteral">&quot;cp1250&quot;</span>,     MAPPING_FILE_CP1250 },
-<a name="l00832"></a>00832                 { <span class="stringliteral">&quot;cp1251&quot;</span>,     MAPPING_FILE_CP1251 },
-<a name="l00833"></a>00833                 { <span class="stringliteral">&quot;cp1252&quot;</span>,     <span class="stringliteral">&quot;cp1252.txt&quot;</span> },
-<a name="l00834"></a>00834         };
-<a name="l00835"></a>00835         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00836"></a>00836         BOOL    bEuro;
-<a name="l00837"></a>00837         <span class="keywordtype">char</span>    szCodeset[20];
-<a name="l00838"></a>00838 
-<a name="l00839"></a>00839         szCodeset[0] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00840"></a>00840         bEuro = FALSE;
-<a name="l00841"></a>00841         <span class="comment">/* Get the normalized codeset name */</span>
-<a name="l00842"></a>00842         <span class="keywordflow">if</span> (!bGetNormalizedCodeset(szCodeset, <span class="keyword">sizeof</span>(szCodeset), &amp;bEuro)) {
-<a name="l00843"></a>00843                 <span class="keywordflow">return</span> MAPPING_FILE_8859_1;
-<a name="l00844"></a>00844         }
-<a name="l00845"></a>00845         <span class="keywordflow">if</span> (szCodeset[0] == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00846"></a>00846                 <span class="keywordflow">if</span> (bEuro) {
-<a name="l00847"></a>00847                         <span class="comment">/* Default mapping file (with Euro sign) */</span>
-<a name="l00848"></a>00848                         <span class="keywordflow">return</span> MAPPING_FILE_8859_15;
-<a name="l00849"></a>00849                 } <span class="keywordflow">else</span> {
-<a name="l00850"></a>00850                         <span class="comment">/* Default mapping file (without Euro sign) */</span>
-<a name="l00851"></a>00851                         <span class="keywordflow">return</span> MAPPING_FILE_8859_1;
-<a name="l00852"></a>00852                 }
-<a name="l00853"></a>00853         }
-<a name="l00854"></a>00854         <span class="comment">/* Find the name in the table */</span>
-<a name="l00855"></a>00855         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; elementsof(atMappingFile); tIndex++) {
-<a name="l00856"></a>00856                 <span class="keywordflow">if</span> (STREQ(atMappingFile[tIndex].szCodeset, szCodeset)) {
-<a name="l00857"></a>00857                         <span class="keywordflow">return</span> atMappingFile[tIndex].szMappingFile;
-<a name="l00858"></a>00858                 }
-<a name="l00859"></a>00859         }
-<a name="l00860"></a>00860         <span class="comment">/* Default default mapping file */</span>
-<a name="l00861"></a>00861 <span class="preprocessor">#if defined(__dos)</span>
-<a name="l00862"></a>00862 <span class="preprocessor"></span>        <span class="keywordflow">return</span> MAPPING_FILE_CP437;
-<a name="l00863"></a>00863 <span class="preprocessor">#else</span>
-<a name="l00864"></a>00864 <span class="preprocessor"></span>        <span class="keywordflow">return</span> MAPPING_FILE_8859_1;
-<a name="l00865"></a>00865 <span class="preprocessor">#endif </span><span class="comment">/* __dos */</span>
-<a name="l00866"></a>00866 } <span class="comment">/* end of szGetDefaultMappingFile */</span>
-<a name="l00867"></a>00867 <span class="preprocessor">#endif </span><span class="comment">/* !__riscos */</span>
-<a name="l00868"></a>00868 
-<a name="l00869"></a>00869 <span class="comment">/*</span>
-<a name="l00870"></a>00870 <span class="comment"> * tConvertDTTM - convert Windows Date and Time format</span>
-<a name="l00871"></a>00871 <span class="comment"> *</span>
-<a name="l00872"></a>00872 <span class="comment"> * returns Unix time_t or -1</span>
-<a name="l00873"></a>00873 <span class="comment"> */</span>
-<a name="l00874"></a>00874 time_t
-<a name="l00875"></a>00875 tConvertDTTM(ULONG ulDTTM)
-<a name="l00876"></a>00876 {
-<a name="l00877"></a>00877         <span class="keyword">struct </span>tm       tTime;
-<a name="l00878"></a>00878         time_t          tResult;
-<a name="l00879"></a>00879 
-<a name="l00880"></a>00880         <span class="keywordflow">if</span> (ulDTTM == 0) {
-<a name="l00881"></a>00881                 <span class="keywordflow">return</span> (time_t)-1;
-<a name="l00882"></a>00882         }
-<a name="l00883"></a>00883         memset(&amp;tTime, 0, <span class="keyword">sizeof</span>(tTime));
-<a name="l00884"></a>00884         tTime.tm_min = (int)(ulDTTM &amp; 0x0000003f);
-<a name="l00885"></a>00885         tTime.tm_hour = (int)((ulDTTM &amp; 0x000007c0) &gt;&gt; 6);
-<a name="l00886"></a>00886         tTime.tm_mday = (int)((ulDTTM &amp; 0x0000f800) &gt;&gt; 11);
-<a name="l00887"></a>00887         tTime.tm_mon = (int)((ulDTTM &amp; 0x000f0000) &gt;&gt; 16);
-<a name="l00888"></a>00888         tTime.tm_year = (int)((ulDTTM &amp; 0x1ff00000) &gt;&gt; 20);
-<a name="l00889"></a>00889         tTime.tm_isdst = -1;
-<a name="l00890"></a>00890         tTime.tm_mon--;         <span class="comment">/* From 01-12 to 00-11 */</span>
-<a name="l00891"></a>00891         tResult = mktime(&amp;tTime);
-<a name="l00892"></a>00892         NO_DBG_MSG(ctime(&amp;tResult));
-<a name="l00893"></a>00893         <span class="keywordflow">return</span> tResult;
-<a name="l00894"></a>00894 } <span class="comment">/* end of tConvertDTTM */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/notes_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,892 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/notes.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/notes.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * notes.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2005 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Functions to tell the difference between footnotes and endnotes</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00010"></a>00010 
-<a name="l00011"></a>00011 <span class="comment">/*</span>
-<a name="l00012"></a>00012 <span class="comment"> * Private structures to hide the way the information</span>
-<a name="l00013"></a>00013 <span class="comment"> * is stored from the rest of the program</span>
-<a name="l00014"></a>00014 <span class="comment"> */</span>
-<a name="l00015"></a>00015 <span class="keyword">typedef</span> <span class="keyword">struct </span>footnote_local_tag {
-<a name="l00016"></a>00016         footnote_block_type     tInfo;
-<a name="l00017"></a>00017         ULONG                   ulCharPosStart;
-<a name="l00018"></a>00018         ULONG                   ulCharPosNext;
-<a name="l00019"></a>00019         BOOL                    bUseful;
-<a name="l00020"></a>00020 } footnote_local_type;
-<a name="l00021"></a>00021 
-<a name="l00022"></a>00022 <span class="comment">/* Variables needed to write the Footnote and Endnote information */</span>
-<a name="l00023"></a>00023 <span class="keyword">static</span> ULONG    *aulFootnoteList = NULL;
-<a name="l00024"></a>00024 <span class="keyword">static</span> <span class="keywordtype">size_t</span>   tFootnoteListLength = 0;
-<a name="l00025"></a>00025 <span class="keyword">static</span> ULONG    *aulEndnoteList = NULL;
-<a name="l00026"></a>00026 <span class="keyword">static</span> <span class="keywordtype">size_t</span>   tEndnoteListLength = 0;
-<a name="l00027"></a>00027 <span class="comment">/* Variables needed to write the Footnote Text */</span>
-<a name="l00028"></a>00028 <span class="keyword">static</span> footnote_local_type      *pFootnoteText = NULL;
-<a name="l00029"></a>00029 <span class="keyword">static</span> <span class="keywordtype">size_t</span>                   tFootnoteTextLength = 0;
-<a name="l00030"></a>00030 
-<a name="l00031"></a>00031 
-<a name="l00032"></a>00032 <span class="comment">/*</span>
-<a name="l00033"></a>00033 <span class="comment"> * Destroy the lists with footnote and endnote information</span>
-<a name="l00034"></a>00034 <span class="comment"> */</span>
-<a name="l00035"></a>00035 <span class="keywordtype">void</span>
-<a name="l00036"></a>00036 vDestroyNotesInfoLists(<span class="keywordtype">void</span>)
-<a name="l00037"></a>00037 {
-<a name="l00038"></a>00038         footnote_local_type     *pRecord;
-<a name="l00039"></a>00039         <span class="keywordtype">size_t</span>                  tFootnote;
-<a name="l00040"></a>00040 
-<a name="l00041"></a>00041         TRACE_MSG(<span class="stringliteral">&quot;vDestroyNotesInfoLists&quot;</span>);
-<a name="l00042"></a>00042 
-<a name="l00043"></a>00043         <span class="comment">/* Free the lists and reset all control variables */</span>
-<a name="l00044"></a>00044         aulEndnoteList = xfree(aulEndnoteList);
-<a name="l00045"></a>00045         aulFootnoteList = xfree(aulFootnoteList);
-<a name="l00046"></a>00046         tEndnoteListLength = 0;
-<a name="l00047"></a>00047         tFootnoteListLength = 0;
-<a name="l00048"></a>00048         <span class="keywordflow">for</span> (tFootnote = 0; tFootnote &lt; tFootnoteTextLength; tFootnote++) {
-<a name="l00049"></a>00049                 pRecord = pFootnoteText + tFootnote;
-<a name="l00050"></a>00050                 pRecord-&gt;tInfo.szText = xfree(pRecord-&gt;tInfo.szText);
-<a name="l00051"></a>00051         }
-<a name="l00052"></a>00052         pFootnoteText = xfree(pFootnoteText);
-<a name="l00053"></a>00053         tFootnoteTextLength = 0;
-<a name="l00054"></a>00054 } <span class="comment">/* end of vDestroyNotesInfoLists */</span>
-<a name="l00055"></a>00055 
-<a name="l00056"></a>00056 <span class="comment">/*</span>
-<a name="l00057"></a>00057 <span class="comment"> * Build the list with footnote information for Word for DOS files</span>
-<a name="l00058"></a>00058 <span class="comment"> */</span>
-<a name="l00059"></a>00059 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00060"></a>00060 vGet0FootnotesInfoAndText(FILE *pFile, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00061"></a>00061 {
-<a name="l00062"></a>00062         footnote_local_type     *pCurr;
-<a name="l00063"></a>00063         UCHAR   *aucBuffer;
-<a name="l00064"></a>00064         ULONG   ulFileOffset, ulBeginOfText, ulOffset, ulBeginFootnoteInfo;
-<a name="l00065"></a>00065         ULONG   ulCharPos, ulBeginNextBlock;
-<a name="l00066"></a>00066         <span class="keywordtype">size_t</span>  tFootnotes, tFootnoteInfoLen;
-<a name="l00067"></a>00067         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00068"></a>00068         UCHAR   aucTmp[2];
-<a name="l00069"></a>00069 
-<a name="l00070"></a>00070         TRACE_MSG(<span class="stringliteral">&quot;vGet0FootnotesInfoAndText&quot;</span>);
-<a name="l00071"></a>00071 
-<a name="l00072"></a>00072         fail(pFile == NULL || aucHeader == NULL);
-<a name="l00073"></a>00073 
-<a name="l00074"></a>00074         ulBeginOfText = 128;
-<a name="l00075"></a>00075         NO_DBG_HEX(ulBeginOfText);
-<a name="l00076"></a>00076         ulBeginFootnoteInfo =  128 * (ULONG)usGetWord(0x14, aucHeader);
-<a name="l00077"></a>00077         DBG_HEX(ulBeginFootnoteInfo);
-<a name="l00078"></a>00078         ulBeginNextBlock = 128 * (ULONG)usGetWord(0x16, aucHeader);
-<a name="l00079"></a>00079         DBG_HEX(ulBeginNextBlock);
-<a name="l00080"></a>00080 
-<a name="l00081"></a>00081         <span class="keywordflow">if</span> (ulBeginFootnoteInfo == ulBeginNextBlock) {
-<a name="l00082"></a>00082                 DBG_MSG(<span class="stringliteral">&quot;No Footnotes in this document&quot;</span>);
-<a name="l00083"></a>00083                 <span class="keywordflow">return</span>;
-<a name="l00084"></a>00084         }
-<a name="l00085"></a>00085 
-<a name="l00086"></a>00086         <span class="comment">/* Read the the number of footnotes + 1 */</span>
-<a name="l00087"></a>00087         <span class="keywordflow">if</span> (!bReadBytes(aucTmp, 2, ulBeginFootnoteInfo, pFile)) {
-<a name="l00088"></a>00088                 <span class="keywordflow">return</span>;
-<a name="l00089"></a>00089         }
-<a name="l00090"></a>00090         tFootnotes = (size_t)usGetWord(0, aucTmp);
-<a name="l00091"></a>00091         <span class="keywordflow">if</span> (tFootnotes &lt; 2) {
-<a name="l00092"></a>00092                 DBG_MSG(<span class="stringliteral">&quot;No Footnotes in this document (2)&quot;</span>);
-<a name="l00093"></a>00093         }
-<a name="l00094"></a>00094         DBG_DEC(tFootnotes);
-<a name="l00095"></a>00095         tFootnoteInfoLen =  8 * tFootnotes;
-<a name="l00096"></a>00096 
-<a name="l00097"></a>00097         aucBuffer = xmalloc(tFootnoteInfoLen);
-<a name="l00098"></a>00098         <span class="keywordflow">if</span> (!bReadBytes(aucBuffer,
-<a name="l00099"></a>00099                         tFootnoteInfoLen, ulBeginFootnoteInfo + 4, pFile)) {
-<a name="l00100"></a>00100                 aucBuffer = xfree(aucBuffer);
-<a name="l00101"></a>00101                 <span class="keywordflow">return</span>;
-<a name="l00102"></a>00102         }
-<a name="l00103"></a>00103         DBG_PRINT_BLOCK(aucBuffer, tFootnoteInfoLen);
-<a name="l00104"></a>00104 
-<a name="l00105"></a>00105         <span class="comment">/* Get footnote information */</span>
-<a name="l00106"></a>00106         fail(tFootnoteListLength != 0);
-<a name="l00107"></a>00107         tFootnoteListLength = tFootnotes - 1;
-<a name="l00108"></a>00108         fail(tFootnoteListLength == 0);
-<a name="l00109"></a>00109 
-<a name="l00110"></a>00110         fail(aulFootnoteList != NULL);
-<a name="l00111"></a>00111         aulFootnoteList = xcalloc(tFootnoteListLength, <span class="keyword">sizeof</span>(ULONG));
-<a name="l00112"></a>00112 
-<a name="l00113"></a>00113         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tFootnoteListLength; tIndex++) {
-<a name="l00114"></a>00114                 ulOffset = ulGetLong(tIndex * 8, aucBuffer);
-<a name="l00115"></a>00115                 DBG_HEX(ulOffset);
-<a name="l00116"></a>00116                 ulFileOffset = ulCharPos2FileOffset(ulBeginOfText + ulOffset);
-<a name="l00117"></a>00117                 DBG_HEX(ulFileOffset);
-<a name="l00118"></a>00118                 aulFootnoteList[tIndex] = ulFileOffset;
-<a name="l00119"></a>00119         }
-<a name="l00120"></a>00120 
-<a name="l00121"></a>00121         <span class="comment">/* Get footnote text */</span>
-<a name="l00122"></a>00122         fail(tFootnoteTextLength != 0);
-<a name="l00123"></a>00123         tFootnoteTextLength = tFootnotes - 1;
-<a name="l00124"></a>00124         fail(tFootnoteTextLength == 0);
-<a name="l00125"></a>00125 
-<a name="l00126"></a>00126         fail(pFootnoteText != NULL);
-<a name="l00127"></a>00127         pFootnoteText = xcalloc(tFootnoteTextLength,
-<a name="l00128"></a>00128                                 <span class="keyword">sizeof</span>(footnote_local_type));
-<a name="l00129"></a>00129 
-<a name="l00130"></a>00130         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tFootnoteTextLength; tIndex++) {
-<a name="l00131"></a>00131                 pCurr = pFootnoteText + tIndex;
-<a name="l00132"></a>00132                 pCurr-&gt;tInfo.szText = NULL;
-<a name="l00133"></a>00133                 ulOffset = ulGetLong(tIndex * 8 + 4, aucBuffer);
-<a name="l00134"></a>00134                 DBG_HEX(ulOffset);
-<a name="l00135"></a>00135                 ulCharPos = ulBeginOfText + ulOffset;
-<a name="l00136"></a>00136                 DBG_HEX(ulCharPos);
-<a name="l00137"></a>00137                 DBG_HEX(ulCharPos2FileOffset(ulCharPos));
-<a name="l00138"></a>00138                 pCurr-&gt;ulCharPosStart = ulCharPos;
-<a name="l00139"></a>00139                 ulOffset = ulGetLong((tIndex + 1) * 8 + 4, aucBuffer);
-<a name="l00140"></a>00140                 DBG_HEX(ulOffset);
-<a name="l00141"></a>00141                 ulCharPos = ulBeginOfText + ulOffset;
-<a name="l00142"></a>00142                 DBG_HEX(ulCharPos);
-<a name="l00143"></a>00143                 DBG_HEX(ulCharPos2FileOffset(ulCharPos));
-<a name="l00144"></a>00144                 pCurr-&gt;ulCharPosNext = ulCharPos;
-<a name="l00145"></a>00145                 pCurr-&gt;bUseful = pCurr-&gt;ulCharPosStart != pCurr-&gt;ulCharPosNext;
-<a name="l00146"></a>00146         }
-<a name="l00147"></a>00147         aucBuffer = xfree(aucBuffer);
-<a name="l00148"></a>00148 } <span class="comment">/* end of vGet0FootnotesInfoAndText */</span>
-<a name="l00149"></a>00149 
-<a name="l00150"></a>00150 <span class="comment">/*</span>
-<a name="l00151"></a>00151 <span class="comment"> * Build the lists note information for Word for DOS files</span>
-<a name="l00152"></a>00152 <span class="comment"> */</span>
-<a name="l00153"></a>00153 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00154"></a>00154 vGet0NotesInfo(FILE *pFile, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00155"></a>00155 {
-<a name="l00156"></a>00156         TRACE_MSG(<span class="stringliteral">&quot;vGet0NotesInfo&quot;</span>);
-<a name="l00157"></a>00157 
-<a name="l00158"></a>00158         vGet0FootnotesInfoAndText(pFile, aucHeader);
-<a name="l00159"></a>00159         <span class="comment">/* There are no endnotes in a Word for DOS file */</span>
-<a name="l00160"></a>00160 } <span class="comment">/* end of vGet0NotesInfo */</span>
-<a name="l00161"></a>00161 
-<a name="l00162"></a>00162 <span class="comment">/*</span>
-<a name="l00163"></a>00163 <span class="comment"> * Build the list with footnote information for WinWord 1/2 files</span>
-<a name="l00164"></a>00164 <span class="comment"> */</span>
-<a name="l00165"></a>00165 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00166"></a>00166 vGet2FootnotesInfo(FILE *pFile, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00167"></a>00167 {
-<a name="l00168"></a>00168         UCHAR   *aucBuffer;
-<a name="l00169"></a>00169         ULONG   ulFileOffset, ulBeginOfText, ulOffset, ulBeginFootnoteInfo;
-<a name="l00170"></a>00170         <span class="keywordtype">size_t</span>  tFootnoteInfoLen;
-<a name="l00171"></a>00171         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00172"></a>00172 
-<a name="l00173"></a>00173         TRACE_MSG(<span class="stringliteral">&quot;vGet2FootnotesInfo&quot;</span>);
-<a name="l00174"></a>00174 
-<a name="l00175"></a>00175         fail(pFile == NULL || aucHeader == NULL);
-<a name="l00176"></a>00176 
-<a name="l00177"></a>00177         ulBeginOfText = ulGetLong(0x18, aucHeader); <span class="comment">/* fcMin */</span>
-<a name="l00178"></a>00178         NO_DBG_HEX(ulBeginOfText);
-<a name="l00179"></a>00179         ulBeginFootnoteInfo = ulGetLong(0x64, aucHeader); <span class="comment">/* fcPlcffndRef */</span>
-<a name="l00180"></a>00180         NO_DBG_HEX(ulBeginFootnoteInfo);
-<a name="l00181"></a>00181         tFootnoteInfoLen = (size_t)usGetWord(0x68, aucHeader); <span class="comment">/* cbPlcffndRef */</span>
-<a name="l00182"></a>00182         NO_DBG_DEC(tFootnoteInfoLen);
-<a name="l00183"></a>00183 
-<a name="l00184"></a>00184         <span class="keywordflow">if</span> (tFootnoteInfoLen &lt; 10) {
-<a name="l00185"></a>00185                 DBG_MSG(<span class="stringliteral">&quot;No Footnotes in this document&quot;</span>);
-<a name="l00186"></a>00186                 <span class="keywordflow">return</span>;
-<a name="l00187"></a>00187         }
-<a name="l00188"></a>00188 
-<a name="l00189"></a>00189         aucBuffer = xmalloc(tFootnoteInfoLen);
-<a name="l00190"></a>00190         <span class="keywordflow">if</span> (!bReadBytes(aucBuffer,
-<a name="l00191"></a>00191                         tFootnoteInfoLen, ulBeginFootnoteInfo, pFile)) {
-<a name="l00192"></a>00192                 aucBuffer = xfree(aucBuffer);
-<a name="l00193"></a>00193                 <span class="keywordflow">return</span>;
-<a name="l00194"></a>00194         }
-<a name="l00195"></a>00195         NO_DBG_PRINT_BLOCK(aucBuffer, tFootnoteInfoLen);
-<a name="l00196"></a>00196 
-<a name="l00197"></a>00197         fail(tFootnoteListLength != 0);
-<a name="l00198"></a>00198         tFootnoteListLength = (tFootnoteInfoLen - 4) / 6;
-<a name="l00199"></a>00199         fail(tFootnoteListLength == 0);
-<a name="l00200"></a>00200 
-<a name="l00201"></a>00201         fail(aulFootnoteList != NULL);
-<a name="l00202"></a>00202         aulFootnoteList = xcalloc(tFootnoteListLength, <span class="keyword">sizeof</span>(ULONG));
-<a name="l00203"></a>00203 
-<a name="l00204"></a>00204         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tFootnoteListLength; tIndex++) {
-<a name="l00205"></a>00205                 ulOffset = ulGetLong(tIndex * 4, aucBuffer);
-<a name="l00206"></a>00206                 NO_DBG_HEX(ulOffset);
-<a name="l00207"></a>00207                 ulFileOffset = ulCharPos2FileOffset(ulBeginOfText + ulOffset);
-<a name="l00208"></a>00208                 NO_DBG_HEX(ulFileOffset);
-<a name="l00209"></a>00209                 aulFootnoteList[tIndex] = ulFileOffset;
-<a name="l00210"></a>00210         }
-<a name="l00211"></a>00211         aucBuffer = xfree(aucBuffer);
-<a name="l00212"></a>00212 } <span class="comment">/* end of vGet2FootnotesInfo */</span>
-<a name="l00213"></a>00213 
-<a name="l00214"></a>00214 <span class="comment">/*</span>
-<a name="l00215"></a>00215 <span class="comment"> * Build the list with footnote text information for WinWord 1/2 files</span>
-<a name="l00216"></a>00216 <span class="comment"> */</span>
-<a name="l00217"></a>00217 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00218"></a>00218 vGet2FootnotesText(FILE *pFile, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00219"></a>00219 {
-<a name="l00220"></a>00220         footnote_local_type     *pCurr;
-<a name="l00221"></a>00221         UCHAR   *aucBuffer;
-<a name="l00222"></a>00222         ULONG   ulCharPos, ulBeginOfFootnotes, ulOffset, ulBeginFootnoteText;
-<a name="l00223"></a>00223         <span class="keywordtype">size_t</span>  tFootnoteTextLen;
-<a name="l00224"></a>00224         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00225"></a>00225 
-<a name="l00226"></a>00226         TRACE_MSG(<span class="stringliteral">&quot;vGet2FootnotesText&quot;</span>);
-<a name="l00227"></a>00227 
-<a name="l00228"></a>00228         fail(pFile == NULL || aucHeader == NULL);
-<a name="l00229"></a>00229 
-<a name="l00230"></a>00230         ulBeginOfFootnotes = ulGetLong(0x18, aucHeader); <span class="comment">/* fcMin */</span>
-<a name="l00231"></a>00231         ulBeginOfFootnotes += ulGetLong(0x34, aucHeader); <span class="comment">/* ccpText */</span>
-<a name="l00232"></a>00232         NO_DBG_HEX(ulBeginOfFootnotes);
-<a name="l00233"></a>00233 
-<a name="l00234"></a>00234         ulBeginFootnoteText = ulGetLong(0x6a, aucHeader); <span class="comment">/* fcPlcffndTxt */</span>
-<a name="l00235"></a>00235         NO_DBG_HEX(ulBeginFootnoteText);
-<a name="l00236"></a>00236         tFootnoteTextLen =
-<a name="l00237"></a>00237                 (size_t)usGetWord(0x6e, aucHeader); <span class="comment">/* cbPlcffndTxt */</span>
-<a name="l00238"></a>00238         NO_DBG_DEC(tFootnoteTextLen);
-<a name="l00239"></a>00239 
-<a name="l00240"></a>00240         <span class="keywordflow">if</span> (tFootnoteTextLen &lt; 12) {
-<a name="l00241"></a>00241                 DBG_MSG(<span class="stringliteral">&quot;No Footnote text in this document&quot;</span>);
-<a name="l00242"></a>00242                 <span class="keywordflow">return</span>;
-<a name="l00243"></a>00243         }
-<a name="l00244"></a>00244 
-<a name="l00245"></a>00245         aucBuffer = xmalloc(tFootnoteTextLen);
-<a name="l00246"></a>00246         <span class="keywordflow">if</span> (!bReadBytes(aucBuffer,
-<a name="l00247"></a>00247                         tFootnoteTextLen, ulBeginFootnoteText, pFile)) {
-<a name="l00248"></a>00248                 aucBuffer = xfree(aucBuffer);
-<a name="l00249"></a>00249                 <span class="keywordflow">return</span>;
-<a name="l00250"></a>00250         }
-<a name="l00251"></a>00251         NO_DBG_PRINT_BLOCK(aucBuffer, tFootnoteTextLen);
-<a name="l00252"></a>00252 
-<a name="l00253"></a>00253         fail(tFootnoteTextLength != 0);
-<a name="l00254"></a>00254         tFootnoteTextLength = tFootnoteTextLen / 4 - 2;
-<a name="l00255"></a>00255         fail(tFootnoteTextLength == 0);
-<a name="l00256"></a>00256 
-<a name="l00257"></a>00257         fail(pFootnoteText != NULL);
-<a name="l00258"></a>00258         pFootnoteText = xcalloc(tFootnoteTextLength,
-<a name="l00259"></a>00259                                 <span class="keyword">sizeof</span>(footnote_local_type));
-<a name="l00260"></a>00260 
-<a name="l00261"></a>00261         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tFootnoteTextLength; tIndex++) {
-<a name="l00262"></a>00262                 pCurr = pFootnoteText + tIndex;
-<a name="l00263"></a>00263                 pCurr-&gt;tInfo.szText = NULL;
-<a name="l00264"></a>00264                 ulOffset = ulGetLong(tIndex * 4, aucBuffer);
-<a name="l00265"></a>00265                 NO_DBG_HEX(ulOffset);
-<a name="l00266"></a>00266                 ulCharPos = ulBeginOfFootnotes + ulOffset;
-<a name="l00267"></a>00267                 NO_DBG_HEX(ulCharPos);
-<a name="l00268"></a>00268                 NO_DBG_HEX(ulCharPos2FileOffset(ulCharPos));
-<a name="l00269"></a>00269                 pCurr-&gt;ulCharPosStart = ulCharPos;
-<a name="l00270"></a>00270                 ulOffset = ulGetLong(tIndex * 4 + 4, aucBuffer);
-<a name="l00271"></a>00271                 NO_DBG_HEX(ulOffset);
-<a name="l00272"></a>00272                 ulCharPos = ulBeginOfFootnotes + ulOffset;
-<a name="l00273"></a>00273                 NO_DBG_HEX(ulCharPos);
-<a name="l00274"></a>00274                 NO_DBG_HEX(ulCharPos2FileOffset(ulCharPos));
-<a name="l00275"></a>00275                 pCurr-&gt;ulCharPosNext = ulCharPos;
-<a name="l00276"></a>00276                 pCurr-&gt;bUseful = pCurr-&gt;ulCharPosStart != pCurr-&gt;ulCharPosNext;
-<a name="l00277"></a>00277         }
-<a name="l00278"></a>00278         aucBuffer = xfree(aucBuffer);
-<a name="l00279"></a>00279 } <span class="comment">/* end of vGet2FootnotesText */</span>
-<a name="l00280"></a>00280 
-<a name="l00281"></a>00281 <span class="comment">/*</span>
-<a name="l00282"></a>00282 <span class="comment"> * Build the lists note information for WinWord 1/2 files</span>
-<a name="l00283"></a>00283 <span class="comment"> */</span>
-<a name="l00284"></a>00284 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00285"></a>00285 vGet2NotesInfo(FILE *pFile, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00286"></a>00286 {
-<a name="l00287"></a>00287         TRACE_MSG(<span class="stringliteral">&quot;vGet2NotesInfo&quot;</span>);
-<a name="l00288"></a>00288 
-<a name="l00289"></a>00289         vGet2FootnotesInfo(pFile, aucHeader);
-<a name="l00290"></a>00290         vGet2FootnotesText(pFile, aucHeader);
-<a name="l00291"></a>00291         <span class="comment">/* There are no endnotes in a WinWord 1/2 file */</span>
-<a name="l00292"></a>00292 } <span class="comment">/* end of vGet2NotesInfo */</span>
-<a name="l00293"></a>00293 
-<a name="l00294"></a>00294 <span class="comment">/*</span>
-<a name="l00295"></a>00295 <span class="comment"> * Build the list with footnote information for Word 6/7 files</span>
-<a name="l00296"></a>00296 <span class="comment"> */</span>
-<a name="l00297"></a>00297 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00298"></a>00298 vGet6FootnotesInfo(FILE *pFile, ULONG ulStartBlock,
-<a name="l00299"></a>00299         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00300"></a>00300         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00301"></a>00301 {
-<a name="l00302"></a>00302         UCHAR   *aucBuffer;
-<a name="l00303"></a>00303         ULONG   ulFileOffset, ulBeginOfText, ulOffset, ulBeginFootnoteInfo;
-<a name="l00304"></a>00304         <span class="keywordtype">size_t</span>  tFootnoteInfoLen;
-<a name="l00305"></a>00305         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00306"></a>00306 
-<a name="l00307"></a>00307         TRACE_MSG(<span class="stringliteral">&quot;vGet6FootnotesInfo&quot;</span>);
-<a name="l00308"></a>00308 
-<a name="l00309"></a>00309         fail(pFile == NULL || aucHeader == NULL);
-<a name="l00310"></a>00310         fail(ulStartBlock &gt; MAX_BLOCKNUMBER &amp;&amp; ulStartBlock != END_OF_CHAIN);
-<a name="l00311"></a>00311         fail(aulBBD == NULL);
-<a name="l00312"></a>00312 
-<a name="l00313"></a>00313         ulBeginOfText = ulGetLong(0x18, aucHeader); <span class="comment">/* fcMin */</span>
-<a name="l00314"></a>00314         NO_DBG_HEX(ulBeginOfText);
-<a name="l00315"></a>00315         ulBeginFootnoteInfo = ulGetLong(0x68, aucHeader); <span class="comment">/* fcPlcffndRef */</span>
-<a name="l00316"></a>00316         NO_DBG_HEX(ulBeginFootnoteInfo);
-<a name="l00317"></a>00317         tFootnoteInfoLen =
-<a name="l00318"></a>00318                 (size_t)ulGetLong(0x6c, aucHeader); <span class="comment">/* lcbPlcffndRef */</span>
-<a name="l00319"></a>00319         NO_DBG_DEC(tFootnoteInfoLen);
-<a name="l00320"></a>00320 
-<a name="l00321"></a>00321         <span class="keywordflow">if</span> (tFootnoteInfoLen &lt; 10) {
-<a name="l00322"></a>00322                 DBG_MSG(<span class="stringliteral">&quot;No Footnotes in this document&quot;</span>);
-<a name="l00323"></a>00323                 <span class="keywordflow">return</span>;
-<a name="l00324"></a>00324         }
-<a name="l00325"></a>00325 
-<a name="l00326"></a>00326         aucBuffer = xmalloc(tFootnoteInfoLen);
-<a name="l00327"></a>00327         <span class="keywordflow">if</span> (!bReadBuffer(pFile, ulStartBlock,
-<a name="l00328"></a>00328                         aulBBD, tBBDLen, BIG_BLOCK_SIZE,
-<a name="l00329"></a>00329                         aucBuffer, ulBeginFootnoteInfo, tFootnoteInfoLen)) {
-<a name="l00330"></a>00330                 aucBuffer = xfree(aucBuffer);
-<a name="l00331"></a>00331                 <span class="keywordflow">return</span>;
-<a name="l00332"></a>00332         }
-<a name="l00333"></a>00333         NO_DBG_PRINT_BLOCK(aucBuffer, tFootnoteInfoLen);
-<a name="l00334"></a>00334 
-<a name="l00335"></a>00335         fail(tFootnoteListLength != 0);
-<a name="l00336"></a>00336         tFootnoteListLength = (tFootnoteInfoLen - 4) / 6;
-<a name="l00337"></a>00337         fail(tFootnoteListLength == 0);
-<a name="l00338"></a>00338 
-<a name="l00339"></a>00339         fail(aulFootnoteList != NULL);
-<a name="l00340"></a>00340         aulFootnoteList = xcalloc(tFootnoteListLength, <span class="keyword">sizeof</span>(ULONG));
-<a name="l00341"></a>00341 
-<a name="l00342"></a>00342         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tFootnoteListLength; tIndex++) {
-<a name="l00343"></a>00343                 ulOffset = ulGetLong(tIndex * 4, aucBuffer);
-<a name="l00344"></a>00344                 NO_DBG_HEX(ulOffset);
-<a name="l00345"></a>00345                 ulFileOffset = ulCharPos2FileOffset(ulBeginOfText + ulOffset);
-<a name="l00346"></a>00346                 NO_DBG_HEX(ulFileOffset);
-<a name="l00347"></a>00347                 aulFootnoteList[tIndex] = ulFileOffset;
-<a name="l00348"></a>00348         }
-<a name="l00349"></a>00349         aucBuffer = xfree(aucBuffer);
-<a name="l00350"></a>00350 } <span class="comment">/* end of vGet6FootnotesInfo */</span>
-<a name="l00351"></a>00351 
-<a name="l00352"></a>00352 <span class="comment">/*</span>
-<a name="l00353"></a>00353 <span class="comment"> * Build the list with footnote text information for Word 6/7 files</span>
-<a name="l00354"></a>00354 <span class="comment"> */</span>
-<a name="l00355"></a>00355 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00356"></a>00356 vGet6FootnotesText(FILE *pFile, ULONG ulStartBlock,
-<a name="l00357"></a>00357         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00358"></a>00358         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00359"></a>00359 {
-<a name="l00360"></a>00360         footnote_local_type     *pCurr;
-<a name="l00361"></a>00361         UCHAR   *aucBuffer;
-<a name="l00362"></a>00362         ULONG   ulCharPos, ulBeginOfFootnotes, ulOffset, ulBeginFootnoteText;
-<a name="l00363"></a>00363         <span class="keywordtype">size_t</span>  tFootnoteTextLen;
-<a name="l00364"></a>00364         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00365"></a>00365 
-<a name="l00366"></a>00366         TRACE_MSG(<span class="stringliteral">&quot;vGet6FootnotesText&quot;</span>);
-<a name="l00367"></a>00367 
-<a name="l00368"></a>00368         fail(pFile == NULL || aucHeader == NULL);
-<a name="l00369"></a>00369         fail(ulStartBlock &gt; MAX_BLOCKNUMBER &amp;&amp; ulStartBlock != END_OF_CHAIN);
-<a name="l00370"></a>00370         fail(aulBBD == NULL);
-<a name="l00371"></a>00371 
-<a name="l00372"></a>00372         ulBeginOfFootnotes = ulGetLong(0x18, aucHeader); <span class="comment">/* fcMin */</span>
-<a name="l00373"></a>00373         ulBeginOfFootnotes += ulGetLong(0x34, aucHeader); <span class="comment">/* ccpText */</span>
-<a name="l00374"></a>00374         NO_DBG_HEX(ulBeginOfFootnotes);
-<a name="l00375"></a>00375 
-<a name="l00376"></a>00376         ulBeginFootnoteText = ulGetLong(0x70, aucHeader); <span class="comment">/* fcPlcffndTxt */</span>
-<a name="l00377"></a>00377         NO_DBG_HEX(ulBeginFootnoteText);
-<a name="l00378"></a>00378         tFootnoteTextLen =
-<a name="l00379"></a>00379                 (size_t)ulGetLong(0x74, aucHeader); <span class="comment">/* lcbPlcffndTxt */</span>
-<a name="l00380"></a>00380         NO_DBG_DEC(tFootnoteTextLen);
-<a name="l00381"></a>00381 
-<a name="l00382"></a>00382         <span class="keywordflow">if</span> (tFootnoteTextLen &lt; 12) {
-<a name="l00383"></a>00383                 DBG_MSG(<span class="stringliteral">&quot;No Footnote text in this document&quot;</span>);
-<a name="l00384"></a>00384                 <span class="keywordflow">return</span>;
-<a name="l00385"></a>00385         }
-<a name="l00386"></a>00386 
-<a name="l00387"></a>00387         aucBuffer = xmalloc(tFootnoteTextLen);
-<a name="l00388"></a>00388         <span class="keywordflow">if</span> (!bReadBuffer(pFile, ulStartBlock,
-<a name="l00389"></a>00389                         aulBBD, tBBDLen, BIG_BLOCK_SIZE,
-<a name="l00390"></a>00390                         aucBuffer, ulBeginFootnoteText, tFootnoteTextLen)) {
-<a name="l00391"></a>00391                 aucBuffer = xfree(aucBuffer);
-<a name="l00392"></a>00392                 <span class="keywordflow">return</span>;
-<a name="l00393"></a>00393         }
-<a name="l00394"></a>00394         NO_DBG_PRINT_BLOCK(aucBuffer, tFootnoteTextLen);
-<a name="l00395"></a>00395 
-<a name="l00396"></a>00396         fail(tFootnoteTextLength != 0);
-<a name="l00397"></a>00397         tFootnoteTextLength = tFootnoteTextLen / 4 - 2;
-<a name="l00398"></a>00398         fail(tFootnoteTextLength == 0);
-<a name="l00399"></a>00399 
-<a name="l00400"></a>00400         fail(pFootnoteText != NULL);
-<a name="l00401"></a>00401         pFootnoteText = xcalloc(tFootnoteTextLength,
-<a name="l00402"></a>00402                                 <span class="keyword">sizeof</span>(footnote_local_type));
-<a name="l00403"></a>00403 
-<a name="l00404"></a>00404         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tFootnoteTextLength; tIndex++) {
-<a name="l00405"></a>00405                 pCurr = pFootnoteText + tIndex;
-<a name="l00406"></a>00406                 pCurr-&gt;tInfo.szText = NULL;
-<a name="l00407"></a>00407                 ulOffset = ulGetLong(tIndex * 4, aucBuffer);
-<a name="l00408"></a>00408                 NO_DBG_HEX(ulOffset);
-<a name="l00409"></a>00409                 ulCharPos = ulBeginOfFootnotes + ulOffset;
-<a name="l00410"></a>00410                 NO_DBG_HEX(ulCharPos);
-<a name="l00411"></a>00411                 NO_DBG_HEX(ulCharPos2FileOffset(ulCharPos));
-<a name="l00412"></a>00412                 pCurr-&gt;ulCharPosStart = ulCharPos;
-<a name="l00413"></a>00413                 ulOffset = ulGetLong(tIndex * 4 + 4, aucBuffer);
-<a name="l00414"></a>00414                 NO_DBG_HEX(ulOffset);
-<a name="l00415"></a>00415                 ulCharPos = ulBeginOfFootnotes + ulOffset;
-<a name="l00416"></a>00416                 NO_DBG_HEX(ulCharPos);
-<a name="l00417"></a>00417                 NO_DBG_HEX(ulCharPos2FileOffset(ulCharPos));
-<a name="l00418"></a>00418                 pCurr-&gt;ulCharPosNext = ulCharPos;
-<a name="l00419"></a>00419                 pCurr-&gt;bUseful = pCurr-&gt;ulCharPosStart != pCurr-&gt;ulCharPosNext;
-<a name="l00420"></a>00420         }
-<a name="l00421"></a>00421         aucBuffer = xfree(aucBuffer);
-<a name="l00422"></a>00422 } <span class="comment">/* end of vGet6FootnotesText */</span>
-<a name="l00423"></a>00423 
-<a name="l00424"></a>00424 <span class="comment">/*</span>
-<a name="l00425"></a>00425 <span class="comment"> * Build the list with endnote information for Word 6/7 files</span>
-<a name="l00426"></a>00426 <span class="comment"> */</span>
-<a name="l00427"></a>00427 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00428"></a>00428 vGet6EndnotesInfo(FILE *pFile, ULONG ulStartBlock,
-<a name="l00429"></a>00429         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00430"></a>00430         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00431"></a>00431 {
-<a name="l00432"></a>00432         UCHAR   *aucBuffer;
-<a name="l00433"></a>00433         ULONG   ulFileOffset, ulBeginOfText, ulOffset, ulBeginEndnoteInfo;
-<a name="l00434"></a>00434         <span class="keywordtype">size_t</span>  tEndnoteInfoLen;
-<a name="l00435"></a>00435         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00436"></a>00436 
-<a name="l00437"></a>00437         TRACE_MSG(<span class="stringliteral">&quot;vGet6EndnotesInfo&quot;</span>);
-<a name="l00438"></a>00438 
-<a name="l00439"></a>00439         fail(pFile == NULL || aucHeader == NULL);
-<a name="l00440"></a>00440         fail(ulStartBlock &gt; MAX_BLOCKNUMBER &amp;&amp; ulStartBlock != END_OF_CHAIN);
-<a name="l00441"></a>00441         fail(aulBBD == NULL);
-<a name="l00442"></a>00442 
-<a name="l00443"></a>00443         ulBeginOfText = ulGetLong(0x18, aucHeader); <span class="comment">/* fcMin */</span>
-<a name="l00444"></a>00444         NO_DBG_HEX(ulBeginOfText);
-<a name="l00445"></a>00445         ulBeginEndnoteInfo = ulGetLong(0x1d2, aucHeader); <span class="comment">/* fcPlcfendRef */</span>
-<a name="l00446"></a>00446         NO_DBG_HEX(ulBeginEndnoteInfo);
-<a name="l00447"></a>00447         tEndnoteInfoLen =
-<a name="l00448"></a>00448                 (size_t)ulGetLong(0x1d6, aucHeader); <span class="comment">/* lcbPlcfendRef */</span>
-<a name="l00449"></a>00449         NO_DBG_DEC(tEndnoteInfoLen);
-<a name="l00450"></a>00450 
-<a name="l00451"></a>00451         <span class="keywordflow">if</span> (tEndnoteInfoLen &lt; 10) {
-<a name="l00452"></a>00452                 DBG_MSG(<span class="stringliteral">&quot;No Endnotes in this document&quot;</span>);
-<a name="l00453"></a>00453                 <span class="keywordflow">return</span>;
-<a name="l00454"></a>00454         }
-<a name="l00455"></a>00455 
-<a name="l00456"></a>00456         aucBuffer = xmalloc(tEndnoteInfoLen);
-<a name="l00457"></a>00457         <span class="keywordflow">if</span> (!bReadBuffer(pFile, ulStartBlock,
-<a name="l00458"></a>00458                         aulBBD, tBBDLen, BIG_BLOCK_SIZE,
-<a name="l00459"></a>00459                         aucBuffer, ulBeginEndnoteInfo, tEndnoteInfoLen)) {
-<a name="l00460"></a>00460                 aucBuffer = xfree(aucBuffer);
-<a name="l00461"></a>00461                 <span class="keywordflow">return</span>;
-<a name="l00462"></a>00462         }
-<a name="l00463"></a>00463         NO_DBG_PRINT_BLOCK(aucBuffer, tEndnoteInfoLen);
-<a name="l00464"></a>00464 
-<a name="l00465"></a>00465         fail(tEndnoteListLength != 0);
-<a name="l00466"></a>00466         tEndnoteListLength = (tEndnoteInfoLen - 4) / 6;
-<a name="l00467"></a>00467         fail(tEndnoteListLength == 0);
-<a name="l00468"></a>00468 
-<a name="l00469"></a>00469         fail(aulEndnoteList != NULL);
-<a name="l00470"></a>00470         aulEndnoteList = xcalloc(tEndnoteListLength, <span class="keyword">sizeof</span>(ULONG));
-<a name="l00471"></a>00471 
-<a name="l00472"></a>00472         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tEndnoteListLength; tIndex++) {
-<a name="l00473"></a>00473                 ulOffset = ulGetLong(tIndex * 4, aucBuffer);
-<a name="l00474"></a>00474                 NO_DBG_HEX(ulOffset);
-<a name="l00475"></a>00475                 ulFileOffset = ulCharPos2FileOffset(ulBeginOfText + ulOffset);
-<a name="l00476"></a>00476                 NO_DBG_HEX(ulFileOffset);
-<a name="l00477"></a>00477                 aulEndnoteList[tIndex] = ulFileOffset;
-<a name="l00478"></a>00478         }
-<a name="l00479"></a>00479         aucBuffer = xfree(aucBuffer);
-<a name="l00480"></a>00480 } <span class="comment">/* end of vGet6EndnotesInfo */</span>
-<a name="l00481"></a>00481 
-<a name="l00482"></a>00482 <span class="comment">/*</span>
-<a name="l00483"></a>00483 <span class="comment"> * Build the lists note information for Word 6/7 files</span>
-<a name="l00484"></a>00484 <span class="comment"> */</span>
-<a name="l00485"></a>00485 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00486"></a>00486 vGet6NotesInfo(FILE *pFile, ULONG ulStartBlock,
-<a name="l00487"></a>00487         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00488"></a>00488         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00489"></a>00489 {
-<a name="l00490"></a>00490         TRACE_MSG(<span class="stringliteral">&quot;vGet6NotesInfo&quot;</span>);
-<a name="l00491"></a>00491 
-<a name="l00492"></a>00492         vGet6FootnotesInfo(pFile, ulStartBlock,
-<a name="l00493"></a>00493                         aulBBD, tBBDLen, aucHeader);
-<a name="l00494"></a>00494         vGet6FootnotesText(pFile, ulStartBlock,
-<a name="l00495"></a>00495                         aulBBD, tBBDLen, aucHeader);
-<a name="l00496"></a>00496         vGet6EndnotesInfo(pFile, ulStartBlock,
-<a name="l00497"></a>00497                         aulBBD, tBBDLen, aucHeader);
-<a name="l00498"></a>00498 } <span class="comment">/* end of vGet6NotesInfo */</span>
-<a name="l00499"></a>00499 
-<a name="l00500"></a>00500 <span class="comment">/*</span>
-<a name="l00501"></a>00501 <span class="comment"> * Build the list with footnote information for Word 8/9/10 files</span>
-<a name="l00502"></a>00502 <span class="comment"> */</span>
-<a name="l00503"></a>00503 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00504"></a>00504 vGet8FootnotesInfo(FILE *pFile, <span class="keyword">const</span> pps_info_type *pPPS,
-<a name="l00505"></a>00505         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00506"></a>00506         <span class="keyword">const</span> ULONG *aulSBD, <span class="keywordtype">size_t</span> tSBDLen,
-<a name="l00507"></a>00507         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00508"></a>00508 {
-<a name="l00509"></a>00509         <span class="keyword">const</span> ULONG     *aulBlockDepot;
-<a name="l00510"></a>00510         UCHAR   *aucBuffer;
-<a name="l00511"></a>00511         ULONG   ulFileOffset, ulBeginOfText, ulOffset, ulBeginFootnoteInfo;
-<a name="l00512"></a>00512         <span class="keywordtype">size_t</span>  tFootnoteInfoLen, tBlockDepotLen, tBlockSize;
-<a name="l00513"></a>00513         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00514"></a>00514 
-<a name="l00515"></a>00515         TRACE_MSG(<span class="stringliteral">&quot;vGet8FootnotesInfo&quot;</span>);
-<a name="l00516"></a>00516 
-<a name="l00517"></a>00517         ulBeginOfText = ulGetLong(0x18, aucHeader); <span class="comment">/* fcMin */</span>
-<a name="l00518"></a>00518         NO_DBG_HEX(ulBeginOfText);
-<a name="l00519"></a>00519         ulBeginFootnoteInfo = ulGetLong(0xaa, aucHeader); <span class="comment">/* fcPlcffndRef */</span>
-<a name="l00520"></a>00520         NO_DBG_HEX(ulBeginFootnoteInfo);
-<a name="l00521"></a>00521         tFootnoteInfoLen =
-<a name="l00522"></a>00522                 (size_t)ulGetLong(0xae, aucHeader); <span class="comment">/* lcbPlcffndRef */</span>
-<a name="l00523"></a>00523         NO_DBG_DEC(tFootnoteInfoLen);
-<a name="l00524"></a>00524 
-<a name="l00525"></a>00525         <span class="keywordflow">if</span> (tFootnoteInfoLen &lt; 10) {
-<a name="l00526"></a>00526                 DBG_MSG(<span class="stringliteral">&quot;No Footnotes in this document&quot;</span>);
-<a name="l00527"></a>00527                 <span class="keywordflow">return</span>;
-<a name="l00528"></a>00528         }
-<a name="l00529"></a>00529 
-<a name="l00530"></a>00530         NO_DBG_DEC(pPPS-&gt;tTable.ulSB);
-<a name="l00531"></a>00531         NO_DBG_HEX(pPPS-&gt;tTable.ulSize);
-<a name="l00532"></a>00532         <span class="keywordflow">if</span> (pPPS-&gt;tTable.ulSize == 0) {
-<a name="l00533"></a>00533                 DBG_MSG(<span class="stringliteral">&quot;No footnotes information&quot;</span>);
-<a name="l00534"></a>00534                 <span class="keywordflow">return</span>;
-<a name="l00535"></a>00535         }
-<a name="l00536"></a>00536 
-<a name="l00537"></a>00537         <span class="keywordflow">if</span> (pPPS-&gt;tTable.ulSize &lt; MIN_SIZE_FOR_BBD_USE) {
-<a name="l00538"></a>00538                 <span class="comment">/* Use the Small Block Depot */</span>
-<a name="l00539"></a>00539                 aulBlockDepot = aulSBD;
-<a name="l00540"></a>00540                 tBlockDepotLen = tSBDLen;
-<a name="l00541"></a>00541                 tBlockSize = SMALL_BLOCK_SIZE;
-<a name="l00542"></a>00542         } <span class="keywordflow">else</span> {
-<a name="l00543"></a>00543                 <span class="comment">/* Use the Big Block Depot */</span>
-<a name="l00544"></a>00544                 aulBlockDepot = aulBBD;
-<a name="l00545"></a>00545                 tBlockDepotLen = tBBDLen;
-<a name="l00546"></a>00546                 tBlockSize = BIG_BLOCK_SIZE;
-<a name="l00547"></a>00547         }
-<a name="l00548"></a>00548         aucBuffer = xmalloc(tFootnoteInfoLen);
-<a name="l00549"></a>00549         <span class="keywordflow">if</span> (!bReadBuffer(pFile, pPPS-&gt;tTable.ulSB,
-<a name="l00550"></a>00550                         aulBlockDepot, tBlockDepotLen, tBlockSize,
-<a name="l00551"></a>00551                         aucBuffer, ulBeginFootnoteInfo, tFootnoteInfoLen)) {
-<a name="l00552"></a>00552                 aucBuffer = xfree(aucBuffer);
-<a name="l00553"></a>00553                 <span class="keywordflow">return</span>;
-<a name="l00554"></a>00554         }
-<a name="l00555"></a>00555         NO_DBG_PRINT_BLOCK(aucBuffer, tFootnoteInfoLen);
-<a name="l00556"></a>00556 
-<a name="l00557"></a>00557         fail(tFootnoteListLength != 0);
-<a name="l00558"></a>00558         tFootnoteListLength = (tFootnoteInfoLen - 4) / 6;
-<a name="l00559"></a>00559         fail(tFootnoteListLength == 0);
-<a name="l00560"></a>00560 
-<a name="l00561"></a>00561         fail(aulFootnoteList != NULL);
-<a name="l00562"></a>00562         aulFootnoteList = xcalloc(tFootnoteListLength, <span class="keyword">sizeof</span>(ULONG));
-<a name="l00563"></a>00563 
-<a name="l00564"></a>00564         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tFootnoteListLength; tIndex++) {
-<a name="l00565"></a>00565                 ulOffset = ulGetLong(tIndex * 4, aucBuffer);
-<a name="l00566"></a>00566                 NO_DBG_HEX(ulOffset);
-<a name="l00567"></a>00567                 ulFileOffset = ulCharPos2FileOffset(ulBeginOfText + ulOffset);
-<a name="l00568"></a>00568                 NO_DBG_HEX(ulFileOffset);
-<a name="l00569"></a>00569                 aulFootnoteList[tIndex] = ulFileOffset;
-<a name="l00570"></a>00570         }
-<a name="l00571"></a>00571         aucBuffer = xfree(aucBuffer);
-<a name="l00572"></a>00572 } <span class="comment">/* end of vGet8FootnotesInfo */</span>
-<a name="l00573"></a>00573 
-<a name="l00574"></a>00574 <span class="comment">/*</span>
-<a name="l00575"></a>00575 <span class="comment"> * Build the list with footnote text information for Word 8/9/10 files</span>
-<a name="l00576"></a>00576 <span class="comment"> */</span>
-<a name="l00577"></a>00577 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00578"></a>00578 vGet8FootnotesText(FILE *pFile, <span class="keyword">const</span> pps_info_type *pPPS,
-<a name="l00579"></a>00579         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00580"></a>00580         <span class="keyword">const</span> ULONG *aulSBD, <span class="keywordtype">size_t</span> tSBDLen,
-<a name="l00581"></a>00581         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00582"></a>00582 {
-<a name="l00583"></a>00583         footnote_local_type     *pCurr;
-<a name="l00584"></a>00584         <span class="keyword">const</span> ULONG     *aulBlockDepot;
-<a name="l00585"></a>00585         UCHAR   *aucBuffer;
-<a name="l00586"></a>00586         ULONG   ulCharPos, ulBeginOfFootnotes, ulOffset, ulBeginFootnoteText;
-<a name="l00587"></a>00587         <span class="keywordtype">size_t</span>  tFootnoteTextLen, tBlockDepotLen, tBlockSize;
-<a name="l00588"></a>00588         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00589"></a>00589 
-<a name="l00590"></a>00590         TRACE_MSG(<span class="stringliteral">&quot;vGet8FootnotesText&quot;</span>);
-<a name="l00591"></a>00591 
-<a name="l00592"></a>00592         ulBeginOfFootnotes = ulGetLong(0x18, aucHeader); <span class="comment">/* fcMin */</span>
-<a name="l00593"></a>00593         ulBeginOfFootnotes += ulGetLong(0x4c, aucHeader); <span class="comment">/* ccpText */</span>
-<a name="l00594"></a>00594         NO_DBG_HEX(ulBeginOfFootnotes);
-<a name="l00595"></a>00595 
-<a name="l00596"></a>00596         ulBeginFootnoteText = ulGetLong(0xb2, aucHeader); <span class="comment">/* fcPlcffndTxt */</span>
-<a name="l00597"></a>00597         NO_DBG_HEX(ulBeginFootnoteText);
-<a name="l00598"></a>00598         tFootnoteTextLen =
-<a name="l00599"></a>00599                 (size_t)ulGetLong(0xb6, aucHeader); <span class="comment">/* lcbPlcffndTxt */</span>
-<a name="l00600"></a>00600         NO_DBG_DEC(tFootnoteTextLen);
-<a name="l00601"></a>00601 
-<a name="l00602"></a>00602         <span class="keywordflow">if</span> (tFootnoteTextLen &lt; 12) {
-<a name="l00603"></a>00603                 DBG_MSG(<span class="stringliteral">&quot;No Footnote text in this document&quot;</span>);
-<a name="l00604"></a>00604                 <span class="keywordflow">return</span>;
-<a name="l00605"></a>00605         }
-<a name="l00606"></a>00606 
-<a name="l00607"></a>00607         NO_DBG_DEC(pPPS-&gt;tTable.ulSB);
-<a name="l00608"></a>00608         NO_DBG_HEX(pPPS-&gt;tTable.ulSize);
-<a name="l00609"></a>00609         <span class="keywordflow">if</span> (pPPS-&gt;tTable.ulSize == 0) {
-<a name="l00610"></a>00610                 DBG_MSG(<span class="stringliteral">&quot;No footnote text information&quot;</span>);
-<a name="l00611"></a>00611                 <span class="keywordflow">return</span>;
-<a name="l00612"></a>00612         }
-<a name="l00613"></a>00613 
-<a name="l00614"></a>00614         <span class="keywordflow">if</span> (pPPS-&gt;tTable.ulSize &lt; MIN_SIZE_FOR_BBD_USE) {
-<a name="l00615"></a>00615                 <span class="comment">/* Use the Small Block Depot */</span>
-<a name="l00616"></a>00616                 aulBlockDepot = aulSBD;
-<a name="l00617"></a>00617                 tBlockDepotLen = tSBDLen;
-<a name="l00618"></a>00618                 tBlockSize = SMALL_BLOCK_SIZE;
-<a name="l00619"></a>00619         } <span class="keywordflow">else</span> {
-<a name="l00620"></a>00620                 <span class="comment">/* Use the Big Block Depot */</span>
-<a name="l00621"></a>00621                 aulBlockDepot = aulBBD;
-<a name="l00622"></a>00622                 tBlockDepotLen = tBBDLen;
-<a name="l00623"></a>00623                 tBlockSize = BIG_BLOCK_SIZE;
-<a name="l00624"></a>00624         }
-<a name="l00625"></a>00625         aucBuffer = xmalloc(tFootnoteTextLen);
-<a name="l00626"></a>00626         <span class="keywordflow">if</span> (!bReadBuffer(pFile, pPPS-&gt;tTable.ulSB,
-<a name="l00627"></a>00627                         aulBlockDepot, tBlockDepotLen, tBlockSize,
-<a name="l00628"></a>00628                         aucBuffer, ulBeginFootnoteText, tFootnoteTextLen)) {
-<a name="l00629"></a>00629                 aucBuffer = xfree(aucBuffer);
-<a name="l00630"></a>00630                 <span class="keywordflow">return</span>;
-<a name="l00631"></a>00631         }
-<a name="l00632"></a>00632         NO_DBG_PRINT_BLOCK(aucBuffer, tFootnoteTextLen);
-<a name="l00633"></a>00633 
-<a name="l00634"></a>00634         fail(tFootnoteTextLength != 0);
-<a name="l00635"></a>00635         tFootnoteTextLength = tFootnoteTextLen / 4 - 2;
-<a name="l00636"></a>00636         fail(tFootnoteTextLength == 0);
-<a name="l00637"></a>00637 
-<a name="l00638"></a>00638         fail(pFootnoteText != NULL);
-<a name="l00639"></a>00639         pFootnoteText = xcalloc(tFootnoteTextLength,
-<a name="l00640"></a>00640                                 <span class="keyword">sizeof</span>(footnote_local_type));
-<a name="l00641"></a>00641 
-<a name="l00642"></a>00642         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tFootnoteTextLength; tIndex++) {
-<a name="l00643"></a>00643                 pCurr = pFootnoteText + tIndex;
-<a name="l00644"></a>00644                 pCurr-&gt;tInfo.szText = NULL;
-<a name="l00645"></a>00645                 ulOffset = ulGetLong(tIndex * 4, aucBuffer);
-<a name="l00646"></a>00646                 NO_DBG_HEX(ulOffset);
-<a name="l00647"></a>00647                 ulCharPos = ulBeginOfFootnotes + ulOffset;
-<a name="l00648"></a>00648                 NO_DBG_HEX(ulCharPos);
-<a name="l00649"></a>00649                 NO_DBG_HEX(ulCharPos2FileOffset(ulCharPos));
-<a name="l00650"></a>00650                 pCurr-&gt;ulCharPosStart = ulCharPos;
-<a name="l00651"></a>00651                 ulOffset = ulGetLong(tIndex * 4 + 4, aucBuffer);
-<a name="l00652"></a>00652                 NO_DBG_HEX(ulOffset);
-<a name="l00653"></a>00653                 ulCharPos = ulBeginOfFootnotes + ulOffset;
-<a name="l00654"></a>00654                 NO_DBG_HEX(ulCharPos);
-<a name="l00655"></a>00655                 NO_DBG_HEX(ulCharPos2FileOffset(ulCharPos));
-<a name="l00656"></a>00656                 pCurr-&gt;ulCharPosNext = ulCharPos;
-<a name="l00657"></a>00657                 pCurr-&gt;bUseful = pCurr-&gt;ulCharPosStart != pCurr-&gt;ulCharPosNext;
-<a name="l00658"></a>00658         }
-<a name="l00659"></a>00659         aucBuffer = xfree(aucBuffer);
-<a name="l00660"></a>00660 } <span class="comment">/* end of vGet8FootnotesText */</span>
-<a name="l00661"></a>00661 
-<a name="l00662"></a>00662 <span class="comment">/*</span>
-<a name="l00663"></a>00663 <span class="comment"> * Build the list with endnote information for Word 8/9/10 files</span>
-<a name="l00664"></a>00664 <span class="comment"> */</span>
-<a name="l00665"></a>00665 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00666"></a>00666 vGet8EndnotesInfo(FILE *pFile, <span class="keyword">const</span> pps_info_type *pPPS,
-<a name="l00667"></a>00667         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00668"></a>00668         <span class="keyword">const</span> ULONG *aulSBD, <span class="keywordtype">size_t</span> tSBDLen,
-<a name="l00669"></a>00669         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00670"></a>00670 {
-<a name="l00671"></a>00671         <span class="keyword">const</span> ULONG     *aulBlockDepot;
-<a name="l00672"></a>00672         UCHAR   *aucBuffer;
-<a name="l00673"></a>00673         ULONG   ulFileOffset, ulBeginOfText, ulOffset, ulBeginEndnoteInfo;
-<a name="l00674"></a>00674         <span class="keywordtype">size_t</span>  tEndnoteInfoLen, tBlockDepotLen, tBlockSize;
-<a name="l00675"></a>00675         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00676"></a>00676 
-<a name="l00677"></a>00677         TRACE_MSG(<span class="stringliteral">&quot;vGet8EndnotesInfo&quot;</span>);
-<a name="l00678"></a>00678 
-<a name="l00679"></a>00679         ulBeginOfText = ulGetLong(0x18, aucHeader); <span class="comment">/* fcMin */</span>
-<a name="l00680"></a>00680         NO_DBG_HEX(ulBeginOfText);
-<a name="l00681"></a>00681         ulBeginEndnoteInfo = ulGetLong(0x20a, aucHeader); <span class="comment">/* fcPlcfendRef */</span>
-<a name="l00682"></a>00682         NO_DBG_HEX(ulBeginEndnoteInfo);
-<a name="l00683"></a>00683         tEndnoteInfoLen = (size_t)ulGetLong(0x20e, aucHeader); <span class="comment">/* lcbPlcfendRef */</span>
-<a name="l00684"></a>00684         NO_DBG_DEC(tEndnoteInfoLen);
-<a name="l00685"></a>00685 
-<a name="l00686"></a>00686         <span class="keywordflow">if</span> (tEndnoteInfoLen &lt; 10) {
-<a name="l00687"></a>00687                 DBG_MSG(<span class="stringliteral">&quot;No endnotes in this document&quot;</span>);
-<a name="l00688"></a>00688                 <span class="keywordflow">return</span>;
-<a name="l00689"></a>00689         }
-<a name="l00690"></a>00690 
-<a name="l00691"></a>00691         NO_DBG_DEC(pPPS-&gt;tTable.ulSB);
-<a name="l00692"></a>00692         NO_DBG_HEX(pPPS-&gt;tTable.ulSize);
-<a name="l00693"></a>00693         <span class="keywordflow">if</span> (pPPS-&gt;tTable.ulSize == 0) {
-<a name="l00694"></a>00694                 DBG_MSG(<span class="stringliteral">&quot;No endnotes information&quot;</span>);
-<a name="l00695"></a>00695                 <span class="keywordflow">return</span>;
-<a name="l00696"></a>00696         }
-<a name="l00697"></a>00697 
-<a name="l00698"></a>00698         <span class="keywordflow">if</span> (pPPS-&gt;tTable.ulSize &lt; MIN_SIZE_FOR_BBD_USE) {
-<a name="l00699"></a>00699                 <span class="comment">/* Use the Small Block Depot */</span>
-<a name="l00700"></a>00700                 aulBlockDepot = aulSBD;
-<a name="l00701"></a>00701                 tBlockDepotLen = tSBDLen;
-<a name="l00702"></a>00702                 tBlockSize = SMALL_BLOCK_SIZE;
-<a name="l00703"></a>00703         } <span class="keywordflow">else</span> {
-<a name="l00704"></a>00704                 <span class="comment">/* Use the Big Block Depot */</span>
-<a name="l00705"></a>00705                 aulBlockDepot = aulBBD;
-<a name="l00706"></a>00706                 tBlockDepotLen = tBBDLen;
-<a name="l00707"></a>00707                 tBlockSize = BIG_BLOCK_SIZE;
-<a name="l00708"></a>00708         }
-<a name="l00709"></a>00709         aucBuffer = xmalloc(tEndnoteInfoLen);
-<a name="l00710"></a>00710         <span class="keywordflow">if</span> (!bReadBuffer(pFile, pPPS-&gt;tTable.ulSB,
-<a name="l00711"></a>00711                         aulBlockDepot, tBlockDepotLen, tBlockSize,
-<a name="l00712"></a>00712                         aucBuffer, ulBeginEndnoteInfo, tEndnoteInfoLen)) {
-<a name="l00713"></a>00713                 aucBuffer = xfree(aucBuffer);
-<a name="l00714"></a>00714                 <span class="keywordflow">return</span>;
-<a name="l00715"></a>00715         }
-<a name="l00716"></a>00716         NO_DBG_PRINT_BLOCK(aucBuffer, tEndnoteInfoLen);
-<a name="l00717"></a>00717 
-<a name="l00718"></a>00718         fail(tEndnoteListLength != 0);
-<a name="l00719"></a>00719         tEndnoteListLength = (tEndnoteInfoLen - 4) / 6;
-<a name="l00720"></a>00720         fail(tEndnoteListLength == 0);
-<a name="l00721"></a>00721 
-<a name="l00722"></a>00722         fail(aulEndnoteList != NULL);
-<a name="l00723"></a>00723         aulEndnoteList = xcalloc(tEndnoteListLength, <span class="keyword">sizeof</span>(ULONG));
-<a name="l00724"></a>00724 
-<a name="l00725"></a>00725         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tEndnoteListLength; tIndex++) {
-<a name="l00726"></a>00726                 ulOffset = ulGetLong(tIndex * 4, aucBuffer);
-<a name="l00727"></a>00727                 NO_DBG_HEX(ulOffset);
-<a name="l00728"></a>00728                 ulFileOffset = ulCharPos2FileOffset(ulBeginOfText + ulOffset);
-<a name="l00729"></a>00729                 NO_DBG_HEX(ulFileOffset);
-<a name="l00730"></a>00730                 aulEndnoteList[tIndex] = ulFileOffset;
-<a name="l00731"></a>00731         }
-<a name="l00732"></a>00732         aucBuffer = xfree(aucBuffer);
-<a name="l00733"></a>00733 } <span class="comment">/* end of vGet8EndnotesInfo */</span>
-<a name="l00734"></a>00734 
-<a name="l00735"></a>00735 <span class="comment">/*</span>
-<a name="l00736"></a>00736 <span class="comment"> * Build the lists with footnote and endnote information for Word 8/9/10 files</span>
-<a name="l00737"></a>00737 <span class="comment"> */</span>
-<a name="l00738"></a>00738 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00739"></a>00739 vGet8NotesInfo(FILE *pFile, <span class="keyword">const</span> pps_info_type *pPPS,
-<a name="l00740"></a>00740         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00741"></a>00741         <span class="keyword">const</span> ULONG *aulSBD, <span class="keywordtype">size_t</span> tSBDLen,
-<a name="l00742"></a>00742         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00743"></a>00743 {
-<a name="l00744"></a>00744         TRACE_MSG(<span class="stringliteral">&quot;vGet8NotesInfo&quot;</span>);
-<a name="l00745"></a>00745 
-<a name="l00746"></a>00746         vGet8FootnotesInfo(pFile, pPPS,
-<a name="l00747"></a>00747                         aulBBD, tBBDLen, aulSBD, tSBDLen, aucHeader);
-<a name="l00748"></a>00748         vGet8FootnotesText(pFile, pPPS,
-<a name="l00749"></a>00749                         aulBBD, tBBDLen, aulSBD, tSBDLen, aucHeader);
-<a name="l00750"></a>00750         vGet8EndnotesInfo(pFile, pPPS,
-<a name="l00751"></a>00751                         aulBBD, tBBDLen, aulSBD, tSBDLen, aucHeader);
-<a name="l00752"></a>00752 } <span class="comment">/* end of vGet8NotesInfo */</span>
-<a name="l00753"></a>00753 
-<a name="l00754"></a>00754 <span class="comment">/*</span>
-<a name="l00755"></a>00755 <span class="comment"> * Build the lists with footnote and endnote information</span>
-<a name="l00756"></a>00756 <span class="comment"> */</span>
-<a name="l00757"></a>00757 <span class="keywordtype">void</span>
-<a name="l00758"></a>00758 vGetNotesInfo(FILE *pFile, <span class="keyword">const</span> pps_info_type *pPPS,
-<a name="l00759"></a>00759         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00760"></a>00760         <span class="keyword">const</span> ULONG *aulSBD, <span class="keywordtype">size_t</span> tSBDLen,
-<a name="l00761"></a>00761         <span class="keyword">const</span> UCHAR *aucHeader, <span class="keywordtype">int</span> iWordVersion)
-<a name="l00762"></a>00762 {
-<a name="l00763"></a>00763         TRACE_MSG(<span class="stringliteral">&quot;vGetNotesInfo&quot;</span>);
-<a name="l00764"></a>00764 
-<a name="l00765"></a>00765         fail(pFile == NULL);
-<a name="l00766"></a>00766         fail(pPPS == NULL &amp;&amp; iWordVersion &gt;= 6);
-<a name="l00767"></a>00767         fail(aulBBD == NULL &amp;&amp; tBBDLen != 0);
-<a name="l00768"></a>00768         fail(aulSBD == NULL &amp;&amp; tSBDLen != 0);
-<a name="l00769"></a>00769         fail(aucHeader == NULL);
-<a name="l00770"></a>00770 
-<a name="l00771"></a>00771         <span class="keywordflow">switch</span> (iWordVersion) {
-<a name="l00772"></a>00772         <span class="keywordflow">case</span> 0:
-<a name="l00773"></a>00773                 vGet0NotesInfo(pFile, aucHeader);
-<a name="l00774"></a>00774                 <span class="keywordflow">break</span>;
-<a name="l00775"></a>00775         <span class="keywordflow">case</span> 1:
-<a name="l00776"></a>00776         <span class="keywordflow">case</span> 2:
-<a name="l00777"></a>00777                 vGet2NotesInfo(pFile, aucHeader);
-<a name="l00778"></a>00778                 <span class="keywordflow">break</span>;
-<a name="l00779"></a>00779         <span class="keywordflow">case</span> 4:
-<a name="l00780"></a>00780         <span class="keywordflow">case</span> 5:
-<a name="l00781"></a>00781                 <span class="keywordflow">break</span>;
-<a name="l00782"></a>00782         <span class="keywordflow">case</span> 6:
-<a name="l00783"></a>00783         <span class="keywordflow">case</span> 7:
-<a name="l00784"></a>00784                 vGet6NotesInfo(pFile, pPPS-&gt;tWordDocument.ulSB,
-<a name="l00785"></a>00785                         aulBBD, tBBDLen, aucHeader);
-<a name="l00786"></a>00786                 <span class="keywordflow">break</span>;
-<a name="l00787"></a>00787         <span class="keywordflow">case</span> 8:
-<a name="l00788"></a>00788                 vGet8NotesInfo(pFile, pPPS,
-<a name="l00789"></a>00789                         aulBBD, tBBDLen, aulSBD, tSBDLen, aucHeader);
-<a name="l00790"></a>00790                 <span class="keywordflow">break</span>;
-<a name="l00791"></a>00791         <span class="keywordflow">default</span>:
-<a name="l00792"></a>00792                 werr(0, <span class="stringliteral">&quot;Sorry, no notes information&quot;</span>);
-<a name="l00793"></a>00793                 <span class="keywordflow">break</span>;
-<a name="l00794"></a>00794         }
-<a name="l00795"></a>00795 } <span class="comment">/* end of vGetNotesInfo */</span>
-<a name="l00796"></a>00796 
-<a name="l00797"></a>00797 <span class="comment">/*</span>
-<a name="l00798"></a>00798 <span class="comment"> *  vPrepareFootnoteText - prepare the footnote text</span>
-<a name="l00799"></a>00799 <span class="comment"> */</span>
-<a name="l00800"></a>00800 <span class="keywordtype">void</span>
-<a name="l00801"></a>00801 vPrepareFootnoteText(FILE *pFile)
-<a name="l00802"></a>00802 { 
-<a name="l00803"></a>00803         footnote_local_type     *pCurr;
-<a name="l00804"></a>00804         <span class="keywordtype">size_t</span>          tFootnote;
-<a name="l00805"></a>00805 
-<a name="l00806"></a>00806         fail(pFile == NULL);
-<a name="l00807"></a>00807         fail(pFootnoteText == NULL &amp;&amp; tFootnoteTextLength != 0);
-<a name="l00808"></a>00808 
-<a name="l00809"></a>00809         <span class="keywordflow">if</span> (pFootnoteText == NULL || tFootnoteTextLength == 0) {
-<a name="l00810"></a>00810                 <span class="comment">/* No information */</span>
-<a name="l00811"></a>00811                 <span class="keywordflow">return</span>;
-<a name="l00812"></a>00812         }
-<a name="l00813"></a>00813 
-<a name="l00814"></a>00814         <span class="comment">/* Fill text and useful-ness */</span>
-<a name="l00815"></a>00815         <span class="keywordflow">for</span> (tFootnote = 0; tFootnote &lt; tFootnoteTextLength; tFootnote++) {
-<a name="l00816"></a>00816                 pCurr = pFootnoteText + tFootnote;
-<a name="l00817"></a>00817                 pCurr-&gt;bUseful = pCurr-&gt;ulCharPosStart != pCurr-&gt;ulCharPosNext;
-<a name="l00818"></a>00818                 <span class="keywordflow">if</span> (pCurr-&gt;bUseful) {
-<a name="l00819"></a>00819                         pCurr-&gt;tInfo.szText = szFootnoteDecryptor(pFile,
-<a name="l00820"></a>00820                                                         pCurr-&gt;ulCharPosStart,
-<a name="l00821"></a>00821                                                         pCurr-&gt;ulCharPosNext);
-<a name="l00822"></a>00822                 } <span class="keywordflow">else</span> {
-<a name="l00823"></a>00823                         pCurr-&gt;tInfo.szText = NULL;
-<a name="l00824"></a>00824                 }
-<a name="l00825"></a>00825         }
-<a name="l00826"></a>00826 } <span class="comment">/* end of vPrepareFootnoteText */</span>
-<a name="l00827"></a>00827 
-<a name="l00828"></a>00828 <span class="comment">/*</span>
-<a name="l00829"></a>00829 <span class="comment"> * szGetFootnootText - get the text of the spefified footnote</span>
-<a name="l00830"></a>00830 <span class="comment"> */</span>
-<a name="l00831"></a>00831 <span class="keyword">const</span> <span class="keywordtype">char</span> *
-<a name="l00832"></a>00832 szGetFootnootText(UINT uiFootnoteIndex)
-<a name="l00833"></a>00833 {
-<a name="l00834"></a>00834         <span class="keywordflow">if</span> ((<span class="keywordtype">size_t</span>)uiFootnoteIndex &gt;= tFootnoteTextLength) {
-<a name="l00835"></a>00835                 <span class="keywordflow">return</span> NULL;
-<a name="l00836"></a>00836         }
-<a name="l00837"></a>00837         <span class="keywordflow">return</span> pFootnoteText[uiFootnoteIndex].tInfo.szText;
-<a name="l00838"></a>00838 } <span class="comment">/* end of szGetFootnootText */</span>
-<a name="l00839"></a>00839 
-<a name="l00840"></a>00840 <span class="comment">/*</span>
-<a name="l00841"></a>00841 <span class="comment"> * Get the notetype of the note at the given fileoffset</span>
-<a name="l00842"></a>00842 <span class="comment"> */</span>
-<a name="l00843"></a>00843 notetype_enum
-<a name="l00844"></a>00844 eGetNotetype(ULONG ulFileOffset)
-<a name="l00845"></a>00845 {
-<a name="l00846"></a>00846         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00847"></a>00847 
-<a name="l00848"></a>00848         TRACE_MSG(<span class="stringliteral">&quot;eGetNotetype&quot;</span>);
-<a name="l00849"></a>00849 
-<a name="l00850"></a>00850         fail(aulFootnoteList == NULL &amp;&amp; tFootnoteListLength != 0);
-<a name="l00851"></a>00851         fail(aulEndnoteList == NULL &amp;&amp; tEndnoteListLength != 0);
-<a name="l00852"></a>00852 
-<a name="l00853"></a>00853         <span class="comment">/* Go for the easy answers first */</span>
-<a name="l00854"></a>00854         <span class="keywordflow">if</span> (tFootnoteListLength == 0 &amp;&amp; tEndnoteListLength == 0) {
-<a name="l00855"></a>00855                 <span class="keywordflow">return</span> notetype_is_unknown;
-<a name="l00856"></a>00856         }
-<a name="l00857"></a>00857         <span class="keywordflow">if</span> (tEndnoteListLength == 0) {
-<a name="l00858"></a>00858                 <span class="keywordflow">return</span> notetype_is_footnote;
-<a name="l00859"></a>00859         }
-<a name="l00860"></a>00860         <span class="keywordflow">if</span> (tFootnoteListLength == 0) {
-<a name="l00861"></a>00861                 <span class="keywordflow">return</span> notetype_is_endnote;
-<a name="l00862"></a>00862         }
-<a name="l00863"></a>00863         <span class="comment">/* No easy answer, so we search */</span>
-<a name="l00864"></a>00864         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tFootnoteListLength; tIndex++) {
-<a name="l00865"></a>00865                 <span class="keywordflow">if</span> (aulFootnoteList[tIndex] == ulFileOffset) {
-<a name="l00866"></a>00866                         <span class="keywordflow">return</span> notetype_is_footnote;
-<a name="l00867"></a>00867                 }
-<a name="l00868"></a>00868         }
-<a name="l00869"></a>00869         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tEndnoteListLength; tIndex++) {
-<a name="l00870"></a>00870                 <span class="keywordflow">if</span> (aulEndnoteList[tIndex] == ulFileOffset) {
-<a name="l00871"></a>00871                         <span class="keywordflow">return</span> notetype_is_endnote;
-<a name="l00872"></a>00872                 }
-<a name="l00873"></a>00873         }
-<a name="l00874"></a>00874         <span class="comment">/* Not found */</span>
-<a name="l00875"></a>00875         <span class="keywordflow">return</span> notetype_is_unknown;
-<a name="l00876"></a>00876 } <span class="comment">/* end of eGetNotetype */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/options_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,978 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/options.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/options.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * options.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2004 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Read and write the options</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00012"></a>00012 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00013"></a>00013 <span class="preprocessor"></span><span class="preprocessor">#include &quot;DeskLib:Error.h&quot;</span>
-<a name="l00014"></a>00014 <span class="preprocessor">#include &quot;DeskLib:Wimp.h&quot;</span>
-<a name="l00015"></a>00015 <span class="preprocessor">#else</span>
-<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00017"></a>00017 <span class="preprocessor">#if defined(__dos) || defined(N_PLAT_NLM)</span>
-<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="keywordtype">int</span> getopt(<span class="keywordtype">int</span>, <span class="keywordtype">char</span> **, <span class="keyword">const</span> <span class="keywordtype">char</span> *);
-<a name="l00019"></a>00019 <span class="preprocessor">#else</span>
-<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#include &lt;unistd.h&gt;</span>
-<a name="l00021"></a>00021 <span class="preprocessor">#endif </span><span class="comment">/* __dos */</span>
-<a name="l00022"></a>00022 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00023"></a>00023 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00024"></a>00024 
-<a name="l00025"></a>00025 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define PARAGRAPH_BREAK         &quot;set paragraph_break=%d&quot;</span>
-<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define AUTOFILETYPE            &quot;set autofiletype_allowed=%d&quot;</span>
-<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#define USE_OUTLINEFONTS        &quot;set use_outlinefonts=%d&quot;</span>
-<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define SHOW_IMAGES             &quot;set show_images=%d&quot;</span>
-<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define HIDE_HIDDEN_TEXT        &quot;set hide_hidden_text=%d&quot;</span>
-<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#define SCALE_FACTOR_START      &quot;set scale_factor_start=%d&quot;</span>
-<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#define LEAFNAME_SIZE           (32+1)</span>
-<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00035"></a>00035 
-<a name="l00036"></a>00036 <span class="comment">/* Current values for options */</span>
-<a name="l00037"></a>00037 <span class="keyword">static</span> options_type     tOptionsCurr;
-<a name="l00038"></a>00038 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="comment">/* Temporary values for options */</span>
-<a name="l00040"></a>00040 <span class="keyword">static</span> options_type     tOptionsTemp;
-<a name="l00041"></a>00041 <span class="preprocessor">#else</span>
-<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keyword">struct </span>papersize_tag {
-<a name="l00043"></a>00043         <span class="keywordtype">char</span>    szName[16];     <span class="comment">/* Papersize name */</span>
-<a name="l00044"></a>00044         USHORT  usWidth;        <span class="comment">/* In points */</span>
-<a name="l00045"></a>00045         USHORT  usHeight;       <span class="comment">/* In points */</span>
-<a name="l00046"></a>00046 } papersize_type;
-<a name="l00047"></a>00047 
-<a name="l00048"></a>00048 <span class="keyword">static</span> <span class="keyword">const</span> papersize_type atPaperSizes[] = {
-<a name="l00049"></a>00049         {       <span class="stringliteral">&quot;10x14&quot;</span>,         720,   1008    },
-<a name="l00050"></a>00050         {       <span class="stringliteral">&quot;a3&quot;</span>,            842,   1191    },
-<a name="l00051"></a>00051         {       <span class="stringliteral">&quot;a4&quot;</span>,            595,    842    },
-<a name="l00052"></a>00052         {       <span class="stringliteral">&quot;a5&quot;</span>,            420,    595    },
-<a name="l00053"></a>00053         {       <span class="stringliteral">&quot;b4&quot;</span>,            729,   1032    },
-<a name="l00054"></a>00054         {       <span class="stringliteral">&quot;b5&quot;</span>,            516,    729    },
-<a name="l00055"></a>00055         {       <span class="stringliteral">&quot;executive&quot;</span>,     540,    720    },
-<a name="l00056"></a>00056         {       <span class="stringliteral">&quot;folio&quot;</span>,         612,    936    },
-<a name="l00057"></a>00057         {       <span class="stringliteral">&quot;legal&quot;</span>,         612,   1008    },
-<a name="l00058"></a>00058         {       <span class="stringliteral">&quot;letter&quot;</span>,        612,    792    },
-<a name="l00059"></a>00059         {       <span class="stringliteral">&quot;note&quot;</span>,          540,    720    },
-<a name="l00060"></a>00060         {       <span class="stringliteral">&quot;quarto&quot;</span>,        610,    780    },
-<a name="l00061"></a>00061         {       <span class="stringliteral">&quot;statement&quot;</span>,     396,    612    },
-<a name="l00062"></a>00062         {       <span class="stringliteral">&quot;tabloid&quot;</span>,       792,   1224    },
-<a name="l00063"></a>00063         {       <span class="stringliteral">&quot;&quot;</span>,                0,      0    },
-<a name="l00064"></a>00064 };
-<a name="l00065"></a>00065 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00066"></a>00066 <span class="comment">/* Default values for options */</span>
-<a name="l00067"></a>00067 <span class="keyword">static</span> <span class="keyword">const</span> options_type       tOptionsDefault = {
-<a name="l00068"></a>00068         DEFAULT_SCREEN_WIDTH,
-<a name="l00069"></a>00069 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00070"></a>00070 <span class="preprocessor"></span>        conversion_draw,
-<a name="l00071"></a>00071 <span class="preprocessor">#else</span>
-<a name="l00072"></a>00072 <span class="preprocessor"></span>        conversion_text,
-<a name="l00073"></a>00073 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00074"></a>00074         TRUE,
-<a name="l00075"></a>00075         TRUE,
-<a name="l00076"></a>00076         FALSE,
-<a name="l00077"></a>00077         encoding_latin_1,
-<a name="l00078"></a>00078         INT_MAX,
-<a name="l00079"></a>00079         INT_MAX,
-<a name="l00080"></a>00080         level_default,
-<a name="l00081"></a>00081 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00082"></a>00082 <span class="preprocessor"></span>        TRUE,
-<a name="l00083"></a>00083         DEFAULT_SCALE_FACTOR,
-<a name="l00084"></a>00084 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00085"></a>00085 };
-<a name="l00086"></a>00086 
-<a name="l00087"></a>00087 
-<a name="l00088"></a>00088 <span class="preprocessor">#if !defined(__riscos)</span>
-<a name="l00089"></a>00089 <span class="preprocessor"></span><span class="comment">/*</span>
-<a name="l00090"></a>00090 <span class="comment"> * bCorrectPapersize - see if the papersize is correct</span>
-<a name="l00091"></a>00091 <span class="comment"> *</span>
-<a name="l00092"></a>00092 <span class="comment"> * TRUE if the papersize is correct, otherwise FALSE</span>
-<a name="l00093"></a>00093 <span class="comment"> */</span>
-<a name="l00094"></a>00094 <span class="keyword">static</span> BOOL
-<a name="l00095"></a>00095 bCorrectPapersize(<span class="keyword">const</span> <span class="keywordtype">char</span> *szName, conversion_type eConversionType)
-<a name="l00096"></a>00096 {
-<a name="l00097"></a>00097         <span class="keyword">const</span> papersize_type    *pPaperSize;
-<a name="l00098"></a>00098 
-<a name="l00099"></a>00099         <span class="keywordflow">for</span> (pPaperSize = atPaperSizes;
-<a name="l00100"></a>00100              pPaperSize-&gt;szName[0] != <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00101"></a>00101              pPaperSize++) {
-<a name="l00102"></a>00102                 <span class="keywordflow">if</span> (!STRCEQ(pPaperSize-&gt;szName,  szName)) {
-<a name="l00103"></a>00103                         <span class="keywordflow">continue</span>;
-<a name="l00104"></a>00104                 }
-<a name="l00105"></a>00105                 DBG_DEC(pPaperSize-&gt;usWidth);
-<a name="l00106"></a>00106                 DBG_DEC(pPaperSize-&gt;usHeight);
-<a name="l00107"></a>00107                 tOptionsCurr.eConversionType = eConversionType;
-<a name="l00108"></a>00108                 tOptionsCurr.iPageHeight = (int)pPaperSize-&gt;usHeight;
-<a name="l00109"></a>00109                 tOptionsCurr.iPageWidth = (<span class="keywordtype">int</span>)pPaperSize-&gt;usWidth;
-<a name="l00110"></a>00110                 <span class="keywordflow">return</span> TRUE;
-<a name="l00111"></a>00111         }
-<a name="l00112"></a>00112         <span class="keywordflow">return</span> FALSE;
-<a name="l00113"></a>00113 } <span class="comment">/* end of bCorrectPapersize */</span>
-<a name="l00114"></a>00114 
-<a name="l00115"></a>00115 <span class="comment">/*</span>
-<a name="l00116"></a>00116 <span class="comment"> * szCreateSuffix - create a suffix for the file</span>
-<a name="l00117"></a>00117 <span class="comment"> *</span>
-<a name="l00118"></a>00118 <span class="comment"> * Returns the suffix</span>
-<a name="l00119"></a>00119 <span class="comment"> */</span>
-<a name="l00120"></a>00120 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *
-<a name="l00121"></a>00121 szCreateSuffix(<span class="keyword">const</span> <span class="keywordtype">char</span> *szLeafname)
-<a name="l00122"></a>00122 {
-<a name="l00123"></a>00123         <span class="keyword">const</span> <span class="keywordtype">char</span>      *pcDot;
-<a name="l00124"></a>00124 
-<a name="l00125"></a>00125         pcDot = strrchr(szLeafname, <span class="charliteral">&#39;.&#39;</span>);
-<a name="l00126"></a>00126         <span class="keywordflow">if</span> (pcDot != NULL &amp;&amp; STRCEQ(pcDot, <span class="stringliteral">&quot;.txt&quot;</span>)) {
-<a name="l00127"></a>00127                 <span class="comment">/* There is already a .txt suffix, no need for another one */</span>
-<a name="l00128"></a>00128                 <span class="keywordflow">return</span> <span class="stringliteral">&quot;&quot;</span>;
-<a name="l00129"></a>00129         }
-<a name="l00130"></a>00130         <span class="keywordflow">return</span> <span class="stringliteral">&quot;.txt&quot;</span>;
-<a name="l00131"></a>00131 } <span class="comment">/* end of szCreateSuffix */</span>
-<a name="l00132"></a>00132 
-<a name="l00133"></a>00133 <span class="comment">/*</span>
-<a name="l00134"></a>00134 <span class="comment"> * eMappingFile2Encoding - convert the mapping file to an encoding</span>
-<a name="l00135"></a>00135 <span class="comment"> */</span>
-<a name="l00136"></a>00136 <span class="keyword">static</span> encoding_type
-<a name="l00137"></a>00137 eMappingFile2Encoding(<span class="keyword">const</span> <span class="keywordtype">char</span> *szLeafname)
-<a name="l00138"></a>00138 {
-<a name="l00139"></a>00139         <span class="keywordtype">char</span>    szMappingFile[LEAFNAME_SIZE+4];
-<a name="l00140"></a>00140 
-<a name="l00141"></a>00141         fail(szLeafname == NULL);
-<a name="l00142"></a>00142 
-<a name="l00143"></a>00143         <span class="keywordflow">if</span> (strlen(szLeafname) + 4 &gt;= <span class="keyword">sizeof</span>(szMappingFile)) {
-<a name="l00144"></a>00144                 DBG_MSG(szLeafname);
-<a name="l00145"></a>00145                 <span class="keywordflow">return</span> encoding_latin_1;
-<a name="l00146"></a>00146         }
-<a name="l00147"></a>00147 
-<a name="l00148"></a>00148         sprintf(szMappingFile, <span class="stringliteral">&quot;%s%s&quot;</span>, szLeafname, szCreateSuffix(szLeafname));
-<a name="l00149"></a>00149 
-<a name="l00150"></a>00150         DBG_MSG(szMappingFile);
-<a name="l00151"></a>00151 
-<a name="l00152"></a>00152         <span class="keywordflow">if</span> (STRCEQ(szMappingFile, MAPPING_FILE_UTF_8)) {
-<a name="l00153"></a>00153                 <span class="keywordflow">return</span> encoding_utf_8;
-<a name="l00154"></a>00154         }
-<a name="l00155"></a>00155         <span class="keywordflow">if</span> (STRCEQ(szMappingFile, MAPPING_FILE_CP852) ||
-<a name="l00156"></a>00156             STRCEQ(szMappingFile, MAPPING_FILE_CP1250) ||
-<a name="l00157"></a>00157             STRCEQ(szMappingFile, MAPPING_FILE_8859_2)) {
-<a name="l00158"></a>00158                 <span class="keywordflow">return</span> encoding_latin_2;
-<a name="l00159"></a>00159         }
-<a name="l00160"></a>00160         <span class="keywordflow">if</span> (STRCEQ(szMappingFile, MAPPING_FILE_KOI8_R) ||
-<a name="l00161"></a>00161             STRCEQ(szMappingFile, MAPPING_FILE_KOI8_U) ||
-<a name="l00162"></a>00162             STRCEQ(szMappingFile, MAPPING_FILE_CP866) ||
-<a name="l00163"></a>00163             STRCEQ(szMappingFile, MAPPING_FILE_CP1251) ||
-<a name="l00164"></a>00164             STRCEQ(szMappingFile, MAPPING_FILE_8859_5)) {
-<a name="l00165"></a>00165                 <span class="keywordflow">return</span> encoding_cyrillic;
-<a name="l00166"></a>00166         }
-<a name="l00167"></a>00167         <span class="keywordflow">return</span> encoding_latin_1;
-<a name="l00168"></a>00168 } <span class="comment">/* end of eMappingFile2Encoding */</span>
-<a name="l00169"></a>00169 <span class="preprocessor">#endif </span><span class="comment">/* !__riscos */</span>
-<a name="l00170"></a>00170 
-<a name="l00171"></a>00171 <span class="comment">/*</span>
-<a name="l00172"></a>00172 <span class="comment"> * pOpenCharacterMappingFile - open the mapping file</span>
-<a name="l00173"></a>00173 <span class="comment"> *</span>
-<a name="l00174"></a>00174 <span class="comment"> * Returns the file pointer or NULL</span>
-<a name="l00175"></a>00175 <span class="comment"> */</span>
-<a name="l00176"></a>00176 <span class="keyword">static</span> FILE *
-<a name="l00177"></a>00177 pOpenCharacterMappingFile(<span class="keyword">const</span> <span class="keywordtype">char</span> *szLeafname)
-<a name="l00178"></a>00178 {
-<a name="l00179"></a>00179 <span class="preprocessor">#if !defined(__riscos)</span>
-<a name="l00180"></a>00180 <span class="preprocessor"></span>        FILE    *pFile;
-<a name="l00181"></a>00181         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szHome, *szAntiword, *szSuffix;
-<a name="l00182"></a>00182         <span class="keywordtype">size_t</span>  tFilenameLen;
-<a name="l00183"></a>00183         <span class="keywordtype">char</span>    szMappingFile[PATH_MAX+1];
-<a name="l00184"></a>00184 <span class="preprocessor">#endif </span><span class="comment">/* !__riscos */</span>
-<a name="l00185"></a>00185 
-<a name="l00186"></a>00186         <span class="keywordflow">if</span> (szLeafname == NULL || szLeafname[0] == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00187"></a>00187                 <span class="keywordflow">return</span> NULL;
-<a name="l00188"></a>00188         }
-<a name="l00189"></a>00189 
-<a name="l00190"></a>00190         DBG_MSG(szLeafname);
-<a name="l00191"></a>00191 
-<a name="l00192"></a>00192 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00193"></a>00193 <span class="preprocessor"></span>        <span class="keywordflow">return</span> fopen(szLeafname, <span class="stringliteral">&quot;r&quot;</span>);
-<a name="l00194"></a>00194 <span class="preprocessor">#else</span>
-<a name="l00195"></a>00195 <span class="preprocessor"></span>        <span class="comment">/* Set the suffix */</span>
-<a name="l00196"></a>00196         szSuffix = szCreateSuffix(szLeafname);
-<a name="l00197"></a>00197 
-<a name="l00198"></a>00198         <span class="comment">/* Set length */</span>
-<a name="l00199"></a>00199         tFilenameLen = strlen(szLeafname) + strlen(szSuffix);
-<a name="l00200"></a>00200 
-<a name="l00201"></a>00201         <span class="comment">/* Try the environment version of the mapping file */</span>
-<a name="l00202"></a>00202         szAntiword = szGetAntiwordDirectory();
-<a name="l00203"></a>00203         <span class="keywordflow">if</span> (szAntiword != NULL &amp;&amp; szAntiword[0] != <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00204"></a>00204             <span class="keywordflow">if</span> (strlen(szAntiword) + tFilenameLen &lt;
-<a name="l00205"></a>00205                 <span class="keyword">sizeof</span>(szMappingFile) -
-<a name="l00206"></a>00206                 <span class="keyword">sizeof</span>(FILE_SEPARATOR)) {
-<a name="l00207"></a>00207                         sprintf(szMappingFile,
-<a name="l00208"></a>00208                                 <span class="stringliteral">&quot;%s&quot;</span> FILE_SEPARATOR <span class="stringliteral">&quot;%s%s&quot;</span>,
-<a name="l00209"></a>00209                                 szAntiword, szLeafname, szSuffix);
-<a name="l00210"></a>00210                         DBG_MSG(szMappingFile);
-<a name="l00211"></a>00211                         pFile = fopen(szMappingFile, <span class="stringliteral">&quot;r&quot;</span>);
-<a name="l00212"></a>00212                         <span class="keywordflow">if</span> (pFile != NULL) {
-<a name="l00213"></a>00213                                 <span class="keywordflow">return</span> pFile;
-<a name="l00214"></a>00214                         }
-<a name="l00215"></a>00215                 } <span class="keywordflow">else</span> {
-<a name="l00216"></a>00216                         werr(0, <span class="stringliteral">&quot;Environment mappingfilename ignored&quot;</span>);
-<a name="l00217"></a>00217                 }
-<a name="l00218"></a>00218         }
-<a name="l00219"></a>00219 
-<a name="l00220"></a>00220         <span class="comment">/* Try the local version of the mapping file */</span>
-<a name="l00221"></a>00221         szHome = szGetHomeDirectory();
-<a name="l00222"></a>00222         <span class="keywordflow">if</span> (strlen(szHome) + tFilenameLen &lt;
-<a name="l00223"></a>00223             <span class="keyword">sizeof</span>(szMappingFile) -
-<a name="l00224"></a>00224             <span class="keyword">sizeof</span>(ANTIWORD_DIR) -
-<a name="l00225"></a>00225             2 * <span class="keyword">sizeof</span>(FILE_SEPARATOR)) {
-<a name="l00226"></a>00226 <span class="preprocessor">                #ifndef SYMBIAN</span>
-<a name="l00227"></a>00227 <span class="preprocessor"></span>                sprintf(szMappingFile,
-<a name="l00228"></a>00228                         <span class="stringliteral">&quot;%s%s%s&quot;</span>,
-<a name="l00229"></a>00229                         szHome, szLeafname, szSuffix);
-<a name="l00230"></a>00230 <span class="preprocessor">                #else   </span>
-<a name="l00231"></a>00231 <span class="preprocessor"></span>                sprintf(szMappingFile,
-<a name="l00232"></a>00232                         <span class="stringliteral">&quot;%s%s%s&quot;</span>,
-<a name="l00233"></a>00233                         szHome, szLeafname, szSuffix);
-<a name="l00234"></a>00234 <span class="preprocessor">                #endif </span><span class="comment">/*SYMBIAN*/</span>      
-<a name="l00235"></a>00235                 DBG_MSG(szMappingFile);
-<a name="l00236"></a>00236                 pFile = fopen(szMappingFile, <span class="stringliteral">&quot;r&quot;</span>);
-<a name="l00237"></a>00237                 <span class="keywordflow">if</span> (pFile != NULL) {
-<a name="l00238"></a>00238                         <span class="keywordflow">return</span> pFile;
-<a name="l00239"></a>00239                 }
-<a name="l00240"></a>00240         } <span class="keywordflow">else</span> {
-<a name="l00241"></a>00241                 werr(0, <span class="stringliteral">&quot;Local mappingfilename too long, ignored&quot;</span>);
-<a name="l00242"></a>00242         }
-<a name="l00243"></a>00243 
-<a name="l00244"></a>00244         <span class="comment">/* Try the global version of the mapping file */</span>
-<a name="l00245"></a>00245         <span class="keywordflow">if</span> (tFilenameLen &lt;
-<a name="l00246"></a>00246             <span class="keyword">sizeof</span>(szMappingFile) -
-<a name="l00247"></a>00247             <span class="keyword">sizeof</span>(GLOBAL_ANTIWORD_DIR) -
-<a name="l00248"></a>00248             <span class="keyword">sizeof</span>(FILE_SEPARATOR)) {
-<a name="l00249"></a>00249                 sprintf(szMappingFile,
-<a name="l00250"></a>00250                         GLOBAL_ANTIWORD_DIR FILE_SEPARATOR <span class="stringliteral">&quot;%s%s&quot;</span>,
-<a name="l00251"></a>00251                         szLeafname, szSuffix);
-<a name="l00252"></a>00252                 DBG_MSG(szMappingFile);
-<a name="l00253"></a>00253                 pFile = fopen(szMappingFile, <span class="stringliteral">&quot;r&quot;</span>);
-<a name="l00254"></a>00254                 <span class="keywordflow">if</span> (pFile != NULL) {
-<a name="l00255"></a>00255                         <span class="keywordflow">return</span> pFile;
-<a name="l00256"></a>00256                 }
-<a name="l00257"></a>00257         } <span class="keywordflow">else</span> {
-<a name="l00258"></a>00258                 werr(0, <span class="stringliteral">&quot;Global mappingfilename too long, ignored&quot;</span>);
-<a name="l00259"></a>00259         }
-<a name="l00260"></a>00260         werr(0, <span class="stringliteral">&quot;I can&#39;t open your mapping file (%s%s)\n&quot;</span>
-<a name="l00261"></a>00261                 <span class="stringliteral">&quot;It is not in &#39;%s&quot;</span> FILE_SEPARATOR ANTIWORD_DIR <span class="stringliteral">&quot;&#39; nor in &#39;&quot;</span>
-<a name="l00262"></a>00262                 GLOBAL_ANTIWORD_DIR <span class="stringliteral">&quot;&#39;.&quot;</span>, szLeafname, szSuffix, szHome);
-<a name="l00263"></a>00263         <span class="keywordflow">return</span> NULL;
-<a name="l00264"></a>00264 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00265"></a>00265 } <span class="comment">/* end of pOpenCharacterMappingFile */</span>
-<a name="l00266"></a>00266 
-<a name="l00267"></a>00267 <span class="comment">/*</span>
-<a name="l00268"></a>00268 <span class="comment"> * vCloseCharacterMappingFile - close the mapping file</span>
-<a name="l00269"></a>00269 <span class="comment"> */</span>
-<a name="l00270"></a>00270 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00271"></a>00271 vCloseCharacterMappingFile(FILE *pFile)
-<a name="l00272"></a>00272 {
-<a name="l00273"></a>00273         (void)fclose(pFile);
-<a name="l00274"></a>00274 } <span class="comment">/* end of pCloseCharacterMappingFile */</span>
-<a name="l00275"></a>00275 
-<a name="l00276"></a>00276 
-<a name="l00277"></a>00277 <span class="comment">/*</span>
-<a name="l00278"></a>00278 <span class="comment"> * iReadOptions - read options</span>
-<a name="l00279"></a>00279 <span class="comment"> *</span>
-<a name="l00280"></a>00280 <span class="comment"> * returns:     -1: error</span>
-<a name="l00281"></a>00281 <span class="comment"> *               0: help</span>
-<a name="l00282"></a>00282 <span class="comment"> *              &gt;0: index first file argument</span>
-<a name="l00283"></a>00283 <span class="comment"> */</span>
-<a name="l00284"></a>00284 <span class="keywordtype">int</span>
-<a name="l00285"></a>00285 iReadOptions(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)
-<a name="l00286"></a>00286 {
-<a name="l00287"></a>00287 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00288"></a>00288 <span class="preprocessor"></span>        FILE    *pFile;
-<a name="l00289"></a>00289         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szAlphabet;
-<a name="l00290"></a>00290         <span class="keywordtype">int</span>     iAlphabet;
-<a name="l00291"></a>00291         <span class="keywordtype">char</span>    szLine[81];
-<a name="l00292"></a>00292 <span class="preprocessor">#else</span>
-<a name="l00293"></a>00293 <span class="preprocessor"></span>        <span class="keyword">extern</span>  <span class="keywordtype">char</span>    *optarg;
-<a name="l00294"></a>00294         <span class="keyword">extern</span> <span class="keywordtype">int</span>      optind;
-<a name="l00295"></a>00295         <span class="keywordtype">char</span>    *pcChar, *szTmp;
-<a name="l00296"></a>00296         <span class="keywordtype">int</span>     iChar;
-<a name="l00297"></a>00297         <span class="keywordtype">char</span>    szLeafname[LEAFNAME_SIZE];
-<a name="l00298"></a>00298 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00299"></a>00299         FILE    *pCharacterMappingFile;
-<a name="l00300"></a>00300         <span class="keywordtype">int</span>     iTmp;
-<a name="l00301"></a>00301         BOOL    bSuccess;
-<a name="l00302"></a>00302 
-<a name="l00303"></a>00303         DBG_MSG(<span class="stringliteral">&quot;iReadOptions&quot;</span>);
-<a name="l00304"></a>00304 
-<a name="l00305"></a>00305 <span class="comment">/* Defaults */</span>
-<a name="l00306"></a>00306         tOptionsCurr = tOptionsDefault;
-<a name="l00307"></a>00307 
-<a name="l00308"></a>00308 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00309"></a>00309 <span class="preprocessor"></span><span class="comment">/* Choices file */</span>
-<a name="l00310"></a>00310         pFile = fopen(<span class="stringliteral">&quot;&lt;AntiWord$ChoicesFile&gt;&quot;</span>, <span class="stringliteral">&quot;r&quot;</span>);
-<a name="l00311"></a>00311         DBG_MSG_C(pFile == NULL, <span class="stringliteral">&quot;Choices file not found&quot;</span>);
-<a name="l00312"></a>00312         DBG_HEX_C(pFile != NULL, pFile);
-<a name="l00313"></a>00313         <span class="keywordflow">if</span> (pFile != NULL) {
-<a name="l00314"></a>00314                 <span class="keywordflow">while</span> (fgets(szLine, (<span class="keywordtype">int</span>)<span class="keyword">sizeof</span>(szLine), pFile) != NULL) {
-<a name="l00315"></a>00315                         DBG_MSG(szLine);
-<a name="l00316"></a>00316                         <span class="keywordflow">if</span> (szLine[0] == <span class="charliteral">&#39;#&#39;</span> ||
-<a name="l00317"></a>00317                             szLine[0] == <span class="charliteral">&#39;\r&#39;</span> ||
-<a name="l00318"></a>00318                             szLine[0] == <span class="charliteral">&#39;\n&#39;</span>) {
-<a name="l00319"></a>00319                                 <span class="keywordflow">continue</span>;
-<a name="l00320"></a>00320                         }
-<a name="l00321"></a>00321                         <span class="keywordflow">if</span> (sscanf(szLine, PARAGRAPH_BREAK, &amp;iTmp) == 1 &amp;&amp;
-<a name="l00322"></a>00322                             (iTmp == 0 ||
-<a name="l00323"></a>00323                             (iTmp &gt;= MIN_SCREEN_WIDTH &amp;&amp;
-<a name="l00324"></a>00324                              iTmp &lt;= MAX_SCREEN_WIDTH))) {
-<a name="l00325"></a>00325                                 tOptionsCurr.iParagraphBreak = iTmp;
-<a name="l00326"></a>00326                                 DBG_DEC(tOptionsCurr.iParagraphBreak);
-<a name="l00327"></a>00327                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (sscanf(szLine, AUTOFILETYPE, &amp;iTmp)
-<a name="l00328"></a>00328                                                                 == 1) {
-<a name="l00329"></a>00329                                 tOptionsCurr.bAutofiletypeAllowed =
-<a name="l00330"></a>00330                                                                 iTmp != 0;
-<a name="l00331"></a>00331                                 DBG_DEC(tOptionsCurr.bAutofiletypeAllowed);
-<a name="l00332"></a>00332                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (sscanf(szLine, USE_OUTLINEFONTS, &amp;iTmp)
-<a name="l00333"></a>00333                                                                 == 1) {
-<a name="l00334"></a>00334                                 tOptionsCurr.eConversionType =
-<a name="l00335"></a>00335                                         iTmp == 0 ?
-<a name="l00336"></a>00336                                         conversion_text : conversion_draw;
-<a name="l00337"></a>00337                                 DBG_DEC(tOptionsCurr.eConversionType);
-<a name="l00338"></a>00338                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (sscanf(szLine, SHOW_IMAGES, &amp;iTmp)
-<a name="l00339"></a>00339                                                                 == 1) {
-<a name="l00340"></a>00340                                 tOptionsCurr.eImageLevel = iTmp != 0 ?
-<a name="l00341"></a>00341                                         level_default : level_no_images;
-<a name="l00342"></a>00342                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (sscanf(szLine, HIDE_HIDDEN_TEXT, &amp;iTmp)
-<a name="l00343"></a>00343                                                                 == 1) {
-<a name="l00344"></a>00344                                 tOptionsCurr.bHideHiddenText = iTmp != 0;
-<a name="l00345"></a>00345                                 DBG_DEC(tOptionsCurr.bHideHiddenText);
-<a name="l00346"></a>00346                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (sscanf(szLine, SCALE_FACTOR_START, &amp;iTmp)
-<a name="l00347"></a>00347                                                                 == 1) {
-<a name="l00348"></a>00348                                 <span class="keywordflow">if</span> (iTmp &gt;= MIN_SCALE_FACTOR &amp;&amp;
-<a name="l00349"></a>00349                                     iTmp &lt;= MAX_SCALE_FACTOR) {
-<a name="l00350"></a>00350                                         tOptionsCurr.iScaleFactor = iTmp;
-<a name="l00351"></a>00351                                         DBG_DEC(tOptionsCurr.iScaleFactor);
-<a name="l00352"></a>00352                                 }
-<a name="l00353"></a>00353                         }
-<a name="l00354"></a>00354                 }
-<a name="l00355"></a>00355                 (void)fclose(pFile);
-<a name="l00356"></a>00356         }
-<a name="l00357"></a>00357         iAlphabet = iReadCurrentAlphabetNumber();
-<a name="l00358"></a>00358         <span class="keywordflow">switch</span> (iAlphabet) {
-<a name="l00359"></a>00359         <span class="keywordflow">case</span> 101:       <span class="comment">/* ISO-8859-1 aka Latin1 */</span>
-<a name="l00360"></a>00360                 szAlphabet = <span class="stringliteral">&quot;&lt;AntiWord$Latin1&gt;&quot;</span>;
-<a name="l00361"></a>00361                 <span class="keywordflow">break</span>;
-<a name="l00362"></a>00362         <span class="keywordflow">case</span> 112:       <span class="comment">/* ISO-8859-15 aka Latin9 */</span>
-<a name="l00363"></a>00363                 szAlphabet = <span class="stringliteral">&quot;&lt;AntiWord$Latin9&gt;&quot;</span>;
-<a name="l00364"></a>00364                 <span class="keywordflow">break</span>;
-<a name="l00365"></a>00365         <span class="keywordflow">default</span>:
-<a name="l00366"></a>00366                 werr(0, <span class="stringliteral">&quot;Alphabet &#39;%d&#39; is not supported&quot;</span>, iAlphabet);
-<a name="l00367"></a>00367                 <span class="keywordflow">return</span> -1;
-<a name="l00368"></a>00368         }
-<a name="l00369"></a>00369         pCharacterMappingFile = pOpenCharacterMappingFile(szAlphabet);
-<a name="l00370"></a>00370         <span class="keywordflow">if</span> (pCharacterMappingFile != NULL) {
-<a name="l00371"></a>00371                 bSuccess = bReadCharacterMappingTable(pCharacterMappingFile);
-<a name="l00372"></a>00372                 vCloseCharacterMappingFile(pCharacterMappingFile);
-<a name="l00373"></a>00373         } <span class="keywordflow">else</span> {
-<a name="l00374"></a>00374                 bSuccess = FALSE;
-<a name="l00375"></a>00375         }
-<a name="l00376"></a>00376         <span class="keywordflow">return</span> bSuccess ? 1 : -1;
-<a name="l00377"></a>00377 <span class="preprocessor">#else</span>
-<a name="l00378"></a>00378 <span class="preprocessor"></span><span class="comment">/* Environment */</span>
-<a name="l00379"></a>00379         
-<a name="l00380"></a>00380 <span class="preprocessor">        #ifdef SYMBIAN</span>
-<a name="l00381"></a>00381 <span class="preprocessor"></span>        <span class="comment">//Adding Some environment Variable explicitly</span>
-<a name="l00382"></a>00382         <span class="keywordflow">if</span> ( setenv(<span class="stringliteral">&quot;COLUMNS&quot;</span>, <span class="stringliteral">&quot;80&quot;</span>, 1) == 0)
-<a name="l00383"></a>00383 <span class="preprocessor">        #endif </span><span class="comment">/*SYMBIAN*/</span>
-<a name="l00384"></a>00384         szTmp = getenv(<span class="stringliteral">&quot;COLUMNS&quot;</span>);
-<a name="l00385"></a>00385         
-<a name="l00386"></a>00386         <span class="keywordflow">if</span> (szTmp != NULL) {
-<a name="l00387"></a>00387                 DBG_MSG(szTmp);
-<a name="l00388"></a>00388                 iTmp = (int)strtol(szTmp, &amp;pcChar, 10);
-<a name="l00389"></a>00389                 <span class="keywordflow">if</span> (*pcChar == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00390"></a>00390                         iTmp -= 4;      <span class="comment">/* This is for the edge */</span>
-<a name="l00391"></a>00391                         <span class="keywordflow">if</span> (iTmp &lt; MIN_SCREEN_WIDTH) {
-<a name="l00392"></a>00392                                 iTmp = MIN_SCREEN_WIDTH;
-<a name="l00393"></a>00393                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (iTmp &gt; MAX_SCREEN_WIDTH) {
-<a name="l00394"></a>00394                                 iTmp = MAX_SCREEN_WIDTH;
-<a name="l00395"></a>00395                         }
-<a name="l00396"></a>00396                         tOptionsCurr.iParagraphBreak = iTmp;
-<a name="l00397"></a>00397                         DBG_DEC(tOptionsCurr.iParagraphBreak);
-<a name="l00398"></a>00398                 }
-<a name="l00399"></a>00399         }
-<a name="l00400"></a>00400         strncpy(szLeafname, szGetDefaultMappingFile(), <span class="keyword">sizeof</span>(szLeafname) - 1);
-<a name="l00401"></a>00401         szLeafname[<span class="keyword">sizeof</span>(szLeafname) - 1] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00402"></a>00402 <span class="comment">/* Command line */</span>
-<a name="l00403"></a>00403         <span class="keywordflow">while</span> ((iChar = getopt(argc, argv, <span class="stringliteral">&quot;La:fhi:m:p:rstw:x:&quot;</span>)) != -1) {
-<a name="l00404"></a>00404                 <span class="keywordflow">switch</span> (iChar) {
-<a name="l00405"></a>00405                 <span class="keywordflow">case</span> <span class="charliteral">&#39;L&#39;</span>:
-<a name="l00406"></a>00406                         tOptionsCurr.bUseLandscape = TRUE;
-<a name="l00407"></a>00407                         <span class="keywordflow">break</span>;
-<a name="l00408"></a>00408                 <span class="keywordflow">case</span> <span class="charliteral">&#39;a&#39;</span>:
-<a name="l00409"></a>00409                         <span class="keywordflow">if</span> (!bCorrectPapersize(optarg, conversion_pdf)) {
-<a name="l00410"></a>00410                                 werr(0, <span class="stringliteral">&quot;-a without a valid papersize&quot;</span>);
-<a name="l00411"></a>00411                                 <span class="keywordflow">return</span> -1;
-<a name="l00412"></a>00412                         }
-<a name="l00413"></a>00413                         <span class="keywordflow">break</span>;
-<a name="l00414"></a>00414                 <span class="keywordflow">case</span> <span class="charliteral">&#39;f&#39;</span>:
-<a name="l00415"></a>00415                         tOptionsCurr.eConversionType = conversion_fmt_text;
-<a name="l00416"></a>00416                         <span class="keywordflow">break</span>;
-<a name="l00417"></a>00417                 <span class="keywordflow">case</span> <span class="charliteral">&#39;h&#39;</span>:
-<a name="l00418"></a>00418                         <span class="keywordflow">return</span> 0;
-<a name="l00419"></a>00419                 <span class="keywordflow">case</span> <span class="charliteral">&#39;i&#39;</span>:
-<a name="l00420"></a>00420                         iTmp = (int)strtol(optarg, &amp;pcChar, 10);
-<a name="l00421"></a>00421                         <span class="keywordflow">if</span> (*pcChar != <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00422"></a>00422                                 <span class="keywordflow">break</span>;
-<a name="l00423"></a>00423                         }
-<a name="l00424"></a>00424                         <span class="keywordflow">switch</span> (iTmp) {
-<a name="l00425"></a>00425                         <span class="keywordflow">case</span> 0:
-<a name="l00426"></a>00426                                 tOptionsCurr.eImageLevel = level_gs_special;
-<a name="l00427"></a>00427                                 <span class="keywordflow">break</span>;
-<a name="l00428"></a>00428                         <span class="keywordflow">case</span> 1:
-<a name="l00429"></a>00429                                 tOptionsCurr.eImageLevel = level_no_images;
-<a name="l00430"></a>00430                                 <span class="keywordflow">break</span>;
-<a name="l00431"></a>00431                         <span class="keywordflow">case</span> 2:
-<a name="l00432"></a>00432                                 tOptionsCurr.eImageLevel = level_ps_2;
-<a name="l00433"></a>00433                                 <span class="keywordflow">break</span>;
-<a name="l00434"></a>00434                         <span class="keywordflow">case</span> 3:
-<a name="l00435"></a>00435                                 tOptionsCurr.eImageLevel = level_ps_3;
-<a name="l00436"></a>00436                                 <span class="keywordflow">break</span>;
-<a name="l00437"></a>00437                         <span class="keywordflow">default</span>:
-<a name="l00438"></a>00438                                 tOptionsCurr.eImageLevel = level_default;
-<a name="l00439"></a>00439                                 <span class="keywordflow">break</span>;
-<a name="l00440"></a>00440                         }
-<a name="l00441"></a>00441                         DBG_DEC(tOptionsCurr.eImageLevel);
-<a name="l00442"></a>00442                         <span class="keywordflow">break</span>;
-<a name="l00443"></a>00443                 <span class="keywordflow">case</span> <span class="charliteral">&#39;m&#39;</span>:
-<a name="l00444"></a>00444                         <span class="keywordflow">if</span> (tOptionsCurr.eConversionType == conversion_xml) {
-<a name="l00445"></a>00445                                 werr(0, <span class="stringliteral">&quot;XML doesn&#39;t need a mapping file&quot;</span>);
-<a name="l00446"></a>00446                                 <span class="keywordflow">break</span>;
-<a name="l00447"></a>00447                         }
-<a name="l00448"></a>00448                         strncpy(szLeafname, optarg, <span class="keyword">sizeof</span>(szLeafname) - 1);
-<a name="l00449"></a>00449                         szLeafname[<span class="keyword">sizeof</span>(szLeafname) - 1] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00450"></a>00450                         DBG_MSG(szLeafname);
-<a name="l00451"></a>00451                         <span class="keywordflow">break</span>;
-<a name="l00452"></a>00452                 <span class="keywordflow">case</span> <span class="charliteral">&#39;p&#39;</span>:
-<a name="l00453"></a>00453                         <span class="keywordflow">if</span> (!bCorrectPapersize(optarg, conversion_ps)) {
-<a name="l00454"></a>00454                                 werr(0, <span class="stringliteral">&quot;-p without a valid papersize&quot;</span>);
-<a name="l00455"></a>00455                                 <span class="keywordflow">return</span> -1;
-<a name="l00456"></a>00456                         }
-<a name="l00457"></a>00457                         <span class="keywordflow">break</span>;
-<a name="l00458"></a>00458                 <span class="keywordflow">case</span> <span class="charliteral">&#39;r&#39;</span>:
-<a name="l00459"></a>00459                         tOptionsCurr.bRemoveRemovedText = FALSE;
-<a name="l00460"></a>00460                         <span class="keywordflow">break</span>;
-<a name="l00461"></a>00461                 <span class="keywordflow">case</span> <span class="charliteral">&#39;s&#39;</span>:
-<a name="l00462"></a>00462                         tOptionsCurr.bHideHiddenText = FALSE;
-<a name="l00463"></a>00463                         <span class="keywordflow">break</span>;
-<a name="l00464"></a>00464                 <span class="keywordflow">case</span> <span class="charliteral">&#39;t&#39;</span>:
-<a name="l00465"></a>00465                         tOptionsCurr.eConversionType = conversion_text;
-<a name="l00466"></a>00466                         <span class="keywordflow">break</span>;
-<a name="l00467"></a>00467                 <span class="keywordflow">case</span> <span class="charliteral">&#39;w&#39;</span>:
-<a name="l00468"></a>00468                         iTmp = (int)strtol(optarg, &amp;pcChar, 10);
-<a name="l00469"></a>00469                         <span class="keywordflow">if</span> (*pcChar == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00470"></a>00470                                 <span class="keywordflow">if</span> (iTmp != 0 &amp;&amp; iTmp &lt; MIN_SCREEN_WIDTH) {
-<a name="l00471"></a>00471                                         iTmp = MIN_SCREEN_WIDTH;
-<a name="l00472"></a>00472                                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (iTmp &gt; MAX_SCREEN_WIDTH) {
-<a name="l00473"></a>00473                                         iTmp = MAX_SCREEN_WIDTH;
-<a name="l00474"></a>00474                                 }
-<a name="l00475"></a>00475                                 tOptionsCurr.iParagraphBreak = iTmp;
-<a name="l00476"></a>00476                                 DBG_DEC(tOptionsCurr.iParagraphBreak);
-<a name="l00477"></a>00477                         }
-<a name="l00478"></a>00478                         <span class="keywordflow">break</span>;
-<a name="l00479"></a>00479                 <span class="keywordflow">case</span> <span class="charliteral">&#39;x&#39;</span>:
-<a name="l00480"></a>00480                         <span class="keywordflow">if</span> (STREQ(optarg, <span class="stringliteral">&quot;db&quot;</span>)) {
-<a name="l00481"></a>00481                                 tOptionsCurr.iParagraphBreak = 0;
-<a name="l00482"></a>00482                                 tOptionsCurr.eConversionType = conversion_xml;
-<a name="l00483"></a>00483                                 strcpy(szLeafname, MAPPING_FILE_UTF_8);
-<a name="l00484"></a>00484                         } <span class="keywordflow">else</span> {
-<a name="l00485"></a>00485                                 werr(0, <span class="stringliteral">&quot;-x %s is not supported&quot;</span>, optarg);
-<a name="l00486"></a>00486                                 <span class="keywordflow">return</span> -1;
-<a name="l00487"></a>00487                         }
-<a name="l00488"></a>00488                         <span class="keywordflow">break</span>;
-<a name="l00489"></a>00489                 <span class="keywordflow">default</span>:
-<a name="l00490"></a>00490                         <span class="keywordflow">return</span> -1;
-<a name="l00491"></a>00491                 }
-<a name="l00492"></a>00492         }
-<a name="l00493"></a>00493 
-<a name="l00494"></a>00494         tOptionsCurr.eEncoding = eMappingFile2Encoding(szLeafname);
-<a name="l00495"></a>00495         DBG_DEC(tOptionsCurr.eEncoding);
-<a name="l00496"></a>00496 
-<a name="l00497"></a>00497         <span class="keywordflow">if</span> (tOptionsCurr.eConversionType == conversion_ps &amp;&amp;
-<a name="l00498"></a>00498             tOptionsCurr.eEncoding == encoding_utf_8) {
-<a name="l00499"></a>00499                 werr(0,
-<a name="l00500"></a>00500                 <span class="stringliteral">&quot;The combination PostScript and UTF-8 is not supported&quot;</span>);
-<a name="l00501"></a>00501                 <span class="keywordflow">return</span> -1;
-<a name="l00502"></a>00502         }
-<a name="l00503"></a>00503 
-<a name="l00504"></a>00504         <span class="keywordflow">if</span> (tOptionsCurr.eConversionType == conversion_pdf &amp;&amp;
-<a name="l00505"></a>00505             tOptionsCurr.eEncoding == encoding_utf_8) {
-<a name="l00506"></a>00506                 werr(0,
-<a name="l00507"></a>00507                 <span class="stringliteral">&quot;The combination PDF and UTF-8 is not supported&quot;</span>);
-<a name="l00508"></a>00508                 <span class="keywordflow">return</span> -1;
-<a name="l00509"></a>00509         }
-<a name="l00510"></a>00510 
-<a name="l00511"></a>00511         <span class="keywordflow">if</span> (tOptionsCurr.eConversionType == conversion_pdf &amp;&amp;
-<a name="l00512"></a>00512             tOptionsCurr.eEncoding == encoding_cyrillic) {
-<a name="l00513"></a>00513                 werr(0,
-<a name="l00514"></a>00514                 <span class="stringliteral">&quot;The combination PDF and Cyrillic is not supported&quot;</span>);
-<a name="l00515"></a>00515                 <span class="keywordflow">return</span> -1;
-<a name="l00516"></a>00516         }
-<a name="l00517"></a>00517 
-<a name="l00518"></a>00518         <span class="keywordflow">if</span> (tOptionsCurr.eConversionType == conversion_ps ||
-<a name="l00519"></a>00519             tOptionsCurr.eConversionType == conversion_pdf) {
-<a name="l00520"></a>00520                 <span class="comment">/* PostScript or PDF mode */</span>
-<a name="l00521"></a>00521                 <span class="keywordflow">if</span> (tOptionsCurr.bUseLandscape) {
-<a name="l00522"></a>00522                         <span class="comment">/* Swap the page height and width */</span>
-<a name="l00523"></a>00523                         iTmp = tOptionsCurr.iPageHeight;
-<a name="l00524"></a>00524                         tOptionsCurr.iPageHeight = tOptionsCurr.iPageWidth;
-<a name="l00525"></a>00525                         tOptionsCurr.iPageWidth = iTmp;
-<a name="l00526"></a>00526                 }
-<a name="l00527"></a>00527                 <span class="comment">/* The paragraph break depends on the width of the paper */</span>
-<a name="l00528"></a>00528                 tOptionsCurr.iParagraphBreak = iMilliPoints2Char(
-<a name="l00529"></a>00529                         (<span class="keywordtype">long</span>)tOptionsCurr.iPageWidth * 1000 -
-<a name="l00530"></a>00530                         lDrawUnits2MilliPoints(
-<a name="l00531"></a>00531                                 PS_LEFT_MARGIN + PS_RIGHT_MARGIN));
-<a name="l00532"></a>00532                 DBG_DEC(tOptionsCurr.iParagraphBreak);
-<a name="l00533"></a>00533         }
-<a name="l00534"></a>00534 
-<a name="l00535"></a>00535         pCharacterMappingFile = pOpenCharacterMappingFile(szLeafname);
-<a name="l00536"></a>00536         <span class="keywordflow">if</span> (pCharacterMappingFile != NULL) {
-<a name="l00537"></a>00537                 bSuccess = bReadCharacterMappingTable(pCharacterMappingFile);
-<a name="l00538"></a>00538                 vCloseCharacterMappingFile(pCharacterMappingFile);
-<a name="l00539"></a>00539         } <span class="keywordflow">else</span> {
-<a name="l00540"></a>00540                 bSuccess = FALSE;
-<a name="l00541"></a>00541         }
-<a name="l00542"></a>00542         <span class="keywordflow">return</span> bSuccess ? optind : -1;
-<a name="l00543"></a>00543 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00544"></a>00544 } <span class="comment">/* end of iReadOptions */</span>
-<a name="l00545"></a>00545 
-<a name="l00546"></a>00546 <span class="comment">/*</span>
-<a name="l00547"></a>00547 <span class="comment"> * vGetOptions - get a copy of the current option values</span>
-<a name="l00548"></a>00548 <span class="comment"> */</span>
-<a name="l00549"></a>00549 <span class="keywordtype">void</span>
-<a name="l00550"></a>00550 vGetOptions(options_type *pOptions)
-<a name="l00551"></a>00551 {
-<a name="l00552"></a>00552         fail(pOptions == NULL);
-<a name="l00553"></a>00553 
-<a name="l00554"></a>00554         *pOptions = tOptionsCurr;
-<a name="l00555"></a>00555 } <span class="comment">/* end of vGetOptions */</span>
-<a name="l00556"></a>00556 
-<a name="l00557"></a>00557 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00558"></a>00558 <span class="preprocessor"></span><span class="comment">/*</span>
-<a name="l00559"></a>00559 <span class="comment"> * vWriteOptions - write the current options to the Options file</span>
-<a name="l00560"></a>00560 <span class="comment"> */</span>
-<a name="l00561"></a>00561 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00562"></a>00562 vWriteOptions(<span class="keywordtype">void</span>)
-<a name="l00563"></a>00563 {
-<a name="l00564"></a>00564         FILE    *pFile;
-<a name="l00565"></a>00565         <span class="keywordtype">char</span>    *szOptionsFile;
-<a name="l00566"></a>00566 
-<a name="l00567"></a>00567         TRACE_MSG(<span class="stringliteral">&quot;vWriteOptions&quot;</span>);
-<a name="l00568"></a>00568 
-<a name="l00569"></a>00569         szOptionsFile = getenv(<span class="stringliteral">&quot;AntiWord$ChoicesSave&quot;</span>);
-<a name="l00570"></a>00570         <span class="keywordflow">if</span> (szOptionsFile == NULL) {
-<a name="l00571"></a>00571                 werr(0, <span class="stringliteral">&quot;Warning: Name of the Choices file not found&quot;</span>);
-<a name="l00572"></a>00572                 <span class="keywordflow">return</span>;
-<a name="l00573"></a>00573         }
-<a name="l00574"></a>00574         <span class="keywordflow">if</span> (!bMakeDirectory(szOptionsFile)) {
-<a name="l00575"></a>00575                 werr(0,
-<a name="l00576"></a>00576                 <span class="stringliteral">&quot;Warning: I can&#39;t make a directory for the Choices file&quot;</span>);
-<a name="l00577"></a>00577                 <span class="keywordflow">return</span>;
-<a name="l00578"></a>00578         }
-<a name="l00579"></a>00579         pFile = fopen(szOptionsFile, <span class="stringliteral">&quot;w&quot;</span>);
-<a name="l00580"></a>00580         <span class="keywordflow">if</span> (pFile == NULL) {
-<a name="l00581"></a>00581                 werr(0, <span class="stringliteral">&quot;Warning: I can&#39;t write the Choices file&quot;</span>);
-<a name="l00582"></a>00582                 <span class="keywordflow">return</span>;
-<a name="l00583"></a>00583         }
-<a name="l00584"></a>00584         (void)fprintf(pFile, PARAGRAPH_BREAK<span class="stringliteral">&quot;\n&quot;</span>,
-<a name="l00585"></a>00585                 tOptionsCurr.iParagraphBreak);
-<a name="l00586"></a>00586         (void)fprintf(pFile, AUTOFILETYPE<span class="stringliteral">&quot;\n&quot;</span>,
-<a name="l00587"></a>00587                 tOptionsCurr.bAutofiletypeAllowed);
-<a name="l00588"></a>00588         (void)fprintf(pFile, USE_OUTLINEFONTS<span class="stringliteral">&quot;\n&quot;</span>,
-<a name="l00589"></a>00589                 tOptionsCurr.eConversionType == conversion_text ? 0 : 1);
-<a name="l00590"></a>00590         (void)fprintf(pFile, SHOW_IMAGES<span class="stringliteral">&quot;\n&quot;</span>,
-<a name="l00591"></a>00591                 tOptionsCurr.eImageLevel == level_no_images ? 0 : 1);
-<a name="l00592"></a>00592         (void)fprintf(pFile, HIDE_HIDDEN_TEXT<span class="stringliteral">&quot;\n&quot;</span>,
-<a name="l00593"></a>00593                 tOptionsCurr.bHideHiddenText);
-<a name="l00594"></a>00594         (void)fprintf(pFile, SCALE_FACTOR_START<span class="stringliteral">&quot;\n&quot;</span>,
-<a name="l00595"></a>00595                 tOptionsCurr.iScaleFactor);
-<a name="l00596"></a>00596         (void)fclose(pFile);
-<a name="l00597"></a>00597 } <span class="comment">/* end of vWriteOptions */</span>
-<a name="l00598"></a>00598 
-<a name="l00599"></a>00599 <span class="comment">/*</span>
-<a name="l00600"></a>00600 <span class="comment"> * vChoicesOpenAction - action to be taken when the Choices window opens</span>
-<a name="l00601"></a>00601 <span class="comment"> */</span>
-<a name="l00602"></a>00602 <span class="keywordtype">void</span>
-<a name="l00603"></a>00603 vChoicesOpenAction(window_handle tWindow)
-<a name="l00604"></a>00604 {
-<a name="l00605"></a>00605         TRACE_MSG(<span class="stringliteral">&quot;vChoicesOpenAction&quot;</span>);
-<a name="l00606"></a>00606 
-<a name="l00607"></a>00607         tOptionsTemp = tOptionsCurr;
-<a name="l00608"></a>00608         <span class="keywordflow">if</span> (tOptionsTemp.iParagraphBreak == 0) {
-<a name="l00609"></a>00609                 vUpdateRadioButton(tWindow, CHOICES_BREAK_BUTTON, FALSE);
-<a name="l00610"></a>00610                 vUpdateRadioButton(tWindow, CHOICES_NO_BREAK_BUTTON, TRUE);
-<a name="l00611"></a>00611                 vUpdateWriteableNumber(tWindow, CHOICES_BREAK_WRITEABLE,
-<a name="l00612"></a>00612                                         DEFAULT_SCREEN_WIDTH);
-<a name="l00613"></a>00613         } <span class="keywordflow">else</span> {
-<a name="l00614"></a>00614                 vUpdateRadioButton(tWindow, CHOICES_BREAK_BUTTON, TRUE);
-<a name="l00615"></a>00615                 vUpdateRadioButton(tWindow, CHOICES_NO_BREAK_BUTTON, FALSE);
-<a name="l00616"></a>00616                 vUpdateWriteableNumber(tWindow,
-<a name="l00617"></a>00617                         CHOICES_BREAK_WRITEABLE,
-<a name="l00618"></a>00618                         tOptionsTemp.iParagraphBreak);
-<a name="l00619"></a>00619         }
-<a name="l00620"></a>00620         vUpdateRadioButton(tWindow, CHOICES_AUTOFILETYPE_BUTTON,
-<a name="l00621"></a>00621                                         tOptionsTemp.bAutofiletypeAllowed);
-<a name="l00622"></a>00622         vUpdateRadioButton(tWindow, CHOICES_HIDDEN_TEXT_BUTTON,
-<a name="l00623"></a>00623                                         tOptionsTemp.bHideHiddenText);
-<a name="l00624"></a>00624         <span class="keywordflow">if</span> (tOptionsTemp.eConversionType == conversion_draw) {
-<a name="l00625"></a>00625                 vUpdateRadioButton(tWindow,
-<a name="l00626"></a>00626                         CHOICES_WITH_IMAGES_BUTTON,
-<a name="l00627"></a>00627                         tOptionsTemp.eImageLevel != level_no_images);
-<a name="l00628"></a>00628                 vUpdateRadioButton(tWindow,
-<a name="l00629"></a>00629                         CHOICES_NO_IMAGES_BUTTON,
-<a name="l00630"></a>00630                         tOptionsTemp.eImageLevel == level_no_images);
-<a name="l00631"></a>00631                 vUpdateRadioButton(tWindow,
-<a name="l00632"></a>00632                         CHOICES_TEXTONLY_BUTTON, FALSE);
-<a name="l00633"></a>00633         } <span class="keywordflow">else</span> {
-<a name="l00634"></a>00634                 vUpdateRadioButton(tWindow,
-<a name="l00635"></a>00635                         CHOICES_WITH_IMAGES_BUTTON, FALSE);
-<a name="l00636"></a>00636                 vUpdateRadioButton(tWindow,
-<a name="l00637"></a>00637                         CHOICES_NO_IMAGES_BUTTON, FALSE);
-<a name="l00638"></a>00638                 vUpdateRadioButton(tWindow,
-<a name="l00639"></a>00639                         CHOICES_TEXTONLY_BUTTON, TRUE);
-<a name="l00640"></a>00640         }
-<a name="l00641"></a>00641         vUpdateWriteableNumber(tWindow,
-<a name="l00642"></a>00642                 CHOICES_SCALE_WRITEABLE, tOptionsTemp.iScaleFactor);
-<a name="l00643"></a>00643         TRACE_MSG(<span class="stringliteral">&quot;end of vChoicesOpenAction&quot;</span>);
-<a name="l00644"></a>00644 } <span class="comment">/* end of vChoicesOpenAction */</span>
-<a name="l00645"></a>00645 
-<a name="l00646"></a>00646 <span class="comment">/*</span>
-<a name="l00647"></a>00647 <span class="comment"> * vDefaultButtonAction - action when the default button is clicked</span>
-<a name="l00648"></a>00648 <span class="comment"> */</span>
-<a name="l00649"></a>00649 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00650"></a>00650 vDefaultButtonAction(window_handle tWindow)
-<a name="l00651"></a>00651 {
-<a name="l00652"></a>00652         TRACE_MSG(<span class="stringliteral">&quot;vDefaultButtonAction&quot;</span>);
-<a name="l00653"></a>00653 
-<a name="l00654"></a>00654         tOptionsTemp = tOptionsDefault;
-<a name="l00655"></a>00655         vUpdateRadioButton(tWindow, CHOICES_BREAK_BUTTON, TRUE);
-<a name="l00656"></a>00656         vUpdateRadioButton(tWindow, CHOICES_NO_BREAK_BUTTON, FALSE);
-<a name="l00657"></a>00657         vUpdateWriteableNumber(tWindow, CHOICES_BREAK_WRITEABLE,
-<a name="l00658"></a>00658                         tOptionsTemp.iParagraphBreak);
-<a name="l00659"></a>00659         vUpdateRadioButton(tWindow, CHOICES_AUTOFILETYPE_BUTTON,
-<a name="l00660"></a>00660                         tOptionsTemp.bAutofiletypeAllowed);
-<a name="l00661"></a>00661         vUpdateRadioButton(tWindow, CHOICES_HIDDEN_TEXT_BUTTON,
-<a name="l00662"></a>00662                         tOptionsTemp.bHideHiddenText);
-<a name="l00663"></a>00663         vUpdateRadioButton(tWindow, CHOICES_WITH_IMAGES_BUTTON,
-<a name="l00664"></a>00664                         tOptionsTemp.eConversionType == conversion_draw &amp;&amp;
-<a name="l00665"></a>00665                         tOptionsTemp.eImageLevel != level_no_images);
-<a name="l00666"></a>00666         vUpdateRadioButton(tWindow, CHOICES_NO_IMAGES_BUTTON,
-<a name="l00667"></a>00667                         tOptionsTemp.eConversionType == conversion_draw &amp;&amp;
-<a name="l00668"></a>00668                         tOptionsTemp.eImageLevel == level_no_images);
-<a name="l00669"></a>00669         vUpdateRadioButton(tWindow, CHOICES_TEXTONLY_BUTTON,
-<a name="l00670"></a>00670                         tOptionsTemp.eConversionType == conversion_text);
-<a name="l00671"></a>00671         vUpdateWriteableNumber(tWindow, CHOICES_SCALE_WRITEABLE,
-<a name="l00672"></a>00672                         tOptionsTemp.iScaleFactor);
-<a name="l00673"></a>00673 } <span class="comment">/* end of vDefaultButtonAction */</span>
-<a name="l00674"></a>00674 
-<a name="l00675"></a>00675 <span class="comment">/*</span>
-<a name="l00676"></a>00676 <span class="comment"> * vApplyButtonAction - action to be taken when the OK button is clicked</span>
-<a name="l00677"></a>00677 <span class="comment"> */</span>
-<a name="l00678"></a>00678 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00679"></a>00679 vApplyButtonAction(<span class="keywordtype">void</span>)
-<a name="l00680"></a>00680 {
-<a name="l00681"></a>00681         TRACE_MSG(<span class="stringliteral">&quot;vApplyButtonAction&quot;</span>);
-<a name="l00682"></a>00682 
-<a name="l00683"></a>00683         tOptionsCurr = tOptionsTemp;
-<a name="l00684"></a>00684 } <span class="comment">/* end of vApplyButtonAction */</span>
-<a name="l00685"></a>00685 
-<a name="l00686"></a>00686 <span class="comment">/*</span>
-<a name="l00687"></a>00687 <span class="comment"> * vSaveButtonAction - action to be taken when the save button is clicked</span>
-<a name="l00688"></a>00688 <span class="comment"> */</span>
-<a name="l00689"></a>00689 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00690"></a>00690 vSaveButtonAction(<span class="keywordtype">void</span>)
-<a name="l00691"></a>00691 {
-<a name="l00692"></a>00692         TRACE_MSG(<span class="stringliteral">&quot;vSaveButtonAction&quot;</span>);
-<a name="l00693"></a>00693 
-<a name="l00694"></a>00694         vApplyButtonAction();
-<a name="l00695"></a>00695         vWriteOptions();
-<a name="l00696"></a>00696 } <span class="comment">/* end of vSaveButtonAction */</span>
-<a name="l00697"></a>00697 
-<a name="l00698"></a>00698 <span class="comment">/*</span>
-<a name="l00699"></a>00699 <span class="comment"> * vSetParagraphBreak - set the paragraph break to the given number</span>
-<a name="l00700"></a>00700 <span class="comment"> */</span>
-<a name="l00701"></a>00701 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00702"></a>00702 vSetParagraphBreak(window_handle tWindow, <span class="keywordtype">int</span> iNumber)
-<a name="l00703"></a>00703 {
-<a name="l00704"></a>00704         tOptionsTemp.iParagraphBreak = iNumber;
-<a name="l00705"></a>00705         <span class="keywordflow">if</span> (tOptionsTemp.iParagraphBreak == 0) {
-<a name="l00706"></a>00706                 <span class="keywordflow">return</span>;
-<a name="l00707"></a>00707         }
-<a name="l00708"></a>00708         vUpdateWriteableNumber(tWindow,
-<a name="l00709"></a>00709                         CHOICES_BREAK_WRITEABLE,
-<a name="l00710"></a>00710                         tOptionsTemp.iParagraphBreak);
-<a name="l00711"></a>00711 } <span class="comment">/* end of vSetParagraphBreak */</span>
-<a name="l00712"></a>00712 
-<a name="l00713"></a>00713 <span class="comment">/*</span>
-<a name="l00714"></a>00714 <span class="comment"> * vChangeParagraphBreak - change the paragraph break with the given number</span>
-<a name="l00715"></a>00715 <span class="comment"> */</span>
-<a name="l00716"></a>00716 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00717"></a>00717 vChangeParagraphBreak(window_handle tWindow, <span class="keywordtype">int</span> iNumber)
-<a name="l00718"></a>00718 {
-<a name="l00719"></a>00719         <span class="keywordtype">int</span>     iTmp;
-<a name="l00720"></a>00720 
-<a name="l00721"></a>00721         iTmp = tOptionsTemp.iParagraphBreak + iNumber;
-<a name="l00722"></a>00722         <span class="keywordflow">if</span> (iTmp &lt; MIN_SCREEN_WIDTH || iTmp &gt; MAX_SCREEN_WIDTH) {
-<a name="l00723"></a>00723                 <span class="comment">/* Ignore */</span>
-<a name="l00724"></a>00724                 <span class="keywordflow">return</span>;
-<a name="l00725"></a>00725         }
-<a name="l00726"></a>00726         tOptionsTemp.iParagraphBreak = iTmp;
-<a name="l00727"></a>00727         vUpdateWriteableNumber(tWindow,
-<a name="l00728"></a>00728                         CHOICES_BREAK_WRITEABLE,
-<a name="l00729"></a>00729                         tOptionsTemp.iParagraphBreak);
-<a name="l00730"></a>00730 } <span class="comment">/* end of vChangeParagraphBreak */</span>
-<a name="l00731"></a>00731 
-<a name="l00732"></a>00732 <span class="comment">/*</span>
-<a name="l00733"></a>00733 <span class="comment"> * vChangeAutofiletype - invert the permission to autofiletype</span>
-<a name="l00734"></a>00734 <span class="comment"> */</span>
-<a name="l00735"></a>00735 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00736"></a>00736 vChangeAutofiletype(window_handle tWindow)
-<a name="l00737"></a>00737 {
-<a name="l00738"></a>00738         tOptionsTemp.bAutofiletypeAllowed =
-<a name="l00739"></a>00739                                 !tOptionsTemp.bAutofiletypeAllowed;
-<a name="l00740"></a>00740         vUpdateRadioButton(tWindow,
-<a name="l00741"></a>00741                         CHOICES_AUTOFILETYPE_BUTTON,
-<a name="l00742"></a>00742                         tOptionsTemp.bAutofiletypeAllowed);
-<a name="l00743"></a>00743 } <span class="comment">/* end of vChangeAutofiletype */</span>
-<a name="l00744"></a>00744 
-<a name="l00745"></a>00745 <span class="comment">/*</span>
-<a name="l00746"></a>00746 <span class="comment"> * vChangeHiddenText - invert the hide/show hidden text</span>
-<a name="l00747"></a>00747 <span class="comment"> */</span>
-<a name="l00748"></a>00748 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00749"></a>00749 vChangeHiddenText(window_handle tWindow)
-<a name="l00750"></a>00750 {
-<a name="l00751"></a>00751         tOptionsTemp.bHideHiddenText = !tOptionsTemp.bHideHiddenText;
-<a name="l00752"></a>00752         vUpdateRadioButton(tWindow,
-<a name="l00753"></a>00753                         CHOICES_HIDDEN_TEXT_BUTTON,
-<a name="l00754"></a>00754                         tOptionsTemp.bHideHiddenText);
-<a name="l00755"></a>00755 } <span class="comment">/* end of vChangeHiddenText */</span>
-<a name="l00756"></a>00756 
-<a name="l00757"></a>00757 <span class="comment">/*</span>
-<a name="l00758"></a>00758 <span class="comment"> * vUseFontsImages - use outline fonts, show images</span>
-<a name="l00759"></a>00759 <span class="comment"> */</span>
-<a name="l00760"></a>00760 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00761"></a>00761 vUseFontsImages(BOOL bUseOutlineFonts, BOOL bShowImages)
-<a name="l00762"></a>00762 {
-<a name="l00763"></a>00763         tOptionsTemp.eConversionType =
-<a name="l00764"></a>00764                 bUseOutlineFonts ? conversion_draw : conversion_text;
-<a name="l00765"></a>00765         tOptionsTemp.eImageLevel =
-<a name="l00766"></a>00766                 bUseOutlineFonts &amp;&amp; bShowImages ?
-<a name="l00767"></a>00767                 level_default : level_no_images;
-<a name="l00768"></a>00768 } <span class="comment">/* end of vUseFontsImages */</span>
-<a name="l00769"></a>00769 
-<a name="l00770"></a>00770 <span class="comment">/*</span>
-<a name="l00771"></a>00771 <span class="comment"> * vSetScaleFactor - set the scale factor to the given number</span>
-<a name="l00772"></a>00772 <span class="comment"> */</span>
-<a name="l00773"></a>00773 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00774"></a>00774 vSetScaleFactor(window_handle tWindow, <span class="keywordtype">int</span> iNumber)
-<a name="l00775"></a>00775 {
-<a name="l00776"></a>00776         tOptionsTemp.iScaleFactor = iNumber;
-<a name="l00777"></a>00777         vUpdateWriteableNumber(tWindow,
-<a name="l00778"></a>00778                         CHOICES_SCALE_WRITEABLE,
-<a name="l00779"></a>00779                         tOptionsTemp.iScaleFactor);
-<a name="l00780"></a>00780 } <span class="comment">/* end of vSetScaleFactor */</span>
-<a name="l00781"></a>00781 
-<a name="l00782"></a>00782 <span class="comment">/*</span>
-<a name="l00783"></a>00783 <span class="comment"> * vChangeScaleFactor - change the scale factor with the given number</span>
-<a name="l00784"></a>00784 <span class="comment"> */</span>
-<a name="l00785"></a>00785 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00786"></a>00786 vChangeScaleFactor(window_handle tWindow, <span class="keywordtype">int</span> iNumber)
-<a name="l00787"></a>00787 {
-<a name="l00788"></a>00788         <span class="keywordtype">int</span>     iTmp;
-<a name="l00789"></a>00789 
-<a name="l00790"></a>00790         iTmp = tOptionsTemp.iScaleFactor + iNumber;
-<a name="l00791"></a>00791         <span class="keywordflow">if</span> (iTmp &lt; MIN_SCALE_FACTOR || iTmp &gt; MAX_SCALE_FACTOR) {
-<a name="l00792"></a>00792                 <span class="comment">/* Ignore */</span>
-<a name="l00793"></a>00793                 <span class="keywordflow">return</span>;
-<a name="l00794"></a>00794         }
-<a name="l00795"></a>00795         tOptionsTemp.iScaleFactor = iTmp;
-<a name="l00796"></a>00796         vUpdateWriteableNumber(tWindow,
-<a name="l00797"></a>00797                         CHOICES_SCALE_WRITEABLE,
-<a name="l00798"></a>00798                         tOptionsTemp.iScaleFactor);
-<a name="l00799"></a>00799 } <span class="comment">/* end of vChangeScaleFactor */</span>
-<a name="l00800"></a>00800 
-<a name="l00801"></a>00801 <span class="comment">/*</span>
-<a name="l00802"></a>00802 <span class="comment"> * bChoicesMouseClick - handle a mouse click in the Choices window</span>
-<a name="l00803"></a>00803 <span class="comment"> */</span>
-<a name="l00804"></a>00804 BOOL
-<a name="l00805"></a>00805 bChoicesMouseClick(event_pollblock *pEvent, <span class="keywordtype">void</span> *pvReference)
-<a name="l00806"></a>00806 {
-<a name="l00807"></a>00807         icon_handle     tAction;
-<a name="l00808"></a>00808         mouse_block     *pMouse;
-<a name="l00809"></a>00809         BOOL            bCloseWindow;
-<a name="l00810"></a>00810 
-<a name="l00811"></a>00811         TRACE_MSG(<span class="stringliteral">&quot;bChoicesMouseClick&quot;</span>);
-<a name="l00812"></a>00812 
-<a name="l00813"></a>00813         fail(pEvent == NULL);
-<a name="l00814"></a>00814         fail(pEvent-&gt;type != event_CLICK);
-<a name="l00815"></a>00815 
-<a name="l00816"></a>00816         pMouse = &amp;pEvent-&gt;data.mouse;
-<a name="l00817"></a>00817         <span class="keywordflow">if</span> (!pMouse-&gt;button.data.select &amp;&amp; !pMouse-&gt;button.data.adjust) {
-<a name="l00818"></a>00818                 <span class="comment">/* Not handled here */</span>
-<a name="l00819"></a>00819                 DBG_HEX(pMouse-&gt;button.value);
-<a name="l00820"></a>00820                 <span class="keywordflow">return</span> FALSE;
-<a name="l00821"></a>00821         }
-<a name="l00822"></a>00822 
-<a name="l00823"></a>00823         <span class="comment">/* Which action should be taken */</span>
-<a name="l00824"></a>00824         tAction = pMouse-&gt;icon;
-<a name="l00825"></a>00825         <span class="keywordflow">if</span> (pMouse-&gt;button.data.adjust) {
-<a name="l00826"></a>00826                 <span class="comment">/* The adjust button reverses the direction */</span>
-<a name="l00827"></a>00827                 <span class="keywordflow">switch</span> (pMouse-&gt;icon) {
-<a name="l00828"></a>00828                 <span class="keywordflow">case</span> CHOICES_BREAK_UP_BUTTON:
-<a name="l00829"></a>00829                         tAction = CHOICES_BREAK_DOWN_BUTTON;
-<a name="l00830"></a>00830                         <span class="keywordflow">break</span>;
-<a name="l00831"></a>00831                 <span class="keywordflow">case</span> CHOICES_BREAK_DOWN_BUTTON:
-<a name="l00832"></a>00832                         tAction = CHOICES_BREAK_UP_BUTTON;
-<a name="l00833"></a>00833                         <span class="keywordflow">break</span>;
-<a name="l00834"></a>00834                 <span class="keywordflow">case</span> CHOICES_SCALE_UP_BUTTON:
-<a name="l00835"></a>00835                         tAction = CHOICES_SCALE_DOWN_BUTTON;
-<a name="l00836"></a>00836                         <span class="keywordflow">break</span>;
-<a name="l00837"></a>00837                 <span class="keywordflow">case</span> CHOICES_SCALE_DOWN_BUTTON:
-<a name="l00838"></a>00838                         tAction = CHOICES_SCALE_UP_BUTTON;
-<a name="l00839"></a>00839                         <span class="keywordflow">break</span>;
-<a name="l00840"></a>00840                 <span class="keywordflow">default</span>:
-<a name="l00841"></a>00841                         <span class="keywordflow">break</span>;
-<a name="l00842"></a>00842                 }
-<a name="l00843"></a>00843         }
-<a name="l00844"></a>00844 
-<a name="l00845"></a>00845         <span class="comment">/* Actions */</span>
-<a name="l00846"></a>00846         bCloseWindow = FALSE;
-<a name="l00847"></a>00847         <span class="keywordflow">switch</span> (tAction) {
-<a name="l00848"></a>00848         <span class="keywordflow">case</span> CHOICES_DEFAULT_BUTTON:
-<a name="l00849"></a>00849                 vDefaultButtonAction(pMouse-&gt;window);
-<a name="l00850"></a>00850                 <span class="keywordflow">break</span>;
-<a name="l00851"></a>00851         <span class="keywordflow">case</span> CHOICES_SAVE_BUTTON:
-<a name="l00852"></a>00852                 vSaveButtonAction();
-<a name="l00853"></a>00853                 <span class="keywordflow">break</span>;
-<a name="l00854"></a>00854         <span class="keywordflow">case</span> CHOICES_CANCEL_BUTTON:
-<a name="l00855"></a>00855                 bCloseWindow = TRUE;
-<a name="l00856"></a>00856                 <span class="keywordflow">break</span>;
-<a name="l00857"></a>00857         <span class="keywordflow">case</span> CHOICES_APPLY_BUTTON:
-<a name="l00858"></a>00858                 vApplyButtonAction();
-<a name="l00859"></a>00859                 bCloseWindow = TRUE;
-<a name="l00860"></a>00860                 <span class="keywordflow">break</span>;
-<a name="l00861"></a>00861         <span class="keywordflow">case</span> CHOICES_BREAK_BUTTON:
-<a name="l00862"></a>00862                 vSetParagraphBreak(pMouse-&gt;window, DEFAULT_SCREEN_WIDTH);
-<a name="l00863"></a>00863                 <span class="keywordflow">break</span>;
-<a name="l00864"></a>00864         <span class="keywordflow">case</span> CHOICES_BREAK_UP_BUTTON:
-<a name="l00865"></a>00865                 vChangeParagraphBreak(pMouse-&gt;window, 1);
-<a name="l00866"></a>00866                 <span class="keywordflow">break</span>;
-<a name="l00867"></a>00867         <span class="keywordflow">case</span> CHOICES_BREAK_DOWN_BUTTON:
-<a name="l00868"></a>00868                 vChangeParagraphBreak(pMouse-&gt;window, -1);
-<a name="l00869"></a>00869                 <span class="keywordflow">break</span>;
-<a name="l00870"></a>00870         <span class="keywordflow">case</span> CHOICES_NO_BREAK_BUTTON:
-<a name="l00871"></a>00871                 vSetParagraphBreak(pMouse-&gt;window, 0);
-<a name="l00872"></a>00872                 <span class="keywordflow">break</span>;
-<a name="l00873"></a>00873         <span class="keywordflow">case</span> CHOICES_AUTOFILETYPE_BUTTON:
-<a name="l00874"></a>00874                 vChangeAutofiletype(pMouse-&gt;window);
-<a name="l00875"></a>00875                 <span class="keywordflow">break</span>;
-<a name="l00876"></a>00876         <span class="keywordflow">case</span> CHOICES_HIDDEN_TEXT_BUTTON:
-<a name="l00877"></a>00877                 vChangeHiddenText(pMouse-&gt;window);
-<a name="l00878"></a>00878                 <span class="keywordflow">break</span>;
-<a name="l00879"></a>00879         <span class="keywordflow">case</span> CHOICES_WITH_IMAGES_BUTTON:
-<a name="l00880"></a>00880                 vUseFontsImages(TRUE, TRUE);
-<a name="l00881"></a>00881                 <span class="keywordflow">break</span>;
-<a name="l00882"></a>00882         <span class="keywordflow">case</span> CHOICES_NO_IMAGES_BUTTON:
-<a name="l00883"></a>00883                 vUseFontsImages(TRUE, FALSE);
-<a name="l00884"></a>00884                 <span class="keywordflow">break</span>;
-<a name="l00885"></a>00885         <span class="keywordflow">case</span> CHOICES_TEXTONLY_BUTTON:
-<a name="l00886"></a>00886                 vUseFontsImages(FALSE, FALSE);
-<a name="l00887"></a>00887                 <span class="keywordflow">break</span>;
-<a name="l00888"></a>00888         <span class="keywordflow">case</span> CHOICES_SCALE_UP_BUTTON:
-<a name="l00889"></a>00889                 vChangeScaleFactor(pMouse-&gt;window, 5);
-<a name="l00890"></a>00890                 <span class="keywordflow">break</span>;
-<a name="l00891"></a>00891         <span class="keywordflow">case</span> CHOICES_SCALE_DOWN_BUTTON:
-<a name="l00892"></a>00892                 vChangeScaleFactor(pMouse-&gt;window, -5);
-<a name="l00893"></a>00893                 <span class="keywordflow">break</span>;
-<a name="l00894"></a>00894         <span class="keywordflow">default</span>:
-<a name="l00895"></a>00895                 DBG_DEC(pMouse-&gt;icon);
-<a name="l00896"></a>00896                 <span class="keywordflow">break</span>;
-<a name="l00897"></a>00897         }
-<a name="l00898"></a>00898         <span class="keywordflow">if</span> (bCloseWindow) {
-<a name="l00899"></a>00899                 Error_CheckFatal(Wimp_CloseWindow(pMouse-&gt;window));
-<a name="l00900"></a>00900         }
-<a name="l00901"></a>00901         <span class="keywordflow">return</span> TRUE;
-<a name="l00902"></a>00902 } <span class="comment">/* end of bChoicesMouseClick */</span>
-<a name="l00903"></a>00903 
-<a name="l00904"></a>00904 <span class="comment">/*</span>
-<a name="l00905"></a>00905 <span class="comment"> * bChoicesKeyPressed - handle a key in the Choices window</span>
-<a name="l00906"></a>00906 <span class="comment"> */</span>
-<a name="l00907"></a>00907 BOOL
-<a name="l00908"></a>00908 bChoicesKeyPressed(event_pollblock *pEvent, <span class="keywordtype">void</span> *pvReference)
-<a name="l00909"></a>00909 {
-<a name="l00910"></a>00910         icon_block      tIcon;
-<a name="l00911"></a>00911         caret_block     *pCaret;
-<a name="l00912"></a>00912         <span class="keywordtype">char</span>            *pcChar;
-<a name="l00913"></a>00913         <span class="keywordtype">int</span>             iNumber;
-<a name="l00914"></a>00914 
-<a name="l00915"></a>00915         DBG_MSG(<span class="stringliteral">&quot;bChoicesKeyPressed&quot;</span>);
-<a name="l00916"></a>00916 
-<a name="l00917"></a>00917         fail(pEvent == NULL);
-<a name="l00918"></a>00918         fail(pEvent-&gt;type != event_KEY);
-<a name="l00919"></a>00919 
-<a name="l00920"></a>00920         <span class="keywordflow">if</span> (pEvent-&gt;data.key.code != <span class="charliteral">&#39;\r&#39;</span>) {
-<a name="l00921"></a>00921                 Error_CheckFatal(Wimp_ProcessKey(pEvent-&gt;data.key.code));
-<a name="l00922"></a>00922                 <span class="keywordflow">return</span> TRUE;
-<a name="l00923"></a>00923         }
-<a name="l00924"></a>00924 
-<a name="l00925"></a>00925         pCaret = &amp;pEvent-&gt;data.key.caret;
-<a name="l00926"></a>00926 
-<a name="l00927"></a>00927         Error_CheckFatal(Wimp_GetIconState(pCaret-&gt;window, pCaret-&gt;icon, &amp;tIcon));
-<a name="l00928"></a>00928         <span class="keywordflow">if</span> (!tIcon.flags.data.text || !tIcon.flags.data.indirected) {
-<a name="l00929"></a>00929                 werr(1, <span class="stringliteral">&quot;Icon %d must be indirected text&quot;</span>, (<span class="keywordtype">int</span>)pCaret-&gt;icon);
-<a name="l00930"></a>00930         }
-<a name="l00931"></a>00931         iNumber = (int)strtol(tIcon.data.indirecttext.buffer, &amp;pcChar, 10);
-<a name="l00932"></a>00932 
-<a name="l00933"></a>00933         <span class="keywordflow">switch</span>(pCaret-&gt;icon) {
-<a name="l00934"></a>00934         <span class="keywordflow">case</span> CHOICES_BREAK_WRITEABLE:
-<a name="l00935"></a>00935                 <span class="keywordflow">if</span> (*pcChar != <span class="charliteral">&#39;\0&#39;</span> &amp;&amp; *pcChar != <span class="charliteral">&#39;\r&#39;</span>) {
-<a name="l00936"></a>00936                         DBG_DEC(*pcChar);
-<a name="l00937"></a>00937                         iNumber = DEFAULT_SCREEN_WIDTH;
-<a name="l00938"></a>00938                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (iNumber &lt; MIN_SCREEN_WIDTH) {
-<a name="l00939"></a>00939                         iNumber = MIN_SCREEN_WIDTH;
-<a name="l00940"></a>00940                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (iNumber &gt; MAX_SCREEN_WIDTH) {
-<a name="l00941"></a>00941                         iNumber = MAX_SCREEN_WIDTH;
-<a name="l00942"></a>00942                 }
-<a name="l00943"></a>00943                 vSetParagraphBreak(pCaret-&gt;window, iNumber);
-<a name="l00944"></a>00944                 <span class="keywordflow">break</span>;
-<a name="l00945"></a>00945         <span class="keywordflow">case</span> CHOICES_SCALE_WRITEABLE:
-<a name="l00946"></a>00946                 <span class="keywordflow">if</span> (*pcChar != <span class="charliteral">&#39;\0&#39;</span> &amp;&amp; *pcChar != <span class="charliteral">&#39;\r&#39;</span>) {
-<a name="l00947"></a>00947                         DBG_DEC(*pcChar);
-<a name="l00948"></a>00948                         iNumber = DEFAULT_SCALE_FACTOR;
-<a name="l00949"></a>00949                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (iNumber &lt; MIN_SCALE_FACTOR) {
-<a name="l00950"></a>00950                         iNumber = MIN_SCALE_FACTOR;
-<a name="l00951"></a>00951                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (iNumber &gt; MAX_SCALE_FACTOR) {
-<a name="l00952"></a>00952                         iNumber = MAX_SCALE_FACTOR;
-<a name="l00953"></a>00953                 }
-<a name="l00954"></a>00954                 vSetScaleFactor(pCaret-&gt;window, iNumber);
-<a name="l00955"></a>00955                 <span class="keywordflow">break</span>;
-<a name="l00956"></a>00956         <span class="keywordflow">default</span>:
-<a name="l00957"></a>00957                 DBG_DEC(pCaret-&gt;icon);
-<a name="l00958"></a>00958                 <span class="keywordflow">break</span>;
-<a name="l00959"></a>00959         }
-<a name="l00960"></a>00960         <span class="keywordflow">return</span> TRUE;
-<a name="l00961"></a>00961 } <span class="comment">/* end of bChoicesKeyPressed */</span>
-<a name="l00962"></a>00962 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/out2window_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,784 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/out2window.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/out2window.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * out2window.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2005 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Output to a text window</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;ctype.h&gt;</span>
-<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00013"></a>00013 
-<a name="l00014"></a>00014 <span class="comment">/* Used for numbering the chapters */</span>
-<a name="l00015"></a>00015 <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>     auiHdrCounter[9];
-<a name="l00016"></a>00016 
-<a name="l00017"></a>00017 
-<a name="l00018"></a>00018 <span class="comment">/*</span>
-<a name="l00019"></a>00019 <span class="comment"> * vString2Diagram - put a string into a diagram</span>
-<a name="l00020"></a>00020 <span class="comment"> */</span>
-<a name="l00021"></a>00021 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00022"></a>00022 vString2Diagram(diagram_type *pDiag, output_type *pAnchor)
-<a name="l00023"></a>00023 {
-<a name="l00024"></a>00024         output_type     *pOutput;
-<a name="l00025"></a>00025         <span class="keywordtype">long</span>            lWidth;
-<a name="l00026"></a>00026         USHORT          usMaxFontSize;
-<a name="l00027"></a>00027 
-<a name="l00028"></a>00028         TRACE_MSG(<span class="stringliteral">&quot;vString2Diagram&quot;</span>);
-<a name="l00029"></a>00029 
-<a name="l00030"></a>00030         fail(pDiag == NULL);
-<a name="l00031"></a>00031         fail(pAnchor == NULL);
-<a name="l00032"></a>00032 
-<a name="l00033"></a>00033         <span class="comment">/* Compute the maximum fontsize in this string */</span>
-<a name="l00034"></a>00034         usMaxFontSize = MIN_FONT_SIZE;
-<a name="l00035"></a>00035         <span class="keywordflow">for</span> (pOutput = pAnchor; pOutput != NULL; pOutput = pOutput-&gt;pNext) {
-<a name="l00036"></a>00036                 <span class="keywordflow">if</span> (pOutput-&gt;usFontSize &gt; usMaxFontSize) {
-<a name="l00037"></a>00037                         usMaxFontSize = pOutput-&gt;usFontSize;
-<a name="l00038"></a>00038                 }
-<a name="l00039"></a>00039         }
-<a name="l00040"></a>00040 
-<a name="l00041"></a>00041         <span class="comment">/* Goto the next line */</span>
-<a name="l00042"></a>00042         vMove2NextLine(pDiag, pAnchor-&gt;tFontRef, usMaxFontSize);
-<a name="l00043"></a>00043 
-<a name="l00044"></a>00044         <span class="comment">/* Output all substrings */</span>
-<a name="l00045"></a>00045         <span class="keywordflow">for</span> (pOutput = pAnchor; pOutput != NULL; pOutput = pOutput-&gt;pNext) {
-<a name="l00046"></a>00046                 lWidth = lMilliPoints2DrawUnits(pOutput-&gt;lStringWidth);
-<a name="l00047"></a>00047                 vSubstring2Diagram(pDiag, pOutput-&gt;szStorage,
-<a name="l00048"></a>00048                         pOutput-&gt;tNextFree, lWidth, pOutput-&gt;ucFontColor,
-<a name="l00049"></a>00049                         pOutput-&gt;usFontStyle, pOutput-&gt;tFontRef,
-<a name="l00050"></a>00050                         pOutput-&gt;usFontSize, usMaxFontSize);
-<a name="l00051"></a>00051         }
-<a name="l00052"></a>00052 
-<a name="l00053"></a>00053         <span class="comment">/* Goto the start of the line */</span>
-<a name="l00054"></a>00054         pDiag-&gt;lXleft = 0;
-<a name="l00055"></a>00055         TRACE_MSG(<span class="stringliteral">&quot;leaving vString2Diagram&quot;</span>);
-<a name="l00056"></a>00056 } <span class="comment">/* end of vString2Diagram */</span>
-<a name="l00057"></a>00057 
-<a name="l00058"></a>00058 <span class="comment">/*</span>
-<a name="l00059"></a>00059 <span class="comment"> * vSetLeftIndentation - set the left indentation of the specified diagram</span>
-<a name="l00060"></a>00060 <span class="comment"> */</span>
-<a name="l00061"></a>00061 <span class="keywordtype">void</span>
-<a name="l00062"></a>00062 vSetLeftIndentation(diagram_type *pDiag, <span class="keywordtype">long</span> lLeftIndentation)
-<a name="l00063"></a>00063 {
-<a name="l00064"></a>00064         <span class="keywordtype">long</span>    lX;
-<a name="l00065"></a>00065 
-<a name="l00066"></a>00066         TRACE_MSG(<span class="stringliteral">&quot;vSetLeftIndentation&quot;</span>);
-<a name="l00067"></a>00067 
-<a name="l00068"></a>00068         fail(pDiag == NULL);
-<a name="l00069"></a>00069         fail(lLeftIndentation &lt; 0);
-<a name="l00070"></a>00070 
-<a name="l00071"></a>00071         lX = lMilliPoints2DrawUnits(lLeftIndentation);
-<a name="l00072"></a>00072         <span class="keywordflow">if</span> (lX &gt; 0) {
-<a name="l00073"></a>00073                 pDiag-&gt;lXleft = lX;
-<a name="l00074"></a>00074         } <span class="keywordflow">else</span> {
-<a name="l00075"></a>00075                 pDiag-&gt;lXleft = 0;
-<a name="l00076"></a>00076         }
-<a name="l00077"></a>00077 } <span class="comment">/* end of vSetLeftIndentation */</span>
-<a name="l00078"></a>00078 
-<a name="l00079"></a>00079 <span class="comment">/*</span>
-<a name="l00080"></a>00080 <span class="comment"> * lComputeNetWidth - compute the net string width</span>
-<a name="l00081"></a>00081 <span class="comment"> */</span>
-<a name="l00082"></a>00082 <span class="keyword">static</span> <span class="keywordtype">long</span>
-<a name="l00083"></a>00083 lComputeNetWidth(output_type *pAnchor)
-<a name="l00084"></a>00084 {
-<a name="l00085"></a>00085         output_type     *pTmp;
-<a name="l00086"></a>00086         <span class="keywordtype">long</span>            lNetWidth;
-<a name="l00087"></a>00087 
-<a name="l00088"></a>00088         TRACE_MSG(<span class="stringliteral">&quot;lComputeNetWidth&quot;</span>);
-<a name="l00089"></a>00089 
-<a name="l00090"></a>00090         fail(pAnchor == NULL);
-<a name="l00091"></a>00091 
-<a name="l00092"></a>00092         <span class="comment">/* Step 1: Count all but the last sub-string */</span>
-<a name="l00093"></a>00093         lNetWidth = 0;
-<a name="l00094"></a>00094         <span class="keywordflow">for</span> (pTmp = pAnchor; pTmp-&gt;pNext != NULL; pTmp = pTmp-&gt;pNext) {
-<a name="l00095"></a>00095                 fail(pTmp-&gt;lStringWidth &lt; 0);
-<a name="l00096"></a>00096                 lNetWidth += pTmp-&gt;lStringWidth;
-<a name="l00097"></a>00097         }
-<a name="l00098"></a>00098         fail(pTmp == NULL);
-<a name="l00099"></a>00099         fail(pTmp-&gt;pNext != NULL);
-<a name="l00100"></a>00100 
-<a name="l00101"></a>00101         <span class="comment">/* Step 2: remove the white-space from the end of the string */</span>
-<a name="l00102"></a>00102         <span class="keywordflow">while</span> (pTmp-&gt;tNextFree != 0 &amp;&amp;
-<a name="l00103"></a>00103                isspace((<span class="keywordtype">int</span>)(UCHAR)pTmp-&gt;szStorage[pTmp-&gt;tNextFree - 1])) {
-<a name="l00104"></a>00104                 pTmp-&gt;szStorage[pTmp-&gt;tNextFree - 1] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00105"></a>00105                 pTmp-&gt;tNextFree--;
-<a name="l00106"></a>00106                 NO_DBG_DEC(pTmp-&gt;lStringWidth);
-<a name="l00107"></a>00107                 pTmp-&gt;lStringWidth = lComputeStringWidth(
-<a name="l00108"></a>00108                                                 pTmp-&gt;szStorage,
-<a name="l00109"></a>00109                                                 pTmp-&gt;tNextFree,
-<a name="l00110"></a>00110                                                 pTmp-&gt;tFontRef,
-<a name="l00111"></a>00111                                                 pTmp-&gt;usFontSize);
-<a name="l00112"></a>00112                 NO_DBG_DEC(pTmp-&gt;lStringWidth);
-<a name="l00113"></a>00113         }
-<a name="l00114"></a>00114 
-<a name="l00115"></a>00115         <span class="comment">/* Step 3: Count the last sub-string */</span>
-<a name="l00116"></a>00116         lNetWidth += pTmp-&gt;lStringWidth;
-<a name="l00117"></a>00117         <span class="keywordflow">return</span> lNetWidth;
-<a name="l00118"></a>00118 } <span class="comment">/* end of lComputeNetWidth */</span>
-<a name="l00119"></a>00119 
-<a name="l00120"></a>00120 <span class="comment">/*</span>
-<a name="l00121"></a>00121 <span class="comment"> * iComputeHoles - compute number of holes</span>
-<a name="l00122"></a>00122 <span class="comment"> * (A hole is a number of whitespace characters followed by a</span>
-<a name="l00123"></a>00123 <span class="comment"> *  non-whitespace character)</span>
-<a name="l00124"></a>00124 <span class="comment"> */</span>
-<a name="l00125"></a>00125 <span class="keyword">static</span> <span class="keywordtype">int</span>
-<a name="l00126"></a>00126 iComputeHoles(output_type *pAnchor)
-<a name="l00127"></a>00127 {
-<a name="l00128"></a>00128         output_type     *pTmp;
-<a name="l00129"></a>00129         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00130"></a>00130         <span class="keywordtype">int</span>     iCounter;
-<a name="l00131"></a>00131         BOOL    bWasSpace, bIsSpace;
-<a name="l00132"></a>00132 
-<a name="l00133"></a>00133         TRACE_MSG(<span class="stringliteral">&quot;iComputeHoles&quot;</span>);
-<a name="l00134"></a>00134 
-<a name="l00135"></a>00135         fail(pAnchor == NULL);
-<a name="l00136"></a>00136 
-<a name="l00137"></a>00137         iCounter = 0;
-<a name="l00138"></a>00138         bIsSpace = FALSE;
-<a name="l00139"></a>00139         <span class="comment">/* Count the holes */</span>
-<a name="l00140"></a>00140         <span class="keywordflow">for</span> (pTmp = pAnchor; pTmp != NULL; pTmp = pTmp-&gt;pNext) {
-<a name="l00141"></a>00141                 fail(pTmp-&gt;tNextFree != strlen(pTmp-&gt;szStorage));
-<a name="l00142"></a>00142                 <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt;= pTmp-&gt;tNextFree; tIndex++) {
-<a name="l00143"></a>00143                         bWasSpace = bIsSpace;
-<a name="l00144"></a>00144                         bIsSpace = isspace((<span class="keywordtype">int</span>)(UCHAR)pTmp-&gt;szStorage[tIndex]);
-<a name="l00145"></a>00145                         <span class="keywordflow">if</span> (bWasSpace &amp;&amp; !bIsSpace) {
-<a name="l00146"></a>00146                                 iCounter++;
-<a name="l00147"></a>00147                         }
-<a name="l00148"></a>00148                 }
-<a name="l00149"></a>00149         }
-<a name="l00150"></a>00150         <span class="keywordflow">return</span> iCounter;
-<a name="l00151"></a>00151 } <span class="comment">/* end of iComputeHoles */</span>
-<a name="l00152"></a>00152 
-<a name="l00153"></a>00153 <span class="comment">/*</span>
-<a name="l00154"></a>00154 <span class="comment"> * vAlign2Window - Align a string and insert it into the text</span>
-<a name="l00155"></a>00155 <span class="comment"> */</span>
-<a name="l00156"></a>00156 <span class="keywordtype">void</span>
-<a name="l00157"></a>00157 vAlign2Window(diagram_type *pDiag, output_type *pAnchor,
-<a name="l00158"></a>00158         <span class="keywordtype">long</span> lScreenWidth, UCHAR ucAlignment)
-<a name="l00159"></a>00159 {
-<a name="l00160"></a>00160         <span class="keywordtype">long</span>    lNetWidth, lLeftIndentation;
-<a name="l00161"></a>00161 
-<a name="l00162"></a>00162         TRACE_MSG(<span class="stringliteral">&quot;vAlign2Window&quot;</span>);
-<a name="l00163"></a>00163 
-<a name="l00164"></a>00164         fail(pDiag == NULL || pAnchor == NULL);
-<a name="l00165"></a>00165         fail(lScreenWidth &lt; lChar2MilliPoints(MIN_SCREEN_WIDTH));
-<a name="l00166"></a>00166 
-<a name="l00167"></a>00167         lNetWidth = lComputeNetWidth(pAnchor);
-<a name="l00168"></a>00168 
-<a name="l00169"></a>00169         <span class="keywordflow">if</span> (lScreenWidth &gt; lChar2MilliPoints(MAX_SCREEN_WIDTH) ||
-<a name="l00170"></a>00170             lNetWidth &lt;= 0) {
-<a name="l00171"></a>00171                 <span class="comment">/*</span>
-<a name="l00172"></a>00172 <span class="comment">                 * Screenwidth is &quot;infinite&quot;, so no alignment is possible</span>
-<a name="l00173"></a>00173 <span class="comment">                 * Don&#39;t bother to align an empty line</span>
-<a name="l00174"></a>00174 <span class="comment">                 */</span>
-<a name="l00175"></a>00175                 vString2Diagram(pDiag, pAnchor);
-<a name="l00176"></a>00176                 TRACE_MSG(<span class="stringliteral">&quot;leaving vAlign2Window #1&quot;</span>);
-<a name="l00177"></a>00177                 <span class="keywordflow">return</span>;
-<a name="l00178"></a>00178         }
-<a name="l00179"></a>00179 
-<a name="l00180"></a>00180         <span class="keywordflow">switch</span> (ucAlignment) {
-<a name="l00181"></a>00181         <span class="keywordflow">case</span> ALIGNMENT_CENTER:
-<a name="l00182"></a>00182                 lLeftIndentation = (lScreenWidth - lNetWidth) / 2;
-<a name="l00183"></a>00183                 DBG_DEC_C(lLeftIndentation &lt; 0, lLeftIndentation);
-<a name="l00184"></a>00184                 <span class="keywordflow">if</span> (lLeftIndentation &gt; 0) {
-<a name="l00185"></a>00185                         vSetLeftIndentation(pDiag, lLeftIndentation);
-<a name="l00186"></a>00186                 }
-<a name="l00187"></a>00187                 <span class="keywordflow">break</span>;
-<a name="l00188"></a>00188         <span class="keywordflow">case</span> ALIGNMENT_RIGHT:
-<a name="l00189"></a>00189                 lLeftIndentation = lScreenWidth - lNetWidth;
-<a name="l00190"></a>00190                 DBG_DEC_C(lLeftIndentation &lt; 0, lLeftIndentation);
-<a name="l00191"></a>00191                 <span class="keywordflow">if</span> (lLeftIndentation &gt; 0) {
-<a name="l00192"></a>00192                         vSetLeftIndentation(pDiag, lLeftIndentation);
-<a name="l00193"></a>00193                 }
-<a name="l00194"></a>00194                 <span class="keywordflow">break</span>;
-<a name="l00195"></a>00195         <span class="keywordflow">case</span> ALIGNMENT_JUSTIFY:
-<a name="l00196"></a>00196         <span class="keywordflow">case</span> ALIGNMENT_LEFT:
-<a name="l00197"></a>00197         <span class="keywordflow">default</span>:
-<a name="l00198"></a>00198                 <span class="keywordflow">break</span>;
-<a name="l00199"></a>00199         }
-<a name="l00200"></a>00200         vString2Diagram(pDiag, pAnchor);
-<a name="l00201"></a>00201         TRACE_MSG(<span class="stringliteral">&quot;leaving vAlign2Window #2&quot;</span>);
-<a name="l00202"></a>00202 } <span class="comment">/* end of vAlign2Window */</span>
-<a name="l00203"></a>00203 
-<a name="l00204"></a>00204 <span class="comment">/*</span>
-<a name="l00205"></a>00205 <span class="comment"> * vJustify2Window - Justify a string and insert it into the text</span>
-<a name="l00206"></a>00206 <span class="comment"> */</span>
-<a name="l00207"></a>00207 <span class="keywordtype">void</span>
-<a name="l00208"></a>00208 vJustify2Window(diagram_type *pDiag, output_type *pAnchor,
-<a name="l00209"></a>00209         <span class="keywordtype">long</span> lScreenWidth, <span class="keywordtype">long</span> lRightIndentation, UCHAR ucAlignment)
-<a name="l00210"></a>00210 {
-<a name="l00211"></a>00211         output_type     *pTmp;
-<a name="l00212"></a>00212         <span class="keywordtype">char</span>    *pcNew, *pcOld, *szStorage;
-<a name="l00213"></a>00213         <span class="keywordtype">long</span>    lNetWidth, lSpaceWidth, lToAdd;
-<a name="l00214"></a>00214         <span class="keywordtype">int</span>     iFillerLen, iHoles;
-<a name="l00215"></a>00215 
-<a name="l00216"></a>00216         TRACE_MSG(<span class="stringliteral">&quot;vJustify2Window&quot;</span>);
-<a name="l00217"></a>00217 
-<a name="l00218"></a>00218         fail(pDiag == NULL || pAnchor == NULL);
-<a name="l00219"></a>00219         fail(lScreenWidth &lt; MIN_SCREEN_WIDTH);
-<a name="l00220"></a>00220         fail(lRightIndentation &gt; 0);
-<a name="l00221"></a>00221 
-<a name="l00222"></a>00222         <span class="keywordflow">if</span> (ucAlignment != ALIGNMENT_JUSTIFY) {
-<a name="l00223"></a>00223                 vAlign2Window(pDiag, pAnchor, lScreenWidth, ucAlignment);
-<a name="l00224"></a>00224                 <span class="keywordflow">return</span>;
-<a name="l00225"></a>00225         }
-<a name="l00226"></a>00226 
-<a name="l00227"></a>00227         lNetWidth = lComputeNetWidth(pAnchor);
-<a name="l00228"></a>00228 
-<a name="l00229"></a>00229         <span class="keywordflow">if</span> (lScreenWidth &gt; lChar2MilliPoints(MAX_SCREEN_WIDTH) ||
-<a name="l00230"></a>00230             lNetWidth &lt;= 0) {
-<a name="l00231"></a>00231                 <span class="comment">/*</span>
-<a name="l00232"></a>00232 <span class="comment">                 * Screenwidth is &quot;infinite&quot;, so justify is not possible</span>
-<a name="l00233"></a>00233 <span class="comment">                 * Don&#39;t bother to justify an empty line</span>
-<a name="l00234"></a>00234 <span class="comment">                 */</span>
-<a name="l00235"></a>00235                 vString2Diagram(pDiag, pAnchor);
-<a name="l00236"></a>00236                 TRACE_MSG(<span class="stringliteral">&quot;leaving vJustify2Window #1&quot;</span>);
-<a name="l00237"></a>00237                 <span class="keywordflow">return</span>;
-<a name="l00238"></a>00238         }
-<a name="l00239"></a>00239 
-<a name="l00240"></a>00240         <span class="comment">/* Justify */</span>
-<a name="l00241"></a>00241         fail(ucAlignment != ALIGNMENT_JUSTIFY);
-<a name="l00242"></a>00242         lSpaceWidth = lComputeStringWidth(<span class="stringliteral">&quot; &quot;</span>, 1,
-<a name="l00243"></a>00243                                 pAnchor-&gt;tFontRef, pAnchor-&gt;usFontSize);
-<a name="l00244"></a>00244         lToAdd = lScreenWidth -
-<a name="l00245"></a>00245                         lNetWidth -
-<a name="l00246"></a>00246                         lDrawUnits2MilliPoints(pDiag-&gt;lXleft) +
-<a name="l00247"></a>00247                         lRightIndentation;
-<a name="l00248"></a>00248 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00249"></a>00249 <span class="preprocessor"></span>        <span class="keywordflow">if</span> (lToAdd / lSpaceWidth &lt; -1) {
-<a name="l00250"></a>00250                 DBG_DEC(lSpaceWidth);
-<a name="l00251"></a>00251                 DBG_DEC(lToAdd);
-<a name="l00252"></a>00252                 DBG_DEC(lScreenWidth);
-<a name="l00253"></a>00253                 DBG_DEC(lNetWidth);
-<a name="l00254"></a>00254                 DBG_DEC(lDrawUnits2MilliPoints(pDiag-&gt;lXleft));
-<a name="l00255"></a>00255                 DBG_DEC(pDiag-&gt;lXleft);
-<a name="l00256"></a>00256                 DBG_DEC(lRightIndentation);
-<a name="l00257"></a>00257         }
-<a name="l00258"></a>00258 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00259"></a>00259         lToAdd /= lSpaceWidth;
-<a name="l00260"></a>00260         DBG_DEC_C(lToAdd &lt; 0, lToAdd);
-<a name="l00261"></a>00261         <span class="keywordflow">if</span> (lToAdd &lt;= 0) {
-<a name="l00262"></a>00262                 vString2Diagram(pDiag, pAnchor);
-<a name="l00263"></a>00263                 TRACE_MSG(<span class="stringliteral">&quot;leaving vJustify2Window #2&quot;</span>);
-<a name="l00264"></a>00264                 <span class="keywordflow">return</span>;
-<a name="l00265"></a>00265         }
-<a name="l00266"></a>00266 
-<a name="l00267"></a>00267         <span class="comment">/* Justify by adding spaces */</span>
-<a name="l00268"></a>00268         iHoles = iComputeHoles(pAnchor);
-<a name="l00269"></a>00269         <span class="keywordflow">for</span> (pTmp = pAnchor; pTmp != NULL; pTmp = pTmp-&gt;pNext) {
-<a name="l00270"></a>00270                 fail(pTmp-&gt;tNextFree != strlen(pTmp-&gt;szStorage));
-<a name="l00271"></a>00271                 fail(lToAdd &lt; 0);
-<a name="l00272"></a>00272                 szStorage = xmalloc(pTmp-&gt;tNextFree + (<span class="keywordtype">size_t</span>)lToAdd + 1);
-<a name="l00273"></a>00273                 pcNew = szStorage;
-<a name="l00274"></a>00274                 <span class="keywordflow">for</span> (pcOld = pTmp-&gt;szStorage; *pcOld != <span class="charliteral">&#39;\0&#39;</span>; pcOld++) {
-<a name="l00275"></a>00275                         *pcNew++ = *pcOld;
-<a name="l00276"></a>00276                         <span class="keywordflow">if</span> (*pcOld == <span class="charliteral">&#39; &#39;</span> &amp;&amp;
-<a name="l00277"></a>00277                             *(pcOld + 1) != <span class="charliteral">&#39; &#39;</span> &amp;&amp;
-<a name="l00278"></a>00278                             iHoles &gt; 0) {
-<a name="l00279"></a>00279                                 iFillerLen = (int)(lToAdd / iHoles);
-<a name="l00280"></a>00280                                 lToAdd -= iFillerLen;
-<a name="l00281"></a>00281                                 iHoles--;
-<a name="l00282"></a>00282                                 <span class="keywordflow">for</span> (; iFillerLen &gt; 0; iFillerLen--) {
-<a name="l00283"></a>00283                                         *pcNew++ = <span class="charliteral">&#39; &#39;</span>;
-<a name="l00284"></a>00284                                 }
-<a name="l00285"></a>00285                         }
-<a name="l00286"></a>00286                 }
-<a name="l00287"></a>00287                 *pcNew = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00288"></a>00288                 pTmp-&gt;szStorage = xfree(pTmp-&gt;szStorage);
-<a name="l00289"></a>00289                 pTmp-&gt;szStorage = szStorage;
-<a name="l00290"></a>00290                 pTmp-&gt;tStorageSize = pTmp-&gt;tNextFree + (size_t)lToAdd + 1;
-<a name="l00291"></a>00291                 pTmp-&gt;lStringWidth +=
-<a name="l00292"></a>00292                         (pcNew - szStorage - (long)pTmp-&gt;tNextFree) *
-<a name="l00293"></a>00293                         lSpaceWidth;
-<a name="l00294"></a>00294                 fail(pcNew &lt; szStorage);
-<a name="l00295"></a>00295                 pTmp-&gt;tNextFree = (size_t)(pcNew - szStorage);
-<a name="l00296"></a>00296                 fail(pTmp-&gt;tNextFree != strlen(pTmp-&gt;szStorage));
-<a name="l00297"></a>00297         }
-<a name="l00298"></a>00298         DBG_DEC_C(lToAdd != 0, lToAdd);
-<a name="l00299"></a>00299         vString2Diagram(pDiag, pAnchor);
-<a name="l00300"></a>00300         TRACE_MSG(<span class="stringliteral">&quot;leaving vJustify2Window #3&quot;</span>);
-<a name="l00301"></a>00301 } <span class="comment">/* end of vJustify2Window */</span>
-<a name="l00302"></a>00302 
-<a name="l00303"></a>00303 <span class="comment">/*</span>
-<a name="l00304"></a>00304 <span class="comment"> * vResetStyles - reset the style information variables</span>
-<a name="l00305"></a>00305 <span class="comment"> */</span>
-<a name="l00306"></a>00306 <span class="keywordtype">void</span>
-<a name="l00307"></a>00307 vResetStyles(<span class="keywordtype">void</span>)
-<a name="l00308"></a>00308 {
-<a name="l00309"></a>00309         TRACE_MSG(<span class="stringliteral">&quot;vResetStyles&quot;</span>);
-<a name="l00310"></a>00310 
-<a name="l00311"></a>00311         (void)memset(auiHdrCounter, 0, <span class="keyword">sizeof</span>(auiHdrCounter));
-<a name="l00312"></a>00312 } <span class="comment">/* end of vResetStyles */</span>
-<a name="l00313"></a>00313 
-<a name="l00314"></a>00314 <span class="comment">/*</span>
-<a name="l00315"></a>00315 <span class="comment"> * tStyle2Window - Add the style characters to the line</span>
-<a name="l00316"></a>00316 <span class="comment"> *</span>
-<a name="l00317"></a>00317 <span class="comment"> * Returns the length of the resulting string</span>
-<a name="l00318"></a>00318 <span class="comment"> */</span>
-<a name="l00319"></a>00319 <span class="keywordtype">size_t</span>
-<a name="l00320"></a>00320 tStyle2Window(<span class="keywordtype">char</span> *szLine, <span class="keywordtype">size_t</span> tLineSize, <span class="keyword">const</span> style_block_type *pStyle,
-<a name="l00321"></a>00321         <span class="keyword">const</span> section_block_type *pSection)
-<a name="l00322"></a>00322 {
-<a name="l00323"></a>00323         <span class="keywordtype">char</span>    *pcTxt;
-<a name="l00324"></a>00324         <span class="keywordtype">size_t</span>  tIndex, tStyleIndex;
-<a name="l00325"></a>00325         BOOL    bNeedPrevLvl;
-<a name="l00326"></a>00326         level_type_enum eNumType;
-<a name="l00327"></a>00327         UCHAR   ucNFC;
-<a name="l00328"></a>00328 
-<a name="l00329"></a>00329         TRACE_MSG(<span class="stringliteral">&quot;tStyle2Window&quot;</span>);
-<a name="l00330"></a>00330 
-<a name="l00331"></a>00331         fail(szLine == NULL || pStyle == NULL || pSection == NULL);
-<a name="l00332"></a>00332 
-<a name="l00333"></a>00333         <span class="keywordflow">if</span> (pStyle-&gt;usIstd == 0 || pStyle-&gt;usIstd &gt; 9) {
-<a name="l00334"></a>00334                 szLine[0] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00335"></a>00335                 <span class="keywordflow">return</span> 0;
-<a name="l00336"></a>00336         }
-<a name="l00337"></a>00337 
-<a name="l00338"></a>00338         <span class="comment">/* Set the numbers */</span>
-<a name="l00339"></a>00339         tStyleIndex = (size_t)pStyle-&gt;usIstd - 1;
-<a name="l00340"></a>00340         <a class="code" href="interfacefor.html">for</a> (tIndex = 0; tIndex &lt; 9; tIndex++) {
-<a name="l00341"></a>00341                 <span class="keywordflow">if</span> (tIndex == tStyleIndex) {
-<a name="l00342"></a>00342                         auiHdrCounter[tIndex]++;
-<a name="l00343"></a>00343                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (tIndex &gt; tStyleIndex) {
-<a name="l00344"></a>00344                         auiHdrCounter[tIndex] = 0;
-<a name="l00345"></a>00345                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (auiHdrCounter[tIndex] == 0) {
-<a name="l00346"></a>00346                         auiHdrCounter[tIndex] = 1;
-<a name="l00347"></a>00347                 }
-<a name="l00348"></a>00348         }
-<a name="l00349"></a>00349 
-<a name="l00350"></a>00350         eNumType = eGetNumType(pStyle-&gt;ucNumLevel);
-<a name="l00351"></a>00351         <span class="keywordflow">if</span> (eNumType != level_type_outline) {
-<a name="l00352"></a>00352                 szLine[0] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00353"></a>00353                 <span class="keywordflow">return</span> 0;
-<a name="l00354"></a>00354         }
-<a name="l00355"></a>00355 
-<a name="l00356"></a>00356         <span class="comment">/* Print the numbers */</span>
-<a name="l00357"></a>00357         pcTxt = szLine;
-<a name="l00358"></a>00358         bNeedPrevLvl = (pSection-&gt;usNeedPrevLvl &amp; BIT(tStyleIndex)) != 0;
-<a name="l00359"></a>00359         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt;= tStyleIndex; tIndex++) {
-<a name="l00360"></a>00360                 <span class="keywordflow">if</span> (tIndex == tStyleIndex ||
-<a name="l00361"></a>00361                     (bNeedPrevLvl &amp;&amp; tIndex &lt; tStyleIndex)) {
-<a name="l00362"></a>00362                         <span class="keywordflow">if</span> (pcTxt - szLine &gt;= tLineSize - 25) {
-<a name="l00363"></a>00363                                 <span class="comment">/* Prevent a possible buffer overflow */</span>
-<a name="l00364"></a>00364                                 DBG_DEC(pcTxt - szLine);
-<a name="l00365"></a>00365                                 DBG_DEC(tLineSize - 25);
-<a name="l00366"></a>00366                                 DBG_FIXME();
-<a name="l00367"></a>00367                                 szLine[0] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00368"></a>00368                                 <span class="keywordflow">return</span> 0;
-<a name="l00369"></a>00369                         }
-<a name="l00370"></a>00370                         ucNFC = pSection-&gt;aucNFC[tIndex];
-<a name="l00371"></a>00371                         <span class="keywordflow">switch</span>(ucNFC) {
-<a name="l00372"></a>00372                         <span class="keywordflow">case</span> LIST_ARABIC_NUM:
-<a name="l00373"></a>00373                         <span class="keywordflow">case</span> LIST_NUMBER_TXT:
-<a name="l00374"></a>00374                         <span class="keywordflow">case</span> LIST_ORDINAL_TXT:
-<a name="l00375"></a>00375                                 pcTxt += sprintf(pcTxt, <span class="stringliteral">&quot;%u&quot;</span>,
-<a name="l00376"></a>00376                                         auiHdrCounter[tIndex]);
-<a name="l00377"></a>00377                                 <span class="keywordflow">break</span>;
-<a name="l00378"></a>00378                         <span class="keywordflow">case</span> LIST_UPPER_ROMAN:
-<a name="l00379"></a>00379                         <span class="keywordflow">case</span> LIST_LOWER_ROMAN:
-<a name="l00380"></a>00380                                 pcTxt += tNumber2Roman(
-<a name="l00381"></a>00381                                         auiHdrCounter[tIndex],
-<a name="l00382"></a>00382                                         ucNFC == LIST_UPPER_ROMAN,
-<a name="l00383"></a>00383                                         pcTxt);
-<a name="l00384"></a>00384                                 <span class="keywordflow">break</span>;
-<a name="l00385"></a>00385                         <span class="keywordflow">case</span> LIST_UPPER_ALPHA:
-<a name="l00386"></a>00386                         <span class="keywordflow">case</span> LIST_LOWER_ALPHA:
-<a name="l00387"></a>00387                                 pcTxt += tNumber2Alpha(
-<a name="l00388"></a>00388                                         auiHdrCounter[tIndex],
-<a name="l00389"></a>00389                                         ucNFC == LIST_UPPER_ALPHA,
-<a name="l00390"></a>00390                                         pcTxt);
-<a name="l00391"></a>00391                                 <span class="keywordflow">break</span>;
-<a name="l00392"></a>00392                         <span class="keywordflow">case</span> LIST_OUTLINE_NUM:
-<a name="l00393"></a>00393                                 pcTxt += sprintf(pcTxt, <span class="stringliteral">&quot;%02u&quot;</span>,
-<a name="l00394"></a>00394                                         auiHdrCounter[tIndex]);
-<a name="l00395"></a>00395                                 <span class="keywordflow">break</span>;
-<a name="l00396"></a>00396                         <span class="keywordflow">default</span>:
-<a name="l00397"></a>00397                                 DBG_DEC(ucNFC);
-<a name="l00398"></a>00398                                 DBG_FIXME();
-<a name="l00399"></a>00399                                 pcTxt += sprintf(pcTxt, <span class="stringliteral">&quot;%u&quot;</span>,
-<a name="l00400"></a>00400                                         auiHdrCounter[tIndex]);
-<a name="l00401"></a>00401                                 <span class="keywordflow">break</span>;
-<a name="l00402"></a>00402                         }
-<a name="l00403"></a>00403                         <span class="keywordflow">if</span> (tIndex &lt; tStyleIndex) {
-<a name="l00404"></a>00404                                 *pcTxt++ = <span class="charliteral">&#39;.&#39;</span>;
-<a name="l00405"></a>00405                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (tIndex == tStyleIndex) {
-<a name="l00406"></a>00406                                 *pcTxt++ = <span class="charliteral">&#39; &#39;</span>;
-<a name="l00407"></a>00407                         }
-<a name="l00408"></a>00408                 }
-<a name="l00409"></a>00409         }
-<a name="l00410"></a>00410         *pcTxt = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00411"></a>00411         NO_DBG_MSG_C((<span class="keywordtype">int</span>)pStyle-&gt;usIstd &gt;= 1 &amp;&amp;
-<a name="l00412"></a>00412                 (<span class="keywordtype">int</span>)pStyle-&gt;usIstd &lt;= 9 &amp;&amp;
-<a name="l00413"></a>00413                 eNumType != level_type_none &amp;&amp;
-<a name="l00414"></a>00414                 eNumType != level_type_outline, szLine);
-<a name="l00415"></a>00415         NO_DBG_MSG_C(szLine[0] != <span class="charliteral">&#39;\0&#39;</span>, szLine);
-<a name="l00416"></a>00416         fail(pcTxt &lt; szLine);
-<a name="l00417"></a>00417         <span class="keywordflow">return</span> (<span class="keywordtype">size_t</span>)(pcTxt - szLine);
-<a name="l00418"></a>00418 } <span class="comment">/* end of tStyle2Window */</span>
-<a name="l00419"></a>00419 
-<a name="l00420"></a>00420 <span class="comment">/*</span>
-<a name="l00421"></a>00421 <span class="comment"> * vRemoveRowEnd - remove the end of table row indicator</span>
-<a name="l00422"></a>00422 <span class="comment"> *</span>
-<a name="l00423"></a>00423 <span class="comment"> * Remove the double TABLE_SEPARATOR characters from the end of the string.</span>
-<a name="l00424"></a>00424 <span class="comment"> * Special: remove the TABLE_SEPARATOR, 0x0a sequence</span>
-<a name="l00425"></a>00425 <span class="comment"> */</span>
-<a name="l00426"></a>00426 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00427"></a>00427 vRemoveRowEnd(<span class="keywordtype">char</span> *szRowTxt)
-<a name="l00428"></a>00428 {
-<a name="l00429"></a>00429         <span class="keywordtype">int</span>     iLastIndex;
-<a name="l00430"></a>00430 
-<a name="l00431"></a>00431         TRACE_MSG(<span class="stringliteral">&quot;vRemoveRowEnd&quot;</span>);
-<a name="l00432"></a>00432 
-<a name="l00433"></a>00433         fail(szRowTxt == NULL || szRowTxt[0] == <span class="charliteral">&#39;\0&#39;</span>);
-<a name="l00434"></a>00434 
-<a name="l00435"></a>00435         iLastIndex = (int)strlen(szRowTxt) - 1;
-<a name="l00436"></a>00436 
-<a name="l00437"></a>00437         <span class="keywordflow">if</span> (szRowTxt[iLastIndex] == TABLE_SEPARATOR ||
-<a name="l00438"></a>00438             szRowTxt[iLastIndex] == (<span class="keywordtype">char</span>)0x0a) {
-<a name="l00439"></a>00439                 szRowTxt[iLastIndex] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00440"></a>00440                 iLastIndex--;
-<a name="l00441"></a>00441         } <span class="keywordflow">else</span> {
-<a name="l00442"></a>00442                 DBG_HEX(szRowTxt[iLastIndex]);
-<a name="l00443"></a>00443         }
-<a name="l00444"></a>00444 
-<a name="l00445"></a>00445         <span class="keywordflow">if</span> (iLastIndex &gt;= 0 &amp;&amp; szRowTxt[iLastIndex] == (<span class="keywordtype">char</span>)0x0a) {
-<a name="l00446"></a>00446                 szRowTxt[iLastIndex] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00447"></a>00447                 iLastIndex--;
-<a name="l00448"></a>00448         }
-<a name="l00449"></a>00449 
-<a name="l00450"></a>00450         <span class="keywordflow">if</span> (iLastIndex &gt;= 0 &amp;&amp; szRowTxt[iLastIndex] == TABLE_SEPARATOR) {
-<a name="l00451"></a>00451                 szRowTxt[iLastIndex] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00452"></a>00452                 <span class="keywordflow">return</span>;
-<a name="l00453"></a>00453         }
-<a name="l00454"></a>00454 
-<a name="l00455"></a>00455         DBG_DEC(iLastIndex);
-<a name="l00456"></a>00456         DBG_HEX(szRowTxt[iLastIndex]);
-<a name="l00457"></a>00457         DBG_MSG(szRowTxt);
-<a name="l00458"></a>00458 } <span class="comment">/* end of vRemoveRowEnd */</span>
-<a name="l00459"></a>00459 
-<a name="l00460"></a>00460 <span class="comment">/*</span>
-<a name="l00461"></a>00461 <span class="comment"> * tComputeStringLengthMax - max string length in relation to max column width</span>
-<a name="l00462"></a>00462 <span class="comment"> *</span>
-<a name="l00463"></a>00463 <span class="comment"> * Return the maximum string length</span>
-<a name="l00464"></a>00464 <span class="comment"> */</span>
-<a name="l00465"></a>00465 <span class="keyword">static</span> <span class="keywordtype">size_t</span>
-<a name="l00466"></a>00466 tComputeStringLengthMax(<span class="keyword">const</span> <span class="keywordtype">char</span> *szString, <span class="keywordtype">size_t</span> tColumnWidthMax)
-<a name="l00467"></a>00467 {
-<a name="l00468"></a>00468         <span class="keyword">const</span> <span class="keywordtype">char</span>      *pcTmp;
-<a name="l00469"></a>00469         <span class="keywordtype">size_t</span>  tLengthMax, tLenPrev, tLen, tWidth;
-<a name="l00470"></a>00470 
-<a name="l00471"></a>00471         TRACE_MSG(<span class="stringliteral">&quot;tComputeStringLengthMax&quot;</span>);
-<a name="l00472"></a>00472 
-<a name="l00473"></a>00473         fail(szString == NULL);
-<a name="l00474"></a>00474         fail(tColumnWidthMax == 0);
-<a name="l00475"></a>00475 
-<a name="l00476"></a>00476         pcTmp = strchr(szString, <span class="charliteral">&#39;\n&#39;</span>);
-<a name="l00477"></a>00477         <span class="keywordflow">if</span> (pcTmp != NULL) {
-<a name="l00478"></a>00478                 tLengthMax = (size_t)(pcTmp - szString + 1);
-<a name="l00479"></a>00479         } <span class="keywordflow">else</span> {
-<a name="l00480"></a>00480                 tLengthMax = strlen(szString);
-<a name="l00481"></a>00481         }
-<a name="l00482"></a>00482         <span class="keywordflow">if</span> (tLengthMax == 0) {
-<a name="l00483"></a>00483                 <span class="keywordflow">return</span> 0;
-<a name="l00484"></a>00484         }
-<a name="l00485"></a>00485 
-<a name="l00486"></a>00486         tLen = 0;
-<a name="l00487"></a>00487         tWidth = 0;
-<a name="l00488"></a>00488         <span class="keywordflow">for</span> (;;) {
-<a name="l00489"></a>00489                 tLenPrev = tLen;
-<a name="l00490"></a>00490                 tLen += tGetCharacterLength(szString + tLen);
-<a name="l00491"></a>00491                 DBG_DEC_C(tLen &gt; tLengthMax, tLen);
-<a name="l00492"></a>00492                 DBG_DEC_C(tLen &gt; tLengthMax, tLengthMax);
-<a name="l00493"></a>00493                 fail(tLen &gt; tLengthMax);
-<a name="l00494"></a>00494                 tWidth = tCountColumns(szString, tLen);
-<a name="l00495"></a>00495                 <span class="keywordflow">if</span> (tWidth &gt; tColumnWidthMax) {
-<a name="l00496"></a>00496                         <span class="keywordflow">return</span> tLenPrev;
-<a name="l00497"></a>00497                 }
-<a name="l00498"></a>00498                 <span class="keywordflow">if</span> (tLen &gt;= tLengthMax) {
-<a name="l00499"></a>00499                         <span class="keywordflow">return</span> tLengthMax;
-<a name="l00500"></a>00500                 }
-<a name="l00501"></a>00501         }
-<a name="l00502"></a>00502 } <span class="comment">/* end of tComputeStringLengthMax */</span>
-<a name="l00503"></a>00503 
-<a name="l00504"></a>00504 <span class="comment">/*</span>
-<a name="l00505"></a>00505 <span class="comment"> * tGetBreakingPoint - get the number of bytes that fit the column</span>
-<a name="l00506"></a>00506 <span class="comment"> *</span>
-<a name="l00507"></a>00507 <span class="comment"> * Returns the number of bytes that fit the column</span>
-<a name="l00508"></a>00508 <span class="comment"> */</span>
-<a name="l00509"></a>00509 <span class="keyword">static</span> <span class="keywordtype">size_t</span>
-<a name="l00510"></a>00510 tGetBreakingPoint(<span class="keyword">const</span> <span class="keywordtype">char</span> *szString,
-<a name="l00511"></a>00511         <span class="keywordtype">size_t</span> tLen, <span class="keywordtype">size_t</span> tWidth, <span class="keywordtype">size_t</span> tColumnWidthMax)
-<a name="l00512"></a>00512 {
-<a name="l00513"></a>00513         <span class="keywordtype">int</span>     iIndex;
-<a name="l00514"></a>00514 
-<a name="l00515"></a>00515         TRACE_MSG(<span class="stringliteral">&quot;tGetBreakingPoint&quot;</span>);
-<a name="l00516"></a>00516 
-<a name="l00517"></a>00517         fail(szString == NULL);
-<a name="l00518"></a>00518         fail(tLen &gt; strlen(szString));
-<a name="l00519"></a>00519         fail(tWidth &gt; tColumnWidthMax);
-<a name="l00520"></a>00520 
-<a name="l00521"></a>00521         <span class="keywordflow">if</span> (tWidth &lt; tColumnWidthMax ||
-<a name="l00522"></a>00522             (tWidth == tColumnWidthMax &amp;&amp;
-<a name="l00523"></a>00523              (szString[tLen] == <span class="charliteral">&#39; &#39;</span> ||
-<a name="l00524"></a>00524               szString[tLen] == <span class="charliteral">&#39;\n&#39;</span> ||
-<a name="l00525"></a>00525               szString[tLen] == <span class="charliteral">&#39;\0&#39;</span>))) {
-<a name="l00526"></a>00526                 <span class="comment">/* The string already fits, do nothing */</span>
-<a name="l00527"></a>00527                 <span class="keywordflow">return</span> tLen;
-<a name="l00528"></a>00528         }
-<a name="l00529"></a>00529         <span class="comment">/* Search for a breaking point */</span>
-<a name="l00530"></a>00530         <span class="keywordflow">for</span> (iIndex = (<span class="keywordtype">int</span>)tLen - 1; iIndex &gt;= 0; iIndex--) {
-<a name="l00531"></a>00531                 <span class="keywordflow">if</span> (szString[iIndex] == <span class="charliteral">&#39; &#39;</span>) {
-<a name="l00532"></a>00532                         <span class="keywordflow">return</span> (<span class="keywordtype">size_t</span>)iIndex;
-<a name="l00533"></a>00533                 }
-<a name="l00534"></a>00534         }
-<a name="l00535"></a>00535         <span class="comment">/* No breaking point found, just fill the column */</span>
-<a name="l00536"></a>00536         <span class="keywordflow">return</span> tLen;
-<a name="l00537"></a>00537 } <span class="comment">/* end of tGetBreakingPoint */</span>
-<a name="l00538"></a>00538 
-<a name="l00539"></a>00539 <span class="comment">/*</span>
-<a name="l00540"></a>00540 <span class="comment"> * tComputeColumnWidthMax - compute the maximum column width</span>
-<a name="l00541"></a>00541 <span class="comment"> */</span>
-<a name="l00542"></a>00542 <span class="keyword">static</span> <span class="keywordtype">size_t</span>
-<a name="l00543"></a>00543 tComputeColumnWidthMax(<span class="keywordtype">short</span> sWidth, <span class="keywordtype">long</span> lCharWidth, <span class="keywordtype">double</span> dFactor)
-<a name="l00544"></a>00544 {
-<a name="l00545"></a>00545         <span class="keywordtype">size_t</span>  tColumnWidthMax;
-<a name="l00546"></a>00546 
-<a name="l00547"></a>00547         TRACE_MSG(<span class="stringliteral">&quot;tComputeColumnWidthMax&quot;</span>);
-<a name="l00548"></a>00548 
-<a name="l00549"></a>00549         fail(sWidth &lt; 0);
-<a name="l00550"></a>00550         fail(lCharWidth &lt;= 0);
-<a name="l00551"></a>00551         fail(dFactor &lt;= 0.0);
-<a name="l00552"></a>00552 
-<a name="l00553"></a>00553         tColumnWidthMax = (size_t)(
-<a name="l00554"></a>00554                 (lTwips2MilliPoints(sWidth) * dFactor + lCharWidth / 2.0) /
-<a name="l00555"></a>00555                  lCharWidth);
-<a name="l00556"></a>00556         <span class="keywordflow">if</span> (tColumnWidthMax == 0) {
-<a name="l00557"></a>00557                 <span class="comment">/* Minimum column width */</span>
-<a name="l00558"></a>00558                 <span class="keywordflow">return</span> 1;
-<a name="l00559"></a>00559         }
-<a name="l00560"></a>00560         <span class="keywordflow">if</span> (tColumnWidthMax &gt; 1) {
-<a name="l00561"></a>00561                 <span class="comment">/* Make room for the TABLE_SEPARATOR_CHAR */</span>
-<a name="l00562"></a>00562                 tColumnWidthMax--;
-<a name="l00563"></a>00563         }
-<a name="l00564"></a>00564         NO_DBG_DEC(tColumnWidthMax);
-<a name="l00565"></a>00565         <span class="keywordflow">return</span> tColumnWidthMax;
-<a name="l00566"></a>00566 } <span class="comment">/* end of tComputeColumnWidthMax */</span>
-<a name="l00567"></a>00567 
-<a name="l00568"></a>00568 <span class="comment">/*</span>
-<a name="l00569"></a>00569 <span class="comment"> * vTableRow2Window - put a table row into a diagram</span>
-<a name="l00570"></a>00570 <span class="comment"> */</span>
-<a name="l00571"></a>00571 <span class="keywordtype">void</span>
-<a name="l00572"></a>00572 vTableRow2Window(diagram_type *pDiag, output_type *pOutput,
-<a name="l00573"></a>00573         <span class="keyword">const</span> row_block_type *pRowInfo,
-<a name="l00574"></a>00574         conversion_type eConversionType, <span class="keywordtype">int</span> iParagraphBreak)
-<a name="l00575"></a>00575 {
-<a name="l00576"></a>00576         output_type     tRow;
-<a name="l00577"></a>00577         <span class="keywordtype">char</span>    *aszColTxt[TABLE_COLUMN_MAX];
-<a name="l00578"></a>00578         <span class="keywordtype">char</span>    *szLine, *pcTxt;
-<a name="l00579"></a>00579         <span class="keywordtype">double</span>  dMagnify;
-<a name="l00580"></a>00580         <span class="keywordtype">long</span>    lCharWidthLarge, lCharWidthSmall;
-<a name="l00581"></a>00581         <span class="keywordtype">size_t</span>  tColumnWidthTotal, atColumnWidthMax[TABLE_COLUMN_MAX];
-<a name="l00582"></a>00582         <span class="keywordtype">size_t</span>  tSize, tColumnWidthMax, tWidth, tLen;
-<a name="l00583"></a>00583         <span class="keywordtype">int</span>     iIndex, iNbrOfColumns, iTmp;
-<a name="l00584"></a>00584         BOOL    bNotReady;
-<a name="l00585"></a>00585 
-<a name="l00586"></a>00586         TRACE_MSG(<span class="stringliteral">&quot;vTableRow2Window&quot;</span>);
-<a name="l00587"></a>00587 
-<a name="l00588"></a>00588         fail(pDiag == NULL || pOutput == NULL || pRowInfo == NULL);
-<a name="l00589"></a>00589         fail(pOutput-&gt;szStorage == NULL);
-<a name="l00590"></a>00590         fail(pOutput-&gt;pNext != NULL);
-<a name="l00591"></a>00591         fail(iParagraphBreak &lt; 0);
-<a name="l00592"></a>00592 
-<a name="l00593"></a>00593         <span class="comment">/* Character sizes */</span>
-<a name="l00594"></a>00594         lCharWidthLarge = lComputeStringWidth(<span class="stringliteral">&quot;W&quot;</span>, 1,
-<a name="l00595"></a>00595                                 pOutput-&gt;tFontRef, pOutput-&gt;usFontSize);
-<a name="l00596"></a>00596         NO_DBG_DEC(lCharWidthLarge);
-<a name="l00597"></a>00597         lCharWidthSmall = lComputeStringWidth(<span class="stringliteral">&quot;i&quot;</span>, 1,
-<a name="l00598"></a>00598                                 pOutput-&gt;tFontRef, pOutput-&gt;usFontSize);
-<a name="l00599"></a>00599         NO_DBG_DEC(lCharWidthSmall);
-<a name="l00600"></a>00600         <span class="comment">/* For the time being: use a fixed width font */</span>
-<a name="l00601"></a>00601         fail(lCharWidthLarge != lCharWidthSmall);
-<a name="l00602"></a>00602 
-<a name="l00603"></a>00603         vRemoveRowEnd(pOutput-&gt;szStorage);
-<a name="l00604"></a>00604 
-<a name="l00605"></a>00605         <span class="comment">/* Split the row text into a set of column texts */</span>
-<a name="l00606"></a>00606         aszColTxt[0] = pOutput-&gt;szStorage;
-<a name="l00607"></a>00607         <span class="keywordflow">for</span> (iNbrOfColumns = 1;
-<a name="l00608"></a>00608              iNbrOfColumns &lt; TABLE_COLUMN_MAX;
-<a name="l00609"></a>00609              iNbrOfColumns++) {
-<a name="l00610"></a>00610                 aszColTxt[iNbrOfColumns] =
-<a name="l00611"></a>00611                                 strchr(aszColTxt[iNbrOfColumns - 1],
-<a name="l00612"></a>00612                                         TABLE_SEPARATOR);
-<a name="l00613"></a>00613                 <span class="keywordflow">if</span> (aszColTxt[iNbrOfColumns] == NULL) {
-<a name="l00614"></a>00614                         <span class="keywordflow">break</span>;
-<a name="l00615"></a>00615                 }
-<a name="l00616"></a>00616                 *aszColTxt[iNbrOfColumns] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00617"></a>00617                 aszColTxt[iNbrOfColumns]++;
-<a name="l00618"></a>00618                 NO_DBG_DEC(iNbrOfColumns);
-<a name="l00619"></a>00619                 NO_DBG_MSG(aszColTxt[iNbrOfColumns]);
-<a name="l00620"></a>00620         }
-<a name="l00621"></a>00621 
-<a name="l00622"></a>00622         <span class="comment">/* Work around a bug in Word */</span>
-<a name="l00623"></a>00623         <span class="keywordflow">while</span> (iNbrOfColumns &gt; (<span class="keywordtype">int</span>)pRowInfo-&gt;ucNumberOfColumns &amp;&amp;
-<a name="l00624"></a>00624                pRowInfo-&gt;asColumnWidth[iNbrOfColumns] == 0) {
-<a name="l00625"></a>00625                 iNbrOfColumns--;
-<a name="l00626"></a>00626         }
-<a name="l00627"></a>00627 
-<a name="l00628"></a>00628         DBG_DEC_C(iNbrOfColumns != (<span class="keywordtype">int</span>)pRowInfo-&gt;ucNumberOfColumns,
-<a name="l00629"></a>00629                 iNbrOfColumns);
-<a name="l00630"></a>00630         DBG_DEC_C(iNbrOfColumns != (<span class="keywordtype">int</span>)pRowInfo-&gt;ucNumberOfColumns,
-<a name="l00631"></a>00631                 pRowInfo-&gt;ucNumberOfColumns);
-<a name="l00632"></a>00632         <span class="keywordflow">if</span> (iNbrOfColumns != (<span class="keywordtype">int</span>)pRowInfo-&gt;ucNumberOfColumns) {
-<a name="l00633"></a>00633                 werr(0, <span class="stringliteral">&quot;Skipping an unmatched table row&quot;</span>);
-<a name="l00634"></a>00634                 <span class="keywordflow">return</span>;
-<a name="l00635"></a>00635         }
-<a name="l00636"></a>00636 
-<a name="l00637"></a>00637 <span class="preprocessor">#if defined(__FULL_TEXT_SEARCH)</span>
-<a name="l00638"></a>00638 <span class="preprocessor"></span>        <span class="comment">/* No table formatting: use for full-text search (untested) */</span>
-<a name="l00639"></a>00639         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; iNbrOfColumns; iIndex++) {
-<a name="l00640"></a>00640                 fprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;%s\n&quot;</span> , aszColTxt[iIndex]);
-<a name="l00641"></a>00641         }
-<a name="l00642"></a>00642 <span class="preprocessor">#else</span>
-<a name="l00643"></a>00643 <span class="preprocessor"></span>        <span class="keywordflow">if</span> (bAddTableRow(pDiag, aszColTxt, iNbrOfColumns,
-<a name="l00644"></a>00644                         pRowInfo-&gt;asColumnWidth, pRowInfo-&gt;ucBorderInfo)) {
-<a name="l00645"></a>00645                 <span class="comment">/* All work has been done */</span>
-<a name="l00646"></a>00646                 <span class="keywordflow">return</span>;
-<a name="l00647"></a>00647         }
-<a name="l00648"></a>00648 
-<a name="l00649"></a>00649         <span class="comment">/* Fill the table with maximum column widths */</span>
-<a name="l00650"></a>00650         <span class="keywordflow">if</span> (eConversionType == conversion_text ||
-<a name="l00651"></a>00651             eConversionType == conversion_fmt_text) {
-<a name="l00652"></a>00652                 <span class="keywordflow">if</span> (iParagraphBreak == 0 ||
-<a name="l00653"></a>00653                     iParagraphBreak &gt;= MAX_SCREEN_WIDTH) {
-<a name="l00654"></a>00654                         dMagnify = (double)MAX_SCREEN_WIDTH;
-<a name="l00655"></a>00655                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (iParagraphBreak &lt;= MIN_SCREEN_WIDTH) {
-<a name="l00656"></a>00656                         dMagnify = (double)MIN_SCREEN_WIDTH;
-<a name="l00657"></a>00657                 } <span class="keywordflow">else</span> {
-<a name="l00658"></a>00658                         dMagnify = (double)iParagraphBreak;
-<a name="l00659"></a>00659                 }
-<a name="l00660"></a>00660                 dMagnify /= (double)DEFAULT_SCREEN_WIDTH;
-<a name="l00661"></a>00661                 DBG_FLT_C(dMagnify &lt; 0.99 || dMagnify &gt; 1.01, dMagnify);
-<a name="l00662"></a>00662         } <span class="keywordflow">else</span> {
-<a name="l00663"></a>00663                 dMagnify = 1.0;
-<a name="l00664"></a>00664         }
-<a name="l00665"></a>00665         tColumnWidthTotal = 0;
-<a name="l00666"></a>00666         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; iNbrOfColumns; iIndex++) {
-<a name="l00667"></a>00667                 atColumnWidthMax[iIndex] = tComputeColumnWidthMax(
-<a name="l00668"></a>00668                                         pRowInfo-&gt;asColumnWidth[iIndex],
-<a name="l00669"></a>00669                                         lCharWidthLarge,
-<a name="l00670"></a>00670                                         dMagnify);
-<a name="l00671"></a>00671                 tColumnWidthTotal += atColumnWidthMax[iIndex];
-<a name="l00672"></a>00672         }
-<a name="l00673"></a>00673 
-<a name="l00674"></a>00674         <span class="comment">/*</span>
-<a name="l00675"></a>00675 <span class="comment">         * Get enough space for the row.</span>
-<a name="l00676"></a>00676 <span class="comment">         * Worst case: three bytes per UTF-8 character</span>
-<a name="l00677"></a>00677 <span class="comment">         */</span>
-<a name="l00678"></a>00678         tSize = 3 * (1 + tColumnWidthTotal + (size_t)iNbrOfColumns + 3);
-<a name="l00679"></a>00679         szLine = xmalloc(tSize);
-<a name="l00680"></a>00680 
-<a name="l00681"></a>00681         <span class="keywordflow">do</span> {
-<a name="l00682"></a>00682                 <span class="comment">/* Print one line of a table row */</span>
-<a name="l00683"></a>00683                 bNotReady = FALSE;
-<a name="l00684"></a>00684                 pcTxt = szLine;
-<a name="l00685"></a>00685                 *pcTxt++ = TABLE_SEPARATOR_CHAR;
-<a name="l00686"></a>00686                 <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; iNbrOfColumns; iIndex++) {
-<a name="l00687"></a>00687                         tColumnWidthMax = atColumnWidthMax[iIndex];
-<a name="l00688"></a>00688                         <span class="keywordflow">if</span> (aszColTxt[iIndex] == NULL) {
-<a name="l00689"></a>00689                                 <span class="comment">/* Add an empty column */</span>
-<a name="l00690"></a>00690                                 <span class="keywordflow">for</span> (iTmp = 0;
-<a name="l00691"></a>00691                                      iTmp &lt; (int)tColumnWidthMax;
-<a name="l00692"></a>00692                                      iTmp++) {
-<a name="l00693"></a>00693                                         *pcTxt++ = (char)FILLER_CHAR;
-<a name="l00694"></a>00694                                 }
-<a name="l00695"></a>00695                                 *pcTxt++ = TABLE_SEPARATOR_CHAR;
-<a name="l00696"></a>00696                                 *pcTxt = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00697"></a>00697                                 <span class="keywordflow">continue</span>;
-<a name="l00698"></a>00698                         }
-<a name="l00699"></a>00699                         <span class="comment">/* Compute the length and width of the column text */</span>
-<a name="l00700"></a>00700                         tLen = tComputeStringLengthMax(
-<a name="l00701"></a>00701                                         aszColTxt[iIndex], tColumnWidthMax);
-<a name="l00702"></a>00702                         NO_DBG_DEC(tLen);
-<a name="l00703"></a>00703                         <span class="keywordflow">while</span> (tLen != 0 &amp;&amp;
-<a name="l00704"></a>00704                                         (aszColTxt[iIndex][tLen - 1] == <span class="charliteral">&#39;\n&#39;</span> ||
-<a name="l00705"></a>00705                                          aszColTxt[iIndex][tLen - 1] == <span class="charliteral">&#39; &#39;</span>)) {
-<a name="l00706"></a>00706                                 aszColTxt[iIndex][tLen - 1] = <span class="charliteral">&#39; &#39;</span>;
-<a name="l00707"></a>00707                                 tLen--;
-<a name="l00708"></a>00708                         }
-<a name="l00709"></a>00709                         tWidth = tCountColumns(aszColTxt[iIndex], tLen);
-<a name="l00710"></a>00710                         fail(tWidth &gt; tColumnWidthMax);
-<a name="l00711"></a>00711                         tLen = tGetBreakingPoint(aszColTxt[iIndex],
-<a name="l00712"></a>00712                                         tLen, tWidth, tColumnWidthMax);
-<a name="l00713"></a>00713                         tWidth = tCountColumns(aszColTxt[iIndex], tLen);
-<a name="l00714"></a>00714                         <span class="keywordflow">if</span> (tLen == 0 &amp;&amp; *aszColTxt[iIndex] == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00715"></a>00715                                 <span class="comment">/* No text at all */</span>
-<a name="l00716"></a>00716                                 aszColTxt[iIndex] = NULL;
-<a name="l00717"></a>00717                         } <span class="keywordflow">else</span> {
-<a name="l00718"></a>00718                                 <span class="comment">/* Add the text */</span>
-<a name="l00719"></a>00719                                 pcTxt += sprintf(pcTxt,
-<a name="l00720"></a>00720                                         <span class="stringliteral">&quot;%.*s&quot;</span>, (<span class="keywordtype">int</span>)tLen, aszColTxt[iIndex]);
-<a name="l00721"></a>00721                                 <span class="keywordflow">if</span> (tLen == 0 &amp;&amp; *aszColTxt[iIndex] != <span class="charliteral">&#39; &#39;</span>) {
-<a name="l00722"></a>00722                                         tLen = tGetCharacterLength(
-<a name="l00723"></a>00723                                                         aszColTxt[iIndex]);
-<a name="l00724"></a>00724                                         DBG_CHR(*aszColTxt[iIndex]);
-<a name="l00725"></a>00725                                         DBG_FIXME();
-<a name="l00726"></a>00726                                         fail(tLen == 0);
-<a name="l00727"></a>00727                                 }
-<a name="l00728"></a>00728                                 aszColTxt[iIndex] += tLen;
-<a name="l00729"></a>00729                                 <span class="keywordflow">while</span> (*aszColTxt[iIndex] == <span class="charliteral">&#39; &#39;</span>) {
-<a name="l00730"></a>00730                                         aszColTxt[iIndex]++;
-<a name="l00731"></a>00731                                 }
-<a name="l00732"></a>00732                                 <span class="keywordflow">if</span> (*aszColTxt[iIndex] == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00733"></a>00733                                         <span class="comment">/* This row is now complete */</span>
-<a name="l00734"></a>00734                                         aszColTxt[iIndex] = NULL;
-<a name="l00735"></a>00735                                 } <span class="keywordflow">else</span> {
-<a name="l00736"></a>00736                                         <span class="comment">/* This row needs more lines */</span>
-<a name="l00737"></a>00737                                         bNotReady = TRUE;
-<a name="l00738"></a>00738                                 }
-<a name="l00739"></a>00739                         }
-<a name="l00740"></a>00740                         <span class="comment">/* Fill up the rest */</span>
-<a name="l00741"></a>00741                         <span class="keywordflow">for</span> (iTmp = 0;
-<a name="l00742"></a>00742                              iTmp &lt; (int)tColumnWidthMax - (<span class="keywordtype">int</span>)tWidth;
-<a name="l00743"></a>00743                              iTmp++) {
-<a name="l00744"></a>00744                                 *pcTxt++ = (char)FILLER_CHAR;
-<a name="l00745"></a>00745                         }
-<a name="l00746"></a>00746                         <span class="comment">/* End of column */</span>
-<a name="l00747"></a>00747                         *pcTxt++ = TABLE_SEPARATOR_CHAR;
-<a name="l00748"></a>00748                         *pcTxt = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00749"></a>00749                 }
-<a name="l00750"></a>00750                 <span class="comment">/* Output the table row line */</span>
-<a name="l00751"></a>00751                 *pcTxt = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00752"></a>00752                 tRow = *pOutput;
-<a name="l00753"></a>00753                 tRow.szStorage = szLine;
-<a name="l00754"></a>00754                 fail(pcTxt &lt; szLine);
-<a name="l00755"></a>00755                 tRow.tNextFree = (size_t)(pcTxt - szLine);
-<a name="l00756"></a>00756                 tRow.lStringWidth = lComputeStringWidth(
-<a name="l00757"></a>00757                                         tRow.szStorage,
-<a name="l00758"></a>00758                                         tRow.tNextFree,
-<a name="l00759"></a>00759                                         tRow.tFontRef,
-<a name="l00760"></a>00760                                         tRow.usFontSize);
-<a name="l00761"></a>00761                 vString2Diagram(pDiag, &amp;tRow);
-<a name="l00762"></a>00762                 TRACE_MSG(<span class="stringliteral">&quot;after vString2Diagram in vTableRow2Window&quot;</span>);
-<a name="l00763"></a>00763         } <span class="keywordflow">while</span> (bNotReady);
-<a name="l00764"></a>00764         <span class="comment">/* Clean up before you leave */</span>
-<a name="l00765"></a>00765         szLine = xfree(szLine);
-<a name="l00766"></a>00766         TRACE_MSG(<span class="stringliteral">&quot;leaving vTableRow2Window&quot;</span>);
-<a name="l00767"></a>00767 <span class="preprocessor">#endif </span><span class="comment">/* __FULL_TEXT_SEARCH */</span>
-<a name="l00768"></a>00768 } <span class="comment">/* end of vTableRow2Window */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/output_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,559 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/output.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/output.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * output.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2002-2004 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Generic output generating functions</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00010"></a>00010 
-<a name="l00011"></a>00011 <span class="keyword">static</span> conversion_type  eConversionType = conversion_unknown;
-<a name="l00012"></a>00012 <span class="keyword">static</span> encoding_type    eEncoding = encoding_neutral;
-<a name="l00013"></a>00013 
-<a name="l00014"></a>00014 
-<a name="l00015"></a>00015 <span class="comment">/*</span>
-<a name="l00016"></a>00016 <span class="comment"> * vPrologue1 - get options and call a specific initialization</span>
-<a name="l00017"></a>00017 <span class="comment"> */</span>
-<a name="l00018"></a>00018 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00019"></a>00019 vPrologue1(diagram_type *pDiag, <span class="keyword">const</span> <span class="keywordtype">char</span> *szTask, <span class="keyword">const</span> <span class="keywordtype">char</span> *szFilename)
-<a name="l00020"></a>00020 {
-<a name="l00021"></a>00021         options_type    tOptions;
-<a name="l00022"></a>00022 
-<a name="l00023"></a>00023         fail(pDiag == NULL);
-<a name="l00024"></a>00024         fail(szTask == NULL || szTask[0] == <span class="charliteral">&#39;\0&#39;</span>);
-<a name="l00025"></a>00025 
-<a name="l00026"></a>00026         vGetOptions(&amp;tOptions);
-<a name="l00027"></a>00027         eConversionType = tOptions.eConversionType;
-<a name="l00028"></a>00028         eEncoding = tOptions.eEncoding;
-<a name="l00029"></a>00029 
-<a name="l00030"></a>00030         <span class="keywordflow">switch</span> (eConversionType) {
-<a name="l00031"></a>00031         <span class="keywordflow">case</span> conversion_text:
-<a name="l00032"></a>00032                 vPrologueTXT(pDiag, &amp;tOptions);
-<a name="l00033"></a>00033                 <span class="keywordflow">break</span>;
-<a name="l00034"></a>00034         <span class="keywordflow">case</span> conversion_fmt_text:
-<a name="l00035"></a>00035                 vPrologueFMT(pDiag, &amp;tOptions);
-<a name="l00036"></a>00036                 <span class="keywordflow">break</span>;
-<a name="l00037"></a>00037         <span class="keywordflow">case</span> conversion_ps:
-<a name="l00038"></a>00038                 vProloguePS(pDiag, szTask, szFilename, &amp;tOptions);
-<a name="l00039"></a>00039                 <span class="keywordflow">break</span>;
-<a name="l00040"></a>00040         <span class="keywordflow">case</span> conversion_xml:
-<a name="l00041"></a>00041                 vPrologueXML(pDiag, &amp;tOptions);
-<a name="l00042"></a>00042                 <span class="keywordflow">break</span>;
-<a name="l00043"></a>00043         <span class="keywordflow">case</span> conversion_pdf:
-<a name="l00044"></a>00044                 vProloguePDF(pDiag, szTask, &amp;tOptions);
-<a name="l00045"></a>00045                 <span class="keywordflow">break</span>;
-<a name="l00046"></a>00046         <span class="keywordflow">default</span>:
-<a name="l00047"></a>00047                 DBG_DEC(eConversionType);
-<a name="l00048"></a>00048                 <span class="keywordflow">break</span>;
-<a name="l00049"></a>00049         }
-<a name="l00050"></a>00050 } <span class="comment">/* end of vPrologue1 */</span>
-<a name="l00051"></a>00051 
-<a name="l00052"></a>00052 <span class="comment">/*</span>
-<a name="l00053"></a>00053 <span class="comment"> * vEpilogue - clean up after everything is done</span>
-<a name="l00054"></a>00054 <span class="comment"> */</span>
-<a name="l00055"></a>00055 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00056"></a>00056 vEpilogue(diagram_type *pDiag)
-<a name="l00057"></a>00057 {
-<a name="l00058"></a>00058         <span class="keywordflow">switch</span> (eConversionType) {
-<a name="l00059"></a>00059         <span class="keywordflow">case</span> conversion_text:
-<a name="l00060"></a>00060         <span class="keywordflow">case</span> conversion_fmt_text:
-<a name="l00061"></a>00061                 vEpilogueTXT(pDiag-&gt;pOutFile);
-<a name="l00062"></a>00062                 <span class="keywordflow">break</span>;
-<a name="l00063"></a>00063         <span class="keywordflow">case</span> conversion_ps:
-<a name="l00064"></a>00064                 vEpiloguePS(pDiag);
-<a name="l00065"></a>00065                 <span class="keywordflow">break</span>;
-<a name="l00066"></a>00066         <span class="keywordflow">case</span> conversion_xml:
-<a name="l00067"></a>00067                 vEpilogueXML(pDiag);
-<a name="l00068"></a>00068                 <span class="keywordflow">break</span>;
-<a name="l00069"></a>00069         <span class="keywordflow">case</span> conversion_pdf:
-<a name="l00070"></a>00070                 vEpiloguePDF(pDiag);
-<a name="l00071"></a>00071                 <span class="keywordflow">break</span>;
-<a name="l00072"></a>00072         <span class="keywordflow">default</span>:
-<a name="l00073"></a>00073                 DBG_DEC(eConversionType);
-<a name="l00074"></a>00074                 <span class="keywordflow">break</span>;
-<a name="l00075"></a>00075         }
-<a name="l00076"></a>00076 } <span class="comment">/* end of vEpilogue */</span>
-<a name="l00077"></a>00077 
-<a name="l00078"></a>00078 <span class="comment">/*</span>
-<a name="l00079"></a>00079 <span class="comment"> * vImagePrologue - perform image initialization</span>
-<a name="l00080"></a>00080 <span class="comment"> */</span>
-<a name="l00081"></a>00081 <span class="keywordtype">void</span>
-<a name="l00082"></a>00082 vImagePrologue(diagram_type *pDiag, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00083"></a>00083 {
-<a name="l00084"></a>00084         <span class="keywordflow">switch</span> (eConversionType) {
-<a name="l00085"></a>00085         <span class="keywordflow">case</span> conversion_text:
-<a name="l00086"></a>00086         <span class="keywordflow">case</span> conversion_fmt_text:
-<a name="l00087"></a>00087                 <span class="keywordflow">break</span>;
-<a name="l00088"></a>00088         <span class="keywordflow">case</span> conversion_ps:
-<a name="l00089"></a>00089                 vImageProloguePS(pDiag, pImg);
-<a name="l00090"></a>00090                 <span class="keywordflow">break</span>;
-<a name="l00091"></a>00091         <span class="keywordflow">case</span> conversion_xml:
-<a name="l00092"></a>00092                 <span class="keywordflow">break</span>;
-<a name="l00093"></a>00093         <span class="keywordflow">case</span> conversion_pdf:
-<a name="l00094"></a>00094                 vImageProloguePDF(pDiag, pImg);
-<a name="l00095"></a>00095                 <span class="keywordflow">break</span>;
-<a name="l00096"></a>00096         <span class="keywordflow">default</span>:
-<a name="l00097"></a>00097                 DBG_DEC(eConversionType);
-<a name="l00098"></a>00098                 <span class="keywordflow">break</span>;
-<a name="l00099"></a>00099         }
-<a name="l00100"></a>00100 } <span class="comment">/* end of vImagePrologue */</span>
-<a name="l00101"></a>00101 
-<a name="l00102"></a>00102 <span class="comment">/*</span>
-<a name="l00103"></a>00103 <span class="comment"> * vImageEpilogue - clean up an image</span>
-<a name="l00104"></a>00104 <span class="comment"> */</span>
-<a name="l00105"></a>00105 <span class="keywordtype">void</span>
-<a name="l00106"></a>00106 vImageEpilogue(diagram_type *pDiag)
-<a name="l00107"></a>00107 {
-<a name="l00108"></a>00108         <span class="keywordflow">switch</span> (eConversionType) {
-<a name="l00109"></a>00109         <span class="keywordflow">case</span> conversion_text:
-<a name="l00110"></a>00110         <span class="keywordflow">case</span> conversion_fmt_text:
-<a name="l00111"></a>00111                 <span class="keywordflow">break</span>;
-<a name="l00112"></a>00112         <span class="keywordflow">case</span> conversion_ps:
-<a name="l00113"></a>00113                 vImageEpiloguePS(pDiag);
-<a name="l00114"></a>00114                 <span class="keywordflow">break</span>;
-<a name="l00115"></a>00115         <span class="keywordflow">case</span> conversion_xml:
-<a name="l00116"></a>00116                 <span class="keywordflow">break</span>;
-<a name="l00117"></a>00117         <span class="keywordflow">case</span> conversion_pdf:
-<a name="l00118"></a>00118                 vImageEpiloguePDF(pDiag);
-<a name="l00119"></a>00119                 <span class="keywordflow">break</span>;
-<a name="l00120"></a>00120         <span class="keywordflow">default</span>:
-<a name="l00121"></a>00121                 DBG_DEC(eConversionType);
-<a name="l00122"></a>00122                 <span class="keywordflow">break</span>;
-<a name="l00123"></a>00123         }
-<a name="l00124"></a>00124 } <span class="comment">/* end of vImageEpilogue */</span>
-<a name="l00125"></a>00125 
-<a name="l00126"></a>00126 <span class="comment">/*</span>
-<a name="l00127"></a>00127 <span class="comment"> * bAddDummyImage - add a dummy image</span>
-<a name="l00128"></a>00128 <span class="comment"> *</span>
-<a name="l00129"></a>00129 <span class="comment"> * return TRUE when successful, otherwise FALSE</span>
-<a name="l00130"></a>00130 <span class="comment"> */</span>
-<a name="l00131"></a>00131 BOOL
-<a name="l00132"></a>00132 bAddDummyImage(diagram_type *pDiag, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00133"></a>00133 {
-<a name="l00134"></a>00134         <span class="keywordflow">switch</span> (eConversionType) {
-<a name="l00135"></a>00135         <span class="keywordflow">case</span> conversion_text:
-<a name="l00136"></a>00136         <span class="keywordflow">case</span> conversion_fmt_text:
-<a name="l00137"></a>00137                 <span class="keywordflow">return</span> FALSE;
-<a name="l00138"></a>00138         <span class="keywordflow">case</span> conversion_ps:
-<a name="l00139"></a>00139                 <span class="keywordflow">return</span> bAddDummyImagePS(pDiag, pImg);
-<a name="l00140"></a>00140         <span class="keywordflow">case</span> conversion_xml:
-<a name="l00141"></a>00141                 <span class="keywordflow">return</span> FALSE;
-<a name="l00142"></a>00142         <span class="keywordflow">case</span> conversion_pdf:
-<a name="l00143"></a>00143                 <span class="keywordflow">return</span> bAddDummyImagePDF(pDiag, pImg);
-<a name="l00144"></a>00144         <span class="keywordflow">default</span>:
-<a name="l00145"></a>00145                 DBG_DEC(eConversionType);
-<a name="l00146"></a>00146                 <span class="keywordflow">return</span> FALSE;
-<a name="l00147"></a>00147         }
-<a name="l00148"></a>00148 } <span class="comment">/* end of bAddDummyImage */</span>
-<a name="l00149"></a>00149 
-<a name="l00150"></a>00150 <span class="comment">/*</span>
-<a name="l00151"></a>00151 <span class="comment"> * pCreateDiagram - create and initialize a diagram</span>
-<a name="l00152"></a>00152 <span class="comment"> *</span>
-<a name="l00153"></a>00153 <span class="comment"> * remark: does not return if the diagram can&#39;t be created</span>
-<a name="l00154"></a>00154 <span class="comment"> */</span>
-<a name="l00155"></a>00155 FILE *fp;
-<a name="l00156"></a>00156 diagram_type *
-<a name="l00157"></a>00157 pCreateDiagram(<span class="keyword">const</span> <span class="keywordtype">char</span> *szTask, <span class="keyword">const</span> <span class="keywordtype">char</span> *szFilename, FILE *ofp)
-<a name="l00158"></a>00158 {
-<a name="l00159"></a>00159         diagram_type    *pDiag;
-<a name="l00160"></a>00160 
-<a name="l00161"></a>00161         fail(szTask == NULL || szTask[0] == <span class="charliteral">&#39;\0&#39;</span>);
-<a name="l00162"></a>00162         DBG_MSG(<span class="stringliteral">&quot;pCreateDiagram&quot;</span>);
-<a name="l00163"></a>00163 
-<a name="l00164"></a>00164         <span class="comment">/* Get the necessary memory */</span>
-<a name="l00165"></a>00165         pDiag = xmalloc(<span class="keyword">sizeof</span>(diagram_type));
-<a name="l00166"></a>00166         <span class="comment">/* Initialization */</span>
-<a name="l00167"></a>00167 <span class="preprocessor">        #ifndef SYMBIAN</span>
-<a name="l00168"></a>00168 <span class="preprocessor"></span>        pDiag-&gt;pOutFile = stdout;
-<a name="l00169"></a>00169 <span class="preprocessor">        #else</span>
-<a name="l00170"></a>00170 <span class="preprocessor"></span>        pDiag-&gt;pOutFile = <span class="comment">/*stdout*/</span>ofp;
-<a name="l00171"></a>00171 <span class="preprocessor">        #endif </span><span class="comment">/*SYMBIAN*/</span>
-<a name="l00172"></a>00172         vPrologue1(pDiag, szTask, szFilename);
-<a name="l00173"></a>00173         <span class="comment">/* Return success */</span>
-<a name="l00174"></a>00174         <span class="keywordflow">return</span> pDiag;
-<a name="l00175"></a>00175 } <span class="comment">/* end of pCreateDiagram */</span>
-<a name="l00176"></a>00176 
-<a name="l00177"></a>00177 <span class="comment">/*</span>
-<a name="l00178"></a>00178 <span class="comment"> * vDestroyDiagram - remove a diagram by freeing the memory it uses</span>
-<a name="l00179"></a>00179 <span class="comment"> */</span>
-<a name="l00180"></a>00180 <span class="keywordtype">void</span>
-<a name="l00181"></a>00181 vDestroyDiagram(diagram_type *pDiag)
-<a name="l00182"></a>00182 {
-<a name="l00183"></a>00183         DBG_MSG(<span class="stringliteral">&quot;vDestroyDiagram&quot;</span>);
-<a name="l00184"></a>00184 
-<a name="l00185"></a>00185         fail(pDiag == NULL);
-<a name="l00186"></a>00186 
-<a name="l00187"></a>00187         <span class="keywordflow">if</span> (pDiag == NULL) {
-<a name="l00188"></a>00188                 <span class="keywordflow">return</span>;
-<a name="l00189"></a>00189         }
-<a name="l00190"></a>00190         vEpilogue(pDiag);
-<a name="l00191"></a>00191         pDiag = xfree(pDiag);
-<a name="l00192"></a>00192 } <span class="comment">/* end of vDestroyDiagram */</span>
-<a name="l00193"></a>00193 
-<a name="l00194"></a>00194 <span class="comment">/*</span>
-<a name="l00195"></a>00195 <span class="comment"> * vPrologue2 - call a specific initialization</span>
-<a name="l00196"></a>00196 <span class="comment"> */</span>
-<a name="l00197"></a>00197 <span class="keywordtype">void</span>
-<a name="l00198"></a>00198 vPrologue2(diagram_type *pDiag, <span class="keywordtype">int</span> iWordVersion)
-<a name="l00199"></a>00199 {
-<a name="l00200"></a>00200         <span class="keywordflow">switch</span> (eConversionType) {
-<a name="l00201"></a>00201         <span class="keywordflow">case</span> conversion_text:
-<a name="l00202"></a>00202         <span class="keywordflow">case</span> conversion_fmt_text:
-<a name="l00203"></a>00203                 <span class="keywordflow">break</span>;
-<a name="l00204"></a>00204         <span class="keywordflow">case</span> conversion_ps:
-<a name="l00205"></a>00205                 vAddFontsPS(pDiag);
-<a name="l00206"></a>00206                 <span class="keywordflow">break</span>;
-<a name="l00207"></a>00207         <span class="keywordflow">case</span> conversion_xml:
-<a name="l00208"></a>00208                 vCreateBookIntro(pDiag, iWordVersion);
-<a name="l00209"></a>00209                 <span class="keywordflow">break</span>;
-<a name="l00210"></a>00210         <span class="keywordflow">case</span> conversion_pdf:
-<a name="l00211"></a>00211                 vCreateInfoDictionary(pDiag, iWordVersion);
-<a name="l00212"></a>00212                 vAddFontsPDF(pDiag);
-<a name="l00213"></a>00213                 <span class="keywordflow">break</span>;
-<a name="l00214"></a>00214         <span class="keywordflow">default</span>:
-<a name="l00215"></a>00215                 DBG_DEC(eConversionType);
-<a name="l00216"></a>00216                 <span class="keywordflow">break</span>;
-<a name="l00217"></a>00217         }
-<a name="l00218"></a>00218 } <span class="comment">/* end of vPrologue2 */</span>
-<a name="l00219"></a>00219 
-<a name="l00220"></a>00220 <span class="comment">/*</span>
-<a name="l00221"></a>00221 <span class="comment"> * vMove2NextLine - move to the next line</span>
-<a name="l00222"></a>00222 <span class="comment"> */</span>
-<a name="l00223"></a>00223 <span class="keywordtype">void</span>
-<a name="l00224"></a>00224 vMove2NextLine(diagram_type *pDiag, drawfile_fontref tFontRef,
-<a name="l00225"></a>00225         USHORT usFontSize)
-<a name="l00226"></a>00226 {
-<a name="l00227"></a>00227         fail(pDiag == NULL);
-<a name="l00228"></a>00228         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00229"></a>00229         fail(usFontSize &lt; MIN_FONT_SIZE || usFontSize &gt; MAX_FONT_SIZE);
-<a name="l00230"></a>00230 
-<a name="l00231"></a>00231         <span class="keywordflow">switch</span> (eConversionType) {
-<a name="l00232"></a>00232         <span class="keywordflow">case</span> conversion_text:
-<a name="l00233"></a>00233         <span class="keywordflow">case</span> conversion_fmt_text:
-<a name="l00234"></a>00234                 vMove2NextLineTXT(pDiag);
-<a name="l00235"></a>00235                 <span class="keywordflow">break</span>;
-<a name="l00236"></a>00236         <span class="keywordflow">case</span> conversion_ps:
-<a name="l00237"></a>00237                 vMove2NextLinePS(pDiag, usFontSize);
-<a name="l00238"></a>00238                 <span class="keywordflow">break</span>;
-<a name="l00239"></a>00239         <span class="keywordflow">case</span> conversion_xml:
-<a name="l00240"></a>00240                 vMove2NextLineXML(pDiag);
-<a name="l00241"></a>00241                 <span class="keywordflow">break</span>;
-<a name="l00242"></a>00242         <span class="keywordflow">case</span> conversion_pdf:
-<a name="l00243"></a>00243                 vMove2NextLinePDF(pDiag, usFontSize);
-<a name="l00244"></a>00244                 <span class="keywordflow">break</span>;
-<a name="l00245"></a>00245         <span class="keywordflow">default</span>:
-<a name="l00246"></a>00246                 DBG_DEC(eConversionType);
-<a name="l00247"></a>00247                 <span class="keywordflow">break</span>;
-<a name="l00248"></a>00248         }
-<a name="l00249"></a>00249 } <span class="comment">/* end of vMove2NextLine */</span>
-<a name="l00250"></a>00250 
-<a name="l00251"></a>00251 <span class="comment">/*</span>
-<a name="l00252"></a>00252 <span class="comment"> * vSubstring2Diagram - put a sub string into a diagram</span>
-<a name="l00253"></a>00253 <span class="comment"> */</span>
-<a name="l00254"></a>00254 <span class="keywordtype">void</span>
-<a name="l00255"></a>00255 vSubstring2Diagram(diagram_type *pDiag,
-<a name="l00256"></a>00256         <span class="keywordtype">char</span> *szString, <span class="keywordtype">size_t</span> tStringLength, <span class="keywordtype">long</span> lStringWidth,
-<a name="l00257"></a>00257         UCHAR ucFontColor, USHORT usFontstyle, drawfile_fontref tFontRef,
-<a name="l00258"></a>00258         USHORT usFontSize, USHORT usMaxFontSize)
-<a name="l00259"></a>00259 {
-<a name="l00260"></a>00260         <span class="keywordflow">switch</span> (eConversionType) {
-<a name="l00261"></a>00261         <span class="keywordflow">case</span> conversion_text:
-<a name="l00262"></a>00262                 vSubstringTXT(pDiag, szString, tStringLength, lStringWidth);
-<a name="l00263"></a>00263                 <span class="keywordflow">break</span>;
-<a name="l00264"></a>00264         <span class="keywordflow">case</span> conversion_fmt_text:
-<a name="l00265"></a>00265                 vSubstringFMT(pDiag, szString, tStringLength, lStringWidth,
-<a name="l00266"></a>00266                                 usFontstyle);
-<a name="l00267"></a>00267                 <span class="keywordflow">break</span>;
-<a name="l00268"></a>00268         <span class="keywordflow">case</span> conversion_ps:
-<a name="l00269"></a>00269                 vSubstringPS(pDiag, szString, tStringLength, lStringWidth,
-<a name="l00270"></a>00270                                 ucFontColor, usFontstyle, tFontRef,
-<a name="l00271"></a>00271                                 usFontSize, usMaxFontSize);
-<a name="l00272"></a>00272                 <span class="keywordflow">break</span>;
-<a name="l00273"></a>00273         <span class="keywordflow">case</span> conversion_xml:
-<a name="l00274"></a>00274                 vSubstringXML(pDiag, szString, tStringLength, lStringWidth,
-<a name="l00275"></a>00275                                 usFontstyle);
-<a name="l00276"></a>00276                 <span class="keywordflow">break</span>;
-<a name="l00277"></a>00277         <span class="keywordflow">case</span> conversion_pdf:
-<a name="l00278"></a>00278                 vSubstringPDF(pDiag, szString, tStringLength, lStringWidth,
-<a name="l00279"></a>00279                                 ucFontColor, usFontstyle, tFontRef,
-<a name="l00280"></a>00280                                 usFontSize, usMaxFontSize);
-<a name="l00281"></a>00281                 <span class="keywordflow">break</span>;
-<a name="l00282"></a>00282         <span class="keywordflow">default</span>:
-<a name="l00283"></a>00283                 DBG_DEC(eConversionType);
-<a name="l00284"></a>00284                 <span class="keywordflow">break</span>;
-<a name="l00285"></a>00285         }
-<a name="l00286"></a>00286         pDiag-&gt;lXleft += lStringWidth;
-<a name="l00287"></a>00287 } <span class="comment">/* end of vSubstring2Diagram */</span>
-<a name="l00288"></a>00288 
-<a name="l00289"></a>00289 <span class="comment">/*</span>
-<a name="l00290"></a>00290 <span class="comment"> * Create a start of paragraph (phase 1)</span>
-<a name="l00291"></a>00291 <span class="comment"> * Before indentation, list numbering, bullets etc.</span>
-<a name="l00292"></a>00292 <span class="comment"> */</span>
-<a name="l00293"></a>00293 <span class="keywordtype">void</span>
-<a name="l00294"></a>00294 vStartOfParagraph1(diagram_type *pDiag, <span class="keywordtype">long</span> lBeforeIndentation)
-<a name="l00295"></a>00295 {
-<a name="l00296"></a>00296         fail(pDiag == NULL);
-<a name="l00297"></a>00297 
-<a name="l00298"></a>00298         <span class="keywordflow">switch</span> (eConversionType) {
-<a name="l00299"></a>00299         <span class="keywordflow">case</span> conversion_text:
-<a name="l00300"></a>00300         <span class="keywordflow">case</span> conversion_fmt_text:
-<a name="l00301"></a>00301                 vStartOfParagraphTXT(pDiag, lBeforeIndentation);
-<a name="l00302"></a>00302                 <span class="keywordflow">break</span>;
-<a name="l00303"></a>00303         <span class="keywordflow">case</span> conversion_ps:
-<a name="l00304"></a>00304                 vStartOfParagraphPS(pDiag, lBeforeIndentation);
-<a name="l00305"></a>00305                 <span class="keywordflow">break</span>;
-<a name="l00306"></a>00306         <span class="keywordflow">case</span> conversion_xml:
-<a name="l00307"></a>00307                 <span class="keywordflow">break</span>;
-<a name="l00308"></a>00308         <span class="keywordflow">case</span> conversion_pdf:
-<a name="l00309"></a>00309                 vStartOfParagraphPDF(pDiag, lBeforeIndentation);
-<a name="l00310"></a>00310                 <span class="keywordflow">break</span>;
-<a name="l00311"></a>00311         <span class="keywordflow">default</span>:
-<a name="l00312"></a>00312                 DBG_DEC(eConversionType);
-<a name="l00313"></a>00313                 <span class="keywordflow">break</span>;
-<a name="l00314"></a>00314         }
-<a name="l00315"></a>00315 } <span class="comment">/* end of vStartOfParagraph1 */</span>
-<a name="l00316"></a>00316 
-<a name="l00317"></a>00317 <span class="comment">/*</span>
-<a name="l00318"></a>00318 <span class="comment"> * Create a start of paragraph (phase 2)</span>
-<a name="l00319"></a>00319 <span class="comment"> * After indentation, list numbering, bullets etc.</span>
-<a name="l00320"></a>00320 <span class="comment"> */</span>
-<a name="l00321"></a>00321 <span class="keywordtype">void</span>
-<a name="l00322"></a>00322 vStartOfParagraph2(diagram_type *pDiag)
-<a name="l00323"></a>00323 {
-<a name="l00324"></a>00324         fail(pDiag == NULL);
-<a name="l00325"></a>00325 
-<a name="l00326"></a>00326         <span class="keywordflow">switch</span> (eConversionType) {
-<a name="l00327"></a>00327         <span class="keywordflow">case</span> conversion_text:
-<a name="l00328"></a>00328         <span class="keywordflow">case</span> conversion_fmt_text:
-<a name="l00329"></a>00329                 <span class="keywordflow">break</span>;
-<a name="l00330"></a>00330         <span class="keywordflow">case</span> conversion_ps:
-<a name="l00331"></a>00331                 <span class="keywordflow">break</span>;
-<a name="l00332"></a>00332         <span class="keywordflow">case</span> conversion_xml:
-<a name="l00333"></a>00333                 vStartOfParagraphXML(pDiag, 1);
-<a name="l00334"></a>00334                 <span class="keywordflow">break</span>;
-<a name="l00335"></a>00335         <span class="keywordflow">case</span> conversion_pdf:
-<a name="l00336"></a>00336                 <span class="keywordflow">break</span>;
-<a name="l00337"></a>00337         <span class="keywordflow">default</span>:
-<a name="l00338"></a>00338                 DBG_DEC(eConversionType);
-<a name="l00339"></a>00339                 <span class="keywordflow">break</span>;
-<a name="l00340"></a>00340         }
-<a name="l00341"></a>00341 } <span class="comment">/* end of vStartOfParagraph2 */</span>
-<a name="l00342"></a>00342 
-<a name="l00343"></a>00343 <span class="comment">/*</span>
-<a name="l00344"></a>00344 <span class="comment"> * Create an end of paragraph</span>
-<a name="l00345"></a>00345 <span class="comment"> */</span>
-<a name="l00346"></a>00346 <span class="keywordtype">void</span>
-<a name="l00347"></a>00347 vEndOfParagraph(diagram_type *pDiag,
-<a name="l00348"></a>00348         drawfile_fontref tFontRef, USHORT usFontSize, <span class="keywordtype">long</span> lAfterIndentation)
-<a name="l00349"></a>00349 {
-<a name="l00350"></a>00350         fail(pDiag == NULL);
-<a name="l00351"></a>00351         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00352"></a>00352         fail(usFontSize &lt; MIN_FONT_SIZE || usFontSize &gt; MAX_FONT_SIZE);
-<a name="l00353"></a>00353         fail(lAfterIndentation &lt; 0);
-<a name="l00354"></a>00354 
-<a name="l00355"></a>00355         <span class="keywordflow">switch</span> (eConversionType) {
-<a name="l00356"></a>00356         <span class="keywordflow">case</span> conversion_text:
-<a name="l00357"></a>00357         <span class="keywordflow">case</span> conversion_fmt_text:
-<a name="l00358"></a>00358                 vEndOfParagraphTXT(pDiag, lAfterIndentation);
-<a name="l00359"></a>00359                 <span class="keywordflow">break</span>;
-<a name="l00360"></a>00360         <span class="keywordflow">case</span> conversion_ps:
-<a name="l00361"></a>00361                 vEndOfParagraphPS(pDiag, usFontSize, lAfterIndentation);
-<a name="l00362"></a>00362                 <span class="keywordflow">break</span>;
-<a name="l00363"></a>00363         <span class="keywordflow">case</span> conversion_xml:
-<a name="l00364"></a>00364                 vEndOfParagraphXML(pDiag, 1);
-<a name="l00365"></a>00365                 <span class="keywordflow">break</span>;
-<a name="l00366"></a>00366         <span class="keywordflow">case</span> conversion_pdf:
-<a name="l00367"></a>00367                 vEndOfParagraphPDF(pDiag, usFontSize, lAfterIndentation);
-<a name="l00368"></a>00368                 <span class="keywordflow">break</span>;
-<a name="l00369"></a>00369         <span class="keywordflow">default</span>:
-<a name="l00370"></a>00370                 DBG_DEC(eConversionType);
-<a name="l00371"></a>00371                 <span class="keywordflow">break</span>;
-<a name="l00372"></a>00372         }
-<a name="l00373"></a>00373 } <span class="comment">/* end of vEndOfParagraph */</span>
-<a name="l00374"></a>00374 
-<a name="l00375"></a>00375 <span class="comment">/*</span>
-<a name="l00376"></a>00376 <span class="comment"> * Create an end of page</span>
-<a name="l00377"></a>00377 <span class="comment"> */</span>
-<a name="l00378"></a>00378 <span class="keywordtype">void</span>
-<a name="l00379"></a>00379 vEndOfPage(diagram_type *pDiag, <span class="keywordtype">long</span> lAfterIndentation, BOOL bNewSection)
-<a name="l00380"></a>00380 {
-<a name="l00381"></a>00381         <span class="keywordflow">switch</span> (eConversionType) {
-<a name="l00382"></a>00382         <span class="keywordflow">case</span> conversion_text:
-<a name="l00383"></a>00383         <span class="keywordflow">case</span> conversion_fmt_text:
-<a name="l00384"></a>00384                 vEndOfPageTXT(pDiag, lAfterIndentation);
-<a name="l00385"></a>00385                 <span class="keywordflow">break</span>;
-<a name="l00386"></a>00386         <span class="keywordflow">case</span> conversion_ps:
-<a name="l00387"></a>00387                 vEndOfPagePS(pDiag, bNewSection);
-<a name="l00388"></a>00388                 <span class="keywordflow">break</span>;
-<a name="l00389"></a>00389         <span class="keywordflow">case</span> conversion_xml:
-<a name="l00390"></a>00390                 vEndOfPageXML(pDiag);
-<a name="l00391"></a>00391                 <span class="keywordflow">break</span>;
-<a name="l00392"></a>00392         <span class="keywordflow">case</span> conversion_pdf:
-<a name="l00393"></a>00393                 vEndOfPagePDF(pDiag, bNewSection);
-<a name="l00394"></a>00394                 <span class="keywordflow">break</span>;
-<a name="l00395"></a>00395         <span class="keywordflow">default</span>:
-<a name="l00396"></a>00396                 DBG_DEC(eConversionType);
-<a name="l00397"></a>00397                 <span class="keywordflow">break</span>;
-<a name="l00398"></a>00398         }
-<a name="l00399"></a>00399 } <span class="comment">/* end of vEndOfPage */</span>
-<a name="l00400"></a>00400 
-<a name="l00401"></a>00401 <span class="comment">/*</span>
-<a name="l00402"></a>00402 <span class="comment"> * vSetHeaders - set the headers</span>
-<a name="l00403"></a>00403 <span class="comment"> */</span>
-<a name="l00404"></a>00404 <span class="keywordtype">void</span>
-<a name="l00405"></a>00405 vSetHeaders(diagram_type *pDiag, USHORT usIstd)
-<a name="l00406"></a>00406 {
-<a name="l00407"></a>00407         <span class="keywordflow">switch</span> (eConversionType) {
-<a name="l00408"></a>00408         <span class="keywordflow">case</span> conversion_text:
-<a name="l00409"></a>00409         <span class="keywordflow">case</span> conversion_fmt_text:
-<a name="l00410"></a>00410                 <span class="keywordflow">break</span>;
-<a name="l00411"></a>00411         <span class="keywordflow">case</span> conversion_ps:
-<a name="l00412"></a>00412                 <span class="keywordflow">break</span>;
-<a name="l00413"></a>00413         <span class="keywordflow">case</span> conversion_xml:
-<a name="l00414"></a>00414                 vSetHeadersXML(pDiag, usIstd);
-<a name="l00415"></a>00415                 <span class="keywordflow">break</span>;
-<a name="l00416"></a>00416         <span class="keywordflow">case</span> conversion_pdf:
-<a name="l00417"></a>00417                 <span class="keywordflow">break</span>;
-<a name="l00418"></a>00418         <span class="keywordflow">default</span>:
-<a name="l00419"></a>00419                 DBG_DEC(eConversionType);
-<a name="l00420"></a>00420                 <span class="keywordflow">break</span>;
-<a name="l00421"></a>00421         }
-<a name="l00422"></a>00422 } <span class="comment">/* end of vSetHeaders */</span>
-<a name="l00423"></a>00423 
-<a name="l00424"></a>00424 <span class="comment">/*</span>
-<a name="l00425"></a>00425 <span class="comment"> * Create a start of list</span>
-<a name="l00426"></a>00426 <span class="comment"> */</span>
-<a name="l00427"></a>00427 <span class="keywordtype">void</span>
-<a name="l00428"></a>00428 vStartOfList(diagram_type *pDiag, UCHAR ucNFC, BOOL bIsEndOfTable)
-<a name="l00429"></a>00429 {
-<a name="l00430"></a>00430         <span class="keywordflow">switch</span> (eConversionType) {
-<a name="l00431"></a>00431         <span class="keywordflow">case</span> conversion_text:
-<a name="l00432"></a>00432         <span class="keywordflow">case</span> conversion_fmt_text:
-<a name="l00433"></a>00433                 <span class="keywordflow">break</span>;
-<a name="l00434"></a>00434         <span class="keywordflow">case</span> conversion_ps:
-<a name="l00435"></a>00435                 <span class="keywordflow">break</span>;
-<a name="l00436"></a>00436         <span class="keywordflow">case</span> conversion_xml:
-<a name="l00437"></a>00437                 vStartOfListXML(pDiag, ucNFC, bIsEndOfTable);
-<a name="l00438"></a>00438                 <span class="keywordflow">break</span>;
-<a name="l00439"></a>00439         <span class="keywordflow">case</span> conversion_pdf:
-<a name="l00440"></a>00440                 <span class="keywordflow">break</span>;
-<a name="l00441"></a>00441         <span class="keywordflow">default</span>:
-<a name="l00442"></a>00442                 DBG_DEC(eConversionType);
-<a name="l00443"></a>00443                 <span class="keywordflow">break</span>;
-<a name="l00444"></a>00444         }
-<a name="l00445"></a>00445 } <span class="comment">/* end of vStartOfList */</span>
-<a name="l00446"></a>00446 
-<a name="l00447"></a>00447 <span class="comment">/*</span>
-<a name="l00448"></a>00448 <span class="comment"> * Create an end of list</span>
-<a name="l00449"></a>00449 <span class="comment"> */</span>
-<a name="l00450"></a>00450 <span class="keywordtype">void</span>
-<a name="l00451"></a>00451 vEndOfList(diagram_type *pDiag)
-<a name="l00452"></a>00452 {
-<a name="l00453"></a>00453         <span class="keywordflow">switch</span> (eConversionType) {
-<a name="l00454"></a>00454         <span class="keywordflow">case</span> conversion_text:
-<a name="l00455"></a>00455         <span class="keywordflow">case</span> conversion_fmt_text:
-<a name="l00456"></a>00456                 <span class="keywordflow">break</span>;
-<a name="l00457"></a>00457         <span class="keywordflow">case</span> conversion_ps:
-<a name="l00458"></a>00458                 <span class="keywordflow">break</span>;
-<a name="l00459"></a>00459         <span class="keywordflow">case</span> conversion_xml:
-<a name="l00460"></a>00460                 vEndOfListXML(pDiag);
-<a name="l00461"></a>00461                 <span class="keywordflow">break</span>;
-<a name="l00462"></a>00462         <span class="keywordflow">case</span> conversion_pdf:
-<a name="l00463"></a>00463                 <span class="keywordflow">break</span>;
-<a name="l00464"></a>00464         <span class="keywordflow">default</span>:
-<a name="l00465"></a>00465                 DBG_DEC(eConversionType);
-<a name="l00466"></a>00466                 <span class="keywordflow">break</span>;
-<a name="l00467"></a>00467         }
-<a name="l00468"></a>00468 } <span class="comment">/* end of vEndOfList */</span>
-<a name="l00469"></a>00469 
-<a name="l00470"></a>00470 <span class="comment">/*</span>
-<a name="l00471"></a>00471 <span class="comment"> * Create a start of a list item</span>
-<a name="l00472"></a>00472 <span class="comment"> */</span>
-<a name="l00473"></a>00473 <span class="keywordtype">void</span>
-<a name="l00474"></a>00474 vStartOfListItem(diagram_type *pDiag, BOOL bNoMarks)
-<a name="l00475"></a>00475 {
-<a name="l00476"></a>00476         <span class="keywordflow">switch</span> (eConversionType) {
-<a name="l00477"></a>00477         <span class="keywordflow">case</span> conversion_text:
-<a name="l00478"></a>00478         <span class="keywordflow">case</span> conversion_fmt_text:
-<a name="l00479"></a>00479                 <span class="keywordflow">break</span>;
-<a name="l00480"></a>00480         <span class="keywordflow">case</span> conversion_ps:
-<a name="l00481"></a>00481                 <span class="keywordflow">break</span>;
-<a name="l00482"></a>00482         <span class="keywordflow">case</span> conversion_xml:
-<a name="l00483"></a>00483                 vStartOfListItemXML(pDiag, bNoMarks);
-<a name="l00484"></a>00484                 <span class="keywordflow">break</span>;
-<a name="l00485"></a>00485         <span class="keywordflow">case</span> conversion_pdf:
-<a name="l00486"></a>00486                 <span class="keywordflow">break</span>;
-<a name="l00487"></a>00487         <span class="keywordflow">default</span>:
-<a name="l00488"></a>00488                 DBG_DEC(eConversionType);
-<a name="l00489"></a>00489                 <span class="keywordflow">break</span>;
-<a name="l00490"></a>00490         }
-<a name="l00491"></a>00491 } <span class="comment">/* end of vStartOfListItem */</span>
-<a name="l00492"></a>00492 
-<a name="l00493"></a>00493 <span class="comment">/*</span>
-<a name="l00494"></a>00494 <span class="comment"> * Create an end of a table</span>
-<a name="l00495"></a>00495 <span class="comment"> */</span>
-<a name="l00496"></a>00496 <span class="keywordtype">void</span>
-<a name="l00497"></a>00497 vEndOfTable(diagram_type *pDiag)
-<a name="l00498"></a>00498 {
-<a name="l00499"></a>00499         <span class="keywordflow">switch</span> (eConversionType) {
-<a name="l00500"></a>00500         <span class="keywordflow">case</span> conversion_text:
-<a name="l00501"></a>00501         <span class="keywordflow">case</span> conversion_fmt_text:
-<a name="l00502"></a>00502                 <span class="keywordflow">break</span>;
-<a name="l00503"></a>00503         <span class="keywordflow">case</span> conversion_ps:
-<a name="l00504"></a>00504                 <span class="keywordflow">break</span>;
-<a name="l00505"></a>00505         <span class="keywordflow">case</span> conversion_xml:
-<a name="l00506"></a>00506                 vEndOfTableXML(pDiag);
-<a name="l00507"></a>00507                 <span class="keywordflow">break</span>;
-<a name="l00508"></a>00508         <span class="keywordflow">case</span> conversion_pdf:
-<a name="l00509"></a>00509                 <span class="keywordflow">break</span>;
-<a name="l00510"></a>00510         <span class="keywordflow">default</span>:
-<a name="l00511"></a>00511                 DBG_DEC(eConversionType);
-<a name="l00512"></a>00512                 <span class="keywordflow">break</span>;
-<a name="l00513"></a>00513         }
-<a name="l00514"></a>00514 } <span class="comment">/* end of vEndOfTable */</span>
-<a name="l00515"></a>00515 
-<a name="l00516"></a>00516 <span class="comment">/*</span>
-<a name="l00517"></a>00517 <span class="comment"> * Add a table row</span>
-<a name="l00518"></a>00518 <span class="comment"> *</span>
-<a name="l00519"></a>00519 <span class="comment"> * Returns TRUE when conversion type is XML</span>
-<a name="l00520"></a>00520 <span class="comment"> */</span>
-<a name="l00521"></a>00521 BOOL
-<a name="l00522"></a>00522 bAddTableRow(diagram_type *pDiag, <span class="keywordtype">char</span> **aszColTxt,
-<a name="l00523"></a>00523         <span class="keywordtype">int</span> iNbrOfColumns, <span class="keyword">const</span> <span class="keywordtype">short</span> *asColumnWidth, UCHAR ucBorderInfo)
-<a name="l00524"></a>00524 {
-<a name="l00525"></a>00525         <span class="keywordflow">switch</span> (eConversionType) {
-<a name="l00526"></a>00526         <span class="keywordflow">case</span> conversion_text:
-<a name="l00527"></a>00527         <span class="keywordflow">case</span> conversion_fmt_text:
-<a name="l00528"></a>00528                 <span class="keywordflow">break</span>;
-<a name="l00529"></a>00529         <span class="keywordflow">case</span> conversion_ps:
-<a name="l00530"></a>00530                 <span class="keywordflow">break</span>;
-<a name="l00531"></a>00531         <span class="keywordflow">case</span> conversion_xml:
-<a name="l00532"></a>00532                 vAddTableRowXML(pDiag, aszColTxt,
-<a name="l00533"></a>00533                                 iNbrOfColumns, asColumnWidth,
-<a name="l00534"></a>00534                                 ucBorderInfo);
-<a name="l00535"></a>00535                 <span class="keywordflow">return</span> TRUE;
-<a name="l00536"></a>00536         <span class="keywordflow">case</span> conversion_pdf:
-<a name="l00537"></a>00537                 <span class="keywordflow">break</span>;
-<a name="l00538"></a>00538         <span class="keywordflow">default</span>:
-<a name="l00539"></a>00539                 DBG_DEC(eConversionType);
-<a name="l00540"></a>00540                 <span class="keywordflow">break</span>;
-<a name="l00541"></a>00541         }
-<a name="l00542"></a>00542         <span class="keywordflow">return</span> FALSE;
-<a name="l00543"></a>00543 } <span class="comment">/* end of bAddTableRow */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/pdf_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1164 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/pdf.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/pdf.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * pdf.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2003-2005 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Functions to deal with the Adobe Portable Document Format (pdf)</span>
-<a name="l00007"></a>00007 <span class="comment"> *</span>
-<a name="l00008"></a>00008 <span class="comment"> */</span>
-<a name="l00009"></a>00009 
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;stdarg.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;version.h&quot;</span>
-<a name="l00013"></a>00013 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00014"></a>00014 
-<a name="l00015"></a>00015 
-<a name="l00016"></a>00016 <span class="comment">/* Constants for the file positions */</span>
-<a name="l00017"></a>00017 <span class="preprocessor">#define INITIAL_LOCATION_SIZE   20</span>
-<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define INITIAL_PAGEOBJECT_SIZE  5</span>
-<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define EXTENSION_ARRAY_SIZE    10</span>
-<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define EXTENSION_ARRAY_SIZE    30</span>
-<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00024"></a>00024 
-<a name="l00025"></a>00025 <span class="comment">/* The character set */</span>
-<a name="l00026"></a>00026 <span class="keyword">static</span> encoding_type    eEncoding = encoding_neutral;
-<a name="l00027"></a>00027 <span class="comment">/* Current creator for a PDF header */</span>
-<a name="l00028"></a>00028 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>       *szProducer = NULL;
-<a name="l00029"></a>00029 <span class="comment">/* The height and width of a PDF page (in DrawUnits) */</span>
-<a name="l00030"></a>00030 <span class="keyword">static</span> <span class="keywordtype">long</span>             lPageHeight = LONG_MAX;
-<a name="l00031"></a>00031 <span class="keyword">static</span> <span class="keywordtype">long</span>             lPageWidth = LONG_MAX;
-<a name="l00032"></a>00032 <span class="comment">/* The height of the footer on the current page (in DrawUnits) */</span>
-<a name="l00033"></a>00033 <span class="keyword">static</span> <span class="keywordtype">long</span>             lFooterHeight = 0;
-<a name="l00034"></a>00034 <span class="comment">/* Inside a footer (to prevent an infinite loop when the footer is too big) */</span>
-<a name="l00035"></a>00035 <span class="keyword">static</span> BOOL             bInFtrSpace = FALSE;
-<a name="l00036"></a>00036 <span class="comment">/* Current font information */</span>
-<a name="l00037"></a>00037 <span class="keyword">static</span> drawfile_fontref tFontRefCurr = (drawfile_fontref)-1;
-<a name="l00038"></a>00038 <span class="keyword">static</span> USHORT           usFontSizeCurr = 0;
-<a name="l00039"></a>00039 <span class="keyword">static</span> <span class="keywordtype">int</span>              iFontColorCurr = -1;
-<a name="l00040"></a>00040 <span class="comment">/* Current vertical position information */</span>
-<a name="l00041"></a>00041 <span class="keyword">static</span> <span class="keywordtype">long</span>             lYtopCurr = -1;
-<a name="l00042"></a>00042 <span class="comment">/* Image counter */</span>
-<a name="l00043"></a>00043 <span class="keyword">static</span> <span class="keywordtype">int</span>              iImageCount = 0;
-<a name="l00044"></a>00044 <span class="comment">/* Section index */</span>
-<a name="l00045"></a>00045 <span class="keyword">static</span> <span class="keywordtype">int</span>              iSectionIndex = 0;
-<a name="l00046"></a>00046 <span class="comment">/* Are we on the first page of the section? */</span>
-<a name="l00047"></a>00047 <span class="keyword">static</span> BOOL             bFirstInSection = TRUE;
-<a name="l00048"></a>00048 <span class="comment">/* File positions */</span>
-<a name="l00049"></a>00049 <span class="keyword">static</span> <span class="keywordtype">long</span>             lFilePosition = 0;
-<a name="l00050"></a>00050 <span class="keyword">static</span> <span class="keywordtype">long</span>             *alLocation = NULL;
-<a name="l00051"></a>00051 <span class="keyword">static</span> <span class="keywordtype">size_t</span>           tLocations = 0;
-<a name="l00052"></a>00052 <span class="keyword">static</span> <span class="keywordtype">int</span>              iMaxLocationNumber = 0;
-<a name="l00053"></a>00053 <span class="comment">/* File position at the start of a page */</span>
-<a name="l00054"></a>00054 <span class="keyword">static</span> <span class="keywordtype">long</span>             lStreamStart = -1;
-<a name="l00055"></a>00055 <span class="comment">/* Page objects */</span>
-<a name="l00056"></a>00056 <span class="keyword">static</span> <span class="keywordtype">int</span>              *aiPageObject = NULL;
-<a name="l00057"></a>00057 <span class="keyword">static</span> <span class="keywordtype">int</span>              iPageCount = 0;
-<a name="l00058"></a>00058 <span class="keyword">static</span> <span class="keywordtype">size_t</span>           tMaxPageObjects = 0;
-<a name="l00059"></a>00059 <span class="comment">/* Current object number */</span>
-<a name="l00060"></a>00060 <span class="comment">/* 1 = root; 2 = info; 3 = pages; 4 = encoding; 5-16 = fonts; 17 = resources */</span>
-<a name="l00061"></a>00061 <span class="keyword">static</span> <span class="keywordtype">int</span>              iObjectNumberCurr = 17;
-<a name="l00062"></a>00062 
-<a name="l00063"></a>00063 <span class="keyword">static</span> <span class="keywordtype">void</span>             vMoveTo(diagram_type *, <span class="keywordtype">long</span>);
-<a name="l00064"></a>00064 
-<a name="l00065"></a>00065 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">struct </span>{
-<a name="l00066"></a>00066         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szPDFname;
-<a name="l00067"></a>00067         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szPSname;
-<a name="l00068"></a>00068 } atFontname[] = {
-<a name="l00069"></a>00069         { <span class="stringliteral">&quot;Courier&quot;</span>,                    FONT_MONOSPACED_PLAIN },
-<a name="l00070"></a>00070         { <span class="stringliteral">&quot;Courier-Bold&quot;</span>,               FONT_MONOSPACED_BOLD },
-<a name="l00071"></a>00071         { <span class="stringliteral">&quot;Courier-Oblique&quot;</span>,            FONT_MONOSPACED_ITALIC },
-<a name="l00072"></a>00072         { <span class="stringliteral">&quot;Courier-BoldOblique&quot;</span>,        FONT_MONOSPACED_BOLDITALIC },
-<a name="l00073"></a>00073         { <span class="stringliteral">&quot;Helvetica&quot;</span>,                  FONT_SANS_SERIF_PLAIN },
-<a name="l00074"></a>00074         { <span class="stringliteral">&quot;Helvetica-Bold&quot;</span>,             FONT_SANS_SERIF_BOLD },
-<a name="l00075"></a>00075         { <span class="stringliteral">&quot;Helvetica-Oblique&quot;</span>,          FONT_SANS_SERIF_ITALIC },
-<a name="l00076"></a>00076         { <span class="stringliteral">&quot;Helvetica-BoldOblique&quot;</span>,      FONT_SANS_SERIF_BOLDITALIC },
-<a name="l00077"></a>00077         { <span class="stringliteral">&quot;Times-Roman&quot;</span>,                FONT_SERIF_PLAIN },
-<a name="l00078"></a>00078         { <span class="stringliteral">&quot;Times-Bold&quot;</span>,                 FONT_SERIF_BOLD },
-<a name="l00079"></a>00079         { <span class="stringliteral">&quot;Times-Italic&quot;</span>,               FONT_SERIF_ITALIC },
-<a name="l00080"></a>00080         { <span class="stringliteral">&quot;Times-BoldItalic&quot;</span>,           FONT_SERIF_BOLDITALIC },
-<a name="l00081"></a>00081 };
-<a name="l00082"></a>00082 
-<a name="l00083"></a>00083 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *iso_8859_1[] = {
-<a name="l00084"></a>00084 <span class="stringliteral">&quot;128 /Euro&quot;</span>,
-<a name="l00085"></a>00085 <span class="stringliteral">&quot;140 /ellipsis /trademark /perthousand /bullet&quot;</span>,
-<a name="l00086"></a>00086 <span class="stringliteral">&quot;    /quoteleft /quoteright /guilsinglleft /guilsinglright&quot;</span>,
-<a name="l00087"></a>00087 <span class="stringliteral">&quot;    /quotedblleft /quotedblright /quotedblbase /endash /emdash&quot;</span>,
-<a name="l00088"></a>00088 <span class="stringliteral">&quot;    /minus /OE /oe /dagger /daggerdbl /fi /fl&quot;</span>,
-<a name="l00089"></a>00089 <span class="stringliteral">&quot;160 /space /exclamdown /cent /sterling /currency&quot;</span>,
-<a name="l00090"></a>00090 <span class="stringliteral">&quot;    /yen /brokenbar /section /dieresis /copyright&quot;</span>,
-<a name="l00091"></a>00091 <span class="stringliteral">&quot;    /ordfeminine /guillemotleft /logicalnot /hyphen /registered&quot;</span>,
-<a name="l00092"></a>00092 <span class="stringliteral">&quot;    /macron /degree /plusminus /twosuperior /threesuperior&quot;</span>,
-<a name="l00093"></a>00093 <span class="stringliteral">&quot;    /acute /mu /paragraph /periodcentered /cedilla&quot;</span>,
-<a name="l00094"></a>00094 <span class="stringliteral">&quot;    /onesuperior /ordmasculine /guillemotright /onequarter&quot;</span>,
-<a name="l00095"></a>00095 <span class="stringliteral">&quot;    /onehalf /threequarters /questiondown /Agrave /Aacute&quot;</span>,
-<a name="l00096"></a>00096 <span class="stringliteral">&quot;    /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla&quot;</span>,
-<a name="l00097"></a>00097 <span class="stringliteral">&quot;    /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute&quot;</span>,
-<a name="l00098"></a>00098 <span class="stringliteral">&quot;    /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute&quot;</span>,
-<a name="l00099"></a>00099 <span class="stringliteral">&quot;    /Ocircumflex /Otilde /Odieresis /multiply /Oslash&quot;</span>,
-<a name="l00100"></a>00100 <span class="stringliteral">&quot;    /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn&quot;</span>,
-<a name="l00101"></a>00101 <span class="stringliteral">&quot;    /germandbls /agrave /aacute /acircumflex /atilde&quot;</span>,
-<a name="l00102"></a>00102 <span class="stringliteral">&quot;    /adieresis /aring /ae /ccedilla /egrave /eacute&quot;</span>,
-<a name="l00103"></a>00103 <span class="stringliteral">&quot;    /ecircumflex /edieresis /igrave /iacute /icircumflex&quot;</span>,
-<a name="l00104"></a>00104 <span class="stringliteral">&quot;    /idieresis /eth /ntilde /ograve /oacute /ocircumflex&quot;</span>,
-<a name="l00105"></a>00105 <span class="stringliteral">&quot;    /otilde /odieresis /divide /oslash /ugrave /uacute&quot;</span>,
-<a name="l00106"></a>00106 <span class="stringliteral">&quot;    /ucircumflex /udieresis /yacute /thorn /ydieresis&quot;</span>,
-<a name="l00107"></a>00107 };
-<a name="l00108"></a>00108 
-<a name="l00109"></a>00109 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *iso_8859_2[] = {
-<a name="l00110"></a>00110 <span class="stringliteral">&quot;160 /space /Aogonek /breve /Lslash /currency /Lcaron&quot;</span>,
-<a name="l00111"></a>00111 <span class="stringliteral">&quot;    /Sacute /section /dieresis /Scaron /Scommaaccent&quot;</span>,
-<a name="l00112"></a>00112 <span class="stringliteral">&quot;    /Tcaron /Zacute /hyphen /Zcaron /Zdotaccent /degree&quot;</span>,
-<a name="l00113"></a>00113 <span class="stringliteral">&quot;    /aogonek /ogonek /lslash /acute /lcaron /sacute&quot;</span>,
-<a name="l00114"></a>00114 <span class="stringliteral">&quot;    /caron /cedilla /scaron /scommaaccent /tcaron&quot;</span>,
-<a name="l00115"></a>00115 <span class="stringliteral">&quot;    /zacute /hungarumlaut /zcaron /zdotaccent /Racute&quot;</span>,
-<a name="l00116"></a>00116 <span class="stringliteral">&quot;    /Aacute /Acircumflex /Abreve /Adieresis /Lacute&quot;</span>,
-<a name="l00117"></a>00117 <span class="stringliteral">&quot;    /Cacute /Ccedilla /Ccaron /Eacute /Eogonek&quot;</span>,
-<a name="l00118"></a>00118 <span class="stringliteral">&quot;    /Edieresis /Ecaron /Iacute /Icircumflex /Dcaron&quot;</span>,
-<a name="l00119"></a>00119 <span class="stringliteral">&quot;    /.notdef /Nacute /Ncaron /Oacute /Ocircumflex&quot;</span>,
-<a name="l00120"></a>00120 <span class="stringliteral">&quot;    /Ohungarumlaut /Odieresis /multiply /Rcaron /Uring&quot;</span>,
-<a name="l00121"></a>00121 <span class="stringliteral">&quot;    /Uacute /Uhungarumlaut /Udieresis /Yacute /Tcommaaccent&quot;</span>,
-<a name="l00122"></a>00122 <span class="stringliteral">&quot;    /germandbls /racute /aacute /acircumflex /abreve&quot;</span>,
-<a name="l00123"></a>00123 <span class="stringliteral">&quot;    /adieresis /lacute /cacute /ccedilla /ccaron /eacute&quot;</span>,
-<a name="l00124"></a>00124 <span class="stringliteral">&quot;    /eogonek /edieresis /ecaron /iacute /icircumflex&quot;</span>,
-<a name="l00125"></a>00125 <span class="stringliteral">&quot;    /dcaron /.notdef /nacute /ncaron /oacute /ocircumflex&quot;</span>,
-<a name="l00126"></a>00126 <span class="stringliteral">&quot;    /ohungarumlaut /odieresis /divide /rcaron /uring&quot;</span>,
-<a name="l00127"></a>00127 <span class="stringliteral">&quot;    /uacute /uhungarumlaut /udieresis /yacute /tcommaaccent&quot;</span>,
-<a name="l00128"></a>00128 <span class="stringliteral">&quot;    /dotaccent&quot;</span>,
-<a name="l00129"></a>00129 };
-<a name="l00130"></a>00130 
-<a name="l00131"></a>00131 
-<a name="l00132"></a>00132 <span class="comment">/*</span>
-<a name="l00133"></a>00133 <span class="comment"> * tGetFontIndex - get the font index</span>
-<a name="l00134"></a>00134 <span class="comment"> */</span>
-<a name="l00135"></a>00135 <span class="keyword">static</span> <span class="keywordtype">size_t</span>
-<a name="l00136"></a>00136 tGetFontIndex(drawfile_fontref tFontRef)
-<a name="l00137"></a>00137 {
-<a name="l00138"></a>00138         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szFontname;
-<a name="l00139"></a>00139         <span class="keywordtype">size_t</span>          tIndex;
-<a name="l00140"></a>00140 
-<a name="l00141"></a>00141         <span class="comment">/* Get the font name */</span>
-<a name="l00142"></a>00142         szFontname = szGetFontname(tFontRef);
-<a name="l00143"></a>00143         fail(szFontname == NULL);
-<a name="l00144"></a>00144         <span class="keywordflow">if</span> (szFontname == NULL) {
-<a name="l00145"></a>00145                 <span class="keywordflow">return</span> 0;
-<a name="l00146"></a>00146         }
-<a name="l00147"></a>00147 
-<a name="l00148"></a>00148         <span class="comment">/* Find the name in the table */</span>
-<a name="l00149"></a>00149         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; elementsof(atFontname); tIndex++) {
-<a name="l00150"></a>00150                 <span class="keywordflow">if</span> (STRCEQ(atFontname[tIndex].szPSname, szFontname)) {
-<a name="l00151"></a>00151                         <span class="keywordflow">return</span> tIndex;
-<a name="l00152"></a>00152                 }
-<a name="l00153"></a>00153         }
-<a name="l00154"></a>00154         <span class="comment">/* Not found */</span>
-<a name="l00155"></a>00155         DBG_DEC(tFontRef);
-<a name="l00156"></a>00156         DBG_MSG(szFontname);
-<a name="l00157"></a>00157         <span class="keywordflow">return</span> 0;
-<a name="l00158"></a>00158 } <span class="comment">/* end of tGetFontIndex */</span>
-<a name="l00159"></a>00159 
-<a name="l00160"></a>00160 <span class="comment">/*</span>
-<a name="l00161"></a>00161 <span class="comment"> * vSetLocation - store the location of objects</span>
-<a name="l00162"></a>00162 <span class="comment"> */</span>
-<a name="l00163"></a>00163 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00164"></a>00164 vSetLocation(<span class="keywordtype">int</span> iLocationNumber)
-<a name="l00165"></a>00165 {
-<a name="l00166"></a>00166         fail(iLocationNumber &lt;= 0);
-<a name="l00167"></a>00167 
-<a name="l00168"></a>00168         <span class="keywordflow">if</span> ((<span class="keywordtype">size_t</span>)iLocationNumber &gt;= tLocations) {
-<a name="l00169"></a>00169                 <span class="comment">/* Extend and set to zero */</span>
-<a name="l00170"></a>00170                 tLocations += EXTENSION_ARRAY_SIZE;
-<a name="l00171"></a>00171                 alLocation = xrealloc(alLocation, tLocations * <span class="keyword">sizeof</span>(<span class="keywordtype">long</span>));
-<a name="l00172"></a>00172                 memset(alLocation + tLocations - EXTENSION_ARRAY_SIZE,
-<a name="l00173"></a>00173                         0,
-<a name="l00174"></a>00174                         EXTENSION_ARRAY_SIZE * <span class="keyword">sizeof</span>(<span class="keywordtype">long</span>));
-<a name="l00175"></a>00175                 DBG_DEC(tLocations);
-<a name="l00176"></a>00176         }
-<a name="l00177"></a>00177         <span class="keywordflow">if</span> (iLocationNumber &gt; iMaxLocationNumber) {
-<a name="l00178"></a>00178                 iMaxLocationNumber = iLocationNumber;
-<a name="l00179"></a>00179         }
-<a name="l00180"></a>00180 
-<a name="l00181"></a>00181         DBG_DEC_C((<span class="keywordtype">size_t</span>)iLocationNumber &gt;= tLocations, iLocationNumber);
-<a name="l00182"></a>00182         DBG_DEC_C((<span class="keywordtype">size_t</span>)iLocationNumber &gt;= tLocations, tLocations);
-<a name="l00183"></a>00183         fail((<span class="keywordtype">size_t</span>)iLocationNumber &gt;= tLocations);
-<a name="l00184"></a>00184 
-<a name="l00185"></a>00185         alLocation[iLocationNumber] = lFilePosition;
-<a name="l00186"></a>00186 } <span class="comment">/* end of vSetLocation */</span>
-<a name="l00187"></a>00187 
-<a name="l00188"></a>00188 <span class="comment">/*</span>
-<a name="l00189"></a>00189 <span class="comment"> * vFillNextPageObject - fil the next page object with the current object number</span>
-<a name="l00190"></a>00190 <span class="comment"> */</span>
-<a name="l00191"></a>00191 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00192"></a>00192 vFillNextPageObject(<span class="keywordtype">void</span>)
-<a name="l00193"></a>00193 {
-<a name="l00194"></a>00194         iPageCount++;
-<a name="l00195"></a>00195         <span class="keywordflow">if</span> ((<span class="keywordtype">size_t</span>)iPageCount &gt;= tMaxPageObjects) {
-<a name="l00196"></a>00196                 <span class="comment">/* Extend the array */</span>
-<a name="l00197"></a>00197                 tMaxPageObjects += EXTENSION_ARRAY_SIZE;
-<a name="l00198"></a>00198                 aiPageObject = xrealloc(aiPageObject,
-<a name="l00199"></a>00199                                         tMaxPageObjects * <span class="keyword">sizeof</span>(<span class="keywordtype">int</span>));
-<a name="l00200"></a>00200                 DBG_DEC(tMaxPageObjects);
-<a name="l00201"></a>00201         }
-<a name="l00202"></a>00202         aiPageObject[iPageCount] = iObjectNumberCurr;
-<a name="l00203"></a>00203 } <span class="comment">/* end of vFillNextPageObject */</span>
-<a name="l00204"></a>00204 
-<a name="l00205"></a>00205 <span class="comment">/*</span>
-<a name="l00206"></a>00206 <span class="comment"> * vFPprintf - printf and update the fileposition</span>
-<a name="l00207"></a>00207 <span class="comment"> *</span>
-<a name="l00208"></a>00208 <span class="comment"> * called with arguments like fprintf(3)</span>
-<a name="l00209"></a>00209 <span class="comment"> */</span>
-<a name="l00210"></a>00210 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00211"></a>00211 vFPprintf(FILE *pOutFile, <span class="keyword">const</span> <span class="keywordtype">char</span> *szFormat, ...)
-<a name="l00212"></a>00212 {
-<a name="l00213"></a>00213         va_list tArg;
-<a name="l00214"></a>00214 
-<a name="l00215"></a>00215         va_start(tArg, szFormat);
-<a name="l00216"></a>00216         lFilePosition += vfprintf(pOutFile, szFormat, tArg);
-<a name="l00217"></a>00217         va_end(tArg);
-<a name="l00218"></a>00218 } <span class="comment">/* end of vFPprintf */</span>
-<a name="l00219"></a>00219 
-<a name="l00220"></a>00220 <span class="comment">/*</span>
-<a name="l00221"></a>00221 <span class="comment"> * vCreateInfoDictionary - create the document information dictionary</span>
-<a name="l00222"></a>00222 <span class="comment"> */</span>
-<a name="l00223"></a>00223 <span class="keywordtype">void</span>
-<a name="l00224"></a>00224 vCreateInfoDictionary(diagram_type *pDiag, <span class="keywordtype">int</span> iWordVersion)
-<a name="l00225"></a>00225 {
-<a name="l00226"></a>00226         FILE    *pOutFile;
-<a name="l00227"></a>00227         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szTitle, *szAuthor, *szSubject, *szCreator;
-<a name="l00228"></a>00228         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szCreationDate, *szModDate;
-<a name="l00229"></a>00229 
-<a name="l00230"></a>00230         fail(pDiag == NULL);
-<a name="l00231"></a>00231         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00232"></a>00232         fail(iWordVersion &lt; 0);
-<a name="l00233"></a>00233         fail(szProducer == NULL || szProducer[0] == <span class="charliteral">&#39;\0&#39;</span>);
-<a name="l00234"></a>00234 
-<a name="l00235"></a>00235         szTitle = szGetTitle();
-<a name="l00236"></a>00236         szAuthor = szGetAuthor();
-<a name="l00237"></a>00237         szSubject = szGetSubject();
-<a name="l00238"></a>00238         szCreationDate = szGetCreationDate();
-<a name="l00239"></a>00239         szModDate = szGetModDate();
-<a name="l00240"></a>00240 
-<a name="l00241"></a>00241         <span class="keywordflow">switch</span> (iWordVersion) {
-<a name="l00242"></a>00242         <span class="keywordflow">case</span> 0: szCreator = <span class="stringliteral">&quot;Word for DOS&quot;</span>; <span class="keywordflow">break</span>;
-<a name="l00243"></a>00243         <span class="keywordflow">case</span> 1: szCreator = <span class="stringliteral">&quot;WinWord 1.x&quot;</span>; <span class="keywordflow">break</span>;
-<a name="l00244"></a>00244         <span class="keywordflow">case</span> 2: szCreator = <span class="stringliteral">&quot;WinWord 2.0&quot;</span>; <span class="keywordflow">break</span>;
-<a name="l00245"></a>00245         <span class="keywordflow">case</span> 4: szCreator = <span class="stringliteral">&quot;MacWord 4&quot;</span>; <span class="keywordflow">break</span>;
-<a name="l00246"></a>00246         <span class="keywordflow">case</span> 5: szCreator = <span class="stringliteral">&quot;MacWord 5&quot;</span>; <span class="keywordflow">break</span>;
-<a name="l00247"></a>00247         <span class="keywordflow">case</span> 6: szCreator = <span class="stringliteral">&quot;Word 6&quot;</span>; <span class="keywordflow">break</span>;
-<a name="l00248"></a>00248         <span class="keywordflow">case</span> 7: szCreator = <span class="stringliteral">&quot;Word 7/95&quot;</span>; <span class="keywordflow">break</span>;
-<a name="l00249"></a>00249         <span class="keywordflow">case</span> 8: szCreator = <span class="stringliteral">&quot;Word 97 or later&quot;</span>; <span class="keywordflow">break</span>;
-<a name="l00250"></a>00250         <span class="keywordflow">default</span>: szCreator = NULL; <span class="keywordflow">break</span>;
-<a name="l00251"></a>00251         }
-<a name="l00252"></a>00252 
-<a name="l00253"></a>00253         pOutFile = pDiag-&gt;pOutFile;
-<a name="l00254"></a>00254 
-<a name="l00255"></a>00255         vSetLocation(2);
-<a name="l00256"></a>00256         vFPprintf(pOutFile, <span class="stringliteral">&quot;2 0 obj\n&quot;</span>);
-<a name="l00257"></a>00257         vFPprintf(pOutFile, <span class="stringliteral">&quot;&lt;&lt;\n&quot;</span>);
-<a name="l00258"></a>00258         <span class="keywordflow">if</span> (szTitle != NULL &amp;&amp; szTitle[0] != <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00259"></a>00259                 vFPprintf(pOutFile, <span class="stringliteral">&quot;/Title (%s)\n&quot;</span>, szTitle);
-<a name="l00260"></a>00260         }
-<a name="l00261"></a>00261         <span class="keywordflow">if</span> (szAuthor != NULL &amp;&amp; szAuthor[0] != <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00262"></a>00262                 vFPprintf(pOutFile, <span class="stringliteral">&quot;/Author (%s)\n&quot;</span>, szAuthor);
-<a name="l00263"></a>00263         }
-<a name="l00264"></a>00264         <span class="keywordflow">if</span> (szSubject != NULL &amp;&amp; szSubject[0] != <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00265"></a>00265                 vFPprintf(pOutFile, <span class="stringliteral">&quot;/Subject (%s)\n&quot;</span>, szSubject);
-<a name="l00266"></a>00266         }
-<a name="l00267"></a>00267         <span class="keywordflow">if</span> (szCreator != NULL &amp;&amp; szCreator[0] != <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00268"></a>00268                 vFPprintf(pOutFile, <span class="stringliteral">&quot;/Creator (%s)\n&quot;</span>, szCreator);
-<a name="l00269"></a>00269         }
-<a name="l00270"></a>00270         vFPprintf(pOutFile, <span class="stringliteral">&quot;/Producer (%s %s)\n&quot;</span>, szProducer, VERSIONSTRING);
-<a name="l00271"></a>00271         <span class="keywordflow">if</span> (szCreationDate != NULL &amp;&amp; szCreationDate[0] != <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00272"></a>00272                 vFPprintf(pOutFile, <span class="stringliteral">&quot;/CreationDate (%s)\n&quot;</span>, szCreationDate);
-<a name="l00273"></a>00273         }
-<a name="l00274"></a>00274         <span class="keywordflow">if</span> (szModDate != NULL &amp;&amp; szModDate[0] != <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00275"></a>00275                 vFPprintf(pOutFile, <span class="stringliteral">&quot;/ModDate (%s)\n&quot;</span>, szModDate);
-<a name="l00276"></a>00276         }
-<a name="l00277"></a>00277         vFPprintf(pOutFile, <span class="stringliteral">&quot;&gt;&gt;\n&quot;</span>);
-<a name="l00278"></a>00278         vFPprintf(pOutFile, <span class="stringliteral">&quot;endobj\n&quot;</span>);
-<a name="l00279"></a>00279 } <span class="comment">/* end of vCreateInfoDictionary */</span>
-<a name="l00280"></a>00280 
-<a name="l00281"></a>00281 <span class="comment">/*</span>
-<a name="l00282"></a>00282 <span class="comment"> * vAddHdrFtr - add a header or footer</span>
-<a name="l00283"></a>00283 <span class="comment"> */</span>
-<a name="l00284"></a>00284 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00285"></a>00285 vAddHdrFtr(diagram_type *pDiag, <span class="keyword">const</span> hdrftr_block_type *pHdrFtrInfo)
-<a name="l00286"></a>00286 {
-<a name="l00287"></a>00287         output_type     *pStart, *pPrev, *pNext;
-<a name="l00288"></a>00288 
-<a name="l00289"></a>00289         fail(pDiag == NULL);
-<a name="l00290"></a>00290         fail(pHdrFtrInfo == NULL);
-<a name="l00291"></a>00291 
-<a name="l00292"></a>00292         vStartOfParagraphPDF(pDiag, 0);
-<a name="l00293"></a>00293         pStart = pHdrFtrInfo-&gt;pText;
-<a name="l00294"></a>00294         <span class="keywordflow">while</span> (pStart != NULL) {
-<a name="l00295"></a>00295                 pNext = pStart;
-<a name="l00296"></a>00296                 <span class="keywordflow">while</span> (pNext != NULL &amp;&amp;
-<a name="l00297"></a>00297                        (pNext-&gt;tNextFree != 1 ||
-<a name="l00298"></a>00298                         (pNext-&gt;szStorage[0] != PAR_END &amp;&amp;
-<a name="l00299"></a>00299                          pNext-&gt;szStorage[0] != HARD_RETURN))) {
-<a name="l00300"></a>00300                         pNext = pNext-&gt;pNext;
-<a name="l00301"></a>00301                 }
-<a name="l00302"></a>00302                 <span class="keywordflow">if</span> (pNext == NULL) {
-<a name="l00303"></a>00303                         <span class="keywordflow">if</span> (bOutputContainsText(pStart)) {
-<a name="l00304"></a>00304                                 vAlign2Window(pDiag, pStart,
-<a name="l00305"></a>00305                                         lChar2MilliPoints(DEFAULT_SCREEN_WIDTH),
-<a name="l00306"></a>00306                                         ALIGNMENT_LEFT);
-<a name="l00307"></a>00307                         } <span class="keywordflow">else</span> {
-<a name="l00308"></a>00308                                 vMove2NextLinePDF(pDiag, pStart-&gt;usFontSize);
-<a name="l00309"></a>00309                         }
-<a name="l00310"></a>00310                         <span class="keywordflow">break</span>;
-<a name="l00311"></a>00311                 }
-<a name="l00312"></a>00312                 fail(pNext-&gt;tNextFree != 1);
-<a name="l00313"></a>00313                 fail(pNext-&gt;szStorage[0] != PAR_END &amp;&amp;
-<a name="l00314"></a>00314                         pNext-&gt;szStorage[0] != HARD_RETURN);
-<a name="l00315"></a>00315 
-<a name="l00316"></a>00316                 <span class="keywordflow">if</span> (pStart != pNext) {
-<a name="l00317"></a>00317                         <span class="comment">/* There is something to print */</span>
-<a name="l00318"></a>00318                         pPrev = pNext-&gt;pPrev;
-<a name="l00319"></a>00319                         fail(pPrev-&gt;pNext != pNext);
-<a name="l00320"></a>00320                         <span class="comment">/* Cut the chain */</span>
-<a name="l00321"></a>00321                         pPrev-&gt;pNext = NULL;
-<a name="l00322"></a>00322                         <span class="keywordflow">if</span> (bOutputContainsText(pStart)) {
-<a name="l00323"></a>00323                                 <span class="comment">/* Print it */</span>
-<a name="l00324"></a>00324                                 vAlign2Window(pDiag, pStart,
-<a name="l00325"></a>00325                                         lChar2MilliPoints(DEFAULT_SCREEN_WIDTH),
-<a name="l00326"></a>00326                                         ALIGNMENT_LEFT);
-<a name="l00327"></a>00327                         } <span class="keywordflow">else</span> {
-<a name="l00328"></a>00328                                 <span class="comment">/* Just an empty line */</span>
-<a name="l00329"></a>00329                                 vMove2NextLinePDF(pDiag, pStart-&gt;usFontSize);
-<a name="l00330"></a>00330                         }
-<a name="l00331"></a>00331                         <span class="comment">/* Repair the chain */</span>
-<a name="l00332"></a>00332                         pPrev-&gt;pNext = pNext;
-<a name="l00333"></a>00333                 }
-<a name="l00334"></a>00334                 <span class="keywordflow">if</span> (pNext-&gt;szStorage[0] == PAR_END) {
-<a name="l00335"></a>00335                         vEndOfParagraphPDF(pDiag, pNext-&gt;usFontSize,
-<a name="l00336"></a>00336                                         (<span class="keywordtype">long</span>)pNext-&gt;usFontSize * 200);
-<a name="l00337"></a>00337                 }
-<a name="l00338"></a>00338                 pStart = pNext-&gt;pNext;
-<a name="l00339"></a>00339         }
-<a name="l00340"></a>00340 } <span class="comment">/* end of vAddHdrFtr */</span>
-<a name="l00341"></a>00341 
-<a name="l00342"></a>00342 <span class="comment">/*</span>
-<a name="l00343"></a>00343 <span class="comment"> * vAddHeader - add a page header</span>
-<a name="l00344"></a>00344 <span class="comment"> */</span>
-<a name="l00345"></a>00345 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00346"></a>00346 vAddHeader(diagram_type *pDiag)
-<a name="l00347"></a>00347 {
-<a name="l00348"></a>00348         <span class="keyword">const</span> hdrftr_block_type *pHdrInfo;
-<a name="l00349"></a>00349         <span class="keyword">const</span> hdrftr_block_type *pFtrInfo;
-<a name="l00350"></a>00350 
-<a name="l00351"></a>00351         fail(pDiag == NULL);
-<a name="l00352"></a>00352 
-<a name="l00353"></a>00353         NO_DBG_MSG(<span class="stringliteral">&quot;vAddHeader&quot;</span>);
-<a name="l00354"></a>00354 
-<a name="l00355"></a>00355         pHdrInfo = pGetHdrFtrInfo(iSectionIndex, TRUE,
-<a name="l00356"></a>00356                                         odd(iPageCount), bFirstInSection);
-<a name="l00357"></a>00357         pFtrInfo = pGetHdrFtrInfo(iSectionIndex, FALSE,
-<a name="l00358"></a>00358                                         odd(iPageCount), bFirstInSection);
-<a name="l00359"></a>00359         <span class="comment">/* Set the height of the footer of this page */</span>
-<a name="l00360"></a>00360         lFooterHeight = pFtrInfo == NULL ? 0 : pFtrInfo-&gt;lHeight;
-<a name="l00361"></a>00361         fail(lFooterHeight &lt; 0);
-<a name="l00362"></a>00362 
-<a name="l00363"></a>00363         <span class="keywordflow">if</span> (pHdrInfo == NULL ||
-<a name="l00364"></a>00364             pHdrInfo-&gt;pText == NULL ||
-<a name="l00365"></a>00365             pHdrInfo-&gt;lHeight &lt;= 0) {
-<a name="l00366"></a>00366                 fail(pHdrInfo != NULL &amp;&amp; pHdrInfo-&gt;lHeight &lt; 0);
-<a name="l00367"></a>00367                 fail(pHdrInfo != NULL &amp;&amp;
-<a name="l00368"></a>00368                         pHdrInfo-&gt;pText != NULL &amp;&amp;
-<a name="l00369"></a>00369                         pHdrInfo-&gt;lHeight == 0);
-<a name="l00370"></a>00370                 <span class="keywordflow">return</span>;
-<a name="l00371"></a>00371         }
-<a name="l00372"></a>00372 
-<a name="l00373"></a>00373         vAddHdrFtr(pDiag, pHdrInfo);
-<a name="l00374"></a>00374 
-<a name="l00375"></a>00375         DBG_DEC_C(pHdrInfo-&gt;lHeight !=
-<a name="l00376"></a>00376                 lPageHeight - PS_TOP_MARGIN - pDiag-&gt;lYtop,
-<a name="l00377"></a>00377                 pHdrInfo-&gt;lHeight);
-<a name="l00378"></a>00378         DBG_DEC_C(pHdrInfo-&gt;lHeight !=
-<a name="l00379"></a>00379                 lPageHeight - PS_TOP_MARGIN - pDiag-&gt;lYtop,
-<a name="l00380"></a>00380                 lPageHeight - PS_TOP_MARGIN - pDiag-&gt;lYtop);
-<a name="l00381"></a>00381 } <span class="comment">/* end of vAddHeader */</span>
-<a name="l00382"></a>00382 
-<a name="l00383"></a>00383 <span class="comment">/*</span>
-<a name="l00384"></a>00384 <span class="comment"> * vAddFooter - add a page footer</span>
-<a name="l00385"></a>00385 <span class="comment"> */</span>
-<a name="l00386"></a>00386 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00387"></a>00387 vAddFooter(diagram_type *pDiag)
-<a name="l00388"></a>00388 {
-<a name="l00389"></a>00389         <span class="keyword">const</span> hdrftr_block_type *pFtrInfo;
-<a name="l00390"></a>00390 
-<a name="l00391"></a>00391         fail(pDiag == NULL);
-<a name="l00392"></a>00392 
-<a name="l00393"></a>00393         NO_DBG_MSG(<span class="stringliteral">&quot;vAddFooter&quot;</span>);
-<a name="l00394"></a>00394 
-<a name="l00395"></a>00395         pFtrInfo = pGetHdrFtrInfo(iSectionIndex, FALSE,
-<a name="l00396"></a>00396                                         odd(iPageCount), bFirstInSection);
-<a name="l00397"></a>00397         bFirstInSection = FALSE;
-<a name="l00398"></a>00398         <span class="keywordflow">if</span> (pFtrInfo == NULL ||
-<a name="l00399"></a>00399             pFtrInfo-&gt;pText == NULL ||
-<a name="l00400"></a>00400             pFtrInfo-&gt;lHeight &lt;= 0) {
-<a name="l00401"></a>00401                 fail(pFtrInfo != NULL &amp;&amp; pFtrInfo-&gt;lHeight &lt; 0);
-<a name="l00402"></a>00402                 fail(pFtrInfo != NULL &amp;&amp;
-<a name="l00403"></a>00403                         pFtrInfo-&gt;pText != NULL &amp;&amp;
-<a name="l00404"></a>00404                         pFtrInfo-&gt;lHeight == 0);
-<a name="l00405"></a>00405                 <span class="keywordflow">return</span>;
-<a name="l00406"></a>00406         }
-<a name="l00407"></a>00407 
-<a name="l00408"></a>00408         bInFtrSpace = TRUE;
-<a name="l00409"></a>00409 
-<a name="l00410"></a>00410         DBG_DEC_C(pFtrInfo-&gt;lHeight != lFooterHeight, pFtrInfo-&gt;lHeight);
-<a name="l00411"></a>00411         DBG_DEC_C(pFtrInfo-&gt;lHeight != lFooterHeight, lFooterHeight);
-<a name="l00412"></a>00412         DBG_DEC_C(pDiag-&gt;lYtop &lt; lFooterHeight + PS_BOTTOM_MARGIN,
-<a name="l00413"></a>00413                         pDiag-&gt;lYtop);
-<a name="l00414"></a>00414         DBG_DEC_C(pDiag-&gt;lYtop &lt; lFooterHeight + PS_BOTTOM_MARGIN,
-<a name="l00415"></a>00415                         lFooterHeight + PS_BOTTOM_MARGIN);
-<a name="l00416"></a>00416 
-<a name="l00417"></a>00417         <span class="keywordflow">if</span> (pDiag-&gt;lYtop &gt; lFooterHeight + PS_BOTTOM_MARGIN) {
-<a name="l00418"></a>00418                 <span class="comment">/* Move down to the start of the footer */</span>
-<a name="l00419"></a>00419                 pDiag-&gt;lYtop = lFooterHeight + PS_BOTTOM_MARGIN;
-<a name="l00420"></a>00420                 vMoveTo(pDiag, 0);
-<a name="l00421"></a>00421         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pDiag-&gt;lYtop &lt; lFooterHeight + PS_BOTTOM_MARGIN / 2) {
-<a name="l00422"></a>00422                 DBG_FIXME();
-<a name="l00423"></a>00423                 <span class="comment">/*</span>
-<a name="l00424"></a>00424 <span class="comment">                 * Move up to the start of the footer, to prevent moving</span>
-<a name="l00425"></a>00425 <span class="comment">                 * of the bottom edge of the paper</span>
-<a name="l00426"></a>00426 <span class="comment">                 */</span>
-<a name="l00427"></a>00427                 pDiag-&gt;lYtop = lFooterHeight + PS_BOTTOM_MARGIN;
-<a name="l00428"></a>00428                 vMoveTo(pDiag, 0);
-<a name="l00429"></a>00429         }
-<a name="l00430"></a>00430 
-<a name="l00431"></a>00431         DBG_FLT_C(pDiag-&gt;lYtop &lt; lFooterHeight + PS_BOTTOM_MARGIN,
-<a name="l00432"></a>00432         dDrawUnits2Points(lFooterHeight + PS_BOTTOM_MARGIN - pDiag-&gt;lYtop));
-<a name="l00433"></a>00433 
-<a name="l00434"></a>00434         vAddHdrFtr(pDiag, pFtrInfo);
-<a name="l00435"></a>00435         bInFtrSpace = FALSE;
-<a name="l00436"></a>00436 } <span class="comment">/* end of vAddFooter */</span>
-<a name="l00437"></a>00437 
-<a name="l00438"></a>00438 <span class="comment">/*</span>
-<a name="l00439"></a>00439 <span class="comment"> * vEndPageObject - end the current page object</span>
-<a name="l00440"></a>00440 <span class="comment"> */</span>
-<a name="l00441"></a>00441 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00442"></a>00442 vEndPageObject(FILE *pOutFile)
-<a name="l00443"></a>00443 {
-<a name="l00444"></a>00444         <span class="keywordtype">long</span>    lStreamEnd;
-<a name="l00445"></a>00445 
-<a name="l00446"></a>00446         <span class="keywordflow">if</span> (lStreamStart &lt; 0) {
-<a name="l00447"></a>00447                 <span class="comment">/* There is no current page object */</span>
-<a name="l00448"></a>00448                 <span class="keywordflow">return</span>;
-<a name="l00449"></a>00449         }
-<a name="l00450"></a>00450 
-<a name="l00451"></a>00451         vFPprintf(pOutFile, <span class="stringliteral">&quot;ET\n&quot;</span>);
-<a name="l00452"></a>00452         lStreamEnd = lFilePosition;
-<a name="l00453"></a>00453         vFPprintf(pOutFile, <span class="stringliteral">&quot;endstream\n&quot;</span>);
-<a name="l00454"></a>00454         vFPprintf(pOutFile, <span class="stringliteral">&quot;endobj\n&quot;</span>);
-<a name="l00455"></a>00455 
-<a name="l00456"></a>00456         iObjectNumberCurr++;
-<a name="l00457"></a>00457         vSetLocation(iObjectNumberCurr);
-<a name="l00458"></a>00458         vFPprintf(pOutFile, <span class="stringliteral">&quot;%d 0 obj\n&quot;</span>, iObjectNumberCurr);
-<a name="l00459"></a>00459         vFPprintf(pOutFile, <span class="stringliteral">&quot;%lu\n&quot;</span>, lStreamEnd - lStreamStart);
-<a name="l00460"></a>00460         vFPprintf(pOutFile, <span class="stringliteral">&quot;endobj\n&quot;</span>);
-<a name="l00461"></a>00461 } <span class="comment">/* end of vEndPageObject */</span>
-<a name="l00462"></a>00462 
-<a name="l00463"></a>00463 <span class="comment">/*</span>
-<a name="l00464"></a>00464 <span class="comment"> * vMove2NextPage - move to the start of the next page</span>
-<a name="l00465"></a>00465 <span class="comment"> */</span>
-<a name="l00466"></a>00466 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00467"></a>00467 vMove2NextPage(diagram_type *pDiag, BOOL bNewSection)
-<a name="l00468"></a>00468 {
-<a name="l00469"></a>00469         FILE    *pOutFile;
-<a name="l00470"></a>00470 
-<a name="l00471"></a>00471         fail(pDiag == NULL);
-<a name="l00472"></a>00472         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00473"></a>00473 
-<a name="l00474"></a>00474         pOutFile = pDiag-&gt;pOutFile;
-<a name="l00475"></a>00475 
-<a name="l00476"></a>00476         vAddFooter(pDiag);
-<a name="l00477"></a>00477         <span class="comment">/* End the old page object */</span>
-<a name="l00478"></a>00478         vEndPageObject(pOutFile);
-<a name="l00479"></a>00479         <span class="keywordflow">if</span> (bNewSection) {
-<a name="l00480"></a>00480                 iSectionIndex++;
-<a name="l00481"></a>00481                 bFirstInSection = TRUE;
-<a name="l00482"></a>00482         }
-<a name="l00483"></a>00483 
-<a name="l00484"></a>00484         <span class="comment">/* Start the new page object */</span>
-<a name="l00485"></a>00485         iObjectNumberCurr++;
-<a name="l00486"></a>00486         vSetLocation(iObjectNumberCurr);
-<a name="l00487"></a>00487         vFillNextPageObject();
-<a name="l00488"></a>00488         vFPprintf(pOutFile, <span class="stringliteral">&quot;%d 0 obj\n&quot;</span>, iObjectNumberCurr);
-<a name="l00489"></a>00489         vFPprintf(pOutFile, <span class="stringliteral">&quot;&lt;&lt;\n&quot;</span>);
-<a name="l00490"></a>00490         vFPprintf(pOutFile, <span class="stringliteral">&quot;/Type /Page\n&quot;</span>);
-<a name="l00491"></a>00491         vFPprintf(pOutFile, <span class="stringliteral">&quot;/Parent 3 0 R\n&quot;</span>);
-<a name="l00492"></a>00492         vFPprintf(pOutFile, <span class="stringliteral">&quot;/Resources 17 0 R\n&quot;</span>);
-<a name="l00493"></a>00493         vFPprintf(pOutFile, <span class="stringliteral">&quot;/Contents %d 0 R\n&quot;</span>, iObjectNumberCurr + 1);
-<a name="l00494"></a>00494         vFPprintf(pOutFile, <span class="stringliteral">&quot;&gt;&gt;\n&quot;</span>);
-<a name="l00495"></a>00495         vFPprintf(pOutFile, <span class="stringliteral">&quot;endobj\n&quot;</span>);
-<a name="l00496"></a>00496 
-<a name="l00497"></a>00497         <span class="comment">/* Start the new text object */</span>
-<a name="l00498"></a>00498         iObjectNumberCurr++;
-<a name="l00499"></a>00499         vSetLocation(iObjectNumberCurr);
-<a name="l00500"></a>00500         vFPprintf(pOutFile, <span class="stringliteral">&quot;%d 0 obj\n&quot;</span>, iObjectNumberCurr);
-<a name="l00501"></a>00501         vFPprintf(pOutFile, <span class="stringliteral">&quot;&lt;&lt;\n&quot;</span>);
-<a name="l00502"></a>00502         vFPprintf(pOutFile, <span class="stringliteral">&quot;/Length %d 0 R\n&quot;</span>, iObjectNumberCurr + 1);
-<a name="l00503"></a>00503         vFPprintf(pOutFile, <span class="stringliteral">&quot;&gt;&gt;\n&quot;</span>);
-<a name="l00504"></a>00504         vFPprintf(pOutFile, <span class="stringliteral">&quot;stream\n&quot;</span>);
-<a name="l00505"></a>00505         lStreamStart = lFilePosition;
-<a name="l00506"></a>00506         vFPprintf(pOutFile, <span class="stringliteral">&quot;BT\n&quot;</span>);
-<a name="l00507"></a>00507 
-<a name="l00508"></a>00508         <span class="comment">/* Set variables to their start of page values */</span>
-<a name="l00509"></a>00509         pDiag-&gt;lYtop = lPageHeight - PS_TOP_MARGIN;
-<a name="l00510"></a>00510         tFontRefCurr = (drawfile_fontref)-1;
-<a name="l00511"></a>00511         usFontSizeCurr = 0;
-<a name="l00512"></a>00512         iFontColorCurr = -1;
-<a name="l00513"></a>00513         lYtopCurr = -1;
-<a name="l00514"></a>00514         vAddHeader(pDiag);
-<a name="l00515"></a>00515 } <span class="comment">/* end of vMove2NextPage */</span>
-<a name="l00516"></a>00516 
-<a name="l00517"></a>00517 <span class="comment">/*</span>
-<a name="l00518"></a>00518 <span class="comment"> * vMoveTo - move to the specified X,Y coordinates</span>
-<a name="l00519"></a>00519 <span class="comment"> *</span>
-<a name="l00520"></a>00520 <span class="comment"> * Move the current position of the specified diagram to its X,Y coordinates,</span>
-<a name="l00521"></a>00521 <span class="comment"> * start on a new page if needed</span>
-<a name="l00522"></a>00522 <span class="comment"> */</span>
-<a name="l00523"></a>00523 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00524"></a>00524 vMoveTo(diagram_type *pDiag, <span class="keywordtype">long</span> lLastVerticalMovement)
-<a name="l00525"></a>00525 {
-<a name="l00526"></a>00526         fail(pDiag == NULL);
-<a name="l00527"></a>00527         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00528"></a>00528 
-<a name="l00529"></a>00529         <span class="keywordflow">if</span> (pDiag-&gt;lYtop &lt;= lFooterHeight + PS_BOTTOM_MARGIN &amp;&amp; !bInFtrSpace) {
-<a name="l00530"></a>00530                 vMove2NextPage(pDiag, FALSE);
-<a name="l00531"></a>00531                 <span class="comment">/* Repeat the last vertical movement on the new page */</span>
-<a name="l00532"></a>00532                 pDiag-&gt;lYtop -= lLastVerticalMovement;
-<a name="l00533"></a>00533         }
-<a name="l00534"></a>00534 
-<a name="l00535"></a>00535         fail(pDiag-&gt;lYtop &lt; lFooterHeight + PS_BOTTOM_MARGIN &amp;&amp; !bInFtrSpace);
-<a name="l00536"></a>00536         DBG_DEC_C(pDiag-&gt;lYtop &lt; PS_BOTTOM_MARGIN, pDiag-&gt;lYtop);
-<a name="l00537"></a>00537         fail(pDiag-&gt;lYtop &lt; PS_BOTTOM_MARGIN / 3);
-<a name="l00538"></a>00538 
-<a name="l00539"></a>00539         <span class="keywordflow">if</span> (pDiag-&gt;lYtop != lYtopCurr) {
-<a name="l00540"></a>00540                 vFPprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;1 0 0 1 %.2f %.2f Tm\n&quot;</span>,
-<a name="l00541"></a>00541                         dDrawUnits2Points(pDiag-&gt;lXleft + PS_LEFT_MARGIN),
-<a name="l00542"></a>00542                         dDrawUnits2Points(pDiag-&gt;lYtop));
-<a name="l00543"></a>00543                 lYtopCurr = pDiag-&gt;lYtop;
-<a name="l00544"></a>00544         }
-<a name="l00545"></a>00545 } <span class="comment">/* end of vMoveTo */</span>
-<a name="l00546"></a>00546 
-<a name="l00547"></a>00547 <span class="comment">/*</span>
-<a name="l00548"></a>00548 <span class="comment"> * vProloguePDF - set options and perform the PDF initialization</span>
-<a name="l00549"></a>00549 <span class="comment"> */</span>
-<a name="l00550"></a>00550 <span class="keywordtype">void</span>
-<a name="l00551"></a>00551 vProloguePDF(diagram_type *pDiag,
-<a name="l00552"></a>00552         <span class="keyword">const</span> <span class="keywordtype">char</span> *szTask, <span class="keyword">const</span> options_type *pOptions)
-<a name="l00553"></a>00553 {
-<a name="l00554"></a>00554         FILE    *pOutFile;
-<a name="l00555"></a>00555 
-<a name="l00556"></a>00556         fail(pDiag == NULL);
-<a name="l00557"></a>00557         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00558"></a>00558         fail(pOptions == NULL);
-<a name="l00559"></a>00559 
-<a name="l00560"></a>00560         pOutFile = pDiag-&gt;pOutFile;
-<a name="l00561"></a>00561 
-<a name="l00562"></a>00562         eEncoding = pOptions-&gt;eEncoding;
-<a name="l00563"></a>00563 
-<a name="l00564"></a>00564         <span class="comment">/* Create an empty location array */</span>
-<a name="l00565"></a>00565         tLocations = INITIAL_LOCATION_SIZE;
-<a name="l00566"></a>00566         alLocation = xcalloc(tLocations, <span class="keyword">sizeof</span>(<span class="keywordtype">long</span>));
-<a name="l00567"></a>00567 
-<a name="l00568"></a>00568         <span class="comment">/* Create an empty pageobject array */</span>
-<a name="l00569"></a>00569         tMaxPageObjects = INITIAL_PAGEOBJECT_SIZE;
-<a name="l00570"></a>00570         aiPageObject = xcalloc(tMaxPageObjects, <span class="keyword">sizeof</span>(<span class="keywordtype">int</span>));
-<a name="l00571"></a>00571 
-<a name="l00572"></a>00572         <span class="keywordflow">if</span> (pOptions-&gt;iPageHeight == INT_MAX) {
-<a name="l00573"></a>00573                 lPageHeight = LONG_MAX;
-<a name="l00574"></a>00574         } <span class="keywordflow">else</span> {
-<a name="l00575"></a>00575                 lPageHeight = lPoints2DrawUnits(pOptions-&gt;iPageHeight);
-<a name="l00576"></a>00576         }
-<a name="l00577"></a>00577         DBG_DEC(lPageHeight);
-<a name="l00578"></a>00578         <span class="keywordflow">if</span> (pOptions-&gt;iPageWidth == INT_MAX) {
-<a name="l00579"></a>00579                 lPageWidth = LONG_MAX;
-<a name="l00580"></a>00580         } <span class="keywordflow">else</span> {
-<a name="l00581"></a>00581                 lPageWidth = lPoints2DrawUnits(pOptions-&gt;iPageWidth);
-<a name="l00582"></a>00582         }
-<a name="l00583"></a>00583         DBG_DEC(lPageWidth);
-<a name="l00584"></a>00584         lFooterHeight = 0;
-<a name="l00585"></a>00585         bInFtrSpace = FALSE;
-<a name="l00586"></a>00586 
-<a name="l00587"></a>00587         tFontRefCurr = (drawfile_fontref)-1;
-<a name="l00588"></a>00588         usFontSizeCurr = 0;
-<a name="l00589"></a>00589         iFontColorCurr = -1;
-<a name="l00590"></a>00590         lYtopCurr = -1;
-<a name="l00591"></a>00591         iPageCount = 0;
-<a name="l00592"></a>00592         iImageCount = 0;
-<a name="l00593"></a>00593         iSectionIndex = 0;
-<a name="l00594"></a>00594         bFirstInSection = TRUE;
-<a name="l00595"></a>00595         lFilePosition = 0;
-<a name="l00596"></a>00596         iMaxLocationNumber = 0;
-<a name="l00597"></a>00597         lStreamStart = -1;
-<a name="l00598"></a>00598         iObjectNumberCurr = 17;
-<a name="l00599"></a>00599         pDiag-&gt;lXleft = 0;
-<a name="l00600"></a>00600         pDiag-&gt;lYtop = 0;
-<a name="l00601"></a>00601 
-<a name="l00602"></a>00602         szProducer = szTask;
-<a name="l00603"></a>00603 
-<a name="l00604"></a>00604         vFPprintf(pOutFile, <span class="stringliteral">&quot;%%PDF-1.3\n&quot;</span>);
-<a name="l00605"></a>00605         vFPprintf(pOutFile, <span class="stringliteral">&quot;%%%c%c%c%c\n&quot;</span>, 0xe2, 0xe3, 0xcf, 0xd3);
-<a name="l00606"></a>00606 
-<a name="l00607"></a>00607         <span class="comment">/* Root catalog */</span>
-<a name="l00608"></a>00608         vSetLocation(1);
-<a name="l00609"></a>00609         vFPprintf(pOutFile, <span class="stringliteral">&quot;1 0 obj\n&quot;</span>);
-<a name="l00610"></a>00610         vFPprintf(pOutFile, <span class="stringliteral">&quot;&lt;&lt;\n&quot;</span>);
-<a name="l00611"></a>00611         vFPprintf(pOutFile, <span class="stringliteral">&quot;/Type /Catalog\n&quot;</span>);
-<a name="l00612"></a>00612         vFPprintf(pOutFile, <span class="stringliteral">&quot;/Pages 3 0 R\n&quot;</span>);
-<a name="l00613"></a>00613         vFPprintf(pOutFile, <span class="stringliteral">&quot;&gt;&gt;\n&quot;</span>);
-<a name="l00614"></a>00614         vFPprintf(pOutFile, <span class="stringliteral">&quot;endobj\n&quot;</span>);
-<a name="l00615"></a>00615 } <span class="comment">/* end of vProloguePDF */</span>
-<a name="l00616"></a>00616 
-<a name="l00617"></a>00617 <span class="comment">/*</span>
-<a name="l00618"></a>00618 <span class="comment"> * vEpiloguePDF - clean up after everything is done</span>
-<a name="l00619"></a>00619 <span class="comment"> */</span>
-<a name="l00620"></a>00620 <span class="keywordtype">void</span>
-<a name="l00621"></a>00621 vEpiloguePDF(diagram_type *pDiag)
-<a name="l00622"></a>00622 {
-<a name="l00623"></a>00623         FILE    *pOutFile;
-<a name="l00624"></a>00624         <span class="keywordtype">long</span>    lXref;
-<a name="l00625"></a>00625         <span class="keywordtype">int</span>     iIndex;
-<a name="l00626"></a>00626 
-<a name="l00627"></a>00627         fail(pDiag == NULL);
-<a name="l00628"></a>00628         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00629"></a>00629 
-<a name="l00630"></a>00630         pOutFile = pDiag-&gt;pOutFile;
-<a name="l00631"></a>00631 
-<a name="l00632"></a>00632         vAddFooter(pDiag);
-<a name="l00633"></a>00633         <span class="comment">/* End the old page object */</span>
-<a name="l00634"></a>00634         vEndPageObject(pOutFile);
-<a name="l00635"></a>00635 
-<a name="l00636"></a>00636         vSetLocation(3);
-<a name="l00637"></a>00637         vFPprintf(pOutFile, <span class="stringliteral">&quot;3 0 obj\n&quot;</span>);
-<a name="l00638"></a>00638         vFPprintf(pOutFile, <span class="stringliteral">&quot;&lt;&lt;\n&quot;</span>);
-<a name="l00639"></a>00639         vFPprintf(pOutFile, <span class="stringliteral">&quot;/Type /Pages\n&quot;</span>);
-<a name="l00640"></a>00640         vFPprintf(pOutFile, <span class="stringliteral">&quot;/Count %d\n&quot;</span>, iPageCount);
-<a name="l00641"></a>00641         vFPprintf(pOutFile, <span class="stringliteral">&quot;/MediaBox [ 0 0 %.0f %.0f ]\n&quot;</span>,
-<a name="l00642"></a>00642                         dDrawUnits2Points(lPageWidth),
-<a name="l00643"></a>00643                         dDrawUnits2Points(lPageHeight));
-<a name="l00644"></a>00644         vFPprintf(pOutFile, <span class="stringliteral">&quot;/Kids [ &quot;</span>);
-<a name="l00645"></a>00645         <span class="keywordflow">for</span> (iIndex = 1; iIndex &lt;= iPageCount; iIndex++) {
-<a name="l00646"></a>00646                 vFPprintf(pOutFile, <span class="stringliteral">&quot;\t%d 0 R\n&quot;</span>, aiPageObject[iIndex]);
-<a name="l00647"></a>00647         }
-<a name="l00648"></a>00648         vFPprintf(pOutFile, <span class="stringliteral">&quot;]\n&quot;</span>);
-<a name="l00649"></a>00649         vFPprintf(pOutFile, <span class="stringliteral">&quot;&gt;&gt;\n&quot;</span>);
-<a name="l00650"></a>00650         vFPprintf(pOutFile, <span class="stringliteral">&quot;endobj\n&quot;</span>);
-<a name="l00651"></a>00651 
-<a name="l00652"></a>00652         lXref = lFilePosition;
-<a name="l00653"></a>00653 
-<a name="l00654"></a>00654         vFPprintf(pOutFile, <span class="stringliteral">&quot;xref\n&quot;</span>);
-<a name="l00655"></a>00655         vFPprintf(pOutFile, <span class="stringliteral">&quot;0 %d\n&quot;</span>, iMaxLocationNumber + 1);
-<a name="l00656"></a>00656         vFPprintf(pOutFile, <span class="stringliteral">&quot;0000000000 65535 f \n&quot;</span>);
-<a name="l00657"></a>00657         <span class="keywordflow">for</span> (iIndex = 1; iIndex &lt;= iMaxLocationNumber; iIndex++) {
-<a name="l00658"></a>00658                 vFPprintf(pOutFile, <span class="stringliteral">&quot;%.10ld 00000 n \n&quot;</span>, alLocation[iIndex]);
-<a name="l00659"></a>00659         }
-<a name="l00660"></a>00660 
-<a name="l00661"></a>00661         vFPprintf(pOutFile, <span class="stringliteral">&quot;trailer\n&quot;</span>);
-<a name="l00662"></a>00662         vFPprintf(pOutFile, <span class="stringliteral">&quot;&lt;&lt;\n&quot;</span>);
-<a name="l00663"></a>00663         vFPprintf(pOutFile, <span class="stringliteral">&quot;/Size %d\n&quot;</span>, iMaxLocationNumber + 1);
-<a name="l00664"></a>00664         vFPprintf(pOutFile, <span class="stringliteral">&quot;/Root 1 0 R\n&quot;</span>);
-<a name="l00665"></a>00665         vFPprintf(pOutFile, <span class="stringliteral">&quot;/Info 2 0 R\n&quot;</span>);
-<a name="l00666"></a>00666         vFPprintf(pOutFile, <span class="stringliteral">&quot;&gt;&gt;\n&quot;</span>);
-<a name="l00667"></a>00667 
-<a name="l00668"></a>00668         vFPprintf(pOutFile, <span class="stringliteral">&quot;startxref\n&quot;</span>);
-<a name="l00669"></a>00669         vFPprintf(pOutFile, <span class="stringliteral">&quot;%ld\n&quot;</span>, lXref);
-<a name="l00670"></a>00670         vFPprintf(pOutFile, <span class="stringliteral">&quot;%%%%EOF\n&quot;</span>);
-<a name="l00671"></a>00671 
-<a name="l00672"></a>00672         szProducer = NULL;
-<a name="l00673"></a>00673         aiPageObject = xfree(aiPageObject);
-<a name="l00674"></a>00674         alLocation = xfree(alLocation);
-<a name="l00675"></a>00675 } <span class="comment">/* end of vEpiloguePDF */</span>
-<a name="l00676"></a>00676 
-<a name="l00677"></a>00677 <span class="comment">/*</span>
-<a name="l00678"></a>00678 <span class="comment"> * vPrintPalette - print a pdf color space (palette)</span>
-<a name="l00679"></a>00679 <span class="comment"> */</span>
-<a name="l00680"></a>00680 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00681"></a>00681 vPrintPalette(FILE *pOutFile, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00682"></a>00682 {
-<a name="l00683"></a>00683         <span class="keywordtype">int</span>     iIndex;
-<a name="l00684"></a>00684 
-<a name="l00685"></a>00685         fail(pOutFile == NULL);
-<a name="l00686"></a>00686         fail(pImg == NULL);
-<a name="l00687"></a>00687         fail(pImg-&gt;iColorsUsed &lt; 2);
-<a name="l00688"></a>00688         fail(pImg-&gt;iColorsUsed &gt; 256);
-<a name="l00689"></a>00689 
-<a name="l00690"></a>00690         vFPprintf(pOutFile, <span class="stringliteral">&quot;\t/ColorSpace [ /Indexed\n&quot;</span>);
-<a name="l00691"></a>00691         vFPprintf(pOutFile, <span class="stringliteral">&quot;\t/Device%s %d\n&quot;</span>,
-<a name="l00692"></a>00692                 pImg-&gt;bColorImage ? <span class="stringliteral">&quot;RGB&quot;</span> : <span class="stringliteral">&quot;Gray&quot;</span>, pImg-&gt;iColorsUsed - 1);
-<a name="l00693"></a>00693         vFPprintf(pOutFile, <span class="stringliteral">&quot;&lt;&quot;</span>);
-<a name="l00694"></a>00694         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; pImg-&gt;iColorsUsed; iIndex++) {
-<a name="l00695"></a>00695                 vFPprintf(pOutFile, <span class="stringliteral">&quot;%02x&quot;</span>,
-<a name="l00696"></a>00696                                 (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)pImg-&gt;aucPalette[iIndex][0]);
-<a name="l00697"></a>00697                 <span class="keywordflow">if</span> (pImg-&gt;bColorImage) {
-<a name="l00698"></a>00698                         vFPprintf(pOutFile, <span class="stringliteral">&quot;%02x%02x&quot;</span>,
-<a name="l00699"></a>00699                                 (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)pImg-&gt;aucPalette[iIndex][1],
-<a name="l00700"></a>00700                                 (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)pImg-&gt;aucPalette[iIndex][2]);
-<a name="l00701"></a>00701                 }
-<a name="l00702"></a>00702                 <span class="keywordflow">if</span> (iIndex % 8 == 7) {
-<a name="l00703"></a>00703                         vFPprintf(pOutFile, <span class="stringliteral">&quot;\n&quot;</span>);
-<a name="l00704"></a>00704                 } <span class="keywordflow">else</span> {
-<a name="l00705"></a>00705                         vFPprintf(pOutFile, <span class="stringliteral">&quot; &quot;</span>);
-<a name="l00706"></a>00706                 }
-<a name="l00707"></a>00707         }
-<a name="l00708"></a>00708         vFPprintf(pOutFile, <span class="stringliteral">&quot;&gt; ]\n&quot;</span>);
-<a name="l00709"></a>00709 } <span class="comment">/* end of vPrintPalette */</span>
-<a name="l00710"></a>00710 
-<a name="l00711"></a>00711 <span class="comment">/*</span>
-<a name="l00712"></a>00712 <span class="comment"> * vImageProloguePDF - perform the image initialization</span>
-<a name="l00713"></a>00713 <span class="comment"> */</span>
-<a name="l00714"></a>00714 <span class="keywordtype">void</span>
-<a name="l00715"></a>00715 vImageProloguePDF(diagram_type *pDiag, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00716"></a>00716 {
-<a name="l00717"></a>00717         FILE    *pOutFile;
-<a name="l00718"></a>00718 
-<a name="l00719"></a>00719         fail(pDiag == NULL);
-<a name="l00720"></a>00720         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00721"></a>00721         fail(pImg == NULL);
-<a name="l00722"></a>00722 
-<a name="l00723"></a>00723         <span class="keywordflow">if</span> (pImg-&gt;iVerSizeScaled &lt;= 0 || pImg-&gt;iHorSizeScaled &lt;= 0) {
-<a name="l00724"></a>00724                 <span class="keywordflow">return</span>;
-<a name="l00725"></a>00725         }
-<a name="l00726"></a>00726 
-<a name="l00727"></a>00727         iImageCount++;
-<a name="l00728"></a>00728 
-<a name="l00729"></a>00729         DBG_DEC_C(pDiag-&gt;lXleft != 0, pDiag-&gt;lXleft);
-<a name="l00730"></a>00730 
-<a name="l00731"></a>00731         pDiag-&gt;lYtop -= lPoints2DrawUnits(pImg-&gt;iVerSizeScaled);
-<a name="l00732"></a>00732         vMoveTo(pDiag, lPoints2DrawUnits(pImg-&gt;iVerSizeScaled));
-<a name="l00733"></a>00733 
-<a name="l00734"></a>00734         pOutFile = pDiag-&gt;pOutFile;
-<a name="l00735"></a>00735 
-<a name="l00736"></a>00736         vFPprintf(pOutFile, <span class="stringliteral">&quot;ET\n&quot;</span>);
-<a name="l00737"></a>00737         vFPprintf(pOutFile, <span class="stringliteral">&quot;q %% Image %03d\n&quot;</span>, iImageCount);
-<a name="l00738"></a>00738         <span class="keywordflow">if</span> (pImg-&gt;eImageType == imagetype_is_dib) {
-<a name="l00739"></a>00739                 <span class="comment">/* Scanning from left to right and bottom to top */</span>
-<a name="l00740"></a>00740                 vFPprintf(pOutFile, <span class="stringliteral">&quot;%d 0 0 %d %.2f %.2f cm\n&quot;</span>,
-<a name="l00741"></a>00741                         pImg-&gt;iHorSizeScaled, -pImg-&gt;iVerSizeScaled,
-<a name="l00742"></a>00742                         dDrawUnits2Points(pDiag-&gt;lXleft + PS_LEFT_MARGIN),
-<a name="l00743"></a>00743                         dDrawUnits2Points(pDiag-&gt;lYtop) + pImg-&gt;iVerSizeScaled);
-<a name="l00744"></a>00744         } <span class="keywordflow">else</span> {
-<a name="l00745"></a>00745                 <span class="comment">/* Scanning from left to right and top to bottom */</span>
-<a name="l00746"></a>00746                 vFPprintf(pOutFile, <span class="stringliteral">&quot;%d 0 0 %d %.2f %.2f cm\n&quot;</span>,
-<a name="l00747"></a>00747                         pImg-&gt;iHorSizeScaled, pImg-&gt;iVerSizeScaled,
-<a name="l00748"></a>00748                         dDrawUnits2Points(pDiag-&gt;lXleft + PS_LEFT_MARGIN),
-<a name="l00749"></a>00749                         dDrawUnits2Points(pDiag-&gt;lYtop));
-<a name="l00750"></a>00750         }
-<a name="l00751"></a>00751         vFPprintf(pOutFile, <span class="stringliteral">&quot;BI\n&quot;</span>);
-<a name="l00752"></a>00752         vFPprintf(pOutFile, <span class="stringliteral">&quot;\t/Width %d\n&quot;</span>, pImg-&gt;iWidth);
-<a name="l00753"></a>00753         vFPprintf(pOutFile, <span class="stringliteral">&quot;\t/Height %d\n&quot;</span>, pImg-&gt;iHeight);
-<a name="l00754"></a>00754         <span class="keywordflow">switch</span> (pImg-&gt;eImageType) {
-<a name="l00755"></a>00755         <span class="keywordflow">case</span> imagetype_is_jpeg:
-<a name="l00756"></a>00756                 <span class="keywordflow">switch</span> (pImg-&gt;iComponents) {
-<a name="l00757"></a>00757                 <span class="keywordflow">case</span> 1:
-<a name="l00758"></a>00758                         vFPprintf(pOutFile, <span class="stringliteral">&quot;\t/ColorSpace /DeviceGray\n&quot;</span>);
-<a name="l00759"></a>00759                         <span class="keywordflow">break</span>;
-<a name="l00760"></a>00760                 <span class="keywordflow">case</span> 3:
-<a name="l00761"></a>00761                         vFPprintf(pOutFile, <span class="stringliteral">&quot;\t/ColorSpace /DeviceRGB\n&quot;</span>);
-<a name="l00762"></a>00762                         <span class="keywordflow">break</span>;
-<a name="l00763"></a>00763                 <span class="keywordflow">case</span> 4:
-<a name="l00764"></a>00764                         vFPprintf(pOutFile, <span class="stringliteral">&quot;\t/ColorSpace /DeviceCMYK\n&quot;</span>);
-<a name="l00765"></a>00765                         <span class="keywordflow">if</span> (pImg-&gt;bAdobe) {
-<a name="l00766"></a>00766                                 <span class="comment">/*</span>
-<a name="l00767"></a>00767 <span class="comment">                                 * Adobe-conforming CMYK file</span>
-<a name="l00768"></a>00768 <span class="comment">                                 * applying workaround for color inversion</span>
-<a name="l00769"></a>00769 <span class="comment">                                 */</span>
-<a name="l00770"></a>00770                                 vFPprintf(pOutFile,
-<a name="l00771"></a>00771                                         <span class="stringliteral">&quot;\t/Decode [1 0 1 0 1 0 1 0]\n&quot;</span>);
-<a name="l00772"></a>00772                         }
-<a name="l00773"></a>00773                         <span class="keywordflow">break</span>;
-<a name="l00774"></a>00774                 <span class="keywordflow">default</span>:
-<a name="l00775"></a>00775                         DBG_DEC(pImg-&gt;iComponents);
-<a name="l00776"></a>00776                         <span class="keywordflow">break</span>;
-<a name="l00777"></a>00777                 }
-<a name="l00778"></a>00778                 vFPprintf(pOutFile, <span class="stringliteral">&quot;\t/BitsPerComponent 8\n&quot;</span>);
-<a name="l00779"></a>00779                 vFPprintf(pOutFile,
-<a name="l00780"></a>00780                         <span class="stringliteral">&quot;\t/Filter [ /ASCII85Decode /DCTDecode ]\n&quot;</span>);
-<a name="l00781"></a>00781                 <span class="keywordflow">break</span>;
-<a name="l00782"></a>00782         <span class="keywordflow">case</span> imagetype_is_png:
-<a name="l00783"></a>00783                 <span class="keywordflow">if</span> (pImg-&gt;iComponents == 3 || pImg-&gt;iComponents == 4) {
-<a name="l00784"></a>00784                         vFPprintf(pOutFile, <span class="stringliteral">&quot;\t/ColorSpace /DeviceRGB\n&quot;</span>);
-<a name="l00785"></a>00785                         vFPprintf(pOutFile, <span class="stringliteral">&quot;\t/BitsPerComponent 8\n&quot;</span>);
-<a name="l00786"></a>00786                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pImg-&gt;iColorsUsed &gt; 0) {
-<a name="l00787"></a>00787                         vPrintPalette(pOutFile, pImg);
-<a name="l00788"></a>00788                         fail(pImg-&gt;uiBitsPerComponent &gt; 8);
-<a name="l00789"></a>00789                         vFPprintf(pOutFile, <span class="stringliteral">&quot;\t/BitsPerComponent %u\n&quot;</span>,
-<a name="l00790"></a>00790                                         pImg-&gt;uiBitsPerComponent);
-<a name="l00791"></a>00791                 } <span class="keywordflow">else</span> {
-<a name="l00792"></a>00792                         vFPprintf(pOutFile, <span class="stringliteral">&quot;\t/ColorSpace /DeviceGray\n&quot;</span>);
-<a name="l00793"></a>00793                         vFPprintf(pOutFile, <span class="stringliteral">&quot;\t/BitsPerComponent 8\n&quot;</span>);
-<a name="l00794"></a>00794                 }
-<a name="l00795"></a>00795                 vFPprintf(pOutFile,
-<a name="l00796"></a>00796                         <span class="stringliteral">&quot;\t/Filter [ /ASCII85Decode /FlateDecode ]\n&quot;</span>);
-<a name="l00797"></a>00797                 vFPprintf(pOutFile, <span class="stringliteral">&quot;\t/DecodeParms [ null &lt;&lt;\n&quot;</span>);
-<a name="l00798"></a>00798                 vFPprintf(pOutFile, <span class="stringliteral">&quot;\t\t/Predictor 10\n&quot;</span>);
-<a name="l00799"></a>00799                 vFPprintf(pOutFile, <span class="stringliteral">&quot;\t\t/Colors %d\n&quot;</span>, pImg-&gt;iComponents);
-<a name="l00800"></a>00800                 vFPprintf(pOutFile, <span class="stringliteral">&quot;\t\t/BitsPerComponent %u\n&quot;</span>,
-<a name="l00801"></a>00801                                                 pImg-&gt;uiBitsPerComponent);
-<a name="l00802"></a>00802                 vFPprintf(pOutFile, <span class="stringliteral">&quot;\t\t/Columns %d\n&quot;</span>, pImg-&gt;iWidth);
-<a name="l00803"></a>00803                 vFPprintf(pOutFile, <span class="stringliteral">&quot;\t\t&gt;&gt; ]\n&quot;</span>);
-<a name="l00804"></a>00804                 <span class="keywordflow">break</span>;
-<a name="l00805"></a>00805         <span class="keywordflow">case</span> imagetype_is_dib:
-<a name="l00806"></a>00806                 <span class="keywordflow">if</span> (pImg-&gt;uiBitsPerComponent &lt;= 8) {
-<a name="l00807"></a>00807                         vPrintPalette(pOutFile, pImg);
-<a name="l00808"></a>00808                 } <span class="keywordflow">else</span> {
-<a name="l00809"></a>00809                         vFPprintf(pOutFile, <span class="stringliteral">&quot;\t/ColorSpace /DeviceRGB\n&quot;</span>);
-<a name="l00810"></a>00810                 }
-<a name="l00811"></a>00811                 vFPprintf(pOutFile, <span class="stringliteral">&quot;\t/BitsPerComponent 8\n&quot;</span>);
-<a name="l00812"></a>00812                 vFPprintf(pOutFile, <span class="stringliteral">&quot;\t/Filter /ASCII85Decode\n&quot;</span>);
-<a name="l00813"></a>00813                 <span class="keywordflow">break</span>;
-<a name="l00814"></a>00814         <span class="keywordflow">default</span>:
-<a name="l00815"></a>00815                 vFPprintf(pOutFile, <span class="stringliteral">&quot;\t/ColorSpace /Device%s\n&quot;</span>,
-<a name="l00816"></a>00816                         pImg-&gt;bColorImage ? <span class="stringliteral">&quot;RGB&quot;</span> : <span class="stringliteral">&quot;Gray&quot;</span>);
-<a name="l00817"></a>00817                 vFPprintf(pOutFile, <span class="stringliteral">&quot;\t/BitsPerComponent 8\n&quot;</span>);
-<a name="l00818"></a>00818                 vFPprintf(pOutFile, <span class="stringliteral">&quot;\t/Filter /ASCIIHexDecode\n&quot;</span>);
-<a name="l00819"></a>00819                 <span class="keywordflow">break</span>;
-<a name="l00820"></a>00820         }
-<a name="l00821"></a>00821         vFPprintf(pOutFile, <span class="stringliteral">&quot;ID\n&quot;</span>);
-<a name="l00822"></a>00822 } <span class="comment">/* end of vImageProloguePDF */</span>
-<a name="l00823"></a>00823 
-<a name="l00824"></a>00824 <span class="comment">/*</span>
-<a name="l00825"></a>00825 <span class="comment"> * vImageEpiloguePDF - clean up after the image</span>
-<a name="l00826"></a>00826 <span class="comment"> */</span>
-<a name="l00827"></a>00827 <span class="keywordtype">void</span>
-<a name="l00828"></a>00828 vImageEpiloguePDF(diagram_type *pDiag)
-<a name="l00829"></a>00829 {
-<a name="l00830"></a>00830         FILE    *pOutFile;
-<a name="l00831"></a>00831 
-<a name="l00832"></a>00832         fail(pDiag == NULL);
-<a name="l00833"></a>00833         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00834"></a>00834 
-<a name="l00835"></a>00835         pOutFile = pDiag-&gt;pOutFile;
-<a name="l00836"></a>00836 
-<a name="l00837"></a>00837         <span class="comment">/* Correction for the image bytes */</span>
-<a name="l00838"></a>00838         lFilePosition = ftell(pOutFile);
-<a name="l00839"></a>00839 
-<a name="l00840"></a>00840         vFPprintf(pOutFile, <span class="stringliteral">&quot;EI\n&quot;</span>);
-<a name="l00841"></a>00841         vFPprintf(pOutFile, <span class="stringliteral">&quot;Q\n&quot;</span>);
-<a name="l00842"></a>00842         vFPprintf(pOutFile, <span class="stringliteral">&quot;BT\n&quot;</span>);
-<a name="l00843"></a>00843 
-<a name="l00844"></a>00844         pDiag-&gt;lXleft = 0;
-<a name="l00845"></a>00845 } <span class="comment">/* end of vImageEpiloguePDF */</span>
-<a name="l00846"></a>00846 
-<a name="l00847"></a>00847 <span class="comment">/*</span>
-<a name="l00848"></a>00848 <span class="comment"> * bAddDummyImagePDF - add a dummy image</span>
-<a name="l00849"></a>00849 <span class="comment"> *</span>
-<a name="l00850"></a>00850 <span class="comment"> * return TRUE when successful, otherwise FALSE</span>
-<a name="l00851"></a>00851 <span class="comment"> */</span>
-<a name="l00852"></a>00852 BOOL
-<a name="l00853"></a>00853 bAddDummyImagePDF(diagram_type *pDiag, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00854"></a>00854 {
-<a name="l00855"></a>00855         FILE    *pOutFile;
-<a name="l00856"></a>00856 
-<a name="l00857"></a>00857         fail(pDiag == NULL);
-<a name="l00858"></a>00858         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00859"></a>00859         fail(pImg == NULL);
-<a name="l00860"></a>00860 
-<a name="l00861"></a>00861         <span class="keywordflow">if</span> (pImg-&gt;iVerSizeScaled &lt;= 0 || pImg-&gt;iHorSizeScaled &lt;= 0) {
-<a name="l00862"></a>00862                 <span class="keywordflow">return</span> FALSE;
-<a name="l00863"></a>00863         }
-<a name="l00864"></a>00864 
-<a name="l00865"></a>00865         iImageCount++;
-<a name="l00866"></a>00866 
-<a name="l00867"></a>00867         DBG_DEC_C(pDiag-&gt;lXleft != 0, pDiag-&gt;lXleft);
-<a name="l00868"></a>00868 
-<a name="l00869"></a>00869         pDiag-&gt;lYtop -= lPoints2DrawUnits(pImg-&gt;iVerSizeScaled);
-<a name="l00870"></a>00870         vMoveTo(pDiag, lPoints2DrawUnits(pImg-&gt;iVerSizeScaled));
-<a name="l00871"></a>00871 
-<a name="l00872"></a>00872         pOutFile = pDiag-&gt;pOutFile;
-<a name="l00873"></a>00873 
-<a name="l00874"></a>00874         vFPprintf(pOutFile, <span class="stringliteral">&quot;ET\n&quot;</span>);
-<a name="l00875"></a>00875         vFPprintf(pOutFile, <span class="stringliteral">&quot;q %% Image %03d\n&quot;</span>, iImageCount);
-<a name="l00876"></a>00876         vFPprintf(pOutFile, <span class="stringliteral">&quot;\t1.0 w\n&quot;</span>);
-<a name="l00877"></a>00877         vFPprintf(pOutFile, <span class="stringliteral">&quot;\t0.3 G\n&quot;</span>);
-<a name="l00878"></a>00878         vFPprintf(pOutFile, <span class="stringliteral">&quot;\t%.2f %.2f %d %d re\n&quot;</span>,
-<a name="l00879"></a>00879                         dDrawUnits2Points(pDiag-&gt;lXleft + PS_LEFT_MARGIN),
-<a name="l00880"></a>00880                         dDrawUnits2Points(pDiag-&gt;lYtop),
-<a name="l00881"></a>00881                         pImg-&gt;iHorSizeScaled,
-<a name="l00882"></a>00882                         pImg-&gt;iVerSizeScaled);
-<a name="l00883"></a>00883         vFPprintf(pOutFile, <span class="stringliteral">&quot;\tS\n&quot;</span>);
-<a name="l00884"></a>00884         vFPprintf(pOutFile, <span class="stringliteral">&quot;Q\n&quot;</span>);
-<a name="l00885"></a>00885         vFPprintf(pOutFile, <span class="stringliteral">&quot;BT\n&quot;</span>);
-<a name="l00886"></a>00886 
-<a name="l00887"></a>00887         pDiag-&gt;lXleft = 0;
-<a name="l00888"></a>00888 
-<a name="l00889"></a>00889         <span class="keywordflow">return</span> TRUE;
-<a name="l00890"></a>00890 } <span class="comment">/* end of bAddDummyImagePDF */</span>
-<a name="l00891"></a>00891 
-<a name="l00892"></a>00892 <span class="comment">/*</span>
-<a name="l00893"></a>00893 <span class="comment"> * vAddFontsPDF - add the font information</span>
-<a name="l00894"></a>00894 <span class="comment"> */</span>
-<a name="l00895"></a>00895 <span class="keywordtype">void</span>
-<a name="l00896"></a>00896 vAddFontsPDF(diagram_type *pDiag)
-<a name="l00897"></a>00897 {
-<a name="l00898"></a>00898         FILE    *pOutFile;
-<a name="l00899"></a>00899         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00900"></a>00900 
-<a name="l00901"></a>00901         fail(pDiag == NULL);
-<a name="l00902"></a>00902         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00903"></a>00903 
-<a name="l00904"></a>00904         pOutFile = pDiag-&gt;pOutFile;
-<a name="l00905"></a>00905 
-<a name="l00906"></a>00906         <span class="comment">/* The font encoding */</span>
-<a name="l00907"></a>00907         vSetLocation(4);
-<a name="l00908"></a>00908         vFPprintf(pOutFile, <span class="stringliteral">&quot;4 0 obj\n&quot;</span>);
-<a name="l00909"></a>00909         vFPprintf(pOutFile, <span class="stringliteral">&quot;&lt;&lt;\n&quot;</span>);
-<a name="l00910"></a>00910         vFPprintf(pOutFile, <span class="stringliteral">&quot;/Type /Encoding\n&quot;</span>);
-<a name="l00911"></a>00911         vFPprintf(pOutFile, <span class="stringliteral">&quot;/BaseEncoding /StandardEncoding\n&quot;</span>);
-<a name="l00912"></a>00912         vFPprintf(pOutFile, <span class="stringliteral">&quot;/Differences [\n&quot;</span>);
-<a name="l00913"></a>00913         <span class="keywordflow">switch</span> (eEncoding) {
-<a name="l00914"></a>00914         <span class="keywordflow">case</span> encoding_latin_1:
-<a name="l00915"></a>00915                 <span class="keywordflow">for</span> (tIndex = 0;
-<a name="l00916"></a>00916                      tIndex &lt; elementsof(iso_8859_1);
-<a name="l00917"></a>00917                      tIndex++) {
-<a name="l00918"></a>00918                         vFPprintf(pOutFile, <span class="stringliteral">&quot;%s\n&quot;</span>, iso_8859_1[tIndex]);
-<a name="l00919"></a>00919                 }
-<a name="l00920"></a>00920                 <span class="keywordflow">break</span>;
-<a name="l00921"></a>00921         <span class="keywordflow">case</span> encoding_latin_2:
-<a name="l00922"></a>00922                 <span class="keywordflow">for</span> (tIndex = 0;
-<a name="l00923"></a>00923                      tIndex &lt; elementsof(iso_8859_2);
-<a name="l00924"></a>00924                      tIndex++) {
-<a name="l00925"></a>00925                         vFPprintf(pOutFile, <span class="stringliteral">&quot;%s\n&quot;</span>, iso_8859_2[tIndex]);
-<a name="l00926"></a>00926                 }
-<a name="l00927"></a>00927                 <span class="keywordflow">break</span>;
-<a name="l00928"></a>00928         <span class="keywordflow">case</span> encoding_cyrillic:
-<a name="l00929"></a>00929                 werr(1,
-<a name="l00930"></a>00930                 <span class="stringliteral">&quot;The combination PDF and Cyrillic is not supported&quot;</span>);
-<a name="l00931"></a>00931                 <span class="keywordflow">break</span>;
-<a name="l00932"></a>00932         <span class="keywordflow">case</span> encoding_utf_8:
-<a name="l00933"></a>00933                 werr(1,
-<a name="l00934"></a>00934                 <span class="stringliteral">&quot;The combination PDF and UTF-8 is not supported&quot;</span>);
-<a name="l00935"></a>00935                 <span class="keywordflow">break</span>;
-<a name="l00936"></a>00936         <span class="keywordflow">default</span>:
-<a name="l00937"></a>00937                 DBG_DEC(eEncoding);
-<a name="l00938"></a>00938                 <span class="keywordflow">break</span>;
-<a name="l00939"></a>00939         }
-<a name="l00940"></a>00940         vFPprintf(pOutFile, <span class="stringliteral">&quot;]\n&quot;</span>);
-<a name="l00941"></a>00941         vFPprintf(pOutFile, <span class="stringliteral">&quot;&gt;&gt;\n&quot;</span>);
-<a name="l00942"></a>00942         vFPprintf(pOutFile, <span class="stringliteral">&quot;endobj\n&quot;</span>);
-<a name="l00943"></a>00943 
-<a name="l00944"></a>00944         <span class="comment">/* Twelve of the standard type 1 fonts */</span>
-<a name="l00945"></a>00945         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; 12; tIndex++) {
-<a name="l00946"></a>00946                 vSetLocation(5 + tIndex);
-<a name="l00947"></a>00947                 vFPprintf(pOutFile, <span class="stringliteral">&quot;%u 0 obj\n&quot;</span>, 5 + tIndex);
-<a name="l00948"></a>00948                 vFPprintf(pOutFile, <span class="stringliteral">&quot;&lt;&lt;\n&quot;</span>);
-<a name="l00949"></a>00949                 vFPprintf(pOutFile, <span class="stringliteral">&quot;/Type /Font\n&quot;</span>);
-<a name="l00950"></a>00950                 vFPprintf(pOutFile, <span class="stringliteral">&quot;/Subtype /Type1\n&quot;</span>);
-<a name="l00951"></a>00951                 vFPprintf(pOutFile, <span class="stringliteral">&quot;/Name /F%u\n&quot;</span>, 1 + tIndex);
-<a name="l00952"></a>00952                 vFPprintf(pOutFile, <span class="stringliteral">&quot;/BaseFont /%s\n&quot;</span>,
-<a name="l00953"></a>00953                                                 atFontname[tIndex].szPDFname);
-<a name="l00954"></a>00954                 vFPprintf(pOutFile, <span class="stringliteral">&quot;/Encoding 4 0 R\n&quot;</span>);
-<a name="l00955"></a>00955                 vFPprintf(pOutFile, <span class="stringliteral">&quot;&gt;&gt;\n&quot;</span>);
-<a name="l00956"></a>00956                 vFPprintf(pOutFile, <span class="stringliteral">&quot;endobj\n&quot;</span>);
-<a name="l00957"></a>00957         }
-<a name="l00958"></a>00958 
-<a name="l00959"></a>00959         <span class="comment">/* The Resources */</span>
-<a name="l00960"></a>00960         vSetLocation(17);
-<a name="l00961"></a>00961         vFPprintf(pOutFile, <span class="stringliteral">&quot;17 0 obj\n&quot;</span>);
-<a name="l00962"></a>00962         vFPprintf(pOutFile, <span class="stringliteral">&quot;&lt;&lt;\n&quot;</span>);
-<a name="l00963"></a>00963         vFPprintf(pOutFile, <span class="stringliteral">&quot;/ProcSet [ /PDF /Text ]\n&quot;</span>);
-<a name="l00964"></a>00964         vFPprintf(pOutFile, <span class="stringliteral">&quot;/Font &lt;&lt;\n&quot;</span>);
-<a name="l00965"></a>00965         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; 12; tIndex++) {
-<a name="l00966"></a>00966                 vFPprintf(pOutFile, <span class="stringliteral">&quot;\t/F%u %u 0 R\n&quot;</span>, 1 + tIndex, 5 + tIndex);
-<a name="l00967"></a>00967         }
-<a name="l00968"></a>00968         vFPprintf(pOutFile, <span class="stringliteral">&quot;\t&gt;&gt;\n&quot;</span>);
-<a name="l00969"></a>00969         vFPprintf(pOutFile, <span class="stringliteral">&quot;&gt;&gt;\n&quot;</span>);
-<a name="l00970"></a>00970         vFPprintf(pOutFile, <span class="stringliteral">&quot;endobj\n&quot;</span>);
-<a name="l00971"></a>00971         vAddHeader(pDiag);
-<a name="l00972"></a>00972 } <span class="comment">/* end of vAddFontsPDF */</span>
-<a name="l00973"></a>00973 
-<a name="l00974"></a>00974 <span class="comment">/*</span>
-<a name="l00975"></a>00975 <span class="comment"> * vPrintPDF - print a PDF string</span>
-<a name="l00976"></a>00976 <span class="comment"> */</span>
-<a name="l00977"></a>00977 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00978"></a>00978 vPrintPDF(FILE *pFile, <span class="keyword">const</span> <span class="keywordtype">char</span> *szString, <span class="keywordtype">size_t</span> tStringLength,
-<a name="l00979"></a>00979         USHORT usFontstyle)
-<a name="l00980"></a>00980 {
-<a name="l00981"></a>00981         <span class="keyword">const</span> UCHAR     *aucBytes;
-<a name="l00982"></a>00982         <span class="keywordtype">double</span>  dMove;
-<a name="l00983"></a>00983         <span class="keywordtype">size_t</span>  tCount;
-<a name="l00984"></a>00984 
-<a name="l00985"></a>00985         fail(szString == NULL);
-<a name="l00986"></a>00986 
-<a name="l00987"></a>00987         <span class="keywordflow">if</span> (szString == NULL || szString[0] == <span class="charliteral">&#39;\0&#39;</span> || tStringLength == 0) {
-<a name="l00988"></a>00988                 <span class="keywordflow">return</span>;
-<a name="l00989"></a>00989         }
-<a name="l00990"></a>00990         DBG_DEC_C(usFontSizeCurr &lt; MIN_FONT_SIZE, usFontSizeCurr);
-<a name="l00991"></a>00991 
-<a name="l00992"></a>00992         dMove = 0.0;
-<a name="l00993"></a>00993 
-<a name="l00994"></a>00994         <span class="comment">/* Up for superscript */</span>
-<a name="l00995"></a>00995         <span class="keywordflow">if</span> (bIsSuperscript(usFontstyle) &amp;&amp; usFontSizeCurr != 0) {
-<a name="l00996"></a>00996                 dMove = (double)((usFontSizeCurr + 1) / 2) * 0.375;
-<a name="l00997"></a>00997                 vFPprintf(pFile, <span class="stringliteral">&quot;%.2f Ts\n&quot;</span>, dMove);
-<a name="l00998"></a>00998         }
-<a name="l00999"></a>00999 
-<a name="l01000"></a>01000         <span class="comment">/* Down for subscript */</span>
-<a name="l01001"></a>01001         <span class="keywordflow">if</span> (bIsSubscript(usFontstyle) &amp;&amp; usFontSizeCurr != 0) {
-<a name="l01002"></a>01002                 dMove = (double)usFontSizeCurr * 0.125;
-<a name="l01003"></a>01003                 vFPprintf(pFile, <span class="stringliteral">&quot;%.2f Ts\n&quot;</span>, -dMove);
-<a name="l01004"></a>01004         }
-<a name="l01005"></a>01005 
-<a name="l01006"></a>01006         <span class="comment">/* Generate and print the PDF output */</span>
-<a name="l01007"></a>01007         aucBytes = (UCHAR *)szString;
-<a name="l01008"></a>01008         vFPprintf(pFile, <span class="stringliteral">&quot;(&quot;</span>);
-<a name="l01009"></a>01009         <span class="keywordflow">for</span> (tCount = 0; tCount &lt; tStringLength ; tCount++) {
-<a name="l01010"></a>01010                 <span class="keywordflow">switch</span> (aucBytes[tCount]) {
-<a name="l01011"></a>01011                 <span class="keywordflow">case</span> <span class="charliteral">&#39;(&#39;</span>:
-<a name="l01012"></a>01012                 <span class="keywordflow">case</span> <span class="charliteral">&#39;)&#39;</span>:
-<a name="l01013"></a>01013                 <span class="keywordflow">case</span> <span class="charliteral">&#39;\\&#39;</span>:
-<a name="l01014"></a>01014                         vFPprintf(pFile, <span class="stringliteral">&quot;\\%c&quot;</span>, szString[tCount]);
-<a name="l01015"></a>01015                         <span class="keywordflow">break</span>;
-<a name="l01016"></a>01016                 <span class="keywordflow">default</span>:
-<a name="l01017"></a>01017                         <span class="keywordflow">if</span> (aucBytes[tCount] &lt; 0x20 ||
-<a name="l01018"></a>01018                             aucBytes[tCount] == 0x7f ||
-<a name="l01019"></a>01019                             (aucBytes[tCount] &gt;= 0x81 &amp;&amp;
-<a name="l01020"></a>01020                              aucBytes[tCount] &lt; 0x8c)) {
-<a name="l01021"></a>01021                                 DBG_HEX(aucBytes[tCount]);
-<a name="l01022"></a>01022                                 vFPprintf(pFile, <span class="stringliteral">&quot; &quot;</span>);
-<a name="l01023"></a>01023                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (aucBytes[tCount] &gt;= 0x80) {
-<a name="l01024"></a>01024                                 vFPprintf(pFile, <span class="stringliteral">&quot;\\%03o&quot;</span>,
-<a name="l01025"></a>01025                                                 (UINT)aucBytes[tCount]);
-<a name="l01026"></a>01026                         } <span class="keywordflow">else</span> {
-<a name="l01027"></a>01027                                 vFPprintf(pFile, <span class="stringliteral">&quot;%c&quot;</span>, szString[tCount]);
-<a name="l01028"></a>01028                         }
-<a name="l01029"></a>01029                         <span class="keywordflow">break</span>;
-<a name="l01030"></a>01030                 }
-<a name="l01031"></a>01031         }
-<a name="l01032"></a>01032         vFPprintf(pFile, <span class="stringliteral">&quot;) Tj\n&quot;</span>);
-<a name="l01033"></a>01033 
-<a name="l01034"></a>01034         <span class="comment">/* Undo the superscript/subscript move */</span>
-<a name="l01035"></a>01035         <span class="keywordflow">if</span> (dMove != 0.0) {
-<a name="l01036"></a>01036                 vFPprintf(pFile, <span class="stringliteral">&quot;0 Ts\n&quot;</span>);
-<a name="l01037"></a>01037         }
-<a name="l01038"></a>01038 } <span class="comment">/* end of vPrintPDF */</span>
-<a name="l01039"></a>01039 
-<a name="l01040"></a>01040 <span class="comment">/*</span>
-<a name="l01041"></a>01041 <span class="comment"> * vSetColor - move to the specified color</span>
-<a name="l01042"></a>01042 <span class="comment"> */</span>
-<a name="l01043"></a>01043 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l01044"></a>01044 vSetColor(FILE *pFile, UCHAR ucFontColor)
-<a name="l01045"></a>01045 {
-<a name="l01046"></a>01046         ULONG   ulTmp, ulRed, ulGreen, ulBlue;
-<a name="l01047"></a>01047 
-<a name="l01048"></a>01048         ulTmp = ulColor2Color(ucFontColor);
-<a name="l01049"></a>01049         ulRed   = (ulTmp &amp; 0x0000ff00) &gt;&gt; 8;
-<a name="l01050"></a>01050         ulGreen = (ulTmp &amp; 0x00ff0000) &gt;&gt; 16;
-<a name="l01051"></a>01051         ulBlue  = (ulTmp &amp; 0xff000000) &gt;&gt; 24;
-<a name="l01052"></a>01052         vFPprintf(pFile, <span class="stringliteral">&quot;%.3f %.3f %.3f rg\n&quot;</span>,
-<a name="l01053"></a>01053                         ulRed / 255.0, ulGreen / 255.0, ulBlue / 255.0);
-<a name="l01054"></a>01054 } <span class="comment">/* end of vSetColor */</span>
-<a name="l01055"></a>01055 
-<a name="l01056"></a>01056 <span class="comment">/*</span>
-<a name="l01057"></a>01057 <span class="comment"> * vMove2NextLinePDF - move to the next line</span>
-<a name="l01058"></a>01058 <span class="comment"> */</span>
-<a name="l01059"></a>01059 <span class="keywordtype">void</span>
-<a name="l01060"></a>01060 vMove2NextLinePDF(diagram_type *pDiag, USHORT usFontSize)
-<a name="l01061"></a>01061 {
-<a name="l01062"></a>01062         fail(pDiag == NULL);
-<a name="l01063"></a>01063         fail(usFontSize &lt; MIN_FONT_SIZE || usFontSize &gt; MAX_FONT_SIZE);
-<a name="l01064"></a>01064 
-<a name="l01065"></a>01065         pDiag-&gt;lYtop -= lComputeLeading(usFontSize);
-<a name="l01066"></a>01066 } <span class="comment">/* end of vMove2NextLinePDF */</span>
-<a name="l01067"></a>01067 
-<a name="l01068"></a>01068 <span class="comment">/*</span>
-<a name="l01069"></a>01069 <span class="comment"> * vSubstringPDF - print a sub string</span>
-<a name="l01070"></a>01070 <span class="comment"> */</span>
-<a name="l01071"></a>01071 <span class="keywordtype">void</span>
-<a name="l01072"></a>01072 vSubstringPDF(diagram_type *pDiag,
-<a name="l01073"></a>01073         <span class="keywordtype">char</span> *szString, <span class="keywordtype">size_t</span> tStringLength, <span class="keywordtype">long</span> lStringWidth,
-<a name="l01074"></a>01074         UCHAR ucFontColor, USHORT usFontstyle, drawfile_fontref tFontRef,
-<a name="l01075"></a>01075         USHORT usFontSize, USHORT usMaxFontSize)
-<a name="l01076"></a>01076 {
-<a name="l01077"></a>01077         <span class="keywordtype">size_t</span>  tFontIndex;
-<a name="l01078"></a>01078 
-<a name="l01079"></a>01079         fail(pDiag == NULL || szString == NULL);
-<a name="l01080"></a>01080         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l01081"></a>01081         fail(pDiag-&gt;lXleft &lt; 0);
-<a name="l01082"></a>01082         fail(tStringLength != strlen(szString));
-<a name="l01083"></a>01083         fail(usFontSize &lt; MIN_FONT_SIZE || usFontSize &gt; MAX_FONT_SIZE);
-<a name="l01084"></a>01084         fail(usMaxFontSize &lt; MIN_FONT_SIZE || usMaxFontSize &gt; MAX_FONT_SIZE);
-<a name="l01085"></a>01085         fail(usFontSize &gt; usMaxFontSize);
-<a name="l01086"></a>01086 
-<a name="l01087"></a>01087         <span class="keywordflow">if</span> (szString[0] == <span class="charliteral">&#39;\0&#39;</span> || tStringLength == 0) {
-<a name="l01088"></a>01088                 <span class="keywordflow">return</span>;
-<a name="l01089"></a>01089         }
-<a name="l01090"></a>01090 
-<a name="l01091"></a>01091         vMoveTo(pDiag, lComputeLeading(usMaxFontSize));
-<a name="l01092"></a>01092         <span class="keywordflow">if</span> (tFontRef != tFontRefCurr || usFontSize != usFontSizeCurr) {
-<a name="l01093"></a>01093                 tFontIndex = tGetFontIndex(tFontRef);
-<a name="l01094"></a>01094                 vFPprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;/F%u %.1f Tf\n&quot;</span>,
-<a name="l01095"></a>01095                          1 + tFontIndex, (<span class="keywordtype">double</span>)usFontSize / 2.0);
-<a name="l01096"></a>01096                 tFontRefCurr = tFontRef;
-<a name="l01097"></a>01097                 usFontSizeCurr = usFontSize;
-<a name="l01098"></a>01098         }
-<a name="l01099"></a>01099         <span class="keywordflow">if</span> ((<span class="keywordtype">int</span>)ucFontColor != iFontColorCurr) {
-<a name="l01100"></a>01100                 vSetColor(pDiag-&gt;pOutFile, ucFontColor);
-<a name="l01101"></a>01101                 iFontColorCurr = (int)ucFontColor;
-<a name="l01102"></a>01102         }
-<a name="l01103"></a>01103         vPrintPDF(pDiag-&gt;pOutFile, szString, tStringLength, usFontstyle);
-<a name="l01104"></a>01104         pDiag-&gt;lXleft += lStringWidth;
-<a name="l01105"></a>01105 } <span class="comment">/* end of vSubstringPDF */</span>
-<a name="l01106"></a>01106 
-<a name="l01107"></a>01107 <span class="comment">/*</span>
-<a name="l01108"></a>01108 <span class="comment"> * Create an start of paragraph by moving the y-top mark</span>
-<a name="l01109"></a>01109 <span class="comment"> */</span>
-<a name="l01110"></a>01110 <span class="keywordtype">void</span>
-<a name="l01111"></a>01111 vStartOfParagraphPDF(diagram_type *pDiag, <span class="keywordtype">long</span> lBeforeIndentation)
-<a name="l01112"></a>01112 {
-<a name="l01113"></a>01113         fail(pDiag == NULL);
-<a name="l01114"></a>01114         fail(lBeforeIndentation &lt; 0);
-<a name="l01115"></a>01115 
-<a name="l01116"></a>01116         pDiag-&gt;lXleft = 0;
-<a name="l01117"></a>01117         pDiag-&gt;lYtop -= lMilliPoints2DrawUnits(lBeforeIndentation);
-<a name="l01118"></a>01118 } <span class="comment">/* end of vStartOfParagraphPDF */</span>
-<a name="l01119"></a>01119 
-<a name="l01120"></a>01120 <span class="comment">/*</span>
-<a name="l01121"></a>01121 <span class="comment"> * Create an end of paragraph by moving the y-top mark</span>
-<a name="l01122"></a>01122 <span class="comment"> */</span>
-<a name="l01123"></a>01123 <span class="keywordtype">void</span>
-<a name="l01124"></a>01124 vEndOfParagraphPDF(diagram_type *pDiag,
-<a name="l01125"></a>01125         USHORT usFontSize, <span class="keywordtype">long</span> lAfterIndentation)
-<a name="l01126"></a>01126 {
-<a name="l01127"></a>01127         fail(pDiag == NULL);
-<a name="l01128"></a>01128         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l01129"></a>01129         fail(usFontSize &lt; MIN_FONT_SIZE || usFontSize &gt; MAX_FONT_SIZE);
-<a name="l01130"></a>01130         fail(lAfterIndentation &lt; 0);
-<a name="l01131"></a>01131 
-<a name="l01132"></a>01132         <span class="keywordflow">if</span> (pDiag-&gt;lXleft &gt; 0) {
-<a name="l01133"></a>01133                 <span class="comment">/* To the start of the line */</span>
-<a name="l01134"></a>01134                 vMove2NextLinePDF(pDiag, usFontSize);
-<a name="l01135"></a>01135         }
-<a name="l01136"></a>01136 
-<a name="l01137"></a>01137         pDiag-&gt;lXleft = 0;
-<a name="l01138"></a>01138         pDiag-&gt;lYtop -= lMilliPoints2DrawUnits(lAfterIndentation);
-<a name="l01139"></a>01139 } <span class="comment">/* end of vEndOfParagraphPDF */</span>
-<a name="l01140"></a>01140 
-<a name="l01141"></a>01141 <span class="comment">/*</span>
-<a name="l01142"></a>01142 <span class="comment"> * Create an end of page</span>
-<a name="l01143"></a>01143 <span class="comment"> */</span>
-<a name="l01144"></a>01144 <span class="keywordtype">void</span>
-<a name="l01145"></a>01145 vEndOfPagePDF(diagram_type *pDiag, BOOL bNewSection)
-<a name="l01146"></a>01146 {
-<a name="l01147"></a>01147         vMove2NextPage(pDiag, bNewSection);
-<a name="l01148"></a>01148 } <span class="comment">/* end of vEndOfPagePDF */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/pictlist_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/pictlist.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/pictlist.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * pictlist.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2000-2004 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Build, read and destroy a list of Word picture information</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00011"></a>00011 
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 <span class="comment">/*</span>
-<a name="l00014"></a>00014 <span class="comment"> * Private structure to hide the way the information</span>
-<a name="l00015"></a>00015 <span class="comment"> * is stored from the rest of the program</span>
-<a name="l00016"></a>00016 <span class="comment"> */</span>
-<a name="l00017"></a>00017 <span class="keyword">typedef</span> <span class="keyword">struct </span>picture_mem_tag {
-<a name="l00018"></a>00018         picture_block_type      tInfo;
-<a name="l00019"></a>00019         <span class="keyword">struct </span>picture_mem_tag *pNext;
-<a name="l00020"></a>00020 } picture_mem_type;
-<a name="l00021"></a>00021 
-<a name="l00022"></a>00022 <span class="comment">/* Variables needed to write the Picture Information List */</span>
-<a name="l00023"></a>00023 <span class="keyword">static</span> picture_mem_type *pAnchor = NULL;
-<a name="l00024"></a>00024 <span class="keyword">static</span> picture_mem_type *pPictureLast = NULL;
-<a name="l00025"></a>00025 
-<a name="l00026"></a>00026 
-<a name="l00027"></a>00027 <span class="comment">/*</span>
-<a name="l00028"></a>00028 <span class="comment"> * vDestroyPictInfoList - destroy the Picture Information List</span>
-<a name="l00029"></a>00029 <span class="comment"> */</span>
-<a name="l00030"></a>00030 <span class="keywordtype">void</span>
-<a name="l00031"></a>00031 vDestroyPictInfoList(<span class="keywordtype">void</span>)
-<a name="l00032"></a>00032 {
-<a name="l00033"></a>00033         picture_mem_type        *pCurr, *pNext;
-<a name="l00034"></a>00034 
-<a name="l00035"></a>00035         DBG_MSG(<span class="stringliteral">&quot;vDestroyPictInfoList&quot;</span>);
-<a name="l00036"></a>00036 
-<a name="l00037"></a>00037         <span class="comment">/* Free the Picture Information List */</span>
-<a name="l00038"></a>00038         pCurr = pAnchor;
-<a name="l00039"></a>00039         <span class="keywordflow">while</span> (pCurr != NULL) {
-<a name="l00040"></a>00040                 pNext = pCurr-&gt;pNext;
-<a name="l00041"></a>00041                 pCurr = xfree(pCurr);
-<a name="l00042"></a>00042                 pCurr = pNext;
-<a name="l00043"></a>00043         }
-<a name="l00044"></a>00044         pAnchor = NULL;
-<a name="l00045"></a>00045         <span class="comment">/* Reset all control variables */</span>
-<a name="l00046"></a>00046         pPictureLast = NULL;
-<a name="l00047"></a>00047 } <span class="comment">/* end of vDestroyPictInfoList */</span>
-<a name="l00048"></a>00048 
-<a name="l00049"></a>00049 <span class="comment">/*</span>
-<a name="l00050"></a>00050 <span class="comment"> * vAdd2PictInfoList - Add an element to the Picture Information List</span>
-<a name="l00051"></a>00051 <span class="comment"> */</span>
-<a name="l00052"></a>00052 <span class="keywordtype">void</span>
-<a name="l00053"></a>00053 vAdd2PictInfoList(<span class="keyword">const</span> picture_block_type *pPictureBlock)
-<a name="l00054"></a>00054 {
-<a name="l00055"></a>00055         picture_mem_type        *pListMember;
-<a name="l00056"></a>00056 
-<a name="l00057"></a>00057         fail(pPictureBlock == NULL);
-<a name="l00058"></a>00058 
-<a name="l00059"></a>00059         NO_DBG_MSG(<span class="stringliteral">&quot;bAdd2PictInfoList&quot;</span>);
-<a name="l00060"></a>00060 
-<a name="l00061"></a>00061         <span class="keywordflow">if</span> (pPictureBlock-&gt;ulFileOffset == FC_INVALID) {
-<a name="l00062"></a>00062                 <span class="comment">/*</span>
-<a name="l00063"></a>00063 <span class="comment">                 * This offset is really past the end of the file,</span>
-<a name="l00064"></a>00064 <span class="comment">                 * so don&#39;t waste any memory by storing it.</span>
-<a name="l00065"></a>00065 <span class="comment">                 */</span>
-<a name="l00066"></a>00066                 <span class="keywordflow">return</span>;
-<a name="l00067"></a>00067         }
-<a name="l00068"></a>00068         <span class="keywordflow">if</span> (pPictureBlock-&gt;ulFileOffsetPicture == FC_INVALID) {
-<a name="l00069"></a>00069                 <span class="comment">/*</span>
-<a name="l00070"></a>00070 <span class="comment">                 * The place where this picture is supposed to be stored</span>
-<a name="l00071"></a>00071 <span class="comment">                 * doesn&#39;t exist.</span>
-<a name="l00072"></a>00072 <span class="comment">                 */</span>
-<a name="l00073"></a>00073                 <span class="keywordflow">return</span>;
-<a name="l00074"></a>00074         }
-<a name="l00075"></a>00075 
-<a name="l00076"></a>00076         NO_DBG_HEX(pPictureBlock-&gt;ulFileOffset);
-<a name="l00077"></a>00077         NO_DBG_HEX(pPictureBlock-&gt;ulFileOffsetPicture);
-<a name="l00078"></a>00078         NO_DBG_HEX(pPictureBlock-&gt;ulPictureOffset);
-<a name="l00079"></a>00079 
-<a name="l00080"></a>00080         <span class="comment">/* Create list member */</span>
-<a name="l00081"></a>00081         pListMember = xmalloc(<span class="keyword">sizeof</span>(picture_mem_type));
-<a name="l00082"></a>00082         <span class="comment">/* Fill the list member */</span>
-<a name="l00083"></a>00083         pListMember-&gt;tInfo = *pPictureBlock;
-<a name="l00084"></a>00084         pListMember-&gt;pNext = NULL;
-<a name="l00085"></a>00085         <span class="comment">/* Add the new member to the list */</span>
-<a name="l00086"></a>00086         <span class="keywordflow">if</span> (pAnchor == NULL) {
-<a name="l00087"></a>00087                 pAnchor = pListMember;
-<a name="l00088"></a>00088         } <span class="keywordflow">else</span> {
-<a name="l00089"></a>00089                 fail(pPictureLast == NULL);
-<a name="l00090"></a>00090                 pPictureLast-&gt;pNext = pListMember;
-<a name="l00091"></a>00091         }
-<a name="l00092"></a>00092         pPictureLast = pListMember;
-<a name="l00093"></a>00093 } <span class="comment">/* end of vAdd2PictInfoList */</span>
-<a name="l00094"></a>00094 
-<a name="l00095"></a>00095 <span class="comment">/*</span>
-<a name="l00096"></a>00096 <span class="comment"> * Get the info with the given file offset from the Picture Information List</span>
-<a name="l00097"></a>00097 <span class="comment"> */</span>
-<a name="l00098"></a>00098 ULONG
-<a name="l00099"></a>00099 ulGetPictInfoListItem(ULONG ulFileOffset)
-<a name="l00100"></a>00100 {
-<a name="l00101"></a>00101         picture_mem_type        *pCurr;
-<a name="l00102"></a>00102 
-<a name="l00103"></a>00103         <span class="keywordflow">for</span> (pCurr = pAnchor; pCurr != NULL; pCurr = pCurr-&gt;pNext) {
-<a name="l00104"></a>00104                 <span class="keywordflow">if</span> (pCurr-&gt;tInfo.ulFileOffset == ulFileOffset) {
-<a name="l00105"></a>00105                         <span class="keywordflow">return</span> pCurr-&gt;tInfo.ulFileOffsetPicture;
-<a name="l00106"></a>00106                 }
-<a name="l00107"></a>00107         }
-<a name="l00108"></a>00108         <span class="keywordflow">return</span> FC_INVALID;
-<a name="l00109"></a>00109 } <span class="comment">/* end of ulGetPictInfoListItem */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/png2eps_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,207 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/png2eps.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/png2eps.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * png2eps.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2000-2002 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Functions to translate png images into eps</span>
-<a name="l00007"></a>00007 <span class="comment"> *</span>
-<a name="l00008"></a>00008 <span class="comment"> */</span>
-<a name="l00009"></a>00009 
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;ctype.h&gt;</span>
-<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00013"></a>00013 
-<a name="l00014"></a>00014 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keywordtype">int</span>      iPicCounter = 0;
-<a name="l00016"></a>00016 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00017"></a>00017 
-<a name="l00018"></a>00018 
-<a name="l00019"></a>00019 <span class="comment">/*</span>
-<a name="l00020"></a>00020 <span class="comment"> * tSkipToData - skip until a IDAT chunk is found</span>
-<a name="l00021"></a>00021 <span class="comment"> *</span>
-<a name="l00022"></a>00022 <span class="comment"> * returns the length of the pixeldata or -1 in case of error</span>
-<a name="l00023"></a>00023 <span class="comment"> */</span>
-<a name="l00024"></a>00024 <span class="keyword">static</span> <span class="keywordtype">size_t</span>
-<a name="l00025"></a>00025 tSkipToData(FILE *pFile, <span class="keywordtype">size_t</span> tMaxBytes, <span class="keywordtype">size_t</span> *ptSkipped)
-<a name="l00026"></a>00026 {
-<a name="l00027"></a>00027         ULONG   ulName, ulTmp;
-<a name="l00028"></a>00028         <span class="keywordtype">size_t</span>  tDataLength, tToSkip;
-<a name="l00029"></a>00029         <span class="keywordtype">int</span>     iCounter;
-<a name="l00030"></a>00030 
-<a name="l00031"></a>00031         fail(pFile == NULL);
-<a name="l00032"></a>00032         fail(ptSkipped == NULL);
-<a name="l00033"></a>00033 
-<a name="l00034"></a>00034         <span class="comment">/* Examine chunks */</span>
-<a name="l00035"></a>00035         <span class="keywordflow">while</span> (*ptSkipped + 8 &lt; tMaxBytes) {
-<a name="l00036"></a>00036                 tDataLength = (size_t)ulNextLongBE(pFile);
-<a name="l00037"></a>00037                 DBG_DEC(tDataLength);
-<a name="l00038"></a>00038                 *ptSkipped += 4;
-<a name="l00039"></a>00039 
-<a name="l00040"></a>00040                 ulName = 0x00;
-<a name="l00041"></a>00041                 <span class="keywordflow">for</span> (iCounter = 0; iCounter &lt; 4; iCounter++) {
-<a name="l00042"></a>00042                         ulTmp = (ULONG)iNextByte(pFile);
-<a name="l00043"></a>00043                         <span class="keywordflow">if</span> (!isalpha((<span class="keywordtype">int</span>)ulTmp)) {
-<a name="l00044"></a>00044                                 DBG_HEX(ulTmp);
-<a name="l00045"></a>00045                                 <span class="keywordflow">return</span> (<span class="keywordtype">size_t</span>)-1;
-<a name="l00046"></a>00046                         }
-<a name="l00047"></a>00047                         ulName &lt;&lt;= 8;
-<a name="l00048"></a>00048                         ulName |= ulTmp;
-<a name="l00049"></a>00049                 }
-<a name="l00050"></a>00050                 DBG_HEX(ulName);
-<a name="l00051"></a>00051                 *ptSkipped += 4;
-<a name="l00052"></a>00052 
-<a name="l00053"></a>00053                 <span class="keywordflow">if</span> (ulName == PNG_CN_IEND) {
-<a name="l00054"></a>00054                         <span class="keywordflow">break</span>;
-<a name="l00055"></a>00055                 }
-<a name="l00056"></a>00056                 <span class="keywordflow">if</span> (ulName == PNG_CN_IDAT) {
-<a name="l00057"></a>00057                         <span class="keywordflow">return</span> tDataLength;
-<a name="l00058"></a>00058                 }
-<a name="l00059"></a>00059 
-<a name="l00060"></a>00060                 tToSkip = tDataLength + 4;
-<a name="l00061"></a>00061                 <span class="keywordflow">if</span> (tToSkip &gt;= tMaxBytes - *ptSkipped) {
-<a name="l00062"></a>00062                         DBG_DEC(tToSkip);
-<a name="l00063"></a>00063                         DBG_DEC(tMaxBytes - *ptSkipped);
-<a name="l00064"></a>00064                         <span class="keywordflow">return</span> (<span class="keywordtype">size_t</span>)-1;
-<a name="l00065"></a>00065                 }
-<a name="l00066"></a>00066                 (void)tSkipBytes(pFile, tToSkip);
-<a name="l00067"></a>00067                 *ptSkipped += tToSkip;
-<a name="l00068"></a>00068         }
-<a name="l00069"></a>00069 
-<a name="l00070"></a>00070         <span class="keywordflow">return</span> (<span class="keywordtype">size_t</span>)-1;
-<a name="l00071"></a>00071 } <span class="comment">/* end of iSkipToData */</span>
-<a name="l00072"></a>00072 
-<a name="l00073"></a>00073 <span class="comment">/*</span>
-<a name="l00074"></a>00074 <span class="comment"> * iFindFirstPixelData - find the first pixeldata if a PNG image</span>
-<a name="l00075"></a>00075 <span class="comment"> *</span>
-<a name="l00076"></a>00076 <span class="comment"> * returns the length of the pixeldata or -1 in case of error</span>
-<a name="l00077"></a>00077 <span class="comment"> */</span>
-<a name="l00078"></a>00078 <span class="keyword">static</span> <span class="keywordtype">size_t</span>
-<a name="l00079"></a>00079 tFindFirstPixelData(FILE *pFile, <span class="keywordtype">size_t</span> tMaxBytes, <span class="keywordtype">size_t</span> *ptSkipped)
-<a name="l00080"></a>00080 {
-<a name="l00081"></a>00081         fail(pFile == NULL);
-<a name="l00082"></a>00082         fail(tMaxBytes == 0);
-<a name="l00083"></a>00083         fail(ptSkipped == NULL);
-<a name="l00084"></a>00084 
-<a name="l00085"></a>00085         <span class="keywordflow">if</span> (tMaxBytes &lt; 8) {
-<a name="l00086"></a>00086                 DBG_DEC(tMaxBytes);
-<a name="l00087"></a>00087                 <span class="keywordflow">return</span> (<span class="keywordtype">size_t</span>)-1;
-<a name="l00088"></a>00088         }
-<a name="l00089"></a>00089 
-<a name="l00090"></a>00090         <span class="comment">/* Skip over the PNG signature */</span>
-<a name="l00091"></a>00091         (void)tSkipBytes(pFile, 8);
-<a name="l00092"></a>00092         *ptSkipped = 8;
-<a name="l00093"></a>00093 
-<a name="l00094"></a>00094         <span class="keywordflow">return</span> tSkipToData(pFile, tMaxBytes, ptSkipped);
-<a name="l00095"></a>00095 } <span class="comment">/* end of iFindFirstPixelData */</span>
-<a name="l00096"></a>00096 
-<a name="l00097"></a>00097 <span class="comment">/*</span>
-<a name="l00098"></a>00098 <span class="comment"> * tFindNextPixelData - find the next pixeldata if a PNG image</span>
-<a name="l00099"></a>00099 <span class="comment"> *</span>
-<a name="l00100"></a>00100 <span class="comment"> * returns the length of the pixeldata or -1 in case of error</span>
-<a name="l00101"></a>00101 <span class="comment"> */</span>
-<a name="l00102"></a>00102 <span class="keyword">static</span> <span class="keywordtype">size_t</span>
-<a name="l00103"></a>00103 tFindNextPixelData(FILE *pFile, <span class="keywordtype">size_t</span> tMaxBytes, <span class="keywordtype">size_t</span> *ptSkipped)
-<a name="l00104"></a>00104 {
-<a name="l00105"></a>00105         fail(pFile == NULL);
-<a name="l00106"></a>00106         fail(tMaxBytes == 0);
-<a name="l00107"></a>00107         fail(ptSkipped == NULL);
-<a name="l00108"></a>00108 
-<a name="l00109"></a>00109         <span class="keywordflow">if</span> (tMaxBytes &lt; 4) {
-<a name="l00110"></a>00110                 DBG_DEC(tMaxBytes);
-<a name="l00111"></a>00111                 <span class="keywordflow">return</span> (<span class="keywordtype">size_t</span>)-1;
-<a name="l00112"></a>00112         }
-<a name="l00113"></a>00113 
-<a name="l00114"></a>00114         <span class="comment">/* Skip over the crc */</span>
-<a name="l00115"></a>00115         (void)tSkipBytes(pFile, 4);
-<a name="l00116"></a>00116         *ptSkipped = 4;
-<a name="l00117"></a>00117 
-<a name="l00118"></a>00118         <span class="keywordflow">return</span> tSkipToData(pFile, tMaxBytes, ptSkipped);
-<a name="l00119"></a>00119 } <span class="comment">/* end of tFindNextPixelData */</span>
-<a name="l00120"></a>00120 
-<a name="l00121"></a>00121 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00122"></a>00122 <span class="preprocessor"></span><span class="comment">/*</span>
-<a name="l00123"></a>00123 <span class="comment"> * vCopy2File</span>
-<a name="l00124"></a>00124 <span class="comment"> */</span>
-<a name="l00125"></a>00125 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00126"></a>00126 vCopy2File(FILE *pFile, ULONG ulFileOffset, <span class="keywordtype">size_t</span> tPictureLen)
-<a name="l00127"></a>00127 {
-<a name="l00128"></a>00128         FILE    *pOutFile;
-<a name="l00129"></a>00129         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00130"></a>00130         <span class="keywordtype">int</span>     iTmp;
-<a name="l00131"></a>00131         <span class="keywordtype">char</span>    szFilename[30];
-<a name="l00132"></a>00132 
-<a name="l00133"></a>00133         <span class="keywordflow">if</span> (!bSetDataOffset(pFile, ulFileOffset)) {
-<a name="l00134"></a>00134                 <span class="keywordflow">return</span>;
-<a name="l00135"></a>00135         }
-<a name="l00136"></a>00136 
-<a name="l00137"></a>00137         sprintf(szFilename, <span class="stringliteral">&quot;/tmp/pic/pic%04d.png&quot;</span>, ++iPicCounter);
-<a name="l00138"></a>00138         pOutFile = fopen(szFilename, <span class="stringliteral">&quot;wb&quot;</span>);
-<a name="l00139"></a>00139         <span class="keywordflow">if</span> (pOutFile == NULL) {
-<a name="l00140"></a>00140                 <span class="keywordflow">return</span>;
-<a name="l00141"></a>00141         }
-<a name="l00142"></a>00142         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tPictureLen; tIndex++) {
-<a name="l00143"></a>00143                 iTmp = iNextByte(pFile);
-<a name="l00144"></a>00144                 <span class="keywordflow">if</span> (putc(iTmp, pOutFile) == EOF) {
-<a name="l00145"></a>00145                         <span class="keywordflow">break</span>;
-<a name="l00146"></a>00146                 }
-<a name="l00147"></a>00147         }
-<a name="l00148"></a>00148         (void)fclose(pOutFile);
-<a name="l00149"></a>00149 } <span class="comment">/* end of vCopy2File */</span>
-<a name="l00150"></a>00150 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00151"></a>00151 
-<a name="l00152"></a>00152 <span class="comment">/*</span>
-<a name="l00153"></a>00153 <span class="comment"> * bTranslatePNG - translate a PNG image</span>
-<a name="l00154"></a>00154 <span class="comment"> *</span>
-<a name="l00155"></a>00155 <span class="comment"> * This function translates an image from png to eps</span>
-<a name="l00156"></a>00156 <span class="comment"> *</span>
-<a name="l00157"></a>00157 <span class="comment"> * return TRUE when sucessful, otherwise FALSE</span>
-<a name="l00158"></a>00158 <span class="comment"> */</span>
-<a name="l00159"></a>00159 BOOL
-<a name="l00160"></a>00160 bTranslatePNG(diagram_type *pDiag, FILE *pFile,
-<a name="l00161"></a>00161         ULONG ulFileOffset, <span class="keywordtype">size_t</span> tPictureLen, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00162"></a>00162 {
-<a name="l00163"></a>00163         <span class="keywordtype">size_t</span>  tMaxBytes, tDataLength, tSkipped;
-<a name="l00164"></a>00164 
-<a name="l00165"></a>00165 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00166"></a>00166 <span class="preprocessor"></span>        vCopy2File(pFile, ulFileOffset, tPictureLen);
-<a name="l00167"></a>00167 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00168"></a>00168 
-<a name="l00169"></a>00169         <span class="comment">/* Seek to start position of PNG data */</span>
-<a name="l00170"></a>00170         <span class="keywordflow">if</span> (!bSetDataOffset(pFile, ulFileOffset)) {
-<a name="l00171"></a>00171                 <span class="keywordflow">return</span> FALSE;
-<a name="l00172"></a>00172         }
-<a name="l00173"></a>00173 
-<a name="l00174"></a>00174         tMaxBytes = tPictureLen;
-<a name="l00175"></a>00175         tDataLength = tFindFirstPixelData(pFile, tMaxBytes, &amp;tSkipped);
-<a name="l00176"></a>00176         <span class="keywordflow">if</span> (tDataLength == (<span class="keywordtype">size_t</span>)-1) {
-<a name="l00177"></a>00177                 <span class="keywordflow">return</span> FALSE;
-<a name="l00178"></a>00178         }
-<a name="l00179"></a>00179 
-<a name="l00180"></a>00180         vImagePrologue(pDiag, pImg);
-<a name="l00181"></a>00181         <span class="keywordflow">do</span> {
-<a name="l00182"></a>00182                 tMaxBytes -= tSkipped;
-<a name="l00183"></a>00183                 vASCII85EncodeArray(pFile, pDiag-&gt;pOutFile, tDataLength);
-<a name="l00184"></a>00184                 tMaxBytes -= tDataLength;
-<a name="l00185"></a>00185                 tDataLength = tFindNextPixelData(pFile, tMaxBytes, &amp;tSkipped);
-<a name="l00186"></a>00186         } <span class="keywordflow">while</span> (tDataLength != (<span class="keywordtype">size_t</span>)-1);
-<a name="l00187"></a>00187         vASCII85EncodeByte(pDiag-&gt;pOutFile, EOF);
-<a name="l00188"></a>00188         vImageEpilogue(pDiag);
-<a name="l00189"></a>00189 
-<a name="l00190"></a>00190         <span class="keywordflow">return</span> TRUE;
-<a name="l00191"></a>00191 } <span class="comment">/* end of bTranslatePNG */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/png2sprt_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/png2sprt.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/png2sprt.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * png2sprt.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2000 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Functions to translate png pictures into sprites</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00011"></a>00011 
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 <span class="comment">/*</span>
-<a name="l00014"></a>00014 <span class="comment"> * bTranslatePNG - translate a PNG picture</span>
-<a name="l00015"></a>00015 <span class="comment"> *</span>
-<a name="l00016"></a>00016 <span class="comment"> * This function translates a picture from png to sprite</span>
-<a name="l00017"></a>00017 <span class="comment"> *</span>
-<a name="l00018"></a>00018 <span class="comment"> * return TRUE when sucessful, otherwise FALSE</span>
-<a name="l00019"></a>00019 <span class="comment"> */</span>
-<a name="l00020"></a>00020 <span class="preprocessor">#ifndef SYMBIAN</span>
-<a name="l00021"></a>00021 <span class="preprocessor"></span>BOOL
-<a name="l00022"></a>00022 bTranslatePNG(diagram_type *pDiag, FILE *pFile,
-<a name="l00023"></a>00023         ULONG ulFileOffset, <span class="keywordtype">size_t</span> tPictureLen, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00024"></a>00024 {
-<a name="l00025"></a>00025         <span class="comment">/* PNG is not supported yet */</span>
-<a name="l00026"></a>00026         <span class="keywordflow">return</span> bAddDummyImage(pDiag, pImg);
-<a name="l00027"></a>00027 } <span class="comment">/* end of bTranslatePNG */</span>
-<a name="l00028"></a>00028 <span class="preprocessor">#endif</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/postscript_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1187 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/postscript.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/postscript.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * postscript.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1999-2005 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Functions to deal with the PostScript format</span>
-<a name="l00007"></a>00007 <span class="comment"> *</span>
-<a name="l00008"></a>00008 <span class="comment"> *================================================================</span>
-<a name="l00009"></a>00009 <span class="comment"> * The function vImagePrologue is based on:</span>
-<a name="l00010"></a>00010 <span class="comment"> * jpeg2ps - convert JPEG compressed images to PostScript Level 2</span>
-<a name="l00011"></a>00011 <span class="comment"> * Copyright (C) 1994-99 Thomas Merz (tm@muc.de)</span>
-<a name="l00012"></a>00012 <span class="comment"> *================================================================</span>
-<a name="l00013"></a>00013 <span class="comment"> * The credit should go to him, but all the bugs are mine.</span>
-<a name="l00014"></a>00014 <span class="comment"> */</span>
-<a name="l00015"></a>00015 
-<a name="l00016"></a>00016 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;errno.h&gt;</span>
-<a name="l00018"></a>00018 <span class="preprocessor">#include &lt;time.h&gt;</span>
-<a name="l00019"></a>00019 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00020"></a>00020 <span class="preprocessor">#include &quot;version.h&quot;</span>
-<a name="l00021"></a>00021 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00022"></a>00022 
-<a name="l00023"></a>00023 <span class="comment">/* The character set */</span>
-<a name="l00024"></a>00024 <span class="keyword">static</span> encoding_type    eEncoding = encoding_neutral;
-<a name="l00025"></a>00025 <span class="comment">/* The image level */</span>
-<a name="l00026"></a>00026 <span class="keyword">static</span> image_level_enum eImageLevel = level_default;
-<a name="l00027"></a>00027 <span class="comment">/* The output must use landscape orientation */</span>
-<a name="l00028"></a>00028 <span class="keyword">static</span> BOOL             bUseLandscape = FALSE;
-<a name="l00029"></a>00029 <span class="comment">/* The height and width of a PostScript page (in DrawUnits) */</span>
-<a name="l00030"></a>00030 <span class="keyword">static</span> <span class="keywordtype">long</span>             lPageHeight = LONG_MAX;
-<a name="l00031"></a>00031 <span class="keyword">static</span> <span class="keywordtype">long</span>             lPageWidth = LONG_MAX;
-<a name="l00032"></a>00032 <span class="comment">/* The height of the footer on the current page (in DrawUnits) */</span>
-<a name="l00033"></a>00033 <span class="keyword">static</span> <span class="keywordtype">long</span>             lFooterHeight = 0;
-<a name="l00034"></a>00034 <span class="comment">/* Inside a footer (to prevent an infinite loop when the footer is too big) */</span>
-<a name="l00035"></a>00035 <span class="keyword">static</span> BOOL             bInFtrSpace = FALSE;
-<a name="l00036"></a>00036 <span class="comment">/* Current time for a PS header */</span>
-<a name="l00037"></a>00037 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>       *szCreationDate = NULL;
-<a name="l00038"></a>00038 <span class="comment">/* Current creator for a PS header */</span>
-<a name="l00039"></a>00039 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>       *szCreator = NULL;
-<a name="l00040"></a>00040 <span class="comment">/* Current font information */</span>
-<a name="l00041"></a>00041 <span class="keyword">static</span> drawfile_fontref tFontRefCurr = (drawfile_fontref)-1;
-<a name="l00042"></a>00042 <span class="keyword">static</span> USHORT           usFontSizeCurr = 0;
-<a name="l00043"></a>00043 <span class="keyword">static</span> <span class="keywordtype">int</span>              iFontColorCurr = -1;
-<a name="l00044"></a>00044 <span class="comment">/* Current vertical position information */</span>
-<a name="l00045"></a>00045 <span class="keyword">static</span> <span class="keywordtype">long</span>             lYtopCurr = -1;
-<a name="l00046"></a>00046 <span class="comment">/* PostScript page counter */</span>
-<a name="l00047"></a>00047 <span class="keyword">static</span> <span class="keywordtype">int</span>              iPageCount = 0;
-<a name="l00048"></a>00048 <span class="comment">/* Image counter */</span>
-<a name="l00049"></a>00049 <span class="keyword">static</span> <span class="keywordtype">int</span>              iImageCount = 0;
-<a name="l00050"></a>00050 <span class="comment">/* Section index */</span>
-<a name="l00051"></a>00051 <span class="keyword">static</span> <span class="keywordtype">int</span>              iSectionIndex = 0;
-<a name="l00052"></a>00052 <span class="comment">/* Are we on the first page of the section? */</span>
-<a name="l00053"></a>00053 <span class="keyword">static</span> BOOL             bFirstInSection = TRUE;
-<a name="l00054"></a>00054 
-<a name="l00055"></a>00055 <span class="keyword">static</span> <span class="keywordtype">void</span>             vMoveTo(diagram_type *, <span class="keywordtype">long</span>);
-<a name="l00056"></a>00056 
-<a name="l00057"></a>00057 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *iso_8859_1_data[] = {
-<a name="l00058"></a>00058 <span class="stringliteral">&quot;/newcodes      % ISO-8859-1 character encodings&quot;</span>,
-<a name="l00059"></a>00059 <span class="stringliteral">&quot;[&quot;</span>,
-<a name="l00060"></a>00060 <span class="stringliteral">&quot;140/ellipsis 141/trademark 142/perthousand 143/bullet&quot;</span>,
-<a name="l00061"></a>00061 <span class="stringliteral">&quot;144/quoteleft 145/quoteright 146/guilsinglleft 147/guilsinglright&quot;</span>,
-<a name="l00062"></a>00062 <span class="stringliteral">&quot;148/quotedblleft 149/quotedblright 150/quotedblbase 151/endash 152/emdash&quot;</span>,
-<a name="l00063"></a>00063 <span class="stringliteral">&quot;153/minus 154/OE 155/oe 156/dagger 157/daggerdbl 158/fi 159/fl&quot;</span>,
-<a name="l00064"></a>00064 <span class="stringliteral">&quot;160/space 161/exclamdown 162/cent 163/sterling 164/currency&quot;</span>,
-<a name="l00065"></a>00065 <span class="stringliteral">&quot;165/yen 166/brokenbar 167/section 168/dieresis 169/copyright&quot;</span>,
-<a name="l00066"></a>00066 <span class="stringliteral">&quot;170/ordfeminine 171/guillemotleft 172/logicalnot 173/hyphen 174/registered&quot;</span>,
-<a name="l00067"></a>00067 <span class="stringliteral">&quot;175/macron 176/degree 177/plusminus 178/twosuperior 179/threesuperior&quot;</span>,
-<a name="l00068"></a>00068 <span class="stringliteral">&quot;180/acute 181/mu 182/paragraph 183/periodcentered 184/cedilla&quot;</span>,
-<a name="l00069"></a>00069 <span class="stringliteral">&quot;185/onesuperior 186/ordmasculine 187/guillemotright 188/onequarter&quot;</span>,
-<a name="l00070"></a>00070 <span class="stringliteral">&quot;189/onehalf 190/threequarters 191/questiondown 192/Agrave 193/Aacute&quot;</span>,
-<a name="l00071"></a>00071 <span class="stringliteral">&quot;194/Acircumflex 195/Atilde 196/Adieresis 197/Aring 198/AE 199/Ccedilla&quot;</span>,
-<a name="l00072"></a>00072 <span class="stringliteral">&quot;200/Egrave 201/Eacute 202/Ecircumflex 203/Edieresis 204/Igrave 205/Iacute&quot;</span>,
-<a name="l00073"></a>00073 <span class="stringliteral">&quot;206/Icircumflex 207/Idieresis 208/Eth 209/Ntilde 210/Ograve 211/Oacute&quot;</span>,
-<a name="l00074"></a>00074 <span class="stringliteral">&quot;212/Ocircumflex 213/Otilde 214/Odieresis 215/multiply 216/Oslash&quot;</span>,
-<a name="l00075"></a>00075 <span class="stringliteral">&quot;217/Ugrave 218/Uacute 219/Ucircumflex 220/Udieresis 221/Yacute 222/Thorn&quot;</span>,
-<a name="l00076"></a>00076 <span class="stringliteral">&quot;223/germandbls 224/agrave 225/aacute 226/acircumflex 227/atilde&quot;</span>,
-<a name="l00077"></a>00077 <span class="stringliteral">&quot;228/adieresis 229/aring 230/ae 231/ccedilla 232/egrave 233/eacute&quot;</span>,
-<a name="l00078"></a>00078 <span class="stringliteral">&quot;234/ecircumflex 235/edieresis 236/igrave 237/iacute 238/icircumflex&quot;</span>,
-<a name="l00079"></a>00079 <span class="stringliteral">&quot;239/idieresis 240/eth 241/ntilde 242/ograve 243/oacute 244/ocircumflex&quot;</span>,
-<a name="l00080"></a>00080 <span class="stringliteral">&quot;245/otilde 246/odieresis 247/divide 248/oslash 249/ugrave 250/uacute&quot;</span>,
-<a name="l00081"></a>00081 <span class="stringliteral">&quot;251/ucircumflex 252/udieresis 253/yacute 254/thorn 255/ydieresis&quot;</span>,
-<a name="l00082"></a>00082 <span class="stringliteral">&quot;] bind def&quot;</span>,
-<a name="l00083"></a>00083 <span class="stringliteral">&quot;&quot;</span>,
-<a name="l00084"></a>00084 <span class="stringliteral">&quot;/reencdict 12 dict def&quot;</span>,
-<a name="l00085"></a>00085 <span class="stringliteral">&quot;&quot;</span>,
-<a name="l00086"></a>00086 };
-<a name="l00087"></a>00087 
-<a name="l00088"></a>00088 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *iso_8859_2_data[] = {
-<a name="l00089"></a>00089 <span class="stringliteral">&quot;/newcodes      % ISO-8859-2 character encodings&quot;</span>,
-<a name="l00090"></a>00090 <span class="stringliteral">&quot;[&quot;</span>,
-<a name="l00091"></a>00091 <span class="stringliteral">&quot;160/space 161/Aogonek 162/breve 163/Lslash 164/currency 165/Lcaron&quot;</span>,
-<a name="l00092"></a>00092 <span class="stringliteral">&quot;166/Sacute 167/section 168/dieresis 169/Scaron 170/Scommaaccent&quot;</span>,
-<a name="l00093"></a>00093 <span class="stringliteral">&quot;171/Tcaron 172/Zacute 173/hyphen 174/Zcaron 175/Zdotaccent 176/degree&quot;</span>,
-<a name="l00094"></a>00094 <span class="stringliteral">&quot;177/aogonek 178/ogonek 179/lslash 180/acute 181/lcaron 182/sacute&quot;</span>,
-<a name="l00095"></a>00095 <span class="stringliteral">&quot;183/caron 184/cedilla 185/scaron 186/scommaaccent 187/tcaron&quot;</span>,
-<a name="l00096"></a>00096 <span class="stringliteral">&quot;188/zacute 189/hungarumlaut 190/zcaron 191/zdotaccent 192/Racute&quot;</span>,
-<a name="l00097"></a>00097 <span class="stringliteral">&quot;193/Aacute 194/Acircumflex 195/Abreve 196/Adieresis 197/Lacute&quot;</span>,
-<a name="l00098"></a>00098 <span class="stringliteral">&quot;198/Cacute 199/Ccedilla 200/Ccaron 201/Eacute 202/Eogonek&quot;</span>,
-<a name="l00099"></a>00099 <span class="stringliteral">&quot;203/Edieresis 204/Ecaron 205/Iacute 206/Icircumflex 207/Dcaron&quot;</span>,
-<a name="l00100"></a>00100 <span class="stringliteral">&quot;208/Dcroat 209/Nacute 210/Ncaron 211/Oacute 212/Ocircumflex&quot;</span>,
-<a name="l00101"></a>00101 <span class="stringliteral">&quot;213/Ohungarumlaut 214/Odieresis 215/multiply 216/Rcaron 217/Uring&quot;</span>,
-<a name="l00102"></a>00102 <span class="stringliteral">&quot;218/Uacute 219/Uhungarumlaut 220/Udieresis 221/Yacute 222/Tcommaaccent&quot;</span>,
-<a name="l00103"></a>00103 <span class="stringliteral">&quot;223/germandbls 224/racute 225/aacute 226/acircumflex 227/abreve&quot;</span>,
-<a name="l00104"></a>00104 <span class="stringliteral">&quot;228/adieresis 229/lacute 230/cacute 231/ccedilla 232/ccaron 233/eacute&quot;</span>,
-<a name="l00105"></a>00105 <span class="stringliteral">&quot;234/eogonek 235/edieresis 236/ecaron 237/iacute 238/icircumflex&quot;</span>,
-<a name="l00106"></a>00106 <span class="stringliteral">&quot;239/dcaron 240/dcroat 241/nacute 242/ncaron 243/oacute 244/ocircumflex&quot;</span>,
-<a name="l00107"></a>00107 <span class="stringliteral">&quot;245/ohungarumlaut 246/odieresis 247/divide 248/rcaron 249/uring&quot;</span>,
-<a name="l00108"></a>00108 <span class="stringliteral">&quot;250/uacute 251/uhungarumlaut 252/udieresis 253/yacute 254/tcommaaccent&quot;</span>,
-<a name="l00109"></a>00109 <span class="stringliteral">&quot;255/dotaccent&quot;</span>,
-<a name="l00110"></a>00110 <span class="stringliteral">&quot;] bind def&quot;</span>,
-<a name="l00111"></a>00111 <span class="stringliteral">&quot;&quot;</span>,
-<a name="l00112"></a>00112 <span class="stringliteral">&quot;/reencdict 12 dict def&quot;</span>,
-<a name="l00113"></a>00113 <span class="stringliteral">&quot;&quot;</span>,
-<a name="l00114"></a>00114 };
-<a name="l00115"></a>00115 
-<a name="l00116"></a>00116 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *iso_8859_5_data[] = {
-<a name="l00117"></a>00117 <span class="stringliteral">&quot;/newcodes      % ISO-8859-5 character encodings&quot;</span>,
-<a name="l00118"></a>00118 <span class="stringliteral">&quot;[&quot;</span>,
-<a name="l00119"></a>00119 <span class="stringliteral">&quot;160/space     161/afii10023 162/afii10051 163/afii10052 164/afii10053&quot;</span>,
-<a name="l00120"></a>00120 <span class="stringliteral">&quot;165/afii10054 166/afii10055 167/afii10056 168/afii10057 169/afii10058&quot;</span>,
-<a name="l00121"></a>00121 <span class="stringliteral">&quot;170/afii10059 171/afii10060 172/afii10061 173/hyphen    174/afii10062&quot;</span>,
-<a name="l00122"></a>00122 <span class="stringliteral">&quot;175/afii10145 176/afii10017 177/afii10018 178/afii10019 179/afii10020&quot;</span>,
-<a name="l00123"></a>00123 <span class="stringliteral">&quot;180/afii10021 181/afii10022 182/afii10024 183/afii10025 184/afii10026&quot;</span>,
-<a name="l00124"></a>00124 <span class="stringliteral">&quot;185/afii10027 186/afii10028 187/afii10029 188/afii10030 189/afii10031&quot;</span>,
-<a name="l00125"></a>00125 <span class="stringliteral">&quot;190/afii10032 191/afii10033 192/afii10034 193/afii10035 194/afii10036&quot;</span>,
-<a name="l00126"></a>00126 <span class="stringliteral">&quot;195/afii10037 196/afii10038 197/afii10039 198/afii10040 199/afii10041&quot;</span>,
-<a name="l00127"></a>00127 <span class="stringliteral">&quot;200/afii10042 201/afii10043 202/afii10044 203/afii10045 204/afii10046&quot;</span>,
-<a name="l00128"></a>00128 <span class="stringliteral">&quot;205/afii10047 206/afii10048 207/afii10049 208/afii10065 209/afii10066&quot;</span>,
-<a name="l00129"></a>00129 <span class="stringliteral">&quot;210/afii10067 211/afii10068 212/afii10069 213/afii10070 214/afii10072&quot;</span>,
-<a name="l00130"></a>00130 <span class="stringliteral">&quot;215/afii10073 216/afii10074 217/afii10075 218/afii10076 219/afii10077&quot;</span>,
-<a name="l00131"></a>00131 <span class="stringliteral">&quot;220/afii10078 221/afii10079 222/afii10080 223/afii10081 224/afii10082&quot;</span>,
-<a name="l00132"></a>00132 <span class="stringliteral">&quot;225/afii10083 226/afii10084 227/afii10085 228/afii10086 229/afii10087&quot;</span>,
-<a name="l00133"></a>00133 <span class="stringliteral">&quot;230/afii10088 231/afii10089 232/afii10090 233/afii10091 234/afii10092&quot;</span>,
-<a name="l00134"></a>00134 <span class="stringliteral">&quot;235/afii10093 236/afii10094 237/afii10095 238/afii10096 239/afii10097&quot;</span>,
-<a name="l00135"></a>00135 <span class="stringliteral">&quot;240/afii61352 241/afii10071 242/afii10099 243/afii10100 244/afii10101&quot;</span>,
-<a name="l00136"></a>00136 <span class="stringliteral">&quot;245/afii10102 246/afii10103 247/afii10104 248/afii10105 249/afii10106&quot;</span>,
-<a name="l00137"></a>00137 <span class="stringliteral">&quot;250/afii10107 251/afii10108 252/afii10109 253/section   254/afii10110&quot;</span>,
-<a name="l00138"></a>00138 <span class="stringliteral">&quot;255/afii10193&quot;</span>,
-<a name="l00139"></a>00139 <span class="stringliteral">&quot;] bind def&quot;</span>,
-<a name="l00140"></a>00140 <span class="stringliteral">&quot;&quot;</span>,
-<a name="l00141"></a>00141 <span class="stringliteral">&quot;/reencdict 12 dict def&quot;</span>,
-<a name="l00142"></a>00142 <span class="stringliteral">&quot;&quot;</span>,
-<a name="l00143"></a>00143 };
-<a name="l00144"></a>00144 
-<a name="l00145"></a>00145 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *iso_8859_x_func[] = {
-<a name="l00146"></a>00146 <span class="stringliteral">&quot;% change fonts using ISO-8859-x characters&quot;</span>,
-<a name="l00147"></a>00147 <span class="stringliteral">&quot;/ChgFnt                % size psname natname =&gt; font&quot;</span>,
-<a name="l00148"></a>00148 <span class="stringliteral">&quot;{&quot;</span>,
-<a name="l00149"></a>00149 <span class="stringliteral">&quot;       dup FontDirectory exch known            % is re-encoded name known?&quot;</span>,
-<a name="l00150"></a>00150 <span class="stringliteral">&quot;       { exch pop }                            % yes, get rid of long name&quot;</span>,
-<a name="l00151"></a>00151 <span class="stringliteral">&quot;       { dup 3 1 roll ReEncode } ifelse        % no, re-encode it&quot;</span>,
-<a name="l00152"></a>00152 <span class="stringliteral">&quot;       findfont exch scalefont setfont&quot;</span>,
-<a name="l00153"></a>00153 <span class="stringliteral">&quot;} bind def&quot;</span>,
-<a name="l00154"></a>00154 <span class="stringliteral">&quot;&quot;</span>,
-<a name="l00155"></a>00155 <span class="stringliteral">&quot;/ReEncode&quot;</span>,
-<a name="l00156"></a>00156 <span class="stringliteral">&quot;{&quot;</span>,
-<a name="l00157"></a>00157 <span class="stringliteral">&quot;reencdict begin&quot;</span>,
-<a name="l00158"></a>00158 <span class="stringliteral">&quot;       /newname exch def&quot;</span>,
-<a name="l00159"></a>00159 <span class="stringliteral">&quot;       /basename exch def&quot;</span>,
-<a name="l00160"></a>00160 <span class="stringliteral">&quot;       /basedict basename findfont def&quot;</span>,
-<a name="l00161"></a>00161 <span class="stringliteral">&quot;       /newfont basedict maxlength dict def&quot;</span>,
-<a name="l00162"></a>00162 <span class="stringliteral">&quot;       basedict&quot;</span>,
-<a name="l00163"></a>00163 <span class="stringliteral">&quot;       { exch dup /FID ne&quot;</span>,
-<a name="l00164"></a>00164 <span class="stringliteral">&quot;               { dup /Encoding eq&quot;</span>,
-<a name="l00165"></a>00165 <span class="stringliteral">&quot;                       { exch dup length array copy newfont 3 1 roll put }&quot;</span>,
-<a name="l00166"></a>00166 <span class="stringliteral">&quot;                       { exch newfont 3 1 roll put } ifelse&quot;</span>,
-<a name="l00167"></a>00167 <span class="stringliteral">&quot;               }&quot;</span>,
-<a name="l00168"></a>00168 <span class="stringliteral">&quot;               { pop pop } ifelse&quot;</span>,
-<a name="l00169"></a>00169 <span class="stringliteral">&quot;       } forall&quot;</span>,
-<a name="l00170"></a>00170 <span class="stringliteral">&quot;       newfont /FontName newname put&quot;</span>,
-<a name="l00171"></a>00171 <span class="stringliteral">&quot;       newcodes aload pop newcodes length 2 idiv&quot;</span>,
-<a name="l00172"></a>00172 <span class="stringliteral">&quot;       { newfont /Encoding get 3 1 roll put } repeat&quot;</span>,
-<a name="l00173"></a>00173 <span class="stringliteral">&quot;       newname newfont definefont pop&quot;</span>,
-<a name="l00174"></a>00174 <span class="stringliteral">&quot;end&quot;</span>,
-<a name="l00175"></a>00175 <span class="stringliteral">&quot;} bind def&quot;</span>,
-<a name="l00176"></a>00176 <span class="stringliteral">&quot;&quot;</span>,
-<a name="l00177"></a>00177 };
-<a name="l00178"></a>00178 
-<a name="l00179"></a>00179 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *misc_func[] = {
-<a name="l00180"></a>00180 <span class="stringliteral">&quot;% draw a line and show the string&quot;</span>,
-<a name="l00181"></a>00181 <span class="stringliteral">&quot;/LineShow      % string linewidth movement&quot;</span>,
-<a name="l00182"></a>00182 <span class="stringliteral">&quot;{&quot;</span>,
-<a name="l00183"></a>00183 <span class="stringliteral">&quot;       gsave&quot;</span>,
-<a name="l00184"></a>00184 <span class="stringliteral">&quot;               0 exch rmoveto&quot;</span>,
-<a name="l00185"></a>00185 <span class="stringliteral">&quot;               setlinewidth&quot;</span>,
-<a name="l00186"></a>00186 <span class="stringliteral">&quot;               dup&quot;</span>,
-<a name="l00187"></a>00187 <span class="stringliteral">&quot;               stringwidth pop&quot;</span>,
-<a name="l00188"></a>00188 <span class="stringliteral">&quot;               0 rlineto stroke&quot;</span>,
-<a name="l00189"></a>00189 <span class="stringliteral">&quot;       grestore&quot;</span>,
-<a name="l00190"></a>00190 <span class="stringliteral">&quot;       show&quot;</span>,
-<a name="l00191"></a>00191 <span class="stringliteral">&quot;} bind def&quot;</span>,
-<a name="l00192"></a>00192 <span class="stringliteral">&quot;&quot;</span>,
-<a name="l00193"></a>00193 <span class="stringliteral">&quot;% begin an EPS file (level 2 and up)&quot;</span>,
-<a name="l00194"></a>00194 <span class="stringliteral">&quot;/BeginEPSF&quot;</span>,
-<a name="l00195"></a>00195 <span class="stringliteral">&quot;{&quot;</span>,
-<a name="l00196"></a>00196 <span class="stringliteral">&quot;       /b4_Inc_state save def&quot;</span>,
-<a name="l00197"></a>00197 <span class="stringliteral">&quot;       /dict_count countdictstack def&quot;</span>,
-<a name="l00198"></a>00198 <span class="stringliteral">&quot;       /op_count count 1 sub def&quot;</span>,
-<a name="l00199"></a>00199 <span class="stringliteral">&quot;       userdict begin&quot;</span>,
-<a name="l00200"></a>00200 <span class="stringliteral">&quot;               /showpage { } def&quot;</span>,
-<a name="l00201"></a>00201 <span class="stringliteral">&quot;               0 setgray 0 setlinecap&quot;</span>,
-<a name="l00202"></a>00202 <span class="stringliteral">&quot;               1 setlinewidth 0 setlinejoin&quot;</span>,
-<a name="l00203"></a>00203 <span class="stringliteral">&quot;               10 setmiterlimit [ ] 0 setdash newpath&quot;</span>,
-<a name="l00204"></a>00204 <span class="stringliteral">&quot;               false setstrokeadjust false setoverprint&quot;</span>,
-<a name="l00205"></a>00205 <span class="stringliteral">&quot;} bind def&quot;</span>,
-<a name="l00206"></a>00206 <span class="stringliteral">&quot;&quot;</span>,
-<a name="l00207"></a>00207 <span class="stringliteral">&quot;% end an EPS file&quot;</span>,
-<a name="l00208"></a>00208 <span class="stringliteral">&quot;/EndEPSF {&quot;</span>,
-<a name="l00209"></a>00209 <span class="stringliteral">&quot;       count op_count sub { pop } repeat&quot;</span>,
-<a name="l00210"></a>00210 <span class="stringliteral">&quot;       countdictstack dict_count sub { end } repeat&quot;</span>,
-<a name="l00211"></a>00211 <span class="stringliteral">&quot;       b4_Inc_state restore&quot;</span>,
-<a name="l00212"></a>00212 <span class="stringliteral">&quot;} bind def&quot;</span>,
-<a name="l00213"></a>00213 <span class="stringliteral">&quot;&quot;</span>,
-<a name="l00214"></a>00214 };
-<a name="l00215"></a>00215 
-<a name="l00216"></a>00216 
-<a name="l00217"></a>00217 <span class="comment">/*</span>
-<a name="l00218"></a>00218 <span class="comment"> * vAddPageSetup - add the page setup</span>
-<a name="l00219"></a>00219 <span class="comment"> */</span>
-<a name="l00220"></a>00220 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00221"></a>00221 vAddPageSetup(FILE *pOutFile)
-<a name="l00222"></a>00222 {
-<a name="l00223"></a>00223         <span class="keywordflow">if</span> (bUseLandscape) {
-<a name="l00224"></a>00224                 fprintf(pOutFile, <span class="stringliteral">&quot;%%%%BeginPageSetup\n&quot;</span>);
-<a name="l00225"></a>00225                 fprintf(pOutFile, <span class="stringliteral">&quot;90 rotate\n&quot;</span>);
-<a name="l00226"></a>00226                 fprintf(pOutFile, <span class="stringliteral">&quot;0.00 %.2f translate\n&quot;</span>,
-<a name="l00227"></a>00227                                         -dDrawUnits2Points(lPageHeight));
-<a name="l00228"></a>00228                 fprintf(pOutFile, <span class="stringliteral">&quot;%%%%EndPageSetup\n&quot;</span>);
-<a name="l00229"></a>00229         }
-<a name="l00230"></a>00230 } <span class="comment">/* end of vAddPageSetup */</span>
-<a name="l00231"></a>00231 
-<a name="l00232"></a>00232 <span class="comment">/*</span>
-<a name="l00233"></a>00233 <span class="comment"> * vAddHdrFtr - add a header or footer</span>
-<a name="l00234"></a>00234 <span class="comment"> */</span>
-<a name="l00235"></a>00235 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00236"></a>00236 vAddHdrFtr(diagram_type *pDiag, <span class="keyword">const</span> hdrftr_block_type *pHdrFtrInfo)
-<a name="l00237"></a>00237 {
-<a name="l00238"></a>00238         output_type     *pStart, *pPrev, *pNext;
-<a name="l00239"></a>00239 
-<a name="l00240"></a>00240         fail(pDiag == NULL);
-<a name="l00241"></a>00241         fail(pHdrFtrInfo == NULL);
-<a name="l00242"></a>00242 
-<a name="l00243"></a>00243         vStartOfParagraphPS(pDiag, 0);
-<a name="l00244"></a>00244         pStart = pHdrFtrInfo-&gt;pText;
-<a name="l00245"></a>00245         <span class="keywordflow">while</span> (pStart != NULL) {
-<a name="l00246"></a>00246                 pNext = pStart;
-<a name="l00247"></a>00247                 <span class="keywordflow">while</span> (pNext != NULL &amp;&amp;
-<a name="l00248"></a>00248                        (pNext-&gt;tNextFree != 1 ||
-<a name="l00249"></a>00249                         (pNext-&gt;szStorage[0] != PAR_END &amp;&amp;
-<a name="l00250"></a>00250                          pNext-&gt;szStorage[0] != HARD_RETURN))) {
-<a name="l00251"></a>00251                         pNext = pNext-&gt;pNext;
-<a name="l00252"></a>00252                 }
-<a name="l00253"></a>00253                 <span class="keywordflow">if</span> (pNext == NULL) {
-<a name="l00254"></a>00254                         <span class="keywordflow">if</span> (bOutputContainsText(pStart)) {
-<a name="l00255"></a>00255                                 vAlign2Window(pDiag, pStart,
-<a name="l00256"></a>00256                                         lChar2MilliPoints(DEFAULT_SCREEN_WIDTH),
-<a name="l00257"></a>00257                                         ALIGNMENT_LEFT);
-<a name="l00258"></a>00258                         } <span class="keywordflow">else</span> {
-<a name="l00259"></a>00259                                 vMove2NextLinePS(pDiag, pStart-&gt;usFontSize);
-<a name="l00260"></a>00260                         }
-<a name="l00261"></a>00261                         <span class="keywordflow">break</span>;
-<a name="l00262"></a>00262                 }
-<a name="l00263"></a>00263                 fail(pNext-&gt;tNextFree != 1);
-<a name="l00264"></a>00264                 fail(pNext-&gt;szStorage[0] != PAR_END &amp;&amp;
-<a name="l00265"></a>00265                         pNext-&gt;szStorage[0] != HARD_RETURN);
-<a name="l00266"></a>00266 
-<a name="l00267"></a>00267                 <span class="keywordflow">if</span> (pStart != pNext) {
-<a name="l00268"></a>00268                         <span class="comment">/* There is something to print */</span>
-<a name="l00269"></a>00269                         pPrev = pNext-&gt;pPrev;
-<a name="l00270"></a>00270                         fail(pPrev-&gt;pNext != pNext);
-<a name="l00271"></a>00271                         <span class="comment">/* Cut the chain */</span>
-<a name="l00272"></a>00272                         pPrev-&gt;pNext = NULL;
-<a name="l00273"></a>00273                         <span class="keywordflow">if</span> (bOutputContainsText(pStart)) {
-<a name="l00274"></a>00274                                 <span class="comment">/* Print it */</span>
-<a name="l00275"></a>00275                                 vAlign2Window(pDiag, pStart,
-<a name="l00276"></a>00276                                         lChar2MilliPoints(DEFAULT_SCREEN_WIDTH),
-<a name="l00277"></a>00277                                         ALIGNMENT_LEFT);
-<a name="l00278"></a>00278                         } <span class="keywordflow">else</span> {
-<a name="l00279"></a>00279                                 <span class="comment">/* Just an empty line */</span>
-<a name="l00280"></a>00280                                 vMove2NextLinePS(pDiag, pStart-&gt;usFontSize);
-<a name="l00281"></a>00281                         }
-<a name="l00282"></a>00282                         <span class="comment">/* Repair the chain */</span>
-<a name="l00283"></a>00283                         pPrev-&gt;pNext = pNext;
-<a name="l00284"></a>00284                 }
-<a name="l00285"></a>00285                 <span class="keywordflow">if</span> (pNext-&gt;szStorage[0] == PAR_END) {
-<a name="l00286"></a>00286                         vEndOfParagraphPS(pDiag, pNext-&gt;usFontSize,
-<a name="l00287"></a>00287                                         (<span class="keywordtype">long</span>)pNext-&gt;usFontSize * 200);
-<a name="l00288"></a>00288                 }
-<a name="l00289"></a>00289                 pStart = pNext-&gt;pNext;
-<a name="l00290"></a>00290         }
-<a name="l00291"></a>00291 } <span class="comment">/* end of vAddHdrFtr */</span>
-<a name="l00292"></a>00292 
-<a name="l00293"></a>00293 <span class="comment">/*</span>
-<a name="l00294"></a>00294 <span class="comment"> * vAddHeader - add a page header</span>
-<a name="l00295"></a>00295 <span class="comment"> */</span>
-<a name="l00296"></a>00296 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00297"></a>00297 vAddHeader(diagram_type *pDiag)
-<a name="l00298"></a>00298 {
-<a name="l00299"></a>00299         <span class="keyword">const</span> hdrftr_block_type *pHdrInfo;
-<a name="l00300"></a>00300         <span class="keyword">const</span> hdrftr_block_type *pFtrInfo;
-<a name="l00301"></a>00301 
-<a name="l00302"></a>00302         fail(pDiag == NULL);
-<a name="l00303"></a>00303 
-<a name="l00304"></a>00304         NO_DBG_MSG(<span class="stringliteral">&quot;vAddHeader&quot;</span>);
-<a name="l00305"></a>00305 
-<a name="l00306"></a>00306         pHdrInfo = pGetHdrFtrInfo(iSectionIndex, TRUE,
-<a name="l00307"></a>00307                                         odd(iPageCount), bFirstInSection);
-<a name="l00308"></a>00308         pFtrInfo = pGetHdrFtrInfo(iSectionIndex, FALSE,
-<a name="l00309"></a>00309                                         odd(iPageCount), bFirstInSection);
-<a name="l00310"></a>00310         <span class="comment">/* Set the height of the footer of this page */</span>
-<a name="l00311"></a>00311         lFooterHeight = pFtrInfo == NULL ? 0 : pFtrInfo-&gt;lHeight;
-<a name="l00312"></a>00312         fail(lFooterHeight &lt; 0);
-<a name="l00313"></a>00313 
-<a name="l00314"></a>00314         <span class="keywordflow">if</span> (pHdrInfo == NULL ||
-<a name="l00315"></a>00315             pHdrInfo-&gt;pText == NULL ||
-<a name="l00316"></a>00316             pHdrInfo-&gt;lHeight &lt;= 0) {
-<a name="l00317"></a>00317                 fail(pHdrInfo != NULL &amp;&amp; pHdrInfo-&gt;lHeight &lt; 0);
-<a name="l00318"></a>00318                 fail(pHdrInfo != NULL &amp;&amp;
-<a name="l00319"></a>00319                         pHdrInfo-&gt;pText != NULL &amp;&amp;
-<a name="l00320"></a>00320                         pHdrInfo-&gt;lHeight == 0);
-<a name="l00321"></a>00321                 <span class="keywordflow">return</span>;
-<a name="l00322"></a>00322         }
-<a name="l00323"></a>00323 
-<a name="l00324"></a>00324         vAddHdrFtr(pDiag, pHdrInfo);
-<a name="l00325"></a>00325 
-<a name="l00326"></a>00326         DBG_DEC_C(pHdrInfo-&gt;lHeight !=
-<a name="l00327"></a>00327                 lPageHeight - PS_TOP_MARGIN - pDiag-&gt;lYtop,
-<a name="l00328"></a>00328                 pHdrInfo-&gt;lHeight);
-<a name="l00329"></a>00329         DBG_DEC_C(pHdrInfo-&gt;lHeight !=
-<a name="l00330"></a>00330                 lPageHeight - PS_TOP_MARGIN - pDiag-&gt;lYtop,
-<a name="l00331"></a>00331                 lPageHeight - PS_TOP_MARGIN - pDiag-&gt;lYtop);
-<a name="l00332"></a>00332 
-<a name="l00333"></a>00333 <span class="preprocessor">#if 0 </span><span class="comment">/* defined(DEBUG) */</span>
-<a name="l00334"></a>00334         fprintf(pDiag-&gt;pOutFile,
-<a name="l00335"></a>00335         <span class="stringliteral">&quot;(HEADER: FileOffset 0x%04lx-0x%04lx; Height %ld-%ld) show\n&quot;</span>,
-<a name="l00336"></a>00336                 ulCharPos2FileOffset(pHdrInfo-&gt;ulCharPosStart),
-<a name="l00337"></a>00337                 ulCharPos2FileOffset(pHdrInfo-&gt;ulCharPosNext),
-<a name="l00338"></a>00338                 pHdrInfo-&gt;lHeight,
-<a name="l00339"></a>00339                 lPageHeight - PS_TOP_MARGIN - pDiag-&gt;lYtop);
-<a name="l00340"></a>00340 <span class="preprocessor">#endif</span>
-<a name="l00341"></a>00341 <span class="preprocessor"></span>} <span class="comment">/* end of vAddHeader */</span>
-<a name="l00342"></a>00342 
-<a name="l00343"></a>00343 <span class="comment">/*</span>
-<a name="l00344"></a>00344 <span class="comment"> * vAddFooter - add a page footer</span>
-<a name="l00345"></a>00345 <span class="comment"> */</span>
-<a name="l00346"></a>00346 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00347"></a>00347 vAddFooter(diagram_type *pDiag)
-<a name="l00348"></a>00348 {
-<a name="l00349"></a>00349         <span class="keyword">const</span> hdrftr_block_type *pFtrInfo;
-<a name="l00350"></a>00350 
-<a name="l00351"></a>00351         fail(pDiag == NULL);
-<a name="l00352"></a>00352 
-<a name="l00353"></a>00353         NO_DBG_MSG(<span class="stringliteral">&quot;vAddFooter&quot;</span>);
-<a name="l00354"></a>00354         pFtrInfo = pGetHdrFtrInfo(iSectionIndex, FALSE,
-<a name="l00355"></a>00355                                         odd(iPageCount), bFirstInSection);
-<a name="l00356"></a>00356         bFirstInSection = FALSE;
-<a name="l00357"></a>00357         <span class="keywordflow">if</span> (pFtrInfo == NULL ||
-<a name="l00358"></a>00358             pFtrInfo-&gt;pText == NULL ||
-<a name="l00359"></a>00359             pFtrInfo-&gt;lHeight &lt;= 0) {
-<a name="l00360"></a>00360                 fail(pFtrInfo != NULL &amp;&amp; pFtrInfo-&gt;lHeight &lt; 0);
-<a name="l00361"></a>00361                 fail(pFtrInfo != NULL &amp;&amp;
-<a name="l00362"></a>00362                         pFtrInfo-&gt;pText != NULL &amp;&amp;
-<a name="l00363"></a>00363                         pFtrInfo-&gt;lHeight == 0);
-<a name="l00364"></a>00364                 <span class="keywordflow">return</span>;
-<a name="l00365"></a>00365         }
-<a name="l00366"></a>00366 
-<a name="l00367"></a>00367         bInFtrSpace = TRUE;
-<a name="l00368"></a>00368 
-<a name="l00369"></a>00369         DBG_DEC_C(pFtrInfo-&gt;lHeight != lFooterHeight, pFtrInfo-&gt;lHeight);
-<a name="l00370"></a>00370         DBG_DEC_C(pFtrInfo-&gt;lHeight != lFooterHeight, lFooterHeight);
-<a name="l00371"></a>00371         DBG_DEC_C(pDiag-&gt;lYtop &lt; lFooterHeight + PS_BOTTOM_MARGIN,
-<a name="l00372"></a>00372                         pDiag-&gt;lYtop);
-<a name="l00373"></a>00373         DBG_DEC_C(pDiag-&gt;lYtop &lt; lFooterHeight + PS_BOTTOM_MARGIN,
-<a name="l00374"></a>00374                         lFooterHeight + PS_BOTTOM_MARGIN);
-<a name="l00375"></a>00375 
-<a name="l00376"></a>00376         <span class="keywordflow">if</span> (pDiag-&gt;lYtop &gt; lFooterHeight + PS_BOTTOM_MARGIN) {
-<a name="l00377"></a>00377                 <span class="comment">/* Move down to the start of the footer */</span>
-<a name="l00378"></a>00378                 pDiag-&gt;lYtop = lFooterHeight + PS_BOTTOM_MARGIN;
-<a name="l00379"></a>00379                 vMoveTo(pDiag, 0);
-<a name="l00380"></a>00380         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pDiag-&gt;lYtop &lt; lFooterHeight + PS_BOTTOM_MARGIN / 2) {
-<a name="l00381"></a>00381                 DBG_FIXME();
-<a name="l00382"></a>00382                 <span class="comment">/*</span>
-<a name="l00383"></a>00383 <span class="comment">                 * Move up to the start of the footer, to prevent moving</span>
-<a name="l00384"></a>00384 <span class="comment">                 * of the bottom edge of the paper</span>
-<a name="l00385"></a>00385 <span class="comment">                 */</span>
-<a name="l00386"></a>00386                 pDiag-&gt;lYtop = lFooterHeight + PS_BOTTOM_MARGIN;
-<a name="l00387"></a>00387                 vMoveTo(pDiag, 0);
-<a name="l00388"></a>00388         }
-<a name="l00389"></a>00389 
-<a name="l00390"></a>00390         DBG_FLT_C(pDiag-&gt;lYtop &lt; lFooterHeight + PS_BOTTOM_MARGIN,
-<a name="l00391"></a>00391         dDrawUnits2Points(lFooterHeight + PS_BOTTOM_MARGIN - pDiag-&gt;lYtop));
-<a name="l00392"></a>00392 
-<a name="l00393"></a>00393 <span class="preprocessor">#if 0 </span><span class="comment">/* defined(DEBUG) */</span>
-<a name="l00394"></a>00394         fprintf(pDiag-&gt;pOutFile,
-<a name="l00395"></a>00395         <span class="stringliteral">&quot;(FOOTER: FileOffset 0x%04lx-0x%04lx; Bottom %ld-%ld) show\n&quot;</span>,
-<a name="l00396"></a>00396                 ulCharPos2FileOffset(pFtrInfo-&gt;ulCharPosStart),
-<a name="l00397"></a>00397                 ulCharPos2FileOffset(pFtrInfo-&gt;ulCharPosNext),
-<a name="l00398"></a>00398                 pDiag-&gt;lYtop,
-<a name="l00399"></a>00399                 pFtrInfo-&gt;lHeight + PS_BOTTOM_MARGIN);
-<a name="l00400"></a>00400 <span class="preprocessor">#endif</span>
-<a name="l00401"></a>00401 <span class="preprocessor"></span>        vAddHdrFtr(pDiag, pFtrInfo);
-<a name="l00402"></a>00402         bInFtrSpace = FALSE;
-<a name="l00403"></a>00403 } <span class="comment">/* end of vAddFooter */</span>
-<a name="l00404"></a>00404 
-<a name="l00405"></a>00405 <span class="comment">/*</span>
-<a name="l00406"></a>00406 <span class="comment"> * vMove2NextPage - move to the start of the next page</span>
-<a name="l00407"></a>00407 <span class="comment"> */</span>
-<a name="l00408"></a>00408 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00409"></a>00409 vMove2NextPage(diagram_type *pDiag, BOOL bNewSection)
-<a name="l00410"></a>00410 {
-<a name="l00411"></a>00411         fail(pDiag == NULL);
-<a name="l00412"></a>00412 
-<a name="l00413"></a>00413         vAddFooter(pDiag);
-<a name="l00414"></a>00414         fprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;showpage\n&quot;</span>);
-<a name="l00415"></a>00415         iPageCount++;
-<a name="l00416"></a>00416         fprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;%%%%Page: %d %d\n&quot;</span>, iPageCount, iPageCount);
-<a name="l00417"></a>00417         <span class="keywordflow">if</span> (bNewSection) {
-<a name="l00418"></a>00418                 iSectionIndex++;
-<a name="l00419"></a>00419                 bFirstInSection = TRUE;
-<a name="l00420"></a>00420         }
-<a name="l00421"></a>00421         vAddPageSetup(pDiag-&gt;pOutFile);
-<a name="l00422"></a>00422         pDiag-&gt;lYtop = lPageHeight - PS_TOP_MARGIN;
-<a name="l00423"></a>00423         lYtopCurr = -1;
-<a name="l00424"></a>00424         vAddHeader(pDiag);
-<a name="l00425"></a>00425 } <span class="comment">/* end of vMove2NextPage */</span>
-<a name="l00426"></a>00426 
-<a name="l00427"></a>00427 <span class="comment">/*</span>
-<a name="l00428"></a>00428 <span class="comment"> * vMoveTo - move to the specified X,Y coordinates</span>
-<a name="l00429"></a>00429 <span class="comment"> *</span>
-<a name="l00430"></a>00430 <span class="comment"> * Move the current position of the specified diagram to its X,Y coordinates,</span>
-<a name="l00431"></a>00431 <span class="comment"> * start on a new page if needed</span>
-<a name="l00432"></a>00432 <span class="comment"> */</span>
-<a name="l00433"></a>00433 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00434"></a>00434 vMoveTo(diagram_type *pDiag, <span class="keywordtype">long</span> lLastVerticalMovement)
-<a name="l00435"></a>00435 {
-<a name="l00436"></a>00436         fail(pDiag == NULL);
-<a name="l00437"></a>00437         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00438"></a>00438 
-<a name="l00439"></a>00439         <span class="keywordflow">if</span> (pDiag-&gt;lYtop &lt;= lFooterHeight + PS_BOTTOM_MARGIN &amp;&amp; !bInFtrSpace) {
-<a name="l00440"></a>00440                 vMove2NextPage(pDiag, FALSE);
-<a name="l00441"></a>00441                 <span class="comment">/* Repeat the last vertical movement on the new page */</span>
-<a name="l00442"></a>00442                 pDiag-&gt;lYtop -= lLastVerticalMovement;
-<a name="l00443"></a>00443         }
-<a name="l00444"></a>00444 
-<a name="l00445"></a>00445         fail(pDiag-&gt;lYtop &lt; lFooterHeight + PS_BOTTOM_MARGIN &amp;&amp; !bInFtrSpace);
-<a name="l00446"></a>00446         DBG_DEC_C(pDiag-&gt;lYtop &lt; PS_BOTTOM_MARGIN, pDiag-&gt;lYtop);
-<a name="l00447"></a>00447         fail(pDiag-&gt;lYtop &lt; PS_BOTTOM_MARGIN / 3);
-<a name="l00448"></a>00448 
-<a name="l00449"></a>00449         <span class="keywordflow">if</span> (pDiag-&gt;lYtop != lYtopCurr) {
-<a name="l00450"></a>00450                 fprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;%.2f %.2f moveto\n&quot;</span>,
-<a name="l00451"></a>00451                         dDrawUnits2Points(pDiag-&gt;lXleft + PS_LEFT_MARGIN),
-<a name="l00452"></a>00452                         dDrawUnits2Points(pDiag-&gt;lYtop));
-<a name="l00453"></a>00453                 lYtopCurr = pDiag-&gt;lYtop;
-<a name="l00454"></a>00454         }
-<a name="l00455"></a>00455 } <span class="comment">/* end of vMoveTo */</span>
-<a name="l00456"></a>00456 
-<a name="l00457"></a>00457 <span class="comment">/*</span>
-<a name="l00458"></a>00458 <span class="comment"> * vProloguePS - set options and perform the PostScript initialization</span>
-<a name="l00459"></a>00459 <span class="comment"> */</span>
-<a name="l00460"></a>00460 <span class="keywordtype">void</span>
-<a name="l00461"></a>00461 vProloguePS(diagram_type *pDiag,
-<a name="l00462"></a>00462         <span class="keyword">const</span> <span class="keywordtype">char</span> *szTask, <span class="keyword">const</span> <span class="keywordtype">char</span> *szFilename,
-<a name="l00463"></a>00463         <span class="keyword">const</span> options_type *pOptions)
-<a name="l00464"></a>00464 {
-<a name="l00465"></a>00465         FILE    *pOutFile;
-<a name="l00466"></a>00466         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szTmp;
-<a name="l00467"></a>00467         time_t  tTime;
-<a name="l00468"></a>00468 
-<a name="l00469"></a>00469         fail(pDiag == NULL);
-<a name="l00470"></a>00470         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00471"></a>00471         fail(szTask == NULL || szTask[0] == <span class="charliteral">&#39;\0&#39;</span>);
-<a name="l00472"></a>00472         fail(pOptions == NULL);
-<a name="l00473"></a>00473 
-<a name="l00474"></a>00474         pOutFile = pDiag-&gt;pOutFile;
-<a name="l00475"></a>00475 
-<a name="l00476"></a>00476         bUseLandscape = pOptions-&gt;bUseLandscape;
-<a name="l00477"></a>00477         eEncoding = pOptions-&gt;eEncoding;
-<a name="l00478"></a>00478         eImageLevel = pOptions-&gt;eImageLevel;
-<a name="l00479"></a>00479 
-<a name="l00480"></a>00480         <span class="keywordflow">if</span> (pOptions-&gt;iPageHeight == INT_MAX) {
-<a name="l00481"></a>00481                 lPageHeight = LONG_MAX;
-<a name="l00482"></a>00482         } <span class="keywordflow">else</span> {
-<a name="l00483"></a>00483                 lPageHeight = lPoints2DrawUnits(pOptions-&gt;iPageHeight);
-<a name="l00484"></a>00484         }
-<a name="l00485"></a>00485         DBG_DEC(lPageHeight);
-<a name="l00486"></a>00486         <span class="keywordflow">if</span> (pOptions-&gt;iPageWidth == INT_MAX) {
-<a name="l00487"></a>00487                 lPageWidth = LONG_MAX;
-<a name="l00488"></a>00488         } <span class="keywordflow">else</span> {
-<a name="l00489"></a>00489                 lPageWidth = lPoints2DrawUnits(pOptions-&gt;iPageWidth);
-<a name="l00490"></a>00490         }
-<a name="l00491"></a>00491         DBG_DEC(lPageWidth);
-<a name="l00492"></a>00492         lFooterHeight = 0;
-<a name="l00493"></a>00493         bInFtrSpace = FALSE;
-<a name="l00494"></a>00494 
-<a name="l00495"></a>00495         tFontRefCurr = (drawfile_fontref)-1;
-<a name="l00496"></a>00496         usFontSizeCurr = 0;
-<a name="l00497"></a>00497         iFontColorCurr = -1;
-<a name="l00498"></a>00498         lYtopCurr = -1;
-<a name="l00499"></a>00499         iPageCount = 0;
-<a name="l00500"></a>00500         iImageCount = 0;
-<a name="l00501"></a>00501         iSectionIndex = 0;
-<a name="l00502"></a>00502         bFirstInSection = TRUE;
-<a name="l00503"></a>00503         pDiag-&gt;lXleft = 0;
-<a name="l00504"></a>00504         pDiag-&gt;lYtop = lPageHeight - PS_TOP_MARGIN;
-<a name="l00505"></a>00505 
-<a name="l00506"></a>00506         szCreator = szTask;
-<a name="l00507"></a>00507 
-<a name="l00508"></a>00508         fprintf(pOutFile, <span class="stringliteral">&quot;%%!PS-Adobe-2.0\n&quot;</span>);
-<a name="l00509"></a>00509         fprintf(pOutFile, <span class="stringliteral">&quot;%%%%Title: %s\n&quot;</span>, szBasename(szFilename));
-<a name="l00510"></a>00510         fprintf(pOutFile, <span class="stringliteral">&quot;%%%%Creator: %s %s\n&quot;</span>, szCreator, VERSIONSTRING);
-<a name="l00511"></a>00511         szTmp = getenv(<span class="stringliteral">&quot;LOGNAME&quot;</span>);
-<a name="l00512"></a>00512         <span class="keywordflow">if</span> (szTmp == NULL || szTmp[0] == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00513"></a>00513                 szTmp = getenv(<span class="stringliteral">&quot;USER&quot;</span>);
-<a name="l00514"></a>00514                 <span class="keywordflow">if</span> (szTmp == NULL || szTmp[0] == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00515"></a>00515                         szTmp = <span class="stringliteral">&quot;unknown&quot;</span>;
-<a name="l00516"></a>00516                 }
-<a name="l00517"></a>00517         }
-<a name="l00518"></a>00518         fprintf(pOutFile, <span class="stringliteral">&quot;%%%%For: %.50s\n&quot;</span>, szTmp);
-<a name="l00519"></a>00519         errno = 0;
-<a name="l00520"></a>00520         tTime = time(NULL);
-<a name="l00521"></a>00521         <span class="keywordflow">if</span> (tTime == (time_t)-1 &amp;&amp; errno != 0) {
-<a name="l00522"></a>00522                 szCreationDate = NULL;
-<a name="l00523"></a>00523         } <span class="keywordflow">else</span> {
-<a name="l00524"></a>00524                 szCreationDate = ctime(&amp;tTime);
-<a name="l00525"></a>00525         }
-<a name="l00526"></a>00526         <span class="keywordflow">if</span> (szCreationDate == NULL || szCreationDate[0] == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00527"></a>00527                 szCreationDate = <span class="stringliteral">&quot;unknown\n&quot;</span>;
-<a name="l00528"></a>00528         }
-<a name="l00529"></a>00529         fprintf(pOutFile, <span class="stringliteral">&quot;%%%%CreationDate: %s&quot;</span>, szCreationDate);
-<a name="l00530"></a>00530         <span class="keywordflow">if</span> (bUseLandscape) {
-<a name="l00531"></a>00531                 fprintf(pOutFile, <span class="stringliteral">&quot;%%%%Orientation: Landscape\n&quot;</span>);
-<a name="l00532"></a>00532                 fprintf(pOutFile, <span class="stringliteral">&quot;%%%%BoundingBox: 0 0 %.0f %.0f\n&quot;</span>,
-<a name="l00533"></a>00533                                 dDrawUnits2Points(lPageHeight),
-<a name="l00534"></a>00534                                 dDrawUnits2Points(lPageWidth));
-<a name="l00535"></a>00535         } <span class="keywordflow">else</span> {
-<a name="l00536"></a>00536                 fprintf(pOutFile, <span class="stringliteral">&quot;%%%%Orientation: Portrait\n&quot;</span>);
-<a name="l00537"></a>00537                 fprintf(pOutFile, <span class="stringliteral">&quot;%%%%BoundingBox: 0 0 %.0f %.0f\n&quot;</span>,
-<a name="l00538"></a>00538                                 dDrawUnits2Points(lPageWidth),
-<a name="l00539"></a>00539                                 dDrawUnits2Points(lPageHeight));
-<a name="l00540"></a>00540         }
-<a name="l00541"></a>00541 } <span class="comment">/* end of vProloguePS */</span>
-<a name="l00542"></a>00542 
-<a name="l00543"></a>00543 <span class="comment">/*</span>
-<a name="l00544"></a>00544 <span class="comment"> * vEpiloguePS - clean up after everything is done</span>
-<a name="l00545"></a>00545 <span class="comment"> */</span>
-<a name="l00546"></a>00546 <span class="keywordtype">void</span>
-<a name="l00547"></a>00547 vEpiloguePS(diagram_type *pDiag)
-<a name="l00548"></a>00548 {
-<a name="l00549"></a>00549         fail(pDiag == NULL);
-<a name="l00550"></a>00550         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00551"></a>00551 
-<a name="l00552"></a>00552         <span class="keywordflow">if</span> (pDiag-&gt;lYtop &lt; lPageHeight - PS_TOP_MARGIN) {
-<a name="l00553"></a>00553                 vAddFooter(pDiag);
-<a name="l00554"></a>00554                 fprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;showpage\n&quot;</span>);
-<a name="l00555"></a>00555         }
-<a name="l00556"></a>00556         fprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;%%%%Trailer\n&quot;</span>);
-<a name="l00557"></a>00557         fprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;%%%%Pages: %d\n&quot;</span>, iPageCount);
-<a name="l00558"></a>00558         fprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;%%%%EOF\n&quot;</span>);
-<a name="l00559"></a>00559         szCreationDate = NULL;
-<a name="l00560"></a>00560         szCreator = NULL;
-<a name="l00561"></a>00561 } <span class="comment">/* end of vEpiloguePS */</span>
-<a name="l00562"></a>00562 
-<a name="l00563"></a>00563 <span class="comment">/*</span>
-<a name="l00564"></a>00564 <span class="comment"> * vPrintPalette - print a postscript palette</span>
-<a name="l00565"></a>00565 <span class="comment"> */</span>
-<a name="l00566"></a>00566 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00567"></a>00567 vPrintPalette(FILE *pOutFile, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00568"></a>00568 {
-<a name="l00569"></a>00569         <span class="keywordtype">int</span>     iIndex;
-<a name="l00570"></a>00570 
-<a name="l00571"></a>00571         fail(pOutFile == NULL);
-<a name="l00572"></a>00572         fail(pImg == NULL);
-<a name="l00573"></a>00573         fail(pImg-&gt;iColorsUsed &lt; 2);
-<a name="l00574"></a>00574         fail(pImg-&gt;iColorsUsed &gt; 256);
-<a name="l00575"></a>00575 
-<a name="l00576"></a>00576         fprintf(pOutFile, <span class="stringliteral">&quot;[ /Indexed\n&quot;</span>);
-<a name="l00577"></a>00577         fprintf(pOutFile, <span class="stringliteral">&quot;\t/Device%s %d\n&quot;</span>,
-<a name="l00578"></a>00578                 pImg-&gt;bColorImage ? <span class="stringliteral">&quot;RGB&quot;</span> : <span class="stringliteral">&quot;Gray&quot;</span>, pImg-&gt;iColorsUsed - 1);
-<a name="l00579"></a>00579         fprintf(pOutFile, <span class="stringliteral">&quot;&lt;&quot;</span>);
-<a name="l00580"></a>00580         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; pImg-&gt;iColorsUsed; iIndex++) {
-<a name="l00581"></a>00581                 fprintf(pOutFile, <span class="stringliteral">&quot;%02x&quot;</span>,
-<a name="l00582"></a>00582                                 (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)pImg-&gt;aucPalette[iIndex][0]);
-<a name="l00583"></a>00583                 <span class="keywordflow">if</span> (pImg-&gt;bColorImage) {
-<a name="l00584"></a>00584                         fprintf(pOutFile, <span class="stringliteral">&quot;%02x%02x&quot;</span>,
-<a name="l00585"></a>00585                                 (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)pImg-&gt;aucPalette[iIndex][1],
-<a name="l00586"></a>00586                                 (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)pImg-&gt;aucPalette[iIndex][2]);
-<a name="l00587"></a>00587                 }
-<a name="l00588"></a>00588                 <span class="keywordflow">if</span> (iIndex % 8 == 7) {
-<a name="l00589"></a>00589                         fprintf(pOutFile, <span class="stringliteral">&quot;\n&quot;</span>);
-<a name="l00590"></a>00590                 } <span class="keywordflow">else</span> {
-<a name="l00591"></a>00591                         fprintf(pOutFile, <span class="stringliteral">&quot; &quot;</span>);
-<a name="l00592"></a>00592                 }
-<a name="l00593"></a>00593         }
-<a name="l00594"></a>00594         fprintf(pOutFile, <span class="stringliteral">&quot;&gt;\n&quot;</span>);
-<a name="l00595"></a>00595         fprintf(pOutFile, <span class="stringliteral">&quot;] setcolorspace\n&quot;</span>);
-<a name="l00596"></a>00596 } <span class="comment">/* end of vPrintPalette */</span>
-<a name="l00597"></a>00597 
-<a name="l00598"></a>00598 <span class="comment">/*</span>
-<a name="l00599"></a>00599 <span class="comment"> * vImageProloguePS - perform the Encapsulated PostScript initialization</span>
-<a name="l00600"></a>00600 <span class="comment"> */</span>
-<a name="l00601"></a>00601 <span class="keywordtype">void</span>
-<a name="l00602"></a>00602 vImageProloguePS(diagram_type *pDiag, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00603"></a>00603 {
-<a name="l00604"></a>00604         FILE    *pOutFile;
-<a name="l00605"></a>00605 
-<a name="l00606"></a>00606         fail(pDiag == NULL);
-<a name="l00607"></a>00607         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00608"></a>00608         fail(pImg == NULL);
-<a name="l00609"></a>00609 
-<a name="l00610"></a>00610         <span class="keywordflow">if</span> (pImg-&gt;iVerSizeScaled &lt;= 0 || pImg-&gt;iHorSizeScaled &lt;= 0) {
-<a name="l00611"></a>00611                 <span class="keywordflow">return</span>;
-<a name="l00612"></a>00612         }
-<a name="l00613"></a>00613 
-<a name="l00614"></a>00614         fail(szCreationDate == NULL);
-<a name="l00615"></a>00615         fail(szCreator == NULL);
-<a name="l00616"></a>00616         fail(eImageLevel == level_no_images);
-<a name="l00617"></a>00617 
-<a name="l00618"></a>00618         iImageCount++;
-<a name="l00619"></a>00619 
-<a name="l00620"></a>00620         DBG_DEC_C(pDiag-&gt;lXleft != 0, pDiag-&gt;lXleft);
-<a name="l00621"></a>00621 
-<a name="l00622"></a>00622         pDiag-&gt;lYtop -= lPoints2DrawUnits(pImg-&gt;iVerSizeScaled);
-<a name="l00623"></a>00623         vMoveTo(pDiag, lPoints2DrawUnits(pImg-&gt;iVerSizeScaled));
-<a name="l00624"></a>00624 
-<a name="l00625"></a>00625         pOutFile = pDiag-&gt;pOutFile;
-<a name="l00626"></a>00626 
-<a name="l00627"></a>00627         fprintf(pOutFile, <span class="stringliteral">&quot;BeginEPSF\n&quot;</span>);
-<a name="l00628"></a>00628         fprintf(pOutFile, <span class="stringliteral">&quot;%%%%BeginDocument: image%03d.eps\n&quot;</span>, iImageCount);
-<a name="l00629"></a>00629         fprintf(pOutFile, <span class="stringliteral">&quot;%%!PS-Adobe-2.0 EPSF-2.0\n&quot;</span>);
-<a name="l00630"></a>00630         fprintf(pOutFile, <span class="stringliteral">&quot;%%%%Creator: %s %s\n&quot;</span>, szCreator, VERSIONSTRING);
-<a name="l00631"></a>00631         fprintf(pOutFile, <span class="stringliteral">&quot;%%%%Title: Image %03d\n&quot;</span>, iImageCount);
-<a name="l00632"></a>00632         fprintf(pOutFile, <span class="stringliteral">&quot;%%%%CreationDate: %s&quot;</span>, szCreationDate);
-<a name="l00633"></a>00633         fprintf(pOutFile, <span class="stringliteral">&quot;%%%%BoundingBox: 0 0 %d %d\n&quot;</span>,
-<a name="l00634"></a>00634                                 pImg-&gt;iHorSizeScaled, pImg-&gt;iVerSizeScaled);
-<a name="l00635"></a>00635         fprintf(pOutFile, <span class="stringliteral">&quot;%%%%DocumentData: Clean7Bit\n&quot;</span>);
-<a name="l00636"></a>00636         fprintf(pOutFile, <span class="stringliteral">&quot;%%%%LanguageLevel: 2\n&quot;</span>);
-<a name="l00637"></a>00637         fprintf(pOutFile, <span class="stringliteral">&quot;%%%%EndComments\n&quot;</span>);
-<a name="l00638"></a>00638         fprintf(pOutFile, <span class="stringliteral">&quot;%%%%BeginProlog\n&quot;</span>);
-<a name="l00639"></a>00639         fprintf(pOutFile, <span class="stringliteral">&quot;%%%%EndProlog\n&quot;</span>);
-<a name="l00640"></a>00640         fprintf(pOutFile, <span class="stringliteral">&quot;%%%%Page: 1 1\n&quot;</span>);
-<a name="l00641"></a>00641 
-<a name="l00642"></a>00642         fprintf(pOutFile, <span class="stringliteral">&quot;save\n&quot;</span>);
-<a name="l00643"></a>00643 
-<a name="l00644"></a>00644         <span class="keywordflow">switch</span> (pImg-&gt;eImageType) {
-<a name="l00645"></a>00645         <span class="keywordflow">case</span> imagetype_is_jpeg:
-<a name="l00646"></a>00646                 fprintf(pOutFile, <span class="stringliteral">&quot;/Data1 currentfile &quot;</span>);
-<a name="l00647"></a>00647                 fprintf(pOutFile, <span class="stringliteral">&quot;/ASCII85Decode filter def\n&quot;</span>);
-<a name="l00648"></a>00648                 fprintf(pOutFile, <span class="stringliteral">&quot;/Data Data1 &lt;&lt; &quot;</span>);
-<a name="l00649"></a>00649                 fprintf(pOutFile, <span class="stringliteral">&quot;&gt;&gt; /DCTDecode filter def\n&quot;</span>);
-<a name="l00650"></a>00650                 <span class="keywordflow">switch</span> (pImg-&gt;iComponents) {
-<a name="l00651"></a>00651                 <span class="keywordflow">case</span> 1:
-<a name="l00652"></a>00652                         fprintf(pOutFile, <span class="stringliteral">&quot;/DeviceGray setcolorspace\n&quot;</span>);
-<a name="l00653"></a>00653                         <span class="keywordflow">break</span>;
-<a name="l00654"></a>00654                 <span class="keywordflow">case</span> 3:
-<a name="l00655"></a>00655                         fprintf(pOutFile, <span class="stringliteral">&quot;/DeviceRGB setcolorspace\n&quot;</span>);
-<a name="l00656"></a>00656                         <span class="keywordflow">break</span>;
-<a name="l00657"></a>00657                 <span class="keywordflow">case</span> 4:
-<a name="l00658"></a>00658                         fprintf(pOutFile, <span class="stringliteral">&quot;/DeviceCMYK setcolorspace\n&quot;</span>);
-<a name="l00659"></a>00659                         <span class="keywordflow">break</span>;
-<a name="l00660"></a>00660                 <span class="keywordflow">default</span>:
-<a name="l00661"></a>00661                         DBG_DEC(pImg-&gt;iComponents);
-<a name="l00662"></a>00662                         <span class="keywordflow">break</span>;
-<a name="l00663"></a>00663                 }
-<a name="l00664"></a>00664                 <span class="keywordflow">break</span>;
-<a name="l00665"></a>00665         <span class="keywordflow">case</span> imagetype_is_png:
-<a name="l00666"></a>00666                 <span class="keywordflow">if</span> (eImageLevel == level_gs_special) {
-<a name="l00667"></a>00667                         fprintf(pOutFile,
-<a name="l00668"></a>00668                         <span class="stringliteral">&quot;/Data2 currentfile /ASCII85Decode filter def\n&quot;</span>);
-<a name="l00669"></a>00669                         fprintf(pOutFile,
-<a name="l00670"></a>00670                         <span class="stringliteral">&quot;/Data1 Data2 &lt;&lt; &gt;&gt; /FlateDecode filter def\n&quot;</span>);
-<a name="l00671"></a>00671                         fprintf(pOutFile, <span class="stringliteral">&quot;/Data Data1 &lt;&lt;\n&quot;</span>);
-<a name="l00672"></a>00672                         fprintf(pOutFile, <span class="stringliteral">&quot;\t/Colors %d\n&quot;</span>, pImg-&gt;iComponents);
-<a name="l00673"></a>00673                         fprintf(pOutFile, <span class="stringliteral">&quot;\t/BitsPerComponent %u\n&quot;</span>,
-<a name="l00674"></a>00674                                                 pImg-&gt;uiBitsPerComponent);
-<a name="l00675"></a>00675                         fprintf(pOutFile, <span class="stringliteral">&quot;\t/Columns %d\n&quot;</span>, pImg-&gt;iWidth);
-<a name="l00676"></a>00676                         fprintf(pOutFile,
-<a name="l00677"></a>00677                                 <span class="stringliteral">&quot;&gt;&gt; /PNGPredictorDecode filter def\n&quot;</span>);
-<a name="l00678"></a>00678                 } <span class="keywordflow">else</span> {
-<a name="l00679"></a>00679                         fprintf(pOutFile,
-<a name="l00680"></a>00680                         <span class="stringliteral">&quot;/Data1 currentfile /ASCII85Decode filter def\n&quot;</span>);
-<a name="l00681"></a>00681                         fprintf(pOutFile,
-<a name="l00682"></a>00682                         <span class="stringliteral">&quot;/Data Data1 &lt;&lt; &gt;&gt; /FlateDecode filter def\n&quot;</span>);
-<a name="l00683"></a>00683                 }
-<a name="l00684"></a>00684                 <span class="keywordflow">if</span> (pImg-&gt;iComponents == 3 || pImg-&gt;iComponents == 4) {
-<a name="l00685"></a>00685                         fprintf(pOutFile, <span class="stringliteral">&quot;/DeviceRGB setcolorspace\n&quot;</span>);
-<a name="l00686"></a>00686                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pImg-&gt;iColorsUsed &gt; 0) {
-<a name="l00687"></a>00687                         vPrintPalette(pOutFile, pImg);
-<a name="l00688"></a>00688                 } <span class="keywordflow">else</span> {
-<a name="l00689"></a>00689                         fprintf(pOutFile, <span class="stringliteral">&quot;/DeviceGray setcolorspace\n&quot;</span>);
-<a name="l00690"></a>00690                 }
-<a name="l00691"></a>00691                 <span class="keywordflow">break</span>;
-<a name="l00692"></a>00692         <span class="keywordflow">case</span> imagetype_is_dib:
-<a name="l00693"></a>00693                 fprintf(pOutFile, <span class="stringliteral">&quot;/Data currentfile &quot;</span>);
-<a name="l00694"></a>00694                 fprintf(pOutFile, <span class="stringliteral">&quot;/ASCII85Decode filter def\n&quot;</span>);
-<a name="l00695"></a>00695                 <span class="keywordflow">if</span> (pImg-&gt;uiBitsPerComponent &lt;= 8) {
-<a name="l00696"></a>00696                         vPrintPalette(pOutFile, pImg);
-<a name="l00697"></a>00697                 } <span class="keywordflow">else</span> {
-<a name="l00698"></a>00698                         fprintf(pOutFile, <span class="stringliteral">&quot;/DeviceRGB setcolorspace\n&quot;</span>);
-<a name="l00699"></a>00699                 }
-<a name="l00700"></a>00700                 <span class="keywordflow">break</span>;
-<a name="l00701"></a>00701         <span class="keywordflow">default</span>:
-<a name="l00702"></a>00702                 fprintf(pOutFile, <span class="stringliteral">&quot;/Data currentfile &quot;</span>);
-<a name="l00703"></a>00703                 fprintf(pOutFile, <span class="stringliteral">&quot;/ASCIIHexDecode filter def\n&quot;</span>);
-<a name="l00704"></a>00704                 fprintf(pOutFile, <span class="stringliteral">&quot;/Device%s setcolorspace\n&quot;</span>,
-<a name="l00705"></a>00705                         pImg-&gt;bColorImage ? <span class="stringliteral">&quot;RGB&quot;</span> : <span class="stringliteral">&quot;Gray&quot;</span>);
-<a name="l00706"></a>00706                 <span class="keywordflow">break</span>;
-<a name="l00707"></a>00707         }
-<a name="l00708"></a>00708 
-<a name="l00709"></a>00709         <span class="comment">/* Translate to lower left corner of image */</span>
-<a name="l00710"></a>00710         fprintf(pOutFile, <span class="stringliteral">&quot;%.2f %.2f translate\n&quot;</span>,
-<a name="l00711"></a>00711                         dDrawUnits2Points(pDiag-&gt;lXleft + PS_LEFT_MARGIN),
-<a name="l00712"></a>00712                         dDrawUnits2Points(pDiag-&gt;lYtop));
-<a name="l00713"></a>00713 
-<a name="l00714"></a>00714         fprintf(pOutFile, <span class="stringliteral">&quot;%d %d scale\n&quot;</span>,
-<a name="l00715"></a>00715                                 pImg-&gt;iHorSizeScaled, pImg-&gt;iVerSizeScaled);
-<a name="l00716"></a>00716 
-<a name="l00717"></a>00717         fprintf(pOutFile, <span class="stringliteral">&quot;{ &lt;&lt;\n&quot;</span>);
-<a name="l00718"></a>00718         fprintf(pOutFile, <span class="stringliteral">&quot;\t/ImageType 1\n&quot;</span>);
-<a name="l00719"></a>00719         fprintf(pOutFile, <span class="stringliteral">&quot;\t/Width %d\n&quot;</span>, pImg-&gt;iWidth);
-<a name="l00720"></a>00720         fprintf(pOutFile, <span class="stringliteral">&quot;\t/Height %d\n&quot;</span>, pImg-&gt;iHeight);
-<a name="l00721"></a>00721         <span class="keywordflow">if</span> (pImg-&gt;eImageType == imagetype_is_dib) {
-<a name="l00722"></a>00722                 <span class="comment">/* Scanning from left to right and bottom to top */</span>
-<a name="l00723"></a>00723                 fprintf(pOutFile, <span class="stringliteral">&quot;\t/ImageMatrix [ %d 0 0 %d 0 0 ]\n&quot;</span>,
-<a name="l00724"></a>00724                         pImg-&gt;iWidth, pImg-&gt;iHeight);
-<a name="l00725"></a>00725         } <span class="keywordflow">else</span> {
-<a name="l00726"></a>00726                 <span class="comment">/* Scanning from left to right and top to bottom */</span>
-<a name="l00727"></a>00727                 fprintf(pOutFile, <span class="stringliteral">&quot;\t/ImageMatrix [ %d 0 0 %d 0 %d ]\n&quot;</span>,
-<a name="l00728"></a>00728                         pImg-&gt;iWidth, -pImg-&gt;iHeight, pImg-&gt;iHeight);
-<a name="l00729"></a>00729         }
-<a name="l00730"></a>00730         fprintf(pOutFile, <span class="stringliteral">&quot;\t/DataSource Data\n&quot;</span>);
-<a name="l00731"></a>00731 
-<a name="l00732"></a>00732         <span class="keywordflow">switch</span> (pImg-&gt;eImageType) {
-<a name="l00733"></a>00733         <span class="keywordflow">case</span> imagetype_is_jpeg:
-<a name="l00734"></a>00734                 fprintf(pOutFile, <span class="stringliteral">&quot;\t/BitsPerComponent 8\n&quot;</span>);
-<a name="l00735"></a>00735                 <span class="keywordflow">switch</span> (pImg-&gt;iComponents) {
-<a name="l00736"></a>00736                 <span class="keywordflow">case</span> 1:
-<a name="l00737"></a>00737                         fprintf(pOutFile, <span class="stringliteral">&quot;\t/Decode [0 1]\n&quot;</span>);
-<a name="l00738"></a>00738                         <span class="keywordflow">break</span>;
-<a name="l00739"></a>00739                 <span class="keywordflow">case</span> 3:
-<a name="l00740"></a>00740                         fprintf(pOutFile, <span class="stringliteral">&quot;\t/Decode [0 1 0 1 0 1]\n&quot;</span>);
-<a name="l00741"></a>00741                         <span class="keywordflow">break</span>;
-<a name="l00742"></a>00742                 <span class="keywordflow">case</span> 4:
-<a name="l00743"></a>00743                         <span class="keywordflow">if</span> (pImg-&gt;bAdobe) {
-<a name="l00744"></a>00744                                 <span class="comment">/*</span>
-<a name="l00745"></a>00745 <span class="comment">                                 * Adobe-conforming CMYK file</span>
-<a name="l00746"></a>00746 <span class="comment">                                 * applying workaround for color inversion</span>
-<a name="l00747"></a>00747 <span class="comment">                                 */</span>
-<a name="l00748"></a>00748                                 fprintf(pOutFile,
-<a name="l00749"></a>00749                                         <span class="stringliteral">&quot;\t/Decode [1 0 1 0 1 0 1 0]\n&quot;</span>);
-<a name="l00750"></a>00750                         } <span class="keywordflow">else</span> {
-<a name="l00751"></a>00751                                 fprintf(pOutFile,
-<a name="l00752"></a>00752                                         <span class="stringliteral">&quot;\t/Decode [0 1 0 1 0 1 0 1]\n&quot;</span>);
-<a name="l00753"></a>00753                         }
-<a name="l00754"></a>00754                         <span class="keywordflow">break</span>;
-<a name="l00755"></a>00755                 <span class="keywordflow">default</span>:
-<a name="l00756"></a>00756                         DBG_DEC(pImg-&gt;iComponents);
-<a name="l00757"></a>00757                         <span class="keywordflow">break</span>;
-<a name="l00758"></a>00758                 }
-<a name="l00759"></a>00759                 <span class="keywordflow">break</span>;
-<a name="l00760"></a>00760         <span class="keywordflow">case</span> imagetype_is_png:
-<a name="l00761"></a>00761                 <span class="keywordflow">if</span> (pImg-&gt;iComponents == 3) {
-<a name="l00762"></a>00762                         fprintf(pOutFile, <span class="stringliteral">&quot;\t/BitsPerComponent 8\n&quot;</span>);
-<a name="l00763"></a>00763                         fprintf(pOutFile, <span class="stringliteral">&quot;\t/Decode [0 1 0 1 0 1]\n&quot;</span>);
-<a name="l00764"></a>00764                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pImg-&gt;iColorsUsed &gt; 0) {
-<a name="l00765"></a>00765                         fail(pImg-&gt;uiBitsPerComponent &gt; 8);
-<a name="l00766"></a>00766                         fprintf(pOutFile, <span class="stringliteral">&quot;\t/BitsPerComponent %u\n&quot;</span>,
-<a name="l00767"></a>00767                                         pImg-&gt;uiBitsPerComponent);
-<a name="l00768"></a>00768                         fprintf(pOutFile, <span class="stringliteral">&quot;\t/Decode [0 %d]\n&quot;</span>,
-<a name="l00769"></a>00769                                         (1 &lt;&lt; pImg-&gt;uiBitsPerComponent) - 1);
-<a name="l00770"></a>00770                 } <span class="keywordflow">else</span> {
-<a name="l00771"></a>00771                         fprintf(pOutFile, <span class="stringliteral">&quot;\t/BitsPerComponent 8\n&quot;</span>);
-<a name="l00772"></a>00772                         fprintf(pOutFile, <span class="stringliteral">&quot;\t/Decode [0 1]\n&quot;</span>);
-<a name="l00773"></a>00773                 }
-<a name="l00774"></a>00774                 <span class="keywordflow">break</span>;
-<a name="l00775"></a>00775         <span class="keywordflow">case</span> imagetype_is_dib:
-<a name="l00776"></a>00776                 fprintf(pOutFile, <span class="stringliteral">&quot;\t/BitsPerComponent 8\n&quot;</span>);
-<a name="l00777"></a>00777                 <span class="keywordflow">if</span> (pImg-&gt;uiBitsPerComponent &lt;= 8) {
-<a name="l00778"></a>00778                         fprintf(pOutFile, <span class="stringliteral">&quot;\t/Decode [0 255]\n&quot;</span>);
-<a name="l00779"></a>00779                 } <span class="keywordflow">else</span> {
-<a name="l00780"></a>00780                         fprintf(pOutFile, <span class="stringliteral">&quot;\t/Decode [0 1 0 1 0 1]\n&quot;</span>);
-<a name="l00781"></a>00781                 }
-<a name="l00782"></a>00782                 <span class="keywordflow">break</span>;
-<a name="l00783"></a>00783         <span class="keywordflow">default</span>:
-<a name="l00784"></a>00784                 fprintf(pOutFile, <span class="stringliteral">&quot;\t/BitsPerComponent 8\n&quot;</span>);
-<a name="l00785"></a>00785                 <span class="keywordflow">if</span> (pImg-&gt;bColorImage) {
-<a name="l00786"></a>00786                         fprintf(pOutFile, <span class="stringliteral">&quot;\t/Decode [0 1 0 1 0 1]\n&quot;</span>);
-<a name="l00787"></a>00787                 } <span class="keywordflow">else</span> {
-<a name="l00788"></a>00788                         fprintf(pOutFile, <span class="stringliteral">&quot;\t/Decode [0 1]\n&quot;</span>);
-<a name="l00789"></a>00789                 }
-<a name="l00790"></a>00790                 <span class="keywordflow">break</span>;
-<a name="l00791"></a>00791         }
-<a name="l00792"></a>00792 
-<a name="l00793"></a>00793         fprintf(pOutFile, <span class="stringliteral">&quot;  &gt;&gt; image\n&quot;</span>);
-<a name="l00794"></a>00794         fprintf(pOutFile, <span class="stringliteral">&quot;  Data closefile\n&quot;</span>);
-<a name="l00795"></a>00795         fprintf(pOutFile, <span class="stringliteral">&quot;  showpage\n&quot;</span>);
-<a name="l00796"></a>00796         fprintf(pOutFile, <span class="stringliteral">&quot;  restore\n&quot;</span>);
-<a name="l00797"></a>00797         fprintf(pOutFile, <span class="stringliteral">&quot;} exec\n&quot;</span>);
-<a name="l00798"></a>00798 } <span class="comment">/* end of vImageProloguePS */</span>
-<a name="l00799"></a>00799 
-<a name="l00800"></a>00800 <span class="comment">/*</span>
-<a name="l00801"></a>00801 <span class="comment"> * vImageEpiloguePS - clean up after Encapsulated PostScript</span>
-<a name="l00802"></a>00802 <span class="comment"> */</span>
-<a name="l00803"></a>00803 <span class="keywordtype">void</span>
-<a name="l00804"></a>00804 vImageEpiloguePS(diagram_type *pDiag)
-<a name="l00805"></a>00805 {
-<a name="l00806"></a>00806         FILE    *pOutFile;
-<a name="l00807"></a>00807 
-<a name="l00808"></a>00808         fail(pDiag == NULL);
-<a name="l00809"></a>00809         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00810"></a>00810 
-<a name="l00811"></a>00811         pOutFile = pDiag-&gt;pOutFile;
-<a name="l00812"></a>00812 
-<a name="l00813"></a>00813         fprintf(pOutFile, <span class="stringliteral">&quot;%%%%EOF\n&quot;</span>);
-<a name="l00814"></a>00814         fprintf(pOutFile, <span class="stringliteral">&quot;%%%%EndDocument\n&quot;</span>);
-<a name="l00815"></a>00815         fprintf(pOutFile, <span class="stringliteral">&quot;EndEPSF\n&quot;</span>);
-<a name="l00816"></a>00816 
-<a name="l00817"></a>00817         pDiag-&gt;lXleft = 0;
-<a name="l00818"></a>00818 } <span class="comment">/* end of vImageEpiloguePS */</span>
-<a name="l00819"></a>00819 
-<a name="l00820"></a>00820 <span class="comment">/*</span>
-<a name="l00821"></a>00821 <span class="comment"> * bAddDummyImagePS - add a dummy image</span>
-<a name="l00822"></a>00822 <span class="comment"> *</span>
-<a name="l00823"></a>00823 <span class="comment"> * return TRUE when successful, otherwise FALSE</span>
-<a name="l00824"></a>00824 <span class="comment"> */</span>
-<a name="l00825"></a>00825 BOOL
-<a name="l00826"></a>00826 bAddDummyImagePS(diagram_type *pDiag, <span class="keyword">const</span> imagedata_type *pImg)
-<a name="l00827"></a>00827 {
-<a name="l00828"></a>00828         FILE    *pOutFile;
-<a name="l00829"></a>00829 
-<a name="l00830"></a>00830         fail(pDiag == NULL);
-<a name="l00831"></a>00831         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00832"></a>00832         fail(pImg == NULL);
-<a name="l00833"></a>00833 
-<a name="l00834"></a>00834         <span class="keywordflow">if</span> (pImg-&gt;iVerSizeScaled &lt;= 0 || pImg-&gt;iHorSizeScaled &lt;= 0) {
-<a name="l00835"></a>00835                 <span class="keywordflow">return</span> FALSE;
-<a name="l00836"></a>00836         }
-<a name="l00837"></a>00837 
-<a name="l00838"></a>00838         iImageCount++;
-<a name="l00839"></a>00839 
-<a name="l00840"></a>00840         DBG_DEC_C(pDiag-&gt;lXleft != 0, pDiag-&gt;lXleft);
-<a name="l00841"></a>00841 
-<a name="l00842"></a>00842         pDiag-&gt;lYtop -= lPoints2DrawUnits(pImg-&gt;iVerSizeScaled);
-<a name="l00843"></a>00843         vMoveTo(pDiag, lPoints2DrawUnits(pImg-&gt;iVerSizeScaled));
-<a name="l00844"></a>00844 
-<a name="l00845"></a>00845         pOutFile = pDiag-&gt;pOutFile;
-<a name="l00846"></a>00846 
-<a name="l00847"></a>00847         fprintf(pOutFile, <span class="stringliteral">&quot;gsave %% Image %03d\n&quot;</span>, iImageCount);
-<a name="l00848"></a>00848         fprintf(pOutFile, <span class="stringliteral">&quot;\tnewpath\n&quot;</span>);
-<a name="l00849"></a>00849         fprintf(pOutFile, <span class="stringliteral">&quot;\t%.2f %.2f moveto\n&quot;</span>,
-<a name="l00850"></a>00850                         dDrawUnits2Points(pDiag-&gt;lXleft + PS_LEFT_MARGIN),
-<a name="l00851"></a>00851                         dDrawUnits2Points(pDiag-&gt;lYtop));
-<a name="l00852"></a>00852         fprintf(pOutFile, <span class="stringliteral">&quot;\t1.0 setlinewidth\n&quot;</span>);
-<a name="l00853"></a>00853         fprintf(pOutFile, <span class="stringliteral">&quot;\t0.3 setgray\n&quot;</span>);
-<a name="l00854"></a>00854         fprintf(pOutFile, <span class="stringliteral">&quot;\t0 %d rlineto\n&quot;</span>, pImg-&gt;iVerSizeScaled);
-<a name="l00855"></a>00855         fprintf(pOutFile, <span class="stringliteral">&quot;\t%d 0 rlineto\n&quot;</span>, pImg-&gt;iHorSizeScaled);
-<a name="l00856"></a>00856         fprintf(pOutFile, <span class="stringliteral">&quot;\t0 %d rlineto\n&quot;</span>, -pImg-&gt;iVerSizeScaled);
-<a name="l00857"></a>00857         fprintf(pOutFile, <span class="stringliteral">&quot;\tclosepath\n&quot;</span>);
-<a name="l00858"></a>00858         fprintf(pOutFile, <span class="stringliteral">&quot;\tstroke\n&quot;</span>);
-<a name="l00859"></a>00859         fprintf(pOutFile, <span class="stringliteral">&quot;grestore\n&quot;</span>);
-<a name="l00860"></a>00860 
-<a name="l00861"></a>00861         pDiag-&gt;lXleft = 0;
-<a name="l00862"></a>00862 
-<a name="l00863"></a>00863         <span class="keywordflow">return</span> TRUE;
-<a name="l00864"></a>00864 } <span class="comment">/* end of bAddDummyImagePS */</span>
-<a name="l00865"></a>00865 
-<a name="l00866"></a>00866 <span class="comment">/*</span>
-<a name="l00867"></a>00867 <span class="comment"> * vAddFontsPS - add the list of fonts and complete the prologue</span>
-<a name="l00868"></a>00868 <span class="comment"> */</span>
-<a name="l00869"></a>00869 <span class="keywordtype">void</span>
-<a name="l00870"></a>00870 vAddFontsPS(diagram_type *pDiag)
-<a name="l00871"></a>00871 {
-<a name="l00872"></a>00872         FILE    *pOutFile;
-<a name="l00873"></a>00873         <span class="keyword">const</span> font_table_type *pTmp, *pTmp2;
-<a name="l00874"></a>00874         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00875"></a>00875         <span class="keywordtype">int</span>     iLineLen, iOurFontnameLen;
-<a name="l00876"></a>00876         BOOL    bFound;
-<a name="l00877"></a>00877 
-<a name="l00878"></a>00878         fail(pDiag == NULL);
-<a name="l00879"></a>00879         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00880"></a>00880 
-<a name="l00881"></a>00881         pOutFile = pDiag-&gt;pOutFile;
-<a name="l00882"></a>00882         iLineLen = fprintf(pOutFile, <span class="stringliteral">&quot;%%%%DocumentFonts:&quot;</span>);
-<a name="l00883"></a>00883 
-<a name="l00884"></a>00884         <span class="keywordflow">if</span> (tGetFontTableLength() == 0) {
-<a name="l00885"></a>00885                 iLineLen += fprintf(pOutFile, <span class="stringliteral">&quot; Courier&quot;</span>);
-<a name="l00886"></a>00886         } <span class="keywordflow">else</span> {
-<a name="l00887"></a>00887                 pTmp = NULL;
-<a name="l00888"></a>00888                 <span class="keywordflow">while</span> ((pTmp = pGetNextFontTableRecord(pTmp)) != NULL) {
-<a name="l00889"></a>00889                         <span class="comment">/* Print the document fonts */</span>
-<a name="l00890"></a>00890                         bFound = FALSE;
-<a name="l00891"></a>00891                         pTmp2 = NULL;
-<a name="l00892"></a>00892                         <span class="keywordflow">while</span> ((pTmp2 = pGetNextFontTableRecord(pTmp2))
-<a name="l00893"></a>00893                                         != NULL &amp;&amp; pTmp2 &lt; pTmp) {
-<a name="l00894"></a>00894                                 bFound = STREQ(pTmp2-&gt;szOurFontname,
-<a name="l00895"></a>00895                                                 pTmp-&gt;szOurFontname);
-<a name="l00896"></a>00896                                 <span class="keywordflow">if</span> (bFound) {
-<a name="l00897"></a>00897                                         <span class="keywordflow">break</span>;
-<a name="l00898"></a>00898                                 }
-<a name="l00899"></a>00899                         }
-<a name="l00900"></a>00900                         iOurFontnameLen = (int)strlen(pTmp-&gt;szOurFontname);
-<a name="l00901"></a>00901                         <span class="keywordflow">if</span> (bFound || iOurFontnameLen &lt;= 0) {
-<a name="l00902"></a>00902                                 <span class="keywordflow">continue</span>;
-<a name="l00903"></a>00903                         }
-<a name="l00904"></a>00904                         <span class="keywordflow">if</span> (iLineLen + iOurFontnameLen &gt; 76) {
-<a name="l00905"></a>00905                                 fprintf(pOutFile, <span class="stringliteral">&quot;\n%%%%+&quot;</span>);
-<a name="l00906"></a>00906                                 iLineLen = 3;
-<a name="l00907"></a>00907                         }
-<a name="l00908"></a>00908                         iLineLen += fprintf(pOutFile,
-<a name="l00909"></a>00909                                         <span class="stringliteral">&quot; %s&quot;</span>, pTmp-&gt;szOurFontname);
-<a name="l00910"></a>00910                 }
-<a name="l00911"></a>00911         }
-<a name="l00912"></a>00912         fprintf(pOutFile, <span class="stringliteral">&quot;\n&quot;</span>);
-<a name="l00913"></a>00913         fprintf(pOutFile, <span class="stringliteral">&quot;%%%%Pages: (atend)\n&quot;</span>);
-<a name="l00914"></a>00914         fprintf(pOutFile, <span class="stringliteral">&quot;%%%%EndComments\n&quot;</span>);
-<a name="l00915"></a>00915         fprintf(pOutFile, <span class="stringliteral">&quot;%%%%BeginProlog\n&quot;</span>);
-<a name="l00916"></a>00916 
-<a name="l00917"></a>00917         <span class="keywordflow">switch</span> (eEncoding) {
-<a name="l00918"></a>00918         <span class="keywordflow">case</span> encoding_latin_1:
-<a name="l00919"></a>00919                 <span class="keywordflow">for</span> (tIndex = 0;
-<a name="l00920"></a>00920                      tIndex &lt; elementsof(iso_8859_1_data);
-<a name="l00921"></a>00921                      tIndex++) {
-<a name="l00922"></a>00922                         fprintf(pOutFile, <span class="stringliteral">&quot;%s\n&quot;</span>, iso_8859_1_data[tIndex]);
-<a name="l00923"></a>00923                 }
-<a name="l00924"></a>00924                 fprintf(pOutFile, <span class="stringliteral">&quot;\n&quot;</span>);
-<a name="l00925"></a>00925                 <span class="keywordflow">for</span> (tIndex = 0;
-<a name="l00926"></a>00926                      tIndex &lt; elementsof(iso_8859_x_func);
-<a name="l00927"></a>00927                      tIndex++) {
-<a name="l00928"></a>00928                         fprintf(pOutFile, <span class="stringliteral">&quot;%s\n&quot;</span>, iso_8859_x_func[tIndex]);
-<a name="l00929"></a>00929                 }
-<a name="l00930"></a>00930                 <span class="keywordflow">break</span>;
-<a name="l00931"></a>00931         <span class="keywordflow">case</span> encoding_latin_2:
-<a name="l00932"></a>00932                 <span class="keywordflow">for</span> (tIndex = 0;
-<a name="l00933"></a>00933                      tIndex &lt; elementsof(iso_8859_2_data);
-<a name="l00934"></a>00934                      tIndex++) {
-<a name="l00935"></a>00935                         fprintf(pOutFile, <span class="stringliteral">&quot;%s\n&quot;</span>, iso_8859_2_data[tIndex]);
-<a name="l00936"></a>00936                 }
-<a name="l00937"></a>00937                 fprintf(pOutFile, <span class="stringliteral">&quot;\n&quot;</span>);
-<a name="l00938"></a>00938                 <span class="keywordflow">for</span> (tIndex = 0;
-<a name="l00939"></a>00939                      tIndex &lt; elementsof(iso_8859_x_func);
-<a name="l00940"></a>00940                      tIndex++) {
-<a name="l00941"></a>00941                         fprintf(pOutFile, <span class="stringliteral">&quot;%s\n&quot;</span>, iso_8859_x_func[tIndex]);
-<a name="l00942"></a>00942                 }
-<a name="l00943"></a>00943                 <span class="keywordflow">break</span>;
-<a name="l00944"></a>00944         <span class="keywordflow">case</span> encoding_cyrillic:
-<a name="l00945"></a>00945                 <span class="keywordflow">for</span> (tIndex = 0;
-<a name="l00946"></a>00946                      tIndex &lt; elementsof(iso_8859_5_data);
-<a name="l00947"></a>00947                      tIndex++) {
-<a name="l00948"></a>00948                         fprintf(pOutFile, <span class="stringliteral">&quot;%s\n&quot;</span>, iso_8859_5_data[tIndex]);
-<a name="l00949"></a>00949                 }
-<a name="l00950"></a>00950                 fprintf(pOutFile, <span class="stringliteral">&quot;\n&quot;</span>);
-<a name="l00951"></a>00951                 <span class="keywordflow">for</span> (tIndex = 0;
-<a name="l00952"></a>00952                      tIndex &lt; elementsof(iso_8859_x_func);
-<a name="l00953"></a>00953                      tIndex++) {
-<a name="l00954"></a>00954                         fprintf(pOutFile, <span class="stringliteral">&quot;%s\n&quot;</span>, iso_8859_x_func[tIndex]);
-<a name="l00955"></a>00955                 }
-<a name="l00956"></a>00956                 <span class="keywordflow">break</span>;
-<a name="l00957"></a>00957         <span class="keywordflow">case</span> encoding_utf_8:
-<a name="l00958"></a>00958                 werr(1,
-<a name="l00959"></a>00959                 <span class="stringliteral">&quot;The combination PostScript and UTF-8 is not supported&quot;</span>);
-<a name="l00960"></a>00960                 <span class="keywordflow">break</span>;
-<a name="l00961"></a>00961         <span class="keywordflow">default</span>:
-<a name="l00962"></a>00962                 DBG_DEC(eEncoding);
-<a name="l00963"></a>00963                 <span class="keywordflow">break</span>;
-<a name="l00964"></a>00964         }
-<a name="l00965"></a>00965 
-<a name="l00966"></a>00966         <span class="comment">/* The rest of the functions */</span>
-<a name="l00967"></a>00967         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; elementsof(misc_func); tIndex++) {
-<a name="l00968"></a>00968                 fprintf(pOutFile, <span class="stringliteral">&quot;%s\n&quot;</span>, misc_func[tIndex]);
-<a name="l00969"></a>00969         }
-<a name="l00970"></a>00970         fprintf(pOutFile, <span class="stringliteral">&quot;%%%%EndProlog\n&quot;</span>);
-<a name="l00971"></a>00971         iPageCount = 1;
-<a name="l00972"></a>00972         fprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;%%%%Page: %d %d\n&quot;</span>, iPageCount, iPageCount);
-<a name="l00973"></a>00973         vAddPageSetup(pDiag-&gt;pOutFile);
-<a name="l00974"></a>00974         vAddHeader(pDiag);
-<a name="l00975"></a>00975 } <span class="comment">/* end of vAddFontsPS */</span>
-<a name="l00976"></a>00976 
-<a name="l00977"></a>00977 <span class="comment">/*</span>
-<a name="l00978"></a>00978 <span class="comment"> * vPrintPS - print a PostScript string</span>
-<a name="l00979"></a>00979 <span class="comment"> */</span>
-<a name="l00980"></a>00980 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00981"></a>00981 vPrintPS(FILE *pFile, <span class="keyword">const</span> <span class="keywordtype">char</span> *szString, <span class="keywordtype">size_t</span> tStringLength,
-<a name="l00982"></a>00982                 USHORT usFontstyle)
-<a name="l00983"></a>00983 {
-<a name="l00984"></a>00984         <span class="keywordtype">double</span>          dSuperscriptMove, dSubscriptMove;
-<a name="l00985"></a>00985         <span class="keyword">const</span> UCHAR     *ucBytes;
-<a name="l00986"></a>00986         <span class="keywordtype">size_t</span>          tCount;
-<a name="l00987"></a>00987 
-<a name="l00988"></a>00988         fail(szString == NULL);
-<a name="l00989"></a>00989 
-<a name="l00990"></a>00990         <span class="keywordflow">if</span> (szString == NULL || szString[0] == <span class="charliteral">&#39;\0&#39;</span> || tStringLength == 0) {
-<a name="l00991"></a>00991                 <span class="keywordflow">return</span>;
-<a name="l00992"></a>00992         }
-<a name="l00993"></a>00993         DBG_DEC_C(usFontSizeCurr &lt; MIN_FONT_SIZE, usFontSizeCurr);
-<a name="l00994"></a>00994 
-<a name="l00995"></a>00995         dSuperscriptMove = 0.0;
-<a name="l00996"></a>00996         dSubscriptMove = 0.0;
-<a name="l00997"></a>00997 
-<a name="l00998"></a>00998         <span class="comment">/* Up for superscript */</span>
-<a name="l00999"></a>00999         <span class="keywordflow">if</span> (bIsSuperscript(usFontstyle) &amp;&amp; usFontSizeCurr != 0) {
-<a name="l01000"></a>01000                 dSuperscriptMove = (double)((usFontSizeCurr + 1) / 2) * 0.375;
-<a name="l01001"></a>01001                 fprintf(pFile, <span class="stringliteral">&quot;0 %.2f rmoveto\n&quot;</span>, dSuperscriptMove);
-<a name="l01002"></a>01002         }
-<a name="l01003"></a>01003 
-<a name="l01004"></a>01004         <span class="comment">/* Down for subscript */</span>
-<a name="l01005"></a>01005         <span class="keywordflow">if</span> (bIsSubscript(usFontstyle) &amp;&amp; usFontSizeCurr != 0) {
-<a name="l01006"></a>01006                 dSubscriptMove = (double)usFontSizeCurr * 0.125;
-<a name="l01007"></a>01007                 fprintf(pFile, <span class="stringliteral">&quot;0 %.2f rmoveto\n&quot;</span>, -dSubscriptMove);
-<a name="l01008"></a>01008         }
-<a name="l01009"></a>01009 
-<a name="l01010"></a>01010         <span class="comment">/* Generate and print the PostScript output */</span>
-<a name="l01011"></a>01011         ucBytes = (UCHAR *)szString;
-<a name="l01012"></a>01012         (void)putc(<span class="charliteral">&#39;(&#39;</span>, pFile);
-<a name="l01013"></a>01013         <span class="keywordflow">for</span> (tCount = 0; tCount &lt; tStringLength ; tCount++) {
-<a name="l01014"></a>01014                 <span class="keywordflow">switch</span> (ucBytes[tCount]) {
-<a name="l01015"></a>01015                 <span class="keywordflow">case</span> <span class="charliteral">&#39;(&#39;</span>:
-<a name="l01016"></a>01016                 <span class="keywordflow">case</span> <span class="charliteral">&#39;)&#39;</span>:
-<a name="l01017"></a>01017                 <span class="keywordflow">case</span> <span class="charliteral">&#39;\\&#39;</span>:
-<a name="l01018"></a>01018                         (void)putc(<span class="charliteral">&#39;\\&#39;</span>, pFile);
-<a name="l01019"></a>01019                         (void)putc(szString[tCount], pFile);
-<a name="l01020"></a>01020                         <span class="keywordflow">break</span>;
-<a name="l01021"></a>01021                 <span class="keywordflow">default</span>:
-<a name="l01022"></a>01022                         <span class="keywordflow">if</span> (ucBytes[tCount] &lt; 0x20 ||
-<a name="l01023"></a>01023                             (ucBytes[tCount] &gt;= 0x7f &amp;&amp;
-<a name="l01024"></a>01024                              ucBytes[tCount] &lt; 0x8c)) {
-<a name="l01025"></a>01025                                 DBG_HEX(ucBytes[tCount]);
-<a name="l01026"></a>01026                                 (void)putc(<span class="charliteral">&#39; &#39;</span>, pFile);
-<a name="l01027"></a>01027                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ucBytes[tCount] &gt;= 0x80) {
-<a name="l01028"></a>01028                                 fprintf(pFile, <span class="stringliteral">&quot;\\%03o&quot;</span>, (UINT)ucBytes[tCount]);
-<a name="l01029"></a>01029                         } <span class="keywordflow">else</span> {
-<a name="l01030"></a>01030                                 (void)putc(szString[tCount], pFile);
-<a name="l01031"></a>01031                         }
-<a name="l01032"></a>01032                         <span class="keywordflow">break</span>;
-<a name="l01033"></a>01033                 }
-<a name="l01034"></a>01034         }
-<a name="l01035"></a>01035         fprintf(pFile, <span class="stringliteral">&quot;) &quot;</span>);
-<a name="l01036"></a>01036         <span class="keywordflow">if</span> ((bIsStrike(usFontstyle) || bIsMarkDel(usFontstyle)) &amp;&amp;
-<a name="l01037"></a>01037                         usFontSizeCurr != 0) {
-<a name="l01038"></a>01038                 fprintf(pFile, <span class="stringliteral">&quot;%.2f %.2f LineShow\n&quot;</span>,
-<a name="l01039"></a>01039                         (<span class="keywordtype">double</span>)usFontSizeCurr * 0.02,
-<a name="l01040"></a>01040                         (<span class="keywordtype">double</span>)usFontSizeCurr * 0.12);
-<a name="l01041"></a>01041         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (bIsUnderline(usFontstyle) &amp;&amp; usFontSizeCurr != 0) {
-<a name="l01042"></a>01042                 fprintf(pFile, <span class="stringliteral">&quot;%.2f %.2f LineShow\n&quot;</span>,
-<a name="l01043"></a>01043                         (<span class="keywordtype">double</span>)usFontSizeCurr * 0.02,
-<a name="l01044"></a>01044                         (<span class="keywordtype">double</span>)usFontSizeCurr * -0.06);
-<a name="l01045"></a>01045         } <span class="keywordflow">else</span> {
-<a name="l01046"></a>01046                 fprintf(pFile, <span class="stringliteral">&quot;show\n&quot;</span>);
-<a name="l01047"></a>01047         }
-<a name="l01048"></a>01048 
-<a name="l01049"></a>01049         <span class="comment">/* Undo the superscript move */</span>
-<a name="l01050"></a>01050         <span class="keywordflow">if</span> (bIsSuperscript(usFontstyle) &amp;&amp; usFontSizeCurr != 0) {
-<a name="l01051"></a>01051                 fprintf(pFile, <span class="stringliteral">&quot;0 %.2f rmoveto\n&quot;</span>, -dSuperscriptMove);
-<a name="l01052"></a>01052         }
-<a name="l01053"></a>01053 
-<a name="l01054"></a>01054         <span class="comment">/* Undo the subscript move */</span>
-<a name="l01055"></a>01055         <span class="keywordflow">if</span> (bIsSubscript(usFontstyle) &amp;&amp; usFontSizeCurr != 0) {
-<a name="l01056"></a>01056                 fprintf(pFile, <span class="stringliteral">&quot;0 %.2f rmoveto\n&quot;</span>, dSubscriptMove);
-<a name="l01057"></a>01057         }
-<a name="l01058"></a>01058 } <span class="comment">/* end of vPrintPS */</span>
-<a name="l01059"></a>01059 
-<a name="l01060"></a>01060 <span class="comment">/*</span>
-<a name="l01061"></a>01061 <span class="comment"> * vSetColor - move to the specified color</span>
-<a name="l01062"></a>01062 <span class="comment"> */</span>
-<a name="l01063"></a>01063 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l01064"></a>01064 vSetColor(FILE *pFile, UCHAR ucFontColor)
-<a name="l01065"></a>01065 {
-<a name="l01066"></a>01066         ULONG   ulTmp, ulRed, ulGreen, ulBlue;
-<a name="l01067"></a>01067 
-<a name="l01068"></a>01068         ulTmp = ulColor2Color(ucFontColor);
-<a name="l01069"></a>01069         ulRed   = (ulTmp &amp; 0x0000ff00) &gt;&gt; 8;
-<a name="l01070"></a>01070         ulGreen = (ulTmp &amp; 0x00ff0000) &gt;&gt; 16;
-<a name="l01071"></a>01071         ulBlue  = (ulTmp &amp; 0xff000000) &gt;&gt; 24;
-<a name="l01072"></a>01072         fprintf(pFile, <span class="stringliteral">&quot;%.3f %.3f %.3f setrgbcolor\n&quot;</span>,
-<a name="l01073"></a>01073                                 ulRed / 255.0, ulGreen / 255.0, ulBlue / 255.0);
-<a name="l01074"></a>01074 } <span class="comment">/* end of vSetColor */</span>
-<a name="l01075"></a>01075 
-<a name="l01076"></a>01076 <span class="comment">/*</span>
-<a name="l01077"></a>01077 <span class="comment"> * vMove2NextLinePS - move to the next line</span>
-<a name="l01078"></a>01078 <span class="comment"> */</span>
-<a name="l01079"></a>01079 <span class="keywordtype">void</span>
-<a name="l01080"></a>01080 vMove2NextLinePS(diagram_type *pDiag, USHORT usFontSize)
-<a name="l01081"></a>01081 {
-<a name="l01082"></a>01082         fail(pDiag == NULL);
-<a name="l01083"></a>01083         fail(usFontSize &lt; MIN_FONT_SIZE || usFontSize &gt; MAX_FONT_SIZE);
-<a name="l01084"></a>01084 
-<a name="l01085"></a>01085         pDiag-&gt;lYtop -= lComputeLeading(usFontSize);
-<a name="l01086"></a>01086 } <span class="comment">/* end of vMove2NextLinePS */</span>
-<a name="l01087"></a>01087 
-<a name="l01088"></a>01088 <span class="comment">/*</span>
-<a name="l01089"></a>01089 <span class="comment"> * vSubstringPS - print a sub string</span>
-<a name="l01090"></a>01090 <span class="comment"> */</span>
-<a name="l01091"></a>01091 <span class="keywordtype">void</span>
-<a name="l01092"></a>01092 vSubstringPS(diagram_type *pDiag,
-<a name="l01093"></a>01093         <span class="keywordtype">char</span> *szString, <span class="keywordtype">size_t</span> tStringLength, <span class="keywordtype">long</span> lStringWidth,
-<a name="l01094"></a>01094         UCHAR ucFontColor, USHORT usFontstyle, drawfile_fontref tFontRef,
-<a name="l01095"></a>01095         USHORT usFontSize, USHORT usMaxFontSize)
-<a name="l01096"></a>01096 {
-<a name="l01097"></a>01097         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szOurFontname;
-<a name="l01098"></a>01098 
-<a name="l01099"></a>01099         fail(pDiag == NULL || szString == NULL);
-<a name="l01100"></a>01100         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l01101"></a>01101         fail(pDiag-&gt;lXleft &lt; 0);
-<a name="l01102"></a>01102         fail(tStringLength != strlen(szString));
-<a name="l01103"></a>01103         fail(usFontSize &lt; MIN_FONT_SIZE || usFontSize &gt; MAX_FONT_SIZE);
-<a name="l01104"></a>01104         fail(usMaxFontSize &lt; MIN_FONT_SIZE || usMaxFontSize &gt; MAX_FONT_SIZE);
-<a name="l01105"></a>01105         fail(usFontSize &gt; usMaxFontSize);
-<a name="l01106"></a>01106 
-<a name="l01107"></a>01107         <span class="keywordflow">if</span> (szString[0] == <span class="charliteral">&#39;\0&#39;</span> || tStringLength == 0) {
-<a name="l01108"></a>01108                 <span class="keywordflow">return</span>;
-<a name="l01109"></a>01109         }
-<a name="l01110"></a>01110 
-<a name="l01111"></a>01111         <span class="keywordflow">if</span> (tFontRef != tFontRefCurr || usFontSize != usFontSizeCurr) {
-<a name="l01112"></a>01112                 szOurFontname = szGetFontname(tFontRef);
-<a name="l01113"></a>01113                 fail(szOurFontname == NULL);
-<a name="l01114"></a>01114                 fprintf(pDiag-&gt;pOutFile,
-<a name="l01115"></a>01115                         <span class="stringliteral">&quot;%.1f /%s /%s-ISO-8859-x ChgFnt\n&quot;</span>,
-<a name="l01116"></a>01116                         (<span class="keywordtype">double</span>)usFontSize / 2.0,
-<a name="l01117"></a>01117                         szOurFontname, szOurFontname);
-<a name="l01118"></a>01118                 tFontRefCurr = tFontRef;
-<a name="l01119"></a>01119                 usFontSizeCurr = usFontSize;
-<a name="l01120"></a>01120         }
-<a name="l01121"></a>01121         <span class="keywordflow">if</span> ((<span class="keywordtype">int</span>)ucFontColor != iFontColorCurr) {
-<a name="l01122"></a>01122                 vSetColor(pDiag-&gt;pOutFile, ucFontColor);
-<a name="l01123"></a>01123                 iFontColorCurr = (int)ucFontColor;
-<a name="l01124"></a>01124         }
-<a name="l01125"></a>01125         vMoveTo(pDiag, lComputeLeading(usMaxFontSize));
-<a name="l01126"></a>01126         vPrintPS(pDiag-&gt;pOutFile, szString, tStringLength, usFontstyle);
-<a name="l01127"></a>01127         pDiag-&gt;lXleft += lStringWidth;
-<a name="l01128"></a>01128 } <span class="comment">/* end of vSubstringPS */</span>
-<a name="l01129"></a>01129 
-<a name="l01130"></a>01130 <span class="comment">/*</span>
-<a name="l01131"></a>01131 <span class="comment"> * Create an start of paragraph by moving the y-top mark</span>
-<a name="l01132"></a>01132 <span class="comment"> */</span>
-<a name="l01133"></a>01133 <span class="keywordtype">void</span>
-<a name="l01134"></a>01134 vStartOfParagraphPS(diagram_type *pDiag, <span class="keywordtype">long</span> lBeforeIndentation)
-<a name="l01135"></a>01135 {
-<a name="l01136"></a>01136         fail(pDiag == NULL);
-<a name="l01137"></a>01137         fail(lBeforeIndentation &lt; 0);
-<a name="l01138"></a>01138 
-<a name="l01139"></a>01139         pDiag-&gt;lXleft = 0;
-<a name="l01140"></a>01140         pDiag-&gt;lYtop -= lMilliPoints2DrawUnits(lBeforeIndentation);
-<a name="l01141"></a>01141 } <span class="comment">/* end of vStartOfParagraphPS */</span>
-<a name="l01142"></a>01142 
-<a name="l01143"></a>01143 <span class="comment">/*</span>
-<a name="l01144"></a>01144 <span class="comment"> * Create an end of paragraph by moving the y-top mark</span>
-<a name="l01145"></a>01145 <span class="comment"> */</span>
-<a name="l01146"></a>01146 <span class="keywordtype">void</span>
-<a name="l01147"></a>01147 vEndOfParagraphPS(diagram_type *pDiag,
-<a name="l01148"></a>01148         USHORT usFontSize, <span class="keywordtype">long</span> lAfterIndentation)
-<a name="l01149"></a>01149 {
-<a name="l01150"></a>01150         fail(pDiag == NULL);
-<a name="l01151"></a>01151         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l01152"></a>01152         fail(usFontSize &lt; MIN_FONT_SIZE || usFontSize &gt; MAX_FONT_SIZE);
-<a name="l01153"></a>01153         fail(lAfterIndentation &lt; 0);
-<a name="l01154"></a>01154 
-<a name="l01155"></a>01155         <span class="keywordflow">if</span> (pDiag-&gt;lXleft &gt; 0) {
-<a name="l01156"></a>01156                 <span class="comment">/* To the start of the line */</span>
-<a name="l01157"></a>01157                 vMove2NextLinePS(pDiag, usFontSize);
-<a name="l01158"></a>01158         }
-<a name="l01159"></a>01159 
-<a name="l01160"></a>01160         pDiag-&gt;lXleft = 0;
-<a name="l01161"></a>01161         pDiag-&gt;lYtop -= lMilliPoints2DrawUnits(lAfterIndentation);
-<a name="l01162"></a>01162 } <span class="comment">/* end of vEndOfParagraphPS */</span>
-<a name="l01163"></a>01163 
-<a name="l01164"></a>01164 <span class="comment">/*</span>
-<a name="l01165"></a>01165 <span class="comment"> * Create an end of page</span>
-<a name="l01166"></a>01166 <span class="comment"> */</span>
-<a name="l01167"></a>01167 <span class="keywordtype">void</span>
-<a name="l01168"></a>01168 vEndOfPagePS(diagram_type *pDiag, BOOL bNewSection)
-<a name="l01169"></a>01169 {
-<a name="l01170"></a>01170         vMove2NextPage(pDiag, bNewSection);
-<a name="l01171"></a>01171 } <span class="comment">/* end of vEndOfPagePS */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/prop0_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,505 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/prop0.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/prop0.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * prop0.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2002-2004 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Read the property information from a Word for DOS file</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;time.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 
-<a name="l00014"></a>00014 <span class="comment">/*</span>
-<a name="l00015"></a>00015 <span class="comment"> * tConvertDosDate - convert DOS date format</span>
-<a name="l00016"></a>00016 <span class="comment"> *</span>
-<a name="l00017"></a>00017 <span class="comment"> * returns Unix time_t or -1</span>
-<a name="l00018"></a>00018 <span class="comment"> */</span>
-<a name="l00019"></a>00019 <span class="keyword">static</span> time_t
-<a name="l00020"></a>00020 tConvertDosDate(<span class="keyword">const</span> <span class="keywordtype">char</span> *szDosDate)
-<a name="l00021"></a>00021 {
-<a name="l00022"></a>00022         <span class="keyword">struct </span>tm       tTime;
-<a name="l00023"></a>00023         <span class="keyword">const</span> <span class="keywordtype">char</span>      *pcTmp;
-<a name="l00024"></a>00024         time_t          tResult;
-<a name="l00025"></a>00025 
-<a name="l00026"></a>00026         memset(&amp;tTime, 0, <span class="keyword">sizeof</span>(tTime));
-<a name="l00027"></a>00027         pcTmp = szDosDate;
-<a name="l00028"></a>00028         <span class="comment">/* Get the month */</span>
-<a name="l00029"></a>00029         <span class="keywordflow">if</span> (!isdigit(*pcTmp)) {
-<a name="l00030"></a>00030                 <span class="keywordflow">return</span> (time_t)-1;
-<a name="l00031"></a>00031         }
-<a name="l00032"></a>00032         tTime.tm_mon = (int)(*pcTmp - <span class="charliteral">&#39;0&#39;</span>);
-<a name="l00033"></a>00033         pcTmp++;
-<a name="l00034"></a>00034         <span class="keywordflow">if</span> (isdigit(*pcTmp)) {
-<a name="l00035"></a>00035                 tTime.tm_mon *= 10;
-<a name="l00036"></a>00036                 tTime.tm_mon += (int)(*pcTmp - <span class="charliteral">&#39;0&#39;</span>);
-<a name="l00037"></a>00037                 pcTmp++;
-<a name="l00038"></a>00038         }
-<a name="l00039"></a>00039         <span class="comment">/* Get the first separater */</span>
-<a name="l00040"></a>00040         <span class="keywordflow">if</span> (isalnum(*pcTmp)) {
-<a name="l00041"></a>00041                 <span class="keywordflow">return</span> (time_t)-1;
-<a name="l00042"></a>00042         }
-<a name="l00043"></a>00043         pcTmp++;
-<a name="l00044"></a>00044         <span class="comment">/* Get the day */</span>
-<a name="l00045"></a>00045         <span class="keywordflow">if</span> (!isdigit(*pcTmp)) {
-<a name="l00046"></a>00046                 <span class="keywordflow">return</span> (time_t)-1;
-<a name="l00047"></a>00047         }
-<a name="l00048"></a>00048         tTime.tm_mday = (int)(*pcTmp - <span class="charliteral">&#39;0&#39;</span>);
-<a name="l00049"></a>00049         pcTmp++;
-<a name="l00050"></a>00050         <span class="keywordflow">if</span> (isdigit(*pcTmp)) {
-<a name="l00051"></a>00051                 tTime.tm_mday *= 10;
-<a name="l00052"></a>00052                 tTime.tm_mday += (int)(*pcTmp - <span class="charliteral">&#39;0&#39;</span>);
-<a name="l00053"></a>00053                 pcTmp++;
-<a name="l00054"></a>00054         }
-<a name="l00055"></a>00055         <span class="comment">/* Get the second separater */</span>
-<a name="l00056"></a>00056         <span class="keywordflow">if</span> (isalnum(*pcTmp)) {
-<a name="l00057"></a>00057                 <span class="keywordflow">return</span> (time_t)-1;
-<a name="l00058"></a>00058         }
-<a name="l00059"></a>00059         pcTmp++;
-<a name="l00060"></a>00060         <span class="comment">/* Get the year */</span>
-<a name="l00061"></a>00061         <span class="keywordflow">if</span> (!isdigit(*pcTmp)) {
-<a name="l00062"></a>00062                 <span class="keywordflow">return</span> (time_t)-1;
-<a name="l00063"></a>00063         }
-<a name="l00064"></a>00064         tTime.tm_year = (int)(*pcTmp - <span class="charliteral">&#39;0&#39;</span>);
-<a name="l00065"></a>00065         pcTmp++;
-<a name="l00066"></a>00066         <span class="keywordflow">if</span> (isdigit(*pcTmp)) {
-<a name="l00067"></a>00067                 tTime.tm_year *= 10;
-<a name="l00068"></a>00068                 tTime.tm_year += (int)(*pcTmp - <span class="charliteral">&#39;0&#39;</span>);
-<a name="l00069"></a>00069                 pcTmp++;
-<a name="l00070"></a>00070         }
-<a name="l00071"></a>00071         <span class="comment">/* Check the values */</span>
-<a name="l00072"></a>00072         <span class="keywordflow">if</span> (tTime.tm_mon == 0 || tTime.tm_mday == 0 || tTime.tm_mday &gt; 31) {
-<a name="l00073"></a>00073                 <span class="keywordflow">return</span> (time_t)-1;
-<a name="l00074"></a>00074         }
-<a name="l00075"></a>00075         <span class="comment">/* Correct the values */</span>
-<a name="l00076"></a>00076         tTime.tm_mon--;         <span class="comment">/* From 01-12 to 00-11 */</span>
-<a name="l00077"></a>00077         <span class="keywordflow">if</span> (tTime.tm_year &lt; 80) {
-<a name="l00078"></a>00078                 tTime.tm_year += 100;   <span class="comment">/* 00 means 2000 is 100 */</span>
-<a name="l00079"></a>00079         }
-<a name="l00080"></a>00080         tTime.tm_isdst = -1;
-<a name="l00081"></a>00081         tResult = mktime(&amp;tTime);
-<a name="l00082"></a>00082         NO_DBG_MSG(ctime(&amp;tResult));
-<a name="l00083"></a>00083         <span class="keywordflow">return</span> tResult;
-<a name="l00084"></a>00084 } <span class="comment">/* end of tConvertDosDate */</span>
-<a name="l00085"></a>00085 
-<a name="l00086"></a>00086 <span class="comment">/*</span>
-<a name="l00087"></a>00087 <span class="comment"> * Build the lists with Document Property Information for Word for DOS files</span>
-<a name="l00088"></a>00088 <span class="comment"> */</span>
-<a name="l00089"></a>00089 <span class="keywordtype">void</span>
-<a name="l00090"></a>00090 vGet0DopInfo(FILE *pFile, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00091"></a>00091 {
-<a name="l00092"></a>00092         document_block_type     tDocument;
-<a name="l00093"></a>00093         UCHAR   *aucBuffer;
-<a name="l00094"></a>00094         ULONG   ulBeginSumdInfo, ulBeginNextBlock;
-<a name="l00095"></a>00095         <span class="keywordtype">size_t</span>  tLen;
-<a name="l00096"></a>00096         USHORT  usOffset;
-<a name="l00097"></a>00097 
-<a name="l00098"></a>00098         tDocument.ucHdrFtrSpecification = 0;
-<a name="l00099"></a>00099         tDocument.usDefaultTabWidth = usGetWord(0x70, aucHeader); <span class="comment">/* dxaTab */</span>
-<a name="l00100"></a>00100         tDocument.tCreateDate = (time_t)-1;
-<a name="l00101"></a>00101         tDocument.tRevisedDate = (time_t)-1;
-<a name="l00102"></a>00102 
-<a name="l00103"></a>00103         ulBeginSumdInfo = 128 * (ULONG)usGetWord(0x1c, aucHeader);
-<a name="l00104"></a>00104         DBG_HEX(ulBeginSumdInfo);
-<a name="l00105"></a>00105         ulBeginNextBlock = 128 * (ULONG)usGetWord(0x6a, aucHeader);
-<a name="l00106"></a>00106         DBG_HEX(ulBeginNextBlock);
-<a name="l00107"></a>00107 
-<a name="l00108"></a>00108         <span class="keywordflow">if</span> (ulBeginSumdInfo &lt; ulBeginNextBlock &amp;&amp; ulBeginNextBlock != 0) {
-<a name="l00109"></a>00109                 <span class="comment">/* There is a summary information block */</span>
-<a name="l00110"></a>00110                 tLen = (size_t)(ulBeginNextBlock - ulBeginSumdInfo);
-<a name="l00111"></a>00111                 aucBuffer = xmalloc(tLen);
-<a name="l00112"></a>00112                 <span class="comment">/* Read the summary information block */</span>
-<a name="l00113"></a>00113                 <span class="keywordflow">if</span> (bReadBytes(aucBuffer, tLen, ulBeginSumdInfo, pFile)) {
-<a name="l00114"></a>00114                         usOffset = usGetWord(12, aucBuffer);
-<a name="l00115"></a>00115                         <span class="keywordflow">if</span> (aucBuffer[usOffset] != 0) {
-<a name="l00116"></a>00116                                 NO_DBG_STRN(aucBuffer + usOffset, 8);
-<a name="l00117"></a>00117                                 tDocument.tRevisedDate =
-<a name="l00118"></a>00118                                 tConvertDosDate((<span class="keywordtype">char</span> *)aucBuffer + usOffset);
-<a name="l00119"></a>00119                         }
-<a name="l00120"></a>00120                         usOffset = usGetWord(14, aucBuffer);
-<a name="l00121"></a>00121                         <span class="keywordflow">if</span> (aucBuffer[usOffset] != 0) {
-<a name="l00122"></a>00122                                 NO_DBG_STRN(aucBuffer + usOffset, 8);
-<a name="l00123"></a>00123                                 tDocument.tCreateDate =
-<a name="l00124"></a>00124                                 tConvertDosDate((<span class="keywordtype">char</span> *)aucBuffer + usOffset);
-<a name="l00125"></a>00125                         }
-<a name="l00126"></a>00126                 }
-<a name="l00127"></a>00127                 aucBuffer = xfree(aucBuffer);
-<a name="l00128"></a>00128         }
-<a name="l00129"></a>00129         vCreateDocumentInfoList(&amp;tDocument);
-<a name="l00130"></a>00130 } <span class="comment">/* end of vGet0DopInfo */</span>
-<a name="l00131"></a>00131 
-<a name="l00132"></a>00132 <span class="comment">/*</span>
-<a name="l00133"></a>00133 <span class="comment"> * Fill the section information block with information</span>
-<a name="l00134"></a>00134 <span class="comment"> * from a Word for DOS file.</span>
-<a name="l00135"></a>00135 <span class="comment"> */</span>
-<a name="l00136"></a>00136 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00137"></a>00137 vGet0SectionInfo(<span class="keyword">const</span> UCHAR *aucGrpprl, <span class="keywordtype">size_t</span> tBytes,
-<a name="l00138"></a>00138                 section_block_type *pSection)
-<a name="l00139"></a>00139 {
-<a name="l00140"></a>00140         USHORT  usCcol;
-<a name="l00141"></a>00141         UCHAR   ucTmp;
-<a name="l00142"></a>00142 
-<a name="l00143"></a>00143         fail(aucGrpprl == NULL || pSection == NULL);
-<a name="l00144"></a>00144 
-<a name="l00145"></a>00145         <span class="keywordflow">if</span> (tBytes &lt; 2) {
-<a name="l00146"></a>00146                 <span class="keywordflow">return</span>;
-<a name="l00147"></a>00147         }
-<a name="l00148"></a>00148         <span class="comment">/* bkc */</span>
-<a name="l00149"></a>00149         ucTmp = ucGetByte(1, aucGrpprl);
-<a name="l00150"></a>00150         DBG_HEX(ucTmp);
-<a name="l00151"></a>00151         ucTmp &amp;= 0x07;
-<a name="l00152"></a>00152         DBG_HEX(ucTmp);
-<a name="l00153"></a>00153         pSection-&gt;bNewPage = ucTmp != 0 &amp;&amp; ucTmp != 1;
-<a name="l00154"></a>00154         <span class="keywordflow">if</span> (tBytes &lt; 18) {
-<a name="l00155"></a>00155                 <span class="keywordflow">return</span>;
-<a name="l00156"></a>00156         }
-<a name="l00157"></a>00157         <span class="comment">/* ccolM1 */</span>
-<a name="l00158"></a>00158         usCcol = (USHORT)ucGetByte(17, aucGrpprl);
-<a name="l00159"></a>00159         DBG_DEC(usCcol);
-<a name="l00160"></a>00160 } <span class="comment">/* end of vGet0SectionInfo */</span>
-<a name="l00161"></a>00161 
-<a name="l00162"></a>00162 <span class="comment">/*</span>
-<a name="l00163"></a>00163 <span class="comment"> * Build the lists with Section Property Information for Word for DOS files</span>
-<a name="l00164"></a>00164 <span class="comment"> */</span>
-<a name="l00165"></a>00165 <span class="keywordtype">void</span>
-<a name="l00166"></a>00166 vGet0SepInfo(FILE *pFile, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00167"></a>00167 {
-<a name="l00168"></a>00168         section_block_type      tSection;
-<a name="l00169"></a>00169         UCHAR   *aucBuffer;
-<a name="l00170"></a>00170         ULONG   ulBeginOfText, ulTextOffset, ulBeginSectInfo;
-<a name="l00171"></a>00171         ULONG   ulCharPos, ulSectPage, ulBeginNextBlock;
-<a name="l00172"></a>00172         <span class="keywordtype">size_t</span>  tSectInfoLen, tIndex, tSections, tBytes;
-<a name="l00173"></a>00173         UCHAR   aucTmp[2], aucFpage[35];
-<a name="l00174"></a>00174 
-<a name="l00175"></a>00175         fail(pFile == NULL || aucHeader == NULL);
-<a name="l00176"></a>00176 
-<a name="l00177"></a>00177         ulBeginOfText = 128;
-<a name="l00178"></a>00178         NO_DBG_HEX(ulBeginOfText);
-<a name="l00179"></a>00179         ulBeginSectInfo = 128 * (ULONG)usGetWord(0x18, aucHeader);
-<a name="l00180"></a>00180         DBG_HEX(ulBeginSectInfo);
-<a name="l00181"></a>00181         ulBeginNextBlock = 128 * (ULONG)usGetWord(0x1a, aucHeader);
-<a name="l00182"></a>00182         DBG_HEX(ulBeginNextBlock);
-<a name="l00183"></a>00183         <span class="keywordflow">if</span> (ulBeginSectInfo == ulBeginNextBlock) {
-<a name="l00184"></a>00184                 <span class="comment">/* There is no section information block */</span>
-<a name="l00185"></a>00185                 <span class="keywordflow">return</span>;
-<a name="l00186"></a>00186         }
-<a name="l00187"></a>00187 
-<a name="l00188"></a>00188         <span class="comment">/* Get the the number of sections */</span>
-<a name="l00189"></a>00189         <span class="keywordflow">if</span> (!bReadBytes(aucTmp, 2, ulBeginSectInfo, pFile)) {
-<a name="l00190"></a>00190                 <span class="keywordflow">return</span>;
-<a name="l00191"></a>00191         }
-<a name="l00192"></a>00192         tSections = (size_t)usGetWord(0, aucTmp);
-<a name="l00193"></a>00193         NO_DBG_DEC(tSections);
-<a name="l00194"></a>00194 
-<a name="l00195"></a>00195         <span class="comment">/* Read the Section Descriptors */</span>
-<a name="l00196"></a>00196         tSectInfoLen = 10 * tSections;
-<a name="l00197"></a>00197         NO_DBG_DEC(tSectInfoLen);
-<a name="l00198"></a>00198         aucBuffer = xmalloc(tSectInfoLen);
-<a name="l00199"></a>00199         <span class="keywordflow">if</span> (!bReadBytes(aucBuffer, tSectInfoLen, ulBeginSectInfo + 4, pFile)) {
-<a name="l00200"></a>00200                 aucBuffer = xfree(aucBuffer);
-<a name="l00201"></a>00201                 <span class="keywordflow">return</span>;
-<a name="l00202"></a>00202         }
-<a name="l00203"></a>00203         NO_DBG_PRINT_BLOCK(aucBuffer, tSectInfoLen);
-<a name="l00204"></a>00204 
-<a name="l00205"></a>00205         <span class="comment">/* Read the Section Properties */</span>
-<a name="l00206"></a>00206         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tSections; tIndex++) {
-<a name="l00207"></a>00207                 ulTextOffset = ulGetLong(10 * tIndex, aucBuffer);
-<a name="l00208"></a>00208                 NO_DBG_HEX(ulTextOffset);
-<a name="l00209"></a>00209                 ulCharPos = ulBeginOfText + ulTextOffset;
-<a name="l00210"></a>00210                 NO_DBG_HEX(ulTextOffset);
-<a name="l00211"></a>00211                 ulSectPage = ulGetLong(10 * tIndex + 6, aucBuffer);
-<a name="l00212"></a>00212                 NO_DBG_HEX(ulSectPage);
-<a name="l00213"></a>00213                 <span class="keywordflow">if</span> (ulSectPage == FC_INVALID ||         <span class="comment">/* Must use defaults */</span>
-<a name="l00214"></a>00214                     ulSectPage &lt; 128 ||                 <span class="comment">/* Should not happen */</span>
-<a name="l00215"></a>00215                     ulSectPage &gt;= ulBeginSectInfo) {    <span class="comment">/* Should not happen */</span>
-<a name="l00216"></a>00216                         DBG_HEX_C(ulSectPage != FC_INVALID, ulSectPage);
-<a name="l00217"></a>00217                         vDefault2SectionInfoList(ulCharPos);
-<a name="l00218"></a>00218                         <span class="keywordflow">continue</span>;
-<a name="l00219"></a>00219                 }
-<a name="l00220"></a>00220                 <span class="comment">/* Get the number of bytes to read */</span>
-<a name="l00221"></a>00221                 <span class="keywordflow">if</span> (!bReadBytes(aucTmp, 1, ulSectPage, pFile)) {
-<a name="l00222"></a>00222                         <span class="keywordflow">continue</span>;
-<a name="l00223"></a>00223                 }
-<a name="l00224"></a>00224                 tBytes = 1 + (size_t)ucGetByte(0, aucTmp);
-<a name="l00225"></a>00225                 NO_DBG_DEC(tBytes);
-<a name="l00226"></a>00226                 <span class="keywordflow">if</span> (tBytes &gt; <span class="keyword">sizeof</span>(aucFpage)) {
-<a name="l00227"></a>00227                         DBG_DEC(tBytes);
-<a name="l00228"></a>00228                         tBytes = <span class="keyword">sizeof</span>(aucFpage);
-<a name="l00229"></a>00229                 }
-<a name="l00230"></a>00230                 <span class="comment">/* Read the bytes */</span>
-<a name="l00231"></a>00231                 <span class="keywordflow">if</span> (!bReadBytes(aucFpage, tBytes, ulSectPage, pFile)) {
-<a name="l00232"></a>00232                         <span class="keywordflow">continue</span>;
-<a name="l00233"></a>00233                 }
-<a name="l00234"></a>00234                 NO_DBG_PRINT_BLOCK(aucFpage, tBytes);
-<a name="l00235"></a>00235                 <span class="comment">/* Process the bytes */</span>
-<a name="l00236"></a>00236                 vGetDefaultSection(&amp;tSection);
-<a name="l00237"></a>00237                 vGet0SectionInfo(aucFpage + 1, tBytes - 1, &amp;tSection);
-<a name="l00238"></a>00238                 vAdd2SectionInfoList(&amp;tSection, ulCharPos);
-<a name="l00239"></a>00239         }
-<a name="l00240"></a>00240         <span class="comment">/* Clean up before you leave */</span>
-<a name="l00241"></a>00241         aucBuffer = xfree(aucBuffer);
-<a name="l00242"></a>00242 } <span class="comment">/* end of vGet0SepInfo */</span>
-<a name="l00243"></a>00243 
-<a name="l00244"></a>00244 <span class="comment">/*</span>
-<a name="l00245"></a>00245 <span class="comment"> * Fill the style information block with information</span>
-<a name="l00246"></a>00246 <span class="comment"> * from a Word for DOS file.</span>
-<a name="l00247"></a>00247 <span class="comment"> */</span>
-<a name="l00248"></a>00248 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00249"></a>00249 vGet0StyleInfo(<span class="keywordtype">int</span> iFodo, <span class="keyword">const</span> UCHAR *aucGrpprl, style_block_type *pStyle)
-<a name="l00250"></a>00250 {
-<a name="l00251"></a>00251         <span class="keywordtype">int</span>     iBytes;
-<a name="l00252"></a>00252         UCHAR   ucTmp;
-<a name="l00253"></a>00253 
-<a name="l00254"></a>00254         fail(iFodo &lt;= 0 || aucGrpprl == NULL || pStyle == NULL);
-<a name="l00255"></a>00255 
-<a name="l00256"></a>00256         pStyle-&gt;usIstdNext = ISTD_NORMAL;
-<a name="l00257"></a>00257 
-<a name="l00258"></a>00258         iBytes = (int)ucGetByte(iFodo, aucGrpprl);
-<a name="l00259"></a>00259         <span class="keywordflow">if</span> (iBytes &lt; 1) {
-<a name="l00260"></a>00260                 <span class="keywordflow">return</span>;
-<a name="l00261"></a>00261         }
-<a name="l00262"></a>00262         <span class="comment">/* stc if styled */</span>
-<a name="l00263"></a>00263         ucTmp = ucGetByte(iFodo + 1, aucGrpprl);
-<a name="l00264"></a>00264         <span class="keywordflow">if</span> ((ucTmp &amp; BIT(0)) != 0) {
-<a name="l00265"></a>00265                 ucTmp &gt;&gt;= 1;
-<a name="l00266"></a>00266                 <span class="keywordflow">if</span> (ucTmp &gt;= 88 &amp;&amp; ucTmp &lt;= 94) {
-<a name="l00267"></a>00267                         <span class="comment">/* Header levels 1 through 7 */</span>
-<a name="l00268"></a>00268                         pStyle-&gt;usIstd = ucTmp - 87;
-<a name="l00269"></a>00269                         pStyle-&gt;ucNumLevel = 1;
-<a name="l00270"></a>00270                 }
-<a name="l00271"></a>00271         }
-<a name="l00272"></a>00272         <span class="keywordflow">if</span> (iBytes &lt; 2) {
-<a name="l00273"></a>00273                 <span class="keywordflow">return</span>;
-<a name="l00274"></a>00274         }
-<a name="l00275"></a>00275         <span class="comment">/* jc */</span>
-<a name="l00276"></a>00276         ucTmp = ucGetByte(iFodo + 2, aucGrpprl);
-<a name="l00277"></a>00277         pStyle-&gt;ucAlignment = ucTmp &amp; 0x02;
-<a name="l00278"></a>00278         <span class="keywordflow">if</span> (iBytes &lt; 3) {
-<a name="l00279"></a>00279                 <span class="keywordflow">return</span>;
-<a name="l00280"></a>00280         }
-<a name="l00281"></a>00281         <span class="comment">/* stc */</span>
-<a name="l00282"></a>00282         ucTmp = ucGetByte(iFodo + 3, aucGrpprl);
-<a name="l00283"></a>00283         ucTmp &amp;= 0x7f;
-<a name="l00284"></a>00284         <span class="keywordflow">if</span> (ucTmp &gt;= 88 &amp;&amp; ucTmp &lt;= 94) {
-<a name="l00285"></a>00285                 <span class="comment">/* Header levels 1 through 7 */</span>
-<a name="l00286"></a>00286                 pStyle-&gt;usIstd = ucTmp - 87;
-<a name="l00287"></a>00287                 pStyle-&gt;ucNumLevel = 1;
-<a name="l00288"></a>00288         }
-<a name="l00289"></a>00289         <span class="keywordflow">if</span> (iBytes &lt; 6) {
-<a name="l00290"></a>00290                 <span class="keywordflow">return</span>;
-<a name="l00291"></a>00291         }
-<a name="l00292"></a>00292         <span class="comment">/* dxaRight */</span>
-<a name="l00293"></a>00293         pStyle-&gt;sRightIndent = (short)usGetWord(iFodo + 5, aucGrpprl);
-<a name="l00294"></a>00294         NO_DBG_DEC(pStyle-&gt;sRightIndent);
-<a name="l00295"></a>00295         <span class="keywordflow">if</span> (iBytes &lt; 8) {
-<a name="l00296"></a>00296                 <span class="keywordflow">return</span>;
-<a name="l00297"></a>00297         }
-<a name="l00298"></a>00298         <span class="comment">/* dxaLeft */</span>
-<a name="l00299"></a>00299         pStyle-&gt;sLeftIndent = (short)usGetWord(iFodo + 7, aucGrpprl);
-<a name="l00300"></a>00300         NO_DBG_DEC(pStyle-&gt;sLeftIndent);
-<a name="l00301"></a>00301         <span class="keywordflow">if</span> (iBytes &lt; 10) {
-<a name="l00302"></a>00302                 <span class="keywordflow">return</span>;
-<a name="l00303"></a>00303         }
-<a name="l00304"></a>00304         <span class="comment">/* dxaLeft1 */</span>
-<a name="l00305"></a>00305         pStyle-&gt;sLeftIndent1 = (short)usGetWord(iFodo + 9, aucGrpprl);
-<a name="l00306"></a>00306         NO_DBG_DEC(pStyle-&gt;sLeftIndent1);
-<a name="l00307"></a>00307         <span class="keywordflow">if</span> (iBytes &lt; 14) {
-<a name="l00308"></a>00308                 <span class="keywordflow">return</span>;
-<a name="l00309"></a>00309         }
-<a name="l00310"></a>00310         <span class="comment">/* dyaBefore */</span>
-<a name="l00311"></a>00311         pStyle-&gt;usBeforeIndent = usGetWord(iFodo + 13, aucGrpprl);
-<a name="l00312"></a>00312         NO_DBG_DEC(pStyle-&gt;usBeforeIndent);
-<a name="l00313"></a>00313         <span class="keywordflow">if</span> (iBytes &lt; 16) {
-<a name="l00314"></a>00314                 <span class="keywordflow">return</span>;
-<a name="l00315"></a>00315         }
-<a name="l00316"></a>00316         <span class="comment">/* dyaAfter */</span>
-<a name="l00317"></a>00317         pStyle-&gt;usAfterIndent = usGetWord(iFodo + 15, aucGrpprl);
-<a name="l00318"></a>00318         NO_DBG_DEC(pStyle-&gt;usAfterIndent);
-<a name="l00319"></a>00319 } <span class="comment">/* end of vGet0StyleInfo */</span>
-<a name="l00320"></a>00320 
-<a name="l00321"></a>00321 <span class="comment">/*</span>
-<a name="l00322"></a>00322 <span class="comment"> * Build the lists with Paragraph Information for Word for DOS files</span>
-<a name="l00323"></a>00323 <span class="comment"> */</span>
-<a name="l00324"></a>00324 <span class="keywordtype">void</span>
-<a name="l00325"></a>00325 vGet0PapInfo(FILE *pFile, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00326"></a>00326 {
-<a name="l00327"></a>00327         style_block_type        tStyle;
-<a name="l00328"></a>00328         ULONG   ulBeginParfInfo, ulCharPos, ulCharPosNext;
-<a name="l00329"></a>00329         <span class="keywordtype">int</span>     iIndex, iRun, iFodo;
-<a name="l00330"></a>00330         UCHAR   aucFpage[128];
-<a name="l00331"></a>00331 
-<a name="l00332"></a>00332         fail(pFile == NULL || aucHeader == NULL);
-<a name="l00333"></a>00333 
-<a name="l00334"></a>00334         ulBeginParfInfo = 128 * (ULONG)usGetWord(0x12, aucHeader);
-<a name="l00335"></a>00335         NO_DBG_HEX(ulBeginParfInfo);
-<a name="l00336"></a>00336 
-<a name="l00337"></a>00337         <span class="keywordflow">do</span> {
-<a name="l00338"></a>00338                 <span class="keywordflow">if</span> (!bReadBytes(aucFpage, 128, ulBeginParfInfo, pFile)) {
-<a name="l00339"></a>00339                         <span class="keywordflow">return</span>;
-<a name="l00340"></a>00340                 }
-<a name="l00341"></a>00341                 NO_DBG_PRINT_BLOCK(aucFpage, 128);
-<a name="l00342"></a>00342                 ulCharPosNext = ulGetLong(0, aucFpage);
-<a name="l00343"></a>00343                 iRun = (int)ucGetByte(0x7f, aucFpage);
-<a name="l00344"></a>00344                 NO_DBG_DEC(iRun);
-<a name="l00345"></a>00345                 <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; iRun; iIndex++) {
-<a name="l00346"></a>00346                         iFodo = (int)usGetWord(6 * iIndex + 8, aucFpage);
-<a name="l00347"></a>00347                         <span class="keywordflow">if</span> (iFodo &lt;= 0 || iFodo &gt; 0x79) {
-<a name="l00348"></a>00348                                 DBG_DEC_C(iFodo != (<span class="keywordtype">int</span>)0xffff, iFodo);
-<a name="l00349"></a>00349                                 <span class="keywordflow">continue</span>;
-<a name="l00350"></a>00350                         }
-<a name="l00351"></a>00351                         vFillStyleFromStylesheet(0, &amp;tStyle);
-<a name="l00352"></a>00352                         vGet0StyleInfo(iFodo, aucFpage + 4, &amp;tStyle);
-<a name="l00353"></a>00353                         ulCharPos = ulCharPosNext;
-<a name="l00354"></a>00354                         ulCharPosNext = ulGetLong(6 * iIndex + 4, aucFpage);
-<a name="l00355"></a>00355                         tStyle.ulFileOffset = ulCharPos;
-<a name="l00356"></a>00356                         vAdd2StyleInfoList(&amp;tStyle);
-<a name="l00357"></a>00357                 }
-<a name="l00358"></a>00358                 ulBeginParfInfo += 128;
-<a name="l00359"></a>00359         } <span class="keywordflow">while</span> (ulCharPosNext == ulBeginParfInfo);
-<a name="l00360"></a>00360 } <span class="comment">/* end of vGet0PapInfo */</span>
-<a name="l00361"></a>00361 
-<a name="l00362"></a>00362 <span class="comment">/*</span>
-<a name="l00363"></a>00363 <span class="comment"> * Fill the font information block with information</span>
-<a name="l00364"></a>00364 <span class="comment"> * from a Word for DOS file.</span>
-<a name="l00365"></a>00365 <span class="comment"> */</span>
-<a name="l00366"></a>00366 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00367"></a>00367 vGet0FontInfo(<span class="keywordtype">int</span> iFodo, <span class="keyword">const</span> UCHAR *aucGrpprl, font_block_type *pFont)
-<a name="l00368"></a>00368 {
-<a name="l00369"></a>00369         <span class="keywordtype">int</span>     iBytes;
-<a name="l00370"></a>00370         UCHAR   ucTmp;
-<a name="l00371"></a>00371 
-<a name="l00372"></a>00372         fail(iFodo &lt;= 0 || aucGrpprl == NULL || pFont == NULL);
-<a name="l00373"></a>00373 
-<a name="l00374"></a>00374         iBytes = (int)ucGetByte(iFodo, aucGrpprl);
-<a name="l00375"></a>00375         <span class="keywordflow">if</span> (iBytes &lt; 2) {
-<a name="l00376"></a>00376                 <span class="keywordflow">return</span>;
-<a name="l00377"></a>00377         }
-<a name="l00378"></a>00378         <span class="comment">/* fBold, fItalic, cFtc */</span>
-<a name="l00379"></a>00379         ucTmp = ucGetByte(iFodo + 2, aucGrpprl);
-<a name="l00380"></a>00380         <span class="keywordflow">if</span> ((ucTmp &amp; BIT(0)) != 0) {
-<a name="l00381"></a>00381                 pFont-&gt;usFontStyle |= FONT_BOLD;
-<a name="l00382"></a>00382         }
-<a name="l00383"></a>00383         <span class="keywordflow">if</span> ((ucTmp &amp; BIT(1)) != 0) {
-<a name="l00384"></a>00384                 pFont-&gt;usFontStyle |= FONT_ITALIC;
-<a name="l00385"></a>00385         }
-<a name="l00386"></a>00386         pFont-&gt;ucFontNumber = ucTmp &gt;&gt; 2;
-<a name="l00387"></a>00387         NO_DBG_DEC(pFont-&gt;ucFontNumber);
-<a name="l00388"></a>00388         <span class="keywordflow">if</span> (iBytes &lt; 3) {
-<a name="l00389"></a>00389                 <span class="keywordflow">return</span>;
-<a name="l00390"></a>00390         }
-<a name="l00391"></a>00391         <span class="comment">/* cHps */</span>
-<a name="l00392"></a>00392         pFont-&gt;usFontSize = (USHORT)ucGetByte(iFodo + 3, aucGrpprl);
-<a name="l00393"></a>00393         NO_DBG_DEC(pFont-&gt;usFontSize);
-<a name="l00394"></a>00394         <span class="keywordflow">if</span> (iBytes &lt; 4) {
-<a name="l00395"></a>00395                 <span class="keywordflow">return</span>;
-<a name="l00396"></a>00396         }
-<a name="l00397"></a>00397         <span class="comment">/* cKul, fStrike, fCaps, fSmallCaps, fVanish */</span>
-<a name="l00398"></a>00398         ucTmp = ucGetByte(iFodo + 4, aucGrpprl);
-<a name="l00399"></a>00399         <span class="keywordflow">if</span> ((ucTmp &amp; BIT(0)) != 0 || (ucTmp &amp; BIT(2)) != 0) {
-<a name="l00400"></a>00400                 pFont-&gt;usFontStyle |= FONT_UNDERLINE;
-<a name="l00401"></a>00401         }
-<a name="l00402"></a>00402         <span class="keywordflow">if</span> ((ucTmp &amp; BIT(1)) != 0) {
-<a name="l00403"></a>00403                 pFont-&gt;usFontStyle |= FONT_STRIKE;
-<a name="l00404"></a>00404         }
-<a name="l00405"></a>00405         <span class="keywordflow">if</span> ((ucTmp &amp; BIT(4)) != 0) {
-<a name="l00406"></a>00406                 pFont-&gt;usFontStyle |= FONT_CAPITALS;
-<a name="l00407"></a>00407         }
-<a name="l00408"></a>00408         <span class="keywordflow">if</span> ((ucTmp &amp; BIT(5)) != 0) {
-<a name="l00409"></a>00409                 pFont-&gt;usFontStyle |= FONT_SMALL_CAPITALS;
-<a name="l00410"></a>00410         }
-<a name="l00411"></a>00411         <span class="keywordflow">if</span> ((ucTmp &amp; BIT(7)) != 0) {
-<a name="l00412"></a>00412                 pFont-&gt;usFontStyle |= FONT_HIDDEN;
-<a name="l00413"></a>00413         }
-<a name="l00414"></a>00414         DBG_HEX(pFont-&gt;usFontStyle);
-<a name="l00415"></a>00415         <span class="keywordflow">if</span> (iBytes &lt; 6) {
-<a name="l00416"></a>00416                 <span class="keywordflow">return</span>;
-<a name="l00417"></a>00417         }
-<a name="l00418"></a>00418         <span class="comment">/* cIss */</span>
-<a name="l00419"></a>00419         ucTmp = ucGetByte(iFodo + 6, aucGrpprl);
-<a name="l00420"></a>00420         <span class="keywordflow">if</span> (ucTmp != 0) {
-<a name="l00421"></a>00421                 <span class="keywordflow">if</span> (ucTmp &lt; 128) {
-<a name="l00422"></a>00422                         pFont-&gt;usFontStyle |= FONT_SUPERSCRIPT;
-<a name="l00423"></a>00423                         DBG_MSG(<span class="stringliteral">&quot;Superscript&quot;</span>);
-<a name="l00424"></a>00424                 } <span class="keywordflow">else</span> {
-<a name="l00425"></a>00425                         pFont-&gt;usFontStyle |= FONT_SUBSCRIPT;
-<a name="l00426"></a>00426                         DBG_MSG(<span class="stringliteral">&quot;Subscript&quot;</span>);
-<a name="l00427"></a>00427                 }
-<a name="l00428"></a>00428         }
-<a name="l00429"></a>00429         <span class="keywordflow">if</span> (iBytes &lt; 7) {
-<a name="l00430"></a>00430                 <span class="keywordflow">return</span>;
-<a name="l00431"></a>00431         }
-<a name="l00432"></a>00432         <span class="comment">/* cIco */</span>
-<a name="l00433"></a>00433         ucTmp = ucGetByte(iFodo + 7, aucGrpprl);
-<a name="l00434"></a>00434         <span class="keywordflow">switch</span> (ucTmp &amp; 0x07) {
-<a name="l00435"></a>00435         <span class="keywordflow">case</span> 0: pFont-&gt;ucFontColor = FONT_COLOR_BLACK; <span class="keywordflow">break</span>;
-<a name="l00436"></a>00436         <span class="keywordflow">case</span> 1: pFont-&gt;ucFontColor = FONT_COLOR_RED; <span class="keywordflow">break</span>;
-<a name="l00437"></a>00437         <span class="keywordflow">case</span> 2: pFont-&gt;ucFontColor = FONT_COLOR_GREEN; <span class="keywordflow">break</span>;
-<a name="l00438"></a>00438         <span class="keywordflow">case</span> 3: pFont-&gt;ucFontColor = FONT_COLOR_BLUE; <span class="keywordflow">break</span>;
-<a name="l00439"></a>00439         <span class="keywordflow">case</span> 4: pFont-&gt;ucFontColor = FONT_COLOR_CYAN; <span class="keywordflow">break</span>;
-<a name="l00440"></a>00440         <span class="keywordflow">case</span> 5: pFont-&gt;ucFontColor = FONT_COLOR_MAGENTA; <span class="keywordflow">break</span>;
-<a name="l00441"></a>00441         <span class="keywordflow">case</span> 6: pFont-&gt;ucFontColor = FONT_COLOR_YELLOW; <span class="keywordflow">break</span>;
-<a name="l00442"></a>00442         <span class="keywordflow">case</span> 7: pFont-&gt;ucFontColor = FONT_COLOR_WHITE; <span class="keywordflow">break</span>;
-<a name="l00443"></a>00443         <span class="keywordflow">default</span>:pFont-&gt;ucFontColor = FONT_COLOR_BLACK; <span class="keywordflow">break</span>;
-<a name="l00444"></a>00444         }
-<a name="l00445"></a>00445         NO_DBG_DEC(pFont-&gt;ucFontColor);
-<a name="l00446"></a>00446 } <span class="comment">/* end of vGet0FontInfo */</span>
-<a name="l00447"></a>00447 
-<a name="l00448"></a>00448 <span class="comment">/*</span>
-<a name="l00449"></a>00449 <span class="comment"> * Build the lists with Character Information for Word for DOS files</span>
-<a name="l00450"></a>00450 <span class="comment"> */</span>
-<a name="l00451"></a>00451 <span class="keywordtype">void</span>
-<a name="l00452"></a>00452 vGet0ChrInfo(FILE *pFile, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00453"></a>00453 {
-<a name="l00454"></a>00454         font_block_type         tFont;
-<a name="l00455"></a>00455         ULONG   ulBeginCharInfo, ulCharPos, ulCharPosNext;
-<a name="l00456"></a>00456         <span class="keywordtype">int</span>     iIndex, iRun, iFodo;
-<a name="l00457"></a>00457         UCHAR   aucFpage[128];
-<a name="l00458"></a>00458 
-<a name="l00459"></a>00459         fail(pFile == NULL || aucHeader == NULL);
-<a name="l00460"></a>00460 
-<a name="l00461"></a>00461         ulBeginCharInfo = ulGetLong(0x0e, aucHeader);
-<a name="l00462"></a>00462         NO_DBG_HEX(ulBeginCharInfo);
-<a name="l00463"></a>00463         ulBeginCharInfo = ROUND128(ulBeginCharInfo);
-<a name="l00464"></a>00464         NO_DBG_HEX(ulBeginCharInfo);
-<a name="l00465"></a>00465 
-<a name="l00466"></a>00466         <span class="keywordflow">do</span> {
-<a name="l00467"></a>00467                 <span class="keywordflow">if</span> (!bReadBytes(aucFpage, 128, ulBeginCharInfo, pFile)) {
-<a name="l00468"></a>00468                         <span class="keywordflow">return</span>;
-<a name="l00469"></a>00469                 }
-<a name="l00470"></a>00470                 NO_DBG_PRINT_BLOCK(aucFpage, 128);
-<a name="l00471"></a>00471                 ulCharPosNext = ulGetLong(0, aucFpage);
-<a name="l00472"></a>00472                 iRun = (int)ucGetByte(0x7f, aucFpage);
-<a name="l00473"></a>00473                 NO_DBG_DEC(iRun);
-<a name="l00474"></a>00474                 <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; iRun; iIndex++) {
-<a name="l00475"></a>00475                         iFodo = (int)usGetWord(6 * iIndex + 8, aucFpage);
-<a name="l00476"></a>00476                         <span class="keywordflow">if</span> (iFodo &lt;= 0 || iFodo &gt; 0x79) {
-<a name="l00477"></a>00477                                 DBG_DEC_C(iFodo != (<span class="keywordtype">int</span>)0xffff, iFodo);
-<a name="l00478"></a>00478                                 <span class="keywordflow">continue</span>;
-<a name="l00479"></a>00479                         }
-<a name="l00480"></a>00480                         vFillFontFromStylesheet(0, &amp;tFont);
-<a name="l00481"></a>00481                         vGet0FontInfo(iFodo, aucFpage + 4, &amp;tFont);
-<a name="l00482"></a>00482                         ulCharPos = ulCharPosNext;
-<a name="l00483"></a>00483                         ulCharPosNext = ulGetLong(6 * iIndex + 4, aucFpage);
-<a name="l00484"></a>00484                         tFont.ulFileOffset = ulCharPos;
-<a name="l00485"></a>00485                         vAdd2FontInfoList(&amp;tFont);
-<a name="l00486"></a>00486                 }
-<a name="l00487"></a>00487                 ulBeginCharInfo += 128;
-<a name="l00488"></a>00488         } <span class="keywordflow">while</span> (ulCharPosNext == ulBeginCharInfo);
-<a name="l00489"></a>00489 } <span class="comment">/* end of vGet0ChrInfo */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/prop2_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1083 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/prop2.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/prop2.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * prop2.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2002-2005 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Read the property information from a WinWord 1 or 2 file</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00011"></a>00011 
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 <span class="preprocessor">#define MAX_FILESIZE            0x2000000UL     </span><span class="comment">/* 32 Mb */</span>
-<a name="l00014"></a>00014 
-<a name="l00015"></a>00015 <span class="comment">/*</span>
-<a name="l00016"></a>00016 <span class="comment"> * iGet2InfoLength - the length of the information for WinWord 1/2 files</span>
-<a name="l00017"></a>00017 <span class="comment"> */</span>
-<a name="l00018"></a>00018 <span class="keyword">static</span> <span class="keywordtype">int</span>
-<a name="l00019"></a>00019 iGet2InfoLength(<span class="keywordtype">int</span> iByteNbr, <span class="keyword">const</span> UCHAR *aucGrpprl)
-<a name="l00020"></a>00020 {
-<a name="l00021"></a>00021         <span class="keywordtype">int</span>     iTmp, iDel, iAdd;
-<a name="l00022"></a>00022 
-<a name="l00023"></a>00023         <span class="keywordflow">switch</span> (ucGetByte(iByteNbr, aucGrpprl)) {
-<a name="l00024"></a>00024         <span class="keywordflow">case</span>   3: <span class="keywordflow">case</span>  15: <span class="keywordflow">case</span>  78: <span class="keywordflow">case</span> 152: <span class="keywordflow">case</span> 154: <span class="keywordflow">case</span> 155:
-<a name="l00025"></a>00025                 <span class="keywordflow">return</span> 2 + (int)ucGetByte(iByteNbr + 1, aucGrpprl);
-<a name="l00026"></a>00026         <span class="keywordflow">case</span>  16: <span class="keywordflow">case</span>  17: <span class="keywordflow">case</span>  18: <span class="keywordflow">case</span>  19: <span class="keywordflow">case</span>  21: <span class="keywordflow">case</span>  22: <span class="keywordflow">case</span>  26:
-<a name="l00027"></a>00027         <span class="keywordflow">case</span>  27: <span class="keywordflow">case</span>  28: <span class="keywordflow">case</span>  30: <span class="keywordflow">case</span>  31: <span class="keywordflow">case</span>  32: <span class="keywordflow">case</span>  33: <span class="keywordflow">case</span>  34:
-<a name="l00028"></a>00028         <span class="keywordflow">case</span>  35: <span class="keywordflow">case</span>  36: <span class="keywordflow">case</span>  38: <span class="keywordflow">case</span>  39: <span class="keywordflow">case</span>  40: <span class="keywordflow">case</span>  41: <span class="keywordflow">case</span>  42:
-<a name="l00029"></a>00029         <span class="keywordflow">case</span>  43: <span class="keywordflow">case</span>  45: <span class="keywordflow">case</span>  46: <span class="keywordflow">case</span>  47: <span class="keywordflow">case</span>  48: <span class="keywordflow">case</span>  49: <span class="keywordflow">case</span>  68:
-<a name="l00030"></a>00030         <span class="keywordflow">case</span>  71: <span class="keywordflow">case</span>  72: <span class="keywordflow">case</span>  82: <span class="keywordflow">case</span>  83: <span class="keywordflow">case</span>  96: <span class="keywordflow">case</span>  97: <span class="keywordflow">case</span>  98:
-<a name="l00031"></a>00031         <span class="keywordflow">case</span>  99: <span class="keywordflow">case</span> 115: <span class="keywordflow">case</span> 116: <span class="keywordflow">case</span> 119: <span class="keywordflow">case</span> 120: <span class="keywordflow">case</span> 123: <span class="keywordflow">case</span> 124:
-<a name="l00032"></a>00032         <span class="keywordflow">case</span> 129: <span class="keywordflow">case</span> 130: <span class="keywordflow">case</span> 131: <span class="keywordflow">case</span> 132: <span class="keywordflow">case</span> 135: <span class="keywordflow">case</span> 136: <span class="keywordflow">case</span> 139:
-<a name="l00033"></a>00033         <span class="keywordflow">case</span> 140: <span class="keywordflow">case</span> 141: <span class="keywordflow">case</span> 142: <span class="keywordflow">case</span> 143: <span class="keywordflow">case</span> 144: <span class="keywordflow">case</span> 145: <span class="keywordflow">case</span> 146:
-<a name="l00034"></a>00034         <span class="keywordflow">case</span> 147: <span class="keywordflow">case</span> 148: <span class="keywordflow">case</span> 153: <span class="keywordflow">case</span> 159: <span class="keywordflow">case</span> 161: <span class="keywordflow">case</span> 162:
-<a name="l00035"></a>00035                 <span class="keywordflow">return</span> 1 + 2;
-<a name="l00036"></a>00036         <span class="keywordflow">case</span>  23:
-<a name="l00037"></a>00037                 iTmp = (int)ucGetByte(iByteNbr + 1, aucGrpprl);
-<a name="l00038"></a>00038                 <span class="keywordflow">if</span> (iTmp == 255) {
-<a name="l00039"></a>00039                         iDel = (int)ucGetByte(iByteNbr + 2, aucGrpprl);
-<a name="l00040"></a>00040                         iAdd = (int)ucGetByte(
-<a name="l00041"></a>00041                                         iByteNbr + 3 + iDel * 4, aucGrpprl);
-<a name="l00042"></a>00042                         iTmp = 2 + iDel * 4 + iAdd * 3;
-<a name="l00043"></a>00043                 }
-<a name="l00044"></a>00044                 <span class="keywordflow">return</span> 2 + iTmp;
-<a name="l00045"></a>00045         <span class="keywordflow">case</span>  70:
-<a name="l00046"></a>00046                 <span class="keywordflow">return</span> 1 + 3;
-<a name="l00047"></a>00047         <span class="keywordflow">case</span>  95:
-<a name="l00048"></a>00048                 <span class="keywordflow">return</span> 1 + 13;
-<a name="l00049"></a>00049         <span class="keywordflow">case</span> 157: <span class="keywordflow">case</span> 163:
-<a name="l00050"></a>00050                 <span class="keywordflow">return</span> 1 + 5;
-<a name="l00051"></a>00051         <span class="keywordflow">case</span> 158: <span class="keywordflow">case</span> 160: <span class="keywordflow">case</span> 164:
-<a name="l00052"></a>00052                 <span class="keywordflow">return</span> 1 + 4;
-<a name="l00053"></a>00053         <span class="keywordflow">default</span>:
-<a name="l00054"></a>00054                 <span class="keywordflow">return</span> 1 + 1;
-<a name="l00055"></a>00055         }
-<a name="l00056"></a>00056 } <span class="comment">/* end of iGet2InfoLength */</span>
-<a name="l00057"></a>00057 
-<a name="l00058"></a>00058 <span class="comment">/*</span>
-<a name="l00059"></a>00059 <span class="comment"> * Build the lists with Document Property Information for WinWord 1/2 files</span>
-<a name="l00060"></a>00060 <span class="comment"> */</span>
-<a name="l00061"></a>00061 <span class="keywordtype">void</span>
-<a name="l00062"></a>00062 vGet2DopInfo(FILE *pFile, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00063"></a>00063 {
-<a name="l00064"></a>00064         document_block_type     tDocument;
-<a name="l00065"></a>00065         UCHAR   *aucBuffer;
-<a name="l00066"></a>00066         ULONG   ulBeginDocpInfo, ulTmp;
-<a name="l00067"></a>00067         <span class="keywordtype">size_t</span>  tDocpInfoLen;
-<a name="l00068"></a>00068         USHORT  usTmp;
-<a name="l00069"></a>00069 
-<a name="l00070"></a>00070         ulBeginDocpInfo = ulGetLong(0x112, aucHeader); <span class="comment">/* fcDop */</span>
-<a name="l00071"></a>00071         DBG_HEX(ulBeginDocpInfo);
-<a name="l00072"></a>00072         tDocpInfoLen = (size_t)usGetWord(0x116, aucHeader); <span class="comment">/* cbDop */</span>
-<a name="l00073"></a>00073         DBG_DEC(tDocpInfoLen);
-<a name="l00074"></a>00074         <span class="keywordflow">if</span> (tDocpInfoLen &lt; 28) {
-<a name="l00075"></a>00075                 DBG_MSG(<span class="stringliteral">&quot;No Document information&quot;</span>);
-<a name="l00076"></a>00076                 <span class="keywordflow">return</span>;
-<a name="l00077"></a>00077         }
-<a name="l00078"></a>00078 
-<a name="l00079"></a>00079         aucBuffer = xmalloc(tDocpInfoLen);
-<a name="l00080"></a>00080         <span class="keywordflow">if</span> (!bReadBytes(aucBuffer, tDocpInfoLen, ulBeginDocpInfo, pFile)) {
-<a name="l00081"></a>00081                 aucBuffer = xfree(aucBuffer);
-<a name="l00082"></a>00082                 <span class="keywordflow">return</span>;
-<a name="l00083"></a>00083         }
-<a name="l00084"></a>00084 
-<a name="l00085"></a>00085         usTmp = usGetWord(0x00, aucBuffer);
-<a name="l00086"></a>00086         tDocument.ucHdrFtrSpecification = (UCHAR)(usTmp &gt;&gt; 8); <span class="comment">/* grpfIhdt */</span>
-<a name="l00087"></a>00087         tDocument.usDefaultTabWidth = usGetWord(0x0a, aucBuffer); <span class="comment">/* dxaTab */</span>
-<a name="l00088"></a>00088         ulTmp = ulGetLong(0x14, aucBuffer); <span class="comment">/* dttmCreated */</span>
-<a name="l00089"></a>00089         tDocument.tCreateDate = tConvertDTTM(ulTmp);
-<a name="l00090"></a>00090         ulTmp = ulGetLong(0x18, aucBuffer); <span class="comment">/* dttmRevised */</span>
-<a name="l00091"></a>00091         tDocument.tRevisedDate = tConvertDTTM(ulTmp);
-<a name="l00092"></a>00092         vCreateDocumentInfoList(&amp;tDocument);
-<a name="l00093"></a>00093 
-<a name="l00094"></a>00094         aucBuffer = xfree(aucBuffer);
-<a name="l00095"></a>00095 } <span class="comment">/* end of vGet2DopInfo */</span>
-<a name="l00096"></a>00096 
-<a name="l00097"></a>00097 <span class="comment">/*</span>
-<a name="l00098"></a>00098 <span class="comment"> * Fill the section information block with information</span>
-<a name="l00099"></a>00099 <span class="comment"> * from a WinWord 1/2 file.</span>
-<a name="l00100"></a>00100 <span class="comment"> */</span>
-<a name="l00101"></a>00101 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00102"></a>00102 vGet2SectionInfo(<span class="keyword">const</span> UCHAR *aucGrpprl, <span class="keywordtype">size_t</span> tBytes,
-<a name="l00103"></a>00103                 section_block_type *pSection)
-<a name="l00104"></a>00104 {
-<a name="l00105"></a>00105         <span class="keywordtype">int</span>     iFodoOff, iInfoLen;
-<a name="l00106"></a>00106         USHORT  usCcol;
-<a name="l00107"></a>00107         UCHAR   ucTmp;
-<a name="l00108"></a>00108 
-<a name="l00109"></a>00109         fail(aucGrpprl == NULL || pSection == NULL);
-<a name="l00110"></a>00110 
-<a name="l00111"></a>00111         iFodoOff = 0;
-<a name="l00112"></a>00112         <span class="keywordflow">while</span> (tBytes &gt;= (<span class="keywordtype">size_t</span>)iFodoOff + 1) {
-<a name="l00113"></a>00113                 <span class="keywordflow">switch</span> (ucGetByte(iFodoOff, aucGrpprl)) {
-<a name="l00114"></a>00114                 <span class="keywordflow">case</span> 117:       <span class="comment">/* bkc */</span>
-<a name="l00115"></a>00115                         ucTmp = ucGetByte(iFodoOff + 1, aucGrpprl);
-<a name="l00116"></a>00116                         DBG_DEC(ucTmp);
-<a name="l00117"></a>00117                         pSection-&gt;bNewPage = ucTmp != 0 &amp;&amp; ucTmp != 1;
-<a name="l00118"></a>00118                         <span class="keywordflow">break</span>;
-<a name="l00119"></a>00119                 <span class="keywordflow">case</span> 119:       <span class="comment">/* ccolM1 */</span>
-<a name="l00120"></a>00120                         usCcol = 1 + usGetWord(iFodoOff + 1, aucGrpprl);
-<a name="l00121"></a>00121                         DBG_DEC(usCcol);
-<a name="l00122"></a>00122                         <span class="keywordflow">break</span>;
-<a name="l00123"></a>00123                 <span class="keywordflow">case</span> 128:       <span class="comment">/* grpfIhdt */</span>
-<a name="l00124"></a>00124                         pSection-&gt;ucHdrFtrSpecification =
-<a name="l00125"></a>00125                                         ucGetByte(iFodoOff + 1, aucGrpprl);
-<a name="l00126"></a>00126                         <span class="keywordflow">break</span>;
-<a name="l00127"></a>00127                 <span class="keywordflow">default</span>:
-<a name="l00128"></a>00128                         <span class="keywordflow">break</span>;
-<a name="l00129"></a>00129                 }
-<a name="l00130"></a>00130                 iInfoLen = iGet2InfoLength(iFodoOff, aucGrpprl);
-<a name="l00131"></a>00131                 fail(iInfoLen &lt;= 0);
-<a name="l00132"></a>00132                 iFodoOff += iInfoLen;
-<a name="l00133"></a>00133         }
-<a name="l00134"></a>00134 } <span class="comment">/* end of vGet2SectionInfo */</span>
-<a name="l00135"></a>00135 
-<a name="l00136"></a>00136 <span class="comment">/*</span>
-<a name="l00137"></a>00137 <span class="comment"> * Build the lists with Section Property Information for WinWord 1/2 files</span>
-<a name="l00138"></a>00138 <span class="comment"> */</span>
-<a name="l00139"></a>00139 <span class="keywordtype">void</span>
-<a name="l00140"></a>00140 vGet2SepInfo(FILE *pFile, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00141"></a>00141 {
-<a name="l00142"></a>00142         section_block_type      tSection;
-<a name="l00143"></a>00143         ULONG   *aulSectPage, *aulCharPos;
-<a name="l00144"></a>00144         UCHAR   *aucBuffer, *aucFpage;
-<a name="l00145"></a>00145         ULONG   ulBeginOfText, ulTextOffset, ulBeginSectInfo;
-<a name="l00146"></a>00146         <span class="keywordtype">size_t</span>  tSectInfoLen, tIndex, tOffset, tLen, tBytes;
-<a name="l00147"></a>00147         UCHAR   aucTmp[1];
-<a name="l00148"></a>00148 
-<a name="l00149"></a>00149         fail(pFile == NULL || aucHeader == NULL);
-<a name="l00150"></a>00150 
-<a name="l00151"></a>00151         ulBeginOfText = ulGetLong(0x18, aucHeader); <span class="comment">/* fcMin */</span>
-<a name="l00152"></a>00152         NO_DBG_HEX(ulBeginOfText);
-<a name="l00153"></a>00153         ulBeginSectInfo = ulGetLong(0x7c, aucHeader); <span class="comment">/* fcPlcfsed */</span>
-<a name="l00154"></a>00154         DBG_HEX(ulBeginSectInfo);
-<a name="l00155"></a>00155         tSectInfoLen = (size_t)usGetWord(0x80, aucHeader); <span class="comment">/* cbPlcfsed */</span>
-<a name="l00156"></a>00156         DBG_DEC(tSectInfoLen);
-<a name="l00157"></a>00157         <span class="keywordflow">if</span> (tSectInfoLen &lt; 4) {
-<a name="l00158"></a>00158                 DBG_DEC(tSectInfoLen);
-<a name="l00159"></a>00159                 <span class="keywordflow">return</span>;
-<a name="l00160"></a>00160         }
-<a name="l00161"></a>00161 
-<a name="l00162"></a>00162         aucBuffer = xmalloc(tSectInfoLen);
-<a name="l00163"></a>00163         <span class="keywordflow">if</span> (!bReadBytes(aucBuffer, tSectInfoLen, ulBeginSectInfo, pFile)) {
-<a name="l00164"></a>00164                 aucBuffer = xfree(aucBuffer);
-<a name="l00165"></a>00165                 <span class="keywordflow">return</span>;
-<a name="l00166"></a>00166         }
-<a name="l00167"></a>00167         NO_DBG_PRINT_BLOCK(aucBuffer, tSectInfoLen);
-<a name="l00168"></a>00168 
-<a name="l00169"></a>00169         <span class="comment">/* Read the Section Descriptors */</span>
-<a name="l00170"></a>00170         tLen = (tSectInfoLen - 4) / 10;
-<a name="l00171"></a>00171         <span class="comment">/* Save the section offsets */</span>
-<a name="l00172"></a>00172         aulCharPos = xcalloc(tLen, <span class="keyword">sizeof</span>(ULONG));
-<a name="l00173"></a>00173         <span class="keywordflow">for</span> (tIndex = 0, tOffset = 0;
-<a name="l00174"></a>00174              tIndex &lt; tLen;
-<a name="l00175"></a>00175              tIndex++, tOffset += 4) {
-<a name="l00176"></a>00176                 ulTextOffset = ulGetLong(tOffset, aucBuffer);
-<a name="l00177"></a>00177                 NO_DBG_HEX(ulTextOffset);
-<a name="l00178"></a>00178                 aulCharPos[tIndex] = ulBeginOfText + ulTextOffset;
-<a name="l00179"></a>00179                 NO_DBG_HEX(aulCharPos[tIndex]);
-<a name="l00180"></a>00180         }
-<a name="l00181"></a>00181         <span class="comment">/* Save the Sepx offsets */</span>
-<a name="l00182"></a>00182         aulSectPage = xcalloc(tLen, <span class="keyword">sizeof</span>(ULONG));
-<a name="l00183"></a>00183         <span class="keywordflow">for</span> (tIndex = 0, tOffset = (tLen + 1) * 4;
-<a name="l00184"></a>00184              tIndex &lt; tLen;
-<a name="l00185"></a>00185              tIndex++, tOffset += 6) {
-<a name="l00186"></a>00186                 aulSectPage[tIndex] = ulGetLong(tOffset + 2, aucBuffer);
-<a name="l00187"></a>00187                 NO_DBG_HEX(aulSectPage[tIndex]); <span class="comment">/* fcSepx */</span>
-<a name="l00188"></a>00188         }
-<a name="l00189"></a>00189         aucBuffer = xfree(aucBuffer);
-<a name="l00190"></a>00190 
-<a name="l00191"></a>00191         <span class="comment">/* Read the Section Properties */</span>
-<a name="l00192"></a>00192         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tLen; tIndex++) {
-<a name="l00193"></a>00193                 <span class="keywordflow">if</span> (aulSectPage[tIndex] == FC_INVALID) {
-<a name="l00194"></a>00194                         vDefault2SectionInfoList(aulCharPos[tIndex]);
-<a name="l00195"></a>00195                         <span class="keywordflow">continue</span>;
-<a name="l00196"></a>00196                 }
-<a name="l00197"></a>00197                 <span class="comment">/* Get the number of bytes to read */</span>
-<a name="l00198"></a>00198                 <span class="keywordflow">if</span> (!bReadBytes(aucTmp, 1, aulSectPage[tIndex], pFile)) {
-<a name="l00199"></a>00199                         <span class="keywordflow">continue</span>;
-<a name="l00200"></a>00200                 }
-<a name="l00201"></a>00201                 tBytes = 1 + (size_t)ucGetByte(0, aucTmp);
-<a name="l00202"></a>00202                 NO_DBG_DEC(tBytes);
-<a name="l00203"></a>00203                 <span class="comment">/* Read the bytes */</span>
-<a name="l00204"></a>00204                 aucFpage = xmalloc(tBytes);
-<a name="l00205"></a>00205                 <span class="keywordflow">if</span> (!bReadBytes(aucFpage, tBytes, aulSectPage[tIndex], pFile)) {
-<a name="l00206"></a>00206                         aucFpage = xfree(aucFpage);
-<a name="l00207"></a>00207                         <span class="keywordflow">continue</span>;
-<a name="l00208"></a>00208                 }
-<a name="l00209"></a>00209                 NO_DBG_PRINT_BLOCK(aucFpage, tBytes);
-<a name="l00210"></a>00210                 <span class="comment">/* Process the bytes */</span>
-<a name="l00211"></a>00211                 vGetDefaultSection(&amp;tSection);
-<a name="l00212"></a>00212                 vGet2SectionInfo(aucFpage + 1, tBytes - 1, &amp;tSection);
-<a name="l00213"></a>00213                 vAdd2SectionInfoList(&amp;tSection, aulCharPos[tIndex]);
-<a name="l00214"></a>00214                 aucFpage = xfree(aucFpage);
-<a name="l00215"></a>00215         }
-<a name="l00216"></a>00216         aulCharPos = xfree(aulCharPos);
-<a name="l00217"></a>00217         aulSectPage = xfree(aulSectPage);
-<a name="l00218"></a>00218 } <span class="comment">/* end of vGet2SepInfo */</span>
-<a name="l00219"></a>00219 
-<a name="l00220"></a>00220 <span class="comment">/*</span>
-<a name="l00221"></a>00221 <span class="comment"> * Build the list with Header/Footer Information for WinWord 1/2 files</span>
-<a name="l00222"></a>00222 <span class="comment"> */</span>
-<a name="l00223"></a>00223 <span class="keywordtype">void</span>
-<a name="l00224"></a>00224 vGet2HdrFtrInfo(FILE *pFile, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00225"></a>00225 {
-<a name="l00226"></a>00226         ULONG   *aulCharPos;
-<a name="l00227"></a>00227         UCHAR   *aucBuffer;
-<a name="l00228"></a>00228         ULONG   ulHdrFtrOffset, ulBeginHdrFtrInfo;
-<a name="l00229"></a>00229         <span class="keywordtype">size_t</span>  tHdrFtrInfoLen, tIndex, tOffset, tLen;
-<a name="l00230"></a>00230 
-<a name="l00231"></a>00231         fail(pFile == NULL || aucHeader == NULL);
-<a name="l00232"></a>00232 
-<a name="l00233"></a>00233         ulBeginHdrFtrInfo = ulGetLong(0x9a, aucHeader); <span class="comment">/* fcPlcfhdd */</span>
-<a name="l00234"></a>00234         NO_DBG_HEX(ulBeginHdrFtrInfo);
-<a name="l00235"></a>00235         tHdrFtrInfoLen = (size_t)usGetWord(0x9e, aucHeader); <span class="comment">/* cbPlcfhdd */</span>
-<a name="l00236"></a>00236         NO_DBG_DEC(tHdrFtrInfoLen);
-<a name="l00237"></a>00237         <span class="keywordflow">if</span> (tHdrFtrInfoLen &lt; 8) {
-<a name="l00238"></a>00238                 DBG_DEC_C(tHdrFtrInfoLen != 0, tHdrFtrInfoLen);
-<a name="l00239"></a>00239                 <span class="keywordflow">return</span>;
-<a name="l00240"></a>00240         }
-<a name="l00241"></a>00241 
-<a name="l00242"></a>00242         aucBuffer = xmalloc(tHdrFtrInfoLen);
-<a name="l00243"></a>00243         <span class="keywordflow">if</span> (!bReadBytes(aucBuffer, tHdrFtrInfoLen, ulBeginHdrFtrInfo, pFile)) {
-<a name="l00244"></a>00244                 aucBuffer = xfree(aucBuffer);
-<a name="l00245"></a>00245                 <span class="keywordflow">return</span>;
-<a name="l00246"></a>00246         }
-<a name="l00247"></a>00247         NO_DBG_PRINT_BLOCK(aucBuffer, tHdrFtrInfoLen);
-<a name="l00248"></a>00248 
-<a name="l00249"></a>00249         tLen = tHdrFtrInfoLen / 4 - 1;
-<a name="l00250"></a>00250         <span class="comment">/* Save the header/footer offsets */</span>
-<a name="l00251"></a>00251         aulCharPos = xcalloc(tLen, <span class="keyword">sizeof</span>(ULONG));
-<a name="l00252"></a>00252         <span class="keywordflow">for</span> (tIndex = 0, tOffset = 0;
-<a name="l00253"></a>00253              tIndex &lt; tLen;
-<a name="l00254"></a>00254              tIndex++, tOffset += 4) {
-<a name="l00255"></a>00255                 ulHdrFtrOffset = ulGetLong(tOffset, aucBuffer);
-<a name="l00256"></a>00256                 NO_DBG_HEX(ulHdrFtrOffset);
-<a name="l00257"></a>00257                 aulCharPos[tIndex] = ulHdrFtrOffset2CharPos(ulHdrFtrOffset);
-<a name="l00258"></a>00258                 NO_DBG_HEX(aulCharPos[tIndex]);
-<a name="l00259"></a>00259         }
-<a name="l00260"></a>00260         vCreat2HdrFtrInfoList(aulCharPos, tLen);
-<a name="l00261"></a>00261         aulCharPos = xfree(aulCharPos);
-<a name="l00262"></a>00262         aucBuffer = xfree(aucBuffer);
-<a name="l00263"></a>00263 } <span class="comment">/* end of vGet2HdrFtrInfo */</span>
-<a name="l00264"></a>00264 
-<a name="l00265"></a>00265 <span class="comment">/*</span>
-<a name="l00266"></a>00266 <span class="comment"> * Translate the rowinfo to a member of the row_info enumeration</span>
-<a name="l00267"></a>00267 <span class="comment"> */</span>
-<a name="l00268"></a>00268 row_info_enum
-<a name="l00269"></a>00269 eGet2RowInfo(<span class="keywordtype">int</span> iFodo,
-<a name="l00270"></a>00270         <span class="keyword">const</span> UCHAR *aucGrpprl, <span class="keywordtype">int</span> iBytes, row_block_type *pRow)
-<a name="l00271"></a>00271 {
-<a name="l00272"></a>00272         <span class="keywordtype">int</span>     iFodoOff, iInfoLen;
-<a name="l00273"></a>00273         <span class="keywordtype">int</span>     iIndex, iSize, iCol;
-<a name="l00274"></a>00274         <span class="keywordtype">int</span>     iPosCurr, iPosPrev;
-<a name="l00275"></a>00275         USHORT  usTmp;
-<a name="l00276"></a>00276         BOOL    bFound24_0, bFound24_1, bFound25_0, bFound25_1, bFound154;
-<a name="l00277"></a>00277 
-<a name="l00278"></a>00278         fail(iFodo &lt; 0 || aucGrpprl == NULL || pRow == NULL);
-<a name="l00279"></a>00279 
-<a name="l00280"></a>00280         iFodoOff = 0;
-<a name="l00281"></a>00281         bFound24_0 = FALSE;
-<a name="l00282"></a>00282         bFound24_1 = FALSE;
-<a name="l00283"></a>00283         bFound25_0 = FALSE;
-<a name="l00284"></a>00284         bFound25_1 = FALSE;
-<a name="l00285"></a>00285         bFound154 = FALSE;
-<a name="l00286"></a>00286         <span class="keywordflow">while</span> (iBytes &gt;= iFodoOff + 1) {
-<a name="l00287"></a>00287                 iInfoLen = 0;
-<a name="l00288"></a>00288                 <span class="keywordflow">switch</span> (ucGetByte(iFodo + iFodoOff, aucGrpprl)) {
-<a name="l00289"></a>00289                 <span class="keywordflow">case</span>  24:       <span class="comment">/* fIntable */</span>
-<a name="l00290"></a>00290                         <span class="keywordflow">if</span> (odd(ucGetByte(iFodo + iFodoOff + 1, aucGrpprl))) {
-<a name="l00291"></a>00291                                 bFound24_1 = TRUE;
-<a name="l00292"></a>00292                         } <span class="keywordflow">else</span> {
-<a name="l00293"></a>00293                                 bFound24_0 = TRUE;
-<a name="l00294"></a>00294                         }
-<a name="l00295"></a>00295                         <span class="keywordflow">break</span>;
-<a name="l00296"></a>00296                 <span class="keywordflow">case</span>  25:       <span class="comment">/* fTtp */</span>
-<a name="l00297"></a>00297                         <span class="keywordflow">if</span> (odd(ucGetByte(iFodo + iFodoOff + 1, aucGrpprl))) {
-<a name="l00298"></a>00298                                 bFound25_1 = TRUE;
-<a name="l00299"></a>00299                         } <span class="keywordflow">else</span> {
-<a name="l00300"></a>00300                                 bFound25_0 = TRUE;
-<a name="l00301"></a>00301                         }
-<a name="l00302"></a>00302                         <span class="keywordflow">break</span>;
-<a name="l00303"></a>00303                 <span class="keywordflow">case</span> 30:        <span class="comment">/* brcTop10 */</span>
-<a name="l00304"></a>00304                         usTmp = usGetWord(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00305"></a>00305                         usTmp &amp;= 0x01ff;
-<a name="l00306"></a>00306                         NO_DBG_DEC(usTmp &gt;&gt; 6);
-<a name="l00307"></a>00307                         <span class="keywordflow">if</span> (usTmp == 0) {
-<a name="l00308"></a>00308                                 pRow-&gt;ucBorderInfo &amp;= ~TABLE_BORDER_TOP;
-<a name="l00309"></a>00309                         } <span class="keywordflow">else</span> {
-<a name="l00310"></a>00310                                 pRow-&gt;ucBorderInfo |= TABLE_BORDER_TOP;
-<a name="l00311"></a>00311                         }
-<a name="l00312"></a>00312                         <span class="keywordflow">break</span>;
-<a name="l00313"></a>00313                 <span class="keywordflow">case</span> 31:        <span class="comment">/* brcLeft10 */</span>
-<a name="l00314"></a>00314                         usTmp = usGetWord(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00315"></a>00315                         usTmp &amp;= 0x01ff;
-<a name="l00316"></a>00316                         NO_DBG_DEC(usTmp &gt;&gt; 6);
-<a name="l00317"></a>00317                         <span class="keywordflow">if</span> (usTmp == 0) {
-<a name="l00318"></a>00318                                 pRow-&gt;ucBorderInfo &amp;= ~TABLE_BORDER_LEFT;
-<a name="l00319"></a>00319                         } <span class="keywordflow">else</span> {
-<a name="l00320"></a>00320                                 pRow-&gt;ucBorderInfo |= TABLE_BORDER_LEFT;
-<a name="l00321"></a>00321                         }
-<a name="l00322"></a>00322                         <span class="keywordflow">break</span>;
-<a name="l00323"></a>00323                 <span class="keywordflow">case</span> 32:        <span class="comment">/* brcBottom10 */</span>
-<a name="l00324"></a>00324                         usTmp = usGetWord(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00325"></a>00325                         usTmp &amp;= 0x01ff;
-<a name="l00326"></a>00326                         NO_DBG_DEC(usTmp &gt;&gt; 6);
-<a name="l00327"></a>00327                         <span class="keywordflow">if</span> (usTmp == 0) {
-<a name="l00328"></a>00328                                 pRow-&gt;ucBorderInfo &amp;= ~TABLE_BORDER_BOTTOM;
-<a name="l00329"></a>00329                         } <span class="keywordflow">else</span> {
-<a name="l00330"></a>00330                                 pRow-&gt;ucBorderInfo |= TABLE_BORDER_BOTTOM;
-<a name="l00331"></a>00331                         }
-<a name="l00332"></a>00332                         <span class="keywordflow">break</span>;
-<a name="l00333"></a>00333                 <span class="keywordflow">case</span> 33:        <span class="comment">/* brcRight10 */</span>
-<a name="l00334"></a>00334                         usTmp = usGetWord(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00335"></a>00335                         usTmp &amp;= 0x01ff;
-<a name="l00336"></a>00336                         NO_DBG_DEC(usTmp &gt;&gt; 6);
-<a name="l00337"></a>00337                         <span class="keywordflow">if</span> (usTmp == 0) {
-<a name="l00338"></a>00338                                 pRow-&gt;ucBorderInfo &amp;= ~TABLE_BORDER_RIGHT;
-<a name="l00339"></a>00339                         } <span class="keywordflow">else</span> {
-<a name="l00340"></a>00340                                 pRow-&gt;ucBorderInfo |= TABLE_BORDER_RIGHT;
-<a name="l00341"></a>00341                         }
-<a name="l00342"></a>00342                         <span class="keywordflow">break</span>;
-<a name="l00343"></a>00343                 <span class="keywordflow">case</span> 38:        <span class="comment">/* brcTop */</span>
-<a name="l00344"></a>00344                         usTmp = usGetWord(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00345"></a>00345                         usTmp &amp;= 0x0018;
-<a name="l00346"></a>00346                         NO_DBG_DEC(usTmp &gt;&gt; 3);
-<a name="l00347"></a>00347                         <span class="keywordflow">if</span> (usTmp == 0) {
-<a name="l00348"></a>00348                                 pRow-&gt;ucBorderInfo &amp;= ~TABLE_BORDER_TOP;
-<a name="l00349"></a>00349                         } <span class="keywordflow">else</span> {
-<a name="l00350"></a>00350                                 pRow-&gt;ucBorderInfo |= TABLE_BORDER_TOP;
-<a name="l00351"></a>00351                         }
-<a name="l00352"></a>00352                         <span class="keywordflow">break</span>;
-<a name="l00353"></a>00353                 <span class="keywordflow">case</span> 39:        <span class="comment">/* brcLeft */</span>
-<a name="l00354"></a>00354                         usTmp = usGetWord(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00355"></a>00355                         usTmp &amp;= 0x0018;
-<a name="l00356"></a>00356                         NO_DBG_DEC(usTmp &gt;&gt; 3);
-<a name="l00357"></a>00357                         <span class="keywordflow">if</span> (usTmp == 0) {
-<a name="l00358"></a>00358                                 pRow-&gt;ucBorderInfo &amp;= ~TABLE_BORDER_LEFT;
-<a name="l00359"></a>00359                         } <span class="keywordflow">else</span> {
-<a name="l00360"></a>00360                                 pRow-&gt;ucBorderInfo |= TABLE_BORDER_LEFT;
-<a name="l00361"></a>00361                         }
-<a name="l00362"></a>00362                         <span class="keywordflow">break</span>;
-<a name="l00363"></a>00363                 <span class="keywordflow">case</span> 40:        <span class="comment">/* brcBottom */</span>
-<a name="l00364"></a>00364                         usTmp = usGetWord(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00365"></a>00365                         usTmp &amp;= 0x0018;
-<a name="l00366"></a>00366                         NO_DBG_DEC(usTmp &gt;&gt; 3);
-<a name="l00367"></a>00367                         <span class="keywordflow">if</span> (usTmp == 0) {
-<a name="l00368"></a>00368                                 pRow-&gt;ucBorderInfo &amp;= ~TABLE_BORDER_BOTTOM;
-<a name="l00369"></a>00369                         } <span class="keywordflow">else</span> {
-<a name="l00370"></a>00370                                 pRow-&gt;ucBorderInfo |= TABLE_BORDER_BOTTOM;
-<a name="l00371"></a>00371                         }
-<a name="l00372"></a>00372                         <span class="keywordflow">break</span>;
-<a name="l00373"></a>00373                 <span class="keywordflow">case</span> 41:        <span class="comment">/* brcRight */</span>
-<a name="l00374"></a>00374                         usTmp = usGetWord(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00375"></a>00375                         usTmp &amp;= 0x0018;
-<a name="l00376"></a>00376                         NO_DBG_DEC(usTmp &gt;&gt; 3);
-<a name="l00377"></a>00377                         <span class="keywordflow">if</span> (usTmp == 0) {
-<a name="l00378"></a>00378                                 pRow-&gt;ucBorderInfo &amp;= ~TABLE_BORDER_RIGHT;
-<a name="l00379"></a>00379                         } <span class="keywordflow">else</span> {
-<a name="l00380"></a>00380                                 pRow-&gt;ucBorderInfo |= TABLE_BORDER_RIGHT;
-<a name="l00381"></a>00381                         }
-<a name="l00382"></a>00382                         <span class="keywordflow">break</span>;
-<a name="l00383"></a>00383                 <span class="keywordflow">case</span> 152:       <span class="comment">/* cDefTable10 */</span>
-<a name="l00384"></a>00384                 <span class="keywordflow">case</span> 154:       <span class="comment">/* cDefTable */</span>
-<a name="l00385"></a>00385                         iSize = (int)usGetWord(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00386"></a>00386                         <span class="keywordflow">if</span> (iSize &lt; 6 || iBytes &lt; iFodoOff + 7) {
-<a name="l00387"></a>00387                                 DBG_DEC(iSize);
-<a name="l00388"></a>00388                                 DBG_DEC(iBytes);
-<a name="l00389"></a>00389                                 DBG_DEC(iFodoOff);
-<a name="l00390"></a>00390                                 iInfoLen = 1;
-<a name="l00391"></a>00391                                 <span class="keywordflow">break</span>;
-<a name="l00392"></a>00392                         }
-<a name="l00393"></a>00393                         iCol = (int)ucGetByte(iFodo + iFodoOff + 3, aucGrpprl);
-<a name="l00394"></a>00394                         <span class="keywordflow">if</span> (iCol &lt; 1 ||
-<a name="l00395"></a>00395                             iBytes &lt; iFodoOff + 3 + (iCol + 1) * 2) {
-<a name="l00396"></a>00396                                 DBG_DEC(iCol);
-<a name="l00397"></a>00397                                 DBG_DEC(iBytes);
-<a name="l00398"></a>00398                                 DBG_DEC(iFodoOff);
-<a name="l00399"></a>00399                                 DBG_DEC(ucGetByte(iFodo + iFodoOff, aucGrpprl));
-<a name="l00400"></a>00400                                 iInfoLen = 1;
-<a name="l00401"></a>00401                                 <span class="keywordflow">break</span>;
-<a name="l00402"></a>00402                         }
-<a name="l00403"></a>00403                         <span class="keywordflow">if</span> (iCol &gt;= (<span class="keywordtype">int</span>)elementsof(pRow-&gt;asColumnWidth)) {
-<a name="l00404"></a>00404                                 DBG_DEC(iCol);
-<a name="l00405"></a>00405                                 werr(1, <span class="stringliteral">&quot;The number of columns is corrupt&quot;</span>);
-<a name="l00406"></a>00406                         }
-<a name="l00407"></a>00407                         pRow-&gt;ucNumberOfColumns = (UCHAR)iCol;
-<a name="l00408"></a>00408                         iPosPrev = (int)(<span class="keywordtype">short</span>)usGetWord(
-<a name="l00409"></a>00409                                         iFodo + iFodoOff + 4,
-<a name="l00410"></a>00410                                         aucGrpprl);
-<a name="l00411"></a>00411                         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; iCol; iIndex++) {
-<a name="l00412"></a>00412                                 iPosCurr = (int)(<span class="keywordtype">short</span>)usGetWord(
-<a name="l00413"></a>00413                                         iFodo + iFodoOff + 6 + iIndex * 2,
-<a name="l00414"></a>00414                                         aucGrpprl);
-<a name="l00415"></a>00415                                 pRow-&gt;asColumnWidth[iIndex] =
-<a name="l00416"></a>00416                                                 (short)(iPosCurr - iPosPrev);
-<a name="l00417"></a>00417                                 iPosPrev = iPosCurr;
-<a name="l00418"></a>00418                         }
-<a name="l00419"></a>00419                         bFound154 = TRUE;
-<a name="l00420"></a>00420                         <span class="keywordflow">break</span>;
-<a name="l00421"></a>00421                 <span class="keywordflow">default</span>:
-<a name="l00422"></a>00422                         <span class="keywordflow">break</span>;
-<a name="l00423"></a>00423                 }
-<a name="l00424"></a>00424                 <span class="keywordflow">if</span> (iInfoLen &lt;= 0) {
-<a name="l00425"></a>00425                         iInfoLen =
-<a name="l00426"></a>00426                                 iGet2InfoLength(iFodo + iFodoOff, aucGrpprl);
-<a name="l00427"></a>00427                         fail(iInfoLen &lt;= 0);
-<a name="l00428"></a>00428                 }
-<a name="l00429"></a>00429                 iFodoOff += iInfoLen;
-<a name="l00430"></a>00430         }
-<a name="l00431"></a>00431         <span class="keywordflow">if</span> (bFound24_1 &amp;&amp; bFound25_1 &amp;&amp; bFound154) {
-<a name="l00432"></a>00432                 <span class="keywordflow">return</span> found_end_of_row;
-<a name="l00433"></a>00433         }
-<a name="l00434"></a>00434         <span class="keywordflow">if</span> (bFound24_0 &amp;&amp; bFound25_0 &amp;&amp; !bFound154) {
-<a name="l00435"></a>00435                 <span class="keywordflow">return</span> found_not_end_of_row;
-<a name="l00436"></a>00436         }
-<a name="l00437"></a>00437         <span class="keywordflow">if</span> (bFound24_1) {
-<a name="l00438"></a>00438                 <span class="keywordflow">return</span> found_a_cell;
-<a name="l00439"></a>00439         }
-<a name="l00440"></a>00440         <span class="keywordflow">if</span> (bFound24_0) {
-<a name="l00441"></a>00441                 <span class="keywordflow">return</span> found_not_a_cell;
-<a name="l00442"></a>00442         }
-<a name="l00443"></a>00443         <span class="keywordflow">return</span> found_nothing;
-<a name="l00444"></a>00444 } <span class="comment">/* end of eGet2RowInfo */</span>
-<a name="l00445"></a>00445 
-<a name="l00446"></a>00446 <span class="comment">/*</span>
-<a name="l00447"></a>00447 <span class="comment"> * Fill the style information block with information</span>
-<a name="l00448"></a>00448 <span class="comment"> * from a WinWord 1/2 file.</span>
-<a name="l00449"></a>00449 <span class="comment"> */</span>
-<a name="l00450"></a>00450 <span class="keywordtype">void</span>
-<a name="l00451"></a>00451 vGet2StyleInfo(<span class="keywordtype">int</span> iFodo,
-<a name="l00452"></a>00452         <span class="keyword">const</span> UCHAR *aucGrpprl, <span class="keywordtype">int</span> iBytes, style_block_type *pStyle)
-<a name="l00453"></a>00453 {
-<a name="l00454"></a>00454         <span class="keywordtype">int</span>     iFodoOff, iInfoLen;
-<a name="l00455"></a>00455         <span class="keywordtype">int</span>     iTmp, iDel, iAdd;
-<a name="l00456"></a>00456         <span class="keywordtype">short</span>   sTmp;
-<a name="l00457"></a>00457         UCHAR   ucTmp;
-<a name="l00458"></a>00458 
-<a name="l00459"></a>00459         fail(iFodo &lt; 0 || aucGrpprl == NULL || pStyle == NULL);
-<a name="l00460"></a>00460 
-<a name="l00461"></a>00461         NO_DBG_DEC(pStyle-&gt;usIstd);
-<a name="l00462"></a>00462 
-<a name="l00463"></a>00463         iFodoOff = 0;
-<a name="l00464"></a>00464         <span class="keywordflow">while</span> (iBytes &gt;= iFodoOff + 1) {
-<a name="l00465"></a>00465                 iInfoLen = 0;
-<a name="l00466"></a>00466                 <span class="keywordflow">switch</span> (ucGetByte(iFodo + iFodoOff, aucGrpprl)) {
-<a name="l00467"></a>00467                 <span class="keywordflow">case</span>   2:       <span class="comment">/* istd */</span>
-<a name="l00468"></a>00468                         sTmp = (short)ucGetByte(
-<a name="l00469"></a>00469                                         iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00470"></a>00470                         NO_DBG_DEC(sTmp);
-<a name="l00471"></a>00471                         <span class="keywordflow">break</span>;
-<a name="l00472"></a>00472                 <span class="keywordflow">case</span>   5:       <span class="comment">/* jc */</span>
-<a name="l00473"></a>00473                         pStyle-&gt;ucAlignment = ucGetByte(
-<a name="l00474"></a>00474                                         iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00475"></a>00475                         <span class="keywordflow">break</span>;
-<a name="l00476"></a>00476                 <span class="keywordflow">case</span>  12:       <span class="comment">/* nfcSeqNumb */</span>
-<a name="l00477"></a>00477                         pStyle-&gt;ucNFC = ucGetByte(
-<a name="l00478"></a>00478                                         iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00479"></a>00479                         <span class="keywordflow">break</span>;
-<a name="l00480"></a>00480                 <span class="keywordflow">case</span>  13:       <span class="comment">/* nLvlAnm */</span>
-<a name="l00481"></a>00481                         ucTmp = ucGetByte(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00482"></a>00482                         pStyle-&gt;ucNumLevel = ucTmp;
-<a name="l00483"></a>00483                         pStyle-&gt;bNumPause =
-<a name="l00484"></a>00484                                 eGetNumType(ucTmp) == level_type_pause;
-<a name="l00485"></a>00485                         <span class="keywordflow">break</span>;
-<a name="l00486"></a>00486                 <span class="keywordflow">case</span>  15:       <span class="comment">/* ChgTabsPapx */</span>
-<a name="l00487"></a>00487                 <span class="keywordflow">case</span>  23:       <span class="comment">/* ChgTabs */</span>
-<a name="l00488"></a>00488                         iTmp = (int)ucGetByte(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00489"></a>00489                         <span class="keywordflow">if</span> (iTmp &lt; 2) {
-<a name="l00490"></a>00490                                 iInfoLen = 1;
-<a name="l00491"></a>00491                                 <span class="keywordflow">break</span>;
-<a name="l00492"></a>00492                         }
-<a name="l00493"></a>00493                         NO_DBG_DEC(iTmp);
-<a name="l00494"></a>00494                         iDel = (int)ucGetByte(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l00495"></a>00495                         <span class="keywordflow">if</span> (iTmp &lt; 2 + 2 * iDel) {
-<a name="l00496"></a>00496                                 iInfoLen = 1;
-<a name="l00497"></a>00497                                 <span class="keywordflow">break</span>;
-<a name="l00498"></a>00498                         }
-<a name="l00499"></a>00499                         NO_DBG_DEC(iDel);
-<a name="l00500"></a>00500                         iAdd = (int)ucGetByte(
-<a name="l00501"></a>00501                                 iFodo + iFodoOff + 3 + 2 * iDel, aucGrpprl);
-<a name="l00502"></a>00502                         <span class="keywordflow">if</span> (iTmp &lt; 2 + 2 * iDel + 2 * iAdd) {
-<a name="l00503"></a>00503                                 iInfoLen = 1;
-<a name="l00504"></a>00504                                 <span class="keywordflow">break</span>;
-<a name="l00505"></a>00505                         }
-<a name="l00506"></a>00506                         NO_DBG_DEC(iAdd);
-<a name="l00507"></a>00507                         <span class="keywordflow">break</span>;
-<a name="l00508"></a>00508                 <span class="keywordflow">case</span>  16:       <span class="comment">/* dxaRight */</span>
-<a name="l00509"></a>00509                         pStyle-&gt;sRightIndent = (short)usGetWord(
-<a name="l00510"></a>00510                                         iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00511"></a>00511                         NO_DBG_DEC(pStyle-&gt;sRightIndent);
-<a name="l00512"></a>00512                         <span class="keywordflow">break</span>;
-<a name="l00513"></a>00513                 <span class="keywordflow">case</span>  17:       <span class="comment">/* dxaLeft */</span>
-<a name="l00514"></a>00514                         pStyle-&gt;sLeftIndent = (short)usGetWord(
-<a name="l00515"></a>00515                                         iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00516"></a>00516                         NO_DBG_DEC(pStyle-&gt;sLeftIndent);
-<a name="l00517"></a>00517                         <span class="keywordflow">break</span>;
-<a name="l00518"></a>00518                 <span class="keywordflow">case</span>  18:       <span class="comment">/* Nest dxaLeft */</span>
-<a name="l00519"></a>00519                         sTmp = (short)usGetWord(
-<a name="l00520"></a>00520                                         iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00521"></a>00521                         pStyle-&gt;sLeftIndent += sTmp;
-<a name="l00522"></a>00522                         <span class="keywordflow">if</span> (pStyle-&gt;sLeftIndent &lt; 0) {
-<a name="l00523"></a>00523                                 pStyle-&gt;sLeftIndent = 0;
-<a name="l00524"></a>00524                         }
-<a name="l00525"></a>00525                         NO_DBG_DEC(sTmp);
-<a name="l00526"></a>00526                         NO_DBG_DEC(pStyle-&gt;sLeftIndent);
-<a name="l00527"></a>00527                         <span class="keywordflow">break</span>;
-<a name="l00528"></a>00528                 <span class="keywordflow">case</span>  19:       <span class="comment">/* dxaLeft1 */</span>
-<a name="l00529"></a>00529                         pStyle-&gt;sLeftIndent1 = (short)usGetWord(
-<a name="l00530"></a>00530                                         iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00531"></a>00531                         NO_DBG_DEC(pStyle-&gt;sLeftIndent1);
-<a name="l00532"></a>00532                         <span class="keywordflow">break</span>;
-<a name="l00533"></a>00533                 <span class="keywordflow">case</span>  21:       <span class="comment">/* dyaBefore */</span>
-<a name="l00534"></a>00534                         pStyle-&gt;usBeforeIndent = usGetWord(
-<a name="l00535"></a>00535                                         iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00536"></a>00536                         NO_DBG_DEC(pStyle-&gt;usBeforeIndent);
-<a name="l00537"></a>00537                         <span class="keywordflow">break</span>;
-<a name="l00538"></a>00538                 <span class="keywordflow">case</span>  22:       <span class="comment">/* dyaAfter */</span>
-<a name="l00539"></a>00539                         pStyle-&gt;usAfterIndent = usGetWord(
-<a name="l00540"></a>00540                                         iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00541"></a>00541                         NO_DBG_DEC(pStyle-&gt;usAfterIndent);
-<a name="l00542"></a>00542                         <span class="keywordflow">break</span>;
-<a name="l00543"></a>00543                 <span class="keywordflow">default</span>:
-<a name="l00544"></a>00544                         <span class="keywordflow">break</span>;
-<a name="l00545"></a>00545                 }
-<a name="l00546"></a>00546                 <span class="keywordflow">if</span> (iInfoLen &lt;= 0) {
-<a name="l00547"></a>00547                         iInfoLen =
-<a name="l00548"></a>00548                                 iGet2InfoLength(iFodo + iFodoOff, aucGrpprl);
-<a name="l00549"></a>00549                         fail(iInfoLen &lt;= 0);
-<a name="l00550"></a>00550                 }
-<a name="l00551"></a>00551                 iFodoOff += iInfoLen;
-<a name="l00552"></a>00552         }
-<a name="l00553"></a>00553 } <span class="comment">/* end of vGet2StyleInfo */</span>
-<a name="l00554"></a>00554 
-<a name="l00555"></a>00555 <span class="comment">/*</span>
-<a name="l00556"></a>00556 <span class="comment"> * Build the lists with Paragraph Information for WinWord 1/2 files</span>
-<a name="l00557"></a>00557 <span class="comment"> */</span>
-<a name="l00558"></a>00558 <span class="keywordtype">void</span>
-<a name="l00559"></a>00559 vGet2PapInfo(FILE *pFile, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00560"></a>00560 {
-<a name="l00561"></a>00561         row_block_type          tRow;
-<a name="l00562"></a>00562         style_block_type        tStyle;
-<a name="l00563"></a>00563         USHORT  *ausParfPage;
-<a name="l00564"></a>00564         UCHAR   *aucBuffer;
-<a name="l00565"></a>00565         ULONG   ulCharPos, ulCharPosFirst, ulCharPosLast;
-<a name="l00566"></a>00566         ULONG   ulBeginParfInfo;
-<a name="l00567"></a>00567         <span class="keywordtype">size_t</span>  tParfInfoLen, tParfPageNum, tOffset, tSize, tLenOld, tLen;
-<a name="l00568"></a>00568         <span class="keywordtype">int</span>     iIndex, iIndex2, iRun, iFodo, iLen;
-<a name="l00569"></a>00569         row_info_enum   eRowInfo;
-<a name="l00570"></a>00570         USHORT  usParfFirstPage, usCount, usIstd;
-<a name="l00571"></a>00571         UCHAR   ucStc;
-<a name="l00572"></a>00572         UCHAR   aucFpage[BIG_BLOCK_SIZE];
-<a name="l00573"></a>00573 
-<a name="l00574"></a>00574         fail(pFile == NULL || aucHeader == NULL);
-<a name="l00575"></a>00575 
-<a name="l00576"></a>00576         ulBeginParfInfo = ulGetLong(0xa6, aucHeader); <span class="comment">/* fcPlcfbtePapx */</span>
-<a name="l00577"></a>00577         NO_DBG_HEX(ulBeginParfInfo);
-<a name="l00578"></a>00578         tParfInfoLen = (size_t)usGetWord(0xaa, aucHeader); <span class="comment">/* cbPlcfbtePapx */</span>
-<a name="l00579"></a>00579         NO_DBG_DEC(tParfInfoLen);
-<a name="l00580"></a>00580         <span class="keywordflow">if</span> (tParfInfoLen &lt; 4) {
-<a name="l00581"></a>00581                 DBG_DEC(tParfInfoLen);
-<a name="l00582"></a>00582                 <span class="keywordflow">return</span>;
-<a name="l00583"></a>00583         }
-<a name="l00584"></a>00584 
-<a name="l00585"></a>00585         aucBuffer = xmalloc(tParfInfoLen);
-<a name="l00586"></a>00586         <span class="keywordflow">if</span> (!bReadBytes(aucBuffer, tParfInfoLen, ulBeginParfInfo, pFile)) {
-<a name="l00587"></a>00587                 aucBuffer = xfree(aucBuffer);
-<a name="l00588"></a>00588                 <span class="keywordflow">return</span>;
-<a name="l00589"></a>00589         }
-<a name="l00590"></a>00590         NO_DBG_PRINT_BLOCK(aucBuffer, tParfInfoLen);
-<a name="l00591"></a>00591 
-<a name="l00592"></a>00592         tLen = (tParfInfoLen - 4) / 6;
-<a name="l00593"></a>00593         ausParfPage = xcalloc(tLen, <span class="keyword">sizeof</span>(USHORT));
-<a name="l00594"></a>00594         <span class="keywordflow">for</span> (iIndex = 0, tOffset = (tLen + 1) * 4;
-<a name="l00595"></a>00595              iIndex &lt; (int)tLen;
-<a name="l00596"></a>00596              iIndex++, tOffset += 2) {
-<a name="l00597"></a>00597                 ausParfPage[iIndex] = usGetWord(tOffset, aucBuffer);
-<a name="l00598"></a>00598                 NO_DBG_DEC(ausParfPage[iIndex]);
-<a name="l00599"></a>00599         }
-<a name="l00600"></a>00600         DBG_HEX(ulGetLong(0, aucBuffer));
-<a name="l00601"></a>00601         aucBuffer = xfree(aucBuffer);
-<a name="l00602"></a>00602         tParfPageNum = (size_t)usGetWord(0x144, aucHeader); <span class="comment">/* cpnBtePap */</span>
-<a name="l00603"></a>00603         DBG_DEC(tParfPageNum);
-<a name="l00604"></a>00604         <span class="keywordflow">if</span> (tLen &lt; tParfPageNum) {
-<a name="l00605"></a>00605                 <span class="comment">/* Replace ParfPage by a longer version */</span>
-<a name="l00606"></a>00606                 tLenOld = tLen;
-<a name="l00607"></a>00607                 usParfFirstPage = usGetWord(0x140, aucHeader); <span class="comment">/* pnPapFirst */</span>
-<a name="l00608"></a>00608                 DBG_DEC(usParfFirstPage);
-<a name="l00609"></a>00609                 tLen += tParfPageNum - 1;
-<a name="l00610"></a>00610                 tSize = tLen * <span class="keyword">sizeof</span>(USHORT);
-<a name="l00611"></a>00611                 ausParfPage = xrealloc(ausParfPage, tSize);
-<a name="l00612"></a>00612                 <span class="comment">/* Add new values */</span>
-<a name="l00613"></a>00613                 usCount = usParfFirstPage + 1;
-<a name="l00614"></a>00614                 <span class="keywordflow">for</span> (iIndex = (<span class="keywordtype">int</span>)tLenOld; iIndex &lt; (int)tLen; iIndex++) {
-<a name="l00615"></a>00615                         ausParfPage[iIndex] = usCount;
-<a name="l00616"></a>00616                         NO_DBG_DEC(ausParfPage[iIndex]);
-<a name="l00617"></a>00617                         usCount++;
-<a name="l00618"></a>00618                 }
-<a name="l00619"></a>00619         }
-<a name="l00620"></a>00620 
-<a name="l00621"></a>00621         (void)memset(&amp;tRow, 0, <span class="keyword">sizeof</span>(tRow));
-<a name="l00622"></a>00622         ulCharPosFirst = CP_INVALID;
-<a name="l00623"></a>00623         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; (int)tLen; iIndex++) {
-<a name="l00624"></a>00624                 <span class="keywordflow">if</span> (!bReadBytes(aucFpage, BIG_BLOCK_SIZE,
-<a name="l00625"></a>00625                                 (ULONG)ausParfPage[iIndex] * BIG_BLOCK_SIZE,
-<a name="l00626"></a>00626                                 pFile)) {
-<a name="l00627"></a>00627                         <span class="keywordflow">break</span>;
-<a name="l00628"></a>00628                 }
-<a name="l00629"></a>00629                 NO_DBG_PRINT_BLOCK(aucFpage, BIG_BLOCK_SIZE);
-<a name="l00630"></a>00630                 iRun = (int)ucGetByte(0x1ff, aucFpage);
-<a name="l00631"></a>00631                 NO_DBG_DEC(iRun);
-<a name="l00632"></a>00632                 <span class="keywordflow">for</span> (iIndex2 = 0; iIndex2 &lt; iRun; iIndex2++) {
-<a name="l00633"></a>00633                         <span class="keywordflow">if</span> ((iRun + 1) * 4 + iIndex2 * 1 &gt;= BIG_BLOCK_SIZE) {
-<a name="l00634"></a>00634                                 <span class="keywordflow">break</span>;
-<a name="l00635"></a>00635                         }
-<a name="l00636"></a>00636                         NO_DBG_HEX(ulGetLong(iIndex2 * 4, aucFpage));
-<a name="l00637"></a>00637                         iFodo = 2 * (int)ucGetByte(
-<a name="l00638"></a>00638                                 (iRun + 1) * 4 + iIndex2 * 1, aucFpage);
-<a name="l00639"></a>00639                         <span class="keywordflow">if</span> (iFodo &lt;= 0) {
-<a name="l00640"></a>00640                                 <span class="keywordflow">continue</span>;
-<a name="l00641"></a>00641                         }
-<a name="l00642"></a>00642 
-<a name="l00643"></a>00643                         iLen = 2 * (int)ucGetByte(iFodo, aucFpage);
-<a name="l00644"></a>00644 
-<a name="l00645"></a>00645                         ucStc = ucGetByte(iFodo + 1, aucFpage);
-<a name="l00646"></a>00646                         usIstd = usStc2istd(ucStc);
-<a name="l00647"></a>00647 
-<a name="l00648"></a>00648                         vFillStyleFromStylesheet(usIstd, &amp;tStyle);
-<a name="l00649"></a>00649                         vGet2StyleInfo(iFodo, aucFpage + 8, iLen - 8, &amp;tStyle);
-<a name="l00650"></a>00650                         ulCharPos = ulGetLong(iIndex2 * 4, aucFpage);
-<a name="l00651"></a>00651                         NO_DBG_HEX(ulCharPos);
-<a name="l00652"></a>00652                         tStyle.ulFileOffset = ulCharPos;
-<a name="l00653"></a>00653                         vAdd2StyleInfoList(&amp;tStyle);
-<a name="l00654"></a>00654 
-<a name="l00655"></a>00655                         eRowInfo = eGet2RowInfo(iFodo,
-<a name="l00656"></a>00656                                         aucFpage + 8, iLen - 8, &amp;tRow);
-<a name="l00657"></a>00657 
-<a name="l00658"></a>00658                         <span class="keywordflow">switch</span>(eRowInfo) {
-<a name="l00659"></a>00659                         <span class="keywordflow">case</span> found_a_cell:
-<a name="l00660"></a>00660                                 <span class="keywordflow">if</span> (ulCharPosFirst != CP_INVALID) {
-<a name="l00661"></a>00661                                         <span class="keywordflow">break</span>;
-<a name="l00662"></a>00662                                 }
-<a name="l00663"></a>00663                                 ulCharPosFirst = ulGetLong(
-<a name="l00664"></a>00664                                                 iIndex2 * 4, aucFpage);
-<a name="l00665"></a>00665                                 NO_DBG_HEX(ulCharPosFirst);
-<a name="l00666"></a>00666                                 tRow.ulCharPosStart = ulCharPosFirst;
-<a name="l00667"></a>00667                                 tRow.ulFileOffsetStart = ulCharPosFirst;
-<a name="l00668"></a>00668                                 <span class="keywordflow">break</span>;
-<a name="l00669"></a>00669                         <span class="keywordflow">case</span> found_end_of_row:
-<a name="l00670"></a>00670                                 ulCharPosLast = ulGetLong(
-<a name="l00671"></a>00671                                                 iIndex2 * 4, aucFpage);
-<a name="l00672"></a>00672                                 NO_DBG_HEX(ulCharPosLast);
-<a name="l00673"></a>00673                                 tRow.ulCharPosEnd = ulCharPosLast;
-<a name="l00674"></a>00674                                 <span class="comment">/* Add 1 for compatiblity with Word 6 and up */</span>
-<a name="l00675"></a>00675                                 tRow.ulFileOffsetEnd = ulCharPosLast + 1;
-<a name="l00676"></a>00676                                 vAdd2RowInfoList(&amp;tRow);
-<a name="l00677"></a>00677                                 (void)memset(&amp;tRow, 0, <span class="keyword">sizeof</span>(tRow));
-<a name="l00678"></a>00678                                 ulCharPosFirst = CP_INVALID;
-<a name="l00679"></a>00679                                 <span class="keywordflow">break</span>;
-<a name="l00680"></a>00680                         <span class="keywordflow">case</span> found_nothing:
-<a name="l00681"></a>00681                                 <span class="keywordflow">break</span>;
-<a name="l00682"></a>00682                         <span class="keywordflow">default</span>:
-<a name="l00683"></a>00683                                 DBG_DEC(eRowInfo);
-<a name="l00684"></a>00684                                 <span class="keywordflow">break</span>;
-<a name="l00685"></a>00685                         }
-<a name="l00686"></a>00686                 }
-<a name="l00687"></a>00687         }
-<a name="l00688"></a>00688         ausParfPage = xfree(ausParfPage);
-<a name="l00689"></a>00689 } <span class="comment">/* end of vGet2PapInfo */</span>
-<a name="l00690"></a>00690 
-<a name="l00691"></a>00691 <span class="comment">/*</span>
-<a name="l00692"></a>00692 <span class="comment"> * Fill the font information block with information</span>
-<a name="l00693"></a>00693 <span class="comment"> * from a WinWord 1 file.</span>
-<a name="l00694"></a>00694 <span class="comment"> */</span>
-<a name="l00695"></a>00695 <span class="keywordtype">void</span>
-<a name="l00696"></a>00696 vGet1FontInfo(<span class="keywordtype">int</span> iFodo,
-<a name="l00697"></a>00697         <span class="keyword">const</span> UCHAR *aucGrpprl, <span class="keywordtype">size_t</span> tBytes, font_block_type *pFont)
-<a name="l00698"></a>00698 {
-<a name="l00699"></a>00699         BOOL    bIcoChange, bFtcChange, bHpsChange, bKulChange;
-<a name="l00700"></a>00700         USHORT  usTmp;
-<a name="l00701"></a>00701         UCHAR   ucTmp;
-<a name="l00702"></a>00702         UCHAR   aucChpx[12];
-<a name="l00703"></a>00703 
-<a name="l00704"></a>00704         fail(iFodo &lt; 0 || aucGrpprl == NULL || pFont == NULL);
-<a name="l00705"></a>00705 
-<a name="l00706"></a>00706         <span class="keywordflow">if</span> (tBytes &gt; <span class="keyword">sizeof</span>(aucChpx)) {
-<a name="l00707"></a>00707                 NO_DBG_PRINT_BLOCK(aucGrpprl + iFodo, tBytes);
-<a name="l00708"></a>00708                 <span class="keywordflow">return</span>;
-<a name="l00709"></a>00709         }
-<a name="l00710"></a>00710 
-<a name="l00711"></a>00711         <span class="comment">/* Build the CHPX structure */</span>
-<a name="l00712"></a>00712         (void)memset(aucChpx, 0, <span class="keyword">sizeof</span>(aucChpx));
-<a name="l00713"></a>00713         (void)memcpy(aucChpx, aucGrpprl + iFodo, min(tBytes, <span class="keyword">sizeof</span>(aucChpx)));
-<a name="l00714"></a>00714 
-<a name="l00715"></a>00715         usTmp = usGetWord(0, aucChpx);
-<a name="l00716"></a>00716         <span class="keywordflow">if</span> ((usTmp &amp; BIT(0)) != 0) {
-<a name="l00717"></a>00717                 pFont-&gt;usFontStyle ^= FONT_BOLD;
-<a name="l00718"></a>00718         }
-<a name="l00719"></a>00719         <span class="keywordflow">if</span> ((usTmp &amp; BIT(1)) != 0) {
-<a name="l00720"></a>00720                 pFont-&gt;usFontStyle ^= FONT_ITALIC;
-<a name="l00721"></a>00721         }
-<a name="l00722"></a>00722         <span class="keywordflow">if</span> ((usTmp &amp; BIT(2)) != 0) {
-<a name="l00723"></a>00723                 pFont-&gt;usFontStyle ^= FONT_STRIKE;
-<a name="l00724"></a>00724         }
-<a name="l00725"></a>00725         <span class="keywordflow">if</span> ((usTmp &amp; BIT(5)) != 0) {
-<a name="l00726"></a>00726                 pFont-&gt;usFontStyle ^= FONT_SMALL_CAPITALS;
-<a name="l00727"></a>00727         }
-<a name="l00728"></a>00728         <span class="keywordflow">if</span> ((usTmp &amp; BIT(6)) != 0) {
-<a name="l00729"></a>00729                 pFont-&gt;usFontStyle ^= FONT_CAPITALS;
-<a name="l00730"></a>00730         }
-<a name="l00731"></a>00731         <span class="keywordflow">if</span> ((usTmp &amp; BIT(7)) != 0) {
-<a name="l00732"></a>00732                 pFont-&gt;usFontStyle ^= FONT_HIDDEN;
-<a name="l00733"></a>00733         }
-<a name="l00734"></a>00734 
-<a name="l00735"></a>00735         ucTmp = ucGetByte(5, aucChpx);
-<a name="l00736"></a>00736         <span class="keywordflow">if</span> (ucTmp != 0) {
-<a name="l00737"></a>00737                 <span class="keywordflow">if</span> (ucTmp &lt; 128) {
-<a name="l00738"></a>00738                         pFont-&gt;usFontStyle |= FONT_SUPERSCRIPT;
-<a name="l00739"></a>00739                         DBG_MSG(<span class="stringliteral">&quot;Superscript&quot;</span>);
-<a name="l00740"></a>00740                 } <span class="keywordflow">else</span> {
-<a name="l00741"></a>00741                         pFont-&gt;usFontStyle |= FONT_SUBSCRIPT;
-<a name="l00742"></a>00742                         DBG_MSG(<span class="stringliteral">&quot;Subscript&quot;</span>);
-<a name="l00743"></a>00743                 }
-<a name="l00744"></a>00744         }
-<a name="l00745"></a>00745 
-<a name="l00746"></a>00746         bIcoChange = (usTmp &amp; BIT(10)) != 0;
-<a name="l00747"></a>00747         bFtcChange = (usTmp &amp; BIT(11)) != 0;
-<a name="l00748"></a>00748         bHpsChange = (usTmp &amp; BIT(12)) != 0;
-<a name="l00749"></a>00749         bKulChange = (usTmp &amp; BIT(13)) != 0;
-<a name="l00750"></a>00750 
-<a name="l00751"></a>00751         <span class="keywordflow">if</span> (bFtcChange) {
-<a name="l00752"></a>00752                 usTmp = usGetWord(2, aucChpx);
-<a name="l00753"></a>00753                 <span class="keywordflow">if</span> (usTmp &lt;= (USHORT)UCHAR_MAX) {
-<a name="l00754"></a>00754                         pFont-&gt;ucFontNumber = (UCHAR)usTmp;
-<a name="l00755"></a>00755                 } <span class="keywordflow">else</span> {
-<a name="l00756"></a>00756                         pFont-&gt;ucFontNumber = 0;
-<a name="l00757"></a>00757                 }
-<a name="l00758"></a>00758         }
-<a name="l00759"></a>00759 
-<a name="l00760"></a>00760         <span class="keywordflow">if</span> (bHpsChange) {
-<a name="l00761"></a>00761                 pFont-&gt;usFontSize = (USHORT)ucGetByte(4, aucChpx);
-<a name="l00762"></a>00762         }
-<a name="l00763"></a>00763 
-<a name="l00764"></a>00764         <span class="keywordflow">if</span> (bIcoChange || bKulChange) {
-<a name="l00765"></a>00765                 usTmp = usGetWord(6, aucChpx);
-<a name="l00766"></a>00766                 <span class="keywordflow">if</span> (bIcoChange) {
-<a name="l00767"></a>00767                         pFont-&gt;ucFontColor = (UCHAR)((usTmp &amp; 0x0f00) &gt;&gt; 8);
-<a name="l00768"></a>00768                         <span class="keywordflow">if</span> (pFont-&gt;ucFontColor &lt;= 7) {
-<a name="l00769"></a>00769                                 <span class="comment">/* Add 1 for compatibility with Word 2 and up */</span>
-<a name="l00770"></a>00770                                 pFont-&gt;ucFontColor++;
-<a name="l00771"></a>00771                         } <span class="keywordflow">else</span> {
-<a name="l00772"></a>00772                                 DBG_DEC(pFont-&gt;ucFontColor);
-<a name="l00773"></a>00773                                 pFont-&gt;ucFontColor = 0;
-<a name="l00774"></a>00774                         }
-<a name="l00775"></a>00775                 }
-<a name="l00776"></a>00776                 <span class="keywordflow">if</span> (bKulChange) {
-<a name="l00777"></a>00777                         usTmp = (usTmp &amp; 0x7000) &gt;&gt; 12;
-<a name="l00778"></a>00778                         DBG_DEC_C(usTmp &gt; 4, usTmp);
-<a name="l00779"></a>00779                         <span class="keywordflow">if</span> (usTmp == 0) {
-<a name="l00780"></a>00780                                 pFont-&gt;usFontStyle &amp;= ~FONT_UNDERLINE;
-<a name="l00781"></a>00781                         } <span class="keywordflow">else</span> {
-<a name="l00782"></a>00782                                 pFont-&gt;usFontStyle |= FONT_UNDERLINE;
-<a name="l00783"></a>00783                         }
-<a name="l00784"></a>00784                 }
-<a name="l00785"></a>00785         }
-<a name="l00786"></a>00786 } <span class="comment">/* end of vGet1FontInfo */</span>
-<a name="l00787"></a>00787 
-<a name="l00788"></a>00788 <span class="comment">/*</span>
-<a name="l00789"></a>00789 <span class="comment"> * Fill the font information block with information</span>
-<a name="l00790"></a>00790 <span class="comment"> * from a WinWord 1/2 file.</span>
-<a name="l00791"></a>00791 <span class="comment"> */</span>
-<a name="l00792"></a>00792 <span class="keywordtype">void</span>
-<a name="l00793"></a>00793 vGet2FontInfo(<span class="keywordtype">int</span> iFodo,
-<a name="l00794"></a>00794         <span class="keyword">const</span> UCHAR *aucGrpprl, <span class="keywordtype">size_t</span> tBytes, font_block_type *pFont)
-<a name="l00795"></a>00795 {
-<a name="l00796"></a>00796         BOOL    bIcoChange, bFtcChange, bHpsChange, bKulChange;
-<a name="l00797"></a>00797         USHORT  usTmp;
-<a name="l00798"></a>00798         UCHAR   ucTmp;
-<a name="l00799"></a>00799         UCHAR   aucChpx[18];
-<a name="l00800"></a>00800 
-<a name="l00801"></a>00801         fail(iFodo &lt; 0 || aucGrpprl == NULL || pFont == NULL);
-<a name="l00802"></a>00802 
-<a name="l00803"></a>00803         <span class="keywordflow">if</span> (tBytes &gt; <span class="keyword">sizeof</span>(aucChpx)) {
-<a name="l00804"></a>00804                 NO_DBG_PRINT_BLOCK(aucGrpprl + iFodo, tBytes);
-<a name="l00805"></a>00805                 <span class="keywordflow">return</span>;
-<a name="l00806"></a>00806         }
-<a name="l00807"></a>00807 
-<a name="l00808"></a>00808         <span class="comment">/* Build the CHPX structure */</span>
-<a name="l00809"></a>00809         (void)memset(aucChpx, 0, <span class="keyword">sizeof</span>(aucChpx));
-<a name="l00810"></a>00810         (void)memcpy(aucChpx, aucGrpprl + iFodo, min(tBytes, <span class="keyword">sizeof</span>(aucChpx)));
-<a name="l00811"></a>00811 
-<a name="l00812"></a>00812         usTmp = usGetWord(0, aucChpx);
-<a name="l00813"></a>00813         <span class="keywordflow">if</span> ((usTmp &amp; BIT(0)) != 0) {
-<a name="l00814"></a>00814                 pFont-&gt;usFontStyle ^= FONT_BOLD;
-<a name="l00815"></a>00815         }
-<a name="l00816"></a>00816         <span class="keywordflow">if</span> ((usTmp &amp; BIT(1)) != 0) {
-<a name="l00817"></a>00817                 pFont-&gt;usFontStyle ^= FONT_ITALIC;
-<a name="l00818"></a>00818         }
-<a name="l00819"></a>00819         <span class="keywordflow">if</span> (usTmp &amp; BIT(3)) {
-<a name="l00820"></a>00820                 pFont-&gt;usFontStyle ^= FONT_MARKDEL;
-<a name="l00821"></a>00821         }
-<a name="l00822"></a>00822         <span class="keywordflow">if</span> ((usTmp &amp; BIT(5)) != 0) {
-<a name="l00823"></a>00823                 pFont-&gt;usFontStyle ^= FONT_SMALL_CAPITALS;
-<a name="l00824"></a>00824         }
-<a name="l00825"></a>00825         <span class="keywordflow">if</span> ((usTmp &amp; BIT(6)) != 0) {
-<a name="l00826"></a>00826                 pFont-&gt;usFontStyle ^= FONT_CAPITALS;
-<a name="l00827"></a>00827         }
-<a name="l00828"></a>00828         <span class="keywordflow">if</span> ((usTmp &amp; BIT(7)) != 0) {
-<a name="l00829"></a>00829                 pFont-&gt;usFontStyle ^= FONT_HIDDEN;
-<a name="l00830"></a>00830         }
-<a name="l00831"></a>00831         <span class="keywordflow">if</span> (usTmp &amp; BIT(10)) {
-<a name="l00832"></a>00832                 pFont-&gt;usFontStyle ^= FONT_STRIKE;
-<a name="l00833"></a>00833         }
-<a name="l00834"></a>00834 
-<a name="l00835"></a>00835         ucTmp = ucGetByte(10, aucChpx);
-<a name="l00836"></a>00836         DBG_MSG_C(ucTmp != 0 &amp;&amp; ucTmp &lt; 128, <span class="stringliteral">&quot;Superscript&quot;</span>);
-<a name="l00837"></a>00837         DBG_MSG_C(ucTmp &gt;= 128, <span class="stringliteral">&quot;Subscript&quot;</span>);
-<a name="l00838"></a>00838 
-<a name="l00839"></a>00839         usTmp = usGetWord(2, aucChpx);
-<a name="l00840"></a>00840         <span class="keywordflow">if</span> (usTmp == 0) {
-<a name="l00841"></a>00841                 <span class="comment">/* No changes, nothing to do */</span>
-<a name="l00842"></a>00842                 <span class="keywordflow">return</span>;
-<a name="l00843"></a>00843         }
-<a name="l00844"></a>00844 
-<a name="l00845"></a>00845         bIcoChange = (usTmp &amp; BIT(0)) != 0;
-<a name="l00846"></a>00846         bFtcChange = (usTmp &amp; BIT(1)) != 0;
-<a name="l00847"></a>00847         bHpsChange = (usTmp &amp; BIT(2)) != 0;
-<a name="l00848"></a>00848         bKulChange = (usTmp &amp; BIT(3)) != 0;
-<a name="l00849"></a>00849 
-<a name="l00850"></a>00850         <span class="keywordflow">if</span> (bFtcChange) {
-<a name="l00851"></a>00851                 usTmp = usGetWord(4, aucChpx);
-<a name="l00852"></a>00852                 <span class="keywordflow">if</span> (usTmp &lt;= (USHORT)UCHAR_MAX) {
-<a name="l00853"></a>00853                         pFont-&gt;ucFontNumber = (UCHAR)usTmp;
-<a name="l00854"></a>00854                 } <span class="keywordflow">else</span> {
-<a name="l00855"></a>00855                         pFont-&gt;ucFontNumber = 0;
-<a name="l00856"></a>00856                 }
-<a name="l00857"></a>00857         }
-<a name="l00858"></a>00858 
-<a name="l00859"></a>00859         <span class="keywordflow">if</span> (bHpsChange) {
-<a name="l00860"></a>00860                 pFont-&gt;usFontSize = usGetWord(6, aucChpx);
-<a name="l00861"></a>00861         }
-<a name="l00862"></a>00862 
-<a name="l00863"></a>00863         <span class="keywordflow">if</span> (bIcoChange || bKulChange) {
-<a name="l00864"></a>00864                 ucTmp = ucGetByte(9, aucChpx);
-<a name="l00865"></a>00865                 <span class="keywordflow">if</span> (bIcoChange) {
-<a name="l00866"></a>00866                         pFont-&gt;ucFontColor = ucTmp &amp; 0x1f;
-<a name="l00867"></a>00867                         <span class="keywordflow">if</span> (pFont-&gt;ucFontColor &gt; 16) {
-<a name="l00868"></a>00868                                 DBG_DEC(pFont-&gt;ucFontColor);
-<a name="l00869"></a>00869                                 pFont-&gt;ucFontColor = 0;
-<a name="l00870"></a>00870                         }
-<a name="l00871"></a>00871                 }
-<a name="l00872"></a>00872                 <span class="keywordflow">if</span> (bKulChange) {
-<a name="l00873"></a>00873                         ucTmp = (ucTmp &amp; 0xe0) &gt;&gt; 5;
-<a name="l00874"></a>00874                         DBG_DEC_C(ucTmp &gt; 4, ucTmp);
-<a name="l00875"></a>00875                         <span class="keywordflow">if</span> (ucTmp == 0) {
-<a name="l00876"></a>00876                                 pFont-&gt;usFontStyle &amp;= ~FONT_UNDERLINE;
-<a name="l00877"></a>00877                         } <span class="keywordflow">else</span> {
-<a name="l00878"></a>00878                                 pFont-&gt;usFontStyle |= FONT_UNDERLINE;
-<a name="l00879"></a>00879                         }
-<a name="l00880"></a>00880                 }
-<a name="l00881"></a>00881         }
-<a name="l00882"></a>00882 } <span class="comment">/* end of vGet2FontInfo */</span>
-<a name="l00883"></a>00883 
-<a name="l00884"></a>00884 <span class="comment">/*</span>
-<a name="l00885"></a>00885 <span class="comment"> * Fill the picture information block with information from a WinWord 1 file.</span>
-<a name="l00886"></a>00886 <span class="comment"> * Returns TRUE when successful, otherwise FALSE</span>
-<a name="l00887"></a>00887 <span class="comment"> */</span>
-<a name="l00888"></a>00888 <span class="keyword">static</span> BOOL
-<a name="l00889"></a>00889 bGet1PicInfo(<span class="keywordtype">int</span> iFodo,
-<a name="l00890"></a>00890         <span class="keyword">const</span> UCHAR *aucGrpprl, <span class="keywordtype">size_t</span> tBytes, picture_block_type *pPicture)
-<a name="l00891"></a>00891 {
-<a name="l00892"></a>00892         ULONG   ulTmp;
-<a name="l00893"></a>00893         UCHAR   aucChpx[12];
-<a name="l00894"></a>00894 
-<a name="l00895"></a>00895         fail(iFodo &lt; 0 || aucGrpprl == NULL || pPicture == NULL);
-<a name="l00896"></a>00896 
-<a name="l00897"></a>00897         <span class="keywordflow">if</span> (tBytes &gt; <span class="keyword">sizeof</span>(aucChpx)) {
-<a name="l00898"></a>00898                 NO_DBG_PRINT_BLOCK(aucGrpprl + iFodo, tBytes);
-<a name="l00899"></a>00899                 tBytes = <span class="keyword">sizeof</span>(aucChpx);
-<a name="l00900"></a>00900         }
-<a name="l00901"></a>00901 
-<a name="l00902"></a>00902         <span class="comment">/* Build the CHPX structure */</span>
-<a name="l00903"></a>00903         (void)memset(aucChpx, 0, <span class="keyword">sizeof</span>(aucChpx));
-<a name="l00904"></a>00904         (void)memcpy(aucChpx, aucGrpprl + iFodo, min(tBytes, <span class="keyword">sizeof</span>(aucChpx)));
-<a name="l00905"></a>00905 
-<a name="l00906"></a>00906         ulTmp = ulGetLong(8, aucChpx);
-<a name="l00907"></a>00907         <span class="keywordflow">if</span> (ulTmp != 0 &amp;&amp; ulTmp &lt; MAX_FILESIZE) {
-<a name="l00908"></a>00908                 pPicture-&gt;ulPictureOffset = ulTmp;
-<a name="l00909"></a>00909                 DBG_HEX(pPicture-&gt;ulPictureOffset);
-<a name="l00910"></a>00910                 <span class="keywordflow">return</span> TRUE;
-<a name="l00911"></a>00911         }
-<a name="l00912"></a>00912         <span class="keywordflow">return</span> FALSE;
-<a name="l00913"></a>00913 } <span class="comment">/* end of bGet1PicInfo */</span>
-<a name="l00914"></a>00914 
-<a name="l00915"></a>00915 <span class="comment">/*</span>
-<a name="l00916"></a>00916 <span class="comment"> * Fill the picture information block with information from a WinWord 2 file.</span>
-<a name="l00917"></a>00917 <span class="comment"> * Returns TRUE when successful, otherwise FALSE</span>
-<a name="l00918"></a>00918 <span class="comment"> */</span>
-<a name="l00919"></a>00919 <span class="keyword">static</span> BOOL
-<a name="l00920"></a>00920 bGet2PicInfo(<span class="keywordtype">int</span> iFodo,
-<a name="l00921"></a>00921         <span class="keyword">const</span> UCHAR *aucGrpprl, <span class="keywordtype">size_t</span> tBytes, picture_block_type *pPicture)
-<a name="l00922"></a>00922 {
-<a name="l00923"></a>00923         ULONG   ulTmp;
-<a name="l00924"></a>00924         UCHAR   aucChpx[18];
-<a name="l00925"></a>00925 
-<a name="l00926"></a>00926         fail(iFodo &lt; 0 || aucGrpprl == NULL || pPicture == NULL);
-<a name="l00927"></a>00927 
-<a name="l00928"></a>00928         <span class="keywordflow">if</span> (tBytes &gt; <span class="keyword">sizeof</span>(aucChpx)) {
-<a name="l00929"></a>00929                 NO_DBG_PRINT_BLOCK(aucGrpprl + iFodo, tBytes);
-<a name="l00930"></a>00930                 tBytes = <span class="keyword">sizeof</span>(aucChpx);
-<a name="l00931"></a>00931         }
-<a name="l00932"></a>00932 
-<a name="l00933"></a>00933         <span class="comment">/* Build the CHPX structure */</span>
-<a name="l00934"></a>00934         (void)memset(aucChpx, 0, <span class="keyword">sizeof</span>(aucChpx));
-<a name="l00935"></a>00935         (void)memcpy(aucChpx, aucGrpprl + iFodo, min(tBytes, <span class="keyword">sizeof</span>(aucChpx)));
-<a name="l00936"></a>00936 
-<a name="l00937"></a>00937         ulTmp = ulGetLong(14, aucChpx);
-<a name="l00938"></a>00938         <span class="keywordflow">if</span> (ulTmp != 0 &amp;&amp; ulTmp &lt; MAX_FILESIZE) {
-<a name="l00939"></a>00939                 pPicture-&gt;ulPictureOffset = ulTmp;
-<a name="l00940"></a>00940                 DBG_HEX(pPicture-&gt;ulPictureOffset);
-<a name="l00941"></a>00941                 DBG_DEC(tBytes);
-<a name="l00942"></a>00942                 <span class="keywordflow">return</span> TRUE;
-<a name="l00943"></a>00943         }
-<a name="l00944"></a>00944         <span class="keywordflow">return</span> FALSE;
-<a name="l00945"></a>00945 } <span class="comment">/* end of bGet2PicInfo */</span>
-<a name="l00946"></a>00946 
-<a name="l00947"></a>00947 <span class="comment">/*</span>
-<a name="l00948"></a>00948 <span class="comment"> * Build the lists with Character Information for WinWord 1/2 files</span>
-<a name="l00949"></a>00949 <span class="comment"> */</span>
-<a name="l00950"></a>00950 <span class="keywordtype">void</span>
-<a name="l00951"></a>00951 vGet2ChrInfo(FILE *pFile, <span class="keywordtype">int</span> iWordVersion, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00952"></a>00952 {
-<a name="l00953"></a>00953         font_block_type         tFont;
-<a name="l00954"></a>00954         picture_block_type      tPicture;
-<a name="l00955"></a>00955         USHORT  *ausCharPage;
-<a name="l00956"></a>00956         UCHAR   *aucBuffer;
-<a name="l00957"></a>00957         ULONG   ulFileOffset, ulCharPos, ulBeginCharInfo;
-<a name="l00958"></a>00958         <span class="keywordtype">size_t</span>  tCharInfoLen, tOffset, tSize, tChrLen, tCharPageNum;
-<a name="l00959"></a>00959         <span class="keywordtype">size_t</span>  tLenOld, tLen;
-<a name="l00960"></a>00960         <span class="keywordtype">int</span>     iIndex, iIndex2, iRun, iFodo;
-<a name="l00961"></a>00961         BOOL    bSuccess1, bSuccess2;
-<a name="l00962"></a>00962         USHORT  usCharFirstPage, usCount, usIstd;
-<a name="l00963"></a>00963         UCHAR   aucFpage[BIG_BLOCK_SIZE];
-<a name="l00964"></a>00964 
-<a name="l00965"></a>00965         fail(pFile == NULL || aucHeader == NULL);
-<a name="l00966"></a>00966         fail(iWordVersion != 1 &amp;&amp; iWordVersion != 2);
-<a name="l00967"></a>00967 
-<a name="l00968"></a>00968         ulBeginCharInfo = ulGetLong(0xa0, aucHeader); <span class="comment">/* fcPlcfbteChpx */</span>
-<a name="l00969"></a>00969         DBG_HEX(ulBeginCharInfo);
-<a name="l00970"></a>00970         tCharInfoLen = (size_t)usGetWord(0xa4, aucHeader); <span class="comment">/* cbPlcfbteChpx */</span>
-<a name="l00971"></a>00971         DBG_DEC(tCharInfoLen);
-<a name="l00972"></a>00972         <span class="keywordflow">if</span> (tCharInfoLen &lt; 4) {
-<a name="l00973"></a>00973                 DBG_DEC(tCharInfoLen);
-<a name="l00974"></a>00974                 <span class="keywordflow">return</span>;
-<a name="l00975"></a>00975         }
-<a name="l00976"></a>00976 
-<a name="l00977"></a>00977         aucBuffer = xmalloc(tCharInfoLen);
-<a name="l00978"></a>00978         <span class="keywordflow">if</span> (!bReadBytes(aucBuffer, tCharInfoLen, ulBeginCharInfo, pFile)) {
-<a name="l00979"></a>00979                 aucBuffer = xfree(aucBuffer);
-<a name="l00980"></a>00980                 <span class="keywordflow">return</span>;
-<a name="l00981"></a>00981         }
-<a name="l00982"></a>00982         NO_DBG_PRINT_BLOCK(aucBuffer, tCharInfoLen);
-<a name="l00983"></a>00983 
-<a name="l00984"></a>00984         tLen = (tCharInfoLen - 4) / 6;
-<a name="l00985"></a>00985         ausCharPage = xcalloc(tLen, <span class="keyword">sizeof</span>(USHORT));
-<a name="l00986"></a>00986         <span class="keywordflow">for</span> (iIndex = 0, tOffset = (tLen + 1) * 4;
-<a name="l00987"></a>00987              iIndex &lt; (int)tLen;
-<a name="l00988"></a>00988              iIndex++, tOffset += 2) {
-<a name="l00989"></a>00989                 ausCharPage[iIndex] = usGetWord(tOffset, aucBuffer);
-<a name="l00990"></a>00990                 NO_DBG_DEC(ausCharPage[iIndex]);
-<a name="l00991"></a>00991         }
-<a name="l00992"></a>00992         DBG_HEX(ulGetLong(0, aucBuffer));
-<a name="l00993"></a>00993         aucBuffer = xfree(aucBuffer);
-<a name="l00994"></a>00994         tCharPageNum = (size_t)usGetWord(0x142, aucHeader); <span class="comment">/* cpnBteChp */</span>
-<a name="l00995"></a>00995         DBG_DEC(tCharPageNum);
-<a name="l00996"></a>00996         <span class="keywordflow">if</span> (tLen &lt; tCharPageNum) {
-<a name="l00997"></a>00997                 <span class="comment">/* Replace CharPage by a longer version */</span>
-<a name="l00998"></a>00998                 tLenOld = tLen;
-<a name="l00999"></a>00999                 usCharFirstPage = usGetWord(0x13e, aucHeader); <span class="comment">/* pnChrFirst */</span>
-<a name="l01000"></a>01000                 NO_DBG_DEC(usCharFirstPage);
-<a name="l01001"></a>01001                 tLen += tCharPageNum - 1;
-<a name="l01002"></a>01002                 tSize = tLen * <span class="keyword">sizeof</span>(USHORT);
-<a name="l01003"></a>01003                 ausCharPage = xrealloc(ausCharPage, tSize);
-<a name="l01004"></a>01004                 <span class="comment">/* Add new values */</span>
-<a name="l01005"></a>01005                 usCount = usCharFirstPage + 1;
-<a name="l01006"></a>01006                 <span class="keywordflow">for</span> (iIndex = (<span class="keywordtype">int</span>)tLenOld; iIndex &lt; (int)tLen; iIndex++) {
-<a name="l01007"></a>01007                         ausCharPage[iIndex] = usCount;
-<a name="l01008"></a>01008                         NO_DBG_DEC(ausCharPage[iIndex]);
-<a name="l01009"></a>01009                         usCount++;
-<a name="l01010"></a>01010                 }
-<a name="l01011"></a>01011         }
-<a name="l01012"></a>01012 
-<a name="l01013"></a>01013         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; (int)tLen; iIndex++) {
-<a name="l01014"></a>01014                 <span class="keywordflow">if</span> (!bReadBytes(aucFpage, BIG_BLOCK_SIZE,
-<a name="l01015"></a>01015                                 (ULONG)ausCharPage[iIndex] * BIG_BLOCK_SIZE,
-<a name="l01016"></a>01016                                 pFile)) {
-<a name="l01017"></a>01017                         <span class="keywordflow">break</span>;
-<a name="l01018"></a>01018                 }
-<a name="l01019"></a>01019                 NO_DBG_PRINT_BLOCK(aucFpage, BIG_BLOCK_SIZE);
-<a name="l01020"></a>01020                 iRun = (int)ucGetByte(0x1ff, aucFpage);
-<a name="l01021"></a>01021                 NO_DBG_DEC(iRun);
-<a name="l01022"></a>01022                 <span class="keywordflow">for</span> (iIndex2 = 0; iIndex2 &lt; iRun; iIndex2++) {
-<a name="l01023"></a>01023                         <span class="keywordflow">if</span> ((iRun + 1) * 4 + iIndex2 &gt;= BIG_BLOCK_SIZE) {
-<a name="l01024"></a>01024                                 <span class="keywordflow">break</span>;
-<a name="l01025"></a>01025                         }
-<a name="l01026"></a>01026                         ulCharPos = ulGetLong(iIndex2 * 4, aucFpage);
-<a name="l01027"></a>01027                         ulFileOffset = ulCharPos;
-<a name="l01028"></a>01028                         iFodo = 2 * (int)ucGetByte(
-<a name="l01029"></a>01029                                 (iRun + 1) * 4 + iIndex2, aucFpage);
-<a name="l01030"></a>01030 
-<a name="l01031"></a>01031                         tChrLen = (size_t)ucGetByte(iFodo, aucFpage);
-<a name="l01032"></a>01032 
-<a name="l01033"></a>01033                         usIstd = usGetIstd(ulFileOffset);
-<a name="l01034"></a>01034                         vFillFontFromStylesheet(usIstd, &amp;tFont);
-<a name="l01035"></a>01035                         <span class="keywordflow">if</span> (iFodo != 0) {
-<a name="l01036"></a>01036                                 <span class="keywordflow">if</span> (iWordVersion == 1) {
-<a name="l01037"></a>01037                                         vGet1FontInfo(iFodo,
-<a name="l01038"></a>01038                                                 aucFpage + 1, tChrLen, &amp;tFont);
-<a name="l01039"></a>01039                                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (iWordVersion == 2) {
-<a name="l01040"></a>01040                                         vGet2FontInfo(iFodo,
-<a name="l01041"></a>01041                                                 aucFpage + 1, tChrLen, &amp;tFont);
-<a name="l01042"></a>01042                                 }
-<a name="l01043"></a>01043                         }
-<a name="l01044"></a>01044                         tFont.ulFileOffset = ulFileOffset;
-<a name="l01045"></a>01045                         vAdd2FontInfoList(&amp;tFont);
-<a name="l01046"></a>01046 
-<a name="l01047"></a>01047                         <span class="keywordflow">if</span> (iFodo &lt;= 0) {
-<a name="l01048"></a>01048                                 <span class="keywordflow">continue</span>;
-<a name="l01049"></a>01049                         }
-<a name="l01050"></a>01050 
-<a name="l01051"></a>01051                         (void)memset(&amp;tPicture, 0, <span class="keyword">sizeof</span>(tPicture));
-<a name="l01052"></a>01052                         bSuccess1 = iWordVersion == 1 &amp;&amp;
-<a name="l01053"></a>01053                                         bGet1PicInfo(iFodo, aucFpage + 1,
-<a name="l01054"></a>01054                                                 tChrLen, &amp;tPicture);
-<a name="l01055"></a>01055                         bSuccess2 = iWordVersion == 2 &amp;&amp;
-<a name="l01056"></a>01056                                         bGet2PicInfo(iFodo, aucFpage + 1,
-<a name="l01057"></a>01057                                                 tChrLen, &amp;tPicture);
-<a name="l01058"></a>01058                         <span class="keywordflow">if</span> (bSuccess1 || bSuccess2) {
-<a name="l01059"></a>01059                                 tPicture.ulFileOffset = ulFileOffset;
-<a name="l01060"></a>01060                                 tPicture.ulFileOffsetPicture =
-<a name="l01061"></a>01061                                                 tPicture.ulPictureOffset;
-<a name="l01062"></a>01062                                 vAdd2PictInfoList(&amp;tPicture);
-<a name="l01063"></a>01063                         }
-<a name="l01064"></a>01064                 }
-<a name="l01065"></a>01065         }
-<a name="l01066"></a>01066         ausCharPage = xfree(ausCharPage);
-<a name="l01067"></a>01067 } <span class="comment">/* end of vGet2ChrInfo */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/prop6_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1157 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/prop6.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/prop6.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * prop6.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2005 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Read the property information from a MS Word 6 or 7 file</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 
-<a name="l00014"></a>00014 <span class="comment">/*</span>
-<a name="l00015"></a>00015 <span class="comment"> * iGet6InfoLength - the length of the information for Word 6/7 files</span>
-<a name="l00016"></a>00016 <span class="comment"> */</span>
-<a name="l00017"></a>00017 <span class="keyword">static</span> <span class="keywordtype">int</span>
-<a name="l00018"></a>00018 iGet6InfoLength(<span class="keywordtype">int</span> iByteNbr, <span class="keyword">const</span> UCHAR *aucGrpprl)
-<a name="l00019"></a>00019 {
-<a name="l00020"></a>00020         <span class="keywordtype">int</span>     iTmp, iDel, iAdd;
-<a name="l00021"></a>00021 
-<a name="l00022"></a>00022         <span class="keywordflow">switch</span> (ucGetByte(iByteNbr, aucGrpprl)) {
-<a name="l00023"></a>00023         <span class="keywordflow">case</span>   2: <span class="keywordflow">case</span>  16: <span class="keywordflow">case</span>  17: <span class="keywordflow">case</span>  18: <span class="keywordflow">case</span>  19: <span class="keywordflow">case</span>  21: <span class="keywordflow">case</span>  22:
-<a name="l00024"></a>00024         <span class="keywordflow">case</span>  26: <span class="keywordflow">case</span>  27: <span class="keywordflow">case</span>  28: <span class="keywordflow">case</span>  30: <span class="keywordflow">case</span>  31: <span class="keywordflow">case</span>  32: <span class="keywordflow">case</span>  33:
-<a name="l00025"></a>00025         <span class="keywordflow">case</span>  34: <span class="keywordflow">case</span>  35: <span class="keywordflow">case</span>  36: <span class="keywordflow">case</span>  38: <span class="keywordflow">case</span>  39: <span class="keywordflow">case</span>  40: <span class="keywordflow">case</span>  41:
-<a name="l00026"></a>00026         <span class="keywordflow">case</span>  42: <span class="keywordflow">case</span>  43: <span class="keywordflow">case</span>  45: <span class="keywordflow">case</span>  46: <span class="keywordflow">case</span>  47: <span class="keywordflow">case</span>  48: <span class="keywordflow">case</span>  49:
-<a name="l00027"></a>00027         <span class="keywordflow">case</span>  69: <span class="keywordflow">case</span>  72: <span class="keywordflow">case</span>  80: <span class="keywordflow">case</span>  93: <span class="keywordflow">case</span>  96: <span class="keywordflow">case</span>  97: <span class="keywordflow">case</span>  99:
-<a name="l00028"></a>00028         <span class="keywordflow">case</span> 101: <span class="keywordflow">case</span> 105: <span class="keywordflow">case</span> 106: <span class="keywordflow">case</span> 107: <span class="keywordflow">case</span> 109: <span class="keywordflow">case</span> 110: <span class="keywordflow">case</span> 121:
-<a name="l00029"></a>00029         <span class="keywordflow">case</span> 122: <span class="keywordflow">case</span> 123: <span class="keywordflow">case</span> 124: <span class="keywordflow">case</span> 140: <span class="keywordflow">case</span> 141: <span class="keywordflow">case</span> 144: <span class="keywordflow">case</span> 145:
-<a name="l00030"></a>00030         <span class="keywordflow">case</span> 148: <span class="keywordflow">case</span> 149: <span class="keywordflow">case</span> 154: <span class="keywordflow">case</span> 155: <span class="keywordflow">case</span> 156: <span class="keywordflow">case</span> 157: <span class="keywordflow">case</span> 160:
-<a name="l00031"></a>00031         <span class="keywordflow">case</span> 161: <span class="keywordflow">case</span> 164: <span class="keywordflow">case</span> 165: <span class="keywordflow">case</span> 166: <span class="keywordflow">case</span> 167: <span class="keywordflow">case</span> 168: <span class="keywordflow">case</span> 169:
-<a name="l00032"></a>00032         <span class="keywordflow">case</span> 170: <span class="keywordflow">case</span> 171: <span class="keywordflow">case</span> 182: <span class="keywordflow">case</span> 183: <span class="keywordflow">case</span> 184: <span class="keywordflow">case</span> 189: <span class="keywordflow">case</span> 195:
-<a name="l00033"></a>00033         <span class="keywordflow">case</span> 197: <span class="keywordflow">case</span> 198:
-<a name="l00034"></a>00034                 <span class="keywordflow">return</span> 1 + 2;
-<a name="l00035"></a>00035         <span class="keywordflow">case</span>   3: <span class="keywordflow">case</span>  12: <span class="keywordflow">case</span>  15: <span class="keywordflow">case</span>  81: <span class="keywordflow">case</span> 103: <span class="keywordflow">case</span> 108: <span class="keywordflow">case</span> 188:
-<a name="l00036"></a>00036         <span class="keywordflow">case</span> 190: <span class="keywordflow">case</span> 191:
-<a name="l00037"></a>00037                 <span class="keywordflow">return</span> 2 + (int)ucGetByte(iByteNbr + 1, aucGrpprl);
-<a name="l00038"></a>00038         <span class="keywordflow">case</span>  20: <span class="keywordflow">case</span>  70: <span class="keywordflow">case</span>  74: <span class="keywordflow">case</span> 192: <span class="keywordflow">case</span> 194: <span class="keywordflow">case</span> 196: <span class="keywordflow">case</span> 200:
-<a name="l00039"></a>00039                 <span class="keywordflow">return</span> 1 + 4;
-<a name="l00040"></a>00040         <span class="keywordflow">case</span>  23:
-<a name="l00041"></a>00041                 iTmp = (int)ucGetByte(iByteNbr + 1, aucGrpprl);
-<a name="l00042"></a>00042                 <span class="keywordflow">if</span> (iTmp == 255) {
-<a name="l00043"></a>00043                         iDel = (int)ucGetByte(iByteNbr + 2, aucGrpprl);
-<a name="l00044"></a>00044                         iAdd = (int)ucGetByte(
-<a name="l00045"></a>00045                                         iByteNbr + 3 + iDel * 4, aucGrpprl);
-<a name="l00046"></a>00046                         iTmp = 2 + iDel * 4 + iAdd * 3;
-<a name="l00047"></a>00047                 }
-<a name="l00048"></a>00048                 <span class="keywordflow">return</span> 2 + iTmp;
-<a name="l00049"></a>00049         <span class="keywordflow">case</span>  68: <span class="keywordflow">case</span> 193: <span class="keywordflow">case</span> 199:
-<a name="l00050"></a>00050                 <span class="keywordflow">return</span> 1 + 5;
-<a name="l00051"></a>00051         <span class="keywordflow">case</span>  73: <span class="keywordflow">case</span>  95: <span class="keywordflow">case</span> 136: <span class="keywordflow">case</span> 137:
-<a name="l00052"></a>00052                 <span class="keywordflow">return</span> 1 + 3;
-<a name="l00053"></a>00053         <span class="keywordflow">case</span> 120: <span class="keywordflow">case</span> 187:
-<a name="l00054"></a>00054                 <span class="keywordflow">return</span> 1 + 12;
-<a name="l00055"></a>00055         <span class="keywordflow">default</span>:
-<a name="l00056"></a>00056                 <span class="keywordflow">return</span> 1 + 1;
-<a name="l00057"></a>00057         }
-<a name="l00058"></a>00058 } <span class="comment">/* end of iGet6InfoLength */</span>
-<a name="l00059"></a>00059 
-<a name="l00060"></a>00060 <span class="comment">/*</span>
-<a name="l00061"></a>00061 <span class="comment"> * Build the lists with Document Property Information for Word 6/7 files</span>
-<a name="l00062"></a>00062 <span class="comment"> */</span>
-<a name="l00063"></a>00063 <span class="keywordtype">void</span>
-<a name="l00064"></a>00064 vGet6DopInfo(FILE *pFile, ULONG ulStartBlock,
-<a name="l00065"></a>00065         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00066"></a>00066         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00067"></a>00067 {
-<a name="l00068"></a>00068         document_block_type     tDocument;
-<a name="l00069"></a>00069         UCHAR   *aucBuffer;
-<a name="l00070"></a>00070         ULONG   ulBeginDocpInfo, ulTmp;
-<a name="l00071"></a>00071         <span class="keywordtype">size_t</span>  tDocpInfoLen;
-<a name="l00072"></a>00072         USHORT  usTmp;
-<a name="l00073"></a>00073 
-<a name="l00074"></a>00074         ulBeginDocpInfo = ulGetLong(0x150, aucHeader); <span class="comment">/* fcDop */</span>
-<a name="l00075"></a>00075         DBG_HEX(ulBeginDocpInfo);
-<a name="l00076"></a>00076         tDocpInfoLen = (size_t)ulGetLong(0x154, aucHeader); <span class="comment">/* lcbDop */</span>
-<a name="l00077"></a>00077         DBG_DEC(tDocpInfoLen);
-<a name="l00078"></a>00078         <span class="keywordflow">if</span> (tDocpInfoLen &lt; 28) {
-<a name="l00079"></a>00079                 DBG_MSG(<span class="stringliteral">&quot;No Document information&quot;</span>);
-<a name="l00080"></a>00080                 <span class="keywordflow">return</span>;
-<a name="l00081"></a>00081         }
-<a name="l00082"></a>00082 
-<a name="l00083"></a>00083         aucBuffer = xmalloc(tDocpInfoLen);
-<a name="l00084"></a>00084         <span class="keywordflow">if</span> (!bReadBuffer(pFile, ulStartBlock,
-<a name="l00085"></a>00085                         aulBBD, tBBDLen, BIG_BLOCK_SIZE,
-<a name="l00086"></a>00086                         aucBuffer, ulBeginDocpInfo, tDocpInfoLen)) {
-<a name="l00087"></a>00087                 aucBuffer = xfree(aucBuffer);
-<a name="l00088"></a>00088                 <span class="keywordflow">return</span>;
-<a name="l00089"></a>00089         }
-<a name="l00090"></a>00090 
-<a name="l00091"></a>00091         usTmp = usGetWord(0x00, aucBuffer);
-<a name="l00092"></a>00092         tDocument.ucHdrFtrSpecification = (UCHAR)(usTmp &gt;&gt; 8); <span class="comment">/* grpfIhdt */</span>
-<a name="l00093"></a>00093         tDocument.usDefaultTabWidth = usGetWord(0x0a, aucBuffer); <span class="comment">/* dxaTab */</span>
-<a name="l00094"></a>00094         ulTmp = ulGetLong(0x14, aucBuffer); <span class="comment">/* dttmCreated */</span>
-<a name="l00095"></a>00095         tDocument.tCreateDate = tConvertDTTM(ulTmp);
-<a name="l00096"></a>00096         ulTmp = ulGetLong(0x18, aucBuffer); <span class="comment">/* dttmRevised */</span>
-<a name="l00097"></a>00097         tDocument.tRevisedDate = tConvertDTTM(ulTmp);
-<a name="l00098"></a>00098         vCreateDocumentInfoList(&amp;tDocument);
-<a name="l00099"></a>00099 
-<a name="l00100"></a>00100         aucBuffer = xfree(aucBuffer);
-<a name="l00101"></a>00101 } <span class="comment">/* end of vGet6DopInfo */</span>
-<a name="l00102"></a>00102 
-<a name="l00103"></a>00103 <span class="comment">/*</span>
-<a name="l00104"></a>00104 <span class="comment"> * Fill the section information block with information</span>
-<a name="l00105"></a>00105 <span class="comment"> * from a Word 6/7 file.</span>
-<a name="l00106"></a>00106 <span class="comment"> */</span>
-<a name="l00107"></a>00107 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00108"></a>00108 vGet6SectionInfo(<span class="keyword">const</span> UCHAR *aucGrpprl, <span class="keywordtype">size_t</span> tBytes,
-<a name="l00109"></a>00109                 section_block_type *pSection)
-<a name="l00110"></a>00110 {
-<a name="l00111"></a>00111         UINT    uiIndex;
-<a name="l00112"></a>00112         <span class="keywordtype">int</span>     iFodoOff, iInfoLen, iSize, iTmp;
-<a name="l00113"></a>00113         USHORT  usCcol;
-<a name="l00114"></a>00114         UCHAR   ucTmp;
-<a name="l00115"></a>00115 
-<a name="l00116"></a>00116         fail(aucGrpprl == NULL || pSection == NULL);
-<a name="l00117"></a>00117 
-<a name="l00118"></a>00118         iFodoOff = 0;
-<a name="l00119"></a>00119         <span class="keywordflow">while</span> (tBytes &gt;= (<span class="keywordtype">size_t</span>)iFodoOff + 1) {
-<a name="l00120"></a>00120                 iInfoLen = 0;
-<a name="l00121"></a>00121                 <span class="keywordflow">switch</span> (ucGetByte(iFodoOff, aucGrpprl)) {
-<a name="l00122"></a>00122                 <span class="keywordflow">case</span> 133:       <span class="comment">/* olstAnm */</span>
-<a name="l00123"></a>00123                         iSize = (int)ucGetByte(iFodoOff + 1, aucGrpprl);
-<a name="l00124"></a>00124                         DBG_DEC_C(iSize != 212, iSize);
-<a name="l00125"></a>00125                         <span class="keywordflow">for</span> (uiIndex = 0, iTmp = iFodoOff + 2;
-<a name="l00126"></a>00126                              uiIndex &lt; 9 &amp;&amp; iTmp &lt; iFodoOff + 2 + iSize - 15;
-<a name="l00127"></a>00127                              uiIndex++, iTmp += 16) {
-<a name="l00128"></a>00128                                 pSection-&gt;aucNFC[uiIndex] =
-<a name="l00129"></a>00129                                                 ucGetByte(iTmp, aucGrpprl);
-<a name="l00130"></a>00130                                 NO_DBG_DEC(pSection-&gt;aucNFC[uiIndex]);
-<a name="l00131"></a>00131                                 ucTmp = ucGetByte(iTmp + 3, aucGrpprl);
-<a name="l00132"></a>00132                                 NO_DBG_HEX(ucTmp);
-<a name="l00133"></a>00133                                 <span class="keywordflow">if</span> ((ucTmp &amp; BIT(2)) != 0) {
-<a name="l00134"></a>00134                                         pSection-&gt;usNeedPrevLvl |=
-<a name="l00135"></a>00135                                                         (USHORT)BIT(uiIndex);
-<a name="l00136"></a>00136                                 }
-<a name="l00137"></a>00137                                 <span class="keywordflow">if</span> ((ucTmp &amp; BIT(3)) != 0) {
-<a name="l00138"></a>00138                                         pSection-&gt;usHangingIndent |=
-<a name="l00139"></a>00139                                                         (USHORT)BIT(uiIndex);
-<a name="l00140"></a>00140                                 }
-<a name="l00141"></a>00141                         }
-<a name="l00142"></a>00142                         DBG_HEX(pSection-&gt;usNeedPrevLvl);
-<a name="l00143"></a>00143                         DBG_HEX(pSection-&gt;usHangingIndent);
-<a name="l00144"></a>00144                         <span class="keywordflow">break</span>;
-<a name="l00145"></a>00145                 <span class="keywordflow">case</span> 142:       <span class="comment">/* bkc */</span>
-<a name="l00146"></a>00146                         ucTmp = ucGetByte(iFodoOff + 1, aucGrpprl);
-<a name="l00147"></a>00147                         DBG_DEC(ucTmp);
-<a name="l00148"></a>00148                         pSection-&gt;bNewPage = ucTmp != 0 &amp;&amp; ucTmp != 1;
-<a name="l00149"></a>00149                         <span class="keywordflow">break</span>;
-<a name="l00150"></a>00150                 <span class="keywordflow">case</span> 144:       <span class="comment">/* ccolM1 */</span>
-<a name="l00151"></a>00151                         usCcol = 1 + usGetWord(iFodoOff + 1, aucGrpprl);
-<a name="l00152"></a>00152                         DBG_DEC(usCcol);
-<a name="l00153"></a>00153                         <span class="keywordflow">break</span>;
-<a name="l00154"></a>00154                 <span class="keywordflow">case</span> 153:       <span class="comment">/* grpfIhdt */</span>
-<a name="l00155"></a>00155                         pSection-&gt;ucHdrFtrSpecification =
-<a name="l00156"></a>00156                                         ucGetByte(iFodoOff + 1, aucGrpprl);
-<a name="l00157"></a>00157                         <span class="keywordflow">break</span>;
-<a name="l00158"></a>00158                 <span class="keywordflow">default</span>:
-<a name="l00159"></a>00159                         <span class="keywordflow">break</span>;
-<a name="l00160"></a>00160                 }
-<a name="l00161"></a>00161                 <span class="keywordflow">if</span> (iInfoLen &lt;= 0) {
-<a name="l00162"></a>00162                         iInfoLen = iGet6InfoLength(iFodoOff, aucGrpprl);
-<a name="l00163"></a>00163                         fail(iInfoLen &lt;= 0);
-<a name="l00164"></a>00164                 }
-<a name="l00165"></a>00165                 iFodoOff += iInfoLen;
-<a name="l00166"></a>00166         }
-<a name="l00167"></a>00167 } <span class="comment">/* end of vGet6SectionInfo */</span>
-<a name="l00168"></a>00168 
-<a name="l00169"></a>00169 <span class="comment">/*</span>
-<a name="l00170"></a>00170 <span class="comment"> * Build the lists with Section Property Information for Word 6/7 files</span>
-<a name="l00171"></a>00171 <span class="comment"> */</span>
-<a name="l00172"></a>00172 <span class="keywordtype">void</span>
-<a name="l00173"></a>00173 vGet6SepInfo(FILE *pFile, ULONG ulStartBlock,
-<a name="l00174"></a>00174         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00175"></a>00175         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00176"></a>00176 {
-<a name="l00177"></a>00177         section_block_type      tSection;
-<a name="l00178"></a>00178         ULONG           *aulSectPage, *aulCharPos;
-<a name="l00179"></a>00179         UCHAR   *aucBuffer, *aucFpage;
-<a name="l00180"></a>00180         ULONG   ulBeginOfText, ulTextOffset, ulBeginSectInfo;
-<a name="l00181"></a>00181         <span class="keywordtype">size_t</span>  tSectInfoLen, tIndex, tOffset, tLen, tBytes;
-<a name="l00182"></a>00182         UCHAR   aucTmp[2];
-<a name="l00183"></a>00183 
-<a name="l00184"></a>00184         fail(pFile == NULL || aucHeader == NULL);
-<a name="l00185"></a>00185         fail(ulStartBlock &gt; MAX_BLOCKNUMBER &amp;&amp; ulStartBlock != END_OF_CHAIN);
-<a name="l00186"></a>00186         fail(aulBBD == NULL);
-<a name="l00187"></a>00187 
-<a name="l00188"></a>00188         ulBeginOfText = ulGetLong(0x18, aucHeader); <span class="comment">/* fcMin */</span>
-<a name="l00189"></a>00189         NO_DBG_HEX(ulBeginOfText);
-<a name="l00190"></a>00190         ulBeginSectInfo = ulGetLong(0x88, aucHeader); <span class="comment">/* fcPlcfsed */</span>
-<a name="l00191"></a>00191         DBG_HEX(ulBeginSectInfo);
-<a name="l00192"></a>00192         tSectInfoLen = (size_t)ulGetLong(0x8c, aucHeader); <span class="comment">/* lcbPlcfsed */</span>
-<a name="l00193"></a>00193         DBG_DEC(tSectInfoLen);
-<a name="l00194"></a>00194         <span class="keywordflow">if</span> (tSectInfoLen &lt; 4) {
-<a name="l00195"></a>00195                 DBG_DEC(tSectInfoLen);
-<a name="l00196"></a>00196                 <span class="keywordflow">return</span>;
-<a name="l00197"></a>00197         }
-<a name="l00198"></a>00198 
-<a name="l00199"></a>00199         aucBuffer = xmalloc(tSectInfoLen);
-<a name="l00200"></a>00200         <span class="keywordflow">if</span> (!bReadBuffer(pFile, ulStartBlock,
-<a name="l00201"></a>00201                         aulBBD, tBBDLen, BIG_BLOCK_SIZE,
-<a name="l00202"></a>00202                         aucBuffer, ulBeginSectInfo, tSectInfoLen)) {
-<a name="l00203"></a>00203                 aucBuffer = xfree(aucBuffer);
-<a name="l00204"></a>00204                 <span class="keywordflow">return</span>;
-<a name="l00205"></a>00205         }
-<a name="l00206"></a>00206         NO_DBG_PRINT_BLOCK(aucBuffer, tSectInfoLen);
-<a name="l00207"></a>00207 
-<a name="l00208"></a>00208         <span class="comment">/* Read the Section Descriptors */</span>
-<a name="l00209"></a>00209         tLen = (tSectInfoLen - 4) / 16;
-<a name="l00210"></a>00210         <span class="comment">/* Save the section offsets */</span>
-<a name="l00211"></a>00211         aulCharPos = xcalloc(tLen, <span class="keyword">sizeof</span>(ULONG));
-<a name="l00212"></a>00212         <span class="keywordflow">for</span> (tIndex = 0, tOffset = 0; tIndex &lt; tLen; tIndex++, tOffset += 4) {
-<a name="l00213"></a>00213                 ulTextOffset = ulGetLong(tOffset, aucBuffer);
-<a name="l00214"></a>00214                 NO_DBG_HEX(ulTextOffset);
-<a name="l00215"></a>00215                 aulCharPos[tIndex] = ulBeginOfText + ulTextOffset;
-<a name="l00216"></a>00216                 NO_DBG_HEX(aulCharPos[tIndex]);
-<a name="l00217"></a>00217         }
-<a name="l00218"></a>00218         <span class="comment">/* Save the Sepx offsets */</span>
-<a name="l00219"></a>00219         aulSectPage = xcalloc(tLen, <span class="keyword">sizeof</span>(ULONG));
-<a name="l00220"></a>00220         <span class="keywordflow">for</span> (tIndex = 0, tOffset = (tLen + 1) * 4;
-<a name="l00221"></a>00221              tIndex &lt; tLen;
-<a name="l00222"></a>00222              tIndex++, tOffset += 12) {
-<a name="l00223"></a>00223                 aulSectPage[tIndex] = ulGetLong(tOffset + 2, aucBuffer);
-<a name="l00224"></a>00224                 NO_DBG_HEX(aulSectPage[tIndex]); <span class="comment">/* fcSepx */</span>
-<a name="l00225"></a>00225         }
-<a name="l00226"></a>00226         aucBuffer = xfree(aucBuffer);
-<a name="l00227"></a>00227 
-<a name="l00228"></a>00228         <span class="comment">/* Read the Section Properties */</span>
-<a name="l00229"></a>00229         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tLen; tIndex++) {
-<a name="l00230"></a>00230                 <span class="keywordflow">if</span> (aulSectPage[tIndex] == FC_INVALID) {
-<a name="l00231"></a>00231                         vDefault2SectionInfoList(aulCharPos[tIndex]);
-<a name="l00232"></a>00232                         <span class="keywordflow">continue</span>;
-<a name="l00233"></a>00233                 }
-<a name="l00234"></a>00234                 <span class="comment">/* Get the number of bytes to read */</span>
-<a name="l00235"></a>00235                 <span class="keywordflow">if</span> (!bReadBuffer(pFile, ulStartBlock,
-<a name="l00236"></a>00236                                 aulBBD, tBBDLen, BIG_BLOCK_SIZE,
-<a name="l00237"></a>00237                                 aucTmp, aulSectPage[tIndex], 2)) {
-<a name="l00238"></a>00238                         <span class="keywordflow">continue</span>;
-<a name="l00239"></a>00239                 }
-<a name="l00240"></a>00240                 tBytes = 2 + (size_t)usGetWord(0, aucTmp);
-<a name="l00241"></a>00241                 NO_DBG_DEC(tBytes);
-<a name="l00242"></a>00242                 <span class="comment">/* Read the bytes */</span>
-<a name="l00243"></a>00243                 aucFpage = xmalloc(tBytes);
-<a name="l00244"></a>00244                 <span class="keywordflow">if</span> (!bReadBuffer(pFile, ulStartBlock,
-<a name="l00245"></a>00245                                 aulBBD, tBBDLen, BIG_BLOCK_SIZE,
-<a name="l00246"></a>00246                                 aucFpage, aulSectPage[tIndex], tBytes)) {
-<a name="l00247"></a>00247                         aucFpage = xfree(aucFpage);
-<a name="l00248"></a>00248                         <span class="keywordflow">continue</span>;
-<a name="l00249"></a>00249                 }
-<a name="l00250"></a>00250                 NO_DBG_PRINT_BLOCK(aucFpage, tBytes);
-<a name="l00251"></a>00251                 <span class="comment">/* Process the bytes */</span>
-<a name="l00252"></a>00252                 vGetDefaultSection(&amp;tSection);
-<a name="l00253"></a>00253                 vGet6SectionInfo(aucFpage + 2, tBytes - 2, &amp;tSection);
-<a name="l00254"></a>00254                 vAdd2SectionInfoList(&amp;tSection, aulCharPos[tIndex]);
-<a name="l00255"></a>00255                 aucFpage = xfree(aucFpage);
-<a name="l00256"></a>00256         }
-<a name="l00257"></a>00257         aulCharPos = xfree(aulCharPos);
-<a name="l00258"></a>00258         aulSectPage = xfree(aulSectPage);
-<a name="l00259"></a>00259 } <span class="comment">/* end of vGet6SepInfo */</span>
-<a name="l00260"></a>00260 
-<a name="l00261"></a>00261 <span class="comment">/*</span>
-<a name="l00262"></a>00262 <span class="comment"> * Build the list with Header/Footer Information for Word 6/7 files</span>
-<a name="l00263"></a>00263 <span class="comment"> */</span>
-<a name="l00264"></a>00264 <span class="keywordtype">void</span>
-<a name="l00265"></a>00265 vGet6HdrFtrInfo(FILE *pFile, ULONG ulStartBlock,
-<a name="l00266"></a>00266         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00267"></a>00267         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00268"></a>00268 {
-<a name="l00269"></a>00269         ULONG   *aulCharPos;
-<a name="l00270"></a>00270         UCHAR   *aucBuffer;
-<a name="l00271"></a>00271         ULONG   ulHdrFtrOffset, ulBeginHdrFtrInfo;
-<a name="l00272"></a>00272         <span class="keywordtype">size_t</span>  tHdrFtrInfoLen, tIndex, tOffset, tLen;
-<a name="l00273"></a>00273 
-<a name="l00274"></a>00274         fail(pFile == NULL || aucHeader == NULL);
-<a name="l00275"></a>00275         fail(ulStartBlock &gt; MAX_BLOCKNUMBER &amp;&amp; ulStartBlock != END_OF_CHAIN);
-<a name="l00276"></a>00276         fail(aulBBD == NULL);
-<a name="l00277"></a>00277 
-<a name="l00278"></a>00278         ulBeginHdrFtrInfo = ulGetLong(0xb0, aucHeader); <span class="comment">/* fcPlcfhdd */</span>
-<a name="l00279"></a>00279         NO_DBG_HEX(ulBeginHdrFtrInfo);
-<a name="l00280"></a>00280         tHdrFtrInfoLen = (size_t)ulGetLong(0xb4, aucHeader); <span class="comment">/* lcbPlcfhdd */</span>
-<a name="l00281"></a>00281         NO_DBG_DEC(tHdrFtrInfoLen);
-<a name="l00282"></a>00282         <span class="keywordflow">if</span> (tHdrFtrInfoLen &lt; 8) {
-<a name="l00283"></a>00283                 DBG_DEC_C(tHdrFtrInfoLen != 0, tHdrFtrInfoLen);
-<a name="l00284"></a>00284                 <span class="keywordflow">return</span>;
-<a name="l00285"></a>00285         }
-<a name="l00286"></a>00286 
-<a name="l00287"></a>00287         aucBuffer = xmalloc(tHdrFtrInfoLen);
-<a name="l00288"></a>00288         <span class="keywordflow">if</span> (!bReadBuffer(pFile, ulStartBlock,
-<a name="l00289"></a>00289                         aulBBD, tBBDLen, BIG_BLOCK_SIZE,
-<a name="l00290"></a>00290                         aucBuffer, ulBeginHdrFtrInfo, tHdrFtrInfoLen)) {
-<a name="l00291"></a>00291                 aucBuffer = xfree(aucBuffer);
-<a name="l00292"></a>00292                 <span class="keywordflow">return</span>;
-<a name="l00293"></a>00293         }
-<a name="l00294"></a>00294         NO_DBG_PRINT_BLOCK(aucBuffer, tHdrFtrInfoLen);
-<a name="l00295"></a>00295 
-<a name="l00296"></a>00296         tLen = tHdrFtrInfoLen / 4 - 1;
-<a name="l00297"></a>00297         <span class="comment">/* Save the header/footer offsets */</span>
-<a name="l00298"></a>00298         aulCharPos = xcalloc(tLen, <span class="keyword">sizeof</span>(ULONG));
-<a name="l00299"></a>00299         <span class="keywordflow">for</span> (tIndex = 0, tOffset = 0;
-<a name="l00300"></a>00300              tIndex &lt; tLen;
-<a name="l00301"></a>00301              tIndex++, tOffset += 4) {
-<a name="l00302"></a>00302                 ulHdrFtrOffset = ulGetLong(tOffset, aucBuffer);
-<a name="l00303"></a>00303                 NO_DBG_HEX(ulHdrFtrOffset);
-<a name="l00304"></a>00304                 aulCharPos[tIndex] = ulHdrFtrOffset2CharPos(ulHdrFtrOffset);
-<a name="l00305"></a>00305                 NO_DBG_HEX(aulCharPos[tIndex]);
-<a name="l00306"></a>00306         }
-<a name="l00307"></a>00307         vCreat6HdrFtrInfoList(aulCharPos, tLen);
-<a name="l00308"></a>00308         aulCharPos = xfree(aulCharPos);
-<a name="l00309"></a>00309         aucBuffer = xfree(aucBuffer);
-<a name="l00310"></a>00310 } <span class="comment">/* end of vGet6HdrFtrInfo */</span>
-<a name="l00311"></a>00311 
-<a name="l00312"></a>00312 <span class="comment">/*</span>
-<a name="l00313"></a>00313 <span class="comment"> * Translate the rowinfo to a member of the row_info enumeration</span>
-<a name="l00314"></a>00314 <span class="comment"> */</span>
-<a name="l00315"></a>00315 row_info_enum
-<a name="l00316"></a>00316 eGet6RowInfo(<span class="keywordtype">int</span> iFodo,
-<a name="l00317"></a>00317         <span class="keyword">const</span> UCHAR *aucGrpprl, <span class="keywordtype">int</span> iBytes, row_block_type *pRow)
-<a name="l00318"></a>00318 {
-<a name="l00319"></a>00319         <span class="keywordtype">int</span>     iFodoOff, iInfoLen;
-<a name="l00320"></a>00320         <span class="keywordtype">int</span>     iIndex, iSize, iCol;
-<a name="l00321"></a>00321         <span class="keywordtype">int</span>     iPosCurr, iPosPrev;
-<a name="l00322"></a>00322         USHORT  usTmp;
-<a name="l00323"></a>00323         BOOL    bFound24_0, bFound24_1, bFound25_0, bFound25_1, bFound190;
-<a name="l00324"></a>00324 
-<a name="l00325"></a>00325         fail(iFodo &lt; 0 || aucGrpprl == NULL || pRow == NULL);
-<a name="l00326"></a>00326 
-<a name="l00327"></a>00327         iFodoOff = 0;
-<a name="l00328"></a>00328         bFound24_0 = FALSE;
-<a name="l00329"></a>00329         bFound24_1 = FALSE;
-<a name="l00330"></a>00330         bFound25_0 = FALSE;
-<a name="l00331"></a>00331         bFound25_1 = FALSE;
-<a name="l00332"></a>00332         bFound190 = FALSE;
-<a name="l00333"></a>00333         <span class="keywordflow">while</span> (iBytes &gt;= iFodoOff + 1) {
-<a name="l00334"></a>00334                 iInfoLen = 0;
-<a name="l00335"></a>00335                 <span class="keywordflow">switch</span> (ucGetByte(iFodo + iFodoOff, aucGrpprl)) {
-<a name="l00336"></a>00336                 <span class="keywordflow">case</span>  24:       <span class="comment">/* fInTable */</span>
-<a name="l00337"></a>00337                         <span class="keywordflow">if</span> (odd(ucGetByte(iFodo + iFodoOff + 1, aucGrpprl))) {
-<a name="l00338"></a>00338                                 bFound24_1 = TRUE;
-<a name="l00339"></a>00339                         } <span class="keywordflow">else</span> {
-<a name="l00340"></a>00340                                 bFound24_0 = TRUE;
-<a name="l00341"></a>00341                         }
-<a name="l00342"></a>00342                         <span class="keywordflow">break</span>;
-<a name="l00343"></a>00343                 <span class="keywordflow">case</span>  25:       <span class="comment">/* fTtp */</span>
-<a name="l00344"></a>00344                         <span class="keywordflow">if</span> (odd(ucGetByte(iFodo + iFodoOff + 1, aucGrpprl))) {
-<a name="l00345"></a>00345                                 bFound25_1 = TRUE;
-<a name="l00346"></a>00346                         } <span class="keywordflow">else</span> {
-<a name="l00347"></a>00347                                 bFound25_0 = TRUE;
-<a name="l00348"></a>00348                         }
-<a name="l00349"></a>00349                         <span class="keywordflow">break</span>;
-<a name="l00350"></a>00350                 <span class="keywordflow">case</span> 38:        <span class="comment">/* brcTop */</span>
-<a name="l00351"></a>00351                         usTmp = usGetWord(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00352"></a>00352                         usTmp &amp;= 0x0018;
-<a name="l00353"></a>00353                         NO_DBG_DEC(usTmp &gt;&gt; 3);
-<a name="l00354"></a>00354                         <span class="keywordflow">if</span> (usTmp == 0) {
-<a name="l00355"></a>00355                                 pRow-&gt;ucBorderInfo &amp;= ~TABLE_BORDER_TOP;
-<a name="l00356"></a>00356                         } <span class="keywordflow">else</span> {
-<a name="l00357"></a>00357                                 pRow-&gt;ucBorderInfo |= TABLE_BORDER_TOP;
-<a name="l00358"></a>00358                         }
-<a name="l00359"></a>00359                         <span class="keywordflow">break</span>;
-<a name="l00360"></a>00360                 <span class="keywordflow">case</span> 39:        <span class="comment">/* brcLeft */</span>
-<a name="l00361"></a>00361                         usTmp = usGetWord(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00362"></a>00362                         usTmp &amp;= 0x0018;
-<a name="l00363"></a>00363                         NO_DBG_DEC(usTmp &gt;&gt; 3);
-<a name="l00364"></a>00364                         <span class="keywordflow">if</span> (usTmp == 0) {
-<a name="l00365"></a>00365                                 pRow-&gt;ucBorderInfo &amp;= ~TABLE_BORDER_LEFT;
-<a name="l00366"></a>00366                         } <span class="keywordflow">else</span> {
-<a name="l00367"></a>00367                                 pRow-&gt;ucBorderInfo |= TABLE_BORDER_LEFT;
-<a name="l00368"></a>00368                         }
-<a name="l00369"></a>00369                         <span class="keywordflow">break</span>;
-<a name="l00370"></a>00370                 <span class="keywordflow">case</span> 40:        <span class="comment">/* brcBottom */</span>
-<a name="l00371"></a>00371                         usTmp = usGetWord(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00372"></a>00372                         usTmp &amp;= 0x0018;
-<a name="l00373"></a>00373                         NO_DBG_DEC(usTmp &gt;&gt; 3);
-<a name="l00374"></a>00374                         <span class="keywordflow">if</span> (usTmp == 0) {
-<a name="l00375"></a>00375                                 pRow-&gt;ucBorderInfo &amp;= ~TABLE_BORDER_BOTTOM;
-<a name="l00376"></a>00376                         } <span class="keywordflow">else</span> {
-<a name="l00377"></a>00377                                 pRow-&gt;ucBorderInfo |= TABLE_BORDER_BOTTOM;
-<a name="l00378"></a>00378                         }
-<a name="l00379"></a>00379                         <span class="keywordflow">break</span>;
-<a name="l00380"></a>00380                 <span class="keywordflow">case</span> 41:        <span class="comment">/* brcRight */</span>
-<a name="l00381"></a>00381                         usTmp = usGetWord(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00382"></a>00382                         usTmp &amp;= 0x0018;
-<a name="l00383"></a>00383                         NO_DBG_DEC(usTmp &gt;&gt; 3);
-<a name="l00384"></a>00384                         <span class="keywordflow">if</span> (usTmp == 0) {
-<a name="l00385"></a>00385                                 pRow-&gt;ucBorderInfo &amp;= ~TABLE_BORDER_RIGHT;
-<a name="l00386"></a>00386                         } <span class="keywordflow">else</span> {
-<a name="l00387"></a>00387                                 pRow-&gt;ucBorderInfo |= TABLE_BORDER_RIGHT;
-<a name="l00388"></a>00388                         }
-<a name="l00389"></a>00389                         <span class="keywordflow">break</span>;
-<a name="l00390"></a>00390                 <span class="keywordflow">case</span> 188:       <span class="comment">/* cDefTable10 */</span>
-<a name="l00391"></a>00391                         DBG_MSG(<span class="stringliteral">&quot;188: sprmTDefTable10&quot;</span>);
-<a name="l00392"></a>00392                         iSize = (int)usGetWord(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00393"></a>00393                         DBG_DEC(iSize);
-<a name="l00394"></a>00394                         <span class="keywordflow">break</span>;
-<a name="l00395"></a>00395                 <span class="keywordflow">case</span> 190:       <span class="comment">/* cDefTable */</span>
-<a name="l00396"></a>00396                         iSize = (int)usGetWord(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00397"></a>00397                         <span class="keywordflow">if</span> (iSize &lt; 6 || iBytes &lt; iFodoOff + 7) {
-<a name="l00398"></a>00398                                 DBG_DEC(iSize);
-<a name="l00399"></a>00399                                 DBG_DEC(iFodoOff);
-<a name="l00400"></a>00400                                 iInfoLen = 1;
-<a name="l00401"></a>00401                                 <span class="keywordflow">break</span>;
-<a name="l00402"></a>00402                         }
-<a name="l00403"></a>00403                         iCol = (int)ucGetByte(iFodo + iFodoOff + 3, aucGrpprl);
-<a name="l00404"></a>00404                         <span class="keywordflow">if</span> (iCol &lt; 1 ||
-<a name="l00405"></a>00405                             iBytes &lt; iFodoOff + 3 + (iCol + 1) * 2) {
-<a name="l00406"></a>00406                                 DBG_DEC(iCol);
-<a name="l00407"></a>00407                                 DBG_DEC(iFodoOff);
-<a name="l00408"></a>00408                                 iInfoLen = 1;
-<a name="l00409"></a>00409                                 <span class="keywordflow">break</span>;
-<a name="l00410"></a>00410                         }
-<a name="l00411"></a>00411                         <span class="keywordflow">if</span> (iCol &gt;= (<span class="keywordtype">int</span>)elementsof(pRow-&gt;asColumnWidth)) {
-<a name="l00412"></a>00412                                 DBG_DEC(iCol);
-<a name="l00413"></a>00413                                 werr(1, <span class="stringliteral">&quot;The number of columns is corrupt&quot;</span>);
-<a name="l00414"></a>00414                         }
-<a name="l00415"></a>00415                         pRow-&gt;ucNumberOfColumns = (UCHAR)iCol;
-<a name="l00416"></a>00416                         iPosPrev = (int)(<span class="keywordtype">short</span>)usGetWord(
-<a name="l00417"></a>00417                                         iFodo + iFodoOff + 4,
-<a name="l00418"></a>00418                                         aucGrpprl);
-<a name="l00419"></a>00419                         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; iCol; iIndex++) {
-<a name="l00420"></a>00420                                 iPosCurr = (int)(<span class="keywordtype">short</span>)usGetWord(
-<a name="l00421"></a>00421                                         iFodo + iFodoOff + 6 + iIndex * 2,
-<a name="l00422"></a>00422                                         aucGrpprl);
-<a name="l00423"></a>00423                                 pRow-&gt;asColumnWidth[iIndex] =
-<a name="l00424"></a>00424                                                 (short)(iPosCurr - iPosPrev);
-<a name="l00425"></a>00425                                 iPosPrev = iPosCurr;
-<a name="l00426"></a>00426                         }
-<a name="l00427"></a>00427                         bFound190 = TRUE;
-<a name="l00428"></a>00428                         <span class="keywordflow">break</span>;
-<a name="l00429"></a>00429                 <span class="keywordflow">default</span>:
-<a name="l00430"></a>00430                         <span class="keywordflow">break</span>;
-<a name="l00431"></a>00431                 }
-<a name="l00432"></a>00432                 <span class="keywordflow">if</span> (iInfoLen &lt;= 0) {
-<a name="l00433"></a>00433                         iInfoLen =
-<a name="l00434"></a>00434                                 iGet6InfoLength(iFodo + iFodoOff, aucGrpprl);
-<a name="l00435"></a>00435                         fail(iInfoLen &lt;= 0);
-<a name="l00436"></a>00436                 }
-<a name="l00437"></a>00437                 iFodoOff += iInfoLen;
-<a name="l00438"></a>00438         }
-<a name="l00439"></a>00439 
-<a name="l00440"></a>00440         <span class="keywordflow">if</span> (bFound25_1 &amp;&amp; bFound190) {
-<a name="l00441"></a>00441                 <span class="keywordflow">return</span> found_end_of_row;
-<a name="l00442"></a>00442         }
-<a name="l00443"></a>00443         <span class="keywordflow">if</span> (bFound25_0 &amp;&amp; !bFound190) {
-<a name="l00444"></a>00444                 <span class="keywordflow">return</span> found_not_end_of_row;
-<a name="l00445"></a>00445         }
-<a name="l00446"></a>00446         <span class="keywordflow">if</span> (bFound24_1) {
-<a name="l00447"></a>00447                 <span class="keywordflow">return</span> found_a_cell;
-<a name="l00448"></a>00448         }
-<a name="l00449"></a>00449         <span class="keywordflow">if</span> (bFound24_0) {
-<a name="l00450"></a>00450                 <span class="keywordflow">return</span> found_not_a_cell;
-<a name="l00451"></a>00451         }
-<a name="l00452"></a>00452         <span class="keywordflow">return</span> found_nothing;
-<a name="l00453"></a>00453 } <span class="comment">/* end of eGet6RowInfo */</span>
-<a name="l00454"></a>00454 
-<a name="l00455"></a>00455 <span class="comment">/*</span>
-<a name="l00456"></a>00456 <span class="comment"> * Fill the style information block with information</span>
-<a name="l00457"></a>00457 <span class="comment"> * from a Word 6/7 file.</span>
-<a name="l00458"></a>00458 <span class="comment"> */</span>
-<a name="l00459"></a>00459 <span class="keywordtype">void</span>
-<a name="l00460"></a>00460 vGet6StyleInfo(<span class="keywordtype">int</span> iFodo,
-<a name="l00461"></a>00461         <span class="keyword">const</span> UCHAR *aucGrpprl, <span class="keywordtype">int</span> iBytes, style_block_type *pStyle)
-<a name="l00462"></a>00462 {
-<a name="l00463"></a>00463         <span class="keywordtype">int</span>     iFodoOff, iInfoLen;
-<a name="l00464"></a>00464         <span class="keywordtype">int</span>     iTmp, iDel, iAdd, iBefore;
-<a name="l00465"></a>00465         <span class="keywordtype">short</span>   sTmp;
-<a name="l00466"></a>00466         UCHAR   ucTmp;
-<a name="l00467"></a>00467 
-<a name="l00468"></a>00468         fail(iFodo &lt; 0 || aucGrpprl == NULL || pStyle == NULL);
-<a name="l00469"></a>00469 
-<a name="l00470"></a>00470         NO_DBG_DEC(pStyle-&gt;usIstd);
-<a name="l00471"></a>00471 
-<a name="l00472"></a>00472         iFodoOff = 0;
-<a name="l00473"></a>00473         <span class="keywordflow">while</span> (iBytes &gt;= iFodoOff + 1) {
-<a name="l00474"></a>00474                 iInfoLen = 0;
-<a name="l00475"></a>00475                 <span class="keywordflow">switch</span> (ucGetByte(iFodo + iFodoOff, aucGrpprl)) {
-<a name="l00476"></a>00476                 <span class="keywordflow">case</span>   2:       <span class="comment">/* istd */</span>
-<a name="l00477"></a>00477                         sTmp = (short)ucGetByte(
-<a name="l00478"></a>00478                                         iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00479"></a>00479                         NO_DBG_DEC(sTmp);
-<a name="l00480"></a>00480                         <span class="keywordflow">break</span>;
-<a name="l00481"></a>00481                 <span class="keywordflow">case</span>   5:       <span class="comment">/* jc */</span>
-<a name="l00482"></a>00482                         pStyle-&gt;ucAlignment = ucGetByte(
-<a name="l00483"></a>00483                                         iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00484"></a>00484                         <span class="keywordflow">break</span>;
-<a name="l00485"></a>00485                 <span class="keywordflow">case</span>  12:       <span class="comment">/* anld */</span>
-<a name="l00486"></a>00486                         iTmp = (int)ucGetByte(
-<a name="l00487"></a>00487                                         iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00488"></a>00488                         DBG_DEC_C(iTmp &lt; 52, iTmp);
-<a name="l00489"></a>00489                         <span class="keywordflow">if</span> (iTmp &gt;= 1) {
-<a name="l00490"></a>00490                                 pStyle-&gt;ucNFC = ucGetByte(
-<a name="l00491"></a>00491                                         iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l00492"></a>00492                         }
-<a name="l00493"></a>00493                         <span class="keywordflow">if</span> (pStyle-&gt;ucNFC != LIST_BULLETS &amp;&amp; iTmp &gt;= 2) {
-<a name="l00494"></a>00494                                 iBefore = (int)ucGetByte(
-<a name="l00495"></a>00495                                         iFodo + iFodoOff + 3, aucGrpprl);
-<a name="l00496"></a>00496                         } <span class="keywordflow">else</span> {
-<a name="l00497"></a>00497                                 iBefore = 0;
-<a name="l00498"></a>00498                         }
-<a name="l00499"></a>00499                         <span class="keywordflow">if</span> (iTmp &gt;= 12) {
-<a name="l00500"></a>00500                                 pStyle-&gt;usStartAt = usGetWord(
-<a name="l00501"></a>00501                                         iFodo + iFodoOff + 12, aucGrpprl);
-<a name="l00502"></a>00502                         }
-<a name="l00503"></a>00503                         <span class="keywordflow">if</span> (iTmp &gt;= iBefore + 21) {
-<a name="l00504"></a>00504                                 pStyle-&gt;usListChar = (USHORT)ucGetByte(
-<a name="l00505"></a>00505                                         iFodo + iFodoOff + iBefore + 22,
-<a name="l00506"></a>00506                                         aucGrpprl);
-<a name="l00507"></a>00507                                 NO_DBG_HEX(pStyle-&gt;usListChar);
-<a name="l00508"></a>00508                         }
-<a name="l00509"></a>00509                         <span class="keywordflow">break</span>;
-<a name="l00510"></a>00510                 <span class="keywordflow">case</span>  13:       <span class="comment">/* nLvlAnm */</span>
-<a name="l00511"></a>00511                         ucTmp = ucGetByte(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00512"></a>00512                         pStyle-&gt;ucNumLevel = ucTmp;
-<a name="l00513"></a>00513                         pStyle-&gt;bNumPause =
-<a name="l00514"></a>00514                                 eGetNumType(ucTmp) == level_type_pause;
-<a name="l00515"></a>00515                         <span class="keywordflow">break</span>;
-<a name="l00516"></a>00516                 <span class="keywordflow">case</span>  15:       <span class="comment">/* ChgTabsPapx */</span>
-<a name="l00517"></a>00517                 <span class="keywordflow">case</span>  23:       <span class="comment">/* ChgTabs */</span>
-<a name="l00518"></a>00518                         iTmp = (int)ucGetByte(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00519"></a>00519                         <span class="keywordflow">if</span> (iTmp &lt; 2) {
-<a name="l00520"></a>00520                                 iInfoLen = 1;
-<a name="l00521"></a>00521                                 <span class="keywordflow">break</span>;
-<a name="l00522"></a>00522                         }
-<a name="l00523"></a>00523                         NO_DBG_DEC(iTmp);
-<a name="l00524"></a>00524                         iDel = (int)ucGetByte(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l00525"></a>00525                         <span class="keywordflow">if</span> (iTmp &lt; 2 + 2 * iDel) {
-<a name="l00526"></a>00526                                 iInfoLen = 1;
-<a name="l00527"></a>00527                                 <span class="keywordflow">break</span>;
-<a name="l00528"></a>00528                         }
-<a name="l00529"></a>00529                         NO_DBG_DEC(iDel);
-<a name="l00530"></a>00530                         iAdd = (int)ucGetByte(
-<a name="l00531"></a>00531                                 iFodo + iFodoOff + 3 + 2 * iDel, aucGrpprl);
-<a name="l00532"></a>00532                         <span class="keywordflow">if</span> (iTmp &lt; 2 + 2 * iDel + 2 * iAdd) {
-<a name="l00533"></a>00533                                 iInfoLen = 1;
-<a name="l00534"></a>00534                                 <span class="keywordflow">break</span>;
-<a name="l00535"></a>00535                         }
-<a name="l00536"></a>00536                         NO_DBG_DEC(iAdd);
-<a name="l00537"></a>00537                         <span class="keywordflow">break</span>;
-<a name="l00538"></a>00538                 <span class="keywordflow">case</span>  16:       <span class="comment">/* dxaRight */</span>
-<a name="l00539"></a>00539                         pStyle-&gt;sRightIndent = (short)usGetWord(
-<a name="l00540"></a>00540                                         iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00541"></a>00541                         NO_DBG_DEC(pStyle-&gt;sRightIndent);
-<a name="l00542"></a>00542                         <span class="keywordflow">break</span>;
-<a name="l00543"></a>00543                 <span class="keywordflow">case</span>  17:       <span class="comment">/* dxaLeft */</span>
-<a name="l00544"></a>00544                         pStyle-&gt;sLeftIndent = (short)usGetWord(
-<a name="l00545"></a>00545                                         iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00546"></a>00546                         NO_DBG_DEC(pStyle-&gt;sLeftIndent);
-<a name="l00547"></a>00547                         <span class="keywordflow">break</span>;
-<a name="l00548"></a>00548                 <span class="keywordflow">case</span>  18:       <span class="comment">/* Nest dxaLeft */</span>
-<a name="l00549"></a>00549                         sTmp = (short)usGetWord(
-<a name="l00550"></a>00550                                         iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00551"></a>00551                         pStyle-&gt;sLeftIndent += sTmp;
-<a name="l00552"></a>00552                         <span class="keywordflow">if</span> (pStyle-&gt;sLeftIndent &lt; 0) {
-<a name="l00553"></a>00553                                 pStyle-&gt;sLeftIndent = 0;
-<a name="l00554"></a>00554                         }
-<a name="l00555"></a>00555                         NO_DBG_DEC(sTmp);
-<a name="l00556"></a>00556                         NO_DBG_DEC(pStyle-&gt;sLeftIndent);
-<a name="l00557"></a>00557                         <span class="keywordflow">break</span>;
-<a name="l00558"></a>00558                 <span class="keywordflow">case</span>  19:       <span class="comment">/* dxaLeft1 */</span>
-<a name="l00559"></a>00559                         pStyle-&gt;sLeftIndent1 = (short)usGetWord(
-<a name="l00560"></a>00560                                         iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00561"></a>00561                         NO_DBG_DEC(pStyle-&gt;sLeftIndent1);
-<a name="l00562"></a>00562                         <span class="keywordflow">break</span>;
-<a name="l00563"></a>00563                 <span class="keywordflow">case</span>  21:       <span class="comment">/* dyaBefore */</span>
-<a name="l00564"></a>00564                         pStyle-&gt;usBeforeIndent = usGetWord(
-<a name="l00565"></a>00565                                         iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00566"></a>00566                         NO_DBG_DEC(pStyle-&gt;usBeforeIndent);
-<a name="l00567"></a>00567                         <span class="keywordflow">break</span>;
-<a name="l00568"></a>00568                 <span class="keywordflow">case</span>  22:       <span class="comment">/* dyaAfter */</span>
-<a name="l00569"></a>00569                         pStyle-&gt;usAfterIndent = usGetWord(
-<a name="l00570"></a>00570                                         iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00571"></a>00571                         NO_DBG_DEC(pStyle-&gt;usAfterIndent);
-<a name="l00572"></a>00572                         <span class="keywordflow">break</span>;
-<a name="l00573"></a>00573                 <span class="keywordflow">default</span>:
-<a name="l00574"></a>00574                         <span class="keywordflow">break</span>;
-<a name="l00575"></a>00575                 }
-<a name="l00576"></a>00576                 <span class="keywordflow">if</span> (iInfoLen &lt;= 0) {
-<a name="l00577"></a>00577                         iInfoLen =
-<a name="l00578"></a>00578                                 iGet6InfoLength(iFodo + iFodoOff, aucGrpprl);
-<a name="l00579"></a>00579                         fail(iInfoLen &lt;= 0);
-<a name="l00580"></a>00580                 }
-<a name="l00581"></a>00581                 iFodoOff += iInfoLen;
-<a name="l00582"></a>00582         }
-<a name="l00583"></a>00583 } <span class="comment">/* end of vGet6StyleInfo */</span>
-<a name="l00584"></a>00584 
-<a name="l00585"></a>00585 <span class="comment">/*</span>
-<a name="l00586"></a>00586 <span class="comment"> * Build the lists with Paragraph Information for Word 6/7 files</span>
-<a name="l00587"></a>00587 <span class="comment"> */</span>
-<a name="l00588"></a>00588 <span class="keywordtype">void</span>
-<a name="l00589"></a>00589 vGet6PapInfo(FILE *pFile, ULONG ulStartBlock,
-<a name="l00590"></a>00590         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00591"></a>00591         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00592"></a>00592 {
-<a name="l00593"></a>00593         row_block_type          tRow;
-<a name="l00594"></a>00594         style_block_type        tStyle;
-<a name="l00595"></a>00595         USHORT  *ausParfPage;
-<a name="l00596"></a>00596         UCHAR   *aucBuffer;
-<a name="l00597"></a>00597         ULONG   ulCharPos, ulCharPosFirst, ulCharPosLast;
-<a name="l00598"></a>00598         ULONG   ulBeginParfInfo;
-<a name="l00599"></a>00599         <span class="keywordtype">size_t</span>  tParfInfoLen, tParfPageNum, tOffset, tSize, tLenOld, tLen;
-<a name="l00600"></a>00600         <span class="keywordtype">size_t</span>  tIndex, tIndex2, tRun;
-<a name="l00601"></a>00601         <span class="keywordtype">int</span>     iFodo, iLen;
-<a name="l00602"></a>00602         row_info_enum   eRowInfo;
-<a name="l00603"></a>00603         USHORT  usParfFirstPage, usCount, usIstd;
-<a name="l00604"></a>00604         UCHAR   aucFpage[BIG_BLOCK_SIZE];
-<a name="l00605"></a>00605 
-<a name="l00606"></a>00606         fail(pFile == NULL || aucHeader == NULL);
-<a name="l00607"></a>00607         fail(ulStartBlock &gt; MAX_BLOCKNUMBER &amp;&amp; ulStartBlock != END_OF_CHAIN);
-<a name="l00608"></a>00608         fail(aulBBD == NULL);
-<a name="l00609"></a>00609 
-<a name="l00610"></a>00610         ulBeginParfInfo = ulGetLong(0xc0, aucHeader); <span class="comment">/* fcPlcfbtePapx */</span>
-<a name="l00611"></a>00611         NO_DBG_HEX(ulBeginParfInfo);
-<a name="l00612"></a>00612         tParfInfoLen = (size_t)ulGetLong(0xc4, aucHeader); <span class="comment">/* lcbPlcfbtePapx */</span>
-<a name="l00613"></a>00613         NO_DBG_DEC(tParfInfoLen);
-<a name="l00614"></a>00614         <span class="keywordflow">if</span> (tParfInfoLen &lt; 4) {
-<a name="l00615"></a>00615                 DBG_DEC(tParfInfoLen);
-<a name="l00616"></a>00616                 <span class="keywordflow">return</span>;
-<a name="l00617"></a>00617         }
-<a name="l00618"></a>00618 
-<a name="l00619"></a>00619         aucBuffer = xmalloc(tParfInfoLen);
-<a name="l00620"></a>00620         <span class="keywordflow">if</span> (!bReadBuffer(pFile, ulStartBlock,
-<a name="l00621"></a>00621                         aulBBD, tBBDLen, BIG_BLOCK_SIZE,
-<a name="l00622"></a>00622                         aucBuffer, ulBeginParfInfo, tParfInfoLen)) {
-<a name="l00623"></a>00623                 aucBuffer = xfree(aucBuffer);
-<a name="l00624"></a>00624                 <span class="keywordflow">return</span>;
-<a name="l00625"></a>00625         }
-<a name="l00626"></a>00626         NO_DBG_PRINT_BLOCK(aucBuffer, tParfInfoLen);
-<a name="l00627"></a>00627 
-<a name="l00628"></a>00628         tLen = (tParfInfoLen - 4) / 6;
-<a name="l00629"></a>00629         ausParfPage = xcalloc(tLen, <span class="keyword">sizeof</span>(USHORT));
-<a name="l00630"></a>00630         <span class="keywordflow">for</span> (tIndex = 0, tOffset = (tLen + 1) * 4;
-<a name="l00631"></a>00631              tIndex &lt; tLen;
-<a name="l00632"></a>00632              tIndex++, tOffset += 2) {
-<a name="l00633"></a>00633                  ausParfPage[tIndex] = usGetWord(tOffset, aucBuffer);
-<a name="l00634"></a>00634                  NO_DBG_DEC(ausParfPage[tIndex]);
-<a name="l00635"></a>00635         }
-<a name="l00636"></a>00636         DBG_HEX(ulGetLong(0, aucBuffer));
-<a name="l00637"></a>00637         aucBuffer = xfree(aucBuffer);
-<a name="l00638"></a>00638         tParfPageNum = (size_t)usGetWord(0x190, aucHeader); <span class="comment">/* cpnBtePap */</span>
-<a name="l00639"></a>00639         DBG_DEC(tParfPageNum);
-<a name="l00640"></a>00640         <span class="keywordflow">if</span> (tLen &lt; tParfPageNum) {
-<a name="l00641"></a>00641                 <span class="comment">/* Replace ParfPage by a longer version */</span>
-<a name="l00642"></a>00642                 tLenOld = tLen;
-<a name="l00643"></a>00643                 usParfFirstPage = usGetWord(0x18c, aucHeader); <span class="comment">/* pnPapFirst */</span>
-<a name="l00644"></a>00644                 DBG_DEC(usParfFirstPage);
-<a name="l00645"></a>00645                 tLen += tParfPageNum - 1;
-<a name="l00646"></a>00646                 tSize = tLen * <span class="keyword">sizeof</span>(USHORT);
-<a name="l00647"></a>00647                 ausParfPage = xrealloc(ausParfPage, tSize);
-<a name="l00648"></a>00648                 <span class="comment">/* Add new values */</span>
-<a name="l00649"></a>00649                 usCount = usParfFirstPage + 1;
-<a name="l00650"></a>00650                 <span class="keywordflow">for</span> (tIndex = tLenOld; tIndex &lt; tLen; tIndex++) {
-<a name="l00651"></a>00651                         ausParfPage[tIndex] = usCount;
-<a name="l00652"></a>00652                         NO_DBG_DEC(ausParfPage[tIndex]);
-<a name="l00653"></a>00653                         usCount++;
-<a name="l00654"></a>00654                 }
-<a name="l00655"></a>00655         }
-<a name="l00656"></a>00656 
-<a name="l00657"></a>00657         (void)memset(&amp;tRow, 0, <span class="keyword">sizeof</span>(tRow));
-<a name="l00658"></a>00658         ulCharPosFirst = CP_INVALID;
-<a name="l00659"></a>00659         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tLen; tIndex++) {
-<a name="l00660"></a>00660                 <span class="keywordflow">if</span> (!bReadBuffer(pFile, ulStartBlock,
-<a name="l00661"></a>00661                                 aulBBD, tBBDLen, BIG_BLOCK_SIZE,
-<a name="l00662"></a>00662                                 aucFpage,
-<a name="l00663"></a>00663                                 (ULONG)ausParfPage[tIndex] * BIG_BLOCK_SIZE,
-<a name="l00664"></a>00664                                 BIG_BLOCK_SIZE)) {
-<a name="l00665"></a>00665                         <span class="keywordflow">break</span>;
-<a name="l00666"></a>00666                 }
-<a name="l00667"></a>00667                 tRun = (size_t)ucGetByte(0x1ff, aucFpage);
-<a name="l00668"></a>00668                 NO_DBG_DEC(tRun);
-<a name="l00669"></a>00669                 <span class="keywordflow">for</span> (tIndex2 = 0; tIndex2 &lt; tRun; tIndex2++) {
-<a name="l00670"></a>00670                         NO_DBG_HEX(ulGetLong(tIndex2 * 4, aucFpage));
-<a name="l00671"></a>00671                         iFodo = 2 * (int)ucGetByte(
-<a name="l00672"></a>00672                                 (tRun + 1) * 4 + tIndex2 * 7, aucFpage);
-<a name="l00673"></a>00673                         <span class="keywordflow">if</span> (iFodo &lt;= 0) {
-<a name="l00674"></a>00674                                 <span class="keywordflow">continue</span>;
-<a name="l00675"></a>00675                         }
-<a name="l00676"></a>00676 
-<a name="l00677"></a>00677                         iLen = 2 * (int)ucGetByte(iFodo, aucFpage);
-<a name="l00678"></a>00678 
-<a name="l00679"></a>00679                         usIstd = (USHORT)ucGetByte(iFodo + 1, aucFpage);
-<a name="l00680"></a>00680                         vFillStyleFromStylesheet(usIstd, &amp;tStyle);
-<a name="l00681"></a>00681                         vGet6StyleInfo(iFodo, aucFpage + 3, iLen - 3, &amp;tStyle);
-<a name="l00682"></a>00682                         ulCharPos = ulGetLong(tIndex2 * 4, aucFpage);
-<a name="l00683"></a>00683                         NO_DBG_HEX(ulCharPos);
-<a name="l00684"></a>00684                         tStyle.ulFileOffset = ulCharPos2FileOffsetX(
-<a name="l00685"></a>00685                                 ulCharPos, &amp;tStyle.eListID);
-<a name="l00686"></a>00686                         vAdd2StyleInfoList(&amp;tStyle);
-<a name="l00687"></a>00687 
-<a name="l00688"></a>00688                         eRowInfo = eGet6RowInfo(iFodo,
-<a name="l00689"></a>00689                                         aucFpage + 3, iLen - 3, &amp;tRow);
-<a name="l00690"></a>00690                         <span class="keywordflow">switch</span>(eRowInfo) {
-<a name="l00691"></a>00691                         <span class="keywordflow">case</span> found_a_cell:
-<a name="l00692"></a>00692                                 <span class="keywordflow">if</span> (ulCharPosFirst != CP_INVALID) {
-<a name="l00693"></a>00693                                         <span class="keywordflow">break</span>;
-<a name="l00694"></a>00694                                 }
-<a name="l00695"></a>00695                                 ulCharPosFirst = ulGetLong(
-<a name="l00696"></a>00696                                                 tIndex2 * 4, aucFpage);
-<a name="l00697"></a>00697                                 NO_DBG_HEX(ulCharPosFirst);
-<a name="l00698"></a>00698                                 tRow.ulCharPosStart = ulCharPosFirst;
-<a name="l00699"></a>00699                                 tRow.ulFileOffsetStart =
-<a name="l00700"></a>00700                                         ulCharPos2FileOffset(ulCharPosFirst);
-<a name="l00701"></a>00701                                 DBG_HEX_C(tRow.ulFileOffsetStart == FC_INVALID,
-<a name="l00702"></a>00702                                                         ulCharPosFirst);
-<a name="l00703"></a>00703                                 <span class="keywordflow">break</span>;
-<a name="l00704"></a>00704                         <span class="keywordflow">case</span> found_end_of_row:
-<a name="l00705"></a>00705                                 ulCharPosLast = ulGetLong(
-<a name="l00706"></a>00706                                                 tIndex2 * 4, aucFpage);
-<a name="l00707"></a>00707                                 NO_DBG_HEX(ulCharPosLast);
-<a name="l00708"></a>00708                                 tRow.ulCharPosEnd = ulCharPosLast;
-<a name="l00709"></a>00709                                 tRow.ulFileOffsetEnd =
-<a name="l00710"></a>00710                                         ulCharPos2FileOffset(ulCharPosLast);
-<a name="l00711"></a>00711                                 DBG_HEX_C(tRow.ulFileOffsetEnd == FC_INVALID,
-<a name="l00712"></a>00712                                                         ulCharPosLast);
-<a name="l00713"></a>00713                                 vAdd2RowInfoList(&amp;tRow);
-<a name="l00714"></a>00714                                 (void)memset(&amp;tRow, 0, <span class="keyword">sizeof</span>(tRow));
-<a name="l00715"></a>00715                                 ulCharPosFirst = CP_INVALID;
-<a name="l00716"></a>00716                                 <span class="keywordflow">break</span>;
-<a name="l00717"></a>00717                         <span class="keywordflow">case</span> found_nothing:
-<a name="l00718"></a>00718                                 <span class="keywordflow">break</span>;
-<a name="l00719"></a>00719                         <span class="keywordflow">default</span>:
-<a name="l00720"></a>00720                                 DBG_DEC(eRowInfo);
-<a name="l00721"></a>00721                                 <span class="keywordflow">break</span>;
-<a name="l00722"></a>00722                         }
-<a name="l00723"></a>00723                 }
-<a name="l00724"></a>00724         }
-<a name="l00725"></a>00725         ausParfPage = xfree(ausParfPage);
-<a name="l00726"></a>00726 } <span class="comment">/* end of vGet6PapInfo */</span>
-<a name="l00727"></a>00727 
-<a name="l00728"></a>00728 <span class="comment">/*</span>
-<a name="l00729"></a>00729 <span class="comment"> * Fill the font information block with information</span>
-<a name="l00730"></a>00730 <span class="comment"> * from a Word 6/7 file.</span>
-<a name="l00731"></a>00731 <span class="comment"> * Returns TRUE when successful, otherwise FALSE</span>
-<a name="l00732"></a>00732 <span class="comment"> */</span>
-<a name="l00733"></a>00733 <span class="keywordtype">void</span>
-<a name="l00734"></a>00734 vGet6FontInfo(<span class="keywordtype">int</span> iFodo, USHORT usIstd,
-<a name="l00735"></a>00735         <span class="keyword">const</span> UCHAR *aucGrpprl, <span class="keywordtype">int</span> iBytes, font_block_type *pFont)
-<a name="l00736"></a>00736 {
-<a name="l00737"></a>00737         <span class="keywordtype">long</span>    lTmp;
-<a name="l00738"></a>00738         <span class="keywordtype">int</span>     iFodoOff, iInfoLen;
-<a name="l00739"></a>00739         USHORT  usTmp;
-<a name="l00740"></a>00740         UCHAR   ucTmp;
-<a name="l00741"></a>00741 
-<a name="l00742"></a>00742         TRACE_MSG(<span class="stringliteral">&quot;vGet6FontInfo&quot;</span>);
-<a name="l00743"></a>00743 
-<a name="l00744"></a>00744         fail(iFodo &lt; 0 || aucGrpprl == NULL || pFont == NULL);
-<a name="l00745"></a>00745 
-<a name="l00746"></a>00746         iFodoOff = 0;
-<a name="l00747"></a>00747         <span class="keywordflow">while</span> (iBytes &gt;= iFodoOff + 1) {
-<a name="l00748"></a>00748                 <span class="keywordflow">switch</span> (ucGetByte(iFodo + iFodoOff, aucGrpprl)) {
-<a name="l00749"></a>00749                 <span class="keywordflow">case</span>  65:       <span class="comment">/* fRMarkDel */</span>
-<a name="l00750"></a>00750                         ucTmp = ucGetByte(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00751"></a>00751                         <span class="keywordflow">if</span> (ucTmp == 0) {
-<a name="l00752"></a>00752                                 pFont-&gt;usFontStyle &amp;= ~FONT_MARKDEL;
-<a name="l00753"></a>00753                         } <span class="keywordflow">else</span> {
-<a name="l00754"></a>00754                                 pFont-&gt;usFontStyle |= FONT_MARKDEL;
-<a name="l00755"></a>00755                         }
-<a name="l00756"></a>00756                         <span class="keywordflow">break</span>;
-<a name="l00757"></a>00757                 <span class="keywordflow">case</span>  80:       <span class="comment">/* cIstd */</span>
-<a name="l00758"></a>00758                         usTmp = usGetWord(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00759"></a>00759                         NO_DBG_DEC(usTmp);
-<a name="l00760"></a>00760                         <span class="keywordflow">break</span>;
-<a name="l00761"></a>00761                 <span class="keywordflow">case</span>  82:       <span class="comment">/* cDefault */</span>
-<a name="l00762"></a>00762                         pFont-&gt;usFontStyle &amp;= FONT_HIDDEN;
-<a name="l00763"></a>00763                         pFont-&gt;ucFontColor = FONT_COLOR_DEFAULT;
-<a name="l00764"></a>00764                         <span class="keywordflow">break</span>;
-<a name="l00765"></a>00765                 <span class="keywordflow">case</span>  83:       <span class="comment">/* cPlain */</span>
-<a name="l00766"></a>00766                         DBG_MSG(<span class="stringliteral">&quot;83: cPlain&quot;</span>);
-<a name="l00767"></a>00767                         vFillFontFromStylesheet(usIstd, pFont);
-<a name="l00768"></a>00768                         <span class="keywordflow">break</span>;
-<a name="l00769"></a>00769                 <span class="keywordflow">case</span>  85:       <span class="comment">/* fBold */</span>
-<a name="l00770"></a>00770                         ucTmp = ucGetByte(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00771"></a>00771                         <span class="keywordflow">switch</span> (ucTmp) {
-<a name="l00772"></a>00772                         <span class="keywordflow">case</span>   0:       <span class="comment">/* Unset */</span>
-<a name="l00773"></a>00773                                 pFont-&gt;usFontStyle &amp;= ~FONT_BOLD;
-<a name="l00774"></a>00774                                 <span class="keywordflow">break</span>;
-<a name="l00775"></a>00775                         <span class="keywordflow">case</span>   1:       <span class="comment">/* Set */</span>
-<a name="l00776"></a>00776                                 pFont-&gt;usFontStyle |= FONT_BOLD;
-<a name="l00777"></a>00777                                 <span class="keywordflow">break</span>;
-<a name="l00778"></a>00778                         <span class="keywordflow">case</span> 128:       <span class="comment">/* Unchanged */</span>
-<a name="l00779"></a>00779                                 <span class="keywordflow">break</span>;
-<a name="l00780"></a>00780                         <span class="keywordflow">case</span> 129:       <span class="comment">/* Negation */</span>
-<a name="l00781"></a>00781                                 pFont-&gt;usFontStyle ^= FONT_BOLD;
-<a name="l00782"></a>00782                                 <span class="keywordflow">break</span>;
-<a name="l00783"></a>00783                         <span class="keywordflow">default</span>:
-<a name="l00784"></a>00784                                 DBG_DEC(ucTmp);
-<a name="l00785"></a>00785                                 DBG_FIXME();
-<a name="l00786"></a>00786                                 <span class="keywordflow">break</span>;
-<a name="l00787"></a>00787                         }
-<a name="l00788"></a>00788                         <span class="keywordflow">break</span>;
-<a name="l00789"></a>00789                 <span class="keywordflow">case</span>  86:       <span class="comment">/* fItalic */</span>
-<a name="l00790"></a>00790                         ucTmp = ucGetByte(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00791"></a>00791                         <span class="keywordflow">switch</span> (ucTmp) {
-<a name="l00792"></a>00792                         <span class="keywordflow">case</span>   0:       <span class="comment">/* Unset */</span>
-<a name="l00793"></a>00793                                 pFont-&gt;usFontStyle &amp;= ~FONT_ITALIC;
-<a name="l00794"></a>00794                                 <span class="keywordflow">break</span>;
-<a name="l00795"></a>00795                         <span class="keywordflow">case</span>   1:       <span class="comment">/* Set */</span>
-<a name="l00796"></a>00796                                 pFont-&gt;usFontStyle |= FONT_ITALIC;
-<a name="l00797"></a>00797                                 <span class="keywordflow">break</span>;
-<a name="l00798"></a>00798                         <span class="keywordflow">case</span> 128:       <span class="comment">/* Unchanged */</span>
-<a name="l00799"></a>00799                                 <span class="keywordflow">break</span>;
-<a name="l00800"></a>00800                         <span class="keywordflow">case</span> 129:       <span class="comment">/* Negation */</span>
-<a name="l00801"></a>00801                                 pFont-&gt;usFontStyle ^= FONT_ITALIC;
-<a name="l00802"></a>00802                                 <span class="keywordflow">break</span>;
-<a name="l00803"></a>00803                         <span class="keywordflow">default</span>:
-<a name="l00804"></a>00804                                 DBG_DEC(ucTmp);
-<a name="l00805"></a>00805                                 DBG_FIXME();
-<a name="l00806"></a>00806                                 <span class="keywordflow">break</span>;
-<a name="l00807"></a>00807                         }
-<a name="l00808"></a>00808                         <span class="keywordflow">break</span>;
-<a name="l00809"></a>00809                 <span class="keywordflow">case</span>  87:       <span class="comment">/* fStrike */</span>
-<a name="l00810"></a>00810                         ucTmp = ucGetByte(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00811"></a>00811                         <span class="keywordflow">switch</span> (ucTmp) {
-<a name="l00812"></a>00812                         <span class="keywordflow">case</span>   0:       <span class="comment">/* Unset */</span>
-<a name="l00813"></a>00813                                 pFont-&gt;usFontStyle &amp;= ~FONT_STRIKE;
-<a name="l00814"></a>00814                                 <span class="keywordflow">break</span>;
-<a name="l00815"></a>00815                         <span class="keywordflow">case</span>   1:       <span class="comment">/* Set */</span>
-<a name="l00816"></a>00816                                 pFont-&gt;usFontStyle |= FONT_STRIKE;
-<a name="l00817"></a>00817                                 <span class="keywordflow">break</span>;
-<a name="l00818"></a>00818                         <span class="keywordflow">case</span> 128:       <span class="comment">/* Unchanged */</span>
-<a name="l00819"></a>00819                                 <span class="keywordflow">break</span>;
-<a name="l00820"></a>00820                         <span class="keywordflow">case</span> 129:       <span class="comment">/* Negation */</span>
-<a name="l00821"></a>00821                                 pFont-&gt;usFontStyle ^= FONT_STRIKE;
-<a name="l00822"></a>00822                                 <span class="keywordflow">break</span>;
-<a name="l00823"></a>00823                         <span class="keywordflow">default</span>:
-<a name="l00824"></a>00824                                 DBG_DEC(ucTmp);
-<a name="l00825"></a>00825                                 DBG_FIXME();
-<a name="l00826"></a>00826                                 <span class="keywordflow">break</span>;
-<a name="l00827"></a>00827                         }
-<a name="l00828"></a>00828                         <span class="keywordflow">break</span>;
-<a name="l00829"></a>00829                 <span class="keywordflow">case</span>  90:       <span class="comment">/* fSmallCaps */</span>
-<a name="l00830"></a>00830                         ucTmp = ucGetByte(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00831"></a>00831                         <span class="keywordflow">switch</span> (ucTmp) {
-<a name="l00832"></a>00832                         <span class="keywordflow">case</span>   0:       <span class="comment">/* Unset */</span>
-<a name="l00833"></a>00833                                 pFont-&gt;usFontStyle &amp;= ~FONT_SMALL_CAPITALS;
-<a name="l00834"></a>00834                                 <span class="keywordflow">break</span>;
-<a name="l00835"></a>00835                         <span class="keywordflow">case</span>   1:       <span class="comment">/* Set */</span>
-<a name="l00836"></a>00836                                 pFont-&gt;usFontStyle |= FONT_SMALL_CAPITALS;
-<a name="l00837"></a>00837                                 <span class="keywordflow">break</span>;
-<a name="l00838"></a>00838                         <span class="keywordflow">case</span> 128:       <span class="comment">/* Unchanged */</span>
-<a name="l00839"></a>00839                                 <span class="keywordflow">break</span>;
-<a name="l00840"></a>00840                         <span class="keywordflow">case</span> 129:       <span class="comment">/* Negation */</span>
-<a name="l00841"></a>00841                                 pFont-&gt;usFontStyle ^= FONT_SMALL_CAPITALS;
-<a name="l00842"></a>00842                                 <span class="keywordflow">break</span>;
-<a name="l00843"></a>00843                         <span class="keywordflow">default</span>:
-<a name="l00844"></a>00844                                 DBG_DEC(ucTmp);
-<a name="l00845"></a>00845                                 DBG_FIXME();
-<a name="l00846"></a>00846                                 <span class="keywordflow">break</span>;
-<a name="l00847"></a>00847                         }
-<a name="l00848"></a>00848                         <span class="keywordflow">break</span>;
-<a name="l00849"></a>00849                 <span class="keywordflow">case</span>  91:       <span class="comment">/* fCaps */</span>
-<a name="l00850"></a>00850                         ucTmp = ucGetByte(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00851"></a>00851                         <span class="keywordflow">switch</span> (ucTmp) {
-<a name="l00852"></a>00852                         <span class="keywordflow">case</span>   0:       <span class="comment">/* Unset */</span>
-<a name="l00853"></a>00853                                 pFont-&gt;usFontStyle &amp;= ~FONT_CAPITALS;
-<a name="l00854"></a>00854                                 <span class="keywordflow">break</span>;
-<a name="l00855"></a>00855                         <span class="keywordflow">case</span>   1:       <span class="comment">/* Set */</span>
-<a name="l00856"></a>00856                                 pFont-&gt;usFontStyle |= FONT_CAPITALS;
-<a name="l00857"></a>00857                                 <span class="keywordflow">break</span>;
-<a name="l00858"></a>00858                         <span class="keywordflow">case</span> 128:       <span class="comment">/* Unchanged */</span>
-<a name="l00859"></a>00859                                 <span class="keywordflow">break</span>;
-<a name="l00860"></a>00860                         <span class="keywordflow">case</span> 129:       <span class="comment">/* Negation */</span>
-<a name="l00861"></a>00861                                 pFont-&gt;usFontStyle ^= FONT_CAPITALS;
-<a name="l00862"></a>00862                                 <span class="keywordflow">break</span>;
-<a name="l00863"></a>00863                         <span class="keywordflow">default</span>:
-<a name="l00864"></a>00864                                 DBG_DEC(ucTmp);
-<a name="l00865"></a>00865                                 DBG_FIXME();
-<a name="l00866"></a>00866                                 <span class="keywordflow">break</span>;
-<a name="l00867"></a>00867                         }
-<a name="l00868"></a>00868                         <span class="keywordflow">break</span>;
-<a name="l00869"></a>00869                 <span class="keywordflow">case</span>  92:       <span class="comment">/* fVanish */</span>
-<a name="l00870"></a>00870                         ucTmp = ucGetByte(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00871"></a>00871                         <span class="keywordflow">switch</span> (ucTmp) {
-<a name="l00872"></a>00872                         <span class="keywordflow">case</span>   0:       <span class="comment">/* Unset */</span>
-<a name="l00873"></a>00873                                 pFont-&gt;usFontStyle &amp;= ~FONT_HIDDEN;
-<a name="l00874"></a>00874                                 <span class="keywordflow">break</span>;
-<a name="l00875"></a>00875                         <span class="keywordflow">case</span>   1:       <span class="comment">/* Set */</span>
-<a name="l00876"></a>00876                                 pFont-&gt;usFontStyle |= FONT_HIDDEN;
-<a name="l00877"></a>00877                                 <span class="keywordflow">break</span>;
-<a name="l00878"></a>00878                         <span class="keywordflow">case</span> 128:       <span class="comment">/* Unchanged */</span>
-<a name="l00879"></a>00879                                 <span class="keywordflow">break</span>;
-<a name="l00880"></a>00880                         <span class="keywordflow">case</span> 129:       <span class="comment">/* Negation */</span>
-<a name="l00881"></a>00881                                 pFont-&gt;usFontStyle ^= FONT_HIDDEN;
-<a name="l00882"></a>00882                                 <span class="keywordflow">break</span>;
-<a name="l00883"></a>00883                         <span class="keywordflow">default</span>:
-<a name="l00884"></a>00884                                 DBG_DEC(ucTmp);
-<a name="l00885"></a>00885                                 DBG_FIXME();
-<a name="l00886"></a>00886                                 <span class="keywordflow">break</span>;
-<a name="l00887"></a>00887                         }
-<a name="l00888"></a>00888                         <span class="keywordflow">break</span>;
-<a name="l00889"></a>00889                 <span class="keywordflow">case</span>  93:       <span class="comment">/* cFtc */</span>
-<a name="l00890"></a>00890                         usTmp = usGetWord(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00891"></a>00891                         <span class="keywordflow">if</span> (usTmp &lt;= (USHORT)UCHAR_MAX) {
-<a name="l00892"></a>00892                                 pFont-&gt;ucFontNumber = (UCHAR)usTmp;
-<a name="l00893"></a>00893                         } <span class="keywordflow">else</span> {
-<a name="l00894"></a>00894                                 DBG_DEC(usTmp);
-<a name="l00895"></a>00895                                 DBG_FIXME();
-<a name="l00896"></a>00896                                 pFont-&gt;ucFontNumber = 0;
-<a name="l00897"></a>00897                         }
-<a name="l00898"></a>00898                         <span class="keywordflow">break</span>;
-<a name="l00899"></a>00899                 <span class="keywordflow">case</span>  94:       <span class="comment">/* cKul */</span>
-<a name="l00900"></a>00900                         ucTmp = ucGetByte(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00901"></a>00901                         <span class="keywordflow">if</span> (ucTmp == 0 || ucTmp == 5) {
-<a name="l00902"></a>00902                                 pFont-&gt;usFontStyle &amp;= ~FONT_UNDERLINE;
-<a name="l00903"></a>00903                         } <span class="keywordflow">else</span> {
-<a name="l00904"></a>00904                                 NO_DBG_MSG(<span class="stringliteral">&quot;Underline text&quot;</span>);
-<a name="l00905"></a>00905                                 pFont-&gt;usFontStyle |= FONT_UNDERLINE;
-<a name="l00906"></a>00906                                 <span class="keywordflow">if</span> (ucTmp == 6) {
-<a name="l00907"></a>00907                                         DBG_MSG(<span class="stringliteral">&quot;Bold text&quot;</span>);
-<a name="l00908"></a>00908                                         pFont-&gt;usFontStyle |= FONT_BOLD;
-<a name="l00909"></a>00909                                 }
-<a name="l00910"></a>00910                         }
-<a name="l00911"></a>00911                         <span class="keywordflow">break</span>;
-<a name="l00912"></a>00912                 <span class="keywordflow">case</span>  95:       <span class="comment">/* cHps, cHpsPos */</span>
-<a name="l00913"></a>00913                         ucTmp = ucGetByte(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00914"></a>00914                         DBG_DEC(ucTmp);
-<a name="l00915"></a>00915                         <span class="keywordflow">if</span> (ucTmp != 0) {
-<a name="l00916"></a>00916                                 pFont-&gt;usFontSize = (USHORT)ucTmp;
-<a name="l00917"></a>00917                         }
-<a name="l00918"></a>00918                         ucTmp = ucGetByte(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l00919"></a>00919                         DBG_DEC(ucTmp);
-<a name="l00920"></a>00920                         <span class="keywordflow">break</span>;
-<a name="l00921"></a>00921                 <span class="keywordflow">case</span>  98:       <span class="comment">/* cIco */</span>
-<a name="l00922"></a>00922                         pFont-&gt;ucFontColor =
-<a name="l00923"></a>00923                                 ucGetByte(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00924"></a>00924                         <span class="keywordflow">break</span>;
-<a name="l00925"></a>00925                 <span class="keywordflow">case</span>  99:       <span class="comment">/* cHps */</span>
-<a name="l00926"></a>00926                         pFont-&gt;usFontSize =
-<a name="l00927"></a>00927                                 usGetWord(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00928"></a>00928                         <span class="keywordflow">break</span>;
-<a name="l00929"></a>00929                 <span class="keywordflow">case</span> 100:       <span class="comment">/* cHpsInc */</span>
-<a name="l00930"></a>00930                         DBG_MSG(<span class="stringliteral">&quot;100: sprmCHpsInc&quot;</span>);
-<a name="l00931"></a>00931                         ucTmp = ucGetByte(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00932"></a>00932                         DBG_DEC(ucTmp);
-<a name="l00933"></a>00933                         <span class="keywordflow">break</span>;
-<a name="l00934"></a>00934                 <span class="keywordflow">case</span> 103:       <span class="comment">/* cMajority */</span>
-<a name="l00935"></a>00935                         DBG_MSG(<span class="stringliteral">&quot;103: sprmCMajority&quot;</span>);
-<a name="l00936"></a>00936                         <span class="keywordflow">break</span>;
-<a name="l00937"></a>00937                 <span class="keywordflow">case</span> 104:       <span class="comment">/* cIss */</span>
-<a name="l00938"></a>00938                         ucTmp = ucGetByte(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00939"></a>00939                         ucTmp &amp;= 0x07;
-<a name="l00940"></a>00940                         <span class="keywordflow">if</span> (ucTmp == 1) {
-<a name="l00941"></a>00941                                 pFont-&gt;usFontStyle |= FONT_SUPERSCRIPT;
-<a name="l00942"></a>00942                                 NO_DBG_MSG(<span class="stringliteral">&quot;Superscript&quot;</span>);
-<a name="l00943"></a>00943                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ucTmp == 2) {
-<a name="l00944"></a>00944                                 pFont-&gt;usFontStyle |= FONT_SUBSCRIPT;
-<a name="l00945"></a>00945                                 NO_DBG_MSG(<span class="stringliteral">&quot;Subscript&quot;</span>);
-<a name="l00946"></a>00946                         }
-<a name="l00947"></a>00947                         <span class="keywordflow">break</span>;
-<a name="l00948"></a>00948                 <span class="keywordflow">case</span> 106:       <span class="comment">/* cHpsInc1 */</span>
-<a name="l00949"></a>00949                         usTmp = usGetWord(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00950"></a>00950                         lTmp = (long)pFont-&gt;usFontSize + (<span class="keywordtype">long</span>)usTmp;
-<a name="l00951"></a>00951                         <span class="keywordflow">if</span> (lTmp &lt; 8) {
-<a name="l00952"></a>00952                                 pFont-&gt;usFontSize = 8;
-<a name="l00953"></a>00953                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (lTmp &gt; 32766) {
-<a name="l00954"></a>00954                                 pFont-&gt;usFontSize = 32766;
-<a name="l00955"></a>00955                         } <span class="keywordflow">else</span> {
-<a name="l00956"></a>00956                                 pFont-&gt;usFontSize = (USHORT)lTmp;
-<a name="l00957"></a>00957                         }
-<a name="l00958"></a>00958                         <span class="keywordflow">break</span>;
-<a name="l00959"></a>00959                 <span class="keywordflow">case</span> 108:       <span class="comment">/* cMajority50 */</span>
-<a name="l00960"></a>00960                         DBG_MSG(<span class="stringliteral">&quot;108: sprmCMajority50&quot;</span>);
-<a name="l00961"></a>00961                         <span class="keywordflow">break</span>;
-<a name="l00962"></a>00962                 <span class="keywordflow">case</span> 109:       <span class="comment">/* cHpsMul */</span>
-<a name="l00963"></a>00963                         DBG_MSG(<span class="stringliteral">&quot;109: sprmCHpsMul&quot;</span>);
-<a name="l00964"></a>00964                         usTmp = usGetWord(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l00965"></a>00965                         DBG_DEC(usTmp);
-<a name="l00966"></a>00966                         <span class="keywordflow">break</span>;
-<a name="l00967"></a>00967                 <span class="keywordflow">default</span>:
-<a name="l00968"></a>00968                         <span class="keywordflow">break</span>;
-<a name="l00969"></a>00969                 }
-<a name="l00970"></a>00970                 iInfoLen = iGet6InfoLength(iFodo + iFodoOff, aucGrpprl);
-<a name="l00971"></a>00971                 fail(iInfoLen &lt;= 0);
-<a name="l00972"></a>00972                 iFodoOff += iInfoLen;
-<a name="l00973"></a>00973         }
-<a name="l00974"></a>00974 } <span class="comment">/* end of vGet6FontInfo */</span>
-<a name="l00975"></a>00975 
-<a name="l00976"></a>00976 <span class="comment">/*</span>
-<a name="l00977"></a>00977 <span class="comment"> * Fill the picture information block with information</span>
-<a name="l00978"></a>00978 <span class="comment"> * from a Word 6/7 file.</span>
-<a name="l00979"></a>00979 <span class="comment"> * Returns TRUE when successful, otherwise FALSE</span>
-<a name="l00980"></a>00980 <span class="comment"> */</span>
-<a name="l00981"></a>00981 <span class="keyword">static</span> BOOL
-<a name="l00982"></a>00982 bGet6PicInfo(<span class="keywordtype">int</span> iFodo,
-<a name="l00983"></a>00983         <span class="keyword">const</span> UCHAR *aucGrpprl, <span class="keywordtype">int</span> iBytes, picture_block_type *pPicture)
-<a name="l00984"></a>00984 {
-<a name="l00985"></a>00985         <span class="keywordtype">int</span>     iFodoOff, iInfoLen;
-<a name="l00986"></a>00986         BOOL    bFound;
-<a name="l00987"></a>00987         UCHAR   ucTmp;
-<a name="l00988"></a>00988 
-<a name="l00989"></a>00989         TRACE_MSG(<span class="stringliteral">&quot;vGet6PicInfo&quot;</span>);
-<a name="l00990"></a>00990 
-<a name="l00991"></a>00991         fail(iFodo &lt; 0 || aucGrpprl == NULL || pPicture == NULL);
-<a name="l00992"></a>00992 
-<a name="l00993"></a>00993         iFodoOff = 0;
-<a name="l00994"></a>00994         bFound = FALSE;
-<a name="l00995"></a>00995         <span class="keywordflow">while</span> (iBytes &gt;= iFodoOff + 1) {
-<a name="l00996"></a>00996                 <span class="keywordflow">switch</span> (ucGetByte(iFodo + iFodoOff, aucGrpprl)) {
-<a name="l00997"></a>00997                 <span class="keywordflow">case</span>  68:       <span class="comment">/* fcPic */</span>
-<a name="l00998"></a>00998                         pPicture-&gt;ulPictureOffset = ulGetLong(
-<a name="l00999"></a>00999                                         iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l01000"></a>01000                         bFound = TRUE;
-<a name="l01001"></a>01001                         <span class="keywordflow">break</span>;
-<a name="l01002"></a>01002 <span class="preprocessor">#if 0</span>
-<a name="l01003"></a>01003 <span class="preprocessor"></span>                <span class="keywordflow">case</span>  71:       <span class="comment">/* fData */</span>
-<a name="l01004"></a>01004                         ucTmp = ucGetByte(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l01005"></a>01005                         <span class="keywordflow">if</span> (ucTmp == 0x01) {
-<a name="l01006"></a>01006                                 <span class="comment">/* Not a picture, but a form field */</span>
-<a name="l01007"></a>01007                                 <span class="keywordflow">return</span> FALSE;
-<a name="l01008"></a>01008                         }
-<a name="l01009"></a>01009                         DBG_DEC_C(ucTmp != 0, ucTmp);
-<a name="l01010"></a>01010                         <span class="keywordflow">break</span>;
-<a name="l01011"></a>01011 <span class="preprocessor">#endif</span>
-<a name="l01012"></a>01012 <span class="preprocessor"></span>                <span class="keywordflow">case</span>  75:       <span class="comment">/* fOle2 */</span>
-<a name="l01013"></a>01013                         ucTmp = ucGetByte(iFodo + iFodoOff + 1, aucGrpprl);
-<a name="l01014"></a>01014                         <span class="keywordflow">if</span> (ucTmp == 0x01) {
-<a name="l01015"></a>01015                                 <span class="comment">/* Not a picture, but an OLE object */</span>
-<a name="l01016"></a>01016                                 <span class="keywordflow">return</span> FALSE;
-<a name="l01017"></a>01017                         }
-<a name="l01018"></a>01018                         DBG_DEC_C(ucTmp != 0, ucTmp);
-<a name="l01019"></a>01019                         <span class="keywordflow">break</span>;
-<a name="l01020"></a>01020                 <span class="keywordflow">default</span>:
-<a name="l01021"></a>01021                         <span class="keywordflow">break</span>;
-<a name="l01022"></a>01022                 }
-<a name="l01023"></a>01023                 iInfoLen = iGet6InfoLength(iFodo + iFodoOff, aucGrpprl);
-<a name="l01024"></a>01024                 fail(iInfoLen &lt;= 0);
-<a name="l01025"></a>01025                 iFodoOff += iInfoLen;
-<a name="l01026"></a>01026         }
-<a name="l01027"></a>01027         <span class="keywordflow">return</span> bFound;
-<a name="l01028"></a>01028 } <span class="comment">/* end of bGet6PicInfo */</span>
-<a name="l01029"></a>01029 
-<a name="l01030"></a>01030 <span class="comment">/*</span>
-<a name="l01031"></a>01031 <span class="comment"> * Build the lists with Character Information for Word 6/7 files</span>
-<a name="l01032"></a>01032 <span class="comment"> */</span>
-<a name="l01033"></a>01033 <span class="keywordtype">void</span>
-<a name="l01034"></a>01034 vGet6ChrInfo(FILE *pFile, ULONG ulStartBlock,
-<a name="l01035"></a>01035         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l01036"></a>01036 {
-<a name="l01037"></a>01037         font_block_type         tFont;
-<a name="l01038"></a>01038         picture_block_type      tPicture;
-<a name="l01039"></a>01039         USHORT  *ausCharPage;
-<a name="l01040"></a>01040         UCHAR   *aucBuffer;
-<a name="l01041"></a>01041         ULONG   ulFileOffset, ulCharPos, ulBeginCharInfo;
-<a name="l01042"></a>01042         <span class="keywordtype">size_t</span>  tCharInfoLen, tOffset, tSize, tLenOld, tLen, tCharPageNum;
-<a name="l01043"></a>01043         <span class="keywordtype">size_t</span>  tIndex, tIndex2, tRun;
-<a name="l01044"></a>01044         <span class="keywordtype">int</span>     iFodo, iLen;
-<a name="l01045"></a>01045         USHORT  usCharFirstPage, usCount, usIstd;
-<a name="l01046"></a>01046         UCHAR   aucFpage[BIG_BLOCK_SIZE];
-<a name="l01047"></a>01047 
-<a name="l01048"></a>01048         fail(pFile == NULL || aucHeader == NULL);
-<a name="l01049"></a>01049         fail(ulStartBlock &gt; MAX_BLOCKNUMBER &amp;&amp; ulStartBlock != END_OF_CHAIN);
-<a name="l01050"></a>01050         fail(aulBBD == NULL);
-<a name="l01051"></a>01051 
-<a name="l01052"></a>01052         ulBeginCharInfo = ulGetLong(0xb8, aucHeader); <span class="comment">/* fcPlcfbteChpx */</span>
-<a name="l01053"></a>01053         NO_DBG_HEX(lBeginCharInfo);
-<a name="l01054"></a>01054         tCharInfoLen = (size_t)ulGetLong(0xbc, aucHeader); <span class="comment">/* lcbPlcfbteChpx */</span>
-<a name="l01055"></a>01055         NO_DBG_DEC(tCharInfoLen);
-<a name="l01056"></a>01056         <span class="keywordflow">if</span> (tCharInfoLen &lt; 4) {
-<a name="l01057"></a>01057                 DBG_DEC(tCharInfoLen);
-<a name="l01058"></a>01058                 <span class="keywordflow">return</span>;
-<a name="l01059"></a>01059         }
-<a name="l01060"></a>01060 
-<a name="l01061"></a>01061         aucBuffer = xmalloc(tCharInfoLen);
-<a name="l01062"></a>01062         <span class="keywordflow">if</span> (!bReadBuffer(pFile, ulStartBlock,
-<a name="l01063"></a>01063                         aulBBD, tBBDLen, BIG_BLOCK_SIZE,
-<a name="l01064"></a>01064                         aucBuffer, ulBeginCharInfo, tCharInfoLen)) {
-<a name="l01065"></a>01065                 aucBuffer = xfree(aucBuffer);
-<a name="l01066"></a>01066                 <span class="keywordflow">return</span>;
-<a name="l01067"></a>01067         }
-<a name="l01068"></a>01068 
-<a name="l01069"></a>01069         tLen = (tCharInfoLen - 4) / 6;
-<a name="l01070"></a>01070         ausCharPage = xcalloc(tLen, <span class="keyword">sizeof</span>(USHORT));
-<a name="l01071"></a>01071         <span class="keywordflow">for</span> (tIndex = 0, tOffset = (tLen + 1) * 4;
-<a name="l01072"></a>01072              tIndex &lt; tLen;
-<a name="l01073"></a>01073              tIndex++, tOffset += 2) {
-<a name="l01074"></a>01074                  ausCharPage[tIndex] = usGetWord(tOffset, aucBuffer);
-<a name="l01075"></a>01075                  NO_DBG_DEC(ausCharPage[tIndex]);
-<a name="l01076"></a>01076         }
-<a name="l01077"></a>01077         DBG_HEX(ulGetLong(0, aucBuffer));
-<a name="l01078"></a>01078         aucBuffer = xfree(aucBuffer);
-<a name="l01079"></a>01079         tCharPageNum = (size_t)usGetWord(0x18e, aucHeader); <span class="comment">/* cpnBteChp */</span>
-<a name="l01080"></a>01080         DBG_DEC(tCharPageNum);
-<a name="l01081"></a>01081         <span class="keywordflow">if</span> (tLen &lt; tCharPageNum) {
-<a name="l01082"></a>01082                 <span class="comment">/* Replace CharPage by a longer version */</span>
-<a name="l01083"></a>01083                 tLenOld = tLen;
-<a name="l01084"></a>01084                 usCharFirstPage = usGetWord(0x18a, aucHeader); <span class="comment">/* pnChrFirst */</span>
-<a name="l01085"></a>01085                 DBG_DEC(usCharFirstPage);
-<a name="l01086"></a>01086                 tLen += tCharPageNum - 1;
-<a name="l01087"></a>01087                 tSize = tLen * <span class="keyword">sizeof</span>(USHORT);
-<a name="l01088"></a>01088                 ausCharPage = xrealloc(ausCharPage, tSize);
-<a name="l01089"></a>01089                 <span class="comment">/* Add new values */</span>
-<a name="l01090"></a>01090                 usCount = usCharFirstPage + 1;
-<a name="l01091"></a>01091                 <span class="keywordflow">for</span> (tIndex = tLenOld; tIndex &lt; tLen; tIndex++) {
-<a name="l01092"></a>01092                         ausCharPage[tIndex] = usCount;
-<a name="l01093"></a>01093                         NO_DBG_DEC(ausCharPage[tIndex]);
-<a name="l01094"></a>01094                         usCount++;
-<a name="l01095"></a>01095                 }
-<a name="l01096"></a>01096         }
-<a name="l01097"></a>01097 
-<a name="l01098"></a>01098         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tLen; tIndex++) {
-<a name="l01099"></a>01099                 <span class="keywordflow">if</span> (!bReadBuffer(pFile, ulStartBlock,
-<a name="l01100"></a>01100                                 aulBBD, tBBDLen, BIG_BLOCK_SIZE,
-<a name="l01101"></a>01101                                 aucFpage,
-<a name="l01102"></a>01102                                 (ULONG)ausCharPage[tIndex] * BIG_BLOCK_SIZE,
-<a name="l01103"></a>01103                                 BIG_BLOCK_SIZE)) {
-<a name="l01104"></a>01104                         <span class="keywordflow">break</span>;
-<a name="l01105"></a>01105                 }
-<a name="l01106"></a>01106                 tRun = (size_t)ucGetByte(0x1ff, aucFpage);
-<a name="l01107"></a>01107                 NO_DBG_DEC(tRun);
-<a name="l01108"></a>01108                 <span class="keywordflow">for</span> (tIndex2 = 0; tIndex2 &lt; tRun; tIndex2++) {
-<a name="l01109"></a>01109                         ulCharPos = ulGetLong(tIndex2 * 4, aucFpage);
-<a name="l01110"></a>01110                         ulFileOffset = ulCharPos2FileOffset(ulCharPos);
-<a name="l01111"></a>01111                         iFodo = 2 * (int)ucGetByte(
-<a name="l01112"></a>01112                                 (tRun + 1) * 4 + tIndex2, aucFpage);
-<a name="l01113"></a>01113 
-<a name="l01114"></a>01114                         iLen = (int)ucGetByte(iFodo, aucFpage);
-<a name="l01115"></a>01115 
-<a name="l01116"></a>01116                         usIstd = usGetIstd(ulFileOffset);
-<a name="l01117"></a>01117                         vFillFontFromStylesheet(usIstd, &amp;tFont);
-<a name="l01118"></a>01118                         <span class="keywordflow">if</span> (iFodo != 0) {
-<a name="l01119"></a>01119                                 vGet6FontInfo(iFodo, usIstd,
-<a name="l01120"></a>01120                                         aucFpage + 1, iLen - 1, &amp;tFont);
-<a name="l01121"></a>01121                         }
-<a name="l01122"></a>01122                         tFont.ulFileOffset = ulFileOffset;
-<a name="l01123"></a>01123                         vAdd2FontInfoList(&amp;tFont);
-<a name="l01124"></a>01124 
-<a name="l01125"></a>01125                         <span class="keywordflow">if</span> (iFodo &lt;= 0) {
-<a name="l01126"></a>01126                                 <span class="keywordflow">continue</span>;
-<a name="l01127"></a>01127                         }
-<a name="l01128"></a>01128 
-<a name="l01129"></a>01129                         (void)memset(&amp;tPicture, 0, <span class="keyword">sizeof</span>(tPicture));
-<a name="l01130"></a>01130                         <span class="keywordflow">if</span> (bGet6PicInfo(iFodo, aucFpage + 1,
-<a name="l01131"></a>01131                                                 iLen - 1, &amp;tPicture)) {
-<a name="l01132"></a>01132                                 tPicture.ulFileOffset = ulFileOffset;
-<a name="l01133"></a>01133                                 tPicture.ulFileOffsetPicture =
-<a name="l01134"></a>01134                                         ulDataPos2FileOffset(
-<a name="l01135"></a>01135                                                 tPicture.ulPictureOffset);
-<a name="l01136"></a>01136                                 vAdd2PictInfoList(&amp;tPicture);
-<a name="l01137"></a>01137                         }
-<a name="l01138"></a>01138                 }
-<a name="l01139"></a>01139         }
-<a name="l01140"></a>01140         ausCharPage = xfree(ausCharPage);
-<a name="l01141"></a>01141 } <span class="comment">/* end of vGet6ChrInfo */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/prop8_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1512 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/prop8.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/prop8.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * prop8.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2005 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Read the property information from a MS Word 8, 9,10 or 11 file</span>
-<a name="l00007"></a>00007 <span class="comment"> *</span>
-<a name="l00008"></a>00008 <span class="comment"> * Word  8 is better known as Word 97 or as Word 98 for Mac</span>
-<a name="l00009"></a>00009 <span class="comment"> * Word  9 is better known as Word 2000 or as Word 2001 for Mac</span>
-<a name="l00010"></a>00010 <span class="comment"> * Word 10 is better known as Word 2002 or as Word XP</span>
-<a name="l00011"></a>00011 <span class="comment"> * Word 11 is better known as Word 2003</span>
-<a name="l00012"></a>00012 <span class="comment"> */</span>
-<a name="l00013"></a>00013 
-<a name="l00014"></a>00014 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00015"></a>00015 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00016"></a>00016 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00017"></a>00017 
-<a name="l00018"></a>00018 <span class="preprocessor">#define DEFAULT_LISTCHAR        0x002e  </span><span class="comment">/* A full stop */</span>
-<a name="l00019"></a>00019 
-<a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="comment">/*</span>
-<a name="l00022"></a>00022 <span class="comment"> * iGet8InfoLength - the length of the information for Word 8/9/10/11 files</span>
-<a name="l00023"></a>00023 <span class="comment"> */</span>
-<a name="l00024"></a>00024 <span class="keyword">static</span> <span class="keywordtype">int</span>
-<a name="l00025"></a>00025 iGet8InfoLength(<span class="keywordtype">int</span> iByteNbr, <span class="keyword">const</span> UCHAR *aucGrpprl)
-<a name="l00026"></a>00026 {
-<a name="l00027"></a>00027         <span class="keywordtype">int</span>     iTmp, iDel, iAdd;
-<a name="l00028"></a>00028         USHORT  usOpCode;
-<a name="l00029"></a>00029 
-<a name="l00030"></a>00030         usOpCode = usGetWord(iByteNbr, aucGrpprl);
-<a name="l00031"></a>00031 
-<a name="l00032"></a>00032         <span class="keywordflow">switch</span> (usOpCode &amp; 0xe000) {
-<a name="l00033"></a>00033         <span class="keywordflow">case</span> 0x0000: <span class="keywordflow">case</span> 0x2000:
-<a name="l00034"></a>00034                 <span class="keywordflow">return</span> 3;
-<a name="l00035"></a>00035         <span class="keywordflow">case</span> 0x4000: <span class="keywordflow">case</span> 0x8000: <span class="keywordflow">case</span> 0xa000:
-<a name="l00036"></a>00036                 <span class="keywordflow">return</span> 4;
-<a name="l00037"></a>00037         <span class="keywordflow">case</span> 0xe000:
-<a name="l00038"></a>00038                 <span class="keywordflow">return</span> 5;
-<a name="l00039"></a>00039         <span class="keywordflow">case</span> 0x6000:
-<a name="l00040"></a>00040                 <span class="keywordflow">return</span> 6;
-<a name="l00041"></a>00041         <span class="keywordflow">case</span> 0xc000:
-<a name="l00042"></a>00042                 iTmp = (int)ucGetByte(iByteNbr + 2, aucGrpprl);
-<a name="l00043"></a>00043                 <span class="keywordflow">if</span> (usOpCode == 0xc615 &amp;&amp; iTmp == 255) {
-<a name="l00044"></a>00044                         iDel = (int)ucGetByte(iByteNbr + 3, aucGrpprl);
-<a name="l00045"></a>00045                         iAdd = (int)ucGetByte(
-<a name="l00046"></a>00046                                         iByteNbr + 4 + iDel * 4, aucGrpprl);
-<a name="l00047"></a>00047                         iTmp = 2 + iDel * 4 + iAdd * 3;
-<a name="l00048"></a>00048                 }
-<a name="l00049"></a>00049                 <span class="keywordflow">return</span> 3 + iTmp;
-<a name="l00050"></a>00050         <span class="keywordflow">default</span>:
-<a name="l00051"></a>00051                 DBG_HEX(usOpCode);
-<a name="l00052"></a>00052                 DBG_FIXME();
-<a name="l00053"></a>00053                 <span class="keywordflow">return</span> 1;
-<a name="l00054"></a>00054         }
-<a name="l00055"></a>00055 } <span class="comment">/* end of iGet8InfoLength */</span>
-<a name="l00056"></a>00056 
-<a name="l00057"></a>00057 <span class="comment">/*</span>
-<a name="l00058"></a>00058 <span class="comment"> * aucFillInfoBuffer - fill the information buffer</span>
-<a name="l00059"></a>00059 <span class="comment"> *</span>
-<a name="l00060"></a>00060 <span class="comment"> * Returns the information buffer when successful, otherwise NULL</span>
-<a name="l00061"></a>00061 <span class="comment"> */</span>
-<a name="l00062"></a>00062 <span class="keyword">static</span> UCHAR *
-<a name="l00063"></a>00063 aucFillInfoBuffer(FILE *pFile, <span class="keyword">const</span> pps_type *pTable,
-<a name="l00064"></a>00064         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00065"></a>00065         <span class="keyword">const</span> ULONG *aulSBD, <span class="keywordtype">size_t</span> tSBDLen,
-<a name="l00066"></a>00066         ULONG ulBeginInfo, <span class="keywordtype">size_t</span> tInfoLen)
-<a name="l00067"></a>00067 {
-<a name="l00068"></a>00068         <span class="keyword">const</span> ULONG     *aulBlockDepot;
-<a name="l00069"></a>00069         UCHAR   *aucBuffer;
-<a name="l00070"></a>00070         <span class="keywordtype">size_t</span>  tBlockDepotLen, tBlockSize;
-<a name="l00071"></a>00071 
-<a name="l00072"></a>00072         fail(pFile == NULL || pTable == NULL);
-<a name="l00073"></a>00073         fail(aulBBD == NULL || aulSBD == NULL);
-<a name="l00074"></a>00074         fail(tInfoLen == 0);
-<a name="l00075"></a>00075 
-<a name="l00076"></a>00076         NO_DBG_DEC(pTable-&gt;ulSB);
-<a name="l00077"></a>00077         NO_DBG_HEX(pTable-&gt;ulSize);
-<a name="l00078"></a>00078         <span class="keywordflow">if</span> (pTable-&gt;ulSize == 0) {
-<a name="l00079"></a>00079                 DBG_MSG(<span class="stringliteral">&quot;No information&quot;</span>);
-<a name="l00080"></a>00080                 <span class="keywordflow">return</span> NULL;
-<a name="l00081"></a>00081         }
-<a name="l00082"></a>00082 
-<a name="l00083"></a>00083         <span class="keywordflow">if</span> (pTable-&gt;ulSize &lt; MIN_SIZE_FOR_BBD_USE) {
-<a name="l00084"></a>00084                 <span class="comment">/* Use the Small Block Depot */</span>
-<a name="l00085"></a>00085                 aulBlockDepot = aulSBD;
-<a name="l00086"></a>00086                 tBlockDepotLen = tSBDLen;
-<a name="l00087"></a>00087                 tBlockSize = SMALL_BLOCK_SIZE;
-<a name="l00088"></a>00088         } <span class="keywordflow">else</span> {
-<a name="l00089"></a>00089                 <span class="comment">/* Use the Big Block Depot */</span>
-<a name="l00090"></a>00090                 aulBlockDepot = aulBBD;
-<a name="l00091"></a>00091                 tBlockDepotLen = tBBDLen;
-<a name="l00092"></a>00092                 tBlockSize = BIG_BLOCK_SIZE;
-<a name="l00093"></a>00093         }
-<a name="l00094"></a>00094         aucBuffer = xmalloc(tInfoLen);
-<a name="l00095"></a>00095         <span class="keywordflow">if</span> (!bReadBuffer(pFile, pTable-&gt;ulSB,
-<a name="l00096"></a>00096                         aulBlockDepot, tBlockDepotLen, tBlockSize,
-<a name="l00097"></a>00097                         aucBuffer, ulBeginInfo, tInfoLen)) {
-<a name="l00098"></a>00098                 aucBuffer = xfree(aucBuffer);
-<a name="l00099"></a>00099                 <span class="keywordflow">return</span> NULL;
-<a name="l00100"></a>00100         }
-<a name="l00101"></a>00101         <span class="keywordflow">return</span> aucBuffer;
-<a name="l00102"></a>00102 } <span class="comment">/* end of aucFillInfoBuffer */</span>
-<a name="l00103"></a>00103 
-<a name="l00104"></a>00104 <span class="comment">/*</span>
-<a name="l00105"></a>00105 <span class="comment"> * Build the lists with Document Property Information for Word 8/9/10/11 files</span>
-<a name="l00106"></a>00106 <span class="comment"> */</span>
-<a name="l00107"></a>00107 <span class="keywordtype">void</span>
-<a name="l00108"></a>00108 vGet8DopInfo(FILE *pFile, <span class="keyword">const</span> pps_type *pTable,
-<a name="l00109"></a>00109         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00110"></a>00110         <span class="keyword">const</span> ULONG *aulSBD, <span class="keywordtype">size_t</span> tSBDLen,
-<a name="l00111"></a>00111         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00112"></a>00112 {
-<a name="l00113"></a>00113         document_block_type     tDocument;
-<a name="l00114"></a>00114         UCHAR   *aucBuffer;
-<a name="l00115"></a>00115         ULONG   ulBeginDocpInfo, ulTmp;
-<a name="l00116"></a>00116         <span class="keywordtype">size_t</span>  tDocpInfoLen;
-<a name="l00117"></a>00117         USHORT  usTmp;
-<a name="l00118"></a>00118 
-<a name="l00119"></a>00119         fail(pFile == NULL || pTable == NULL || aucHeader == NULL);
-<a name="l00120"></a>00120         fail(aulBBD == NULL || aulSBD == NULL);
-<a name="l00121"></a>00121 
-<a name="l00122"></a>00122         ulBeginDocpInfo = ulGetLong(0x192, aucHeader); <span class="comment">/* fcDop */</span>
-<a name="l00123"></a>00123         NO_DBG_HEX(ulBeginSectInfo);
-<a name="l00124"></a>00124         tDocpInfoLen = (size_t)ulGetLong(0x196, aucHeader); <span class="comment">/* lcbDop */</span>
-<a name="l00125"></a>00125         NO_DBG_DEC(tSectInfoLen);
-<a name="l00126"></a>00126         <span class="keywordflow">if</span> (tDocpInfoLen &lt; 28) {
-<a name="l00127"></a>00127                 DBG_MSG(<span class="stringliteral">&quot;No Document information&quot;</span>);
-<a name="l00128"></a>00128                 <span class="keywordflow">return</span>;
-<a name="l00129"></a>00129         }
-<a name="l00130"></a>00130 
-<a name="l00131"></a>00131         aucBuffer = aucFillInfoBuffer(pFile, pTable,
-<a name="l00132"></a>00132                         aulBBD, tBBDLen, aulSBD, tSBDLen,
-<a name="l00133"></a>00133                         ulBeginDocpInfo, tDocpInfoLen);
-<a name="l00134"></a>00134         <span class="keywordflow">if</span> (aucBuffer == NULL) {
-<a name="l00135"></a>00135                 <span class="keywordflow">return</span>;
-<a name="l00136"></a>00136         }
-<a name="l00137"></a>00137 
-<a name="l00138"></a>00138         usTmp = usGetWord(0x00, aucBuffer);
-<a name="l00139"></a>00139         tDocument.ucHdrFtrSpecification = (UCHAR)(usTmp &gt;&gt; 8); <span class="comment">/* grpfIhdt */</span>
-<a name="l00140"></a>00140         tDocument.usDefaultTabWidth = usGetWord(0x0a, aucBuffer); <span class="comment">/* dxaTab */</span>
-<a name="l00141"></a>00141         ulTmp = ulGetLong(0x14, aucBuffer); <span class="comment">/* dttmCreated */</span>
-<a name="l00142"></a>00142         tDocument.tCreateDate = tConvertDTTM(ulTmp);
-<a name="l00143"></a>00143         ulTmp = ulGetLong(0x18, aucBuffer); <span class="comment">/* dttmRevised */</span>
-<a name="l00144"></a>00144         tDocument.tRevisedDate = tConvertDTTM(ulTmp);
-<a name="l00145"></a>00145         vCreateDocumentInfoList(&amp;tDocument);
-<a name="l00146"></a>00146 
-<a name="l00147"></a>00147         aucBuffer = xfree(aucBuffer);
-<a name="l00148"></a>00148 } <span class="comment">/* end of vGet8DopInfo */</span>
-<a name="l00149"></a>00149 
-<a name="l00150"></a>00150 <span class="comment">/*</span>
-<a name="l00151"></a>00151 <span class="comment"> * Fill the section information block with information</span>
-<a name="l00152"></a>00152 <span class="comment"> * from a Word 8/9/10/11 file.</span>
-<a name="l00153"></a>00153 <span class="comment"> */</span>
-<a name="l00154"></a>00154 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00155"></a>00155 vGet8SectionInfo(<span class="keyword">const</span> UCHAR *aucGrpprl, <span class="keywordtype">size_t</span> tBytes,
-<a name="l00156"></a>00156                 section_block_type *pSection)
-<a name="l00157"></a>00157 {
-<a name="l00158"></a>00158         UINT    uiIndex;
-<a name="l00159"></a>00159         <span class="keywordtype">int</span>     iFodoOff, iInfoLen, iSize, iTmp;
-<a name="l00160"></a>00160         USHORT  usCcol;
-<a name="l00161"></a>00161         UCHAR   ucTmp;
-<a name="l00162"></a>00162 
-<a name="l00163"></a>00163         fail(aucGrpprl == NULL || pSection == NULL);
-<a name="l00164"></a>00164 
-<a name="l00165"></a>00165         iFodoOff = 0;
-<a name="l00166"></a>00166         <span class="keywordflow">while</span> (tBytes &gt;= (<span class="keywordtype">size_t</span>)iFodoOff + 2) {
-<a name="l00167"></a>00167                 iInfoLen = 0;
-<a name="l00168"></a>00168                 <span class="keywordflow">switch</span> (usGetWord(iFodoOff, aucGrpprl)) {
-<a name="l00169"></a>00169                 <span class="keywordflow">case</span> 0x3009:    <span class="comment">/* bkc */</span>
-<a name="l00170"></a>00170                         ucTmp = ucGetByte(iFodoOff + 2, aucGrpprl);
-<a name="l00171"></a>00171                         DBG_DEC(ucTmp);
-<a name="l00172"></a>00172                         pSection-&gt;bNewPage = ucTmp != 0 &amp;&amp; ucTmp != 1;
-<a name="l00173"></a>00173                         <span class="keywordflow">break</span>;
-<a name="l00174"></a>00174                 <span class="keywordflow">case</span> 0x3014:    <span class="comment">/* grpfIhdt */</span>
-<a name="l00175"></a>00175                         pSection-&gt;ucHdrFtrSpecification =
-<a name="l00176"></a>00176                                         ucGetByte(iFodoOff + 2, aucGrpprl);
-<a name="l00177"></a>00177                         <span class="keywordflow">break</span>;
-<a name="l00178"></a>00178                 <span class="keywordflow">case</span> 0x500b:    <span class="comment">/* ccolM1 */</span>
-<a name="l00179"></a>00179                         usCcol = 1 + usGetWord(iFodoOff + 2, aucGrpprl);
-<a name="l00180"></a>00180                         DBG_DEC(usCcol);
-<a name="l00181"></a>00181                         <span class="keywordflow">break</span>;
-<a name="l00182"></a>00182                 <span class="keywordflow">case</span> 0xd202:    <span class="comment">/* olstAnm */</span>
-<a name="l00183"></a>00183                         iSize = (int)ucGetByte(iFodoOff + 2, aucGrpprl);
-<a name="l00184"></a>00184                         DBG_DEC_C(iSize != 212, iSize);
-<a name="l00185"></a>00185                         <span class="keywordflow">for</span> (uiIndex = 0, iTmp = iFodoOff + 3;
-<a name="l00186"></a>00186                              uiIndex &lt; 9 &amp;&amp; iTmp &lt; iFodoOff + 3 + iSize - 15;
-<a name="l00187"></a>00187                              uiIndex++, iTmp += 16) {
-<a name="l00188"></a>00188                                 pSection-&gt;aucNFC[uiIndex] =
-<a name="l00189"></a>00189                                                 ucGetByte(iTmp, aucGrpprl);
-<a name="l00190"></a>00190                                 DBG_DEC(pSection-&gt;aucNFC[uiIndex]);
-<a name="l00191"></a>00191                                 ucTmp = ucGetByte(iTmp + 3, aucGrpprl);
-<a name="l00192"></a>00192                                 DBG_HEX(ucTmp);
-<a name="l00193"></a>00193                                 <span class="keywordflow">if</span> ((ucTmp &amp; BIT(2)) != 0) {
-<a name="l00194"></a>00194                                         pSection-&gt;usNeedPrevLvl |=
-<a name="l00195"></a>00195                                                         (USHORT)BIT(uiIndex);
-<a name="l00196"></a>00196                                 }
-<a name="l00197"></a>00197                                 <span class="keywordflow">if</span> ((ucTmp &amp; BIT(3)) != 0) {
-<a name="l00198"></a>00198                                         pSection-&gt;usHangingIndent |=
-<a name="l00199"></a>00199                                                         (USHORT)BIT(uiIndex);
-<a name="l00200"></a>00200                                 }
-<a name="l00201"></a>00201                         }
-<a name="l00202"></a>00202                         DBG_HEX(pSection-&gt;usNeedPrevLvl);
-<a name="l00203"></a>00203                         DBG_HEX(pSection-&gt;usHangingIndent);
-<a name="l00204"></a>00204                         <span class="keywordflow">break</span>;
-<a name="l00205"></a>00205                 <span class="keywordflow">default</span>:
-<a name="l00206"></a>00206                         <span class="keywordflow">break</span>;
-<a name="l00207"></a>00207                 }
-<a name="l00208"></a>00208                 <span class="keywordflow">if</span> (iInfoLen &lt;= 0) {
-<a name="l00209"></a>00209                         iInfoLen = iGet8InfoLength(iFodoOff, aucGrpprl);
-<a name="l00210"></a>00210                         fail(iInfoLen &lt;= 0);
-<a name="l00211"></a>00211                 }
-<a name="l00212"></a>00212                 iFodoOff += iInfoLen;
-<a name="l00213"></a>00213         }
-<a name="l00214"></a>00214 } <span class="comment">/* end of vGet8SectionInfo */</span>
-<a name="l00215"></a>00215 
-<a name="l00216"></a>00216 <span class="comment">/*</span>
-<a name="l00217"></a>00217 <span class="comment"> * Build the lists with Section Property Information for Word 8/9/10/11 files</span>
-<a name="l00218"></a>00218 <span class="comment"> */</span>
-<a name="l00219"></a>00219 <span class="keywordtype">void</span>
-<a name="l00220"></a>00220 vGet8SepInfo(FILE *pFile, <span class="keyword">const</span> pps_info_type *pPPS,
-<a name="l00221"></a>00221         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00222"></a>00222         <span class="keyword">const</span> ULONG *aulSBD, <span class="keywordtype">size_t</span> tSBDLen,
-<a name="l00223"></a>00223         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00224"></a>00224 {
-<a name="l00225"></a>00225         section_block_type      tSection;
-<a name="l00226"></a>00226         ULONG   *aulSectPage, *aulCharPos;
-<a name="l00227"></a>00227         UCHAR   *aucBuffer, *aucFpage;
-<a name="l00228"></a>00228         ULONG   ulBeginOfText, ulTextOffset, ulBeginSectInfo;
-<a name="l00229"></a>00229         <span class="keywordtype">size_t</span>  tSectInfoLen, tIndex, tOffset, tLen, tBytes;
-<a name="l00230"></a>00230         UCHAR   aucTmp[2];
-<a name="l00231"></a>00231 
-<a name="l00232"></a>00232         fail(pFile == NULL || pPPS == NULL || aucHeader == NULL);
-<a name="l00233"></a>00233         fail(aulBBD == NULL || aulSBD == NULL);
-<a name="l00234"></a>00234 
-<a name="l00235"></a>00235         ulBeginOfText = ulGetLong(0x18, aucHeader); <span class="comment">/* fcMin */</span>
-<a name="l00236"></a>00236         NO_DBG_HEX(ulBeginOfText);
-<a name="l00237"></a>00237         ulBeginSectInfo = ulGetLong(0xca, aucHeader); <span class="comment">/* fcPlcfsed */</span>
-<a name="l00238"></a>00238         NO_DBG_HEX(ulBeginSectInfo);
-<a name="l00239"></a>00239         tSectInfoLen = (size_t)ulGetLong(0xce, aucHeader); <span class="comment">/* lcbPlcfsed */</span>
-<a name="l00240"></a>00240         NO_DBG_DEC(tSectInfoLen);
-<a name="l00241"></a>00241         <span class="keywordflow">if</span> (tSectInfoLen &lt; 4) {
-<a name="l00242"></a>00242                 DBG_DEC(tSectInfoLen);
-<a name="l00243"></a>00243                 <span class="keywordflow">return</span>;
-<a name="l00244"></a>00244         }
-<a name="l00245"></a>00245 
-<a name="l00246"></a>00246         aucBuffer = aucFillInfoBuffer(pFile, &amp;pPPS-&gt;tTable,
-<a name="l00247"></a>00247                         aulBBD, tBBDLen, aulSBD, tSBDLen,
-<a name="l00248"></a>00248                         ulBeginSectInfo, tSectInfoLen);
-<a name="l00249"></a>00249         <span class="keywordflow">if</span> (aucBuffer == NULL) {
-<a name="l00250"></a>00250                 <span class="keywordflow">return</span>;
-<a name="l00251"></a>00251         }
-<a name="l00252"></a>00252         NO_DBG_PRINT_BLOCK(aucBuffer, tSectInfoLen);
-<a name="l00253"></a>00253 
-<a name="l00254"></a>00254         <span class="comment">/* Read the Section Descriptors */</span>
-<a name="l00255"></a>00255         tLen = (tSectInfoLen - 4) / 16;
-<a name="l00256"></a>00256         <span class="comment">/* Save the section offsets */</span>
-<a name="l00257"></a>00257         aulCharPos = xcalloc(tLen, <span class="keyword">sizeof</span>(ULONG));
-<a name="l00258"></a>00258         <span class="keywordflow">for</span> (tIndex = 0, tOffset = 0;
-<a name="l00259"></a>00259              tIndex &lt; tLen;
-<a name="l00260"></a>00260              tIndex++, tOffset += 4) {
-<a name="l00261"></a>00261                 ulTextOffset = ulGetLong(tOffset, aucBuffer);
-<a name="l00262"></a>00262                 NO_DBG_HEX(ulTextOffset);
-<a name="l00263"></a>00263                 aulCharPos[tIndex] = ulBeginOfText + ulTextOffset;
-<a name="l00264"></a>00264                 NO_DBG_HEX(aulCharPos[tIndex]);
-<a name="l00265"></a>00265         }
-<a name="l00266"></a>00266         <span class="comment">/* Save the Sepx offsets */</span>
-<a name="l00267"></a>00267         aulSectPage = xcalloc(tLen, <span class="keyword">sizeof</span>(ULONG));
-<a name="l00268"></a>00268         <span class="keywordflow">for</span> (tIndex = 0, tOffset = (tLen + 1) * 4;
-<a name="l00269"></a>00269              tIndex &lt; tLen;
-<a name="l00270"></a>00270              tIndex++, tOffset += 12) {
-<a name="l00271"></a>00271                  aulSectPage[tIndex] = ulGetLong(tOffset + 2, aucBuffer);
-<a name="l00272"></a>00272                  NO_DBG_HEX(aulSectPage[tIndex]); <span class="comment">/* fcSepx */</span>
-<a name="l00273"></a>00273         }
-<a name="l00274"></a>00274         aucBuffer = xfree(aucBuffer);
-<a name="l00275"></a>00275 
-<a name="l00276"></a>00276         <span class="comment">/* Read the Section Properties */</span>
-<a name="l00277"></a>00277         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tLen; tIndex++) {
-<a name="l00278"></a>00278                 <span class="keywordflow">if</span> (aulSectPage[tIndex] == FC_INVALID) {
-<a name="l00279"></a>00279                         vDefault2SectionInfoList(aulCharPos[tIndex]);
-<a name="l00280"></a>00280                         <span class="keywordflow">continue</span>;
-<a name="l00281"></a>00281                 }
-<a name="l00282"></a>00282                 <span class="comment">/* Get the number of bytes to read */</span>
-<a name="l00283"></a>00283                 <span class="keywordflow">if</span> (!bReadBuffer(pFile, pPPS-&gt;tWordDocument.ulSB,
-<a name="l00284"></a>00284                                 aulBBD, tBBDLen, BIG_BLOCK_SIZE,
-<a name="l00285"></a>00285                                 aucTmp, aulSectPage[tIndex], 2)) {
-<a name="l00286"></a>00286                         <span class="keywordflow">continue</span>;
-<a name="l00287"></a>00287                 }
-<a name="l00288"></a>00288                 tBytes = 2 + (size_t)usGetWord(0, aucTmp);
-<a name="l00289"></a>00289                 NO_DBG_DEC(tBytes);
-<a name="l00290"></a>00290                 <span class="comment">/* Read the bytes */</span>
-<a name="l00291"></a>00291                 aucFpage = xmalloc(tBytes);
-<a name="l00292"></a>00292                 <span class="keywordflow">if</span> (!bReadBuffer(pFile, pPPS-&gt;tWordDocument.ulSB,
-<a name="l00293"></a>00293                                 aulBBD, tBBDLen, BIG_BLOCK_SIZE,
-<a name="l00294"></a>00294                                 aucFpage, aulSectPage[tIndex], tBytes)) {
-<a name="l00295"></a>00295                         aucFpage = xfree(aucFpage);
-<a name="l00296"></a>00296                         <span class="keywordflow">continue</span>;
-<a name="l00297"></a>00297                 }
-<a name="l00298"></a>00298                 NO_DBG_PRINT_BLOCK(aucFpage, tBytes);
-<a name="l00299"></a>00299                 <span class="comment">/* Process the bytes */</span>
-<a name="l00300"></a>00300                 vGetDefaultSection(&amp;tSection);
-<a name="l00301"></a>00301                 vGet8SectionInfo(aucFpage + 2, tBytes - 2, &amp;tSection);
-<a name="l00302"></a>00302                 vAdd2SectionInfoList(&amp;tSection, aulCharPos[tIndex]);
-<a name="l00303"></a>00303                 aucFpage = xfree(aucFpage);
-<a name="l00304"></a>00304         }
-<a name="l00305"></a>00305         aulCharPos = xfree(aulCharPos);
-<a name="l00306"></a>00306         aulSectPage = xfree(aulSectPage);
-<a name="l00307"></a>00307 } <span class="comment">/* end of vGet8SepInfo */</span>
-<a name="l00308"></a>00308 
-<a name="l00309"></a>00309 <span class="comment">/*</span>
-<a name="l00310"></a>00310 <span class="comment"> * Build the list with Header/Footer Information for Word 8/9/10/11 files</span>
-<a name="l00311"></a>00311 <span class="comment"> */</span>
-<a name="l00312"></a>00312 <span class="keywordtype">void</span>
-<a name="l00313"></a>00313 vGet8HdrFtrInfo(FILE *pFile, <span class="keyword">const</span> pps_type *pTable,
-<a name="l00314"></a>00314         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00315"></a>00315         <span class="keyword">const</span> ULONG *aulSBD, <span class="keywordtype">size_t</span> tSBDLen,
-<a name="l00316"></a>00316         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00317"></a>00317 {
-<a name="l00318"></a>00318         ULONG   *aulCharPos;
-<a name="l00319"></a>00319         UCHAR   *aucBuffer;
-<a name="l00320"></a>00320         ULONG   ulHdrFtrOffset, ulBeginHdrFtrInfo;
-<a name="l00321"></a>00321         <span class="keywordtype">size_t</span>  tHdrFtrInfoLen, tIndex, tOffset, tLen;
-<a name="l00322"></a>00322 
-<a name="l00323"></a>00323         fail(pFile == NULL || pTable == NULL || aucHeader == NULL);
-<a name="l00324"></a>00324         fail(aulBBD == NULL || aulSBD == NULL);
-<a name="l00325"></a>00325 
-<a name="l00326"></a>00326         ulBeginHdrFtrInfo = ulGetLong(0xf2, aucHeader); <span class="comment">/* fcPlcfhdd */</span>
-<a name="l00327"></a>00327         NO_DBG_HEX(ulBeginHdrFtrInfo);
-<a name="l00328"></a>00328         tHdrFtrInfoLen = (size_t)ulGetLong(0xf6, aucHeader); <span class="comment">/* lcbPlcfhdd */</span>
-<a name="l00329"></a>00329         NO_DBG_DEC(tHdrFtrInfoLen);
-<a name="l00330"></a>00330         <span class="keywordflow">if</span> (tHdrFtrInfoLen &lt; 8) {
-<a name="l00331"></a>00331                 DBG_DEC_C(tHdrFtrInfoLen != 0, tHdrFtrInfoLen);
-<a name="l00332"></a>00332                 <span class="keywordflow">return</span>;
-<a name="l00333"></a>00333         }
-<a name="l00334"></a>00334 
-<a name="l00335"></a>00335         aucBuffer = aucFillInfoBuffer(pFile, pTable,
-<a name="l00336"></a>00336                         aulBBD, tBBDLen, aulSBD, tSBDLen,
-<a name="l00337"></a>00337                         ulBeginHdrFtrInfo, tHdrFtrInfoLen);
-<a name="l00338"></a>00338         <span class="keywordflow">if</span> (aucBuffer == NULL) {
-<a name="l00339"></a>00339                 <span class="keywordflow">return</span>;
-<a name="l00340"></a>00340         }
-<a name="l00341"></a>00341         NO_DBG_PRINT_BLOCK(aucBuffer, tHdrFtrInfoLen);
-<a name="l00342"></a>00342 
-<a name="l00343"></a>00343         tLen = tHdrFtrInfoLen / 4 - 1;
-<a name="l00344"></a>00344         DBG_DEC_C(tLen % 12 != 1 &amp;&amp; tLen % 12 != 7, tLen);
-<a name="l00345"></a>00345         <span class="comment">/* Save the header/footer offsets */</span>
-<a name="l00346"></a>00346         aulCharPos = xcalloc(tLen, <span class="keyword">sizeof</span>(ULONG));
-<a name="l00347"></a>00347         <span class="keywordflow">for</span> (tIndex = 0, tOffset = 0;
-<a name="l00348"></a>00348              tIndex &lt; tLen;
-<a name="l00349"></a>00349              tIndex++, tOffset += 4) {
-<a name="l00350"></a>00350                 ulHdrFtrOffset = ulGetLong(tOffset, aucBuffer);
-<a name="l00351"></a>00351                 NO_DBG_HEX(ulHdrFtrOffset);
-<a name="l00352"></a>00352                 aulCharPos[tIndex] = ulHdrFtrOffset2CharPos(ulHdrFtrOffset);
-<a name="l00353"></a>00353                 NO_DBG_HEX(aulCharPos[tIndex]);
-<a name="l00354"></a>00354         }
-<a name="l00355"></a>00355         vCreat8HdrFtrInfoList(aulCharPos, tLen);
-<a name="l00356"></a>00356         <span class="comment">/* Clean up and leave */</span>
-<a name="l00357"></a>00357         aulCharPos = xfree(aulCharPos);
-<a name="l00358"></a>00358         aucBuffer = xfree(aucBuffer);
-<a name="l00359"></a>00359 } <span class="comment">/* end of vGet8HdrFtrInfo */</span>
-<a name="l00360"></a>00360 
-<a name="l00361"></a>00361 <span class="comment">/*</span>
-<a name="l00362"></a>00362 <span class="comment"> * Translate the rowinfo to a member of the row_info enumeration</span>
-<a name="l00363"></a>00363 <span class="comment"> */</span>
-<a name="l00364"></a>00364 row_info_enum
-<a name="l00365"></a>00365 eGet8RowInfo(<span class="keywordtype">int</span> iFodo,
-<a name="l00366"></a>00366         <span class="keyword">const</span> UCHAR *aucGrpprl, <span class="keywordtype">int</span> iBytes, row_block_type *pRow)
-<a name="l00367"></a>00367 {
-<a name="l00368"></a>00368         <span class="keywordtype">int</span>     iFodoOff, iInfoLen;
-<a name="l00369"></a>00369         <span class="keywordtype">int</span>     iIndex, iSize, iCol;
-<a name="l00370"></a>00370         <span class="keywordtype">int</span>     iPosCurr, iPosPrev;
-<a name="l00371"></a>00371         USHORT  usTmp;
-<a name="l00372"></a>00372         BOOL    bFound2416_0, bFound2416_1, bFound2417_0, bFound2417_1;
-<a name="l00373"></a>00373         BOOL    bFound244b_0, bFound244b_1, bFound244c_0, bFound244c_1;
-<a name="l00374"></a>00374         BOOL    bFoundd608;
-<a name="l00375"></a>00375 
-<a name="l00376"></a>00376         fail(iFodo &lt; 0 || aucGrpprl == NULL || pRow == NULL);
-<a name="l00377"></a>00377 
-<a name="l00378"></a>00378         iFodoOff = 0;
-<a name="l00379"></a>00379         bFound2416_0 = FALSE;
-<a name="l00380"></a>00380         bFound2416_1 = FALSE;
-<a name="l00381"></a>00381         bFound2417_0 = FALSE;
-<a name="l00382"></a>00382         bFound2417_1 = FALSE;
-<a name="l00383"></a>00383         bFound244b_0 = FALSE;
-<a name="l00384"></a>00384         bFound244b_1 = FALSE;
-<a name="l00385"></a>00385         bFound244c_0 = FALSE;
-<a name="l00386"></a>00386         bFound244c_1 = FALSE;
-<a name="l00387"></a>00387         bFoundd608 = FALSE;
-<a name="l00388"></a>00388         <span class="keywordflow">while</span> (iBytes &gt;= iFodoOff + 2) {
-<a name="l00389"></a>00389                 iInfoLen = 0;
-<a name="l00390"></a>00390                 <span class="keywordflow">switch</span> (usGetWord(iFodo + iFodoOff, aucGrpprl)) {
-<a name="l00391"></a>00391                 <span class="keywordflow">case</span> 0x2416:    <span class="comment">/* fInTable */</span>
-<a name="l00392"></a>00392                         <span class="keywordflow">if</span> (odd(ucGetByte(iFodo + iFodoOff + 2, aucGrpprl))) {
-<a name="l00393"></a>00393                                 bFound2416_1 = TRUE;
-<a name="l00394"></a>00394                         } <span class="keywordflow">else</span> {
-<a name="l00395"></a>00395                                 bFound2416_0 = TRUE;
-<a name="l00396"></a>00396                         }
-<a name="l00397"></a>00397                         <span class="keywordflow">break</span>;
-<a name="l00398"></a>00398                 <span class="keywordflow">case</span> 0x2417:    <span class="comment">/* fTtp */</span>
-<a name="l00399"></a>00399                         <span class="keywordflow">if</span> (odd(ucGetByte(iFodo + iFodoOff + 2, aucGrpprl))) {
-<a name="l00400"></a>00400                                 bFound2417_1 = TRUE;
-<a name="l00401"></a>00401                         } <span class="keywordflow">else</span> {
-<a name="l00402"></a>00402                                 bFound2417_0 = TRUE;
-<a name="l00403"></a>00403                         }
-<a name="l00404"></a>00404                         <span class="keywordflow">break</span>;
-<a name="l00405"></a>00405                 <span class="keywordflow">case</span> 0x244b:    <span class="comment">/* sub-table fInTable */</span>
-<a name="l00406"></a>00406                         <span class="keywordflow">if</span> (odd(ucGetByte(iFodo + iFodoOff + 2, aucGrpprl))) {
-<a name="l00407"></a>00407                                 bFound244b_1 = TRUE;
-<a name="l00408"></a>00408                         } <span class="keywordflow">else</span> {
-<a name="l00409"></a>00409                                 bFound244b_0 = TRUE;
-<a name="l00410"></a>00410                         }
-<a name="l00411"></a>00411                         <span class="keywordflow">break</span>;
-<a name="l00412"></a>00412                 <span class="keywordflow">case</span> 0x244c:    <span class="comment">/* sub-table fTtp */</span>
-<a name="l00413"></a>00413                         <span class="keywordflow">if</span> (odd(ucGetByte(iFodo + iFodoOff + 2, aucGrpprl))) {
-<a name="l00414"></a>00414                                 bFound244c_1 = TRUE;
-<a name="l00415"></a>00415                         } <span class="keywordflow">else</span> {
-<a name="l00416"></a>00416                                 bFound244c_0 = TRUE;
-<a name="l00417"></a>00417                         }
-<a name="l00418"></a>00418                         <span class="keywordflow">break</span>;
-<a name="l00419"></a>00419                 <span class="keywordflow">case</span> 0x6424:    <span class="comment">/* brcTop */</span>
-<a name="l00420"></a>00420                         usTmp = usGetWord(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l00421"></a>00421                         usTmp &amp;= 0xff00;
-<a name="l00422"></a>00422                         NO_DBG_DEC(usTmp &gt;&gt; 8);
-<a name="l00423"></a>00423                         <span class="keywordflow">if</span> (usTmp == 0) {
-<a name="l00424"></a>00424                                 pRow-&gt;ucBorderInfo &amp;= ~TABLE_BORDER_TOP;
-<a name="l00425"></a>00425                         } <span class="keywordflow">else</span> {
-<a name="l00426"></a>00426                                 pRow-&gt;ucBorderInfo |= TABLE_BORDER_TOP;
-<a name="l00427"></a>00427                         }
-<a name="l00428"></a>00428                         <span class="keywordflow">break</span>;
-<a name="l00429"></a>00429                 <span class="keywordflow">case</span> 0x6425:    <span class="comment">/* brcLeft */</span>
-<a name="l00430"></a>00430                         usTmp = usGetWord(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l00431"></a>00431                         usTmp &amp;= 0xff00;
-<a name="l00432"></a>00432                         NO_DBG_DEC(usTmp &gt;&gt; 8);
-<a name="l00433"></a>00433                         <span class="keywordflow">if</span> (usTmp == 0) {
-<a name="l00434"></a>00434                                 pRow-&gt;ucBorderInfo &amp;= ~TABLE_BORDER_LEFT;
-<a name="l00435"></a>00435                         } <span class="keywordflow">else</span> {
-<a name="l00436"></a>00436                                 pRow-&gt;ucBorderInfo |= TABLE_BORDER_LEFT;
-<a name="l00437"></a>00437                         }
-<a name="l00438"></a>00438                         <span class="keywordflow">break</span>;
-<a name="l00439"></a>00439                 <span class="keywordflow">case</span> 0x6426:    <span class="comment">/* brcBottom */</span>
-<a name="l00440"></a>00440                         usTmp = usGetWord(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l00441"></a>00441                         usTmp &amp;= 0xff00;
-<a name="l00442"></a>00442                         NO_DBG_DEC(usTmp &gt;&gt; 8);
-<a name="l00443"></a>00443                         <span class="keywordflow">if</span> (usTmp == 0) {
-<a name="l00444"></a>00444                                 pRow-&gt;ucBorderInfo &amp;= ~TABLE_BORDER_BOTTOM;
-<a name="l00445"></a>00445                         } <span class="keywordflow">else</span> {
-<a name="l00446"></a>00446                                 pRow-&gt;ucBorderInfo |= TABLE_BORDER_BOTTOM;
-<a name="l00447"></a>00447                         }
-<a name="l00448"></a>00448                         <span class="keywordflow">break</span>;
-<a name="l00449"></a>00449                 <span class="keywordflow">case</span> 0x6427:    <span class="comment">/* brcRight */</span>
-<a name="l00450"></a>00450                         usTmp = usGetWord(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l00451"></a>00451                         usTmp &amp;= 0xff00;
-<a name="l00452"></a>00452                         NO_DBG_DEC(usTmp &gt;&gt; 8);
-<a name="l00453"></a>00453                         <span class="keywordflow">if</span> (usTmp == 0) {
-<a name="l00454"></a>00454                                 pRow-&gt;ucBorderInfo &amp;= ~TABLE_BORDER_RIGHT;
-<a name="l00455"></a>00455                         } <span class="keywordflow">else</span> {
-<a name="l00456"></a>00456                                 pRow-&gt;ucBorderInfo |= TABLE_BORDER_RIGHT;
-<a name="l00457"></a>00457                         }
-<a name="l00458"></a>00458                         <span class="keywordflow">break</span>;
-<a name="l00459"></a>00459                 <span class="keywordflow">case</span> 0xd606:    <span class="comment">/* cDefTable10 */</span>
-<a name="l00460"></a>00460                         DBG_MSG(<span class="stringliteral">&quot;0xd606: sprmTDefTable10&quot;</span>);
-<a name="l00461"></a>00461                         iSize = (int)usGetWord(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l00462"></a>00462                         DBG_DEC(iSize);
-<a name="l00463"></a>00463                         <span class="keywordflow">break</span>;
-<a name="l00464"></a>00464                 <span class="keywordflow">case</span> 0xd608:    <span class="comment">/* cDefTable */</span>
-<a name="l00465"></a>00465                         iSize = (int)usGetWord(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l00466"></a>00466                         <span class="keywordflow">if</span> (iSize &lt; 6 || iBytes &lt; iFodoOff + 8) {
-<a name="l00467"></a>00467                                 DBG_DEC(iSize);
-<a name="l00468"></a>00468                                 DBG_DEC(iFodoOff);
-<a name="l00469"></a>00469                                 iInfoLen = 2;
-<a name="l00470"></a>00470                                 <span class="keywordflow">break</span>;
-<a name="l00471"></a>00471                         }
-<a name="l00472"></a>00472                         iCol = (int)ucGetByte(iFodo + iFodoOff + 4, aucGrpprl);
-<a name="l00473"></a>00473                         <span class="keywordflow">if</span> (iCol &lt; 1 ||
-<a name="l00474"></a>00474                             iBytes &lt; iFodoOff + 4 + (iCol + 1) * 2) {
-<a name="l00475"></a>00475                                 DBG_DEC(iCol);
-<a name="l00476"></a>00476                                 DBG_DEC(iFodoOff);
-<a name="l00477"></a>00477                                 iInfoLen = 2;
-<a name="l00478"></a>00478                                 <span class="keywordflow">break</span>;
-<a name="l00479"></a>00479                         }
-<a name="l00480"></a>00480                         <span class="keywordflow">if</span> (iCol &gt;= (<span class="keywordtype">int</span>)elementsof(pRow-&gt;asColumnWidth)) {
-<a name="l00481"></a>00481                                 DBG_DEC(iCol);
-<a name="l00482"></a>00482                                 werr(1, <span class="stringliteral">&quot;The number of columns is corrupt&quot;</span>);
-<a name="l00483"></a>00483                         }
-<a name="l00484"></a>00484                         pRow-&gt;ucNumberOfColumns = (UCHAR)iCol;
-<a name="l00485"></a>00485                         iPosPrev = (int)(<span class="keywordtype">short</span>)usGetWord(
-<a name="l00486"></a>00486                                         iFodo + iFodoOff + 5,
-<a name="l00487"></a>00487                                         aucGrpprl);
-<a name="l00488"></a>00488                         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; iCol; iIndex++) {
-<a name="l00489"></a>00489                                 iPosCurr = (int)(<span class="keywordtype">short</span>)usGetWord(
-<a name="l00490"></a>00490                                         iFodo + iFodoOff + 7 + iIndex * 2,
-<a name="l00491"></a>00491                                         aucGrpprl);
-<a name="l00492"></a>00492                                 pRow-&gt;asColumnWidth[iIndex] =
-<a name="l00493"></a>00493                                                 (short)(iPosCurr - iPosPrev);
-<a name="l00494"></a>00494                                 iPosPrev = iPosCurr;
-<a name="l00495"></a>00495                         }
-<a name="l00496"></a>00496                         bFoundd608 = TRUE;
-<a name="l00497"></a>00497                         <span class="keywordflow">break</span>;
-<a name="l00498"></a>00498                 <span class="keywordflow">default</span>:
-<a name="l00499"></a>00499                         <span class="keywordflow">break</span>;
-<a name="l00500"></a>00500                 }
-<a name="l00501"></a>00501                 <span class="keywordflow">if</span> (iInfoLen &lt;= 0) {
-<a name="l00502"></a>00502                         iInfoLen =
-<a name="l00503"></a>00503                                 iGet8InfoLength(iFodo + iFodoOff, aucGrpprl);
-<a name="l00504"></a>00504                         fail(iInfoLen &lt;= 0);
-<a name="l00505"></a>00505                 }
-<a name="l00506"></a>00506                 iFodoOff += iInfoLen;
-<a name="l00507"></a>00507         }
-<a name="l00508"></a>00508 
-<a name="l00509"></a>00509         <span class="keywordflow">if</span> (bFound2417_1 &amp;&amp; bFoundd608) {
-<a name="l00510"></a>00510                 <span class="keywordflow">return</span> found_end_of_row;
-<a name="l00511"></a>00511         }
-<a name="l00512"></a>00512         <span class="keywordflow">if</span> (bFound2417_0 &amp;&amp; !bFoundd608) {
-<a name="l00513"></a>00513                 <span class="keywordflow">return</span> found_not_end_of_row;
-<a name="l00514"></a>00514         }
-<a name="l00515"></a>00515         <span class="keywordflow">if</span> (bFound2416_1 || bFound244b_1) {
-<a name="l00516"></a>00516                 <span class="keywordflow">return</span> found_a_cell;
-<a name="l00517"></a>00517         }
-<a name="l00518"></a>00518         <span class="keywordflow">if</span> (bFound2416_0 || bFound244b_0) {
-<a name="l00519"></a>00519                 <span class="keywordflow">return</span> found_not_a_cell;
-<a name="l00520"></a>00520         }
-<a name="l00521"></a>00521         <span class="keywordflow">return</span> found_nothing;
-<a name="l00522"></a>00522 } <span class="comment">/* end of eGet8RowInfo */</span>
-<a name="l00523"></a>00523 
-<a name="l00524"></a>00524 <span class="comment">/*</span>
-<a name="l00525"></a>00525 <span class="comment"> * Fill the style information block with information</span>
-<a name="l00526"></a>00526 <span class="comment"> * from a Word 8/9/10/11 file.</span>
-<a name="l00527"></a>00527 <span class="comment"> */</span>
-<a name="l00528"></a>00528 <span class="keywordtype">void</span>
-<a name="l00529"></a>00529 vGet8StyleInfo(<span class="keywordtype">int</span> iFodo,
-<a name="l00530"></a>00530         <span class="keyword">const</span> UCHAR *aucGrpprl, <span class="keywordtype">int</span> iBytes, style_block_type *pStyle)
-<a name="l00531"></a>00531 {
-<a name="l00532"></a>00532         list_block_type tList6;
-<a name="l00533"></a>00533         <span class="keyword">const</span> list_block_type   *pList;
-<a name="l00534"></a>00534         <span class="keywordtype">int</span>     iFodoOff, iInfoLen;
-<a name="l00535"></a>00535         <span class="keywordtype">int</span>     iTmp, iDel, iAdd, iBefore;
-<a name="l00536"></a>00536         USHORT  usOpCode, usTmp;
-<a name="l00537"></a>00537         <span class="keywordtype">short</span>   sTmp;
-<a name="l00538"></a>00538 
-<a name="l00539"></a>00539         fail(iFodo &lt; 0 || aucGrpprl == NULL || pStyle == NULL);
-<a name="l00540"></a>00540 
-<a name="l00541"></a>00541         NO_DBG_DEC_C(pStyle-&gt;usListIndex != 0, pStyle-&gt;usIstd);
-<a name="l00542"></a>00542         NO_DBG_DEC_C(pStyle-&gt;usListIndex != 0, pStyle-&gt;usListIndex);
-<a name="l00543"></a>00543 
-<a name="l00544"></a>00544         (void)memset(&amp;tList6, 0, <span class="keyword">sizeof</span>(tList6));
-<a name="l00545"></a>00545 
-<a name="l00546"></a>00546         iFodoOff = 0;
-<a name="l00547"></a>00547         <span class="keywordflow">while</span> (iBytes &gt;= iFodoOff + 2) {
-<a name="l00548"></a>00548                 iInfoLen = 0;
-<a name="l00549"></a>00549                 usOpCode = usGetWord(iFodo + iFodoOff, aucGrpprl);
-<a name="l00550"></a>00550                 <span class="keywordflow">switch</span> (usOpCode) {
-<a name="l00551"></a>00551                 <span class="keywordflow">case</span> 0x2403:    <span class="comment">/* jc */</span>
-<a name="l00552"></a>00552                         pStyle-&gt;ucAlignment = ucGetByte(
-<a name="l00553"></a>00553                                         iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l00554"></a>00554                         <span class="keywordflow">break</span>;
-<a name="l00555"></a>00555                 <span class="keywordflow">case</span> 0x260a:    <span class="comment">/* ilvl */</span>
-<a name="l00556"></a>00556                         pStyle-&gt;ucListLevel =
-<a name="l00557"></a>00557                                 ucGetByte(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l00558"></a>00558                         NO_DBG_DEC(pStyle-&gt;ucListLevel);
-<a name="l00559"></a>00559                         pStyle-&gt;ucNumLevel = pStyle-&gt;ucListLevel;
-<a name="l00560"></a>00560                         <span class="keywordflow">break</span>;
-<a name="l00561"></a>00561                 <span class="keywordflow">case</span> 0x4600:    <span class="comment">/* istd */</span>
-<a name="l00562"></a>00562                         usTmp = usGetWord(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l00563"></a>00563                         NO_DBG_DEC(usTmp);
-<a name="l00564"></a>00564                         <span class="keywordflow">break</span>;
-<a name="l00565"></a>00565                 <span class="keywordflow">case</span> 0x460b:    <span class="comment">/* ilfo */</span>
-<a name="l00566"></a>00566                         pStyle-&gt;usListIndex =
-<a name="l00567"></a>00567                                 usGetWord(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l00568"></a>00568                         NO_DBG_DEC(pStyle-&gt;usListIndex);
-<a name="l00569"></a>00569                         <span class="keywordflow">break</span>;
-<a name="l00570"></a>00570                 <span class="keywordflow">case</span> 0x4610: <span class="comment">/* Nest dxaLeft */</span>
-<a name="l00571"></a>00571                         sTmp = (short)usGetWord(
-<a name="l00572"></a>00572                                         iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l00573"></a>00573                         pStyle-&gt;sLeftIndent += sTmp;
-<a name="l00574"></a>00574                         <span class="keywordflow">if</span> (pStyle-&gt;sLeftIndent &lt; 0) {
-<a name="l00575"></a>00575                                 pStyle-&gt;sLeftIndent = 0;
-<a name="l00576"></a>00576                         }
-<a name="l00577"></a>00577                         DBG_DEC(sTmp);
-<a name="l00578"></a>00578                         DBG_DEC(pStyle-&gt;sLeftIndent);
-<a name="l00579"></a>00579                         <span class="keywordflow">break</span>;
-<a name="l00580"></a>00580                 <span class="keywordflow">case</span> 0xc60d:    <span class="comment">/* ChgTabsPapx */</span>
-<a name="l00581"></a>00581                 <span class="keywordflow">case</span> 0xc615:    <span class="comment">/* ChgTabs */</span>
-<a name="l00582"></a>00582                         iTmp = (int)ucGetByte(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l00583"></a>00583                         <span class="keywordflow">if</span> (iTmp &lt; 2) {
-<a name="l00584"></a>00584                                 iInfoLen = 1;
-<a name="l00585"></a>00585                                 <span class="keywordflow">break</span>;
-<a name="l00586"></a>00586                         }
-<a name="l00587"></a>00587                         NO_DBG_DEC(iTmp);
-<a name="l00588"></a>00588                         iDel = (int)ucGetByte(iFodo + iFodoOff + 3, aucGrpprl);
-<a name="l00589"></a>00589                         <span class="keywordflow">if</span> (iTmp &lt; 2 + 2 * iDel) {
-<a name="l00590"></a>00590                                 iInfoLen = 1;
-<a name="l00591"></a>00591                                 <span class="keywordflow">break</span>;
-<a name="l00592"></a>00592                         }
-<a name="l00593"></a>00593                         NO_DBG_DEC(iDel);
-<a name="l00594"></a>00594                         iAdd = (int)ucGetByte(
-<a name="l00595"></a>00595                                 iFodo + iFodoOff + 4 + 2 * iDel, aucGrpprl);
-<a name="l00596"></a>00596                         <span class="keywordflow">if</span> (iTmp &lt; 2 + 2 * iDel + 2 * iAdd) {
-<a name="l00597"></a>00597                                 iInfoLen = 1;
-<a name="l00598"></a>00598                                 <span class="keywordflow">break</span>;
-<a name="l00599"></a>00599                         }
-<a name="l00600"></a>00600                         NO_DBG_DEC(iAdd);
-<a name="l00601"></a>00601                         <span class="keywordflow">break</span>;
-<a name="l00602"></a>00602                 <span class="keywordflow">case</span> 0x840e:    <span class="comment">/* dxaRight */</span>
-<a name="l00603"></a>00603                         pStyle-&gt;sRightIndent = (short)usGetWord(
-<a name="l00604"></a>00604                                         iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l00605"></a>00605                         NO_DBG_DEC(pStyle-&gt;sRightIndent);
-<a name="l00606"></a>00606                         <span class="keywordflow">break</span>;
-<a name="l00607"></a>00607                 <span class="keywordflow">case</span> 0x840f:    <span class="comment">/* dxaLeft */</span>
-<a name="l00608"></a>00608                         pStyle-&gt;sLeftIndent = (short)usGetWord(
-<a name="l00609"></a>00609                                         iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l00610"></a>00610                         NO_DBG_DEC(pStyle-&gt;sLeftIndent);
-<a name="l00611"></a>00611                         <span class="keywordflow">break</span>;
-<a name="l00612"></a>00612                 <span class="keywordflow">case</span> 0x8411:    <span class="comment">/* dxaLeft1 */</span>
-<a name="l00613"></a>00613                         pStyle-&gt;sLeftIndent1 = (short)usGetWord(
-<a name="l00614"></a>00614                                         iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l00615"></a>00615                         NO_DBG_DEC(pStyle-&gt;sLeftIndent1);
-<a name="l00616"></a>00616                         <span class="keywordflow">break</span>;
-<a name="l00617"></a>00617                 <span class="keywordflow">case</span> 0xa413:    <span class="comment">/* dyaBefore */</span>
-<a name="l00618"></a>00618                         pStyle-&gt;usBeforeIndent = usGetWord(
-<a name="l00619"></a>00619                                         iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l00620"></a>00620                         NO_DBG_DEC(pStyle-&gt;usBeforeIndent);
-<a name="l00621"></a>00621                         <span class="keywordflow">break</span>;
-<a name="l00622"></a>00622                 <span class="keywordflow">case</span> 0xa414:    <span class="comment">/* dyaAfter */</span>
-<a name="l00623"></a>00623                         pStyle-&gt;usAfterIndent = usGetWord(
-<a name="l00624"></a>00624                                         iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l00625"></a>00625                         NO_DBG_DEC(pStyle-&gt;usAfterIndent);
-<a name="l00626"></a>00626                         <span class="keywordflow">break</span>;
-<a name="l00627"></a>00627                 <span class="keywordflow">case</span> 0xc63e:    <span class="comment">/* anld */</span>
-<a name="l00628"></a>00628                         iTmp = (int)ucGetByte(
-<a name="l00629"></a>00629                                         iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l00630"></a>00630                         DBG_DEC_C(iTmp &lt; 84, iTmp);
-<a name="l00631"></a>00631                         <span class="keywordflow">if</span> (iTmp &gt;= 1) {
-<a name="l00632"></a>00632                                 tList6.ucNFC = ucGetByte(
-<a name="l00633"></a>00633                                         iFodo + iFodoOff + 3, aucGrpprl);
-<a name="l00634"></a>00634                         }
-<a name="l00635"></a>00635                         <span class="keywordflow">if</span> (tList6.ucNFC != LIST_BULLETS &amp;&amp; iTmp &gt;= 2) {
-<a name="l00636"></a>00636                                 iBefore = (int)ucGetByte(
-<a name="l00637"></a>00637                                         iFodo + iFodoOff + 4, aucGrpprl);
-<a name="l00638"></a>00638                         } <span class="keywordflow">else</span> {
-<a name="l00639"></a>00639                                 iBefore = 0;
-<a name="l00640"></a>00640                         }
-<a name="l00641"></a>00641                         <span class="keywordflow">if</span> (iTmp &gt;= 12) {
-<a name="l00642"></a>00642                                 tList6.ulStartAt = (ULONG)usGetWord(
-<a name="l00643"></a>00643                                         iFodo + iFodoOff + 13, aucGrpprl);
-<a name="l00644"></a>00644                         }
-<a name="l00645"></a>00645                         <span class="keywordflow">if</span> (iTmp &gt;= iBefore + 22) {
-<a name="l00646"></a>00646                                 tList6.usListChar = usGetWord(
-<a name="l00647"></a>00647                                         iFodo + iFodoOff + iBefore + 23,
-<a name="l00648"></a>00648                                         aucGrpprl);
-<a name="l00649"></a>00649                                 DBG_HEX(tList6.usListChar);
-<a name="l00650"></a>00650                         }
-<a name="l00651"></a>00651                         <span class="keywordflow">break</span>;
-<a name="l00652"></a>00652                 <span class="keywordflow">default</span>:
-<a name="l00653"></a>00653                         NO_DBG_HEX(usOpCode);
-<a name="l00654"></a>00654                         <span class="keywordflow">break</span>;
-<a name="l00655"></a>00655                 }
-<a name="l00656"></a>00656                 <span class="keywordflow">if</span> (iInfoLen &lt;= 0) {
-<a name="l00657"></a>00657                         iInfoLen =
-<a name="l00658"></a>00658                                 iGet8InfoLength(iFodo + iFodoOff, aucGrpprl);
-<a name="l00659"></a>00659                         fail(iInfoLen &lt;= 0);
-<a name="l00660"></a>00660                 }
-<a name="l00661"></a>00661                 iFodoOff += iInfoLen;
-<a name="l00662"></a>00662         }
-<a name="l00663"></a>00663 
-<a name="l00664"></a>00664         <span class="keywordflow">if</span> (pStyle-&gt;usListIndex == 2047) {
-<a name="l00665"></a>00665                 <span class="comment">/* Old style list */</span>
-<a name="l00666"></a>00666                 pStyle-&gt;usStartAt = (USHORT)tList6.ulStartAt;
-<a name="l00667"></a>00667                 pStyle-&gt;usListChar = tList6.usListChar;
-<a name="l00668"></a>00668                 pStyle-&gt;ucNFC = tList6.ucNFC;
-<a name="l00669"></a>00669         } <span class="keywordflow">else</span> {
-<a name="l00670"></a>00670                 <span class="comment">/* New style list */</span>
-<a name="l00671"></a>00671                 pList = pGetListInfo(pStyle-&gt;usListIndex, pStyle-&gt;ucListLevel);
-<a name="l00672"></a>00672                 <span class="keywordflow">if</span> (pList != NULL) {
-<a name="l00673"></a>00673                         pStyle-&gt;bNoRestart = pList-&gt;bNoRestart;
-<a name="l00674"></a>00674                         fail(pList-&gt;ulStartAt &gt; (ULONG)USHRT_MAX);
-<a name="l00675"></a>00675                         pStyle-&gt;usStartAt = (USHORT)pList-&gt;ulStartAt;
-<a name="l00676"></a>00676                         pStyle-&gt;usListChar = pList-&gt;usListChar;
-<a name="l00677"></a>00677                         pStyle-&gt;ucNFC = pList-&gt;ucNFC;
-<a name="l00678"></a>00678                         if (pStyle-&gt;sLeftIndent &lt;= 0) {
-<a name="l00679"></a>00679                                 pStyle-&gt;sLeftIndent = pList-&gt;sLeftIndent;
-<a name="l00680"></a>00680                         }
-<a name="l00681"></a>00681                 }
-<a name="l00682"></a>00682         }
-<a name="l00683"></a>00683 } <span class="comment">/* end of vGet8StyleInfo */</span>
-<a name="l00684"></a>00684 
-<a name="l00685"></a>00685 <span class="comment">/*</span>
-<a name="l00686"></a>00686 <span class="comment"> * Get the left indentation value from the style information block</span>
-<a name="l00687"></a>00687 <span class="comment"> *</span>
-<a name="l00688"></a>00688 <span class="comment"> * Returns the value when found, otherwise 0</span>
-<a name="l00689"></a>00689 <span class="comment"> */</span>
-<a name="l00690"></a>00690 <span class="keyword">static</span> <span class="keywordtype">short</span>
-<a name="l00691"></a>00691 sGetLeftIndent(<span class="keyword">const</span> UCHAR *aucGrpprl, <span class="keywordtype">size_t</span> tBytes)
-<a name="l00692"></a>00692 {
-<a name="l00693"></a>00693         <span class="keywordtype">int</span>     iOffset, iInfoLen;
-<a name="l00694"></a>00694         USHORT  usOpCode, usTmp;
-<a name="l00695"></a>00695 
-<a name="l00696"></a>00696         fail(aucGrpprl == NULL);
-<a name="l00697"></a>00697 
-<a name="l00698"></a>00698         iOffset = 0;
-<a name="l00699"></a>00699         <span class="keywordflow">while</span> (tBytes &gt;= (<span class="keywordtype">size_t</span>)iOffset + 4) {
-<a name="l00700"></a>00700                 usOpCode = usGetWord(iOffset, aucGrpprl);
-<a name="l00701"></a>00701                 <span class="keywordflow">if</span> (usOpCode == 0x840f) {       <span class="comment">/* dxaLeft */</span>
-<a name="l00702"></a>00702                         usTmp = usGetWord(iOffset + 2, aucGrpprl);
-<a name="l00703"></a>00703                         <span class="keywordflow">if</span> (usTmp &lt;= 0x7fff) {
-<a name="l00704"></a>00704                                 NO_DBG_DEC(usTmp);
-<a name="l00705"></a>00705                                 <span class="keywordflow">return</span> (<span class="keywordtype">short</span>)usTmp;
-<a name="l00706"></a>00706                         }
-<a name="l00707"></a>00707                 }
-<a name="l00708"></a>00708                 iInfoLen = iGet8InfoLength(iOffset, aucGrpprl);
-<a name="l00709"></a>00709                 fail(iInfoLen &lt;= 0);
-<a name="l00710"></a>00710                 iOffset += iInfoLen;
-<a name="l00711"></a>00711         }
-<a name="l00712"></a>00712         <span class="keywordflow">return</span> 0;
-<a name="l00713"></a>00713 } <span class="comment">/* end of sGetLeftIndent */</span>
-<a name="l00714"></a>00714 
-<a name="l00715"></a>00715 <span class="comment">/*</span>
-<a name="l00716"></a>00716 <span class="comment"> * Build the list with List Information for Word 8/9/10/11 files</span>
-<a name="l00717"></a>00717 <span class="comment"> */</span>
-<a name="l00718"></a>00718 <span class="keywordtype">void</span>
-<a name="l00719"></a>00719 vGet8LstInfo(FILE *pFile, <span class="keyword">const</span> pps_info_type *pPPS,
-<a name="l00720"></a>00720         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00721"></a>00721         <span class="keyword">const</span> ULONG *aulSBD, <span class="keywordtype">size_t</span> tSBDLen,
-<a name="l00722"></a>00722         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00723"></a>00723 {
-<a name="l00724"></a>00724         list_block_type tList;
-<a name="l00725"></a>00725         <span class="keyword">const</span> ULONG     *aulBlockDepot;
-<a name="l00726"></a>00726         UCHAR   *aucLfoInfo, *aucLstfInfo, *aucPapx, *aucXString;
-<a name="l00727"></a>00727         ULONG   ulBeginLfoInfo, ulBeginLstfInfo, ulBeginLvlfInfo;
-<a name="l00728"></a>00728         ULONG   ulListID, ulStart;
-<a name="l00729"></a>00729         <span class="keywordtype">size_t</span>  tBlockDepotLen, tBlockSize;
-<a name="l00730"></a>00730         <span class="keywordtype">size_t</span>  tLfoInfoLen, tLstfInfoLen, tPapxLen, tXstLen, tOff;
-<a name="l00731"></a>00731         <span class="keywordtype">size_t</span>  tLstfRecords, tStart, tIndex;
-<a name="l00732"></a>00732         <span class="keywordtype">int</span>     iNums;
-<a name="l00733"></a>00733         USHORT  usIstd;
-<a name="l00734"></a>00734         UCHAR   ucTmp, ucListLevel, ucMaxLevel, ucChpxLen;
-<a name="l00735"></a>00735         UCHAR   aucLvlfInfo[28], aucXst[2];
-<a name="l00736"></a>00736 
-<a name="l00737"></a>00737         fail(pFile == NULL || pPPS == NULL || aucHeader == NULL);
-<a name="l00738"></a>00738         fail(aulBBD == NULL || aulSBD == NULL);
-<a name="l00739"></a>00739 
-<a name="l00740"></a>00740         NO_DBG_DEC(pPPS-&gt;tTable.ulSB);
-<a name="l00741"></a>00741         NO_DBG_HEX(pPPS-&gt;tTable.ulSize);
-<a name="l00742"></a>00742         <span class="keywordflow">if</span> (pPPS-&gt;tTable.ulSize == 0) {
-<a name="l00743"></a>00743                 DBG_MSG(<span class="stringliteral">&quot;No list information&quot;</span>);
-<a name="l00744"></a>00744                 <span class="keywordflow">return</span>;
-<a name="l00745"></a>00745         }
-<a name="l00746"></a>00746 
-<a name="l00747"></a>00747         <span class="keywordflow">if</span> (pPPS-&gt;tTable.ulSize &lt; MIN_SIZE_FOR_BBD_USE) {
-<a name="l00748"></a>00748                 <span class="comment">/* Use the Small Block Depot */</span>
-<a name="l00749"></a>00749                 aulBlockDepot = aulSBD;
-<a name="l00750"></a>00750                 tBlockDepotLen = tSBDLen;
-<a name="l00751"></a>00751                 tBlockSize = SMALL_BLOCK_SIZE;
-<a name="l00752"></a>00752         } <span class="keywordflow">else</span> {
-<a name="l00753"></a>00753                 <span class="comment">/* Use the Big Block Depot */</span>
-<a name="l00754"></a>00754                 aulBlockDepot = aulBBD;
-<a name="l00755"></a>00755                 tBlockDepotLen = tBBDLen;
-<a name="l00756"></a>00756                 tBlockSize = BIG_BLOCK_SIZE;
-<a name="l00757"></a>00757         }
-<a name="l00758"></a>00758 
-<a name="l00759"></a>00759         <span class="comment">/* LFO (List Format Override) */</span>
-<a name="l00760"></a>00760         ulBeginLfoInfo = ulGetLong(0x2ea, aucHeader); <span class="comment">/* fcPlfLfo */</span>
-<a name="l00761"></a>00761         DBG_HEX(ulBeginLfoInfo);
-<a name="l00762"></a>00762         tLfoInfoLen = (size_t)ulGetLong(0x2ee, aucHeader); <span class="comment">/* lcbPlfLfo */</span>
-<a name="l00763"></a>00763         DBG_DEC(tLfoInfoLen);
-<a name="l00764"></a>00764         <span class="keywordflow">if</span> (tLfoInfoLen == 0) {
-<a name="l00765"></a>00765                 DBG_MSG(<span class="stringliteral">&quot;No lists in this document&quot;</span>);
-<a name="l00766"></a>00766                 <span class="keywordflow">return</span>;
-<a name="l00767"></a>00767         }
-<a name="l00768"></a>00768 
-<a name="l00769"></a>00769         aucLfoInfo = xmalloc(tLfoInfoLen);
-<a name="l00770"></a>00770         <span class="keywordflow">if</span> (!bReadBuffer(pFile, pPPS-&gt;tTable.ulSB,
-<a name="l00771"></a>00771                         aulBlockDepot, tBlockDepotLen, tBlockSize,
-<a name="l00772"></a>00772                         aucLfoInfo, ulBeginLfoInfo, tLfoInfoLen)) {
-<a name="l00773"></a>00773                 aucLfoInfo = xfree(aucLfoInfo);
-<a name="l00774"></a>00774                 <span class="keywordflow">return</span>;
-<a name="l00775"></a>00775         }
-<a name="l00776"></a>00776         NO_DBG_PRINT_BLOCK(aucLfoInfo, tLfoInfoLen);
-<a name="l00777"></a>00777         vBuildLfoList(aucLfoInfo, tLfoInfoLen);
-<a name="l00778"></a>00778         aucLfoInfo = xfree(aucLfoInfo);
-<a name="l00779"></a>00779 
-<a name="l00780"></a>00780         <span class="comment">/* LSTF (LiST data on File) */</span>
-<a name="l00781"></a>00781         ulBeginLstfInfo = ulGetLong(0x2e2, aucHeader); <span class="comment">/* fcPlcfLst */</span>
-<a name="l00782"></a>00782         DBG_HEX(ulBeginLstfInfo);
-<a name="l00783"></a>00783         tLstfInfoLen = (size_t)ulGetLong(0x2e6, aucHeader); <span class="comment">/* lcbPlcfLst */</span>
-<a name="l00784"></a>00784         DBG_DEC(tLstfInfoLen);
-<a name="l00785"></a>00785         <span class="keywordflow">if</span> (tLstfInfoLen == 0) {
-<a name="l00786"></a>00786                 DBG_MSG(<span class="stringliteral">&quot;No list data on file&quot;</span>);
-<a name="l00787"></a>00787                 <span class="keywordflow">return</span>;
-<a name="l00788"></a>00788         }
-<a name="l00789"></a>00789 
-<a name="l00790"></a>00790         aucLstfInfo = xmalloc(tLstfInfoLen);
-<a name="l00791"></a>00791         <span class="keywordflow">if</span> (!bReadBuffer(pFile, pPPS-&gt;tTable.ulSB,
-<a name="l00792"></a>00792                         aulBlockDepot, tBlockDepotLen, tBlockSize,
-<a name="l00793"></a>00793                         aucLstfInfo, ulBeginLstfInfo, tLstfInfoLen)) {
-<a name="l00794"></a>00794                 aucLstfInfo = xfree(aucLstfInfo);
-<a name="l00795"></a>00795                 <span class="keywordflow">return</span>;
-<a name="l00796"></a>00796         }
-<a name="l00797"></a>00797         NO_DBG_PRINT_BLOCK(aucLstfInfo, tLstfInfoLen);
-<a name="l00798"></a>00798 
-<a name="l00799"></a>00799         tLstfRecords = (size_t)usGetWord(0, aucLstfInfo);
-<a name="l00800"></a>00800         <span class="keywordflow">if</span> (2 + tLstfRecords * 28 &lt; tLstfInfoLen) {
-<a name="l00801"></a>00801                 DBG_DEC(2 + tLstfRecords * 28);
-<a name="l00802"></a>00802                 DBG_DEC(tLstfInfoLen);
-<a name="l00803"></a>00803                 aucLstfInfo = xfree(aucLstfInfo);
-<a name="l00804"></a>00804                 <span class="keywordflow">return</span>;
-<a name="l00805"></a>00805         }
-<a name="l00806"></a>00806 
-<a name="l00807"></a>00807         <span class="comment">/* LVLF (List leVeL on File) */</span>
-<a name="l00808"></a>00808         ulBeginLvlfInfo = ulBeginLstfInfo + tLstfInfoLen;
-<a name="l00809"></a>00809         DBG_HEX(ulBeginLvlfInfo);
-<a name="l00810"></a>00810 
-<a name="l00811"></a>00811         aucXString = NULL;
-<a name="l00812"></a>00812         ulStart = ulBeginLvlfInfo;
-<a name="l00813"></a>00813 
-<a name="l00814"></a>00814         <span class="keywordflow">for</span> (tIndex = 0, tStart = 2;
-<a name="l00815"></a>00815              tIndex &lt; tLstfRecords;
-<a name="l00816"></a>00816              tIndex++, tStart += 28) {
-<a name="l00817"></a>00817                 ulListID = ulGetLong(tStart, aucLstfInfo);
-<a name="l00818"></a>00818                 NO_DBG_HEX(ulListID);
-<a name="l00819"></a>00819                 ucTmp = ucGetByte(tStart + 26, aucLstfInfo);
-<a name="l00820"></a>00820                 ucMaxLevel = odd(ucTmp) ? 1 : 9;
-<a name="l00821"></a>00821                 <span class="keywordflow">for</span> (ucListLevel = 0; ucListLevel &lt; ucMaxLevel; ucListLevel++) {
-<a name="l00822"></a>00822                         fail(aucXString != NULL);
-<a name="l00823"></a>00823                         usIstd = usGetWord(
-<a name="l00824"></a>00824                                         tStart + 8 + 2 * (<span class="keywordtype">size_t</span>)ucListLevel,
-<a name="l00825"></a>00825                                         aucLstfInfo);
-<a name="l00826"></a>00826                         DBG_DEC_C(usIstd != STI_NIL, usIstd);
-<a name="l00827"></a>00827                         NO_DBG_HEX(ulStart);
-<a name="l00828"></a>00828                         (void)memset(&amp;tList, 0, <span class="keyword">sizeof</span>(tList));
-<a name="l00829"></a>00829                         <span class="comment">/* Read the lvlf (List leVeL on File) */</span>
-<a name="l00830"></a>00830                         <span class="keywordflow">if</span> (!bReadBuffer(pFile, pPPS-&gt;tTable.ulSB,
-<a name="l00831"></a>00831                                         aulBlockDepot, tBlockDepotLen,
-<a name="l00832"></a>00832                                         tBlockSize, aucLvlfInfo,
-<a name="l00833"></a>00833                                         ulStart, <span class="keyword">sizeof</span>(aucLvlfInfo))) {
-<a name="l00834"></a>00834                                 aucLstfInfo = xfree(aucLstfInfo);
-<a name="l00835"></a>00835                                 <span class="keywordflow">return</span>;
-<a name="l00836"></a>00836                         }
-<a name="l00837"></a>00837                         NO_DBG_PRINT_BLOCK(aucLvlfInfo, <span class="keyword">sizeof</span>(aucLvlfInfo));
-<a name="l00838"></a>00838                         <span class="keywordflow">if</span> (bAllZero(aucLvlfInfo, <span class="keyword">sizeof</span>(aucLvlfInfo))) {
-<a name="l00839"></a>00839                                 tList.ulStartAt = 1;
-<a name="l00840"></a>00840                                 tList.ucNFC = 0x00;
-<a name="l00841"></a>00841                                 tList.bNoRestart = FALSE;
-<a name="l00842"></a>00842                         } <span class="keywordflow">else</span> {
-<a name="l00843"></a>00843                                 tList.ulStartAt = ulGetLong(0, aucLvlfInfo);
-<a name="l00844"></a>00844                                 tList.ucNFC = ucGetByte(4, aucLvlfInfo);
-<a name="l00845"></a>00845                                 ucTmp = ucGetByte(5, aucLvlfInfo);
-<a name="l00846"></a>00846                                 tList.bNoRestart = (ucTmp &amp; BIT(3)) != 0;
-<a name="l00847"></a>00847                                 DBG_MSG_C((ucTmp &amp; BIT(4)) != 0 &amp;&amp;
-<a name="l00848"></a>00848                                         (ucTmp &amp; BIT(6)) != 0, <span class="stringliteral">&quot;Found one&quot;</span>);
-<a name="l00849"></a>00849                         }
-<a name="l00850"></a>00850                         ulStart += <span class="keyword">sizeof</span>(aucLvlfInfo);
-<a name="l00851"></a>00851                         tPapxLen = (size_t)ucGetByte(25, aucLvlfInfo);
-<a name="l00852"></a>00852                         <span class="keywordflow">if</span> (tPapxLen != 0) {
-<a name="l00853"></a>00853                                 aucPapx = xmalloc(tPapxLen);
-<a name="l00854"></a>00854                                 <span class="comment">/* Read the Papx */</span>
-<a name="l00855"></a>00855                                 <span class="keywordflow">if</span> (!bReadBuffer(pFile, pPPS-&gt;tTable.ulSB,
-<a name="l00856"></a>00856                                                 aulBlockDepot, tBlockDepotLen,
-<a name="l00857"></a>00857                                                 tBlockSize, aucPapx,
-<a name="l00858"></a>00858                                                 ulStart, tPapxLen)) {
-<a name="l00859"></a>00859                                         aucPapx = xfree(aucPapx);
-<a name="l00860"></a>00860                                         aucLstfInfo = xfree(aucLstfInfo);
-<a name="l00861"></a>00861                                         <span class="keywordflow">return</span>;
-<a name="l00862"></a>00862                                 }
-<a name="l00863"></a>00863                                 NO_DBG_PRINT_BLOCK(aucPapx, tPapxLen);
-<a name="l00864"></a>00864                                 tList.sLeftIndent =
-<a name="l00865"></a>00865                                         sGetLeftIndent(aucPapx, tPapxLen);
-<a name="l00866"></a>00866                                 aucPapx = xfree(aucPapx);
-<a name="l00867"></a>00867                         }
-<a name="l00868"></a>00868                         ulStart += tPapxLen;
-<a name="l00869"></a>00869                         ucChpxLen = ucGetByte(24, aucLvlfInfo);
-<a name="l00870"></a>00870                         ulStart += (ULONG)ucChpxLen;
-<a name="l00871"></a>00871                         <span class="comment">/* Read the length of the XString */</span>
-<a name="l00872"></a>00872                         <span class="keywordflow">if</span> (!bReadBuffer(pFile, pPPS-&gt;tTable.ulSB,
-<a name="l00873"></a>00873                                         aulBlockDepot, tBlockDepotLen,
-<a name="l00874"></a>00874                                         tBlockSize, aucXst,
-<a name="l00875"></a>00875                                         ulStart, <span class="keyword">sizeof</span>(aucXst))) {
-<a name="l00876"></a>00876                                 aucLstfInfo = xfree(aucLstfInfo);
-<a name="l00877"></a>00877                                 <span class="keywordflow">return</span>;
-<a name="l00878"></a>00878                         }
-<a name="l00879"></a>00879                         NO_DBG_PRINT_BLOCK(aucXst, <span class="keyword">sizeof</span>(aucXst));
-<a name="l00880"></a>00880                         tXstLen = (size_t)usGetWord(0, aucXst);
-<a name="l00881"></a>00881                         ulStart += <span class="keyword">sizeof</span>(aucXst);
-<a name="l00882"></a>00882                         <span class="keywordflow">if</span> (tXstLen == 0) {
-<a name="l00883"></a>00883                                 tList.usListChar = DEFAULT_LISTCHAR;
-<a name="l00884"></a>00884                                 vAdd2ListInfoList(ulListID,
-<a name="l00885"></a>00885                                                 usIstd,
-<a name="l00886"></a>00886                                                 ucListLevel,
-<a name="l00887"></a>00887                                                 &amp;tList);
-<a name="l00888"></a>00888                                 <span class="keywordflow">continue</span>;
-<a name="l00889"></a>00889                         }
-<a name="l00890"></a>00890                         tXstLen *= 2;   <span class="comment">/* Length in chars to length in bytes */</span>
-<a name="l00891"></a>00891                         aucXString = xmalloc(tXstLen);
-<a name="l00892"></a>00892                         <span class="comment">/* Read the XString */</span>
-<a name="l00893"></a>00893                         <span class="keywordflow">if</span> (!bReadBuffer(pFile, pPPS-&gt;tTable.ulSB,
-<a name="l00894"></a>00894                                         aulBlockDepot, tBlockDepotLen,
-<a name="l00895"></a>00895                                         tBlockSize, aucXString,
-<a name="l00896"></a>00896                                         ulStart, tXstLen)) {
-<a name="l00897"></a>00897                                 aucXString = xfree(aucXString);
-<a name="l00898"></a>00898                                 aucLstfInfo = xfree(aucLstfInfo);
-<a name="l00899"></a>00899                                 <span class="keywordflow">return</span>;
-<a name="l00900"></a>00900                         }
-<a name="l00901"></a>00901                         NO_DBG_PRINT_BLOCK(aucXString, tXstLen);
-<a name="l00902"></a>00902                         tOff = 0;
-<a name="l00903"></a>00903                         <span class="keywordflow">for</span> (iNums = 6; iNums &lt; 15; iNums++) {
-<a name="l00904"></a>00904                                 ucTmp = ucGetByte(iNums, aucLvlfInfo);
-<a name="l00905"></a>00905                                 <span class="keywordflow">if</span> (ucTmp == 0) {
-<a name="l00906"></a>00906                                         <span class="keywordflow">break</span>;
-<a name="l00907"></a>00907                                 }
-<a name="l00908"></a>00908                                 tOff = (size_t)ucTmp;
-<a name="l00909"></a>00909                         }
-<a name="l00910"></a>00910                         tOff *= 2;      <span class="comment">/* Offset in chars to offset in bytes */</span>
-<a name="l00911"></a>00911                         NO_DBG_DEC(tOff);
-<a name="l00912"></a>00912                         <span class="keywordflow">if</span> (tList.ucNFC == LIST_SPECIAL ||
-<a name="l00913"></a>00913                             tList.ucNFC == LIST_SPECIAL2 ||
-<a name="l00914"></a>00914                             tList.ucNFC == LIST_BULLETS) {
-<a name="l00915"></a>00915                                 tList.usListChar = usGetWord(0, aucXString);
-<a name="l00916"></a>00916                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (tOff != 0 &amp;&amp; tOff &lt; tXstLen) {
-<a name="l00917"></a>00917                                 tList.usListChar = usGetWord(tOff, aucXString);
-<a name="l00918"></a>00918                         } <span class="keywordflow">else</span> {
-<a name="l00919"></a>00919                                 tList.usListChar = DEFAULT_LISTCHAR;
-<a name="l00920"></a>00920                         }
-<a name="l00921"></a>00921                         vAdd2ListInfoList(ulListID,
-<a name="l00922"></a>00922                                         usIstd,
-<a name="l00923"></a>00923                                         ucListLevel,
-<a name="l00924"></a>00924                                         &amp;tList);
-<a name="l00925"></a>00925                         ulStart += tXstLen;
-<a name="l00926"></a>00926                         aucXString = xfree(aucXString);
-<a name="l00927"></a>00927                 }
-<a name="l00928"></a>00928         }
-<a name="l00929"></a>00929         aucLstfInfo = xfree(aucLstfInfo);
-<a name="l00930"></a>00930 } <span class="comment">/* end of vGet8LstInfo */</span>
-<a name="l00931"></a>00931 
-<a name="l00932"></a>00932 <span class="comment">/*</span>
-<a name="l00933"></a>00933 <span class="comment"> * Build the lists with Paragraph Information for Word 8/9/10/11 files</span>
-<a name="l00934"></a>00934 <span class="comment"> */</span>
-<a name="l00935"></a>00935 <span class="keywordtype">void</span>
-<a name="l00936"></a>00936 vGet8PapInfo(FILE *pFile, <span class="keyword">const</span> pps_info_type *pPPS,
-<a name="l00937"></a>00937         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00938"></a>00938         <span class="keyword">const</span> ULONG *aulSBD, <span class="keywordtype">size_t</span> tSBDLen,
-<a name="l00939"></a>00939         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00940"></a>00940 {
-<a name="l00941"></a>00941         row_block_type          tRow;
-<a name="l00942"></a>00942         style_block_type        tStyle;
-<a name="l00943"></a>00943         ULONG           *aulParfPage;
-<a name="l00944"></a>00944         UCHAR   *aucBuffer;
-<a name="l00945"></a>00945         ULONG   ulCharPos, ulCharPosFirst, ulCharPosLast;
-<a name="l00946"></a>00946         ULONG   ulBeginParfInfo;
-<a name="l00947"></a>00947         <span class="keywordtype">size_t</span>  tParfInfoLen, tOffset, tLen;
-<a name="l00948"></a>00948         <span class="keywordtype">int</span>     iIndex, iIndex2, iRun, iFodo, iLen;
-<a name="l00949"></a>00949         row_info_enum   eRowInfo;
-<a name="l00950"></a>00950         USHORT  usIstd;
-<a name="l00951"></a>00951         UCHAR   aucFpage[BIG_BLOCK_SIZE];
-<a name="l00952"></a>00952 
-<a name="l00953"></a>00953         fail(pFile == NULL || pPPS == NULL || aucHeader == NULL);
-<a name="l00954"></a>00954         fail(aulBBD == NULL || aulSBD == NULL);
-<a name="l00955"></a>00955 
-<a name="l00956"></a>00956         ulBeginParfInfo = ulGetLong(0x102, aucHeader); <span class="comment">/* fcPlcfbtePapx */</span>
-<a name="l00957"></a>00957         NO_DBG_HEX(ulBeginParfInfo);
-<a name="l00958"></a>00958         tParfInfoLen = (size_t)ulGetLong(0x106, aucHeader); <span class="comment">/* lcbPlcfbtePapx */</span>
-<a name="l00959"></a>00959         NO_DBG_DEC(tParfInfoLen);
-<a name="l00960"></a>00960         <span class="keywordflow">if</span> (tParfInfoLen &lt; 4) {
-<a name="l00961"></a>00961                 DBG_DEC(tParfInfoLen);
-<a name="l00962"></a>00962                 <span class="keywordflow">return</span>;
-<a name="l00963"></a>00963         }
-<a name="l00964"></a>00964 
-<a name="l00965"></a>00965         aucBuffer = aucFillInfoBuffer(pFile, &amp;pPPS-&gt;tTable,
-<a name="l00966"></a>00966                         aulBBD, tBBDLen, aulSBD, tSBDLen,
-<a name="l00967"></a>00967                         ulBeginParfInfo, tParfInfoLen);
-<a name="l00968"></a>00968         <span class="keywordflow">if</span> (aucBuffer == NULL) {
-<a name="l00969"></a>00969                 <span class="keywordflow">return</span>;
-<a name="l00970"></a>00970         }
-<a name="l00971"></a>00971         NO_DBG_PRINT_BLOCK(aucBuffer, tParfInfoLen);
-<a name="l00972"></a>00972 
-<a name="l00973"></a>00973         tLen = (tParfInfoLen / 4 - 1) / 2;
-<a name="l00974"></a>00974         aulParfPage = xcalloc(tLen, <span class="keyword">sizeof</span>(ULONG));
-<a name="l00975"></a>00975         <span class="keywordflow">for</span> (iIndex = 0, tOffset = (tLen + 1) * 4;
-<a name="l00976"></a>00976              iIndex &lt; (int)tLen;
-<a name="l00977"></a>00977              iIndex++, tOffset += 4) {
-<a name="l00978"></a>00978                  aulParfPage[iIndex] = ulGetLong(tOffset, aucBuffer);
-<a name="l00979"></a>00979                  NO_DBG_DEC(aulParfPage[iIndex]);
-<a name="l00980"></a>00980         }
-<a name="l00981"></a>00981         DBG_HEX(ulGetLong(0, aucBuffer));
-<a name="l00982"></a>00982         aucBuffer = xfree(aucBuffer);
-<a name="l00983"></a>00983         NO_DBG_PRINT_BLOCK(aucHeader, HEADER_SIZE);
-<a name="l00984"></a>00984 
-<a name="l00985"></a>00985         (void)memset(&amp;tRow, 0, <span class="keyword">sizeof</span>(tRow));
-<a name="l00986"></a>00986         ulCharPosFirst = CP_INVALID;
-<a name="l00987"></a>00987         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; (int)tLen; iIndex++) {
-<a name="l00988"></a>00988                 fail(aulParfPage[iIndex] &gt; ULONG_MAX / BIG_BLOCK_SIZE);
-<a name="l00989"></a>00989                 <span class="keywordflow">if</span> (!bReadBuffer(pFile, pPPS-&gt;tWordDocument.ulSB,
-<a name="l00990"></a>00990                                 aulBBD, tBBDLen, BIG_BLOCK_SIZE,
-<a name="l00991"></a>00991                                 aucFpage,
-<a name="l00992"></a>00992                                 aulParfPage[iIndex] * BIG_BLOCK_SIZE,
-<a name="l00993"></a>00993                                 BIG_BLOCK_SIZE)) {
-<a name="l00994"></a>00994                         <span class="keywordflow">break</span>;
-<a name="l00995"></a>00995                 }
-<a name="l00996"></a>00996                 NO_DBG_PRINT_BLOCK(aucFpage, BIG_BLOCK_SIZE);
-<a name="l00997"></a>00997                 iRun = (int)ucGetByte(0x1ff, aucFpage);
-<a name="l00998"></a>00998                 NO_DBG_DEC(iRun);
-<a name="l00999"></a>00999                 <span class="keywordflow">for</span> (iIndex2 = 0; iIndex2 &lt; iRun; iIndex2++) {
-<a name="l01000"></a>01000                         NO_DBG_HEX(ulGetLong(iIndex2 * 4, aucFpage));
-<a name="l01001"></a>01001                         iFodo = 2 * (int)ucGetByte(
-<a name="l01002"></a>01002                                 (iRun + 1) * 4 + iIndex2 * 13, aucFpage);
-<a name="l01003"></a>01003                         <span class="keywordflow">if</span> (iFodo &lt;= 0) {
-<a name="l01004"></a>01004                                 <span class="keywordflow">continue</span>;
-<a name="l01005"></a>01005                         }
-<a name="l01006"></a>01006 
-<a name="l01007"></a>01007                         iLen = 2 * (int)ucGetByte(iFodo, aucFpage);
-<a name="l01008"></a>01008                         <span class="keywordflow">if</span> (iLen == 0) {
-<a name="l01009"></a>01009                                 iFodo++;
-<a name="l01010"></a>01010                                 iLen = 2 * (int)ucGetByte(iFodo, aucFpage);
-<a name="l01011"></a>01011                         }
-<a name="l01012"></a>01012 
-<a name="l01013"></a>01013                         usIstd = usGetWord(iFodo + 1, aucFpage);
-<a name="l01014"></a>01014                         vFillStyleFromStylesheet(usIstd, &amp;tStyle);
-<a name="l01015"></a>01015                         vGet8StyleInfo(iFodo, aucFpage + 3, iLen - 3, &amp;tStyle);
-<a name="l01016"></a>01016                         ulCharPos = ulGetLong(iIndex2 * 4, aucFpage);
-<a name="l01017"></a>01017                         NO_DBG_HEX(ulCharPos);
-<a name="l01018"></a>01018                         tStyle.ulFileOffset = ulCharPos2FileOffsetX(
-<a name="l01019"></a>01019                                                 ulCharPos, &amp;tStyle.eListID);
-<a name="l01020"></a>01020                         vAdd2StyleInfoList(&amp;tStyle);
-<a name="l01021"></a>01021 
-<a name="l01022"></a>01022                         eRowInfo = eGet8RowInfo(iFodo,
-<a name="l01023"></a>01023                                         aucFpage + 3, iLen - 3, &amp;tRow);
-<a name="l01024"></a>01024                         <span class="keywordflow">switch</span> (eRowInfo) {
-<a name="l01025"></a>01025                         <span class="keywordflow">case</span> found_a_cell:
-<a name="l01026"></a>01026                                 <span class="keywordflow">if</span> (ulCharPosFirst != CP_INVALID) {
-<a name="l01027"></a>01027                                         <span class="keywordflow">break</span>;
-<a name="l01028"></a>01028                                 }
-<a name="l01029"></a>01029                                 ulCharPosFirst = ulGetLong(
-<a name="l01030"></a>01030                                                 iIndex2 * 4, aucFpage);
-<a name="l01031"></a>01031                                 NO_DBG_HEX(ulCharPosFirst);
-<a name="l01032"></a>01032                                 tRow.ulCharPosStart = ulCharPosFirst;
-<a name="l01033"></a>01033                                 tRow.ulFileOffsetStart =
-<a name="l01034"></a>01034                                         ulCharPos2FileOffset(ulCharPosFirst);
-<a name="l01035"></a>01035                                 NO_DBG_HEX_C(
-<a name="l01036"></a>01036                                         tRow.ulFileOffsetStart == FC_INVALID,
-<a name="l01037"></a>01037                                         ulCharPosFirst);
-<a name="l01038"></a>01038                                 <span class="keywordflow">break</span>;
-<a name="l01039"></a>01039                         <span class="keywordflow">case</span> found_end_of_row:
-<a name="l01040"></a>01040                                 ulCharPosLast = ulGetLong(
-<a name="l01041"></a>01041                                                 iIndex2 * 4, aucFpage);
-<a name="l01042"></a>01042                                 NO_DBG_HEX(ulCharPosLast);
-<a name="l01043"></a>01043                                 tRow.ulCharPosEnd = ulCharPosLast;
-<a name="l01044"></a>01044                                 tRow.ulFileOffsetEnd =
-<a name="l01045"></a>01045                                         ulCharPos2FileOffset(ulCharPosLast);
-<a name="l01046"></a>01046                                 NO_DBG_HEX_C(tRow.ulFileOffsetEnd == FC_INVALID,
-<a name="l01047"></a>01047                                                         ulCharPosLast);
-<a name="l01048"></a>01048                                 vAdd2RowInfoList(&amp;tRow);
-<a name="l01049"></a>01049                                 (void)memset(&amp;tRow, 0, <span class="keyword">sizeof</span>(tRow));
-<a name="l01050"></a>01050                                 ulCharPosFirst = CP_INVALID;
-<a name="l01051"></a>01051                                 <span class="keywordflow">break</span>;
-<a name="l01052"></a>01052                         <span class="keywordflow">case</span> found_nothing:
-<a name="l01053"></a>01053                                 <span class="keywordflow">break</span>;
-<a name="l01054"></a>01054                         <span class="keywordflow">default</span>:
-<a name="l01055"></a>01055                                 DBG_DEC(eRowInfo);
-<a name="l01056"></a>01056                                 <span class="keywordflow">break</span>;
-<a name="l01057"></a>01057                         }
-<a name="l01058"></a>01058                 }
-<a name="l01059"></a>01059         }
-<a name="l01060"></a>01060         aulParfPage = xfree(aulParfPage);
-<a name="l01061"></a>01061 } <span class="comment">/* end of vGet8PapInfo */</span>
-<a name="l01062"></a>01062 
-<a name="l01063"></a>01063 <span class="comment">/*</span>
-<a name="l01064"></a>01064 <span class="comment"> * Fill the font information block with information</span>
-<a name="l01065"></a>01065 <span class="comment"> * from a Word 8/9/10/11 file.</span>
-<a name="l01066"></a>01066 <span class="comment"> */</span>
-<a name="l01067"></a>01067 <span class="keywordtype">void</span>
-<a name="l01068"></a>01068 vGet8FontInfo(<span class="keywordtype">int</span> iFodo, USHORT usIstd,
-<a name="l01069"></a>01069         <span class="keyword">const</span> UCHAR *aucGrpprl, <span class="keywordtype">int</span> iBytes, font_block_type *pFont)
-<a name="l01070"></a>01070 {
-<a name="l01071"></a>01071         <span class="keywordtype">long</span>    lTmp;
-<a name="l01072"></a>01072         <span class="keywordtype">int</span>     iFodoOff, iInfoLen;
-<a name="l01073"></a>01073         USHORT  usFtc0, usFtc1, usFtc2, usTmp;
-<a name="l01074"></a>01074         UCHAR   ucTmp;
-<a name="l01075"></a>01075 
-<a name="l01076"></a>01076         fail(iFodo &lt; 0 || aucGrpprl == NULL || pFont == NULL);
-<a name="l01077"></a>01077 
-<a name="l01078"></a>01078         usFtc0 = USHRT_MAX;
-<a name="l01079"></a>01079         usFtc1 = USHRT_MAX;
-<a name="l01080"></a>01080         usFtc2 = USHRT_MAX;
-<a name="l01081"></a>01081 
-<a name="l01082"></a>01082         iFodoOff = 0;
-<a name="l01083"></a>01083         <span class="keywordflow">while</span> (iBytes &gt;= iFodoOff + 2) {
-<a name="l01084"></a>01084                 <span class="keywordflow">switch</span> (usGetWord(iFodo + iFodoOff, aucGrpprl)) {
-<a name="l01085"></a>01085                 <span class="keywordflow">case</span> 0x0800:    <span class="comment">/* fRMarkDel */</span>
-<a name="l01086"></a>01086                         ucTmp = ucGetByte(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l01087"></a>01087                         <span class="keywordflow">if</span> (ucTmp == 0) {
-<a name="l01088"></a>01088                                 pFont-&gt;usFontStyle &amp;= ~FONT_MARKDEL;
-<a name="l01089"></a>01089                         } <span class="keywordflow">else</span> {
-<a name="l01090"></a>01090                                 pFont-&gt;usFontStyle |= FONT_MARKDEL;
-<a name="l01091"></a>01091                         }
-<a name="l01092"></a>01092                         <span class="keywordflow">break</span>;
-<a name="l01093"></a>01093                 <span class="keywordflow">case</span> 0x0835:    <span class="comment">/* fBold */</span>
-<a name="l01094"></a>01094                         ucTmp = ucGetByte(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l01095"></a>01095                         <span class="keywordflow">switch</span> (ucTmp) {
-<a name="l01096"></a>01096                         <span class="keywordflow">case</span>   0:       <span class="comment">/* Unset */</span>
-<a name="l01097"></a>01097                                 pFont-&gt;usFontStyle &amp;= ~FONT_BOLD;
-<a name="l01098"></a>01098                                 <span class="keywordflow">break</span>;
-<a name="l01099"></a>01099                         <span class="keywordflow">case</span>   1:       <span class="comment">/* Set */</span>
-<a name="l01100"></a>01100                                 pFont-&gt;usFontStyle |= FONT_BOLD;
-<a name="l01101"></a>01101                                 <span class="keywordflow">break</span>;
-<a name="l01102"></a>01102                         <span class="keywordflow">case</span> 128:       <span class="comment">/* Unchanged */</span>
-<a name="l01103"></a>01103                                 <span class="keywordflow">break</span>;
-<a name="l01104"></a>01104                         <span class="keywordflow">case</span> 129:       <span class="comment">/* Negation */</span>
-<a name="l01105"></a>01105                                 pFont-&gt;usFontStyle ^= FONT_BOLD;
-<a name="l01106"></a>01106                                 <span class="keywordflow">break</span>;
-<a name="l01107"></a>01107                         <span class="keywordflow">default</span>:
-<a name="l01108"></a>01108                                 DBG_DEC(ucTmp);
-<a name="l01109"></a>01109                                 DBG_FIXME();
-<a name="l01110"></a>01110                                 <span class="keywordflow">break</span>;
-<a name="l01111"></a>01111                         }
-<a name="l01112"></a>01112                         <span class="keywordflow">break</span>;
-<a name="l01113"></a>01113                 <span class="keywordflow">case</span> 0x0836:    <span class="comment">/* fItalic */</span>
-<a name="l01114"></a>01114                         ucTmp = ucGetByte(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l01115"></a>01115                         <span class="keywordflow">switch</span> (ucTmp) {
-<a name="l01116"></a>01116                         <span class="keywordflow">case</span>   0:       <span class="comment">/* Unset */</span>
-<a name="l01117"></a>01117                                 pFont-&gt;usFontStyle &amp;= ~FONT_ITALIC;
-<a name="l01118"></a>01118                                 <span class="keywordflow">break</span>;
-<a name="l01119"></a>01119                         <span class="keywordflow">case</span>   1:       <span class="comment">/* Set */</span>
-<a name="l01120"></a>01120                                 pFont-&gt;usFontStyle |= FONT_ITALIC;
-<a name="l01121"></a>01121                                 <span class="keywordflow">break</span>;
-<a name="l01122"></a>01122                         <span class="keywordflow">case</span> 128:       <span class="comment">/* Unchanged */</span>
-<a name="l01123"></a>01123                                 <span class="keywordflow">break</span>;
-<a name="l01124"></a>01124                         <span class="keywordflow">case</span> 129:       <span class="comment">/* Negation */</span>
-<a name="l01125"></a>01125                                 pFont-&gt;usFontStyle ^= FONT_ITALIC;
-<a name="l01126"></a>01126                                 <span class="keywordflow">break</span>;
-<a name="l01127"></a>01127                         <span class="keywordflow">default</span>:
-<a name="l01128"></a>01128                                 DBG_DEC(ucTmp);
-<a name="l01129"></a>01129                                 DBG_FIXME();
-<a name="l01130"></a>01130                                 <span class="keywordflow">break</span>;
-<a name="l01131"></a>01131                         }
-<a name="l01132"></a>01132                         <span class="keywordflow">break</span>;
-<a name="l01133"></a>01133                 <span class="keywordflow">case</span> 0x0837:    <span class="comment">/* fStrike */</span>
-<a name="l01134"></a>01134                         ucTmp = ucGetByte(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l01135"></a>01135                         <span class="keywordflow">switch</span> (ucTmp) {
-<a name="l01136"></a>01136                         <span class="keywordflow">case</span>   0:       <span class="comment">/* Unset */</span>
-<a name="l01137"></a>01137                                 pFont-&gt;usFontStyle &amp;= ~FONT_STRIKE;
-<a name="l01138"></a>01138                                 <span class="keywordflow">break</span>;
-<a name="l01139"></a>01139                         <span class="keywordflow">case</span>   1:       <span class="comment">/* Set */</span>
-<a name="l01140"></a>01140                                 pFont-&gt;usFontStyle |= FONT_STRIKE;
-<a name="l01141"></a>01141                                 <span class="keywordflow">break</span>;
-<a name="l01142"></a>01142                         <span class="keywordflow">case</span> 128:       <span class="comment">/* Unchanged */</span>
-<a name="l01143"></a>01143                                 <span class="keywordflow">break</span>;
-<a name="l01144"></a>01144                         <span class="keywordflow">case</span> 129:       <span class="comment">/* Negation */</span>
-<a name="l01145"></a>01145                                 pFont-&gt;usFontStyle ^= FONT_STRIKE;
-<a name="l01146"></a>01146                                 <span class="keywordflow">break</span>;
-<a name="l01147"></a>01147                         <span class="keywordflow">default</span>:
-<a name="l01148"></a>01148                                 DBG_DEC(ucTmp);
-<a name="l01149"></a>01149                                 DBG_FIXME();
-<a name="l01150"></a>01150                                 <span class="keywordflow">break</span>;
-<a name="l01151"></a>01151                         }
-<a name="l01152"></a>01152                         <span class="keywordflow">break</span>;
-<a name="l01153"></a>01153                 <span class="keywordflow">case</span> 0x083a:    <span class="comment">/* fSmallCaps */</span>
-<a name="l01154"></a>01154                         ucTmp = ucGetByte(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l01155"></a>01155                         <span class="keywordflow">switch</span> (ucTmp) {
-<a name="l01156"></a>01156                         <span class="keywordflow">case</span>   0:       <span class="comment">/* Unset */</span>
-<a name="l01157"></a>01157                                 pFont-&gt;usFontStyle &amp;= ~FONT_SMALL_CAPITALS;
-<a name="l01158"></a>01158                                 <span class="keywordflow">break</span>;
-<a name="l01159"></a>01159                         <span class="keywordflow">case</span>   1:       <span class="comment">/* Set */</span>
-<a name="l01160"></a>01160                                 pFont-&gt;usFontStyle |= FONT_SMALL_CAPITALS;
-<a name="l01161"></a>01161                                 <span class="keywordflow">break</span>;
-<a name="l01162"></a>01162                         <span class="keywordflow">case</span> 128:       <span class="comment">/* Unchanged */</span>
-<a name="l01163"></a>01163                                 <span class="keywordflow">break</span>;
-<a name="l01164"></a>01164                         <span class="keywordflow">case</span> 129:       <span class="comment">/* Negation */</span>
-<a name="l01165"></a>01165                                 pFont-&gt;usFontStyle ^= FONT_SMALL_CAPITALS;
-<a name="l01166"></a>01166                                 <span class="keywordflow">break</span>;
-<a name="l01167"></a>01167                         <span class="keywordflow">default</span>:
-<a name="l01168"></a>01168                                 DBG_DEC(ucTmp);
-<a name="l01169"></a>01169                                 DBG_FIXME();
-<a name="l01170"></a>01170                                 <span class="keywordflow">break</span>;
-<a name="l01171"></a>01171                         }
-<a name="l01172"></a>01172                         <span class="keywordflow">break</span>;
-<a name="l01173"></a>01173                 <span class="keywordflow">case</span> 0x083b:    <span class="comment">/* fCaps */</span>
-<a name="l01174"></a>01174                         ucTmp = ucGetByte(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l01175"></a>01175                         <span class="keywordflow">switch</span> (ucTmp) {
-<a name="l01176"></a>01176                         <span class="keywordflow">case</span>   0:       <span class="comment">/* Unset */</span>
-<a name="l01177"></a>01177                                 pFont-&gt;usFontStyle &amp;= ~FONT_CAPITALS;
-<a name="l01178"></a>01178                                 <span class="keywordflow">break</span>;
-<a name="l01179"></a>01179                         <span class="keywordflow">case</span>   1:       <span class="comment">/* Set */</span>
-<a name="l01180"></a>01180                                 pFont-&gt;usFontStyle |= FONT_CAPITALS;
-<a name="l01181"></a>01181                                 <span class="keywordflow">break</span>;
-<a name="l01182"></a>01182                         <span class="keywordflow">case</span> 128:       <span class="comment">/* Unchanged */</span>
-<a name="l01183"></a>01183                                 <span class="keywordflow">break</span>;
-<a name="l01184"></a>01184                         <span class="keywordflow">case</span> 129:       <span class="comment">/* Negation */</span>
-<a name="l01185"></a>01185                                 pFont-&gt;usFontStyle ^= FONT_CAPITALS;
-<a name="l01186"></a>01186                                 <span class="keywordflow">break</span>;
-<a name="l01187"></a>01187                         <span class="keywordflow">default</span>:
-<a name="l01188"></a>01188                                 DBG_DEC(ucTmp);
-<a name="l01189"></a>01189                                 DBG_FIXME();
-<a name="l01190"></a>01190                                 <span class="keywordflow">break</span>;
-<a name="l01191"></a>01191                         }
-<a name="l01192"></a>01192                         <span class="keywordflow">break</span>;
-<a name="l01193"></a>01193                 <span class="keywordflow">case</span> 0x083c:    <span class="comment">/* fVanish */</span>
-<a name="l01194"></a>01194                         ucTmp = ucGetByte(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l01195"></a>01195                         <span class="keywordflow">switch</span> (ucTmp) {
-<a name="l01196"></a>01196                         <span class="keywordflow">case</span>   0:       <span class="comment">/* Unset */</span>
-<a name="l01197"></a>01197                                 pFont-&gt;usFontStyle &amp;= ~FONT_HIDDEN;
-<a name="l01198"></a>01198                                 <span class="keywordflow">break</span>;
-<a name="l01199"></a>01199                         <span class="keywordflow">case</span>   1:       <span class="comment">/* Set */</span>
-<a name="l01200"></a>01200                                 pFont-&gt;usFontStyle |= FONT_HIDDEN;
-<a name="l01201"></a>01201                                 <span class="keywordflow">break</span>;
-<a name="l01202"></a>01202                         <span class="keywordflow">case</span> 128:       <span class="comment">/* Unchanged */</span>
-<a name="l01203"></a>01203                                 <span class="keywordflow">break</span>;
-<a name="l01204"></a>01204                         <span class="keywordflow">case</span> 129:       <span class="comment">/* Negation */</span>
-<a name="l01205"></a>01205                                 pFont-&gt;usFontStyle ^= FONT_HIDDEN;
-<a name="l01206"></a>01206                                 <span class="keywordflow">break</span>;
-<a name="l01207"></a>01207                         <span class="keywordflow">default</span>:
-<a name="l01208"></a>01208                                 DBG_DEC(ucTmp);
-<a name="l01209"></a>01209                                 DBG_FIXME();
-<a name="l01210"></a>01210                                 <span class="keywordflow">break</span>;
-<a name="l01211"></a>01211                         }
-<a name="l01212"></a>01212                         <span class="keywordflow">break</span>;
-<a name="l01213"></a>01213                 <span class="keywordflow">case</span> 0x2a32:    <span class="comment">/* cDefault */</span>
-<a name="l01214"></a>01214                         pFont-&gt;usFontStyle &amp;= FONT_HIDDEN;
-<a name="l01215"></a>01215                         pFont-&gt;ucFontColor = FONT_COLOR_DEFAULT;
-<a name="l01216"></a>01216                         <span class="keywordflow">break</span>;
-<a name="l01217"></a>01217                 <span class="keywordflow">case</span> 0x2a33:    <span class="comment">/* cPlain */</span>
-<a name="l01218"></a>01218                         DBG_MSG(<span class="stringliteral">&quot;2a33: cPlain&quot;</span>);
-<a name="l01219"></a>01219                         vFillFontFromStylesheet(usIstd, pFont);
-<a name="l01220"></a>01220                         <span class="keywordflow">break</span>;
-<a name="l01221"></a>01221                 <span class="keywordflow">case</span> 0x2a3e:    <span class="comment">/* cKul */</span>
-<a name="l01222"></a>01222                         ucTmp = ucGetByte(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l01223"></a>01223                         <span class="keywordflow">if</span> (ucTmp == 0 || ucTmp == 5) {
-<a name="l01224"></a>01224                                 pFont-&gt;usFontStyle &amp;= ~FONT_UNDERLINE;
-<a name="l01225"></a>01225                         } <span class="keywordflow">else</span> {
-<a name="l01226"></a>01226                                 NO_DBG_MSG(<span class="stringliteral">&quot;Underline text&quot;</span>);
-<a name="l01227"></a>01227                                 pFont-&gt;usFontStyle |= FONT_UNDERLINE;
-<a name="l01228"></a>01228                                 <span class="keywordflow">if</span> (ucTmp == 6) {
-<a name="l01229"></a>01229                                         DBG_MSG(<span class="stringliteral">&quot;Bold text&quot;</span>);
-<a name="l01230"></a>01230                                         pFont-&gt;usFontStyle |= FONT_BOLD;
-<a name="l01231"></a>01231                                 }
-<a name="l01232"></a>01232                         }
-<a name="l01233"></a>01233                         <span class="keywordflow">break</span>;
-<a name="l01234"></a>01234                 <span class="keywordflow">case</span> 0x2a42:    <span class="comment">/* cIco */</span>
-<a name="l01235"></a>01235                         pFont-&gt;ucFontColor =
-<a name="l01236"></a>01236                                 ucGetByte(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l01237"></a>01237                         NO_DBG_DEC(pFont-&gt;ucFontColor);
-<a name="l01238"></a>01238                         <span class="keywordflow">break</span>;
-<a name="l01239"></a>01239                 <span class="keywordflow">case</span> 0x2a44:    <span class="comment">/* cHpsInc */</span>
-<a name="l01240"></a>01240                         DBG_MSG(<span class="stringliteral">&quot;0x2a44: sprmCHpsInc&quot;</span>);
-<a name="l01241"></a>01241                         ucTmp = ucGetByte(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l01242"></a>01242                         DBG_DEC(ucTmp);
-<a name="l01243"></a>01243                         <span class="keywordflow">break</span>;
-<a name="l01244"></a>01244                 <span class="keywordflow">case</span> 0x2a48:    <span class="comment">/* cIss */</span>
-<a name="l01245"></a>01245                         ucTmp = ucGetByte(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l01246"></a>01246                         ucTmp &amp;= 0x07;
-<a name="l01247"></a>01247                         <span class="keywordflow">if</span> (ucTmp == 1) {
-<a name="l01248"></a>01248                                 pFont-&gt;usFontStyle |= FONT_SUPERSCRIPT;
-<a name="l01249"></a>01249                                 NO_DBG_MSG(<span class="stringliteral">&quot;Superscript&quot;</span>);
-<a name="l01250"></a>01250                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ucTmp == 2) {
-<a name="l01251"></a>01251                                 pFont-&gt;usFontStyle |= FONT_SUBSCRIPT;
-<a name="l01252"></a>01252                                 NO_DBG_MSG(<span class="stringliteral">&quot;Subscript&quot;</span>);
-<a name="l01253"></a>01253                         }
-<a name="l01254"></a>01254                         <span class="keywordflow">break</span>;
-<a name="l01255"></a>01255                 <span class="keywordflow">case</span> 0x4a30:    <span class="comment">/* cIstd */</span>
-<a name="l01256"></a>01256                         usTmp = usGetWord(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l01257"></a>01257                         NO_DBG_DEC(usTmp);
-<a name="l01258"></a>01258                         <span class="keywordflow">break</span>;
-<a name="l01259"></a>01259                 <span class="keywordflow">case</span> 0x4a43:    <span class="comment">/* cHps */</span>
-<a name="l01260"></a>01260                         pFont-&gt;usFontSize =
-<a name="l01261"></a>01261                                 usGetWord(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l01262"></a>01262                         NO_DBG_DEC(pFont-&gt;usFontSize);
-<a name="l01263"></a>01263                         <span class="keywordflow">break</span>;
-<a name="l01264"></a>01264                 <span class="keywordflow">case</span> 0x4a4d:    <span class="comment">/* cHpsMul */</span>
-<a name="l01265"></a>01265                         DBG_MSG(<span class="stringliteral">&quot;0x4a4d: sprmCHpsMul&quot;</span>);
-<a name="l01266"></a>01266                         usTmp = usGetWord(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l01267"></a>01267                         DBG_DEC(usTmp);
-<a name="l01268"></a>01268                         <span class="keywordflow">break</span>;
-<a name="l01269"></a>01269                 <span class="keywordflow">case</span> 0x4a4f:    <span class="comment">/* cFtc0 */</span>
-<a name="l01270"></a>01270                         usFtc0 = usGetWord(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l01271"></a>01271                         <span class="keywordflow">break</span>;
-<a name="l01272"></a>01272                 <span class="keywordflow">case</span> 0x4a50:    <span class="comment">/* cFtc1 */</span>
-<a name="l01273"></a>01273                         usFtc1 = usGetWord(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l01274"></a>01274                         <span class="keywordflow">break</span>;
-<a name="l01275"></a>01275                 <span class="keywordflow">case</span> 0x4a51:    <span class="comment">/* cFtc2 */</span>
-<a name="l01276"></a>01276                         usFtc2 = usGetWord(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l01277"></a>01277                         <span class="keywordflow">break</span>;
-<a name="l01278"></a>01278                 <span class="keywordflow">case</span> 0xca47:    <span class="comment">/* cMajority */</span>
-<a name="l01279"></a>01279                         DBG_MSG(<span class="stringliteral">&quot;0xca47: sprmCMajority&quot;</span>);
-<a name="l01280"></a>01280                         <span class="keywordflow">break</span>;
-<a name="l01281"></a>01281                 <span class="keywordflow">case</span> 0xca4a:    <span class="comment">/* cHpsInc1 */</span>
-<a name="l01282"></a>01282                         usTmp = usGetWord(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l01283"></a>01283                         lTmp = (long)pFont-&gt;usFontSize + (<span class="keywordtype">long</span>)usTmp;
-<a name="l01284"></a>01284                         <span class="keywordflow">if</span> (lTmp &lt; 8) {
-<a name="l01285"></a>01285                                 pFont-&gt;usFontSize = 8;
-<a name="l01286"></a>01286                         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (lTmp &gt; 32766) {
-<a name="l01287"></a>01287                                 pFont-&gt;usFontSize = 32766;
-<a name="l01288"></a>01288                         } <span class="keywordflow">else</span> {
-<a name="l01289"></a>01289                                 pFont-&gt;usFontSize = (USHORT)lTmp;
-<a name="l01290"></a>01290                         }
-<a name="l01291"></a>01291                         <span class="keywordflow">break</span>;
-<a name="l01292"></a>01292                 <span class="keywordflow">case</span> 0xca4c:    <span class="comment">/* cMajority50 */</span>
-<a name="l01293"></a>01293                         DBG_MSG(<span class="stringliteral">&quot;0xca4c: sprmCMajority50&quot;</span>);
-<a name="l01294"></a>01294                         <span class="keywordflow">break</span>;
-<a name="l01295"></a>01295                 <span class="keywordflow">case</span> 0xea3f:    <span class="comment">/* cHps, cHpsPos */</span>
-<a name="l01296"></a>01296                         ucTmp = ucGetByte(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l01297"></a>01297                         DBG_DEC(ucTmp);
-<a name="l01298"></a>01298                         <span class="keywordflow">if</span> (ucTmp != 0) {
-<a name="l01299"></a>01299                                 pFont-&gt;usFontSize = (USHORT)ucTmp;
-<a name="l01300"></a>01300                         }
-<a name="l01301"></a>01301                         ucTmp = ucGetByte(iFodo + iFodoOff + 3, aucGrpprl);
-<a name="l01302"></a>01302                         DBG_DEC(ucTmp);
-<a name="l01303"></a>01303                         <span class="keywordflow">break</span>;
-<a name="l01304"></a>01304                 <span class="keywordflow">default</span>:
-<a name="l01305"></a>01305                         <span class="keywordflow">break</span>;
-<a name="l01306"></a>01306                 }
-<a name="l01307"></a>01307                 iInfoLen = iGet8InfoLength(iFodo + iFodoOff, aucGrpprl);
-<a name="l01308"></a>01308                 fail(iInfoLen &lt;= 0);
-<a name="l01309"></a>01309                 iFodoOff += iInfoLen;
-<a name="l01310"></a>01310         }
-<a name="l01311"></a>01311 
-<a name="l01312"></a>01312         <span class="comment">/* Combine the Ftc&#39;s to a FontNumber */</span>
-<a name="l01313"></a>01313         NO_DBG_DEC_C(usFtc0 != USHRT_MAX, usFtc0);
-<a name="l01314"></a>01314         NO_DBG_DEC_C(usFtc2 != USHRT_MAX, usFtc2);
-<a name="l01315"></a>01315         NO_DBG_DEC_C(usFtc1 != USHRT_MAX, usFtc1);
-<a name="l01316"></a>01316         <span class="keywordflow">if</span> (usFtc0 &lt;= 0x7fff) {
-<a name="l01317"></a>01317                 <span class="keywordflow">if</span> (usFtc0 &lt;= (USHORT)UCHAR_MAX) {
-<a name="l01318"></a>01318                         pFont-&gt;ucFontNumber = (UCHAR)usFtc0;
-<a name="l01319"></a>01319                 } <span class="keywordflow">else</span> {
-<a name="l01320"></a>01320                         DBG_DEC(usFtc0);
-<a name="l01321"></a>01321                         DBG_FIXME();
-<a name="l01322"></a>01322                         pFont-&gt;ucFontNumber = 0;
-<a name="l01323"></a>01323                 }
-<a name="l01324"></a>01324         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (usFtc2 &lt;= 0x7fff) {
-<a name="l01325"></a>01325                 <span class="keywordflow">if</span> (usFtc2 &lt;= (USHORT)UCHAR_MAX) {
-<a name="l01326"></a>01326                         pFont-&gt;ucFontNumber = (UCHAR)usFtc2;
-<a name="l01327"></a>01327                 } <span class="keywordflow">else</span> {
-<a name="l01328"></a>01328                         DBG_DEC(usFtc2);
-<a name="l01329"></a>01329                         DBG_FIXME();
-<a name="l01330"></a>01330                         pFont-&gt;ucFontNumber = 0;
-<a name="l01331"></a>01331                 }
-<a name="l01332"></a>01332         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (usFtc1 &lt;= 0x7fff) {
-<a name="l01333"></a>01333                 <span class="keywordflow">if</span> (usFtc1 &lt;= (USHORT)UCHAR_MAX) {
-<a name="l01334"></a>01334                         pFont-&gt;ucFontNumber = (UCHAR)usFtc1;
-<a name="l01335"></a>01335                 } <span class="keywordflow">else</span> {
-<a name="l01336"></a>01336                         DBG_DEC(usFtc1);
-<a name="l01337"></a>01337                         DBG_FIXME();
-<a name="l01338"></a>01338                         pFont-&gt;ucFontNumber = 0;
-<a name="l01339"></a>01339                 }
-<a name="l01340"></a>01340         }
-<a name="l01341"></a>01341 } <span class="comment">/* end of vGet8FontInfo */</span>
-<a name="l01342"></a>01342 
-<a name="l01343"></a>01343 <span class="comment">/*</span>
-<a name="l01344"></a>01344 <span class="comment"> * Fill the picture information block with information</span>
-<a name="l01345"></a>01345 <span class="comment"> * from a Word 8/9/10/11 file.</span>
-<a name="l01346"></a>01346 <span class="comment"> * Returns TRUE when successful, otherwise FALSE</span>
-<a name="l01347"></a>01347 <span class="comment"> */</span>
-<a name="l01348"></a>01348 <span class="keyword">static</span> BOOL
-<a name="l01349"></a>01349 bGet8PicInfo(<span class="keywordtype">int</span> iFodo,
-<a name="l01350"></a>01350         <span class="keyword">const</span> UCHAR *aucGrpprl, <span class="keywordtype">int</span> iBytes, picture_block_type *pPicture)
-<a name="l01351"></a>01351 {
-<a name="l01352"></a>01352         ULONG   ulTmp;
-<a name="l01353"></a>01353         <span class="keywordtype">int</span>     iFodoOff, iInfoLen;
-<a name="l01354"></a>01354         BOOL    bFound;
-<a name="l01355"></a>01355         UCHAR   ucTmp;
-<a name="l01356"></a>01356 
-<a name="l01357"></a>01357         fail(iFodo &lt;= 0 || aucGrpprl == NULL || pPicture == NULL);
-<a name="l01358"></a>01358 
-<a name="l01359"></a>01359         iFodoOff = 0;
-<a name="l01360"></a>01360         bFound = FALSE;
-<a name="l01361"></a>01361         <span class="keywordflow">while</span> (iBytes &gt;= iFodoOff + 2) {
-<a name="l01362"></a>01362                 <span class="keywordflow">switch</span> (usGetWord(iFodo + iFodoOff, aucGrpprl)) {
-<a name="l01363"></a>01363 <span class="preprocessor">#if 0</span>
-<a name="l01364"></a>01364 <span class="preprocessor"></span>                <span class="keywordflow">case</span> 0x0806:    <span class="comment">/* fData */</span>
-<a name="l01365"></a>01365                         ucTmp = ucGetByte(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l01366"></a>01366                         <span class="keywordflow">if</span> (ucTmp == 0x01) {
-<a name="l01367"></a>01367                                 <span class="comment">/* Not a picture, but a form field */</span>
-<a name="l01368"></a>01368                                 <span class="keywordflow">return</span> FALSE;
-<a name="l01369"></a>01369                         }
-<a name="l01370"></a>01370                         DBG_DEC_C(ucTmp != 0, ucTmp);
-<a name="l01371"></a>01371                         <span class="keywordflow">break</span>;
-<a name="l01372"></a>01372 <span class="preprocessor">#endif</span>
-<a name="l01373"></a>01373 <span class="preprocessor"></span>                <span class="keywordflow">case</span> 0x080a:    <span class="comment">/* fOle2 */</span>
-<a name="l01374"></a>01374                         ucTmp = ucGetByte(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l01375"></a>01375                         <span class="keywordflow">if</span> (ucTmp == 0x01) {
-<a name="l01376"></a>01376                                 <span class="comment">/* Not a picture, but an OLE object */</span>
-<a name="l01377"></a>01377                                 <span class="keywordflow">return</span> FALSE;
-<a name="l01378"></a>01378                         }
-<a name="l01379"></a>01379                         DBG_DEC_C(ucTmp != 0, ucTmp);
-<a name="l01380"></a>01380                         <span class="keywordflow">break</span>;
-<a name="l01381"></a>01381                 <span class="keywordflow">case</span> 0x680e:    <span class="comment">/* fcObj */</span>
-<a name="l01382"></a>01382                         ulTmp = ulGetLong(iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l01383"></a>01383                         DBG_HEX(ulTmp);
-<a name="l01384"></a>01384                         <span class="keywordflow">break</span>;
-<a name="l01385"></a>01385                 <span class="keywordflow">case</span> 0x6a03:    <span class="comment">/* fcPic */</span>
-<a name="l01386"></a>01386                         pPicture-&gt;ulPictureOffset = ulGetLong(
-<a name="l01387"></a>01387                                         iFodo + iFodoOff + 2, aucGrpprl);
-<a name="l01388"></a>01388                         bFound = TRUE;
-<a name="l01389"></a>01389                         <span class="keywordflow">break</span>;
-<a name="l01390"></a>01390                 <span class="keywordflow">default</span>:
-<a name="l01391"></a>01391                         <span class="keywordflow">break</span>;
-<a name="l01392"></a>01392                 }
-<a name="l01393"></a>01393                 iInfoLen = iGet8InfoLength(iFodo + iFodoOff, aucGrpprl);
-<a name="l01394"></a>01394                 fail(iInfoLen &lt;= 0);
-<a name="l01395"></a>01395                 iFodoOff += iInfoLen;
-<a name="l01396"></a>01396         }
-<a name="l01397"></a>01397         <span class="keywordflow">return</span> bFound;
-<a name="l01398"></a>01398 } <span class="comment">/* end of bGet8PicInfo */</span>
-<a name="l01399"></a>01399 
-<a name="l01400"></a>01400 <span class="comment">/*</span>
-<a name="l01401"></a>01401 <span class="comment"> * Build the lists with Character Information for Word 8/9/10/11 files</span>
-<a name="l01402"></a>01402 <span class="comment"> */</span>
-<a name="l01403"></a>01403 <span class="keywordtype">void</span>
-<a name="l01404"></a>01404 vGet8ChrInfo(FILE *pFile, <span class="keyword">const</span> pps_info_type *pPPS,
-<a name="l01405"></a>01405         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l01406"></a>01406         <span class="keyword">const</span> ULONG *aulSBD, <span class="keywordtype">size_t</span> tSBDLen,
-<a name="l01407"></a>01407         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l01408"></a>01408 {
-<a name="l01409"></a>01409         font_block_type         tFont;
-<a name="l01410"></a>01410         picture_block_type      tPicture;
-<a name="l01411"></a>01411         ULONG           *aulCharPage;
-<a name="l01412"></a>01412         UCHAR   *aucBuffer;
-<a name="l01413"></a>01413         ULONG   ulFileOffset, ulCharPos, ulBeginCharInfo;
-<a name="l01414"></a>01414         <span class="keywordtype">size_t</span>  tCharInfoLen, tOffset, tLen;
-<a name="l01415"></a>01415         <span class="keywordtype">int</span>     iIndex, iIndex2, iRun, iFodo, iLen;
-<a name="l01416"></a>01416         USHORT  usIstd;
-<a name="l01417"></a>01417         UCHAR   aucFpage[BIG_BLOCK_SIZE];
-<a name="l01418"></a>01418 
-<a name="l01419"></a>01419         fail(pFile == NULL || pPPS == NULL || aucHeader == NULL);
-<a name="l01420"></a>01420         fail(aulBBD == NULL || aulSBD == NULL);
-<a name="l01421"></a>01421 
-<a name="l01422"></a>01422         ulBeginCharInfo = ulGetLong(0xfa, aucHeader); <span class="comment">/* fcPlcfbteChpx */</span>
-<a name="l01423"></a>01423         NO_DBG_HEX(ulBeginCharInfo);
-<a name="l01424"></a>01424         tCharInfoLen = (size_t)ulGetLong(0xfe, aucHeader); <span class="comment">/* lcbPlcfbteChpx */</span>
-<a name="l01425"></a>01425         NO_DBG_DEC(tCharInfoLen);
-<a name="l01426"></a>01426         <span class="keywordflow">if</span> (tCharInfoLen &lt; 4) {
-<a name="l01427"></a>01427                 DBG_DEC(tCharInfoLen);
-<a name="l01428"></a>01428                 <span class="keywordflow">return</span>;
-<a name="l01429"></a>01429         }
-<a name="l01430"></a>01430 
-<a name="l01431"></a>01431         aucBuffer = aucFillInfoBuffer(pFile, &amp;pPPS-&gt;tTable,
-<a name="l01432"></a>01432                         aulBBD, tBBDLen, aulSBD, tSBDLen,
-<a name="l01433"></a>01433                         ulBeginCharInfo, tCharInfoLen);
-<a name="l01434"></a>01434         <span class="keywordflow">if</span> (aucBuffer == NULL) {
-<a name="l01435"></a>01435                 <span class="keywordflow">return</span>;
-<a name="l01436"></a>01436         }
-<a name="l01437"></a>01437         NO_DBG_PRINT_BLOCK(aucBuffer, tCharInfoLen);
-<a name="l01438"></a>01438 
-<a name="l01439"></a>01439         tLen = (tCharInfoLen / 4 - 1) / 2;
-<a name="l01440"></a>01440         aulCharPage = xcalloc(tLen, <span class="keyword">sizeof</span>(ULONG));
-<a name="l01441"></a>01441         <span class="keywordflow">for</span> (iIndex = 0, tOffset = (tLen + 1) * 4;
-<a name="l01442"></a>01442              iIndex &lt; (int)tLen;
-<a name="l01443"></a>01443              iIndex++, tOffset += 4) {
-<a name="l01444"></a>01444                  aulCharPage[iIndex] = ulGetLong(tOffset, aucBuffer);
-<a name="l01445"></a>01445                  NO_DBG_DEC(aulCharPage[iIndex]);
-<a name="l01446"></a>01446         }
-<a name="l01447"></a>01447         DBG_HEX(ulGetLong(0, aucBuffer));
-<a name="l01448"></a>01448         aucBuffer = xfree(aucBuffer);
-<a name="l01449"></a>01449         NO_DBG_PRINT_BLOCK(aucHeader, HEADER_SIZE);
-<a name="l01450"></a>01450 
-<a name="l01451"></a>01451         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; (int)tLen; iIndex++) {
-<a name="l01452"></a>01452                 fail(aulCharPage[iIndex] &gt; ULONG_MAX / BIG_BLOCK_SIZE);
-<a name="l01453"></a>01453                 <span class="keywordflow">if</span> (!bReadBuffer(pFile, pPPS-&gt;tWordDocument.ulSB,
-<a name="l01454"></a>01454                                 aulBBD, tBBDLen, BIG_BLOCK_SIZE,
-<a name="l01455"></a>01455                                 aucFpage,
-<a name="l01456"></a>01456                                 aulCharPage[iIndex] * BIG_BLOCK_SIZE,
-<a name="l01457"></a>01457                                 BIG_BLOCK_SIZE)) {
-<a name="l01458"></a>01458                         <span class="keywordflow">break</span>;
-<a name="l01459"></a>01459                 }
-<a name="l01460"></a>01460                 NO_DBG_PRINT_BLOCK(aucFpage, BIG_BLOCK_SIZE);
-<a name="l01461"></a>01461                 iRun = (int)ucGetByte(0x1ff, aucFpage);
-<a name="l01462"></a>01462                 NO_DBG_DEC(iRun);
-<a name="l01463"></a>01463                 <span class="keywordflow">for</span> (iIndex2 = 0; iIndex2 &lt; iRun; iIndex2++) {
-<a name="l01464"></a>01464                         ulCharPos = ulGetLong(iIndex2 * 4, aucFpage);
-<a name="l01465"></a>01465                         ulFileOffset = ulCharPos2FileOffset(ulCharPos);
-<a name="l01466"></a>01466                         iFodo = 2 * (int)ucGetByte(
-<a name="l01467"></a>01467                                 (iRun + 1) * 4 + iIndex2, aucFpage);
-<a name="l01468"></a>01468 
-<a name="l01469"></a>01469                         iLen = (int)ucGetByte(iFodo, aucFpage);
-<a name="l01470"></a>01470 
-<a name="l01471"></a>01471                         usIstd = usGetIstd(ulFileOffset);
-<a name="l01472"></a>01472                         vFillFontFromStylesheet(usIstd, &amp;tFont);
-<a name="l01473"></a>01473                         <span class="keywordflow">if</span> (iFodo != 0) {
-<a name="l01474"></a>01474                                 vGet8FontInfo(iFodo, usIstd,
-<a name="l01475"></a>01475                                         aucFpage + 1, iLen - 1, &amp;tFont);
-<a name="l01476"></a>01476                         }
-<a name="l01477"></a>01477                         tFont.ulFileOffset = ulFileOffset;
-<a name="l01478"></a>01478                         vAdd2FontInfoList(&amp;tFont);
-<a name="l01479"></a>01479 
-<a name="l01480"></a>01480                         <span class="keywordflow">if</span> (iFodo &lt;= 0) {
-<a name="l01481"></a>01481                                 <span class="keywordflow">continue</span>;
-<a name="l01482"></a>01482                         }
-<a name="l01483"></a>01483 
-<a name="l01484"></a>01484                         (void)memset(&amp;tPicture, 0, <span class="keyword">sizeof</span>(tPicture));
-<a name="l01485"></a>01485                         <span class="keywordflow">if</span> (bGet8PicInfo(iFodo, aucFpage + 1,
-<a name="l01486"></a>01486                                                 iLen - 1, &amp;tPicture)) {
-<a name="l01487"></a>01487                                 tPicture.ulFileOffset = ulFileOffset;
-<a name="l01488"></a>01488                                 tPicture.ulFileOffsetPicture =
-<a name="l01489"></a>01489                                         ulDataPos2FileOffset(
-<a name="l01490"></a>01490                                                 tPicture.ulPictureOffset);
-<a name="l01491"></a>01491                                 vAdd2PictInfoList(&amp;tPicture);
-<a name="l01492"></a>01492                         }
-<a name="l01493"></a>01493                 }
-<a name="l01494"></a>01494         }
-<a name="l01495"></a>01495         aulCharPage = xfree(aulCharPage);
-<a name="l01496"></a>01496 } <span class="comment">/* end of vGet8ChrInfo */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/properties_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,214 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/properties.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/properties.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * properties.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2005 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Read the properties information from a MS Word file</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 
-<a name="l00014"></a>00014 <span class="comment">/*</span>
-<a name="l00015"></a>00015 <span class="comment"> * Build the lists with Property Information</span>
-<a name="l00016"></a>00016 <span class="comment"> */</span>
-<a name="l00017"></a>00017 <span class="keywordtype">void</span>
-<a name="l00018"></a>00018 vGetPropertyInfo(FILE *pFile, <span class="keyword">const</span> pps_info_type *pPPS,
-<a name="l00019"></a>00019         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00020"></a>00020         <span class="keyword">const</span> ULONG *aulSBD, <span class="keywordtype">size_t</span> tSBDLen,
-<a name="l00021"></a>00021         <span class="keyword">const</span> UCHAR *aucHeader, <span class="keywordtype">int</span> iWordVersion)
-<a name="l00022"></a>00022 {
-<a name="l00023"></a>00023         options_type    tOptions;
-<a name="l00024"></a>00024 
-<a name="l00025"></a>00025         TRACE_MSG(<span class="stringliteral">&quot;vGetPropertyInfo&quot;</span>);
-<a name="l00026"></a>00026 
-<a name="l00027"></a>00027         fail(pFile == NULL);
-<a name="l00028"></a>00028         fail(pPPS == NULL &amp;&amp; iWordVersion &gt;= 6);
-<a name="l00029"></a>00029         fail(aulBBD == NULL &amp;&amp; tBBDLen != 0);
-<a name="l00030"></a>00030         fail(aulSBD == NULL &amp;&amp; tSBDLen != 0);
-<a name="l00031"></a>00031         fail(aucHeader == NULL);
-<a name="l00032"></a>00032 
-<a name="l00033"></a>00033         <span class="comment">/* Get the options */</span>
-<a name="l00034"></a>00034         vGetOptions(&amp;tOptions);
-<a name="l00035"></a>00035 
-<a name="l00036"></a>00036         <span class="comment">/* Get the property information per Word version */</span>
-<a name="l00037"></a>00037         <span class="keywordflow">switch</span> (iWordVersion) {
-<a name="l00038"></a>00038         <span class="keywordflow">case</span> 0:
-<a name="l00039"></a>00039                 vGet0DopInfo(pFile, aucHeader);
-<a name="l00040"></a>00040                 vGet0SepInfo(pFile, aucHeader);
-<a name="l00041"></a>00041                 vGet0PapInfo(pFile, aucHeader);
-<a name="l00042"></a>00042                 <span class="keywordflow">if</span> (tOptions.eConversionType == conversion_draw ||
-<a name="l00043"></a>00043                     tOptions.eConversionType == conversion_ps ||
-<a name="l00044"></a>00044                     tOptions.eConversionType == conversion_xml ||
-<a name="l00045"></a>00045                     tOptions.eConversionType == conversion_fmt_text ||
-<a name="l00046"></a>00046                     tOptions.eConversionType == conversion_pdf) {
-<a name="l00047"></a>00047                         vGet0ChrInfo(pFile, aucHeader);
-<a name="l00048"></a>00048                 }
-<a name="l00049"></a>00049                 <span class="keywordflow">if</span> (tOptions.eConversionType == conversion_draw ||
-<a name="l00050"></a>00050                     tOptions.eConversionType == conversion_ps ||
-<a name="l00051"></a>00051                     tOptions.eConversionType == conversion_pdf) {
-<a name="l00052"></a>00052                         vCreate0FontTable();
-<a name="l00053"></a>00053                 }
-<a name="l00054"></a>00054                 vSet0SummaryInfo(pFile, aucHeader);
-<a name="l00055"></a>00055                 <span class="keywordflow">break</span>;
-<a name="l00056"></a>00056         <span class="keywordflow">case</span> 1:
-<a name="l00057"></a>00057         <span class="keywordflow">case</span> 2:
-<a name="l00058"></a>00058                 vGet2Stylesheet(pFile, iWordVersion, aucHeader);
-<a name="l00059"></a>00059                 vGet2DopInfo(pFile, aucHeader);
-<a name="l00060"></a>00060                 vGet2SepInfo(pFile, aucHeader);
-<a name="l00061"></a>00061                 vGet2PapInfo(pFile, aucHeader);
-<a name="l00062"></a>00062                 <span class="keywordflow">if</span> (tOptions.eConversionType == conversion_ps ||
-<a name="l00063"></a>00063                     tOptions.eConversionType == conversion_pdf) {
-<a name="l00064"></a>00064                         vGet2HdrFtrInfo(pFile, aucHeader);
-<a name="l00065"></a>00065                 }
-<a name="l00066"></a>00066                 <span class="keywordflow">if</span> (tOptions.eConversionType == conversion_draw ||
-<a name="l00067"></a>00067                     tOptions.eConversionType == conversion_ps ||
-<a name="l00068"></a>00068                     tOptions.eConversionType == conversion_xml ||
-<a name="l00069"></a>00069                     tOptions.eConversionType == conversion_fmt_text ||
-<a name="l00070"></a>00070                     tOptions.eConversionType == conversion_pdf) {
-<a name="l00071"></a>00071                         vGet2ChrInfo(pFile, iWordVersion, aucHeader);
-<a name="l00072"></a>00072                 }
-<a name="l00073"></a>00073                 <span class="keywordflow">if</span> (tOptions.eConversionType == conversion_draw ||
-<a name="l00074"></a>00074                     tOptions.eConversionType == conversion_ps ||
-<a name="l00075"></a>00075                     tOptions.eConversionType == conversion_pdf) {
-<a name="l00076"></a>00076                         vCreate2FontTable(pFile, iWordVersion, aucHeader);
-<a name="l00077"></a>00077                 }
-<a name="l00078"></a>00078                 vSet2SummaryInfo(pFile, iWordVersion, aucHeader);
-<a name="l00079"></a>00079                 <span class="keywordflow">break</span>;
-<a name="l00080"></a>00080         <span class="keywordflow">case</span> 4:
-<a name="l00081"></a>00081         <span class="keywordflow">case</span> 5:
-<a name="l00082"></a>00082                 <span class="keywordflow">break</span>;
-<a name="l00083"></a>00083         <span class="keywordflow">case</span> 6:
-<a name="l00084"></a>00084         <span class="keywordflow">case</span> 7:
-<a name="l00085"></a>00085                 vGet6Stylesheet(pFile, pPPS-&gt;tWordDocument.ulSB,
-<a name="l00086"></a>00086                         aulBBD, tBBDLen, aucHeader);
-<a name="l00087"></a>00087                 vGet6DopInfo(pFile, pPPS-&gt;tWordDocument.ulSB,
-<a name="l00088"></a>00088                         aulBBD, tBBDLen, aucHeader);
-<a name="l00089"></a>00089                 vGet6SepInfo(pFile, pPPS-&gt;tWordDocument.ulSB,
-<a name="l00090"></a>00090                         aulBBD, tBBDLen, aucHeader);
-<a name="l00091"></a>00091                 vGet6PapInfo(pFile, pPPS-&gt;tWordDocument.ulSB,
-<a name="l00092"></a>00092                         aulBBD, tBBDLen, aucHeader);
-<a name="l00093"></a>00093                 <span class="keywordflow">if</span> (tOptions.eConversionType == conversion_ps ||
-<a name="l00094"></a>00094                     tOptions.eConversionType == conversion_pdf) {
-<a name="l00095"></a>00095                         vGet6HdrFtrInfo(pFile, pPPS-&gt;tWordDocument.ulSB,
-<a name="l00096"></a>00096                                 aulBBD, tBBDLen, aucHeader);
-<a name="l00097"></a>00097                 }
-<a name="l00098"></a>00098                 <span class="keywordflow">if</span> (tOptions.eConversionType == conversion_draw ||
-<a name="l00099"></a>00099                     tOptions.eConversionType == conversion_ps ||
-<a name="l00100"></a>00100                     tOptions.eConversionType == conversion_xml ||
-<a name="l00101"></a>00101                     tOptions.eConversionType == conversion_fmt_text ||
-<a name="l00102"></a>00102                     tOptions.eConversionType == conversion_pdf) {
-<a name="l00103"></a>00103                         vGet6ChrInfo(pFile, pPPS-&gt;tWordDocument.ulSB,
-<a name="l00104"></a>00104                                 aulBBD, tBBDLen, aucHeader);
-<a name="l00105"></a>00105                 }
-<a name="l00106"></a>00106                 <span class="keywordflow">if</span> (tOptions.eConversionType == conversion_draw ||
-<a name="l00107"></a>00107                     tOptions.eConversionType == conversion_ps ||
-<a name="l00108"></a>00108                     tOptions.eConversionType == conversion_pdf) {
-<a name="l00109"></a>00109                         vCreate6FontTable(pFile, pPPS-&gt;tWordDocument.ulSB,
-<a name="l00110"></a>00110                                 aulBBD, tBBDLen, aucHeader);
-<a name="l00111"></a>00111                 }
-<a name="l00112"></a>00112                 vSet6SummaryInfo(pFile, pPPS,
-<a name="l00113"></a>00113                         aulBBD, tBBDLen, aulSBD, tSBDLen, aucHeader);
-<a name="l00114"></a>00114                 <span class="keywordflow">break</span>;
-<a name="l00115"></a>00115         <span class="keywordflow">case</span> 8:
-<a name="l00116"></a>00116                 vGet8LstInfo(pFile, pPPS,
-<a name="l00117"></a>00117                         aulBBD, tBBDLen, aulSBD, tSBDLen, aucHeader);
-<a name="l00118"></a>00118                 vGet8Stylesheet(pFile, pPPS,
-<a name="l00119"></a>00119                         aulBBD, tBBDLen, aulSBD, tSBDLen, aucHeader);
-<a name="l00120"></a>00120                 vGet8DopInfo(pFile, &amp;pPPS-&gt;tTable,
-<a name="l00121"></a>00121                         aulBBD, tBBDLen, aulSBD, tSBDLen, aucHeader);
-<a name="l00122"></a>00122                 vGet8SepInfo(pFile, pPPS,
-<a name="l00123"></a>00123                         aulBBD, tBBDLen, aulSBD, tSBDLen, aucHeader);
-<a name="l00124"></a>00124                 vGet8PapInfo(pFile, pPPS,
-<a name="l00125"></a>00125                         aulBBD, tBBDLen, aulSBD, tSBDLen, aucHeader);
-<a name="l00126"></a>00126                 <span class="keywordflow">if</span> (tOptions.eConversionType == conversion_ps ||
-<a name="l00127"></a>00127                     tOptions.eConversionType == conversion_pdf) {
-<a name="l00128"></a>00128                         vGet8HdrFtrInfo(pFile, &amp;pPPS-&gt;tTable,
-<a name="l00129"></a>00129                                 aulBBD, tBBDLen, aulSBD, tSBDLen, aucHeader);
-<a name="l00130"></a>00130                 }
-<a name="l00131"></a>00131                 <span class="keywordflow">if</span> (tOptions.eConversionType == conversion_draw ||
-<a name="l00132"></a>00132                     tOptions.eConversionType == conversion_ps ||
-<a name="l00133"></a>00133                     tOptions.eConversionType == conversion_xml ||
-<a name="l00134"></a>00134                     tOptions.eConversionType == conversion_fmt_text ||
-<a name="l00135"></a>00135                     tOptions.eConversionType == conversion_pdf) {
-<a name="l00136"></a>00136                         vGet8ChrInfo(pFile, pPPS,
-<a name="l00137"></a>00137                                 aulBBD, tBBDLen, aulSBD, tSBDLen, aucHeader);
-<a name="l00138"></a>00138                 }
-<a name="l00139"></a>00139                 <span class="keywordflow">if</span> (tOptions.eConversionType == conversion_draw ||
-<a name="l00140"></a>00140                     tOptions.eConversionType == conversion_ps ||
-<a name="l00141"></a>00141                     tOptions.eConversionType == conversion_pdf) {
-<a name="l00142"></a>00142                         vCreate8FontTable(pFile, pPPS,
-<a name="l00143"></a>00143                                 aulBBD, tBBDLen, aulSBD, tSBDLen, aucHeader);
-<a name="l00144"></a>00144                 }
-<a name="l00145"></a>00145                 vSet8SummaryInfo(pFile, pPPS,
-<a name="l00146"></a>00146                         aulBBD, tBBDLen, aulSBD, tSBDLen, aucHeader);
-<a name="l00147"></a>00147                 <span class="keywordflow">break</span>;
-<a name="l00148"></a>00148         <span class="keywordflow">default</span>:
-<a name="l00149"></a>00149                 DBG_DEC(iWordVersion);
-<a name="l00150"></a>00150                 DBG_FIXME();
-<a name="l00151"></a>00151                 werr(0, <span class="stringliteral">&quot;Sorry, no property information&quot;</span>);
-<a name="l00152"></a>00152                 <span class="keywordflow">break</span>;
-<a name="l00153"></a>00153         }
-<a name="l00154"></a>00154 
-<a name="l00155"></a>00155         <span class="comment">/* Temporarily: Correct the font table */</span>
-<a name="l00156"></a>00156         vCorrectFontTable(tOptions.eConversionType, tOptions.eEncoding);
-<a name="l00157"></a>00157 } <span class="comment">/* end of vGetPropertyInfo */</span>
-<a name="l00158"></a>00158 
-<a name="l00159"></a>00159 <span class="comment">/*</span>
-<a name="l00160"></a>00160 <span class="comment"> * ePropMod2RowInfo - Turn the Property Modifier into row information</span>
-<a name="l00161"></a>00161 <span class="comment"> *</span>
-<a name="l00162"></a>00162 <span class="comment"> * Returns: the row information</span>
-<a name="l00163"></a>00163 <span class="comment"> */</span>
-<a name="l00164"></a>00164 row_info_enum
-<a name="l00165"></a>00165 ePropMod2RowInfo(USHORT usPropMod, <span class="keywordtype">int</span> iWordVersion)
-<a name="l00166"></a>00166 {
-<a name="l00167"></a>00167         row_block_type  tRow;
-<a name="l00168"></a>00168         <span class="keyword">const</span> UCHAR     *aucPropMod;
-<a name="l00169"></a>00169         <span class="keywordtype">int</span>     iLen;
-<a name="l00170"></a>00170 
-<a name="l00171"></a>00171         TRACE_MSG(<span class="stringliteral">&quot;ePropMod2RowInfo&quot;</span>);
-<a name="l00172"></a>00172 
-<a name="l00173"></a>00173         aucPropMod = aucReadPropModListItem(usPropMod);
-<a name="l00174"></a>00174         <span class="keywordflow">if</span> (aucPropMod == NULL) {
-<a name="l00175"></a>00175                 <span class="keywordflow">return</span> found_nothing;
-<a name="l00176"></a>00176         }
-<a name="l00177"></a>00177         iLen = (int)usGetWord(0, aucPropMod);
-<a name="l00178"></a>00178 
-<a name="l00179"></a>00179         <span class="keywordflow">switch</span> (iWordVersion) {
-<a name="l00180"></a>00180         <span class="keywordflow">case</span> 0:
-<a name="l00181"></a>00181                 <span class="keywordflow">return</span> found_nothing;
-<a name="l00182"></a>00182         <span class="keywordflow">case</span> 1:
-<a name="l00183"></a>00183         <span class="keywordflow">case</span> 2:
-<a name="l00184"></a>00184                 <span class="keywordflow">return</span> eGet2RowInfo(0, aucPropMod + 2, iLen, &amp;tRow);
-<a name="l00185"></a>00185         <span class="keywordflow">case</span> 4:
-<a name="l00186"></a>00186         <span class="keywordflow">case</span> 5:
-<a name="l00187"></a>00187                 <span class="keywordflow">return</span> found_nothing;
-<a name="l00188"></a>00188         <span class="keywordflow">case</span> 6:
-<a name="l00189"></a>00189         <span class="keywordflow">case</span> 7:
-<a name="l00190"></a>00190                 <span class="keywordflow">return</span> eGet6RowInfo(0, aucPropMod + 2, iLen, &amp;tRow);
-<a name="l00191"></a>00191         <span class="keywordflow">case</span> 8:
-<a name="l00192"></a>00192                 <span class="keywordflow">return</span> eGet8RowInfo(0, aucPropMod + 2, iLen, &amp;tRow);
-<a name="l00193"></a>00193         <span class="keywordflow">default</span>:
-<a name="l00194"></a>00194                 DBG_DEC(iWordVersion);
-<a name="l00195"></a>00195                 DBG_FIXME();
-<a name="l00196"></a>00196                 <span class="keywordflow">return</span> found_nothing;
-<a name="l00197"></a>00197         }
-<a name="l00198"></a>00198 } <span class="comment">/* end of ePropMod2RowInfo */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/propmod_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/propmod.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/propmod.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * propmod.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2001-2003 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Build, read and destroy a list (array) of Word property modifiers</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define ELEMENTS_TO_ADD  3</span>
-<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#define ELEMENTS_TO_ADD 30</span>
-<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00018"></a>00018 
-<a name="l00019"></a>00019 <span class="comment">/* Variables needed to write the property modifier list */</span>
-<a name="l00020"></a>00020 <span class="keyword">static</span> UCHAR    **ppAnchor = NULL;
-<a name="l00021"></a>00021 <span class="keyword">static</span> <span class="keywordtype">size_t</span>   tNextFree = 0;
-<a name="l00022"></a>00022 <span class="keyword">static</span> <span class="keywordtype">size_t</span>   tMaxElements = 0;
-<a name="l00023"></a>00023 
-<a name="l00024"></a>00024 
-<a name="l00025"></a>00025 <span class="comment">/*</span>
-<a name="l00026"></a>00026 <span class="comment"> * vDestroyPropModList - destroy the property modifier list</span>
-<a name="l00027"></a>00027 <span class="comment"> */</span>
-<a name="l00028"></a>00028 <span class="keywordtype">void</span>
-<a name="l00029"></a>00029 vDestroyPropModList(<span class="keywordtype">void</span>)
-<a name="l00030"></a>00030 {
-<a name="l00031"></a>00031         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00032"></a>00032 
-<a name="l00033"></a>00033         DBG_MSG(<span class="stringliteral">&quot;vDestroyPropModList&quot;</span>);
-<a name="l00034"></a>00034 
-<a name="l00035"></a>00035         <span class="comment">/* Free all the elements of the list */</span>
-<a name="l00036"></a>00036         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tNextFree; tIndex++) {
-<a name="l00037"></a>00037                 ppAnchor[tIndex] = xfree(ppAnchor[tIndex]);
-<a name="l00038"></a>00038         }
-<a name="l00039"></a>00039         <span class="comment">/* Free the list itself */</span>
-<a name="l00040"></a>00040         ppAnchor = xfree(ppAnchor);
-<a name="l00041"></a>00041         <span class="comment">/* Reset all control variables */</span>
-<a name="l00042"></a>00042         tNextFree = 0;
-<a name="l00043"></a>00043         tMaxElements = 0;
-<a name="l00044"></a>00044 } <span class="comment">/* end of vDestroyPropModList */</span>
-<a name="l00045"></a>00045 
-<a name="l00046"></a>00046 <span class="comment">/*</span>
-<a name="l00047"></a>00047 <span class="comment"> * vAdd2PropModList - add an element to the property modifier list</span>
-<a name="l00048"></a>00048 <span class="comment"> */</span>
-<a name="l00049"></a>00049 <span class="keywordtype">void</span>
-<a name="l00050"></a>00050 vAdd2PropModList(<span class="keyword">const</span> UCHAR *aucPropMod)
-<a name="l00051"></a>00051 {
-<a name="l00052"></a>00052         <span class="keywordtype">size_t</span>  tSize, tLen;
-<a name="l00053"></a>00053 
-<a name="l00054"></a>00054         fail(aucPropMod == NULL);
-<a name="l00055"></a>00055 
-<a name="l00056"></a>00056         NO_DBG_MSG(<span class="stringliteral">&quot;vAdd2PropModList&quot;</span>);
-<a name="l00057"></a>00057 
-<a name="l00058"></a>00058         <span class="keywordflow">if</span> (tNextFree &gt;= tMaxElements) {
-<a name="l00059"></a>00059                 tMaxElements += ELEMENTS_TO_ADD;
-<a name="l00060"></a>00060                 tSize = tMaxElements * <span class="keyword">sizeof</span>(UCHAR **);
-<a name="l00061"></a>00061                 ppAnchor = xrealloc(ppAnchor, tSize);
-<a name="l00062"></a>00062         }
-<a name="l00063"></a>00063         NO_DBG_DEC(tNextFree);
-<a name="l00064"></a>00064 
-<a name="l00065"></a>00065         tLen = 2 + (size_t)usGetWord(0, aucPropMod);
-<a name="l00066"></a>00066         NO_DBG_HEX(tLen);
-<a name="l00067"></a>00067         NO_DBG_PRINT_BLOCK(pucPropMod, tLen);
-<a name="l00068"></a>00068         ppAnchor[tNextFree] = xmalloc(tLen);
-<a name="l00069"></a>00069         memcpy(ppAnchor[tNextFree], aucPropMod, tLen);
-<a name="l00070"></a>00070         tNextFree++;
-<a name="l00071"></a>00071 } <span class="comment">/* end of vAdd2PropModList */</span>
-<a name="l00072"></a>00072 
-<a name="l00073"></a>00073 <span class="comment">/*</span>
-<a name="l00074"></a>00074 <span class="comment"> * aucReadPropModListItem - get an item of the property modifier list</span>
-<a name="l00075"></a>00075 <span class="comment"> */</span>
-<a name="l00076"></a>00076 <span class="keyword">const</span> UCHAR *
-<a name="l00077"></a>00077 aucReadPropModListItem(USHORT usPropMod)
-<a name="l00078"></a>00078 {
-<a name="l00079"></a>00079         <span class="keyword">static</span> UCHAR    aucBuffer[4];
-<a name="l00080"></a>00080         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00081"></a>00081 
-<a name="l00082"></a>00082         <span class="keywordflow">if</span> (usPropMod == IGNORE_PROPMOD) {
-<a name="l00083"></a>00083                 <span class="comment">/* This Properties Modifier must be ignored */</span>
-<a name="l00084"></a>00084                 <span class="keywordflow">return</span> NULL;
-<a name="l00085"></a>00085         }
-<a name="l00086"></a>00086 
-<a name="l00087"></a>00087         <span class="keywordflow">if</span> (!odd(usPropMod)) {
-<a name="l00088"></a>00088                 <span class="comment">/* Variant 1: The information is in the input ifself */</span>
-<a name="l00089"></a>00089                 aucBuffer[0] = 2;
-<a name="l00090"></a>00090                 aucBuffer[1] = 0;
-<a name="l00091"></a>00091                 aucBuffer[2] = (UCHAR)((usPropMod &amp; 0x00fe) &gt;&gt; 1);
-<a name="l00092"></a>00092                 aucBuffer[3] = (UCHAR)((usPropMod &amp; 0xff00) &gt;&gt; 8);
-<a name="l00093"></a>00093                 <span class="keywordflow">return</span> aucBuffer;
-<a name="l00094"></a>00094         }
-<a name="l00095"></a>00095 
-<a name="l00096"></a>00096         <span class="keywordflow">if</span> (ppAnchor == NULL) {
-<a name="l00097"></a>00097                 <span class="comment">/* No information available */</span>
-<a name="l00098"></a>00098                 <span class="keywordflow">return</span> NULL;
-<a name="l00099"></a>00099         }
-<a name="l00100"></a>00100 
-<a name="l00101"></a>00101         <span class="comment">/* Variant 2: The input contains an index */</span>
-<a name="l00102"></a>00102         tIndex = (size_t)(usPropMod &gt;&gt; 1);
-<a name="l00103"></a>00103         <span class="keywordflow">if</span> (tIndex &gt;= tNextFree) {
-<a name="l00104"></a>00104                 DBG_HEX(usPropMod);
-<a name="l00105"></a>00105                 DBG_DEC(tIndex);
-<a name="l00106"></a>00106                 DBG_DEC(tNextFree);
-<a name="l00107"></a>00107                 <span class="keywordflow">return</span> NULL;
-<a name="l00108"></a>00108         }
-<a name="l00109"></a>00109         <span class="keywordflow">return</span> ppAnchor[tIndex];
-<a name="l00110"></a>00110 } <span class="comment">/* end of aucGetPropModListItem */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/riscos_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,267 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/riscos.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/riscos.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * riscos.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2001,2002 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * RISC OS only functions</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;stdarg.h&gt;</span>
-<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;DeskLib:Error.h&quot;</span>
-<a name="l00013"></a>00013 <span class="preprocessor">#include &quot;DeskLib:SWI.h&quot;</span>
-<a name="l00014"></a>00014 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00015"></a>00015 
-<a name="l00016"></a>00016 <span class="preprocessor">#if !defined(DrawFile_Render)</span>
-<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#define DrawFile_Render         0x045540</span>
-<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* !DrawFile_Render */</span>
-<a name="l00019"></a>00019 <span class="preprocessor">#if !defined(JPEG_Info)</span>
-<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define JPEG_Info               0x049980</span>
-<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* !JPEG_Info */</span>
-<a name="l00022"></a>00022 
-<a name="l00023"></a>00023 <span class="comment">/*</span>
-<a name="l00024"></a>00024 <span class="comment"> * werr - write an error message and exit if needed</span>
-<a name="l00025"></a>00025 <span class="comment"> */</span>
-<a name="l00026"></a>00026 <span class="keywordtype">void</span>
-<a name="l00027"></a>00027 werr(<span class="keywordtype">int</span> iFatal, <span class="keyword">const</span> <span class="keywordtype">char</span> *szFormat, ...)
-<a name="l00028"></a>00028 {
-<a name="l00029"></a>00029         va_list tArg;
-<a name="l00030"></a>00030 
-<a name="l00031"></a>00031         va_start(tArg, szFormat);
-<a name="l00032"></a>00032         Error_Report(iFatal, (<span class="keywordtype">char</span> *)szFormat, tArg);
-<a name="l00033"></a>00033         va_end(tArg);
-<a name="l00034"></a>00034         <span class="keywordflow">switch</span> (iFatal) {
-<a name="l00035"></a>00035         <span class="keywordflow">case</span> 0:         <span class="comment">/* The message is just a warning, so no exit */</span>
-<a name="l00036"></a>00036                 <span class="keywordflow">return</span>;
-<a name="l00037"></a>00037         <span class="keywordflow">case</span> 1:         <span class="comment">/* Fatal error with a standard exit */</span>
-<a name="l00038"></a>00038                 exit(EXIT_FAILURE);
-<a name="l00039"></a>00039         <span class="keywordflow">default</span>:        <span class="comment">/* Fatal error with a non-standard exit */</span>
-<a name="l00040"></a>00040                 exit(iFatal);
-<a name="l00041"></a>00041         }
-<a name="l00042"></a>00042 } <span class="comment">/* end of werr */</span>
-<a name="l00043"></a>00043 
-<a name="l00044"></a>00044 <span class="comment">/*</span>
-<a name="l00045"></a>00045 <span class="comment"> * iGetFiletype</span>
-<a name="l00046"></a>00046 <span class="comment"> * This function will get the filetype of the given file.</span>
-<a name="l00047"></a>00047 <span class="comment"> * returns the filetype.</span>
-<a name="l00048"></a>00048 <span class="comment"> */</span>
-<a name="l00049"></a>00049 <span class="keywordtype">int</span>
-<a name="l00050"></a>00050 iGetFiletype(<span class="keyword">const</span> <span class="keywordtype">char</span> *szFilename)
-<a name="l00051"></a>00051 {
-<a name="l00052"></a>00052         os_error        *e;
-<a name="l00053"></a>00053         <span class="keywordtype">int</span>             iType;
-<a name="l00054"></a>00054 
-<a name="l00055"></a>00055         fail(szFilename == NULL || szFilename[0] == <span class="charliteral">&#39;\0&#39;</span>);
-<a name="l00056"></a>00056 
-<a name="l00057"></a>00057         e = SWI(2, 7, SWI_OS_File | XOS_Bit,
-<a name="l00058"></a>00058                 23, szFilename,
-<a name="l00059"></a>00059                 NULL, NULL, NULL, NULL, NULL, NULL, &amp;iType);
-<a name="l00060"></a>00060         <span class="keywordflow">if</span> (e == NULL) {
-<a name="l00061"></a>00061                 <span class="keywordflow">return</span> iType;
-<a name="l00062"></a>00062         }
-<a name="l00063"></a>00063         werr(0, <span class="stringliteral">&quot;Get Filetype error %d: %s&quot;</span>, e-&gt;errnum, e-&gt;errmess);
-<a name="l00064"></a>00064         <span class="keywordflow">return</span> -1;
-<a name="l00065"></a>00065 } <span class="comment">/* end of iGetFiletype */</span>
-<a name="l00066"></a>00066 
-<a name="l00067"></a>00067 <span class="comment">/*</span>
-<a name="l00068"></a>00068 <span class="comment"> * vSetFiletype</span>
-<a name="l00069"></a>00069 <span class="comment"> * This procedure will set the filetype of the given file to the given</span>
-<a name="l00070"></a>00070 <span class="comment"> * type.</span>
-<a name="l00071"></a>00071 <span class="comment"> */</span>
-<a name="l00072"></a>00072 <span class="keywordtype">void</span>
-<a name="l00073"></a>00073 vSetFiletype(<span class="keyword">const</span> <span class="keywordtype">char</span> *szFilename, <span class="keywordtype">int</span> iFiletype)
-<a name="l00074"></a>00074 {
-<a name="l00075"></a>00075         os_error        *e;
-<a name="l00076"></a>00076 
-<a name="l00077"></a>00077         fail(szFilename == NULL || szFilename[0] == <span class="charliteral">&#39;\0&#39;</span>);
-<a name="l00078"></a>00078 
-<a name="l00079"></a>00079         <span class="keywordflow">if</span> (iFiletype &lt; 0x000 || iFiletype &gt; 0xfff) {
-<a name="l00080"></a>00080                 <span class="keywordflow">return</span>;
-<a name="l00081"></a>00081         }
-<a name="l00082"></a>00082         e = SWI(3, 0, SWI_OS_File | XOS_Bit,
-<a name="l00083"></a>00083                 18, szFilename, iFiletype);
-<a name="l00084"></a>00084         <span class="keywordflow">if</span> (e != NULL) {
-<a name="l00085"></a>00085                 <span class="keywordflow">switch</span> (e-&gt;errnum) {
-<a name="l00086"></a>00086                 <span class="keywordflow">case</span> 0x000113:  <span class="comment">/* ROM */</span>
-<a name="l00087"></a>00087                 <span class="keywordflow">case</span> 0x0104e1:  <span class="comment">/* Read-only floppy DOSFS */</span>
-<a name="l00088"></a>00088                 <span class="keywordflow">case</span> 0x0108c9:  <span class="comment">/* Read-only floppy ADFS */</span>
-<a name="l00089"></a>00089                 <span class="keywordflow">case</span> 0x013803:  <span class="comment">/* Read-only ArcFS */</span>
-<a name="l00090"></a>00090                 <span class="keywordflow">case</span> 0x80344a:  <span class="comment">/* CD-ROM */</span>
-<a name="l00091"></a>00091                         <span class="keywordflow">break</span>;
-<a name="l00092"></a>00092                 <span class="keywordflow">default</span>:
-<a name="l00093"></a>00093                         werr(0, <span class="stringliteral">&quot;Set Filetype error %d: %s&quot;</span>,
-<a name="l00094"></a>00094                                 e-&gt;errnum, e-&gt;errmess);
-<a name="l00095"></a>00095                         <span class="keywordflow">break</span>;
-<a name="l00096"></a>00096                 }
-<a name="l00097"></a>00097         }
-<a name="l00098"></a>00098 } <span class="comment">/* end of vSetFileType */</span>
-<a name="l00099"></a>00099 
-<a name="l00100"></a>00100 <span class="comment">/*</span>
-<a name="l00101"></a>00101 <span class="comment"> * Check if the directory part of the given file exists, make the directory</span>
-<a name="l00102"></a>00102 <span class="comment"> * if it does not exist yet.</span>
-<a name="l00103"></a>00103 <span class="comment"> * Returns TRUE in case of success, otherwise FALSE.</span>
-<a name="l00104"></a>00104 <span class="comment"> */</span>
-<a name="l00105"></a>00105 BOOL
-<a name="l00106"></a>00106 bMakeDirectory(<span class="keyword">const</span> <span class="keywordtype">char</span> *szFilename)
-<a name="l00107"></a>00107 {
-<a name="l00108"></a>00108         os_error        *e;
-<a name="l00109"></a>00109         <span class="keywordtype">char</span>    *pcLastDot;
-<a name="l00110"></a>00110         <span class="keywordtype">int</span>     iObjectType;
-<a name="l00111"></a>00111         <span class="keywordtype">char</span>    szDirectory[PATH_MAX+1];
-<a name="l00112"></a>00112 
-<a name="l00113"></a>00113         DBG_MSG(<span class="stringliteral">&quot;bMakeDirectory&quot;</span>);
-<a name="l00114"></a>00114         fail(szFilename == NULL || szFilename[0] == <span class="charliteral">&#39;\0&#39;</span>);
-<a name="l00115"></a>00115         DBG_MSG(szFilename);
-<a name="l00116"></a>00116 
-<a name="l00117"></a>00117         <span class="keywordflow">if</span> (strlen(szFilename) &gt;= <span class="keyword">sizeof</span>(szDirectory)) {
-<a name="l00118"></a>00118                 DBG_DEC(strlen(szFilename));
-<a name="l00119"></a>00119                 <span class="keywordflow">return</span> FALSE;
-<a name="l00120"></a>00120         }
-<a name="l00121"></a>00121         strcpy(szDirectory, szFilename);
-<a name="l00122"></a>00122         pcLastDot = strrchr(szDirectory, <span class="charliteral">&#39;.&#39;</span>);
-<a name="l00123"></a>00123         <span class="keywordflow">if</span> (pcLastDot == NULL) {
-<a name="l00124"></a>00124                 <span class="comment">/* No directory equals current directory */</span>
-<a name="l00125"></a>00125                 DBG_MSG(<span class="stringliteral">&quot;No directory part given&quot;</span>);
-<a name="l00126"></a>00126                 <span class="keywordflow">return</span> TRUE;
-<a name="l00127"></a>00127         }
-<a name="l00128"></a>00128         *pcLastDot = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00129"></a>00129         DBG_MSG(szDirectory);
-<a name="l00130"></a>00130         <span class="comment">/* Check if the name exists */</span>
-<a name="l00131"></a>00131         e = SWI(2, 1, SWI_OS_File | XOS_Bit,
-<a name="l00132"></a>00132                 17, szDirectory,
-<a name="l00133"></a>00133                 &amp;iObjectType);
-<a name="l00134"></a>00134         <span class="keywordflow">if</span> (e != NULL) {
-<a name="l00135"></a>00135                 werr(0, <span class="stringliteral">&quot;Directory check %d: %s&quot;</span>, e-&gt;errnum, e-&gt;errmess);
-<a name="l00136"></a>00136                 <span class="keywordflow">return</span> FALSE;
-<a name="l00137"></a>00137         }
-<a name="l00138"></a>00138         <span class="keywordflow">if</span> (iObjectType == 2) {
-<a name="l00139"></a>00139                 <span class="comment">/* The name exists and it is a directory */</span>
-<a name="l00140"></a>00140                 DBG_MSG(<span class="stringliteral">&quot;The directory already exists&quot;</span>);
-<a name="l00141"></a>00141                 <span class="keywordflow">return</span> TRUE;
-<a name="l00142"></a>00142         }
-<a name="l00143"></a>00143         <span class="keywordflow">if</span> (iObjectType != 0) {
-<a name="l00144"></a>00144                 <span class="comment">/* The name exists and it is not a directory */</span>
-<a name="l00145"></a>00145                 DBG_DEC(iObjectType);
-<a name="l00146"></a>00146                 <span class="keywordflow">return</span> FALSE;
-<a name="l00147"></a>00147         }
-<a name="l00148"></a>00148         <span class="comment">/* The name does not exist, make the directory */</span>
-<a name="l00149"></a>00149         e = SWI(5, 0, SWI_OS_File | XOS_Bit,
-<a name="l00150"></a>00150                 8, szDirectory, 0, 0, 0);
-<a name="l00151"></a>00151         <span class="keywordflow">if</span> (e != NULL) {
-<a name="l00152"></a>00152                 werr(0, <span class="stringliteral">&quot;I can&#39;t make a directory %d: %s&quot;</span>,
-<a name="l00153"></a>00153                         e-&gt;errnum, e-&gt;errmess);
-<a name="l00154"></a>00154                 <span class="keywordflow">return</span> FALSE;
-<a name="l00155"></a>00155         }
-<a name="l00156"></a>00156         <span class="keywordflow">return</span> TRUE;
-<a name="l00157"></a>00157 } <span class="comment">/* end of bMakeDirectory */</span>
-<a name="l00158"></a>00158 
-<a name="l00159"></a>00159 <span class="comment">/*</span>
-<a name="l00160"></a>00160 <span class="comment"> * iReadCurrentAlphabetNumber</span>
-<a name="l00161"></a>00161 <span class="comment"> * This function reads the current Alphabet number.</span>
-<a name="l00162"></a>00162 <span class="comment"> * Returns the current Alphabet number when successful, otherwise -1</span>
-<a name="l00163"></a>00163 <span class="comment"> */</span>
-<a name="l00164"></a>00164 <span class="keywordtype">int</span>
-<a name="l00165"></a>00165 iReadCurrentAlphabetNumber(<span class="keywordtype">void</span>)
-<a name="l00166"></a>00166 {
-<a name="l00167"></a>00167         os_error        *e;
-<a name="l00168"></a>00168         <span class="keywordtype">int</span>             iAlphabetNumber;
-<a name="l00169"></a>00169 
-<a name="l00170"></a>00170         e = SWI(2, 2, SWI_OS_Byte | XOS_Bit,
-<a name="l00171"></a>00171                 71, 127,
-<a name="l00172"></a>00172                 NULL, &amp;iAlphabetNumber);
-<a name="l00173"></a>00173         <span class="keywordflow">if</span> (e == NULL) {
-<a name="l00174"></a>00174                 <span class="keywordflow">return</span> iAlphabetNumber;
-<a name="l00175"></a>00175         }
-<a name="l00176"></a>00176         werr(0, <span class="stringliteral">&quot;Read alphabet error %d: %s&quot;</span>, e-&gt;errnum, e-&gt;errmess);
-<a name="l00177"></a>00177         <span class="keywordflow">return</span> -1;
-<a name="l00178"></a>00178 } <span class="comment">/* end of iReadCurrentAlphabetNumber */</span>
-<a name="l00179"></a>00179 
-<a name="l00180"></a>00180 <span class="comment">/*</span>
-<a name="l00181"></a>00181 <span class="comment"> * iGetRiscOsVersion - get the RISC OS version number</span>
-<a name="l00182"></a>00182 <span class="comment"> *</span>
-<a name="l00183"></a>00183 <span class="comment"> * returns the RISC OS version * 100</span>
-<a name="l00184"></a>00184 <span class="comment"> */</span>
-<a name="l00185"></a>00185 <span class="keywordtype">int</span>
-<a name="l00186"></a>00186 iGetRiscOsVersion(<span class="keywordtype">void</span>)
-<a name="l00187"></a>00187 {
-<a name="l00188"></a>00188         os_error        *e;
-<a name="l00189"></a>00189         <span class="keywordtype">int</span>             iVersion;
-<a name="l00190"></a>00190 
-<a name="l00191"></a>00191         e = SWI(3, 2, SWI_OS_Byte | XOS_Bit,
-<a name="l00192"></a>00192                 129, 0, 0xff,
-<a name="l00193"></a>00193                 NULL, &amp;iVersion);
-<a name="l00194"></a>00194         <span class="keywordflow">if</span> (e != NULL) {
-<a name="l00195"></a>00195                 werr(0, <span class="stringliteral">&quot;Read RISC OS version error %d: %s&quot;</span>,
-<a name="l00196"></a>00196                         e-&gt;errnum, e-&gt;errmess);
-<a name="l00197"></a>00197                 <span class="keywordflow">return</span> 0;
-<a name="l00198"></a>00198         }
-<a name="l00199"></a>00199         <span class="keywordflow">switch</span> (iVersion) {
-<a name="l00200"></a>00200         <span class="keywordflow">case</span> 0xa0:      <span class="comment">/* Arthur 1.20 */</span>
-<a name="l00201"></a>00201                 <span class="keywordflow">return</span> 120;
-<a name="l00202"></a>00202         <span class="keywordflow">case</span> 0xa1:      <span class="comment">/* RISC OS 2.00 */</span>
-<a name="l00203"></a>00203                 <span class="keywordflow">return</span> 200;
-<a name="l00204"></a>00204         <span class="keywordflow">case</span> 0xa2:      <span class="comment">/* RISC OS 2.01 */</span>
-<a name="l00205"></a>00205                 <span class="keywordflow">return</span> 201;
-<a name="l00206"></a>00206         <span class="keywordflow">case</span> 0xa3:      <span class="comment">/* RISC OS 3.00 */</span>
-<a name="l00207"></a>00207                 <span class="keywordflow">return</span> 300;
-<a name="l00208"></a>00208         <span class="keywordflow">case</span> 0xa4:      <span class="comment">/* RISC OS 3.1x */</span>
-<a name="l00209"></a>00209                 <span class="keywordflow">return</span> 310;
-<a name="l00210"></a>00210         <span class="keywordflow">case</span> 0xa5:      <span class="comment">/* RISC OS 3.50 */</span>
-<a name="l00211"></a>00211                 <span class="keywordflow">return</span> 350;
-<a name="l00212"></a>00212         <span class="keywordflow">case</span> 0xa6:      <span class="comment">/* RISC OS 3.60 */</span>
-<a name="l00213"></a>00213                 <span class="keywordflow">return</span> 360;
-<a name="l00214"></a>00214         <span class="keywordflow">case</span> 0xa7:      <span class="comment">/* RISC OS 3.7x */</span>
-<a name="l00215"></a>00215                 <span class="keywordflow">return</span> 370;
-<a name="l00216"></a>00216         <span class="keywordflow">case</span> 0xa8:      <span class="comment">/* RISC OS 4.0x */</span>
-<a name="l00217"></a>00217                 <span class="keywordflow">return</span> 400;
-<a name="l00218"></a>00218         <span class="keywordflow">default</span>:
-<a name="l00219"></a>00219                 <span class="keywordflow">if</span> (iVersion &gt;= 0xa9 &amp;&amp; iVersion &lt;= 0xaf) {
-<a name="l00220"></a>00220                         <span class="comment">/* RISC OS 4.10 and up */</span>
-<a name="l00221"></a>00221                         <span class="keywordflow">return</span> 410;
-<a name="l00222"></a>00222                 }
-<a name="l00223"></a>00223                 <span class="comment">/* Unknown version */</span>
-<a name="l00224"></a>00224                 <span class="keywordflow">return</span> 0;
-<a name="l00225"></a>00225         }
-<a name="l00226"></a>00226 } <span class="comment">/* end of iGetRiscOsVersion */</span>
-<a name="l00227"></a>00227 
-<a name="l00228"></a>00228 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00229"></a>00229 <span class="preprocessor"></span>BOOL
-<a name="l00230"></a>00230 bGetJpegInfo(UCHAR *pucJpeg, <span class="keywordtype">size_t</span> tJpegSize)
-<a name="l00231"></a>00231 {
-<a name="l00232"></a>00232         os_error        *e;
-<a name="l00233"></a>00233         <span class="keywordtype">int</span>     iReg0, iReg4, iReg5;
-<a name="l00234"></a>00234 
-<a name="l00235"></a>00235         e = SWI(3, 6, JPEG_Info | XOS_Bit,
-<a name="l00236"></a>00236                 0x00, pucJpeg, tJpegSize,
-<a name="l00237"></a>00237                 &amp;iReg0, NULL, NULL, NULL, &amp;iReg4, &amp;iReg5);
-<a name="l00238"></a>00238         <span class="keywordflow">if</span> (e == NULL) {
-<a name="l00239"></a>00239                 <span class="keywordflow">if</span> (iReg0 &amp; BIT(2)) {
-<a name="l00240"></a>00240                         DBG_MSG(<span class="stringliteral">&quot;Pixel density is a simple ratio&quot;</span>);
-<a name="l00241"></a>00241                 } <span class="keywordflow">else</span> {
-<a name="l00242"></a>00242                         DBG_MSG(<span class="stringliteral">&quot;Pixel density is in dpi&quot;</span>);
-<a name="l00243"></a>00243                 }
-<a name="l00244"></a>00244                 DBG_DEC(iReg4);
-<a name="l00245"></a>00245                 DBG_DEC(iReg5);
-<a name="l00246"></a>00246                 <span class="keywordflow">return</span> TRUE;
-<a name="l00247"></a>00247         }
-<a name="l00248"></a>00248         werr(0, <span class="stringliteral">&quot;JPEG Info error %d: %s&quot;</span>, e-&gt;errnum, e-&gt;errmess);
-<a name="l00249"></a>00249         <span class="keywordflow">return</span> FALSE;
-<a name="l00250"></a>00250 } <span class="comment">/* end of bGetJpegInfo */</span>
-<a name="l00251"></a>00251 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/rowlist_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/rowlist.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/rowlist.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * rowlist.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2004 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Build, read and destroy a list of Word table-row information</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 <span class="comment">/*</span>
-<a name="l00014"></a>00014 <span class="comment"> * Private structure to hide the way the information</span>
-<a name="l00015"></a>00015 <span class="comment"> * is stored from the rest of the program</span>
-<a name="l00016"></a>00016 <span class="comment"> */</span>
-<a name="l00017"></a>00017 <span class="keyword">typedef</span> <span class="keyword">struct </span>row_desc_tag {
-<a name="l00018"></a>00018         row_block_type          tInfo;
-<a name="l00019"></a>00019         <span class="keyword">struct </span>row_desc_tag     *pNext;
-<a name="l00020"></a>00020 } row_desc_type;
-<a name="l00021"></a>00021 
-<a name="l00022"></a>00022 <span class="comment">/* Variables needed to write the Row Information List */</span>
-<a name="l00023"></a>00023 <span class="keyword">static</span> row_desc_type    *pAnchor = NULL;
-<a name="l00024"></a>00024 <span class="keyword">static</span> row_desc_type    *pRowLast = NULL;
-<a name="l00025"></a>00025 <span class="comment">/* Variable needed to read the Row Information List */</span>
-<a name="l00026"></a>00026 <span class="keyword">static</span> row_desc_type    *pRowCurrent = NULL;
-<a name="l00027"></a>00027 
-<a name="l00028"></a>00028 
-<a name="l00029"></a>00029 <span class="comment">/*</span>
-<a name="l00030"></a>00030 <span class="comment"> * vDestroyRowInfoList - destroy the Row Information List</span>
-<a name="l00031"></a>00031 <span class="comment"> */</span>
-<a name="l00032"></a>00032 <span class="keywordtype">void</span>
-<a name="l00033"></a>00033 vDestroyRowInfoList(<span class="keywordtype">void</span>)
-<a name="l00034"></a>00034 {
-<a name="l00035"></a>00035         row_desc_type   *pCurr, *pNext;
-<a name="l00036"></a>00036 
-<a name="l00037"></a>00037         DBG_MSG(<span class="stringliteral">&quot;vDestroyRowInfoList&quot;</span>);
-<a name="l00038"></a>00038 
-<a name="l00039"></a>00039         <span class="comment">/* Free the Row Information List */</span>
-<a name="l00040"></a>00040         pCurr = pAnchor;
-<a name="l00041"></a>00041         <span class="keywordflow">while</span> (pCurr != NULL) {
-<a name="l00042"></a>00042                 pNext = pCurr-&gt;pNext;
-<a name="l00043"></a>00043                 pCurr = xfree(pCurr);
-<a name="l00044"></a>00044                 pCurr = pNext;
-<a name="l00045"></a>00045         }
-<a name="l00046"></a>00046         pAnchor = NULL;
-<a name="l00047"></a>00047         <span class="comment">/* Reset all control variables */</span>
-<a name="l00048"></a>00048         pRowLast = NULL;
-<a name="l00049"></a>00049         pRowCurrent = NULL;
-<a name="l00050"></a>00050 } <span class="comment">/* end of vDestroyRowInfoList */</span>
-<a name="l00051"></a>00051 
-<a name="l00052"></a>00052 <span class="comment">/*</span>
-<a name="l00053"></a>00053 <span class="comment"> * vAdd2RowInfoList - Add an element to the Row Information List</span>
-<a name="l00054"></a>00054 <span class="comment"> */</span>
-<a name="l00055"></a>00055 <span class="keywordtype">void</span>
-<a name="l00056"></a>00056 vAdd2RowInfoList(<span class="keyword">const</span> row_block_type *pRowBlock)
-<a name="l00057"></a>00057 {
-<a name="l00058"></a>00058         row_desc_type   *pListMember;
-<a name="l00059"></a>00059         <span class="keywordtype">short</span>           *psTmp;
-<a name="l00060"></a>00060         <span class="keywordtype">int</span>             iIndex;
-<a name="l00061"></a>00061 
-<a name="l00062"></a>00062         fail(pRowBlock == NULL);
-<a name="l00063"></a>00063 
-<a name="l00064"></a>00064         <span class="keywordflow">if</span> (pRowBlock-&gt;ulFileOffsetStart == FC_INVALID ||
-<a name="l00065"></a>00065             pRowBlock-&gt;ulFileOffsetEnd == FC_INVALID ||
-<a name="l00066"></a>00066             pRowBlock-&gt;ulFileOffsetStart == pRowBlock-&gt;ulFileOffsetEnd) {
-<a name="l00067"></a>00067                 DBG_HEX_C(pRowBlock-&gt;ulFileOffsetStart != FC_INVALID,
-<a name="l00068"></a>00068                         pRowBlock-&gt;ulFileOffsetStart);
-<a name="l00069"></a>00069                 DBG_HEX_C(pRowBlock-&gt;ulFileOffsetEnd != FC_INVALID,
-<a name="l00070"></a>00070                         pRowBlock-&gt;ulFileOffsetEnd);
-<a name="l00071"></a>00071                 <span class="keywordflow">return</span>;
-<a name="l00072"></a>00072         }
-<a name="l00073"></a>00073 
-<a name="l00074"></a>00074         NO_DBG_HEX(pRowBlock-&gt;ulFileOffsetStart);
-<a name="l00075"></a>00075         NO_DBG_HEX(pRowBlock-&gt;ulFileOffsetEnd);
-<a name="l00076"></a>00076         NO_DBG_DEC(pRowBlock-&gt;ucNumberOfColumns);
-<a name="l00077"></a>00077 
-<a name="l00078"></a>00078         <span class="comment">/* Create the new list member */</span>
-<a name="l00079"></a>00079         pListMember = xmalloc(<span class="keyword">sizeof</span>(row_desc_type));
-<a name="l00080"></a>00080         <span class="comment">/* Fill the new list member */</span>
-<a name="l00081"></a>00081         pListMember-&gt;tInfo = *pRowBlock;
-<a name="l00082"></a>00082         pListMember-&gt;pNext = NULL;
-<a name="l00083"></a>00083         <span class="comment">/* Correct the values where needed */</span>
-<a name="l00084"></a>00084         <span class="keywordflow">for</span> (iIndex = 0, psTmp = pListMember-&gt;tInfo.asColumnWidth;
-<a name="l00085"></a>00085              iIndex &lt; (<span class="keywordtype">int</span>)pListMember-&gt;tInfo.ucNumberOfColumns;
-<a name="l00086"></a>00086              iIndex++, psTmp++) {
-<a name="l00087"></a>00087                 <span class="keywordflow">if</span> (*psTmp &lt; 0) {
-<a name="l00088"></a>00088                         *psTmp = 0;
-<a name="l00089"></a>00089                         DBG_MSG(<span class="stringliteral">&quot;The column width was negative&quot;</span>);
-<a name="l00090"></a>00090                 }
-<a name="l00091"></a>00091         }
-<a name="l00092"></a>00092         <span class="comment">/* Add the new member to the list */</span>
-<a name="l00093"></a>00093         <span class="keywordflow">if</span> (pAnchor == NULL) {
-<a name="l00094"></a>00094                 pAnchor = pListMember;
-<a name="l00095"></a>00095                 pRowCurrent = pListMember;
-<a name="l00096"></a>00096         } <span class="keywordflow">else</span> {
-<a name="l00097"></a>00097                 fail(pRowLast == NULL);
-<a name="l00098"></a>00098                 pRowLast-&gt;pNext = pListMember;
-<a name="l00099"></a>00099         }
-<a name="l00100"></a>00100         pRowLast = pListMember;
-<a name="l00101"></a>00101 } <span class="comment">/* end of vAdd2RowInfoList */</span>
-<a name="l00102"></a>00102 
-<a name="l00103"></a>00103 <span class="comment">/*</span>
-<a name="l00104"></a>00104 <span class="comment"> * Get the next item in the Row Information List</span>
-<a name="l00105"></a>00105 <span class="comment"> */</span>
-<a name="l00106"></a>00106 <span class="keyword">const</span> row_block_type *
-<a name="l00107"></a>00107 pGetNextRowInfoListItem(<span class="keywordtype">void</span>)
-<a name="l00108"></a>00108 {
-<a name="l00109"></a>00109         <span class="keyword">const</span> row_block_type    *pItem;
-<a name="l00110"></a>00110 
-<a name="l00111"></a>00111         <span class="keywordflow">if</span> (pRowCurrent == NULL) {
-<a name="l00112"></a>00112                 <span class="keywordflow">return</span> NULL;
-<a name="l00113"></a>00113         }
-<a name="l00114"></a>00114         pItem = &amp;pRowCurrent-&gt;tInfo;
-<a name="l00115"></a>00115         pRowCurrent = pRowCurrent-&gt;pNext;
-<a name="l00116"></a>00116         <span class="keywordflow">return</span> pItem;
-<a name="l00117"></a>00117 } <span class="comment">/* end of pGetNextRowInfoListItem */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/saveas_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,403 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/saveas.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/saveas.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * saveas.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2001 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Functions to save the results as a textfile or a drawfile</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;DeskLib:Menu.h&quot;</span>
-<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;DeskLib:Save.h&quot;</span>
-<a name="l00013"></a>00013 <span class="preprocessor">#include &quot;DeskLib:Template.h&quot;</span>
-<a name="l00014"></a>00014 <span class="preprocessor">#include &quot;DeskLib:Window.h&quot;</span>
-<a name="l00015"></a>00015 <span class="preprocessor">#include &quot;drawfile.h&quot;</span>
-<a name="l00016"></a>00016 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00017"></a>00017 
-<a name="l00018"></a>00018 <span class="comment">/* The window handle of the save window */</span>
-<a name="l00019"></a>00019 <span class="keyword">static</span> window_handle    tSaveWindow = 0;
-<a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="comment">/* Xfer_send box fields */</span>
-<a name="l00022"></a>00022 <span class="preprocessor">#define DRAG_SPRITE     3</span>
-<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#define OK_BUTTON       0</span>
-<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define CANCEL_BUTTON   (-1)</span>
-<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define FILENAME_ICON   2</span>
-<a name="l00026"></a>00026 <span class="preprocessor"></span>
-<a name="l00027"></a>00027 
-<a name="l00028"></a>00028 <span class="comment">/*</span>
-<a name="l00029"></a>00029 <span class="comment"> * saveas - a wrapper around Save_InitSaveWindowhandler</span>
-<a name="l00030"></a>00030 <span class="comment"> */</span>
-<a name="l00031"></a>00031 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00032"></a>00032 saveas(<span class="keywordtype">int</span> iFileType, <span class="keywordtype">char</span> *szOutfile, <span class="keywordtype">size_t</span> tEstSize,
-<a name="l00033"></a>00033         save_filesaver save_function, <span class="keywordtype">void</span> *pvReference)
-<a name="l00034"></a>00034 {
-<a name="l00035"></a>00035         TRACE_MSG(<span class="stringliteral">&quot;saveas&quot;</span>);
-<a name="l00036"></a>00036 
-<a name="l00037"></a>00037         <span class="keywordflow">if</span> (tSaveWindow == 0) {
-<a name="l00038"></a>00038                 tSaveWindow = Window_Create(<span class="stringliteral">&quot;xfer_send&quot;</span>, template_TITLEMIN);
-<a name="l00039"></a>00039         }
-<a name="l00040"></a>00040         Icon_SetText(tSaveWindow, FILENAME_ICON, szOutfile);
-<a name="l00041"></a>00041         Window_Show(tSaveWindow, open_UNDERPOINTER);
-<a name="l00042"></a>00042         (void)Save_InitSaveWindowHandler(tSaveWindow, FALSE, TRUE, TRUE,
-<a name="l00043"></a>00043                 DRAG_SPRITE, OK_BUTTON, CANCEL_BUTTON, FILENAME_ICON,
-<a name="l00044"></a>00044                 save_function, NULL, NULL, tEstSize, iFileType, pvReference);
-<a name="l00045"></a>00045 } <span class="comment">/* end of saveas */</span>
-<a name="l00046"></a>00046 
-<a name="l00047"></a>00047 <span class="keyword">static</span> BOOL
-<a name="l00048"></a>00048 bWrite2File(<span class="keywordtype">void</span> *pvBytes, <span class="keywordtype">size_t</span> tSize, FILE *pFile, <span class="keyword">const</span> <span class="keywordtype">char</span> *szFilename)
-<a name="l00049"></a>00049 {
-<a name="l00050"></a>00050         <span class="keywordflow">if</span> (fwrite(pvBytes, <span class="keyword">sizeof</span>(<span class="keywordtype">char</span>), tSize, pFile) != tSize) {
-<a name="l00051"></a>00051                 werr(0, <span class="stringliteral">&quot;I can&#39;t write to &#39;%s&#39;&quot;</span>, szFilename);
-<a name="l00052"></a>00052                 <span class="keywordflow">return</span> FALSE;
-<a name="l00053"></a>00053         }
-<a name="l00054"></a>00054         <span class="keywordflow">return</span> TRUE;
-<a name="l00055"></a>00055 } <span class="comment">/* end of bWrite2File */</span>
-<a name="l00056"></a>00056 
-<a name="l00057"></a>00057 <span class="comment">/*</span>
-<a name="l00058"></a>00058 <span class="comment"> * bText2File - Save the generated draw file to a Text file</span>
-<a name="l00059"></a>00059 <span class="comment"> */</span>
-<a name="l00060"></a>00060 <span class="keyword">static</span> BOOL
-<a name="l00061"></a>00061 bText2File(<span class="keywordtype">char</span> *szFilename, <span class="keywordtype">void</span> *pvHandle)
-<a name="l00062"></a>00062 {
-<a name="l00063"></a>00063         FILE    *pFile;
-<a name="l00064"></a>00064         diagram_type    *pDiag;
-<a name="l00065"></a>00065         <a class="code" href="structdrawfile__object.html">drawfile_object</a> *pObj;
-<a name="l00066"></a>00066         <a class="code" href="structdrawfile__text.html">drawfile_text</a>   *pText;
-<a name="l00067"></a>00067         <span class="keyword">const</span> <span class="keywordtype">char</span>      *pcTmp;
-<a name="l00068"></a>00068         <span class="keywordtype">int</span>     iToGo, iX, iYtopPrev, iHeight, iLines;
-<a name="l00069"></a>00069         BOOL    bFirst, bIndent, bSuccess;
-<a name="l00070"></a>00070 
-<a name="l00071"></a>00071         TRACE_MSG(<span class="stringliteral">&quot;bText2File&quot;</span>);
-<a name="l00072"></a>00072 
-<a name="l00073"></a>00073         fail(szFilename == NULL || szFilename[0] == <span class="charliteral">&#39;\0&#39;</span>);
-<a name="l00074"></a>00074         fail(pvHandle == NULL);
-<a name="l00075"></a>00075 
-<a name="l00076"></a>00076         DBG_MSG(szFilename);
-<a name="l00077"></a>00077 
-<a name="l00078"></a>00078         pDiag = (diagram_type *)pvHandle;
-<a name="l00079"></a>00079         pFile = fopen(szFilename, <span class="stringliteral">&quot;w&quot;</span>);
-<a name="l00080"></a>00080         <span class="keywordflow">if</span> (pFile == NULL) {
-<a name="l00081"></a>00081                 werr(0, <span class="stringliteral">&quot;I can&#39;t open &#39;%s&#39; for writing&quot;</span>, szFilename);
-<a name="l00082"></a>00082                 <span class="keywordflow">return</span> FALSE;
-<a name="l00083"></a>00083         }
-<a name="l00084"></a>00084         bFirst = TRUE;
-<a name="l00085"></a>00085         iYtopPrev = 0;
-<a name="l00086"></a>00086         iHeight = (int)lWord2DrawUnits20(DEFAULT_FONT_SIZE);
-<a name="l00087"></a>00087         bSuccess = TRUE;
-<a name="l00088"></a>00088         fail(pDiag-&gt;tInfo.length &lt; offsetof(<a class="code" href="structdrawfile__diagram.html">drawfile_diagram</a>, objects));
-<a name="l00089"></a>00089         iToGo = pDiag-&gt;tInfo.length - offsetof(<a class="code" href="structdrawfile__diagram.html">drawfile_diagram</a>, objects);
-<a name="l00090"></a>00090         DBG_DEC(iToGo);
-<a name="l00091"></a>00091         pcTmp = (<span class="keyword">const</span> <span class="keywordtype">char</span> *)pDiag-&gt;tInfo.data +
-<a name="l00092"></a>00092                                 offsetof(<a class="code" href="structdrawfile__diagram.html">drawfile_diagram</a>, objects);
-<a name="l00093"></a>00093         <span class="keywordflow">while</span> (iToGo &gt; 0 &amp;&amp; bSuccess) {
-<a name="l00094"></a>00094                 pObj = (<a class="code" href="structdrawfile__object.html">drawfile_object</a> *)pcTmp;
-<a name="l00095"></a>00095                 <span class="keywordflow">switch</span> (pObj-&gt;type) {
-<a name="l00096"></a>00096                 <span class="keywordflow">case</span> drawfile_TYPE_TEXT:
-<a name="l00097"></a>00097                         pText = &amp;pObj-&gt;data.text;
-<a name="l00098"></a>00098                         <span class="comment">/* Compute the number of lines */</span>
-<a name="l00099"></a>00099                         iLines = (iYtopPrev - pText-&gt;bbox.max.y +
-<a name="l00100"></a>00100                                         iHeight / 2) / iHeight;
-<a name="l00101"></a>00101                         DBG_DEC_C(iLines &lt; 0, iYtopPrev);
-<a name="l00102"></a>00102                         DBG_DEC_C(iLines &lt; 0, pText-&gt;bbox.max.y);
-<a name="l00103"></a>00103                         fail(iLines &lt; 0);
-<a name="l00104"></a>00104                         bIndent = iLines &gt; 0 || bFirst;
-<a name="l00105"></a>00105                         bFirst = FALSE;
-<a name="l00106"></a>00106                         <span class="comment">/* Print the newlines */</span>
-<a name="l00107"></a>00107                         <span class="keywordflow">while</span> (iLines &gt; 0 &amp;&amp; bSuccess) {
-<a name="l00108"></a>00108                                 bSuccess = bWrite2File(<span class="stringliteral">&quot;\n&quot;</span>,
-<a name="l00109"></a>00109                                         1, pFile, szFilename);
-<a name="l00110"></a>00110                                 iLines--;
-<a name="l00111"></a>00111                         }
-<a name="l00112"></a>00112                         <span class="comment">/* Print the indentation */</span>
-<a name="l00113"></a>00113                         <span class="keywordflow">if</span> (bIndent &amp;&amp; bSuccess) {
-<a name="l00114"></a>00114                                 <span class="keywordflow">for</span> (iX = Drawfile_ScreenToDraw(8);
-<a name="l00115"></a>00115                                      iX &lt;= pText-&gt;bbox.min.x &amp;&amp; bSuccess;
-<a name="l00116"></a>00116                                      iX += Drawfile_ScreenToDraw(16)) {
-<a name="l00117"></a>00117                                         bSuccess = bWrite2File(<span class="stringliteral">&quot; &quot;</span>,
-<a name="l00118"></a>00118                                                 1, pFile, szFilename);
-<a name="l00119"></a>00119                                 }
-<a name="l00120"></a>00120                         }
-<a name="l00121"></a>00121                         <span class="keywordflow">if</span> (!bSuccess) {
-<a name="l00122"></a>00122                                 <span class="keywordflow">break</span>;
-<a name="l00123"></a>00123                         }
-<a name="l00124"></a>00124                         <span class="comment">/* Print the text object */</span>
-<a name="l00125"></a>00125                         bSuccess = bWrite2File(pText-&gt;text,
-<a name="l00126"></a>00126                                 strlen(pText-&gt;text), pFile, szFilename);
-<a name="l00127"></a>00127                         <span class="comment">/* Setup for the next object */</span>
-<a name="l00128"></a>00128                         iYtopPrev = pText-&gt;bbox.max.y;
-<a name="l00129"></a>00129                         iHeight = pText-&gt;bbox.max.y - pText-&gt;bbox.min.y;
-<a name="l00130"></a>00130                         <span class="keywordflow">break</span>;
-<a name="l00131"></a>00131                 <span class="keywordflow">case</span> drawfile_TYPE_FONT_TABLE:
-<a name="l00132"></a>00132                 <span class="keywordflow">case</span> drawfile_TYPE_PATH:
-<a name="l00133"></a>00133                 <span class="keywordflow">case</span> drawfile_TYPE_SPRITE:
-<a name="l00134"></a>00134                 <span class="keywordflow">case</span> drawfile_TYPE_JPEG:
-<a name="l00135"></a>00135                         <span class="comment">/* These are not relevant in a textfile */</span>
-<a name="l00136"></a>00136                         <span class="keywordflow">break</span>;
-<a name="l00137"></a>00137                 <span class="keywordflow">default</span>:
-<a name="l00138"></a>00138                         DBG_DEC(pObj-&gt;type);
-<a name="l00139"></a>00139                         bSuccess = FALSE;
-<a name="l00140"></a>00140                         <span class="keywordflow">break</span>;
-<a name="l00141"></a>00141                 }
-<a name="l00142"></a>00142                 pcTmp += pObj-&gt;size;
-<a name="l00143"></a>00143                 iToGo -= pObj-&gt;size;
-<a name="l00144"></a>00144         }
-<a name="l00145"></a>00145         DBG_DEC_C(iToGo != 0, iToGo);
-<a name="l00146"></a>00146         <span class="keywordflow">if</span> (bSuccess) {
-<a name="l00147"></a>00147                 bSuccess = bWrite2File(<span class="stringliteral">&quot;\n&quot;</span>, 1, pFile, szFilename);
-<a name="l00148"></a>00148         }
-<a name="l00149"></a>00149         (void)fclose(pFile);
-<a name="l00150"></a>00150         <span class="keywordflow">if</span> (bSuccess) {
-<a name="l00151"></a>00151                 vSetFiletype(szFilename, FILETYPE_TEXT);
-<a name="l00152"></a>00152         } <span class="keywordflow">else</span> {
-<a name="l00153"></a>00153                 (void)<span class="keyword">remove</span>(szFilename);
-<a name="l00154"></a>00154                 werr(0, <span class="stringliteral">&quot;Unable to save textfile &#39;%s&#39;&quot;</span>, szFilename);
-<a name="l00155"></a>00155         }
-<a name="l00156"></a>00156         <span class="keywordflow">return</span> bSuccess;
-<a name="l00157"></a>00157 } <span class="comment">/* end of bText2File */</span>
-<a name="l00158"></a>00158 
-<a name="l00159"></a>00159 <span class="comment">/*</span>
-<a name="l00160"></a>00160 <span class="comment"> * bSaveTextfile - save the diagram as a text file</span>
-<a name="l00161"></a>00161 <span class="comment"> */</span>
-<a name="l00162"></a>00162 BOOL
-<a name="l00163"></a>00163 bSaveTextfile(event_pollblock *pEvent, <span class="keywordtype">void</span> *pvReference)
-<a name="l00164"></a>00164 {
-<a name="l00165"></a>00165         diagram_type    *pDiag;
-<a name="l00166"></a>00166         <span class="keywordtype">size_t</span>  tRecLen, tNbrRecs, tEstSize;
-<a name="l00167"></a>00167 
-<a name="l00168"></a>00168         TRACE_MSG(<span class="stringliteral">&quot;bSaveTextfile&quot;</span>);
-<a name="l00169"></a>00169 
-<a name="l00170"></a>00170         fail(pEvent == NULL);
-<a name="l00171"></a>00171         fail(pvReference == NULL);
-<a name="l00172"></a>00172 
-<a name="l00173"></a>00173         pDiag = (diagram_type *)pvReference;
-<a name="l00174"></a>00174 
-<a name="l00175"></a>00175         <span class="keywordflow">switch</span> (pEvent-&gt;type) {
-<a name="l00176"></a>00176         <span class="keywordflow">case</span> event_SEND:        <span class="comment">/* From a menu */</span>
-<a name="l00177"></a>00177                 fail(pEvent-&gt;data.message.header.action != message_MENUWARN);
-<a name="l00178"></a>00178                 <span class="keywordflow">if</span> (menu_currentopen != pDiag-&gt;pSaveMenu ||
-<a name="l00179"></a>00179                     pEvent-&gt;data.message.data.menuwarn.selection[0] !=
-<a name="l00180"></a>00180                                                         SAVEMENU_SAVETEXT) {
-<a name="l00181"></a>00181                         <span class="keywordflow">return</span> FALSE;
-<a name="l00182"></a>00182                 }
-<a name="l00183"></a>00183                 <span class="keywordflow">break</span>;
-<a name="l00184"></a>00184         <span class="keywordflow">case</span> event_KEY:         <span class="comment">/* From a key short cut */</span>
-<a name="l00185"></a>00185                 <span class="keywordflow">if</span> (pEvent-&gt;data.key.caret.window != pDiag-&gt;tMainWindow) {
-<a name="l00186"></a>00186                         <span class="keywordflow">return</span> FALSE;
-<a name="l00187"></a>00187                 }
-<a name="l00188"></a>00188                 <span class="keywordflow">break</span>;
-<a name="l00189"></a>00189         <span class="keywordflow">default</span>:
-<a name="l00190"></a>00190                 DBG_DEC(pEvent-&gt;type);
-<a name="l00191"></a>00191                 <span class="keywordflow">return</span> FALSE;
-<a name="l00192"></a>00192         }
-<a name="l00193"></a>00193 
-<a name="l00194"></a>00194         tRecLen = <span class="keyword">sizeof</span>(<a class="code" href="structdrawfile__text.html">drawfile_text</a>) + DEFAULT_SCREEN_WIDTH * 2 / 3;
-<a name="l00195"></a>00195         tNbrRecs = pDiag-&gt;tInfo.length / tRecLen + 1;
-<a name="l00196"></a>00196         tEstSize = tNbrRecs * DEFAULT_SCREEN_WIDTH * 2 / 3;
-<a name="l00197"></a>00197         DBG_DEC(tEstSize);
-<a name="l00198"></a>00198 
-<a name="l00199"></a>00199         saveas(FILETYPE_TEXT, <span class="stringliteral">&quot;WordText&quot;</span>, tEstSize, bText2File, pDiag);
-<a name="l00200"></a>00200         <span class="keywordflow">return</span> TRUE;
-<a name="l00201"></a>00201 } <span class="comment">/* end of bSaveTextfile */</span>
-<a name="l00202"></a>00202 
-<a name="l00203"></a>00203 <span class="comment">/*</span>
-<a name="l00204"></a>00204 <span class="comment"> * bDraw2File - Save the generated draw file to a Draw file</span>
-<a name="l00205"></a>00205 <span class="comment"> *</span>
-<a name="l00206"></a>00206 <span class="comment"> * Remark: This is not a simple copy action. The origin of the</span>
-<a name="l00207"></a>00207 <span class="comment"> * coordinates (0,0) must move from the top-left corner to the</span>
-<a name="l00208"></a>00208 <span class="comment"> * bottom-left corner.</span>
-<a name="l00209"></a>00209 <span class="comment"> */</span>
-<a name="l00210"></a>00210 <span class="keyword">static</span> BOOL
-<a name="l00211"></a>00211 bDraw2File(<span class="keywordtype">char</span> *szFilename, <span class="keywordtype">void</span> *pvHandle)
-<a name="l00212"></a>00212 {
-<a name="l00213"></a>00213         FILE            *pFile;
-<a name="l00214"></a>00214         diagram_type    *pDiagram;
-<a name="l00215"></a>00215         wimp_box        *pBbox;
-<a name="l00216"></a>00216         <a class="code" href="structdrawfile__object.html">drawfile_object</a> *pObj;
-<a name="l00217"></a>00217         <a class="code" href="structdrawfile__text.html">drawfile_text</a>   *pText;
-<a name="l00218"></a>00218         <a class="code" href="structdrawfile__path.html">drawfile_path</a>   *pPath;
-<a name="l00219"></a>00219         <a class="code" href="structdrawfile__sprite.html">drawfile_sprite</a> *pSprite;
-<a name="l00220"></a>00220         <a class="code" href="structdrawfile__jpeg.html">drawfile_jpeg</a>   *pJpeg;
-<a name="l00221"></a>00221         <span class="keywordtype">int</span>     *piPath;
-<a name="l00222"></a>00222         <span class="keywordtype">char</span>    *pcTmp;
-<a name="l00223"></a>00223         <span class="keywordtype">int</span>     iYadd, iToGo, iSize;
-<a name="l00224"></a>00224         BOOL    bSuccess;
-<a name="l00225"></a>00225 
-<a name="l00226"></a>00226         TRACE_MSG(<span class="stringliteral">&quot;bDraw2File&quot;</span>);
-<a name="l00227"></a>00227 
-<a name="l00228"></a>00228         fail(szFilename == NULL || szFilename[0] == <span class="charliteral">&#39;\0&#39;</span>);
-<a name="l00229"></a>00229         fail(pvHandle == NULL);
-<a name="l00230"></a>00230 
-<a name="l00231"></a>00231         NO_DBG_MSG(szFilename);
-<a name="l00232"></a>00232 
-<a name="l00233"></a>00233         pDiagram = (diagram_type *)pvHandle;
-<a name="l00234"></a>00234         pFile = fopen(szFilename, <span class="stringliteral">&quot;wb&quot;</span>);
-<a name="l00235"></a>00235         <span class="keywordflow">if</span> (pFile == NULL) {
-<a name="l00236"></a>00236                 werr(0, <span class="stringliteral">&quot;I can&#39;t open &#39;%s&#39; for writing&quot;</span>, szFilename);
-<a name="l00237"></a>00237                 <span class="keywordflow">return</span> FALSE;
-<a name="l00238"></a>00238         }
-<a name="l00239"></a>00239         iToGo = pDiagram-&gt;tInfo.length;
-<a name="l00240"></a>00240         DBG_DEC(iToGo);
-<a name="l00241"></a>00241         pcTmp = pDiagram-&gt;tInfo.data;
-<a name="l00242"></a>00242         bSuccess = bWrite2File(pcTmp,
-<a name="l00243"></a>00243                         offsetof(<a class="code" href="structdrawfile__diagram.html">drawfile_diagram</a>, bbox), pFile, szFilename);
-<a name="l00244"></a>00244         <span class="keywordflow">if</span> (bSuccess) {
-<a name="l00245"></a>00245                 pcTmp += offsetof(<a class="code" href="structdrawfile__diagram.html">drawfile_diagram</a>, bbox);
-<a name="l00246"></a>00246                 iToGo -= offsetof(<a class="code" href="structdrawfile__diagram.html">drawfile_diagram</a>, bbox);
-<a name="l00247"></a>00247                 pBbox = (wimp_box *)pcTmp;
-<a name="l00248"></a>00248                 iYadd = -pBbox-&gt;min.y;
-<a name="l00249"></a>00249                 pBbox-&gt;min.y += iYadd;
-<a name="l00250"></a>00250                 pBbox-&gt;max.y += iYadd;
-<a name="l00251"></a>00251                 bSuccess = bWrite2File(pcTmp,
-<a name="l00252"></a>00252                                 <span class="keyword">sizeof</span>(*pBbox), pFile, szFilename);
-<a name="l00253"></a>00253                 iToGo -= <span class="keyword">sizeof</span>(*pBbox);
-<a name="l00254"></a>00254                 DBG_DEC(iToGo);
-<a name="l00255"></a>00255                 pcTmp += <span class="keyword">sizeof</span>(*pBbox);
-<a name="l00256"></a>00256         } <span class="keywordflow">else</span> {
-<a name="l00257"></a>00257                 iYadd = 0;
-<a name="l00258"></a>00258         }
-<a name="l00259"></a>00259         <span class="keywordflow">while</span> (iToGo &gt; 0 &amp;&amp; bSuccess) {
-<a name="l00260"></a>00260                 pObj = (<a class="code" href="structdrawfile__object.html">drawfile_object</a> *)pcTmp;
-<a name="l00261"></a>00261                 iSize = pObj-&gt;size;
-<a name="l00262"></a>00262                 <span class="keywordflow">switch</span> (pObj-&gt;type) {
-<a name="l00263"></a>00263                 <span class="keywordflow">case</span> drawfile_TYPE_FONT_TABLE:
-<a name="l00264"></a>00264                         bSuccess = bWrite2File(pcTmp,
-<a name="l00265"></a>00265                                         iSize, pFile, szFilename);
-<a name="l00266"></a>00266                         pcTmp += iSize;
-<a name="l00267"></a>00267                         iToGo -= iSize;
-<a name="l00268"></a>00268                         <span class="keywordflow">break</span>;
-<a name="l00269"></a>00269                 <span class="keywordflow">case</span> drawfile_TYPE_TEXT:
-<a name="l00270"></a>00270                         pText = &amp;pObj-&gt;data.text;
-<a name="l00271"></a>00271                         <span class="comment">/* First correct the coordinates */</span>
-<a name="l00272"></a>00272                         pText-&gt;bbox.min.y += iYadd;
-<a name="l00273"></a>00273                         pText-&gt;bbox.max.y += iYadd;
-<a name="l00274"></a>00274                         pText-&gt;base.y += iYadd;
-<a name="l00275"></a>00275                         <span class="comment">/* Now write the information to file */</span>
-<a name="l00276"></a>00276                         bSuccess = bWrite2File(pcTmp,
-<a name="l00277"></a>00277                                         iSize, pFile, szFilename);
-<a name="l00278"></a>00278                         pcTmp += pObj-&gt;size;
-<a name="l00279"></a>00279                         iToGo -= pObj-&gt;size;
-<a name="l00280"></a>00280                         <span class="keywordflow">break</span>;
-<a name="l00281"></a>00281                 <span class="keywordflow">case</span> drawfile_TYPE_PATH:
-<a name="l00282"></a>00282                         pPath = &amp;pObj-&gt;data.path;
-<a name="l00283"></a>00283                         <span class="comment">/* First correct the coordinates */</span>
-<a name="l00284"></a>00284                         pPath-&gt;bbox.min.y += iYadd;
-<a name="l00285"></a>00285                         pPath-&gt;bbox.max.y += iYadd;
-<a name="l00286"></a>00286                         <span class="comment">/* Now write the information to file */</span>
-<a name="l00287"></a>00287                         bSuccess = bWrite2File(pPath,
-<a name="l00288"></a>00288                                 <span class="keyword">sizeof</span>(*pPath), pFile, szFilename);
-<a name="l00289"></a>00289                         pcTmp += <span class="keyword">sizeof</span>(*pPath);
-<a name="l00290"></a>00290                         iSize = pObj-&gt;size - <span class="keyword">sizeof</span>(*pPath);
-<a name="l00291"></a>00291                         fail(iSize &lt; 14 * <span class="keyword">sizeof</span>(<span class="keywordtype">int</span>));
-<a name="l00292"></a>00292                         <span class="comment">/* Second correct the path coordinates */</span>
-<a name="l00293"></a>00293                         piPath = xmalloc(iSize);
-<a name="l00294"></a>00294                         memcpy(piPath, pcTmp, iSize);
-<a name="l00295"></a>00295                         piPath[ 2] += iYadd;
-<a name="l00296"></a>00296                         piPath[ 5] += iYadd;
-<a name="l00297"></a>00297                         piPath[ 8] += iYadd;
-<a name="l00298"></a>00298                         piPath[11] += iYadd;
-<a name="l00299"></a>00299                         <span class="keywordflow">if</span> (bSuccess) {
-<a name="l00300"></a>00300                                 bSuccess = bWrite2File(piPath,
-<a name="l00301"></a>00301                                         iSize, pFile, szFilename);
-<a name="l00302"></a>00302                                 pcTmp += iSize;
-<a name="l00303"></a>00303                         }
-<a name="l00304"></a>00304                         piPath = xfree(piPath);
-<a name="l00305"></a>00305                         iToGo -= pObj-&gt;size;
-<a name="l00306"></a>00306                         <span class="keywordflow">break</span>;
-<a name="l00307"></a>00307                 <span class="keywordflow">case</span> drawfile_TYPE_SPRITE:
-<a name="l00308"></a>00308                         pSprite = &amp;pObj-&gt;data.sprite;
-<a name="l00309"></a>00309                         <span class="comment">/* First correct the coordinates */</span>
-<a name="l00310"></a>00310                         pSprite-&gt;bbox.min.y += iYadd;
-<a name="l00311"></a>00311                         pSprite-&gt;bbox.max.y += iYadd;
-<a name="l00312"></a>00312                         <span class="comment">/* Now write the information to file */</span>
-<a name="l00313"></a>00313                         bSuccess = bWrite2File(pcTmp,
-<a name="l00314"></a>00314                                         iSize, pFile, szFilename);
-<a name="l00315"></a>00315                         pcTmp += pObj-&gt;size;
-<a name="l00316"></a>00316                         iToGo -= pObj-&gt;size;
-<a name="l00317"></a>00317                         <span class="keywordflow">break</span>;
-<a name="l00318"></a>00318                 <span class="keywordflow">case</span> drawfile_TYPE_JPEG:
-<a name="l00319"></a>00319                         pJpeg = &amp;pObj-&gt;data.jpeg;
-<a name="l00320"></a>00320                         <span class="comment">/* First correct the coordinates */</span>
-<a name="l00321"></a>00321                         pJpeg-&gt;bbox.min.y += iYadd;
-<a name="l00322"></a>00322                         pJpeg-&gt;bbox.max.y += iYadd;
-<a name="l00323"></a>00323                         pJpeg-&gt;trfm.entries[2][1] += iYadd;
-<a name="l00324"></a>00324                         <span class="comment">/* Now write the information to file */</span>
-<a name="l00325"></a>00325                         bSuccess = bWrite2File(pcTmp,
-<a name="l00326"></a>00326                                         iSize, pFile, szFilename);
-<a name="l00327"></a>00327                         pcTmp += pObj-&gt;size;
-<a name="l00328"></a>00328                         iToGo -= pObj-&gt;size;
-<a name="l00329"></a>00329                         <span class="keywordflow">break</span>;
-<a name="l00330"></a>00330                 <span class="keywordflow">default</span>:
-<a name="l00331"></a>00331                         DBG_DEC(pObj-&gt;type);
-<a name="l00332"></a>00332                         bSuccess = FALSE;
-<a name="l00333"></a>00333                         <span class="keywordflow">break</span>;
-<a name="l00334"></a>00334                 }
-<a name="l00335"></a>00335         }
-<a name="l00336"></a>00336         DBG_DEC_C(iToGo != 0, iToGo);
-<a name="l00337"></a>00337         (void)fclose(pFile);
-<a name="l00338"></a>00338         <span class="keywordflow">if</span> (bSuccess) {
-<a name="l00339"></a>00339                 vSetFiletype(szFilename, FILETYPE_DRAW);
-<a name="l00340"></a>00340         } <span class="keywordflow">else</span> {
-<a name="l00341"></a>00341                 (void)<span class="keyword">remove</span>(szFilename);
-<a name="l00342"></a>00342                 werr(0, <span class="stringliteral">&quot;Unable to save drawfile &#39;%s&#39;&quot;</span>, szFilename);
-<a name="l00343"></a>00343         }
-<a name="l00344"></a>00344         <span class="keywordflow">return</span> bSuccess;
-<a name="l00345"></a>00345 } <span class="comment">/* end of bDraw2File */</span>
-<a name="l00346"></a>00346 
-<a name="l00347"></a>00347 <span class="comment">/*</span>
-<a name="l00348"></a>00348 <span class="comment"> * bSaveDrawfile - save the diagram as a draw file</span>
-<a name="l00349"></a>00349 <span class="comment"> */</span>
-<a name="l00350"></a>00350 BOOL
-<a name="l00351"></a>00351 bSaveDrawfile(event_pollblock *pEvent, <span class="keywordtype">void</span> *pvReference)
-<a name="l00352"></a>00352 {
-<a name="l00353"></a>00353         diagram_type    *pDiag;
-<a name="l00354"></a>00354         <span class="keywordtype">size_t</span>          tEstSize;
-<a name="l00355"></a>00355 
-<a name="l00356"></a>00356         TRACE_MSG(<span class="stringliteral">&quot;bSaveDrawfile&quot;</span>);
-<a name="l00357"></a>00357 
-<a name="l00358"></a>00358         fail(pEvent == NULL);
-<a name="l00359"></a>00359         fail(pvReference == NULL);
-<a name="l00360"></a>00360 
-<a name="l00361"></a>00361         pDiag = (diagram_type *)pvReference;
-<a name="l00362"></a>00362 
-<a name="l00363"></a>00363         <span class="keywordflow">switch</span> (pEvent-&gt;type) {
-<a name="l00364"></a>00364         <span class="keywordflow">case</span> event_SEND:        <span class="comment">/* From a menu */</span>
-<a name="l00365"></a>00365                 fail(pEvent-&gt;data.message.header.action != message_MENUWARN);
-<a name="l00366"></a>00366                 <span class="keywordflow">if</span> (menu_currentopen != pDiag-&gt;pSaveMenu ||
-<a name="l00367"></a>00367                     pEvent-&gt;data.message.data.menuwarn.selection[0] !=
-<a name="l00368"></a>00368                                                         SAVEMENU_SAVEDRAW) {
-<a name="l00369"></a>00369                         <span class="keywordflow">return</span> FALSE;
-<a name="l00370"></a>00370                 }
-<a name="l00371"></a>00371                 <span class="keywordflow">break</span>;
-<a name="l00372"></a>00372         <span class="keywordflow">case</span> event_KEY:         <span class="comment">/* From a key short cut */</span>
-<a name="l00373"></a>00373                 <span class="keywordflow">if</span> (pEvent-&gt;data.key.caret.window != pDiag-&gt;tMainWindow) {
-<a name="l00374"></a>00374                         <span class="keywordflow">return</span> FALSE;
-<a name="l00375"></a>00375                 }
-<a name="l00376"></a>00376                 <span class="keywordflow">break</span>;
-<a name="l00377"></a>00377         <span class="keywordflow">default</span>:
-<a name="l00378"></a>00378                 DBG_DEC(pEvent-&gt;type);
-<a name="l00379"></a>00379                 <span class="keywordflow">return</span> FALSE;
-<a name="l00380"></a>00380         }
-<a name="l00381"></a>00381 
-<a name="l00382"></a>00382         tEstSize = pDiag-&gt;tInfo.length;
-<a name="l00383"></a>00383         DBG_DEC(tEstSize);
-<a name="l00384"></a>00384 
-<a name="l00385"></a>00385         saveas(FILETYPE_DRAW, <span class="stringliteral">&quot;WordDraw&quot;</span>, tEstSize, bDraw2File, pDiag);
-<a name="l00386"></a>00386         <span class="keywordflow">return</span> TRUE;
-<a name="l00387"></a>00387 } <span class="comment">/* end of bSaveDrawfile */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/sectlist_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,181 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/sectlist.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/sectlist.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * sectlist.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2001-2004 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Build, read and destroy list(s) of Word section information</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stddef.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 
-<a name="l00014"></a>00014 <span class="comment">/*</span>
-<a name="l00015"></a>00015 <span class="comment"> * Private structure to hide the way the information</span>
-<a name="l00016"></a>00016 <span class="comment"> * is stored from the rest of the program</span>
-<a name="l00017"></a>00017 <span class="comment"> */</span>
-<a name="l00018"></a>00018 <span class="keyword">typedef</span> <span class="keyword">struct </span>section_mem_tag {
-<a name="l00019"></a>00019         section_block_type      tInfo;
-<a name="l00020"></a>00020         ULONG                   ulCharPos;
-<a name="l00021"></a>00021         <span class="keyword">struct </span>section_mem_tag  *pNext;
-<a name="l00022"></a>00022 } section_mem_type;
-<a name="l00023"></a>00023 
-<a name="l00024"></a>00024 <span class="comment">/* Variables needed to write the Section Information List */</span>
-<a name="l00025"></a>00025 <span class="keyword">static</span> section_mem_type *pAnchor = NULL;
-<a name="l00026"></a>00026 <span class="keyword">static</span> section_mem_type *pSectionLast = NULL;
-<a name="l00027"></a>00027 
-<a name="l00028"></a>00028 
-<a name="l00029"></a>00029 <span class="comment">/*</span>
-<a name="l00030"></a>00030 <span class="comment"> * vDestroySectionInfoList - destroy the Section Information List</span>
-<a name="l00031"></a>00031 <span class="comment"> */</span>
-<a name="l00032"></a>00032 <span class="keywordtype">void</span>
-<a name="l00033"></a>00033 vDestroySectionInfoList(<span class="keywordtype">void</span>)
-<a name="l00034"></a>00034 {
-<a name="l00035"></a>00035         section_mem_type        *pCurr, *pNext;
-<a name="l00036"></a>00036 
-<a name="l00037"></a>00037         DBG_MSG(<span class="stringliteral">&quot;vDestroySectionInfoList&quot;</span>);
-<a name="l00038"></a>00038 
-<a name="l00039"></a>00039         <span class="comment">/* Free the Section Information List */</span>
-<a name="l00040"></a>00040         pCurr = pAnchor;
-<a name="l00041"></a>00041         <span class="keywordflow">while</span> (pCurr != NULL) {
-<a name="l00042"></a>00042                 pNext = pCurr-&gt;pNext;
-<a name="l00043"></a>00043                 pCurr = xfree(pCurr);
-<a name="l00044"></a>00044                 pCurr = pNext;
-<a name="l00045"></a>00045         }
-<a name="l00046"></a>00046         pAnchor = NULL;
-<a name="l00047"></a>00047         <span class="comment">/* Reset all control variables */</span>
-<a name="l00048"></a>00048         pSectionLast = NULL;
-<a name="l00049"></a>00049 } <span class="comment">/* end of vDestroySectionInfoList */</span>
-<a name="l00050"></a>00050 
-<a name="l00051"></a>00051 <span class="comment">/*</span>
-<a name="l00052"></a>00052 <span class="comment"> * vAdd2SectionInfoList - Add an element to the Section Information List</span>
-<a name="l00053"></a>00053 <span class="comment"> */</span>
-<a name="l00054"></a>00054 <span class="keywordtype">void</span>
-<a name="l00055"></a>00055 vAdd2SectionInfoList(<span class="keyword">const</span> section_block_type *pSection, ULONG ulCharPos)
-<a name="l00056"></a>00056 {
-<a name="l00057"></a>00057         section_mem_type        *pListMember;
-<a name="l00058"></a>00058 
-<a name="l00059"></a>00059         fail(pSection == NULL);
-<a name="l00060"></a>00060 
-<a name="l00061"></a>00061         <span class="comment">/* Create list member */</span>
-<a name="l00062"></a>00062         pListMember = xmalloc(<span class="keyword">sizeof</span>(section_mem_type));
-<a name="l00063"></a>00063         <span class="comment">/* Fill the list member */</span>
-<a name="l00064"></a>00064         pListMember-&gt;tInfo = *pSection;
-<a name="l00065"></a>00065         pListMember-&gt;ulCharPos = ulCharPos;
-<a name="l00066"></a>00066         pListMember-&gt;pNext = NULL;
-<a name="l00067"></a>00067         <span class="comment">/* Add the new member to the list */</span>
-<a name="l00068"></a>00068         <span class="keywordflow">if</span> (pAnchor == NULL) {
-<a name="l00069"></a>00069                 pAnchor = pListMember;
-<a name="l00070"></a>00070         } <span class="keywordflow">else</span> {
-<a name="l00071"></a>00071                 fail(pSectionLast == NULL);
-<a name="l00072"></a>00072                 pSectionLast-&gt;pNext = pListMember;
-<a name="l00073"></a>00073         }
-<a name="l00074"></a>00074         pSectionLast = pListMember;
-<a name="l00075"></a>00075 } <span class="comment">/* vAdd2SectionInfoList */</span>
-<a name="l00076"></a>00076 
-<a name="l00077"></a>00077 <span class="comment">/*</span>
-<a name="l00078"></a>00078 <span class="comment"> * vGetDefaultSection - fill the section struct with default values</span>
-<a name="l00079"></a>00079 <span class="comment"> */</span>
-<a name="l00080"></a>00080 <span class="keywordtype">void</span>
-<a name="l00081"></a>00081 vGetDefaultSection(section_block_type *pSection)
-<a name="l00082"></a>00082 {
-<a name="l00083"></a>00083         (void)memset(pSection, 0, <span class="keyword">sizeof</span>(*pSection));
-<a name="l00084"></a>00084         pSection-&gt;bNewPage = TRUE;
-<a name="l00085"></a>00085 } <span class="comment">/* end of vGetDefaultSection */</span>
-<a name="l00086"></a>00086 
-<a name="l00087"></a>00087 <span class="comment">/*</span>
-<a name="l00088"></a>00088 <span class="comment"> * vDefault2SectionInfoList - Add a default to the Section Information List</span>
-<a name="l00089"></a>00089 <span class="comment"> */</span>
-<a name="l00090"></a>00090 <span class="keywordtype">void</span>
-<a name="l00091"></a>00091 vDefault2SectionInfoList(ULONG ulCharPos)
-<a name="l00092"></a>00092 {
-<a name="l00093"></a>00093         section_block_type      tSection;
-<a name="l00094"></a>00094 
-<a name="l00095"></a>00095         vGetDefaultSection(&amp;tSection);
-<a name="l00096"></a>00096         vAdd2SectionInfoList(&amp;tSection, ulCharPos);
-<a name="l00097"></a>00097 } <span class="comment">/* end of vDefault2SectionInfoList */</span>
-<a name="l00098"></a>00098 
-<a name="l00099"></a>00099 <span class="comment">/*</span>
-<a name="l00100"></a>00100 <span class="comment"> * pGetSectionInfo - get the section information</span>
-<a name="l00101"></a>00101 <span class="comment"> */</span>
-<a name="l00102"></a>00102 <span class="keyword">const</span> section_block_type *
-<a name="l00103"></a>00103 pGetSectionInfo(<span class="keyword">const</span> section_block_type *pOld, ULONG ulCharPos)
-<a name="l00104"></a>00104 {
-<a name="l00105"></a>00105         <span class="keyword">const</span> section_mem_type  *pCurr;
-<a name="l00106"></a>00106 
-<a name="l00107"></a>00107         <span class="keywordflow">if</span> (pOld == NULL || ulCharPos == 0) {
-<a name="l00108"></a>00108                 <span class="keywordflow">if</span> (pAnchor == NULL) {
-<a name="l00109"></a>00109                         <span class="comment">/* There are no records, make one */</span>
-<a name="l00110"></a>00110                         vDefault2SectionInfoList(0);
-<a name="l00111"></a>00111                         fail(pAnchor == NULL);
-<a name="l00112"></a>00112                 }
-<a name="l00113"></a>00113                 <span class="comment">/* The first record */</span>
-<a name="l00114"></a>00114                 NO_DBG_MSG(<span class="stringliteral">&quot;First record&quot;</span>);
-<a name="l00115"></a>00115                 <span class="keywordflow">return</span> &amp;pAnchor-&gt;tInfo;
-<a name="l00116"></a>00116         }
-<a name="l00117"></a>00117 
-<a name="l00118"></a>00118         NO_DBG_HEX(ulCharPos);
-<a name="l00119"></a>00119         <span class="keywordflow">for</span> (pCurr = pAnchor; pCurr != NULL; pCurr = pCurr-&gt;pNext) {
-<a name="l00120"></a>00120                 NO_DBG_HEX(pCurr-&gt;ulCharPos);
-<a name="l00121"></a>00121                 <span class="keywordflow">if</span> (ulCharPos == pCurr-&gt;ulCharPos ||
-<a name="l00122"></a>00122                     ulCharPos + 1 == pCurr-&gt;ulCharPos) {
-<a name="l00123"></a>00123                         NO_DBG_HEX(pCurr-&gt;ulCharPos);
-<a name="l00124"></a>00124                         <span class="keywordflow">return</span> &amp;pCurr-&gt;tInfo;
-<a name="l00125"></a>00125                 }
-<a name="l00126"></a>00126         }
-<a name="l00127"></a>00127         <span class="keywordflow">return</span> pOld;
-<a name="l00128"></a>00128 } <span class="comment">/* end of pGetSectionInfo */</span>
-<a name="l00129"></a>00129 
-<a name="l00130"></a>00130 <span class="comment">/*</span>
-<a name="l00131"></a>00131 <span class="comment"> * tGetNumberOfSections - get the number of sections</span>
-<a name="l00132"></a>00132 <span class="comment"> */</span>
-<a name="l00133"></a>00133 <span class="keywordtype">size_t</span>
-<a name="l00134"></a>00134 tGetNumberOfSections(<span class="keywordtype">void</span>)
-<a name="l00135"></a>00135 {
-<a name="l00136"></a>00136         <span class="keyword">const</span> section_mem_type  *pCurr;
-<a name="l00137"></a>00137         <span class="keywordtype">size_t</span>  tCounter;
-<a name="l00138"></a>00138 
-<a name="l00139"></a>00139         <span class="keywordflow">for</span> (tCounter = 0, pCurr = pAnchor;
-<a name="l00140"></a>00140              pCurr != NULL;
-<a name="l00141"></a>00141              tCounter++, pCurr = pCurr-&gt;pNext)
-<a name="l00142"></a>00142                 ;       <span class="comment">/* Empty */</span>
-<a name="l00143"></a>00143         <span class="keywordflow">return</span> tCounter;
-<a name="l00144"></a>00144 } <span class="comment">/* end of tGetNumberOfSections */</span>
-<a name="l00145"></a>00145 
-<a name="l00146"></a>00146 <span class="comment">/*</span>
-<a name="l00147"></a>00147 <span class="comment"> * ucGetSepHdrFtrSpecification - get the Heder/footer specification</span>
-<a name="l00148"></a>00148 <span class="comment"> */</span>
-<a name="l00149"></a>00149 UCHAR
-<a name="l00150"></a>00150 ucGetSepHdrFtrSpecification(<span class="keywordtype">size_t</span> tSectionNumber)
-<a name="l00151"></a>00151 {
-<a name="l00152"></a>00152         <span class="keyword">const</span> section_mem_type  *pCurr;
-<a name="l00153"></a>00153         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00154"></a>00154 
-<a name="l00155"></a>00155         <span class="keywordflow">for</span> (tIndex = 0, pCurr = pAnchor;
-<a name="l00156"></a>00156              tIndex &lt; tSectionNumber &amp;&amp; pCurr != NULL;
-<a name="l00157"></a>00157              tIndex++, pCurr = pCurr-&gt;pNext)
-<a name="l00158"></a>00158                 ;       <span class="comment">/* Empty */</span>
-<a name="l00159"></a>00159         <span class="keywordflow">if</span> (pCurr == NULL) {
-<a name="l00160"></a>00160                 DBG_DEC(tSectionNumber);
-<a name="l00161"></a>00161                 DBG_FIXME();
-<a name="l00162"></a>00162                 <span class="keywordflow">return</span> 0x00;
-<a name="l00163"></a>00163         }
-<a name="l00164"></a>00164         <span class="keywordflow">return</span> pCurr-&gt;tInfo.ucHdrFtrSpecification;
-<a name="l00165"></a>00165 } <span class="comment">/* end of ucGetSepHdrFtrSpecification */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/startup_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,161 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/startup.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/startup.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * startup.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2001 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Try to force a single startup of !Antiword</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;ctype.h&gt;</span>
-<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;DeskLib:Error.h&quot;</span>
-<a name="l00013"></a>00013 <span class="preprocessor">#include &quot;DeskLib:Event.h&quot;</span>
-<a name="l00014"></a>00014 <span class="preprocessor">#include &quot;DeskLib:SWI.h&quot;</span>
-<a name="l00015"></a>00015 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00016"></a>00016 
-<a name="l00017"></a>00017 
-<a name="l00018"></a>00018 <span class="preprocessor">#if !defined(TaskManager_EnumerateTasks)</span>
-<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define TaskManager_EnumerateTasks      0x042681</span>
-<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* TaskManager_EnumerateTasks */</span>
-<a name="l00021"></a>00021 
-<a name="l00022"></a>00022 <span class="comment">/*</span>
-<a name="l00023"></a>00023 <span class="comment"> * bIsMatch - decide whether the two strings match</span>
-<a name="l00024"></a>00024 <span class="comment"> *</span>
-<a name="l00025"></a>00025 <span class="comment"> * like strcmp, but this one ignores case</span>
-<a name="l00026"></a>00026 <span class="comment"> */</span>
-<a name="l00027"></a>00027 <span class="keyword">static</span> BOOL
-<a name="l00028"></a>00028 bIsMatch(<span class="keyword">const</span> <span class="keywordtype">char</span> *szStr1, <span class="keyword">const</span> <span class="keywordtype">char</span> *szStr2)
-<a name="l00029"></a>00029 {
-<a name="l00030"></a>00030         <span class="keyword">const</span> <span class="keywordtype">char</span>      *pcTmp1, *pcTmp2;
-<a name="l00031"></a>00031 
-<a name="l00032"></a>00032         <span class="keywordflow">for</span> (pcTmp1 = szStr1, pcTmp2 = szStr2;
-<a name="l00033"></a>00033              *pcTmp1 != <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00034"></a>00034              pcTmp1++, pcTmp2++) {
-<a name="l00035"></a>00035                 <span class="keywordflow">if</span> (toupper(*pcTmp1) != toupper(*pcTmp2)) {
-<a name="l00036"></a>00036                         <span class="keywordflow">return</span> FALSE;
-<a name="l00037"></a>00037                 }
-<a name="l00038"></a>00038         }
-<a name="l00039"></a>00039         <span class="keywordflow">return</span> *pcTmp2 == <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00040"></a>00040 } <span class="comment">/* end of bIsMatch */</span>
-<a name="l00041"></a>00041 
-<a name="l00042"></a>00042 <span class="comment">/*</span>
-<a name="l00043"></a>00043 <span class="comment"> * tGetTaskHandle - get the task handle of the given task</span>
-<a name="l00044"></a>00044 <span class="comment"> *</span>
-<a name="l00045"></a>00045 <span class="comment"> * returns the task handle when found, otherwise 0</span>
-<a name="l00046"></a>00046 <span class="comment"> */</span>
-<a name="l00047"></a>00047 <span class="keyword">static</span> task_handle
-<a name="l00048"></a>00048 tGetTaskHandle(<span class="keyword">const</span> <span class="keywordtype">char</span> *szTaskname)
-<a name="l00049"></a>00049 {
-<a name="l00050"></a>00050         <span class="keyword">const</span> <span class="keywordtype">char</span>      *pcTmp;
-<a name="l00051"></a>00051         <span class="keywordtype">int</span>     iReg0, iIndex;
-<a name="l00052"></a>00052         <span class="keywordtype">int</span>     aiBuffer[4];
-<a name="l00053"></a>00053         <span class="keywordtype">char</span>    szTmp[21];
-<a name="l00054"></a>00054 
-<a name="l00055"></a>00055         iReg0 = 0;
-<a name="l00056"></a>00056         <span class="keywordflow">do</span> {
-<a name="l00057"></a>00057                 <span class="comment">/* Get info on the next task */</span>
-<a name="l00058"></a>00058                 Error_CheckFatal(SWI(3, 1, TaskManager_EnumerateTasks | XOS_Bit,
-<a name="l00059"></a>00059                         iReg0, aiBuffer, <span class="keyword">sizeof</span>(aiBuffer), &amp;iReg0));
-<a name="l00060"></a>00060                 <span class="comment">/* Copy the (control character terminated) task name */</span>
-<a name="l00061"></a>00061                 <span class="keywordflow">for</span> (iIndex = 0, pcTmp = (<span class="keyword">const</span> <span class="keywordtype">char</span> *)aiBuffer[1];
-<a name="l00062"></a>00062                      iIndex &lt; elementsof(szTmp);
-<a name="l00063"></a>00063                      iIndex++, pcTmp++) {
-<a name="l00064"></a>00064                         <span class="keywordflow">if</span> (iscntrl(*pcTmp)) {
-<a name="l00065"></a>00065                                 szTmp[iIndex] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00066"></a>00066                                 <span class="keywordflow">break</span>;
-<a name="l00067"></a>00067                         }
-<a name="l00068"></a>00068                         szTmp[iIndex] = *pcTmp;
-<a name="l00069"></a>00069                 }
-<a name="l00070"></a>00070                 szTmp[elementsof(szTmp) - 1] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00071"></a>00071                 <span class="keywordflow">if</span> (bIsMatch(szTmp, szTaskname)) {
-<a name="l00072"></a>00072                         <span class="comment">/* Task found */</span>
-<a name="l00073"></a>00073                         <span class="keywordflow">return</span> (task_handle)aiBuffer[0];
-<a name="l00074"></a>00074                 }
-<a name="l00075"></a>00075         } <span class="keywordflow">while</span> (iReg0 &gt;= 0);
-<a name="l00076"></a>00076 
-<a name="l00077"></a>00077         <span class="comment">/* Task not found */</span>
-<a name="l00078"></a>00078         <span class="keywordflow">return</span> 0;
-<a name="l00079"></a>00079 } <span class="comment">/* end of tGetTaskHandle */</span>
-<a name="l00080"></a>00080 
-<a name="l00081"></a>00081 <span class="keywordtype">int</span>
-<a name="l00082"></a>00082 <a class="code" href="redirectprintf_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)
-<a name="l00083"></a>00083 {
-<a name="l00084"></a>00084         message_block   tMsg;
-<a name="l00085"></a>00085         task_handle     tTaskHandle;
-<a name="l00086"></a>00086         <span class="keywordtype">size_t</span>  tArgLen;
-<a name="l00087"></a>00087         <span class="keywordtype">int</span>     aiMessages[] = {0};
-<a name="l00088"></a>00088         <span class="keywordtype">char</span>    szCommand[512];
-<a name="l00089"></a>00089 
-<a name="l00090"></a>00090         Event_Initialise3(<span class="stringliteral">&quot;StartUp&quot;</span>, 310, aiMessages);
-<a name="l00091"></a>00091 
-<a name="l00092"></a>00092         <span class="keywordflow">if</span> (argc &gt; 1) {
-<a name="l00093"></a>00093                 tArgLen = strlen(argv[1]);
-<a name="l00094"></a>00094         } <span class="keywordflow">else</span> {
-<a name="l00095"></a>00095                 tArgLen = 0;
-<a name="l00096"></a>00096         }
-<a name="l00097"></a>00097         <span class="keywordflow">if</span> (tArgLen &gt;= <span class="keyword">sizeof</span>(tMsg.data.dataload.filename)) {
-<a name="l00098"></a>00098                 werr(1, <span class="stringliteral">&quot;Input filename too long&quot;</span>);
-<a name="l00099"></a>00099                 <span class="keywordflow">return</span> EXIT_FAILURE;
-<a name="l00100"></a>00100         }
-<a name="l00101"></a>00101 
-<a name="l00102"></a>00102         tTaskHandle = tGetTaskHandle(<span class="stringliteral">&quot;antiword&quot;</span>);
-<a name="l00103"></a>00103 
-<a name="l00104"></a>00104         <span class="keywordflow">if</span> (tTaskHandle == 0) {
-<a name="l00105"></a>00105                 <span class="comment">/* Antiword is not active */</span>
-<a name="l00106"></a>00106                 strcpy(szCommand, <span class="stringliteral">&quot;chain:&lt;Antiword$Dir&gt;.!Antiword&quot;</span>);
-<a name="l00107"></a>00107                 <span class="keywordflow">if</span> (argc &gt; 1) {
-<a name="l00108"></a>00108                         strcat(szCommand, <span class="stringliteral">&quot; &quot;</span>);
-<a name="l00109"></a>00109                         strcat(szCommand, argv[1]);
-<a name="l00110"></a>00110                 }
-<a name="l00111"></a>00111 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00112"></a>00112 <span class="preprocessor"></span>                strcat(szCommand, <span class="stringliteral">&quot; &quot;</span>);
-<a name="l00113"></a>00113                 strcat(szCommand, <span class="stringliteral">&quot;2&gt;&lt;Antiword$Dir&gt;.Debug&quot;</span>);
-<a name="l00114"></a>00114 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00115"></a>00115                 system(szCommand);
-<a name="l00116"></a>00116                 <span class="comment">/* If we reach here something has gone wrong */</span>
-<a name="l00117"></a>00117                 <span class="keywordflow">return</span> EXIT_FAILURE;
-<a name="l00118"></a>00118         }
-<a name="l00119"></a>00119 
-<a name="l00120"></a>00120         <span class="comment">/* Antiword is active */</span>
-<a name="l00121"></a>00121         <span class="keywordflow">if</span> (argc &gt; 1) {
-<a name="l00122"></a>00122                 <span class="comment">/*</span>
-<a name="l00123"></a>00123 <span class="comment">                 * Send the argument to Antiword by imitating a</span>
-<a name="l00124"></a>00124 <span class="comment">                 * drag-and-drop to Antiword&#39;s iconbar icon</span>
-<a name="l00125"></a>00125 <span class="comment">                 */</span>
-<a name="l00126"></a>00126                 memset(&amp;tMsg, 0, <span class="keyword">sizeof</span>(tMsg));
-<a name="l00127"></a>00127                 tMsg.header.size = ROUND4(offsetof(message_block, data) +
-<a name="l00128"></a>00128                                         offsetof(message_dataload, filename) +
-<a name="l00129"></a>00129                                         1 + tArgLen);
-<a name="l00130"></a>00130                 tMsg.header.yourref = 0;
-<a name="l00131"></a>00131                 tMsg.header.action = message_DATALOAD;
-<a name="l00132"></a>00132                 tMsg.data.dataload.window = window_ICONBAR;
-<a name="l00133"></a>00133                 tMsg.data.dataload.icon = -1;
-<a name="l00134"></a>00134                 tMsg.data.dataload.size = 0;
-<a name="l00135"></a>00135                 tMsg.data.dataload.filetype = FILETYPE_MSWORD;
-<a name="l00136"></a>00136                 strcpy(tMsg.data.dataload.filename, argv[1]);
-<a name="l00137"></a>00137                 Error_CheckFatal(Wimp_SendMessage(event_SEND,
-<a name="l00138"></a>00138                                                 &amp;tMsg, tTaskHandle, 0));
-<a name="l00139"></a>00139                 <span class="keywordflow">return</span> EXIT_SUCCESS;
-<a name="l00140"></a>00140         } <span class="keywordflow">else</span> {
-<a name="l00141"></a>00141                 <span class="comment">/* Give an error message and return */</span>
-<a name="l00142"></a>00142                 werr(1, <span class="stringliteral">&quot;Antiword is already running&quot;</span>);
-<a name="l00143"></a>00143                 <span class="keywordflow">return</span> EXIT_FAILURE;
-<a name="l00144"></a>00144         }
-<a name="l00145"></a>00145 } <span class="comment">/* end of main */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/stylelist_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,503 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/stylelist.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/stylelist.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * stylelist.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2005 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Build, read and destroy a list of Word style information</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;stddef.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;ctype.h&gt;</span>
-<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00013"></a>00013 
-<a name="l00014"></a>00014 
-<a name="l00015"></a>00015 <span class="comment">/*</span>
-<a name="l00016"></a>00016 <span class="comment"> * Private structure to hide the way the information</span>
-<a name="l00017"></a>00017 <span class="comment"> * is stored from the rest of the program</span>
-<a name="l00018"></a>00018 <span class="comment"> */</span>
-<a name="l00019"></a>00019 <span class="keyword">typedef</span> <span class="keyword">struct </span>style_mem_tag {
-<a name="l00020"></a>00020         style_block_type        tInfo;
-<a name="l00021"></a>00021         ULONG                   ulSequenceNumber;
-<a name="l00022"></a>00022         <span class="keyword">struct </span>style_mem_tag    *pNext;
-<a name="l00023"></a>00023 } style_mem_type;
-<a name="l00024"></a>00024 
-<a name="l00025"></a>00025 <span class="comment">/* Variables needed to write the Style Information List */</span>
-<a name="l00026"></a>00026 <span class="keyword">static</span> style_mem_type   *pAnchor = NULL;
-<a name="l00027"></a>00027 <span class="keyword">static</span> style_mem_type   *pStyleLast = NULL;
-<a name="l00028"></a>00028 <span class="comment">/* The type of conversion */</span>
-<a name="l00029"></a>00029 <span class="keyword">static</span> conversion_type  eConversionType = conversion_unknown;
-<a name="l00030"></a>00030 <span class="comment">/* The character set encoding */</span>
-<a name="l00031"></a>00031 <span class="keyword">static</span> encoding_type    eEncoding = encoding_neutral;
-<a name="l00032"></a>00032 <span class="comment">/* Values for efficiency reasons */</span>
-<a name="l00033"></a>00033 <span class="keyword">static</span> <span class="keyword">const</span> style_mem_type     *pMidPtr = NULL;
-<a name="l00034"></a>00034 <span class="keyword">static</span> BOOL             bMoveMidPtr = FALSE;
-<a name="l00035"></a>00035 <span class="keyword">static</span> BOOL             bInSequence = TRUE;
-<a name="l00036"></a>00036 
-<a name="l00037"></a>00037 
-<a name="l00038"></a>00038 <span class="comment">/*</span>
-<a name="l00039"></a>00039 <span class="comment"> * vDestroyStyleInfoList - destroy the Style Information List</span>
-<a name="l00040"></a>00040 <span class="comment"> */</span>
-<a name="l00041"></a>00041 <span class="keywordtype">void</span>
-<a name="l00042"></a>00042 vDestroyStyleInfoList(<span class="keywordtype">void</span>)
-<a name="l00043"></a>00043 {
-<a name="l00044"></a>00044         style_mem_type  *pCurr, *pNext;
-<a name="l00045"></a>00045 
-<a name="l00046"></a>00046         DBG_MSG(<span class="stringliteral">&quot;vDestroyStyleInfoList&quot;</span>);
-<a name="l00047"></a>00047 
-<a name="l00048"></a>00048         <span class="comment">/* Free the Style Information List */</span>
-<a name="l00049"></a>00049         pCurr = pAnchor;
-<a name="l00050"></a>00050         <span class="keywordflow">while</span> (pCurr != NULL) {
-<a name="l00051"></a>00051                 pNext = pCurr-&gt;pNext;
-<a name="l00052"></a>00052                 pCurr = xfree(pCurr);
-<a name="l00053"></a>00053                 pCurr = pNext;
-<a name="l00054"></a>00054         }
-<a name="l00055"></a>00055         pAnchor = NULL;
-<a name="l00056"></a>00056         <span class="comment">/* Reset all control variables */</span>
-<a name="l00057"></a>00057         pStyleLast = NULL;
-<a name="l00058"></a>00058         pMidPtr = NULL;
-<a name="l00059"></a>00059         bMoveMidPtr = FALSE;
-<a name="l00060"></a>00060         bInSequence = TRUE;
-<a name="l00061"></a>00061 } <span class="comment">/* end of vDestroyStyleInfoList */</span>
-<a name="l00062"></a>00062 
-<a name="l00063"></a>00063 <span class="comment">/*</span>
-<a name="l00064"></a>00064 <span class="comment"> * vConvertListCharacter - convert the list character</span>
-<a name="l00065"></a>00065 <span class="comment"> */</span>
-<a name="l00066"></a>00066 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00067"></a>00067 vConvertListCharacter(UCHAR ucNFC, USHORT usListChar, <span class="keywordtype">char</span> *szListChar)
-<a name="l00068"></a>00068 {
-<a name="l00069"></a>00069         options_type    tOptions;
-<a name="l00070"></a>00070         <span class="keywordtype">size_t</span>  tLen;
-<a name="l00071"></a>00071 
-<a name="l00072"></a>00072         fail(szListChar == NULL);
-<a name="l00073"></a>00073         fail(szListChar[0] != <span class="charliteral">&#39;\0&#39;</span>);
-<a name="l00074"></a>00074 
-<a name="l00075"></a>00075         <span class="keywordflow">if</span> (usListChar &lt; 0x80 &amp;&amp; isprint((<span class="keywordtype">int</span>)usListChar)) {
-<a name="l00076"></a>00076                 DBG_CHR_C(isalnum((<span class="keywordtype">int</span>)usListChar), usListChar);
-<a name="l00077"></a>00077                 szListChar[0] = (char)usListChar;
-<a name="l00078"></a>00078                 szListChar[1] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00079"></a>00079                 <span class="keywordflow">return</span>;
-<a name="l00080"></a>00080         }
-<a name="l00081"></a>00081 
-<a name="l00082"></a>00082         <span class="keywordflow">if</span> (ucNFC != LIST_SPECIAL &amp;&amp;
-<a name="l00083"></a>00083             ucNFC != LIST_SPECIAL2 &amp;&amp;
-<a name="l00084"></a>00084             ucNFC != LIST_BULLETS) {
-<a name="l00085"></a>00085                 szListChar[0] = <span class="charliteral">&#39;.&#39;</span>;
-<a name="l00086"></a>00086                 szListChar[1] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00087"></a>00087                 <span class="keywordflow">return</span>;
-<a name="l00088"></a>00088         }
-<a name="l00089"></a>00089 
-<a name="l00090"></a>00090         <span class="keywordflow">if</span> (eConversionType == conversion_unknown ||
-<a name="l00091"></a>00091             eEncoding == encoding_neutral) {
-<a name="l00092"></a>00092                 vGetOptions(&amp;tOptions);
-<a name="l00093"></a>00093                 eConversionType = tOptions.eConversionType;
-<a name="l00094"></a>00094                 eEncoding = tOptions.eEncoding;
-<a name="l00095"></a>00095         }
-<a name="l00096"></a>00096 
-<a name="l00097"></a>00097         <span class="keywordflow">switch</span> (usListChar) {
-<a name="l00098"></a>00098         <span class="keywordflow">case</span> 0x0000: <span class="keywordflow">case</span> 0x00b7: <span class="keywordflow">case</span> 0x00fe: <span class="keywordflow">case</span>  0xf021: <span class="keywordflow">case</span> 0xf043:
-<a name="l00099"></a>00099         <span class="keywordflow">case</span> 0xf06c: <span class="keywordflow">case</span> 0xf093: <span class="keywordflow">case</span> 0xf0b7:
-<a name="l00100"></a>00100                 usListChar = 0x2022;    <span class="comment">/* BULLET */</span>
-<a name="l00101"></a>00101                 <span class="keywordflow">break</span>;
-<a name="l00102"></a>00102         <span class="keywordflow">case</span> 0x0096: <span class="keywordflow">case</span> 0xf02d:
-<a name="l00103"></a>00103                 usListChar = 0x2013;    <span class="comment">/* EN DASH */</span>
-<a name="l00104"></a>00104                 <span class="keywordflow">break</span>;
-<a name="l00105"></a>00105         <span class="keywordflow">case</span> 0x00a8:
-<a name="l00106"></a>00106                 usListChar = 0x2666;    <span class="comment">/* BLACK DIAMOND SUIT */</span>
-<a name="l00107"></a>00107                 <span class="keywordflow">break</span>;
-<a name="l00108"></a>00108         <span class="keywordflow">case</span> 0x00de:
-<a name="l00109"></a>00109                 usListChar = 0x21d2;    <span class="comment">/* RIGHTWARDS DOUBLE ARROW */</span>
-<a name="l00110"></a>00110                 <span class="keywordflow">break</span>;
-<a name="l00111"></a>00111         <span class="keywordflow">case</span> 0x00e0: <span class="keywordflow">case</span> 0xf074:
-<a name="l00112"></a>00112                 usListChar = 0x25ca;    <span class="comment">/* LOZENGE */</span>
-<a name="l00113"></a>00113                 <span class="keywordflow">break</span>;
-<a name="l00114"></a>00114         <span class="keywordflow">case</span> 0x00e1:
-<a name="l00115"></a>00115                 usListChar = 0x2329;    <span class="comment">/* LEFT ANGLE BRACKET */</span>
-<a name="l00116"></a>00116                 <span class="keywordflow">break</span>;
-<a name="l00117"></a>00117         <span class="keywordflow">case</span> 0xf020:
-<a name="l00118"></a>00118                 usListChar = 0x0020;    <span class="comment">/* SPACE */</span>
-<a name="l00119"></a>00119                 <span class="keywordflow">break</span>;
-<a name="l00120"></a>00120         <span class="keywordflow">case</span> 0xf041:
-<a name="l00121"></a>00121                 usListChar = 0x270c;    <span class="comment">/* VICTORY HAND */</span>
-<a name="l00122"></a>00122                 <span class="keywordflow">break</span>;
-<a name="l00123"></a>00123         <span class="keywordflow">case</span> 0xf066:
-<a name="l00124"></a>00124                 usListChar = 0x03d5;    <span class="comment">/* GREEK PHI SYMBOL */</span>
-<a name="l00125"></a>00125                 <span class="keywordflow">break</span>;
-<a name="l00126"></a>00126         <span class="keywordflow">case</span> 0xf06e:
-<a name="l00127"></a>00127                 usListChar = 0x25a0;    <span class="comment">/* BLACK SQUARE */</span>
-<a name="l00128"></a>00128                 <span class="keywordflow">break</span>;
-<a name="l00129"></a>00129         <span class="keywordflow">case</span> 0xf06f: <span class="keywordflow">case</span> 0xf070: <span class="keywordflow">case</span> 0xf0a8:
-<a name="l00130"></a>00130                 usListChar = 0x25a1;    <span class="comment">/* WHITE SQUARE */</span>
-<a name="l00131"></a>00131                 <span class="keywordflow">break</span>;
-<a name="l00132"></a>00132         <span class="keywordflow">case</span> 0xf071:
-<a name="l00133"></a>00133                 usListChar = 0x2751;    <span class="comment">/* LOWER RIGHT SHADOWED WHITE SQUARE */</span>
-<a name="l00134"></a>00134                 <span class="keywordflow">break</span>;
-<a name="l00135"></a>00135         <span class="keywordflow">case</span> 0xf075: <span class="keywordflow">case</span> 0xf077:
-<a name="l00136"></a>00136                 usListChar = 0x25c6;    <span class="comment">/* BLACK DIAMOND */</span>
-<a name="l00137"></a>00137                 <span class="keywordflow">break</span>;
-<a name="l00138"></a>00138         <span class="keywordflow">case</span> 0xf076:
-<a name="l00139"></a>00139                 usListChar = 0x2756;    <span class="comment">/* BLACK DIAMOND MINUS WHITE X */</span>
-<a name="l00140"></a>00140                 <span class="keywordflow">break</span>;
-<a name="l00141"></a>00141         <span class="keywordflow">case</span> 0xf0a7:
-<a name="l00142"></a>00142                 usListChar = 0x25aa;    <span class="comment">/* BLACK SMALL SQUARE */</span>
-<a name="l00143"></a>00143                 <span class="keywordflow">break</span>;
-<a name="l00144"></a>00144         <span class="keywordflow">case</span> 0xf0d8:
-<a name="l00145"></a>00145                 usListChar = 0x27a2;    <span class="comment">/* RIGHTWARDS ARROWHEAD */</span>
-<a name="l00146"></a>00146                 <span class="keywordflow">break</span>;
-<a name="l00147"></a>00147         <span class="keywordflow">case</span> 0xf0e5:
-<a name="l00148"></a>00148                 usListChar = 0x2199;    <span class="comment">/* SOUTH WEST ARROW */</span>
-<a name="l00149"></a>00149                 <span class="keywordflow">break</span>;
-<a name="l00150"></a>00150         <span class="keywordflow">case</span> 0xf0f0:
-<a name="l00151"></a>00151                 usListChar = 0x21e8;    <span class="comment">/* RIGHTWARDS WHITE ARROW */</span>
-<a name="l00152"></a>00152                 <span class="keywordflow">break</span>;
-<a name="l00153"></a>00153         <span class="keywordflow">case</span> 0xf0fc:
-<a name="l00154"></a>00154                 usListChar = 0x2713;    <span class="comment">/* CHECK MARK */</span>
-<a name="l00155"></a>00155                 <span class="keywordflow">break</span>;
-<a name="l00156"></a>00156         <span class="keywordflow">default</span>:
-<a name="l00157"></a>00157                 <span class="keywordflow">if</span> ((usListChar &gt;= 0xe000 &amp;&amp; usListChar &lt; 0xf900) ||
-<a name="l00158"></a>00158                     (usListChar &lt; 0x80 &amp;&amp; !isprint((<span class="keywordtype">int</span>)usListChar))) {
-<a name="l00159"></a>00159                         <span class="comment">/*</span>
-<a name="l00160"></a>00160 <span class="comment">                         * All remaining private area characters and all</span>
-<a name="l00161"></a>00161 <span class="comment">                         * remaining non-printable ASCII characters to their</span>
-<a name="l00162"></a>00162 <span class="comment">                         * default bullet character</span>
-<a name="l00163"></a>00163 <span class="comment">                         */</span>
-<a name="l00164"></a>00164                         DBG_HEX(usListChar);
-<a name="l00165"></a>00165                         DBG_FIXME();
-<a name="l00166"></a>00166                         <span class="keywordflow">if</span> (ucNFC == LIST_SPECIAL || ucNFC == LIST_SPECIAL2) {
-<a name="l00167"></a>00167                                 usListChar = 0x2190;    <span class="comment">/* LEFTWARDS ARROW */</span>
-<a name="l00168"></a>00168                         } <span class="keywordflow">else</span> {
-<a name="l00169"></a>00169                                 usListChar = 0x2022;    <span class="comment">/* BULLET */</span>
-<a name="l00170"></a>00170                         }
-<a name="l00171"></a>00171                 }
-<a name="l00172"></a>00172                 <span class="keywordflow">break</span>;
-<a name="l00173"></a>00173         }
-<a name="l00174"></a>00174 
-<a name="l00175"></a>00175         <span class="keywordflow">if</span> (eEncoding == encoding_utf_8) {
-<a name="l00176"></a>00176                 tLen = tUcs2Utf8(usListChar, szListChar, 4);
-<a name="l00177"></a>00177                 szListChar[tLen] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00178"></a>00178         } <span class="keywordflow">else</span> {
-<a name="l00179"></a>00179                 <span class="keywordflow">switch</span> (usListChar) {
-<a name="l00180"></a>00180                 <span class="keywordflow">case</span> 0x03d5: <span class="keywordflow">case</span> 0x25a1: <span class="keywordflow">case</span> 0x25c6: <span class="keywordflow">case</span> 0x25ca:
-<a name="l00181"></a>00181                 <span class="keywordflow">case</span> 0x2751:
-<a name="l00182"></a>00182                         szListChar[0] = <span class="charliteral">&#39;o&#39;</span>;
-<a name="l00183"></a>00183                         <span class="keywordflow">break</span>;
-<a name="l00184"></a>00184                 <span class="keywordflow">case</span> 0x2013: <span class="keywordflow">case</span> 0x2500:
-<a name="l00185"></a>00185                         szListChar[0] = <span class="charliteral">&#39;-&#39;</span>;
-<a name="l00186"></a>00186                         <span class="keywordflow">break</span>;
-<a name="l00187"></a>00187                 <span class="keywordflow">case</span> 0x2190: <span class="keywordflow">case</span> 0x2199: <span class="keywordflow">case</span> 0x2329:
-<a name="l00188"></a>00188                         szListChar[0] = <span class="charliteral">&#39;&lt;&#39;</span>;
-<a name="l00189"></a>00189                         <span class="keywordflow">break</span>;
-<a name="l00190"></a>00190                 <span class="keywordflow">case</span> 0x21d2:
-<a name="l00191"></a>00191                         szListChar[0] = <span class="charliteral">&#39;=&#39;</span>;
-<a name="l00192"></a>00192                         <span class="keywordflow">break</span>;
-<a name="l00193"></a>00193                 <span class="keywordflow">case</span> 0x21e8: <span class="keywordflow">case</span> 0x27a2:
-<a name="l00194"></a>00194                         szListChar[0] = <span class="charliteral">&#39;&gt;&#39;</span>;
-<a name="l00195"></a>00195                         <span class="keywordflow">break</span>;
-<a name="l00196"></a>00196                 <span class="keywordflow">case</span> 0x25a0: <span class="keywordflow">case</span> 0x25aa:
-<a name="l00197"></a>00197                         szListChar[0] = <span class="charliteral">&#39;.&#39;</span>;
-<a name="l00198"></a>00198                         <span class="keywordflow">break</span>;
-<a name="l00199"></a>00199                 <span class="keywordflow">case</span> 0x2666:
-<a name="l00200"></a>00200                         szListChar[0] = OUR_DIAMOND;
-<a name="l00201"></a>00201                         <span class="keywordflow">break</span>;
-<a name="l00202"></a>00202                 <span class="keywordflow">case</span> 0x270c:
-<a name="l00203"></a>00203                         szListChar[0] = <span class="charliteral">&#39;x&#39;</span>;
-<a name="l00204"></a>00204                         <span class="keywordflow">break</span>;
-<a name="l00205"></a>00205                 <span class="keywordflow">case</span> 0x2713:
-<a name="l00206"></a>00206                         szListChar[0] = <span class="charliteral">&#39;V&#39;</span>;
-<a name="l00207"></a>00207                         <span class="keywordflow">break</span>;
-<a name="l00208"></a>00208                 <span class="keywordflow">case</span> 0x2756:
-<a name="l00209"></a>00209                         szListChar[0] = <span class="charliteral">&#39;*&#39;</span>;
-<a name="l00210"></a>00210                         <span class="keywordflow">break</span>;
-<a name="l00211"></a>00211                 <span class="keywordflow">case</span> 0x2022:
-<a name="l00212"></a>00212                 <span class="keywordflow">default</span>:
-<a name="l00213"></a>00213                         vGetBulletValue(eConversionType, eEncoding,
-<a name="l00214"></a>00214                                         szListChar, 2);
-<a name="l00215"></a>00215                         <span class="keywordflow">break</span>;
-<a name="l00216"></a>00216                 }
-<a name="l00217"></a>00217                 tLen = 1;
-<a name="l00218"></a>00218         }
-<a name="l00219"></a>00219         szListChar[tLen] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00220"></a>00220 } <span class="comment">/* end of vConvertListCharacter */</span>
-<a name="l00221"></a>00221 
-<a name="l00222"></a>00222 <span class="comment">/*</span>
-<a name="l00223"></a>00223 <span class="comment"> * eGetNumType - get the level type from the given level number</span>
-<a name="l00224"></a>00224 <span class="comment"> *</span>
-<a name="l00225"></a>00225 <span class="comment"> * Returns the level type</span>
-<a name="l00226"></a>00226 <span class="comment"> */</span>
-<a name="l00227"></a>00227 level_type_enum
-<a name="l00228"></a>00228 eGetNumType(UCHAR ucNumLevel)
-<a name="l00229"></a>00229 {
-<a name="l00230"></a>00230         <span class="keywordflow">switch</span> (ucNumLevel) {
-<a name="l00231"></a>00231         <span class="keywordflow">case</span>  1: <span class="keywordflow">case</span>  2: <span class="keywordflow">case</span>  3: <span class="keywordflow">case</span>  4: <span class="keywordflow">case</span>  5:
-<a name="l00232"></a>00232         <span class="keywordflow">case</span>  6: <span class="keywordflow">case</span>  7: <span class="keywordflow">case</span>  8: <span class="keywordflow">case</span>  9:
-<a name="l00233"></a>00233                 <span class="keywordflow">return</span> level_type_outline;
-<a name="l00234"></a>00234         <span class="keywordflow">case</span> 10:
-<a name="l00235"></a>00235                 <span class="keywordflow">return</span> level_type_numbering;
-<a name="l00236"></a>00236         <span class="keywordflow">case</span> 11:
-<a name="l00237"></a>00237                 <span class="keywordflow">return</span> level_type_sequence;
-<a name="l00238"></a>00238         <span class="keywordflow">case</span> 12:
-<a name="l00239"></a>00239                 <span class="keywordflow">return</span> level_type_pause;
-<a name="l00240"></a>00240         <span class="keywordflow">default</span>:
-<a name="l00241"></a>00241                 <span class="keywordflow">return</span> level_type_none;
-<a name="l00242"></a>00242         }
-<a name="l00243"></a>00243 } <span class="comment">/* end of eGetNumType */</span>
-<a name="l00244"></a>00244 
-<a name="l00245"></a>00245 <span class="comment">/*</span>
-<a name="l00246"></a>00246 <span class="comment"> * vCorrectStyleValues - correct style values that Antiword can&#39;t use</span>
-<a name="l00247"></a>00247 <span class="comment"> */</span>
-<a name="l00248"></a>00248 <span class="keywordtype">void</span>
-<a name="l00249"></a>00249 vCorrectStyleValues(style_block_type *pStyleBlock)
-<a name="l00250"></a>00250 {
-<a name="l00251"></a>00251         <span class="keywordflow">if</span> (pStyleBlock-&gt;usBeforeIndent &gt; 0x7fff) {
-<a name="l00252"></a>00252                 pStyleBlock-&gt;usBeforeIndent = 0;
-<a name="l00253"></a>00253         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pStyleBlock-&gt;usBeforeIndent &gt; 2160) {
-<a name="l00254"></a>00254                 <span class="comment">/* 2160 twips = 1.5 inches or 38.1 mm */</span>
-<a name="l00255"></a>00255                 DBG_DEC(pStyleBlock-&gt;usBeforeIndent);
-<a name="l00256"></a>00256                 pStyleBlock-&gt;usBeforeIndent = 2160;
-<a name="l00257"></a>00257         }
-<a name="l00258"></a>00258         <span class="keywordflow">if</span> (pStyleBlock-&gt;usIstd &gt;= 1 &amp;&amp;
-<a name="l00259"></a>00259             pStyleBlock-&gt;usIstd &lt;= 9 &amp;&amp;
-<a name="l00260"></a>00260             pStyleBlock-&gt;usBeforeIndent &lt; HEADING_GAP) {
-<a name="l00261"></a>00261                 NO_DBG_DEC(pStyleBlock-&gt;usBeforeIndent);
-<a name="l00262"></a>00262                 pStyleBlock-&gt;usBeforeIndent = HEADING_GAP;
-<a name="l00263"></a>00263         }
-<a name="l00264"></a>00264 
-<a name="l00265"></a>00265         <span class="keywordflow">if</span> (pStyleBlock-&gt;usAfterIndent &gt; 0x7fff) {
-<a name="l00266"></a>00266                 pStyleBlock-&gt;usAfterIndent = 0;
-<a name="l00267"></a>00267         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pStyleBlock-&gt;usAfterIndent &gt; 2160) {
-<a name="l00268"></a>00268                 <span class="comment">/* 2160 twips = 1.5 inches or 38.1 mm */</span>
-<a name="l00269"></a>00269                 DBG_DEC(pStyleBlock-&gt;usAfterIndent);
-<a name="l00270"></a>00270                 pStyleBlock-&gt;usAfterIndent = 2160;
-<a name="l00271"></a>00271         }
-<a name="l00272"></a>00272         <span class="keywordflow">if</span> (pStyleBlock-&gt;usIstd &gt;= 1 &amp;&amp;
-<a name="l00273"></a>00273             pStyleBlock-&gt;usIstd &lt;= 9 &amp;&amp;
-<a name="l00274"></a>00274             pStyleBlock-&gt;usAfterIndent &lt; HEADING_GAP) {
-<a name="l00275"></a>00275                 NO_DBG_DEC(pStyleBlock-&gt;usAfterIndent);
-<a name="l00276"></a>00276                 pStyleBlock-&gt;usAfterIndent = HEADING_GAP;
-<a name="l00277"></a>00277         }
-<a name="l00278"></a>00278 
-<a name="l00279"></a>00279         <span class="keywordflow">if</span> (pStyleBlock-&gt;sLeftIndent &lt; 0) {
-<a name="l00280"></a>00280                 pStyleBlock-&gt;sLeftIndent = 0;
-<a name="l00281"></a>00281         }
-<a name="l00282"></a>00282         <span class="keywordflow">if</span> (pStyleBlock-&gt;sRightIndent &gt; 0) {
-<a name="l00283"></a>00283                 pStyleBlock-&gt;sRightIndent = 0;
-<a name="l00284"></a>00284         }
-<a name="l00285"></a>00285         vConvertListCharacter(pStyleBlock-&gt;ucNFC,
-<a name="l00286"></a>00286                         pStyleBlock-&gt;usListChar,
-<a name="l00287"></a>00287                         pStyleBlock-&gt;szListChar);
-<a name="l00288"></a>00288 } <span class="comment">/* end of vCorrectStyleValues */</span>
-<a name="l00289"></a>00289 
-<a name="l00290"></a>00290 <span class="comment">/*</span>
-<a name="l00291"></a>00291 <span class="comment"> * vAdd2StyleInfoList - Add an element to the Style Information List</span>
-<a name="l00292"></a>00292 <span class="comment"> */</span>
-<a name="l00293"></a>00293 <span class="keywordtype">void</span>
-<a name="l00294"></a>00294 vAdd2StyleInfoList(<span class="keyword">const</span> style_block_type *pStyleBlock)
-<a name="l00295"></a>00295 {
-<a name="l00296"></a>00296         style_mem_type  *pListMember;
-<a name="l00297"></a>00297 
-<a name="l00298"></a>00298         fail(pStyleBlock == NULL);
-<a name="l00299"></a>00299 
-<a name="l00300"></a>00300         NO_DBG_MSG(<span class="stringliteral">&quot;bAdd2StyleInfoList&quot;</span>);
-<a name="l00301"></a>00301 
-<a name="l00302"></a>00302         <span class="keywordflow">if</span> (pStyleBlock-&gt;ulFileOffset == FC_INVALID) {
-<a name="l00303"></a>00303                 NO_DBG_DEC(pStyleBlock-&gt;usIstd);
-<a name="l00304"></a>00304                 <span class="keywordflow">return</span>;
-<a name="l00305"></a>00305         }
-<a name="l00306"></a>00306 
-<a name="l00307"></a>00307         NO_DBG_HEX(pStyleBlock-&gt;ulFileOffset);
-<a name="l00308"></a>00308         NO_DBG_DEC_C(pStyleBlock-&gt;sLeftIndent != 0,
-<a name="l00309"></a>00309                                         pStyleBlock-&gt;sLeftIndent);
-<a name="l00310"></a>00310         NO_DBG_DEC_C(pStyleBlock-&gt;sRightIndent != 0,
-<a name="l00311"></a>00311                                         pStyleBlock-&gt;sRightIndent);
-<a name="l00312"></a>00312         NO_DBG_DEC_C(pStyleBlock-&gt;bNumPause, pStyleBlock-&gt;bNumPause);
-<a name="l00313"></a>00313         NO_DBG_DEC_C(pStyleBlock-&gt;usIstd != 0, pStyleBlock-&gt;usIstd);
-<a name="l00314"></a>00314         NO_DBG_DEC_C(pStyleBlock-&gt;usStartAt != 1, pStyleBlock-&gt;usStartAt);
-<a name="l00315"></a>00315         NO_DBG_DEC_C(pStyleBlock-&gt;usAfterIndent != 0,
-<a name="l00316"></a>00316                                         pStyleBlock-&gt;usAfterIndent);
-<a name="l00317"></a>00317         NO_DBG_DEC_C(pStyleBlock-&gt;ucAlignment != 0, pStyleBlock-&gt;ucAlignment);
-<a name="l00318"></a>00318         NO_DBG_DEC(pStyleBlock-&gt;ucNFC);
-<a name="l00319"></a>00319         NO_DBG_HEX(pStyleBlock-&gt;usListChar);
-<a name="l00320"></a>00320 
-<a name="l00321"></a>00321         <span class="keywordflow">if</span> (pStyleLast != NULL &amp;&amp;
-<a name="l00322"></a>00322             pStyleLast-&gt;tInfo.ulFileOffset == pStyleBlock-&gt;ulFileOffset) {
-<a name="l00323"></a>00323                 <span class="comment">/*</span>
-<a name="l00324"></a>00324 <span class="comment">                 * If two consecutive styles share the same</span>
-<a name="l00325"></a>00325 <span class="comment">                 * offset, remember only the last style</span>
-<a name="l00326"></a>00326 <span class="comment">                 */</span>
-<a name="l00327"></a>00327                 fail(pStyleLast-&gt;pNext != NULL);
-<a name="l00328"></a>00328                 pStyleLast-&gt;tInfo = *pStyleBlock;
-<a name="l00329"></a>00329                 <span class="comment">/* Correct the values where needed */</span>
-<a name="l00330"></a>00330                 vCorrectStyleValues(&amp;pStyleLast-&gt;tInfo);
-<a name="l00331"></a>00331                 <span class="keywordflow">return</span>;
-<a name="l00332"></a>00332         }
-<a name="l00333"></a>00333 
-<a name="l00334"></a>00334         <span class="comment">/* Create list member */</span>
-<a name="l00335"></a>00335         pListMember = xmalloc(<span class="keyword">sizeof</span>(style_mem_type));
-<a name="l00336"></a>00336         <span class="comment">/* Fill the list member */</span>
-<a name="l00337"></a>00337         pListMember-&gt;tInfo = *pStyleBlock;
-<a name="l00338"></a>00338         pListMember-&gt;pNext = NULL;
-<a name="l00339"></a>00339         <span class="comment">/* Add the sequence number */</span>
-<a name="l00340"></a>00340         pListMember-&gt;ulSequenceNumber =
-<a name="l00341"></a>00341                         ulGetSeqNumber(pListMember-&gt;tInfo.ulFileOffset);
-<a name="l00342"></a>00342         <span class="comment">/* Correct the values where needed */</span>
-<a name="l00343"></a>00343         vCorrectStyleValues(&amp;pListMember-&gt;tInfo);
-<a name="l00344"></a>00344         <span class="comment">/* Add the new member to the list */</span>
-<a name="l00345"></a>00345         <span class="keywordflow">if</span> (pAnchor == NULL) {
-<a name="l00346"></a>00346                 pAnchor = pListMember;
-<a name="l00347"></a>00347                 <span class="comment">/* For efficiency */</span>
-<a name="l00348"></a>00348                 pMidPtr = pAnchor;
-<a name="l00349"></a>00349                 bMoveMidPtr = FALSE;
-<a name="l00350"></a>00350                 bInSequence = TRUE;
-<a name="l00351"></a>00351         } <span class="keywordflow">else</span> {
-<a name="l00352"></a>00352                 fail(pStyleLast == NULL);
-<a name="l00353"></a>00353                 pStyleLast-&gt;pNext = pListMember;
-<a name="l00354"></a>00354                 <span class="comment">/* For efficiency */</span>
-<a name="l00355"></a>00355                 <span class="keywordflow">if</span> (bMoveMidPtr) {
-<a name="l00356"></a>00356                         pMidPtr = pMidPtr-&gt;pNext;
-<a name="l00357"></a>00357                         bMoveMidPtr = FALSE;
-<a name="l00358"></a>00358                 } <span class="keywordflow">else</span> {
-<a name="l00359"></a>00359                         bMoveMidPtr = TRUE;
-<a name="l00360"></a>00360                 }
-<a name="l00361"></a>00361                 <span class="keywordflow">if</span> (bInSequence) {
-<a name="l00362"></a>00362                         bInSequence = pListMember-&gt;ulSequenceNumber &gt;
-<a name="l00363"></a>00363                                         pStyleLast-&gt;ulSequenceNumber;
-<a name="l00364"></a>00364                 }
-<a name="l00365"></a>00365         }
-<a name="l00366"></a>00366         pStyleLast = pListMember;
-<a name="l00367"></a>00367 } <span class="comment">/* end of vAdd2StyleInfoList */</span>
-<a name="l00368"></a>00368 
-<a name="l00369"></a>00369 <span class="comment">/*</span>
-<a name="l00370"></a>00370 <span class="comment"> * Get the record that follows the given recored in the Style Information List</span>
-<a name="l00371"></a>00371 <span class="comment"> */</span>
-<a name="l00372"></a>00372 <span class="keyword">const</span> style_block_type *
-<a name="l00373"></a>00373 pGetNextStyleInfoListItem(<span class="keyword">const</span> style_block_type *pCurr)
-<a name="l00374"></a>00374 {
-<a name="l00375"></a>00375         <span class="keyword">const</span> style_mem_type    *pRecord;
-<a name="l00376"></a>00376         <span class="keywordtype">size_t</span>  tOffset;
-<a name="l00377"></a>00377 
-<a name="l00378"></a>00378         <span class="keywordflow">if</span> (pCurr == NULL) {
-<a name="l00379"></a>00379                 <span class="keywordflow">if</span> (pAnchor == NULL) {
-<a name="l00380"></a>00380                         <span class="comment">/* There are no records */</span>
-<a name="l00381"></a>00381                         <span class="keywordflow">return</span> NULL;
-<a name="l00382"></a>00382                 }
-<a name="l00383"></a>00383                 <span class="comment">/* The first record is the only one without a predecessor */</span>
-<a name="l00384"></a>00384                 <span class="keywordflow">return</span> &amp;pAnchor-&gt;tInfo;
-<a name="l00385"></a>00385         }
-<a name="l00386"></a>00386         tOffset = offsetof(style_mem_type, tInfo);
-<a name="l00387"></a>00387         <span class="comment">/* Many casts to prevent alignment warnings */</span>
-<a name="l00388"></a>00388         pRecord = (style_mem_type *)(<span class="keywordtype">void</span> *)((<span class="keywordtype">char</span> *)pCurr - tOffset);
-<a name="l00389"></a>00389         fail(pCurr != &amp;pRecord-&gt;tInfo);
-<a name="l00390"></a>00390         <span class="keywordflow">if</span> (pRecord-&gt;pNext == NULL) {
-<a name="l00391"></a>00391                 <span class="comment">/* The last record has no successor */</span>
-<a name="l00392"></a>00392                 <span class="keywordflow">return</span> NULL;
-<a name="l00393"></a>00393         }
-<a name="l00394"></a>00394         <span class="keywordflow">return</span> &amp;pRecord-&gt;pNext-&gt;tInfo;
-<a name="l00395"></a>00395 } <span class="comment">/* end of pGetNextStyleInfoListItem */</span>
-<a name="l00396"></a>00396 
-<a name="l00397"></a>00397 <span class="comment">/*</span>
-<a name="l00398"></a>00398 <span class="comment"> * Get the next text style</span>
-<a name="l00399"></a>00399 <span class="comment"> */</span>
-<a name="l00400"></a>00400 <span class="keyword">const</span> style_block_type *
-<a name="l00401"></a>00401 pGetNextTextStyle(<span class="keyword">const</span> style_block_type *pCurr)
-<a name="l00402"></a>00402 {
-<a name="l00403"></a>00403         <span class="keyword">const</span> style_block_type  *pRecord;
-<a name="l00404"></a>00404 
-<a name="l00405"></a>00405         pRecord = pCurr;
-<a name="l00406"></a>00406         <span class="keywordflow">do</span> {
-<a name="l00407"></a>00407                 pRecord = pGetNextStyleInfoListItem(pRecord);
-<a name="l00408"></a>00408         } <span class="keywordflow">while</span> (pRecord != NULL &amp;&amp;
-<a name="l00409"></a>00409                  (pRecord-&gt;eListID == hdrftr_list ||
-<a name="l00410"></a>00410                   pRecord-&gt;eListID == macro_list ||
-<a name="l00411"></a>00411                   pRecord-&gt;eListID == annotation_list));
-<a name="l00412"></a>00412         <span class="keywordflow">return</span> pRecord;
-<a name="l00413"></a>00413 } <span class="comment">/* end of pGetNextTextStyle */</span>
-<a name="l00414"></a>00414 
-<a name="l00415"></a>00415 <span class="comment">/*</span>
-<a name="l00416"></a>00416 <span class="comment"> * usGetIstd - get the istd that belongs to the given file offset</span>
-<a name="l00417"></a>00417 <span class="comment"> */</span>
-<a name="l00418"></a>00418 USHORT
-<a name="l00419"></a>00419 usGetIstd(ULONG ulFileOffset)
-<a name="l00420"></a>00420 {
-<a name="l00421"></a>00421         <span class="keyword">const</span> style_mem_type    *pCurr, *pBest, *pStart;
-<a name="l00422"></a>00422         ULONG   ulSeq, ulBest;
-<a name="l00423"></a>00423 
-<a name="l00424"></a>00424         ulSeq = ulGetSeqNumber(ulFileOffset);
-<a name="l00425"></a>00425         <span class="keywordflow">if</span> (ulSeq == FC_INVALID) {
-<a name="l00426"></a>00426                 <span class="keywordflow">return</span> ISTD_NORMAL;
-<a name="l00427"></a>00427         }
-<a name="l00428"></a>00428         NO_DBG_HEX(ulFileOffset);
-<a name="l00429"></a>00429         NO_DBG_DEC(ulSeq);
-<a name="l00430"></a>00430 
-<a name="l00431"></a>00431         <span class="keywordflow">if</span> (bInSequence &amp;&amp;
-<a name="l00432"></a>00432             pMidPtr != NULL &amp;&amp;
-<a name="l00433"></a>00433             ulSeq &gt; pMidPtr-&gt;ulSequenceNumber) {
-<a name="l00434"></a>00434                 <span class="comment">/* The istd is in the second half of the chained list */</span>
-<a name="l00435"></a>00435                 pStart = pMidPtr;
-<a name="l00436"></a>00436         } <span class="keywordflow">else</span> {
-<a name="l00437"></a>00437                 pStart = pAnchor;
-<a name="l00438"></a>00438         }
-<a name="l00439"></a>00439 
-<a name="l00440"></a>00440         pBest = NULL;
-<a name="l00441"></a>00441         ulBest = 0;
-<a name="l00442"></a>00442         <span class="keywordflow">for</span> (pCurr = pStart; pCurr != NULL; pCurr = pCurr-&gt;pNext) {
-<a name="l00443"></a>00443                 <span class="keywordflow">if</span> (pCurr-&gt;ulSequenceNumber != FC_INVALID &amp;&amp;
-<a name="l00444"></a>00444                     (pBest == NULL || pCurr-&gt;ulSequenceNumber &gt; ulBest) &amp;&amp;
-<a name="l00445"></a>00445                     pCurr-&gt;ulSequenceNumber &lt;= ulSeq) {
-<a name="l00446"></a>00446                         pBest = pCurr;
-<a name="l00447"></a>00447                         ulBest = pCurr-&gt;ulSequenceNumber;
-<a name="l00448"></a>00448                 }
-<a name="l00449"></a>00449                 <span class="keywordflow">if</span> (bInSequence &amp;&amp; pCurr-&gt;ulSequenceNumber &gt; ulSeq) {
-<a name="l00450"></a>00450                         <span class="keywordflow">break</span>;
-<a name="l00451"></a>00451                 }
-<a name="l00452"></a>00452         }
-<a name="l00453"></a>00453         NO_DBG_DEC(ulBest);
-<a name="l00454"></a>00454 
-<a name="l00455"></a>00455         <span class="keywordflow">if</span> (pBest == NULL) {
-<a name="l00456"></a>00456                 <span class="keywordflow">return</span> ISTD_NORMAL;
-<a name="l00457"></a>00457         }
-<a name="l00458"></a>00458 
-<a name="l00459"></a>00459         NO_DBG_DEC(pBest-&gt;tInfo.usIstd);
-<a name="l00460"></a>00460         <span class="keywordflow">return</span> pBest-&gt;tInfo.usIstd;
-<a name="l00461"></a>00461 } <span class="comment">/* end of usGetIstd */</span>
-<a name="l00462"></a>00462 
-<a name="l00463"></a>00463 <span class="comment">/*</span>
-<a name="l00464"></a>00464 <span class="comment"> * bStyleImpliesList - does style info implies being part of a list</span>
-<a name="l00465"></a>00465 <span class="comment"> *</span>
-<a name="l00466"></a>00466 <span class="comment"> * Decide whether the style information implies that the given paragraph is</span>
-<a name="l00467"></a>00467 <span class="comment"> * part of a list</span>
-<a name="l00468"></a>00468 <span class="comment"> *</span>
-<a name="l00469"></a>00469 <span class="comment"> * Returns TRUE when the paragraph is part of a list, otherwise FALSE</span>
-<a name="l00470"></a>00470 <span class="comment"> */</span>
-<a name="l00471"></a>00471 BOOL
-<a name="l00472"></a>00472 bStyleImpliesList(<span class="keyword">const</span> style_block_type *pStyle, <span class="keywordtype">int</span> iWordVersion)
-<a name="l00473"></a>00473 {
-<a name="l00474"></a>00474         fail(pStyle == NULL);
-<a name="l00475"></a>00475         fail(iWordVersion &lt; 0);
-<a name="l00476"></a>00476 
-<a name="l00477"></a>00477         <span class="keywordflow">if</span> (pStyle-&gt;usIstd &gt;= 1 &amp;&amp; pStyle-&gt;usIstd &lt;= 9) {
-<a name="l00478"></a>00478                 <span class="comment">/* These are heading levels */</span>
-<a name="l00479"></a>00479                 <span class="keywordflow">return</span> FALSE;
-<a name="l00480"></a>00480         }
-<a name="l00481"></a>00481         <span class="keywordflow">if</span> (iWordVersion &lt; 8) {
-<a name="l00482"></a>00482                 <span class="comment">/* Check for old style lists */</span>
-<a name="l00483"></a>00483                 <span class="keywordflow">return</span> pStyle-&gt;ucNumLevel != 0;
-<a name="l00484"></a>00484         }
-<a name="l00485"></a>00485         <span class="comment">/* Check for new style lists */</span>
-<a name="l00486"></a>00486         <span class="keywordflow">return</span> pStyle-&gt;usListIndex != 0;
-<a name="l00487"></a>00487 } <span class="comment">/* end of bStyleImpliesList */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/stylesheet_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,854 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/stylesheet.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/stylesheet.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * stylesheet.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2001-2004 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Build, read and destroy a list of stylesheet information</span>
-<a name="l00007"></a>00007 <span class="comment"> *</span>
-<a name="l00008"></a>00008 <span class="comment"> */</span>
-<a name="l00009"></a>00009 
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 
-<a name="l00014"></a>00014 <span class="preprocessor">#define SGC_PAP         1</span>
-<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#define SGC_CHP         2</span>
-<a name="l00016"></a>00016 <span class="preprocessor"></span>
-<a name="l00017"></a>00017 <span class="comment">/* Variables needed to describe the stylesheet list */</span>
-<a name="l00018"></a>00018 <span class="keyword">static</span> style_block_type *atStyleInfo = NULL;
-<a name="l00019"></a>00019 <span class="keyword">static</span> font_block_type  *atFontInfo = NULL;
-<a name="l00020"></a>00020 <span class="keyword">static</span> BOOL             *abFilled = NULL;
-<a name="l00021"></a>00021 <span class="keyword">static</span> <span class="keywordtype">size_t</span>           tStdCount = 0;
-<a name="l00022"></a>00022 
-<a name="l00023"></a>00023 
-<a name="l00024"></a>00024 <span class="comment">/*</span>
-<a name="l00025"></a>00025 <span class="comment"> * vDestroyStylesheetList - destroy the stylesheet list</span>
-<a name="l00026"></a>00026 <span class="comment"> */</span>
-<a name="l00027"></a>00027 <span class="keywordtype">void</span>
-<a name="l00028"></a>00028 vDestroyStylesheetList(<span class="keywordtype">void</span>)
-<a name="l00029"></a>00029 {
-<a name="l00030"></a>00030         DBG_MSG(<span class="stringliteral">&quot;vDestroyStylesheetList&quot;</span>);
-<a name="l00031"></a>00031 
-<a name="l00032"></a>00032         tStdCount = 0;
-<a name="l00033"></a>00033         atStyleInfo = xfree(atStyleInfo);
-<a name="l00034"></a>00034         atFontInfo = xfree(atFontInfo);
-<a name="l00035"></a>00035         abFilled = xfree(abFilled);
-<a name="l00036"></a>00036 } <span class="comment">/* end of vDestroyStylesheetList */</span>
-<a name="l00037"></a>00037 
-<a name="l00038"></a>00038 <span class="comment">/*</span>
-<a name="l00039"></a>00039 <span class="comment"> * vGetDefaultStyle - fill the style struct with default values</span>
-<a name="l00040"></a>00040 <span class="comment"> */</span>
-<a name="l00041"></a>00041 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00042"></a>00042 vGetDefaultStyle(style_block_type *pStyle)
-<a name="l00043"></a>00043 {
-<a name="l00044"></a>00044         (void)memset(pStyle, 0, <span class="keyword">sizeof</span>(*pStyle));
-<a name="l00045"></a>00045         pStyle-&gt;usIstd = ISTD_INVALID;
-<a name="l00046"></a>00046         pStyle-&gt;usIstdNext = ISTD_INVALID;
-<a name="l00047"></a>00047         pStyle-&gt;usStartAt = 1;
-<a name="l00048"></a>00048         pStyle-&gt;ucListLevel = 9;
-<a name="l00049"></a>00049 } <span class="comment">/* end of vGetDefaultStyle */</span>
-<a name="l00050"></a>00050 
-<a name="l00051"></a>00051 <span class="comment">/*</span>
-<a name="l00052"></a>00052 <span class="comment"> * vGetDefaultFont - fill the font struct with default values</span>
-<a name="l00053"></a>00053 <span class="comment"> */</span>
-<a name="l00054"></a>00054 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00055"></a>00055 vGetDefaultFont(font_block_type *pFont, USHORT usDefaultFontNumber)
-<a name="l00056"></a>00056 {
-<a name="l00057"></a>00057         (void)memset(pFont, 0, <span class="keyword">sizeof</span>(*pFont));
-<a name="l00058"></a>00058         pFont-&gt;usFontSize = DEFAULT_FONT_SIZE;
-<a name="l00059"></a>00059         <span class="keywordflow">if</span> (usDefaultFontNumber &lt;= (USHORT)UCHAR_MAX) {
-<a name="l00060"></a>00060                 pFont-&gt;ucFontNumber = (UCHAR)usDefaultFontNumber;
-<a name="l00061"></a>00061         } <span class="keywordflow">else</span> {
-<a name="l00062"></a>00062                 DBG_DEC(usDefaultFontNumber);
-<a name="l00063"></a>00063                 DBG_FIXME();
-<a name="l00064"></a>00064                 pFont-&gt;ucFontNumber = 0;
-<a name="l00065"></a>00065         }
-<a name="l00066"></a>00066 } <span class="comment">/* end of vGetDefaultFont */</span>
-<a name="l00067"></a>00067 
-<a name="l00068"></a>00068 <span class="comment">/*</span>
-<a name="l00069"></a>00069 <span class="comment"> * iGetStyleIndex - get the index of the record with the specified istd</span>
-<a name="l00070"></a>00070 <span class="comment"> *</span>
-<a name="l00071"></a>00071 <span class="comment"> * returns the index when found, otherwise -1</span>
-<a name="l00072"></a>00072 <span class="comment"> */</span>
-<a name="l00073"></a>00073 <span class="keyword">static</span> <span class="keywordtype">int</span>
-<a name="l00074"></a>00074 iGetStyleIndex(USHORT usIstd)
-<a name="l00075"></a>00075 {
-<a name="l00076"></a>00076         <span class="keywordtype">int</span>     iIndex;
-<a name="l00077"></a>00077 
-<a name="l00078"></a>00078         fail(abFilled == NULL);
-<a name="l00079"></a>00079 
-<a name="l00080"></a>00080         <span class="keywordflow">if</span> (usIstd == ISTD_INVALID || abFilled == NULL) {
-<a name="l00081"></a>00081                 <span class="keywordflow">return</span> -1;
-<a name="l00082"></a>00082         }
-<a name="l00083"></a>00083 
-<a name="l00084"></a>00084         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; (int)tStdCount; iIndex++) {
-<a name="l00085"></a>00085                 <span class="keywordflow">if</span> (abFilled[iIndex] &amp;&amp; atStyleInfo[iIndex].usIstd == usIstd) {
-<a name="l00086"></a>00086                         <span class="comment">/* The record is filled and the istd matches */</span>
-<a name="l00087"></a>00087                         <span class="keywordflow">return</span> iIndex;
-<a name="l00088"></a>00088                 }
-<a name="l00089"></a>00089         }
-<a name="l00090"></a>00090         <span class="keywordflow">return</span> -1;
-<a name="l00091"></a>00091 } <span class="comment">/* end of iGetStyleIndex */</span>
-<a name="l00092"></a>00092 
-<a name="l00093"></a>00093 <span class="comment">/*</span>
-<a name="l00094"></a>00094 <span class="comment"> * Get a build-in style for Winword 1/2</span>
-<a name="l00095"></a>00095 <span class="comment"> */</span>
-<a name="l00096"></a>00096 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00097"></a>00097 vGetBuildinStyle(UCHAR ucStc, style_block_type *pStyle)
-<a name="l00098"></a>00098 {
-<a name="l00099"></a>00099         fail(pStyle == NULL);
-<a name="l00100"></a>00100 
-<a name="l00101"></a>00101         <span class="comment">/* Start with de defaults */</span>
-<a name="l00102"></a>00102         vGetDefaultStyle(pStyle);
-<a name="l00103"></a>00103 
-<a name="l00104"></a>00104         <span class="comment">/* Add the build-in style info */</span>
-<a name="l00105"></a>00105         <span class="keywordflow">switch</span> (ucStc) {
-<a name="l00106"></a>00106         <span class="keywordflow">case</span> 246:
-<a name="l00107"></a>00107         <span class="keywordflow">case</span> 247:
-<a name="l00108"></a>00108         <span class="keywordflow">case</span> 248:
-<a name="l00109"></a>00109         <span class="keywordflow">case</span> 249:
-<a name="l00110"></a>00110         <span class="keywordflow">case</span> 250:
-<a name="l00111"></a>00111         <span class="keywordflow">case</span> 255:
-<a name="l00112"></a>00112                 pStyle-&gt;sLeftIndent = 720;
-<a name="l00113"></a>00113                 <span class="keywordflow">break</span>;
-<a name="l00114"></a>00114         <span class="keywordflow">case</span> 251:
-<a name="l00115"></a>00115         <span class="keywordflow">case</span> 252:
-<a name="l00116"></a>00116                 pStyle-&gt;sLeftIndent = 360;
-<a name="l00117"></a>00117                 <span class="keywordflow">break</span>;
-<a name="l00118"></a>00118         <span class="keywordflow">case</span> 253:
-<a name="l00119"></a>00119                 pStyle-&gt;usBeforeIndent = 120;
-<a name="l00120"></a>00120                 <span class="keywordflow">break</span>;
-<a name="l00121"></a>00121         <span class="keywordflow">case</span> 254:
-<a name="l00122"></a>00122                 pStyle-&gt;usBeforeIndent = 240;
-<a name="l00123"></a>00123                 <span class="keywordflow">break</span>;
-<a name="l00124"></a>00124         <span class="keywordflow">default</span>:
-<a name="l00125"></a>00125                 <span class="keywordflow">if</span> (ucStc &gt;= 233 &amp;&amp; ucStc &lt;= 239) {
-<a name="l00126"></a>00126                         pStyle-&gt;sLeftIndent = (239 - (short)ucStc) * 360;
-<a name="l00127"></a>00127                 }
-<a name="l00128"></a>00128                 <span class="keywordflow">if</span> (ucStc &gt;= 225 &amp;&amp; ucStc &lt;= 232) {
-<a name="l00129"></a>00129                         pStyle-&gt;sLeftIndent = (232 - (short)ucStc) * 720;
-<a name="l00130"></a>00130                         pStyle-&gt;sRightIndent = 720;
-<a name="l00131"></a>00131                 }
-<a name="l00132"></a>00132                 <span class="keywordflow">break</span>;
-<a name="l00133"></a>00133         }
-<a name="l00134"></a>00134 } <span class="comment">/* end of vGetBuildinStyle */</span>
-<a name="l00135"></a>00135 
-<a name="l00136"></a>00136 <span class="comment">/*</span>
-<a name="l00137"></a>00137 <span class="comment"> * Get a build-in fontstyle for Winword 1/2</span>
-<a name="l00138"></a>00138 <span class="comment"> */</span>
-<a name="l00139"></a>00139 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00140"></a>00140 vGetBuildinFont(UCHAR ucStc, font_block_type *pFont)
-<a name="l00141"></a>00141 {
-<a name="l00142"></a>00142         fail(pFont == NULL);
-<a name="l00143"></a>00143 
-<a name="l00144"></a>00144         <span class="comment">/* Start with de defaults */</span>
-<a name="l00145"></a>00145         vGetDefaultFont(pFont, 0);
-<a name="l00146"></a>00146 
-<a name="l00147"></a>00147         <span class="comment">/* Add the build-in fontstyle info */</span>
-<a name="l00148"></a>00148         <span class="keywordflow">switch</span> (ucStc) {
-<a name="l00149"></a>00149         <span class="keywordflow">case</span> 223:
-<a name="l00150"></a>00150         <span class="keywordflow">case</span> 244:
-<a name="l00151"></a>00151                 pFont-&gt;usFontSize = 16;
-<a name="l00152"></a>00152                 <span class="keywordflow">break</span>;
-<a name="l00153"></a>00153         <span class="keywordflow">case</span> 246:
-<a name="l00154"></a>00154         <span class="keywordflow">case</span> 247:
-<a name="l00155"></a>00155         <span class="keywordflow">case</span> 248:
-<a name="l00156"></a>00156                 pFont-&gt;usFontStyle |= FONT_ITALIC;
-<a name="l00157"></a>00157                 <span class="keywordflow">break</span>;
-<a name="l00158"></a>00158         <span class="keywordflow">case</span> 249:
-<a name="l00159"></a>00159                 pFont-&gt;usFontStyle |= FONT_UNDERLINE;
-<a name="l00160"></a>00160                 <span class="keywordflow">break</span>;
-<a name="l00161"></a>00161         <span class="keywordflow">case</span> 250:
-<a name="l00162"></a>00162                 pFont-&gt;usFontStyle |= FONT_BOLD;
-<a name="l00163"></a>00163                 <span class="keywordflow">break</span>;
-<a name="l00164"></a>00164         <span class="keywordflow">case</span> 251:
-<a name="l00165"></a>00165                 pFont-&gt;usFontStyle |= FONT_UNDERLINE;
-<a name="l00166"></a>00166                 pFont-&gt;usFontSize = 24;
-<a name="l00167"></a>00167                 <span class="keywordflow">break</span>;
-<a name="l00168"></a>00168         <span class="keywordflow">case</span> 252:
-<a name="l00169"></a>00169                 pFont-&gt;usFontStyle |= FONT_BOLD;
-<a name="l00170"></a>00170                 pFont-&gt;usFontSize = 24;
-<a name="l00171"></a>00171                 <span class="keywordflow">break</span>;
-<a name="l00172"></a>00172         <span class="keywordflow">case</span> 253:
-<a name="l00173"></a>00173                 pFont-&gt;ucFontNumber = 2;
-<a name="l00174"></a>00174                 pFont-&gt;usFontStyle |= FONT_BOLD;
-<a name="l00175"></a>00175                 pFont-&gt;usFontSize = 24;
-<a name="l00176"></a>00176                 <span class="keywordflow">break</span>;
-<a name="l00177"></a>00177         <span class="keywordflow">case</span> 254:
-<a name="l00178"></a>00178                 pFont-&gt;ucFontNumber = 2;
-<a name="l00179"></a>00179                 pFont-&gt;usFontStyle |= (FONT_BOLD|FONT_UNDERLINE);
-<a name="l00180"></a>00180                 pFont-&gt;usFontSize = 24;
-<a name="l00181"></a>00181                 <span class="keywordflow">break</span>;
-<a name="l00182"></a>00182         <span class="keywordflow">default</span>:
-<a name="l00183"></a>00183                 <span class="keywordflow">break</span>;
-<a name="l00184"></a>00184         }
-<a name="l00185"></a>00185 } <span class="comment">/* end of vGetBuildinFont */</span>
-<a name="l00186"></a>00186 
-<a name="l00187"></a>00187 <span class="comment">/*</span>
-<a name="l00188"></a>00188 <span class="comment"> * Convert a stylecode (stc) as used by WinWord 1/2 into a styleindex (istd)</span>
-<a name="l00189"></a>00189 <span class="comment"> * as used by Word 6 and up</span>
-<a name="l00190"></a>00190 <span class="comment"> */</span>
-<a name="l00191"></a>00191 USHORT
-<a name="l00192"></a>00192 usStc2istd(UCHAR ucStc)
-<a name="l00193"></a>00193 {
-<a name="l00194"></a>00194         <span class="comment">/* Old nil style to new nil style */</span>
-<a name="l00195"></a>00195         <span class="keywordflow">if</span> (ucStc == 222) {
-<a name="l00196"></a>00196                 <span class="keywordflow">return</span> STI_NIL;
-<a name="l00197"></a>00197         }
-<a name="l00198"></a>00198 
-<a name="l00199"></a>00199         <span class="comment">/* Heading 1 through 9 must become istd 1 through 9 */</span>
-<a name="l00200"></a>00200         <span class="comment">/* so 254 through 246 must become 1 through 9 and vice versa */</span>
-<a name="l00201"></a>00201         <span class="keywordflow">if</span> ((ucStc &gt;= 1 &amp;&amp; ucStc &lt;= 9) ||
-<a name="l00202"></a>00202             (ucStc &gt;= 246 &amp;&amp; ucStc &lt;= 254)) {
-<a name="l00203"></a>00203                 <span class="keywordflow">return</span> 255 - (USHORT)ucStc;
-<a name="l00204"></a>00204         }
-<a name="l00205"></a>00205         <span class="keywordflow">return</span> (USHORT)ucStc;
-<a name="l00206"></a>00206 } <span class="comment">/* end of usStd2istd */</span>
-<a name="l00207"></a>00207 
-<a name="l00208"></a>00208 <span class="comment">/*</span>
-<a name="l00209"></a>00209 <span class="comment"> * Build the lists with Stylesheet Information for WinWord 1/2 files</span>
-<a name="l00210"></a>00210 <span class="comment"> */</span>
-<a name="l00211"></a>00211 <span class="keywordtype">void</span>
-<a name="l00212"></a>00212 vGet2Stylesheet(FILE *pFile, <span class="keywordtype">int</span> iWordVersion, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00213"></a>00213 {
-<a name="l00214"></a>00214         style_block_type        *pStyle;
-<a name="l00215"></a>00215         font_block_type         *pFont;
-<a name="l00216"></a>00216         UCHAR   *aucBuffer;
-<a name="l00217"></a>00217         ULONG   ulBeginStshInfo;
-<a name="l00218"></a>00218         <span class="keywordtype">size_t</span>  tStshInfoLen, tName, tChpx, tPapx, tMaxIndex;
-<a name="l00219"></a>00219         <span class="keywordtype">int</span>     iStIndex, iChpxIndex, iPapxIndex, iSt, iChpx, iPapx;
-<a name="l00220"></a>00220         <span class="keywordtype">int</span>     iStd, iIndex, iBaseStyleIndex, iCounter;
-<a name="l00221"></a>00221         USHORT  usBaseStyle;
-<a name="l00222"></a>00222         UCHAR   ucStc, ucStcNext, ucStcBase;
-<a name="l00223"></a>00223 
-<a name="l00224"></a>00224         fail(pFile == NULL || aucHeader == NULL);
-<a name="l00225"></a>00225         fail(iWordVersion != 1 &amp;&amp; iWordVersion != 2);
-<a name="l00226"></a>00226 
-<a name="l00227"></a>00227         ulBeginStshInfo = ulGetLong(0x5e, aucHeader); <span class="comment">/* fcStshf */</span>
-<a name="l00228"></a>00228         NO_DBG_HEX(ulBeginStshInfo);
-<a name="l00229"></a>00229         tStshInfoLen = (size_t)usGetWord(0x62, aucHeader); <span class="comment">/* cbStshf */</span>
-<a name="l00230"></a>00230         NO_DBG_DEC(tStshInfoLen);
-<a name="l00231"></a>00231 
-<a name="l00232"></a>00232         aucBuffer = xmalloc(tStshInfoLen);
-<a name="l00233"></a>00233         <span class="keywordflow">if</span> (!bReadBytes(aucBuffer, tStshInfoLen, ulBeginStshInfo, pFile)) {
-<a name="l00234"></a>00234                 aucBuffer = xfree(aucBuffer);
-<a name="l00235"></a>00235                 <span class="keywordflow">return</span>;
-<a name="l00236"></a>00236         }
-<a name="l00237"></a>00237         NO_DBG_PRINT_BLOCK(aucBuffer, tStshInfoLen);
-<a name="l00238"></a>00238 
-<a name="l00239"></a>00239         fail(2 &gt; tStshInfoLen);
-<a name="l00240"></a>00240         iStd = (int)usGetWord(0, aucBuffer);
-<a name="l00241"></a>00241 
-<a name="l00242"></a>00242         fail(2 + 2 &gt; tStshInfoLen);
-<a name="l00243"></a>00243         tName = (size_t)usGetWord(2, aucBuffer);
-<a name="l00244"></a>00244 
-<a name="l00245"></a>00245         fail(2 + tName + 2 &gt; tStshInfoLen);
-<a name="l00246"></a>00246         tChpx = (size_t)usGetWord(2 + tName, aucBuffer);
-<a name="l00247"></a>00247 
-<a name="l00248"></a>00248         fail(2 + tName + tChpx + 2 &gt; tStshInfoLen);
-<a name="l00249"></a>00249         tPapx = (size_t)usGetWord(2 + tName + tChpx, aucBuffer);
-<a name="l00250"></a>00250 
-<a name="l00251"></a>00251         fail(2 + tName + tChpx + tPapx + 2 &gt; tStshInfoLen);
-<a name="l00252"></a>00252         tStdCount = (size_t)usGetWord(2 + tName + tChpx + tPapx, aucBuffer);
-<a name="l00253"></a>00253 
-<a name="l00254"></a>00254         NO_DBG_HEX(tStdCount);
-<a name="l00255"></a>00255 
-<a name="l00256"></a>00256         atStyleInfo = xcalloc(tStdCount, <span class="keyword">sizeof</span>(style_block_type));
-<a name="l00257"></a>00257         atFontInfo = xcalloc(tStdCount, <span class="keyword">sizeof</span>(font_block_type));
-<a name="l00258"></a>00258         abFilled = xcalloc(tStdCount, <span class="keyword">sizeof</span>(BOOL));
-<a name="l00259"></a>00259 
-<a name="l00260"></a>00260         <span class="keywordflow">do</span> {
-<a name="l00261"></a>00261                 iCounter = 0;
-<a name="l00262"></a>00262                 iStIndex = 2 + 2;
-<a name="l00263"></a>00263                 iChpxIndex = 2 + (int)tName + 2;
-<a name="l00264"></a>00264                 iPapxIndex = 2 + (int)tName + (<span class="keywordtype">int</span>)tChpx + 2;
-<a name="l00265"></a>00265                 tMaxIndex = 2 + tName + tChpx + tPapx + 2;
-<a name="l00266"></a>00266                 <span class="comment">/* Read the styles one-by-one */</span>
-<a name="l00267"></a>00267                 <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; (int)tStdCount; iIndex++) {
-<a name="l00268"></a>00268                         pStyle = &amp;atStyleInfo[iIndex];
-<a name="l00269"></a>00269                         pFont = &amp;atFontInfo[iIndex];
-<a name="l00270"></a>00270                         iSt = (int)ucGetByte(iStIndex, aucBuffer);
-<a name="l00271"></a>00271                         iChpx = (int)ucGetByte(iChpxIndex, aucBuffer);
-<a name="l00272"></a>00272                         iPapx = (int)ucGetByte(iPapxIndex, aucBuffer);
-<a name="l00273"></a>00273                         NO_DBG_HEX(iSt);
-<a name="l00274"></a>00274                         NO_DBG_HEX(iChpx);
-<a name="l00275"></a>00275                         NO_DBG_HEX(iPapx);
-<a name="l00276"></a>00276                         <span class="keywordflow">if</span> (iSt == 0xff || tMaxIndex + 1 &gt;= tStshInfoLen) {
-<a name="l00277"></a>00277                                 <span class="comment">/* Undefined style or no information */</span>
-<a name="l00278"></a>00278                                 iStIndex++;
-<a name="l00279"></a>00279                                 iChpxIndex++;
-<a name="l00280"></a>00280                                 iPapxIndex++;
-<a name="l00281"></a>00281                                 tMaxIndex += 2;
-<a name="l00282"></a>00282                                 <span class="keywordflow">if</span> (!abFilled[iIndex]) {
-<a name="l00283"></a>00283                                         DBG_HEX_C(iChpx != 0xff, iChpx);
-<a name="l00284"></a>00284                                         DBG_HEX_C(iPapx != 0xff, iPapx);
-<a name="l00285"></a>00285                                         vGetDefaultStyle(pStyle);
-<a name="l00286"></a>00286                                         vGetDefaultFont(pFont, 0);
-<a name="l00287"></a>00287                                         abFilled[iIndex] = TRUE;
-<a name="l00288"></a>00288                                 }
-<a name="l00289"></a>00289                                 <span class="keywordflow">continue</span>;
-<a name="l00290"></a>00290                         }
-<a name="l00291"></a>00291 
-<a name="l00292"></a>00292                         NO_DBG_STRN(aucBuffer + iStIndex + 1, iSt);
-<a name="l00293"></a>00293                         iStIndex += iSt + 1;
-<a name="l00294"></a>00294 
-<a name="l00295"></a>00295                         ucStcNext = ucGetByte(tMaxIndex, aucBuffer);
-<a name="l00296"></a>00296                         ucStcBase = ucGetByte(tMaxIndex + 1, aucBuffer);
-<a name="l00297"></a>00297                         ucStc = (UCHAR)((iIndex - iStd) &amp; 0xff);
-<a name="l00298"></a>00298                         NO_DBG_DEC(ucStc);
-<a name="l00299"></a>00299 
-<a name="l00300"></a>00300                         <span class="keywordflow">if</span> (iChpx == 0xff || iPapx == 0xff) {
-<a name="l00301"></a>00301                                 <span class="comment">/* Use a build-in style */</span>
-<a name="l00302"></a>00302                                 iChpxIndex++;
-<a name="l00303"></a>00303                                 iPapxIndex++;
-<a name="l00304"></a>00304                                 tMaxIndex += 2;
-<a name="l00305"></a>00305                                 <span class="keywordflow">if</span> (!abFilled[iIndex]) {
-<a name="l00306"></a>00306                                         DBG_HEX_C(iChpx != 0xff, iChpx);
-<a name="l00307"></a>00307                                         DBG_HEX_C(iPapx != 0xff, iPapx);
-<a name="l00308"></a>00308                                         vGetBuildinStyle(ucStc, pStyle);
-<a name="l00309"></a>00309                                         pStyle-&gt;usIstd = usStc2istd(ucStc);
-<a name="l00310"></a>00310                                         pStyle-&gt;usIstdNext =
-<a name="l00311"></a>00311                                                         usStc2istd(ucStcNext);
-<a name="l00312"></a>00312                                         vGetBuildinFont(ucStc, pFont);
-<a name="l00313"></a>00313                                         abFilled[iIndex] = TRUE;
-<a name="l00314"></a>00314                                 }
-<a name="l00315"></a>00315                                 <span class="keywordflow">continue</span>;
-<a name="l00316"></a>00316                         }
-<a name="l00317"></a>00317 
-<a name="l00318"></a>00318                         <span class="keywordflow">if</span> (abFilled[iIndex]) {
-<a name="l00319"></a>00319                                 <span class="comment">/* This record has already been filled */</span>
-<a name="l00320"></a>00320                                 iChpxIndex += iChpx + 1;
-<a name="l00321"></a>00321                                 iPapxIndex += iPapx + 1;
-<a name="l00322"></a>00322                                 tMaxIndex += 2;
-<a name="l00323"></a>00323                                 <span class="keywordflow">continue</span>;
-<a name="l00324"></a>00324                         }
-<a name="l00325"></a>00325 
-<a name="l00326"></a>00326                         usBaseStyle = usStc2istd(ucStcBase);
-<a name="l00327"></a>00327 
-<a name="l00328"></a>00328                         <span class="keywordflow">if</span> (usBaseStyle == STI_NIL) {
-<a name="l00329"></a>00329                                 <span class="comment">/* Based on the Nil style */</span>
-<a name="l00330"></a>00330                                 vGetDefaultStyle(pStyle);
-<a name="l00331"></a>00331                                 vGetDefaultFont(pFont, 0);
-<a name="l00332"></a>00332                         } <span class="keywordflow">else</span> {
-<a name="l00333"></a>00333                                 iBaseStyleIndex = iGetStyleIndex(usBaseStyle);
-<a name="l00334"></a>00334                                 NO_DBG_DEC(iBaseStyleIndex);
-<a name="l00335"></a>00335                                 <span class="keywordflow">if</span> (iBaseStyleIndex &lt; 0) {
-<a name="l00336"></a>00336                                         <span class="comment">/* This style is not known yet */</span>
-<a name="l00337"></a>00337                                         iChpxIndex += iChpx + 1;
-<a name="l00338"></a>00338                                         iPapxIndex += iPapx + 1;
-<a name="l00339"></a>00339                                         tMaxIndex += 2;
-<a name="l00340"></a>00340                                         <span class="keywordflow">continue</span>;
-<a name="l00341"></a>00341                                 }
-<a name="l00342"></a>00342                                 fail(iBaseStyleIndex &gt;= (<span class="keywordtype">int</span>)tStdCount);
-<a name="l00343"></a>00343                                 fail(!abFilled[iBaseStyleIndex]);
-<a name="l00344"></a>00344                                 <span class="comment">/* Based on the specified base style */</span>
-<a name="l00345"></a>00345                                 *pStyle = atStyleInfo[iBaseStyleIndex];
-<a name="l00346"></a>00346                                 *pFont = atFontInfo[iBaseStyleIndex];
-<a name="l00347"></a>00347                         }
-<a name="l00348"></a>00348                         pStyle-&gt;usIstd = usStc2istd(ucStc);
-<a name="l00349"></a>00349                         pStyle-&gt;usIstdNext = usStc2istd(ucStcNext);
-<a name="l00350"></a>00350 
-<a name="l00351"></a>00351                         abFilled[iIndex] = TRUE;
-<a name="l00352"></a>00352                         iCounter++;
-<a name="l00353"></a>00353 
-<a name="l00354"></a>00354                         <span class="comment">/* Add the changes if any */</span>
-<a name="l00355"></a>00355                         <span class="keywordflow">switch</span> (iChpx) {
-<a name="l00356"></a>00356                         <span class="keywordflow">case</span> 0x00:
-<a name="l00357"></a>00357                         <span class="keywordflow">case</span> 0xff:
-<a name="l00358"></a>00358                                 iChpxIndex++;
-<a name="l00359"></a>00359                                 <span class="keywordflow">break</span>;
-<a name="l00360"></a>00360                         <span class="keywordflow">default</span>:
-<a name="l00361"></a>00361                                 NO_DBG_PRINT_BLOCK(aucBuffer + iChpxIndex + 1,
-<a name="l00362"></a>00362                                                 iChpx);
-<a name="l00363"></a>00363                                 <span class="keywordflow">if</span> (iWordVersion == 1) {
-<a name="l00364"></a>00364                                         vGet1FontInfo(0,
-<a name="l00365"></a>00365                                                 aucBuffer + iChpxIndex + 1,
-<a name="l00366"></a>00366                                                 (<span class="keywordtype">size_t</span>)iChpx, pFont);
-<a name="l00367"></a>00367                                 } <span class="keywordflow">else</span> {
-<a name="l00368"></a>00368                                         vGet2FontInfo(0,
-<a name="l00369"></a>00369                                                 aucBuffer + iChpxIndex + 1,
-<a name="l00370"></a>00370                                                 (<span class="keywordtype">size_t</span>)iChpx, pFont);
-<a name="l00371"></a>00371                                 }
-<a name="l00372"></a>00372                                 iChpxIndex += iChpx + 1;
-<a name="l00373"></a>00373                                 <span class="keywordflow">break</span>;
-<a name="l00374"></a>00374                         }
-<a name="l00375"></a>00375 
-<a name="l00376"></a>00376                         <span class="keywordflow">switch</span> (iPapx) {
-<a name="l00377"></a>00377                         <span class="keywordflow">case</span> 0x00:
-<a name="l00378"></a>00378                         <span class="keywordflow">case</span> 0xff:
-<a name="l00379"></a>00379                                 iPapxIndex++;
-<a name="l00380"></a>00380                                 <span class="keywordflow">break</span>;
-<a name="l00381"></a>00381                         <span class="keywordflow">default</span>:
-<a name="l00382"></a>00382                                 NO_DBG_PRINT_BLOCK(aucBuffer + iPapxIndex + 8,
-<a name="l00383"></a>00383                                                 iPapx - 7);
-<a name="l00384"></a>00384                                 vGet2StyleInfo(0, aucBuffer + iPapxIndex + 8,
-<a name="l00385"></a>00385                                                 iPapx - 7, pStyle);
-<a name="l00386"></a>00386                                 iPapxIndex += iPapx + 1;
-<a name="l00387"></a>00387                                 <span class="keywordflow">break</span>;
-<a name="l00388"></a>00388                         }
-<a name="l00389"></a>00389                         tMaxIndex += 2;
-<a name="l00390"></a>00390 
-<a name="l00391"></a>00391                 }
-<a name="l00392"></a>00392                 NO_DBG_DEC(iCounter);
-<a name="l00393"></a>00393         } <span class="keywordflow">while</span> (iCounter &gt; 0);
-<a name="l00394"></a>00394 
-<a name="l00395"></a>00395         <span class="comment">/* Fill records that are still empty */</span>
-<a name="l00396"></a>00396         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; (int)tStdCount; iIndex++) {
-<a name="l00397"></a>00397                 <span class="keywordflow">if</span> (!abFilled[iIndex]) {
-<a name="l00398"></a>00398                         NO_DBG_DEC(iIndex);
-<a name="l00399"></a>00399                         vGetDefaultStyle(&amp;atStyleInfo[iIndex]);
-<a name="l00400"></a>00400                         vGetDefaultFont(&amp;atFontInfo[iIndex], 0);
-<a name="l00401"></a>00401                 }
-<a name="l00402"></a>00402         }
-<a name="l00403"></a>00403 
-<a name="l00404"></a>00404         <span class="comment">/* Clean up before you leave */</span>
-<a name="l00405"></a>00405         abFilled = xfree(abFilled);
-<a name="l00406"></a>00406         aucBuffer = xfree(aucBuffer);
-<a name="l00407"></a>00407 } <span class="comment">/* end of vGet2Stylesheet */</span>
-<a name="l00408"></a>00408 
-<a name="l00409"></a>00409 <span class="comment">/*</span>
-<a name="l00410"></a>00410 <span class="comment"> * Build the lists with Stylesheet Information for Word 6/7 files</span>
-<a name="l00411"></a>00411 <span class="comment"> */</span>
-<a name="l00412"></a>00412 <span class="keywordtype">void</span>
-<a name="l00413"></a>00413 vGet6Stylesheet(FILE *pFile, ULONG ulStartBlock,
-<a name="l00414"></a>00414         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00415"></a>00415 {
-<a name="l00416"></a>00416         style_block_type        *pStyle;
-<a name="l00417"></a>00417         font_block_type         *pFont;
-<a name="l00418"></a>00418         UCHAR   *aucBuffer;
-<a name="l00419"></a>00419         ULONG   ulBeginStshInfo;
-<a name="l00420"></a>00420         <span class="keywordtype">size_t</span>  tStshInfoLen, tOffset, tStdLen, tStdBaseInFile;
-<a name="l00421"></a>00421         <span class="keywordtype">size_t</span>  tPos, tNameLen, tUpxLen;
-<a name="l00422"></a>00422         <span class="keywordtype">int</span>     iIndex, iBaseStyleIndex, iCounter;
-<a name="l00423"></a>00423         USHORT  usTmp, usUpxCount, usStyleType, usBaseStyle;
-<a name="l00424"></a>00424         USHORT  usFtcStandardChpStsh;
-<a name="l00425"></a>00425 
-<a name="l00426"></a>00426         fail(pFile == NULL || aucHeader == NULL);
-<a name="l00427"></a>00427         fail(ulStartBlock &gt; MAX_BLOCKNUMBER &amp;&amp; ulStartBlock != END_OF_CHAIN);
-<a name="l00428"></a>00428         fail(aulBBD == NULL);
-<a name="l00429"></a>00429 
-<a name="l00430"></a>00430         ulBeginStshInfo = ulGetLong(0x60, aucHeader); <span class="comment">/* fcStshf */</span>
-<a name="l00431"></a>00431         NO_DBG_HEX(ulBeginStshInfo);
-<a name="l00432"></a>00432         tStshInfoLen = (size_t)ulGetLong(0x64, aucHeader); <span class="comment">/* lcbStshf */</span>
-<a name="l00433"></a>00433         NO_DBG_DEC(tStshInfoLen);
-<a name="l00434"></a>00434 
-<a name="l00435"></a>00435         aucBuffer = xmalloc(tStshInfoLen);
-<a name="l00436"></a>00436         <span class="keywordflow">if</span> (!bReadBuffer(pFile, ulStartBlock,
-<a name="l00437"></a>00437                         aulBBD, tBBDLen, BIG_BLOCK_SIZE,
-<a name="l00438"></a>00438                         aucBuffer, ulBeginStshInfo, tStshInfoLen)) {
-<a name="l00439"></a>00439                 aucBuffer = xfree(aucBuffer);
-<a name="l00440"></a>00440                 <span class="keywordflow">return</span>;
-<a name="l00441"></a>00441         }
-<a name="l00442"></a>00442         NO_DBG_PRINT_BLOCK(aucBuffer, tStshInfoLen);
-<a name="l00443"></a>00443 
-<a name="l00444"></a>00444         tStdCount = (size_t)usGetWord(2, aucBuffer);
-<a name="l00445"></a>00445         NO_DBG_DEC(tStdCount);
-<a name="l00446"></a>00446         tStdBaseInFile = (size_t)usGetWord(4, aucBuffer);
-<a name="l00447"></a>00447         usFtcStandardChpStsh = usGetWord(14, aucBuffer);
-<a name="l00448"></a>00448         NO_DBG_DEC(usFtcStandardChpStsh);
-<a name="l00449"></a>00449 
-<a name="l00450"></a>00450         atStyleInfo = xcalloc(tStdCount, <span class="keyword">sizeof</span>(style_block_type));
-<a name="l00451"></a>00451         atFontInfo = xcalloc(tStdCount, <span class="keyword">sizeof</span>(font_block_type));
-<a name="l00452"></a>00452         abFilled = xcalloc(tStdCount, <span class="keyword">sizeof</span>(BOOL));
-<a name="l00453"></a>00453 
-<a name="l00454"></a>00454         <span class="keywordflow">do</span> {
-<a name="l00455"></a>00455                 iCounter = 0;
-<a name="l00456"></a>00456                 <span class="comment">/* Read the styles one-by-one */</span>
-<a name="l00457"></a>00457                 <span class="keywordflow">for</span> (iIndex = 0, tOffset = 2 + (<span class="keywordtype">size_t</span>)usGetWord(0, aucBuffer);
-<a name="l00458"></a>00458                      iIndex &lt; (int)tStdCount;
-<a name="l00459"></a>00459                      iIndex++, tOffset += 2 + tStdLen) {
-<a name="l00460"></a>00460                         NO_DBG_DEC(tOffset);
-<a name="l00461"></a>00461                         tStdLen = (size_t)usGetWord(tOffset, aucBuffer);
-<a name="l00462"></a>00462                         NO_DBG_DEC(tStdLen);
-<a name="l00463"></a>00463                         <span class="keywordflow">if</span> (abFilled[iIndex]) {
-<a name="l00464"></a>00464                                 <span class="comment">/* This record has already been filled */</span>
-<a name="l00465"></a>00465                                 <span class="keywordflow">continue</span>;
-<a name="l00466"></a>00466                         }
-<a name="l00467"></a>00467                         pStyle = &amp;atStyleInfo[iIndex];
-<a name="l00468"></a>00468                         pFont = &amp;atFontInfo[iIndex];
-<a name="l00469"></a>00469                         <span class="keywordflow">if</span> (tStdLen == 0) {
-<a name="l00470"></a>00470                                 <span class="comment">/* Empty record */</span>
-<a name="l00471"></a>00471                                 vGetDefaultStyle(pStyle);
-<a name="l00472"></a>00472                                 vGetDefaultFont(pFont, usFtcStandardChpStsh);
-<a name="l00473"></a>00473                                 abFilled[iIndex] = TRUE;
-<a name="l00474"></a>00474                                 <span class="keywordflow">continue</span>;
-<a name="l00475"></a>00475                         }
-<a name="l00476"></a>00476                         usTmp = usGetWord(tOffset + 4, aucBuffer);
-<a name="l00477"></a>00477                         usStyleType = usTmp % 16;
-<a name="l00478"></a>00478                         usBaseStyle = usTmp / 16;
-<a name="l00479"></a>00479                         NO_DBG_DEC(usStyleType);
-<a name="l00480"></a>00480                         NO_DBG_DEC(usBaseStyle);
-<a name="l00481"></a>00481                         <span class="keywordflow">if</span> (usBaseStyle == STI_NIL || usBaseStyle == STI_USER) {
-<a name="l00482"></a>00482                                 <span class="comment">/* Based on the Nil style */</span>
-<a name="l00483"></a>00483                                 vGetDefaultStyle(pStyle);
-<a name="l00484"></a>00484                                 vGetDefaultFont(pFont, usFtcStandardChpStsh);
-<a name="l00485"></a>00485                         } <span class="keywordflow">else</span> {
-<a name="l00486"></a>00486                                 iBaseStyleIndex = iGetStyleIndex(usBaseStyle);
-<a name="l00487"></a>00487                                 NO_DBG_DEC(iBaseStyleIndex);
-<a name="l00488"></a>00488                                 <span class="keywordflow">if</span> (iBaseStyleIndex &lt; 0) {
-<a name="l00489"></a>00489                                         <span class="comment">/* This base style is not known yet */</span>
-<a name="l00490"></a>00490                                         <span class="keywordflow">continue</span>;
-<a name="l00491"></a>00491                                 }
-<a name="l00492"></a>00492                                 fail(iBaseStyleIndex &gt;= (<span class="keywordtype">int</span>)tStdCount);
-<a name="l00493"></a>00493                                 fail(!abFilled[iBaseStyleIndex]);
-<a name="l00494"></a>00494                                 <span class="comment">/* Based on the specified base style */</span>
-<a name="l00495"></a>00495                                 *pStyle = atStyleInfo[iBaseStyleIndex];
-<a name="l00496"></a>00496                                 pStyle-&gt;usIstd = ISTD_INVALID;
-<a name="l00497"></a>00497                                 *pFont = atFontInfo[iBaseStyleIndex];
-<a name="l00498"></a>00498                         }
-<a name="l00499"></a>00499                         abFilled[iIndex] = TRUE;
-<a name="l00500"></a>00500                         iCounter++;
-<a name="l00501"></a>00501                         <span class="comment">/* STD */</span>
-<a name="l00502"></a>00502                         usTmp = usGetWord(tOffset + 6, aucBuffer);
-<a name="l00503"></a>00503                         usUpxCount = usTmp % 16;
-<a name="l00504"></a>00504                         pStyle-&gt;usIstdNext = usTmp / 16;;
-<a name="l00505"></a>00505                         NO_DBG_DEC(usUpxCount);
-<a name="l00506"></a>00506                         tPos = 2 + tStdBaseInFile;
-<a name="l00507"></a>00507                         NO_DBG_DEC(tPos);
-<a name="l00508"></a>00508                         tNameLen = (size_t)ucGetByte(tOffset + tPos, aucBuffer);
-<a name="l00509"></a>00509                         NO_DBG_DEC(tNameLen);
-<a name="l00510"></a>00510                         NO_DBG_STRN(aucBuffer + tOffset + tPos + 1, tNameLen);
-<a name="l00511"></a>00511                         tNameLen++;     <span class="comment">/* Include the ASCII NULL character */</span>
-<a name="l00512"></a>00512                         tPos += 1 + tNameLen;
-<a name="l00513"></a>00513                         <span class="keywordflow">if</span> (odd(tPos)) {
-<a name="l00514"></a>00514                                 tPos++;
-<a name="l00515"></a>00515                         }
-<a name="l00516"></a>00516                         NO_DBG_DEC(tPos);
-<a name="l00517"></a>00517                         <span class="keywordflow">if</span> (tPos &gt;= tStdLen) {
-<a name="l00518"></a>00518                                 <span class="keywordflow">continue</span>;
-<a name="l00519"></a>00519                         }
-<a name="l00520"></a>00520                         tUpxLen = (size_t)usGetWord(tOffset + tPos, aucBuffer);
-<a name="l00521"></a>00521                         NO_DBG_DEC(tUpxLen);
-<a name="l00522"></a>00522                         <span class="keywordflow">if</span> (tPos + tUpxLen &gt; tStdLen) {
-<a name="l00523"></a>00523                                 <span class="comment">/* UPX length too large to be a record */</span>
-<a name="l00524"></a>00524                                 DBG_DEC_C(tPos + tUpxLen &gt; tStdLen,
-<a name="l00525"></a>00525                                                 tPos + tUpxLen);
-<a name="l00526"></a>00526                                 <span class="keywordflow">continue</span>;
-<a name="l00527"></a>00527                         }
-<a name="l00528"></a>00528                         <span class="keywordflow">if</span> (usStyleType == SGC_PAP &amp;&amp; usUpxCount &gt;= 1) {
-<a name="l00529"></a>00529                                 <span class="keywordflow">if</span> (tUpxLen &gt;= 2) {
-<a name="l00530"></a>00530                                         NO_DBG_PRINT_BLOCK(
-<a name="l00531"></a>00531                                                 aucBuffer + tOffset + tPos + 2,
-<a name="l00532"></a>00532                                                 tUpxLen);
-<a name="l00533"></a>00533                                         pStyle-&gt;usIstd = usGetWord(
-<a name="l00534"></a>00534                                                 tOffset + tPos + 2, aucBuffer);
-<a name="l00535"></a>00535                                         NO_DBG_DEC(pStyle-&gt;usIstd);
-<a name="l00536"></a>00536                                         NO_DBG_DEC(pStyle-&gt;usIstdNext);
-<a name="l00537"></a>00537                                         vGet6StyleInfo(0,
-<a name="l00538"></a>00538                                                 aucBuffer + tOffset + tPos + 4,
-<a name="l00539"></a>00539                                                 tUpxLen - 2, pStyle);
-<a name="l00540"></a>00540                                         NO_DBG_DEC(pStyle-&gt;sLeftIndent);
-<a name="l00541"></a>00541                                         NO_DBG_DEC(pStyle-&gt;sRightIndent);
-<a name="l00542"></a>00542                                         NO_DBG_HEX(pStyle-&gt;ucAlignment);
-<a name="l00543"></a>00543                                 }
-<a name="l00544"></a>00544                                 tPos += 2 + tUpxLen;
-<a name="l00545"></a>00545                                 <span class="keywordflow">if</span> (odd(tPos)) {
-<a name="l00546"></a>00546                                         tPos++;
-<a name="l00547"></a>00547                                 }
-<a name="l00548"></a>00548                                 NO_DBG_DEC(tPos);
-<a name="l00549"></a>00549                                 tUpxLen = (size_t)usGetWord(
-<a name="l00550"></a>00550                                                 tOffset + tPos, aucBuffer);
-<a name="l00551"></a>00551                                 NO_DBG_DEC(tUpxLen);
-<a name="l00552"></a>00552                         }
-<a name="l00553"></a>00553                         <span class="keywordflow">if</span> (tUpxLen == 0 || tPos + tUpxLen &gt; tStdLen) {
-<a name="l00554"></a>00554                                 <span class="comment">/* Too small or too large to be a record */</span>
-<a name="l00555"></a>00555                                 DBG_DEC_C(tPos + tUpxLen &gt; tStdLen,
-<a name="l00556"></a>00556                                                         tPos + tUpxLen);
-<a name="l00557"></a>00557                                 <span class="keywordflow">continue</span>;
-<a name="l00558"></a>00558                         }
-<a name="l00559"></a>00559                         <span class="keywordflow">if</span> ((usStyleType == SGC_PAP &amp;&amp; usUpxCount &gt;= 2) ||
-<a name="l00560"></a>00560                             (usStyleType == SGC_CHP &amp;&amp; usUpxCount &gt;= 1)) {
-<a name="l00561"></a>00561                                 NO_DBG_PRINT_BLOCK(
-<a name="l00562"></a>00562                                                 aucBuffer + tOffset + tPos + 2,
-<a name="l00563"></a>00563                                                 tUpxLen);
-<a name="l00564"></a>00564                                 vGet6FontInfo(0, ISTD_INVALID,
-<a name="l00565"></a>00565                                                 aucBuffer + tOffset + tPos + 2,
-<a name="l00566"></a>00566                                                 (<span class="keywordtype">int</span>)tUpxLen, pFont);
-<a name="l00567"></a>00567                                 NO_DBG_DEC(pFont-&gt;usFontSize);
-<a name="l00568"></a>00568                                 NO_DBG_DEC(pFont-&gt;ucFontcolor);
-<a name="l00569"></a>00569                                 NO_DBG_HEX(pFont-&gt;usFontStyle);
-<a name="l00570"></a>00570                         }
-<a name="l00571"></a>00571                 }
-<a name="l00572"></a>00572                 NO_DBG_DEC(iCounter);
-<a name="l00573"></a>00573         } <span class="keywordflow">while</span> (iCounter &gt; 0);
-<a name="l00574"></a>00574 
-<a name="l00575"></a>00575         <span class="comment">/* Fill records that are still empty */</span>
-<a name="l00576"></a>00576         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; (int)tStdCount; iIndex++) {
-<a name="l00577"></a>00577                 <span class="keywordflow">if</span> (!abFilled[iIndex]) {
-<a name="l00578"></a>00578                         NO_DBG_DEC(iIndex);
-<a name="l00579"></a>00579                         vGetDefaultStyle(&amp;atStyleInfo[iIndex]);
-<a name="l00580"></a>00580                         vGetDefaultFont(&amp;atFontInfo[iIndex],
-<a name="l00581"></a>00581                                         usFtcStandardChpStsh);
-<a name="l00582"></a>00582                 }
-<a name="l00583"></a>00583         }
-<a name="l00584"></a>00584 
-<a name="l00585"></a>00585         <span class="comment">/* Clean up before you leave */</span>
-<a name="l00586"></a>00586         abFilled = xfree(abFilled);
-<a name="l00587"></a>00587         aucBuffer = xfree(aucBuffer);
-<a name="l00588"></a>00588 } <span class="comment">/* end of vGet6Stylesheet */</span>
-<a name="l00589"></a>00589 
-<a name="l00590"></a>00590 <span class="comment">/*</span>
-<a name="l00591"></a>00591 <span class="comment"> * Build the lists with Stylesheet Information for Word 8/9/10 files</span>
-<a name="l00592"></a>00592 <span class="comment"> */</span>
-<a name="l00593"></a>00593 <span class="keywordtype">void</span>
-<a name="l00594"></a>00594 vGet8Stylesheet(FILE *pFile, <span class="keyword">const</span> pps_info_type *pPPS,
-<a name="l00595"></a>00595         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00596"></a>00596         <span class="keyword">const</span> ULONG *aulSBD, <span class="keywordtype">size_t</span> tSBDLen,
-<a name="l00597"></a>00597         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00598"></a>00598 {
-<a name="l00599"></a>00599         style_block_type        *pStyle;
-<a name="l00600"></a>00600         font_block_type         *pFont;
-<a name="l00601"></a>00601         <span class="keyword">const</span> ULONG     *aulBlockDepot;
-<a name="l00602"></a>00602         UCHAR   *aucBuffer;
-<a name="l00603"></a>00603         ULONG   ulBeginStshInfo;
-<a name="l00604"></a>00604         <span class="keywordtype">size_t</span>  tStshInfoLen, tBlockDepotLen, tOffset, tStdLen, tStdBaseInFile;
-<a name="l00605"></a>00605         <span class="keywordtype">size_t</span>  tBlockSize, tPos, tNameLen, tUpxLen;
-<a name="l00606"></a>00606         <span class="keywordtype">int</span>     iIndex, iBaseStyleIndex, iCounter;
-<a name="l00607"></a>00607         USHORT  usTmp, usUpxCount, usStyleType, usBaseStyle;
-<a name="l00608"></a>00608         USHORT  usFtcStandardChpStsh;
-<a name="l00609"></a>00609 
-<a name="l00610"></a>00610         fail(pFile == NULL || pPPS == NULL || aucHeader == NULL);
-<a name="l00611"></a>00611         fail(aulBBD == NULL || aulSBD == NULL);
-<a name="l00612"></a>00612 
-<a name="l00613"></a>00613         ulBeginStshInfo = ulGetLong(0xa2, aucHeader); <span class="comment">/* fcStshf */</span>
-<a name="l00614"></a>00614         NO_DBG_HEX(ulBeginStshInfo);
-<a name="l00615"></a>00615         tStshInfoLen = (size_t)ulGetLong(0xa6, aucHeader); <span class="comment">/* lcbStshf */</span>
-<a name="l00616"></a>00616         NO_DBG_DEC(tStshInfoLen);
-<a name="l00617"></a>00617 
-<a name="l00618"></a>00618         NO_DBG_DEC(pPPS-&gt;tTable.ulSB);
-<a name="l00619"></a>00619         NO_DBG_HEX(pPPS-&gt;tTable.ulSize);
-<a name="l00620"></a>00620         <span class="keywordflow">if</span> (pPPS-&gt;tTable.ulSize == 0) {
-<a name="l00621"></a>00621                 DBG_MSG(<span class="stringliteral">&quot;No stylesheet information&quot;</span>);
-<a name="l00622"></a>00622                 <span class="keywordflow">return</span>;
-<a name="l00623"></a>00623         }
-<a name="l00624"></a>00624 
-<a name="l00625"></a>00625         <span class="keywordflow">if</span> (pPPS-&gt;tTable.ulSize &lt; MIN_SIZE_FOR_BBD_USE) {
-<a name="l00626"></a>00626                 <span class="comment">/* Use the Small Block Depot */</span>
-<a name="l00627"></a>00627                 aulBlockDepot = aulSBD;
-<a name="l00628"></a>00628                 tBlockDepotLen = tSBDLen;
-<a name="l00629"></a>00629                 tBlockSize = SMALL_BLOCK_SIZE;
-<a name="l00630"></a>00630         } <span class="keywordflow">else</span> {
-<a name="l00631"></a>00631                 <span class="comment">/* Use the Big Block Depot */</span>
-<a name="l00632"></a>00632                 aulBlockDepot = aulBBD;
-<a name="l00633"></a>00633                 tBlockDepotLen = tBBDLen;
-<a name="l00634"></a>00634                 tBlockSize = BIG_BLOCK_SIZE;
-<a name="l00635"></a>00635         }
-<a name="l00636"></a>00636         aucBuffer = xmalloc(tStshInfoLen);
-<a name="l00637"></a>00637         <span class="keywordflow">if</span> (!bReadBuffer(pFile, pPPS-&gt;tTable.ulSB,
-<a name="l00638"></a>00638                         aulBlockDepot, tBlockDepotLen, tBlockSize,
-<a name="l00639"></a>00639                         aucBuffer, ulBeginStshInfo, tStshInfoLen)) {
-<a name="l00640"></a>00640                 aucBuffer = xfree(aucBuffer);
-<a name="l00641"></a>00641                 <span class="keywordflow">return</span>;
-<a name="l00642"></a>00642         }
-<a name="l00643"></a>00643         NO_DBG_PRINT_BLOCK(aucBuffer, tStshInfoLen);
-<a name="l00644"></a>00644 
-<a name="l00645"></a>00645         tStdCount = (size_t)usGetWord(2, aucBuffer);
-<a name="l00646"></a>00646         NO_DBG_DEC(tStdCount);
-<a name="l00647"></a>00647         tStdBaseInFile = (size_t)usGetWord(4, aucBuffer);
-<a name="l00648"></a>00648         usFtcStandardChpStsh = usGetWord(14, aucBuffer);
-<a name="l00649"></a>00649         NO_DBG_DEC(usFtcStandardChpStsh);
-<a name="l00650"></a>00650 
-<a name="l00651"></a>00651         atStyleInfo = xcalloc(tStdCount, <span class="keyword">sizeof</span>(style_block_type));
-<a name="l00652"></a>00652         atFontInfo = xcalloc(tStdCount, <span class="keyword">sizeof</span>(font_block_type));
-<a name="l00653"></a>00653         abFilled = xcalloc(tStdCount, <span class="keyword">sizeof</span>(BOOL));
-<a name="l00654"></a>00654 
-<a name="l00655"></a>00655         <span class="keywordflow">do</span> {
-<a name="l00656"></a>00656                 iCounter = 0;
-<a name="l00657"></a>00657                 <span class="comment">/* Read the styles one-by-one */</span>
-<a name="l00658"></a>00658                 <span class="keywordflow">for</span> (iIndex = 0, tOffset = 2 + (<span class="keywordtype">size_t</span>)usGetWord(0, aucBuffer);
-<a name="l00659"></a>00659                      iIndex &lt; (int)tStdCount;
-<a name="l00660"></a>00660                      iIndex++, tOffset += 2 + tStdLen) {
-<a name="l00661"></a>00661                         NO_DBG_DEC(tOffset);
-<a name="l00662"></a>00662                         tStdLen = (size_t)usGetWord(tOffset, aucBuffer);
-<a name="l00663"></a>00663                         NO_DBG_DEC(tStdLen);
-<a name="l00664"></a>00664                         <span class="keywordflow">if</span> (abFilled[iIndex]) {
-<a name="l00665"></a>00665                                 <span class="comment">/* This record has already been filled */</span>
-<a name="l00666"></a>00666                                 <span class="keywordflow">continue</span>;
-<a name="l00667"></a>00667                         }
-<a name="l00668"></a>00668                         pStyle = &amp;atStyleInfo[iIndex];
-<a name="l00669"></a>00669                         pFont = &amp;atFontInfo[iIndex];
-<a name="l00670"></a>00670                         <span class="keywordflow">if</span> (tStdLen == 0) {
-<a name="l00671"></a>00671                                 <span class="comment">/* Empty record */</span>
-<a name="l00672"></a>00672                                 vGetDefaultStyle(pStyle);
-<a name="l00673"></a>00673                                 vGetDefaultFont(pFont, usFtcStandardChpStsh);
-<a name="l00674"></a>00674                                 abFilled[iIndex] = TRUE;
-<a name="l00675"></a>00675                                 <span class="keywordflow">continue</span>;
-<a name="l00676"></a>00676                         }
-<a name="l00677"></a>00677                         usTmp = usGetWord(tOffset + 4, aucBuffer);
-<a name="l00678"></a>00678                         usStyleType = usTmp % 16;
-<a name="l00679"></a>00679                         usBaseStyle = usTmp / 16;
-<a name="l00680"></a>00680                         NO_DBG_DEC(usStyleType);
-<a name="l00681"></a>00681                         NO_DBG_DEC(usBaseStyle);
-<a name="l00682"></a>00682                         <span class="keywordflow">if</span> (usBaseStyle == STI_NIL || usBaseStyle == STI_USER) {
-<a name="l00683"></a>00683                                 <span class="comment">/* Based on the Nil style */</span>
-<a name="l00684"></a>00684                                 vGetDefaultStyle(pStyle);
-<a name="l00685"></a>00685                                 vGetDefaultFont(pFont, usFtcStandardChpStsh);
-<a name="l00686"></a>00686                         } <span class="keywordflow">else</span> {
-<a name="l00687"></a>00687                                 iBaseStyleIndex = iGetStyleIndex(usBaseStyle);
-<a name="l00688"></a>00688                                 NO_DBG_DEC(iBaseStyleIndex);
-<a name="l00689"></a>00689                                 <span class="keywordflow">if</span> (iBaseStyleIndex &lt; 0) {
-<a name="l00690"></a>00690                                         <span class="comment">/* This base style is not known yet */</span>
-<a name="l00691"></a>00691                                         <span class="keywordflow">continue</span>;
-<a name="l00692"></a>00692                                 }
-<a name="l00693"></a>00693                                 fail(iBaseStyleIndex &gt;= (<span class="keywordtype">int</span>)tStdCount);
-<a name="l00694"></a>00694                                 fail(!abFilled[iBaseStyleIndex]);
-<a name="l00695"></a>00695                                 <span class="comment">/* Based on the specified base style */</span>
-<a name="l00696"></a>00696                                 *pStyle = atStyleInfo[iBaseStyleIndex];
-<a name="l00697"></a>00697                                 pStyle-&gt;usIstd = ISTD_INVALID;
-<a name="l00698"></a>00698                                 *pFont = atFontInfo[iBaseStyleIndex];
-<a name="l00699"></a>00699                         }
-<a name="l00700"></a>00700                         abFilled[iIndex] = TRUE;
-<a name="l00701"></a>00701                         iCounter++;
-<a name="l00702"></a>00702                         <span class="comment">/* STD */</span>
-<a name="l00703"></a>00703                         usTmp = usGetWord(tOffset + 6, aucBuffer);
-<a name="l00704"></a>00704                         usUpxCount = usTmp % 16;
-<a name="l00705"></a>00705                         pStyle-&gt;usIstdNext = usTmp / 16;
-<a name="l00706"></a>00706                         NO_DBG_DEC(usUpxCount);
-<a name="l00707"></a>00707                         tPos = 2 + tStdBaseInFile;
-<a name="l00708"></a>00708                         NO_DBG_DEC(tPos);
-<a name="l00709"></a>00709                         tNameLen = (size_t)usGetWord(tOffset + tPos, aucBuffer);
-<a name="l00710"></a>00710                         NO_DBG_DEC(tNameLen);
-<a name="l00711"></a>00711                         tNameLen *= 2;  <span class="comment">/* From Unicode characters to bytes */</span>
-<a name="l00712"></a>00712                         NO_DBG_UNICODE_N(aucBuffer + tOffset + tPos + 2,
-<a name="l00713"></a>00713                                         tNameLen);
-<a name="l00714"></a>00714                         tNameLen += 2;  <span class="comment">/* Include the Unicode NULL character */</span>
-<a name="l00715"></a>00715                         tPos += 2 + tNameLen;
-<a name="l00716"></a>00716                         <span class="keywordflow">if</span> (odd(tPos)) {
-<a name="l00717"></a>00717                                 tPos++;
-<a name="l00718"></a>00718                         }
-<a name="l00719"></a>00719                         NO_DBG_DEC(tPos);
-<a name="l00720"></a>00720                         <span class="keywordflow">if</span> (tPos &gt;= tStdLen) {
-<a name="l00721"></a>00721                                 <span class="keywordflow">continue</span>;
-<a name="l00722"></a>00722                         }
-<a name="l00723"></a>00723                         tUpxLen = (size_t)usGetWord(tOffset + tPos, aucBuffer);
-<a name="l00724"></a>00724                         NO_DBG_DEC(tUpxLen);
-<a name="l00725"></a>00725                         <span class="keywordflow">if</span> (tPos + tUpxLen &gt; tStdLen) {
-<a name="l00726"></a>00726                                 <span class="comment">/* UPX length too large to be a record */</span>
-<a name="l00727"></a>00727                                 DBG_DEC_C(tPos + tUpxLen &gt; tStdLen,
-<a name="l00728"></a>00728                                                 tPos + tUpxLen);
-<a name="l00729"></a>00729                                 <span class="keywordflow">continue</span>;
-<a name="l00730"></a>00730                         }
-<a name="l00731"></a>00731                         <span class="keywordflow">if</span> (usStyleType == SGC_PAP &amp;&amp; usUpxCount &gt;= 1) {
-<a name="l00732"></a>00732                                 <span class="keywordflow">if</span> (tUpxLen &gt;= 2) {
-<a name="l00733"></a>00733                                         NO_DBG_PRINT_BLOCK(
-<a name="l00734"></a>00734                                                 aucBuffer + tOffset + tPos + 2,
-<a name="l00735"></a>00735                                                 tUpxLen);
-<a name="l00736"></a>00736                                         pStyle-&gt;usIstd = usGetWord(
-<a name="l00737"></a>00737                                                 tOffset + tPos + 2, aucBuffer);
-<a name="l00738"></a>00738                                         NO_DBG_DEC(pStyle-&gt;usIstd);
-<a name="l00739"></a>00739                                         NO_DBG_DEC(pStyle-&gt;usIstdNext);
-<a name="l00740"></a>00740                                         vGet8StyleInfo(0,
-<a name="l00741"></a>00741                                                 aucBuffer + tOffset + tPos + 4,
-<a name="l00742"></a>00742                                                 tUpxLen - 2, pStyle);
-<a name="l00743"></a>00743                                         NO_DBG_DEC(pStyle-&gt;sLeftIndent);
-<a name="l00744"></a>00744                                         NO_DBG_DEC(pStyle-&gt;sRightIndent);
-<a name="l00745"></a>00745                                         NO_DBG_HEX(pStyle-&gt;ucAlignment);
-<a name="l00746"></a>00746                                 }
-<a name="l00747"></a>00747                                 tPos += 2 + tUpxLen;
-<a name="l00748"></a>00748                                 <span class="keywordflow">if</span> (odd(tPos)) {
-<a name="l00749"></a>00749                                         tPos++;
-<a name="l00750"></a>00750                                 }
-<a name="l00751"></a>00751                                 NO_DBG_DEC(tPos);
-<a name="l00752"></a>00752                                 tUpxLen = (size_t)usGetWord(
-<a name="l00753"></a>00753                                                 tOffset + tPos, aucBuffer);
-<a name="l00754"></a>00754                                 NO_DBG_DEC(tUpxLen);
-<a name="l00755"></a>00755                         }
-<a name="l00756"></a>00756                         <span class="keywordflow">if</span> (tUpxLen == 0 || tPos + tUpxLen &gt; tStdLen) {
-<a name="l00757"></a>00757                                 <span class="comment">/* Too small or too large to be a record */</span>
-<a name="l00758"></a>00758                                 DBG_DEC_C(tPos + tUpxLen &gt; tStdLen,
-<a name="l00759"></a>00759                                                         tPos + tUpxLen);
-<a name="l00760"></a>00760                                 <span class="keywordflow">continue</span>;
-<a name="l00761"></a>00761                         }
-<a name="l00762"></a>00762                         <span class="keywordflow">if</span> ((usStyleType == SGC_PAP &amp;&amp; usUpxCount &gt;= 2) ||
-<a name="l00763"></a>00763                             (usStyleType == SGC_CHP &amp;&amp; usUpxCount &gt;= 1)) {
-<a name="l00764"></a>00764                                 NO_DBG_PRINT_BLOCK(
-<a name="l00765"></a>00765                                                 aucBuffer + tOffset + tPos + 2,
-<a name="l00766"></a>00766                                                 tUpxLen);
-<a name="l00767"></a>00767                                 vGet8FontInfo(0, ISTD_INVALID,
-<a name="l00768"></a>00768                                                 aucBuffer + tOffset + tPos + 2,
-<a name="l00769"></a>00769                                                 (<span class="keywordtype">int</span>)tUpxLen, pFont);
-<a name="l00770"></a>00770                                 NO_DBG_DEC(pFont-&gt;usFontSize);
-<a name="l00771"></a>00771                                 NO_DBG_DEC(pFont-&gt;ucFontcolor);
-<a name="l00772"></a>00772                                 NO_DBG_HEX(pFont-&gt;usFontStyle);
-<a name="l00773"></a>00773                         }
-<a name="l00774"></a>00774                 }
-<a name="l00775"></a>00775                 NO_DBG_DEC(iCounter);
-<a name="l00776"></a>00776         } <span class="keywordflow">while</span> (iCounter &gt; 0);
-<a name="l00777"></a>00777 
-<a name="l00778"></a>00778         <span class="comment">/* Fill records that are still empty */</span>
-<a name="l00779"></a>00779         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; (int)tStdCount; iIndex++) {
-<a name="l00780"></a>00780                 <span class="keywordflow">if</span> (!abFilled[iIndex]) {
-<a name="l00781"></a>00781                         NO_DBG_DEC(iIndex);
-<a name="l00782"></a>00782                         vGetDefaultStyle(&amp;atStyleInfo[iIndex]);
-<a name="l00783"></a>00783                         vGetDefaultFont(&amp;atFontInfo[iIndex],
-<a name="l00784"></a>00784                                         usFtcStandardChpStsh);
-<a name="l00785"></a>00785                 }
-<a name="l00786"></a>00786         }
-<a name="l00787"></a>00787 
-<a name="l00788"></a>00788         <span class="comment">/* Clean up before you leave */</span>
-<a name="l00789"></a>00789         abFilled = xfree(abFilled);
-<a name="l00790"></a>00790         aucBuffer = xfree(aucBuffer);
-<a name="l00791"></a>00791 } <span class="comment">/* end of vGet8Stylesheet */</span>
-<a name="l00792"></a>00792 
-<a name="l00793"></a>00793 <span class="comment">/*</span>
-<a name="l00794"></a>00794 <span class="comment"> * vFillStyleFromStylesheet - fill a style struct with stylesheet info</span>
-<a name="l00795"></a>00795 <span class="comment"> */</span>
-<a name="l00796"></a>00796 <span class="keywordtype">void</span>
-<a name="l00797"></a>00797 vFillStyleFromStylesheet(USHORT usIstd, style_block_type *pStyle)
-<a name="l00798"></a>00798 {
-<a name="l00799"></a>00799         <span class="keywordtype">int</span>     iIndex;
-<a name="l00800"></a>00800 
-<a name="l00801"></a>00801         fail(pStyle == NULL);
-<a name="l00802"></a>00802 
-<a name="l00803"></a>00803         <span class="keywordflow">if</span> (usIstd != ISTD_INVALID &amp;&amp; usIstd != STI_NIL &amp;&amp; usIstd != STI_USER) {
-<a name="l00804"></a>00804                 <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; (int)tStdCount; iIndex++) {
-<a name="l00805"></a>00805                         <span class="keywordflow">if</span> (atStyleInfo[iIndex].usIstd == usIstd) {
-<a name="l00806"></a>00806                                 <span class="comment">/* Right index found; return style */</span>
-<a name="l00807"></a>00807                                 *pStyle = atStyleInfo[iIndex];
-<a name="l00808"></a>00808                                 <span class="keywordflow">return</span>;
-<a name="l00809"></a>00809                         }
-<a name="l00810"></a>00810                 }
-<a name="l00811"></a>00811         }
-<a name="l00812"></a>00812 
-<a name="l00813"></a>00813         vGetDefaultStyle(pStyle);
-<a name="l00814"></a>00814         pStyle-&gt;usIstd = usIstd;
-<a name="l00815"></a>00815 } <span class="comment">/* end of vFillStyleFromStylesheet */</span>
-<a name="l00816"></a>00816 
-<a name="l00817"></a>00817 <span class="comment">/*</span>
-<a name="l00818"></a>00818 <span class="comment"> * vFillFontFromStylesheet - fill a font struct with stylesheet info</span>
-<a name="l00819"></a>00819 <span class="comment"> */</span>
-<a name="l00820"></a>00820 <span class="keywordtype">void</span>
-<a name="l00821"></a>00821 vFillFontFromStylesheet(USHORT usIstd, font_block_type *pFont)
-<a name="l00822"></a>00822 {
-<a name="l00823"></a>00823         <span class="keywordtype">int</span>     iIndex;
-<a name="l00824"></a>00824 
-<a name="l00825"></a>00825         fail(pFont == NULL);
-<a name="l00826"></a>00826 
-<a name="l00827"></a>00827         <span class="keywordflow">if</span> (usIstd != ISTD_INVALID &amp;&amp; usIstd != STI_NIL &amp;&amp; usIstd != STI_USER) {
-<a name="l00828"></a>00828                 <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; (int)tStdCount; iIndex++) {
-<a name="l00829"></a>00829                         <span class="keywordflow">if</span> (atStyleInfo[iIndex].usIstd == usIstd) {
-<a name="l00830"></a>00830                                 <span class="comment">/* Right index found; return font */</span>
-<a name="l00831"></a>00831                                 *pFont = atFontInfo[iIndex];
-<a name="l00832"></a>00832                                 <span class="keywordflow">return</span>;
-<a name="l00833"></a>00833                         }
-<a name="l00834"></a>00834                 }
-<a name="l00835"></a>00835         }
-<a name="l00836"></a>00836 
-<a name="l00837"></a>00837         vGetDefaultFont(pFont, 0);
-<a name="l00838"></a>00838 } <span class="comment">/* end of vFillFontFromStylesheet */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/summary_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,904 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/summary.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/summary.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * summary.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2002-2005 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Read the summary information of a Word document</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;time.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 <span class="preprocessor">#define P_HEADER_SZ             28</span>
-<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define P_SECTIONLIST_SZ        20</span>
-<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#define P_LENGTH_SZ              4</span>
-<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#define P_SECTION_MAX_SZ        (2 * P_SECTIONLIST_SZ + P_LENGTH_SZ)</span>
-<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#define P_SECTION_SZ(x)         ((x) * P_SECTIONLIST_SZ + P_LENGTH_SZ)</span>
-<a name="l00018"></a>00018 <span class="preprocessor"></span>
-<a name="l00019"></a>00019 <span class="preprocessor">#define PID_TITLE                2</span>
-<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define PID_SUBJECT              3</span>
-<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define PID_AUTHOR               4</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span><span class="preprocessor">#define PID_CREATE_DTM          12</span>
-<a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#define PID_LASTSAVE_DTM        13</span>
-<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define PID_APPNAME             18</span>
-<a name="l00025"></a>00025 <span class="preprocessor"></span>
-<a name="l00026"></a>00026 <span class="preprocessor">#define PIDD_MANAGER            14</span>
-<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define PIDD_COMPANY            15</span>
-<a name="l00028"></a>00028 <span class="preprocessor"></span>
-<a name="l00029"></a>00029 <span class="preprocessor">#define VT_LPSTR                30</span>
-<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define VT_FILETIME             64</span>
-<a name="l00031"></a>00031 <span class="preprocessor"></span>
-<a name="l00032"></a>00032 <span class="preprocessor">#define TIME_OFFSET_HI          0x019db1de</span>
-<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#define TIME_OFFSET_LO          0xd53e8000</span>
-<a name="l00034"></a>00034 <span class="preprocessor"></span>
-<a name="l00035"></a>00035 <span class="keyword">static</span> <span class="keywordtype">char</span>     *szTitle = NULL;
-<a name="l00036"></a>00036 <span class="keyword">static</span> <span class="keywordtype">char</span>     *szSubject = NULL;
-<a name="l00037"></a>00037 <span class="keyword">static</span> <span class="keywordtype">char</span>     *szAuthor = NULL;
-<a name="l00038"></a>00038 <span class="keyword">static</span> time_t   tCreateDtm = (time_t)-1;
-<a name="l00039"></a>00039 <span class="keyword">static</span> time_t   tLastSaveDtm= (time_t)-1;
-<a name="l00040"></a>00040 <span class="keyword">static</span> <span class="keywordtype">char</span>     *szAppName = NULL;
-<a name="l00041"></a>00041 <span class="keyword">static</span> <span class="keywordtype">char</span>     *szManager = NULL;
-<a name="l00042"></a>00042 <span class="keyword">static</span> <span class="keywordtype">char</span>     *szCompany = NULL;
-<a name="l00043"></a>00043 <span class="keyword">static</span> USHORT   usLid = (USHORT)-1;
-<a name="l00044"></a>00044 
-<a name="l00045"></a>00045 
-<a name="l00046"></a>00046 <span class="comment">/*</span>
-<a name="l00047"></a>00047 <span class="comment"> * vDestroySummaryInfo - destroy the summary information</span>
-<a name="l00048"></a>00048 <span class="comment"> */</span>
-<a name="l00049"></a>00049 <span class="keywordtype">void</span>
-<a name="l00050"></a>00050 vDestroySummaryInfo(<span class="keywordtype">void</span>)
-<a name="l00051"></a>00051 {
-<a name="l00052"></a>00052         TRACE_MSG(<span class="stringliteral">&quot;vDestroySummaryInfo&quot;</span>);
-<a name="l00053"></a>00053 
-<a name="l00054"></a>00054         szTitle = xfree(szTitle);
-<a name="l00055"></a>00055         szSubject = xfree(szSubject);
-<a name="l00056"></a>00056         szAuthor = xfree(szAuthor);
-<a name="l00057"></a>00057         tCreateDtm = (time_t)-1;
-<a name="l00058"></a>00058         tLastSaveDtm = (time_t)-1;
-<a name="l00059"></a>00059         szAppName = xfree(szAppName);
-<a name="l00060"></a>00060         szManager = xfree(szManager);
-<a name="l00061"></a>00061         szCompany = xfree(szCompany);
-<a name="l00062"></a>00062         usLid = (USHORT)-1;
-<a name="l00063"></a>00063 } <span class="comment">/* end of vDestroySummaryInfo */</span>
-<a name="l00064"></a>00064 
-<a name="l00065"></a>00065 <span class="comment">/*</span>
-<a name="l00066"></a>00066 <span class="comment"> * tConvertDosDate - convert DOS date format</span>
-<a name="l00067"></a>00067 <span class="comment"> *</span>
-<a name="l00068"></a>00068 <span class="comment"> * returns Unix time_t or -1</span>
-<a name="l00069"></a>00069 <span class="comment"> */</span>
-<a name="l00070"></a>00070 <span class="keyword">static</span> time_t
-<a name="l00071"></a>00071 tConvertDosDate(<span class="keyword">const</span> <span class="keywordtype">char</span> *szDosDate)
-<a name="l00072"></a>00072 {
-<a name="l00073"></a>00073         <span class="keyword">struct </span>tm       tTime;
-<a name="l00074"></a>00074         <span class="keyword">const</span> <span class="keywordtype">char</span>      *pcTmp;
-<a name="l00075"></a>00075         time_t          tResult;
-<a name="l00076"></a>00076 
-<a name="l00077"></a>00077         memset(&amp;tTime, 0, <span class="keyword">sizeof</span>(tTime));
-<a name="l00078"></a>00078         pcTmp = szDosDate;
-<a name="l00079"></a>00079         <span class="comment">/* Get the month */</span>
-<a name="l00080"></a>00080         <span class="keywordflow">if</span> (!isdigit(*pcTmp)) {
-<a name="l00081"></a>00081                 <span class="keywordflow">return</span> (time_t)-1;
-<a name="l00082"></a>00082         }
-<a name="l00083"></a>00083         tTime.tm_mon = (int)(*pcTmp - <span class="charliteral">&#39;0&#39;</span>);
-<a name="l00084"></a>00084         pcTmp++;
-<a name="l00085"></a>00085         <span class="keywordflow">if</span> (isdigit(*pcTmp)) {
-<a name="l00086"></a>00086                 tTime.tm_mon *= 10;
-<a name="l00087"></a>00087                 tTime.tm_mon += (int)(*pcTmp - <span class="charliteral">&#39;0&#39;</span>);
-<a name="l00088"></a>00088                 pcTmp++;
-<a name="l00089"></a>00089         }
-<a name="l00090"></a>00090         <span class="comment">/* Get the first separater */</span>
-<a name="l00091"></a>00091         <span class="keywordflow">if</span> (isalnum(*pcTmp)) {
-<a name="l00092"></a>00092                 <span class="keywordflow">return</span> (time_t)-1;
-<a name="l00093"></a>00093         }
-<a name="l00094"></a>00094         pcTmp++;
-<a name="l00095"></a>00095         <span class="comment">/* Get the day */</span>
-<a name="l00096"></a>00096         <span class="keywordflow">if</span> (!isdigit(*pcTmp)) {
-<a name="l00097"></a>00097                 <span class="keywordflow">return</span> (time_t)-1;
-<a name="l00098"></a>00098         }
-<a name="l00099"></a>00099         tTime.tm_mday = (int)(*pcTmp - <span class="charliteral">&#39;0&#39;</span>);
-<a name="l00100"></a>00100         pcTmp++;
-<a name="l00101"></a>00101         <span class="keywordflow">if</span> (isdigit(*pcTmp)) {
-<a name="l00102"></a>00102                 tTime.tm_mday *= 10;
-<a name="l00103"></a>00103                 tTime.tm_mday += (int)(*pcTmp - <span class="charliteral">&#39;0&#39;</span>);
-<a name="l00104"></a>00104                 pcTmp++;
-<a name="l00105"></a>00105         }
-<a name="l00106"></a>00106         <span class="comment">/* Get the second separater */</span>
-<a name="l00107"></a>00107         <span class="keywordflow">if</span> (isalnum(*pcTmp)) {
-<a name="l00108"></a>00108                 <span class="keywordflow">return</span> (time_t)-1;
-<a name="l00109"></a>00109         }
-<a name="l00110"></a>00110         pcTmp++;
-<a name="l00111"></a>00111         <span class="comment">/* Get the year */</span>
-<a name="l00112"></a>00112         <span class="keywordflow">if</span> (!isdigit(*pcTmp)) {
-<a name="l00113"></a>00113                 <span class="keywordflow">return</span> (time_t)-1;
-<a name="l00114"></a>00114         }
-<a name="l00115"></a>00115         tTime.tm_year = (int)(*pcTmp - <span class="charliteral">&#39;0&#39;</span>);
-<a name="l00116"></a>00116         pcTmp++;
-<a name="l00117"></a>00117         <span class="keywordflow">if</span> (isdigit(*pcTmp)) {
-<a name="l00118"></a>00118                 tTime.tm_year *= 10;
-<a name="l00119"></a>00119                 tTime.tm_year += (int)(*pcTmp - <span class="charliteral">&#39;0&#39;</span>);
-<a name="l00120"></a>00120                 pcTmp++;
-<a name="l00121"></a>00121         }
-<a name="l00122"></a>00122         <span class="comment">/* Check the values */</span>
-<a name="l00123"></a>00123         <span class="keywordflow">if</span> (tTime.tm_mon == 0 || tTime.tm_mday == 0 || tTime.tm_mday &gt; 31) {
-<a name="l00124"></a>00124                 <span class="keywordflow">return</span> (time_t)-1;
-<a name="l00125"></a>00125         }
-<a name="l00126"></a>00126         <span class="comment">/* Correct the values */</span>
-<a name="l00127"></a>00127         tTime.tm_mon--;         <span class="comment">/* From 01-12 to 00-11 */</span>
-<a name="l00128"></a>00128         <span class="keywordflow">if</span> (tTime.tm_year &lt; 80) {
-<a name="l00129"></a>00129                 tTime.tm_year += 100;   <span class="comment">/* 00 means 2000 is 100 */</span>
-<a name="l00130"></a>00130         }
-<a name="l00131"></a>00131         tTime.tm_isdst = -1;
-<a name="l00132"></a>00132         tResult = mktime(&amp;tTime);
-<a name="l00133"></a>00133         NO_DBG_MSG(ctime(&amp;tResult));
-<a name="l00134"></a>00134         <span class="keywordflow">return</span> tResult;
-<a name="l00135"></a>00135 } <span class="comment">/* end of tConvertDosDate */</span>
-<a name="l00136"></a>00136 
-<a name="l00137"></a>00137 <span class="comment">/*</span>
-<a name="l00138"></a>00138 <span class="comment"> * szLpstr - get a zero terminate string property</span>
-<a name="l00139"></a>00139 <span class="comment"> */</span>
-<a name="l00140"></a>00140 <span class="keyword">static</span> <span class="keywordtype">char</span> *
-<a name="l00141"></a>00141 szLpstr(ULONG ulOffset, <span class="keyword">const</span> UCHAR *aucBuffer)
-<a name="l00142"></a>00142 {
-<a name="l00143"></a>00143         <span class="keywordtype">char</span>    *szStart, *szResult, *szTmp;
-<a name="l00144"></a>00144         <span class="keywordtype">size_t</span>  tSize;
-<a name="l00145"></a>00145 
-<a name="l00146"></a>00146         tSize = (size_t)ulGetLong(ulOffset + 4, aucBuffer);
-<a name="l00147"></a>00147         NO_DBG_DEC(tSize);
-<a name="l00148"></a>00148         <span class="keywordflow">if</span> (tSize == 0) {
-<a name="l00149"></a>00149                 <span class="keywordflow">return</span> NULL;
-<a name="l00150"></a>00150         }
-<a name="l00151"></a>00151         <span class="comment">/* Remove white space from the start of the string */</span>
-<a name="l00152"></a>00152         szStart = (<span class="keywordtype">char</span> *)aucBuffer + ulOffset + 8;
-<a name="l00153"></a>00153         NO_DBG_MSG(szStart);
-<a name="l00154"></a>00154         fail(strlen(szStart) &gt;= tSize);
-<a name="l00155"></a>00155         <span class="keywordflow">while</span> (isspace(*szStart)) {
-<a name="l00156"></a>00156                 szStart++;
-<a name="l00157"></a>00157         }
-<a name="l00158"></a>00158         <span class="keywordflow">if</span> (szStart[0] == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00159"></a>00159                 <span class="keywordflow">return</span> NULL;
-<a name="l00160"></a>00160         }
-<a name="l00161"></a>00161         szResult = xstrdup(szStart);
-<a name="l00162"></a>00162         <span class="comment">/* Remove white space from the end of the string */</span>
-<a name="l00163"></a>00163         szTmp = szResult + strlen(szResult) - 1;
-<a name="l00164"></a>00164         <span class="keywordflow">while</span> (isspace(*szTmp)) {
-<a name="l00165"></a>00165                 *szTmp = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00166"></a>00166                 szTmp--;
-<a name="l00167"></a>00167         }
-<a name="l00168"></a>00168         NO_DBG_MSG(szResult);
-<a name="l00169"></a>00169         <span class="keywordflow">return</span> szResult;
-<a name="l00170"></a>00170 } <span class="comment">/* end of szLpstr */</span>
-<a name="l00171"></a>00171 
-<a name="l00172"></a>00172 <span class="comment">/*</span>
-<a name="l00173"></a>00173 <span class="comment"> * tFiletime - get a filetime property</span>
-<a name="l00174"></a>00174 <span class="comment"> */</span>
-<a name="l00175"></a>00175 <span class="keyword">static</span> time_t
-<a name="l00176"></a>00176 tFiletime(ULONG ulOffset, <span class="keyword">const</span> UCHAR *aucBuffer)
-<a name="l00177"></a>00177 {
-<a name="l00178"></a>00178         <span class="keywordtype">double</span>  dHi, dLo, dTmp;
-<a name="l00179"></a>00179         ULONG   ulHi, ulLo;
-<a name="l00180"></a>00180         time_t  tResult;
-<a name="l00181"></a>00181 
-<a name="l00182"></a>00182         ulLo = ulGetLong(ulOffset + 4, aucBuffer);
-<a name="l00183"></a>00183         ulHi = ulGetLong(ulOffset + 8, aucBuffer);
-<a name="l00184"></a>00184         NO_DBG_HEX(ulHi);
-<a name="l00185"></a>00185         NO_DBG_HEX(ulLo);
-<a name="l00186"></a>00186 
-<a name="l00187"></a>00187         <span class="comment">/* Move the starting point from 01 Jan 1601 to 01 Jan 1970 */</span>
-<a name="l00188"></a>00188         dHi = (double)ulHi - (<span class="keywordtype">double</span>)TIME_OFFSET_HI;
-<a name="l00189"></a>00189         dLo = (double)ulLo - (<span class="keywordtype">double</span>)TIME_OFFSET_LO;
-<a name="l00190"></a>00190         NO_DBG_FLT(dHi);
-<a name="l00191"></a>00191         NO_DBG_FLT(dLo);
-<a name="l00192"></a>00192 
-<a name="l00193"></a>00193         <span class="comment">/* Combine the values and divide by 10^7 to get seconds */</span>
-<a name="l00194"></a>00194         dTmp  = dLo / 10000000.0;       <span class="comment">/* 10^7 */</span>
-<a name="l00195"></a>00195         dTmp += dHi * 429.4967926;      <span class="comment">/* 2^32 / 10^7 */</span>
-<a name="l00196"></a>00196         NO_DBG_FLT(dTmp);
-<a name="l00197"></a>00197 
-<a name="l00198"></a>00198         <span class="comment">/* Make a time_t */</span>
-<a name="l00199"></a>00199         <span class="keywordflow">if</span> (dTmp - 0.5 &lt; TIME_T_MIN || dTmp + 0.5 &gt; TIME_T_MAX) {
-<a name="l00200"></a>00200                 <span class="keywordflow">return</span> (time_t)-1;
-<a name="l00201"></a>00201         }
-<a name="l00202"></a>00202         tResult = dTmp &lt; 0.0 ? (time_t)(dTmp - 0.5) : (time_t)(dTmp + 0.5);
-<a name="l00203"></a>00203         NO_DBG_MSG(ctime(&amp;tResult));
-<a name="l00204"></a>00204         <span class="keywordflow">return</span> tResult;
-<a name="l00205"></a>00205 } <span class="comment">/* end of tFiletime */</span>
-<a name="l00206"></a>00206 
-<a name="l00207"></a>00207 <span class="comment">/*</span>
-<a name="l00208"></a>00208 <span class="comment"> * vAnalyseSummaryInfo - analyse the summary information</span>
-<a name="l00209"></a>00209 <span class="comment"> */</span>
-<a name="l00210"></a>00210 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00211"></a>00211 vAnalyseSummaryInfo(<span class="keyword">const</span> UCHAR *aucBuffer)
-<a name="l00212"></a>00212 {
-<a name="l00213"></a>00213         ULONG   ulOffset;
-<a name="l00214"></a>00214         <span class="keywordtype">size_t</span>  tIndex, tCount, tPropID, tPropType;
-<a name="l00215"></a>00215 
-<a name="l00216"></a>00216         tCount = (size_t)ulGetLong(4, aucBuffer);
-<a name="l00217"></a>00217         DBG_DEC(tCount);
-<a name="l00218"></a>00218         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tCount; tIndex++) {
-<a name="l00219"></a>00219                 tPropID = (size_t)ulGetLong(8 + tIndex * 8, aucBuffer);
-<a name="l00220"></a>00220                 ulOffset = ulGetLong(12 + tIndex * 8, aucBuffer);
-<a name="l00221"></a>00221                 NO_DBG_DEC(tPropID);
-<a name="l00222"></a>00222                 NO_DBG_HEX(ulOffset);
-<a name="l00223"></a>00223                 tPropType = (size_t)ulGetLong(ulOffset, aucBuffer);
-<a name="l00224"></a>00224                 NO_DBG_DEC(tPropType);
-<a name="l00225"></a>00225                 <span class="keywordflow">switch</span> (tPropID) {
-<a name="l00226"></a>00226                 <span class="keywordflow">case</span> PID_TITLE:
-<a name="l00227"></a>00227                         <span class="keywordflow">if</span> (tPropType == VT_LPSTR &amp;&amp; szTitle == NULL) {
-<a name="l00228"></a>00228                                 szTitle = szLpstr(ulOffset, aucBuffer);
-<a name="l00229"></a>00229                         }
-<a name="l00230"></a>00230                         <span class="keywordflow">break</span>;
-<a name="l00231"></a>00231                 <span class="keywordflow">case</span> PID_SUBJECT:
-<a name="l00232"></a>00232                         <span class="keywordflow">if</span> (tPropType == VT_LPSTR &amp;&amp; szSubject == NULL) {
-<a name="l00233"></a>00233                                 szSubject = szLpstr(ulOffset, aucBuffer);
-<a name="l00234"></a>00234                         }
-<a name="l00235"></a>00235                         <span class="keywordflow">break</span>;
-<a name="l00236"></a>00236                 <span class="keywordflow">case</span> PID_AUTHOR:
-<a name="l00237"></a>00237                         <span class="keywordflow">if</span> (tPropType == VT_LPSTR &amp;&amp; szAuthor == NULL) {
-<a name="l00238"></a>00238                                 szAuthor = szLpstr(ulOffset, aucBuffer);
-<a name="l00239"></a>00239                         }
-<a name="l00240"></a>00240                         <span class="keywordflow">break</span>;
-<a name="l00241"></a>00241                 <span class="keywordflow">case</span> PID_CREATE_DTM:
-<a name="l00242"></a>00242                         <span class="keywordflow">if</span> (tPropType == VT_FILETIME &amp;&amp;
-<a name="l00243"></a>00243                             tCreateDtm == (time_t)-1) {
-<a name="l00244"></a>00244                                 tCreateDtm = tFiletime(ulOffset, aucBuffer);
-<a name="l00245"></a>00245                         }
-<a name="l00246"></a>00246                         <span class="keywordflow">break</span>;
-<a name="l00247"></a>00247                 <span class="keywordflow">case</span> PID_LASTSAVE_DTM:
-<a name="l00248"></a>00248                         <span class="keywordflow">if</span> (tPropType == VT_FILETIME &amp;&amp;
-<a name="l00249"></a>00249                             tLastSaveDtm == (time_t)-1) {
-<a name="l00250"></a>00250                                 tLastSaveDtm = tFiletime(ulOffset, aucBuffer);
-<a name="l00251"></a>00251                         }
-<a name="l00252"></a>00252                         <span class="keywordflow">break</span>;
-<a name="l00253"></a>00253                 <span class="keywordflow">case</span> PID_APPNAME:
-<a name="l00254"></a>00254                         <span class="keywordflow">if</span> (tPropType == VT_LPSTR &amp;&amp; szAppName == NULL) {
-<a name="l00255"></a>00255                                 szAppName = szLpstr(ulOffset, aucBuffer);
-<a name="l00256"></a>00256                         }
-<a name="l00257"></a>00257                         <span class="keywordflow">break</span>;
-<a name="l00258"></a>00258                 <span class="keywordflow">default</span>:
-<a name="l00259"></a>00259                         <span class="keywordflow">break</span>;
-<a name="l00260"></a>00260                 }
-<a name="l00261"></a>00261         }
-<a name="l00262"></a>00262 } <span class="comment">/* end of vAnalyseSummaryInfo */</span>
-<a name="l00263"></a>00263 
-<a name="l00264"></a>00264 <span class="comment">/*</span>
-<a name="l00265"></a>00265 <span class="comment"> * vAnalyseDocumentSummaryInfo - analyse the document summary information</span>
-<a name="l00266"></a>00266 <span class="comment"> */</span>
-<a name="l00267"></a>00267 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00268"></a>00268 vAnalyseDocumentSummaryInfo(<span class="keyword">const</span> UCHAR *aucBuffer)
-<a name="l00269"></a>00269 {
-<a name="l00270"></a>00270         ULONG   ulOffset;
-<a name="l00271"></a>00271         <span class="keywordtype">size_t</span>  tIndex, tCount, tPropID, tPropType;
-<a name="l00272"></a>00272 
-<a name="l00273"></a>00273         tCount = (size_t)ulGetLong(4, aucBuffer);
-<a name="l00274"></a>00274         DBG_DEC(tCount);
-<a name="l00275"></a>00275         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tCount; tIndex++) {
-<a name="l00276"></a>00276                 tPropID = (size_t)ulGetLong(8 + tIndex * 8, aucBuffer);
-<a name="l00277"></a>00277                 ulOffset = ulGetLong(12 + tIndex * 8, aucBuffer);
-<a name="l00278"></a>00278                 NO_DBG_DEC(tPropID);
-<a name="l00279"></a>00279                 NO_DBG_HEX(ulOffset);
-<a name="l00280"></a>00280                 tPropType = (size_t)ulGetLong(ulOffset, aucBuffer);
-<a name="l00281"></a>00281                 NO_DBG_DEC(tPropType);
-<a name="l00282"></a>00282                 <span class="keywordflow">switch</span> (tPropID) {
-<a name="l00283"></a>00283                 <span class="keywordflow">case</span> PIDD_MANAGER:
-<a name="l00284"></a>00284                         <span class="keywordflow">if</span> (tPropType == VT_LPSTR &amp;&amp; szManager == NULL) {
-<a name="l00285"></a>00285                                 szManager = szLpstr(ulOffset, aucBuffer);
-<a name="l00286"></a>00286                         }
-<a name="l00287"></a>00287                         <span class="keywordflow">break</span>;
-<a name="l00288"></a>00288                 <span class="keywordflow">case</span> PIDD_COMPANY:
-<a name="l00289"></a>00289                         <span class="keywordflow">if</span> (tPropType == VT_LPSTR &amp;&amp; szCompany == NULL) {
-<a name="l00290"></a>00290                                 szCompany = szLpstr(ulOffset, aucBuffer);
-<a name="l00291"></a>00291                         }
-<a name="l00292"></a>00292                         <span class="keywordflow">break</span>;
-<a name="l00293"></a>00293                 <span class="keywordflow">default</span>:
-<a name="l00294"></a>00294                         <span class="keywordflow">break</span>;
-<a name="l00295"></a>00295                 }
-<a name="l00296"></a>00296         }
-<a name="l00297"></a>00297 } <span class="comment">/* end of vAnalyseDocumentSummaryInfo */</span>
-<a name="l00298"></a>00298 
-<a name="l00299"></a>00299 <span class="comment">/*</span>
-<a name="l00300"></a>00300 <span class="comment"> * pucAnalyseSummaryInfoHeader-</span>
-<a name="l00301"></a>00301 <span class="comment"> */</span>
-<a name="l00302"></a>00302 <span class="keyword">static</span> UCHAR *
-<a name="l00303"></a>00303 pucAnalyseSummaryInfoHeader(FILE *pFile,
-<a name="l00304"></a>00304         ULONG ulStartBlock, ULONG ulSize,
-<a name="l00305"></a>00305         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00306"></a>00306         <span class="keyword">const</span> ULONG *aulSBD, <span class="keywordtype">size_t</span> tSBDLen)
-<a name="l00307"></a>00307 {
-<a name="l00308"></a>00308         <span class="keyword">const</span> ULONG     *aulBlockDepot;
-<a name="l00309"></a>00309         UCHAR   *aucBuffer;
-<a name="l00310"></a>00310         <span class="keywordtype">size_t</span>  tBlockDepotLen, tBlockSize, tSectionCount, tLength;
-<a name="l00311"></a>00311         ULONG   ulTmp, ulOffset;
-<a name="l00312"></a>00312         USHORT  usLittleEndian, usEmpty, usOS, usVersion;
-<a name="l00313"></a>00313         UCHAR   aucHdr[P_HEADER_SZ], aucSecLst[P_SECTION_MAX_SZ];
-<a name="l00314"></a>00314 
-<a name="l00315"></a>00315         <span class="keywordflow">if</span> (ulSize &lt; MIN_SIZE_FOR_BBD_USE) {
-<a name="l00316"></a>00316                 <span class="comment">/* Use the Small Block Depot */</span>
-<a name="l00317"></a>00317                 aulBlockDepot = aulSBD;
-<a name="l00318"></a>00318                 tBlockDepotLen = tSBDLen;
-<a name="l00319"></a>00319                 tBlockSize = SMALL_BLOCK_SIZE;
-<a name="l00320"></a>00320         } <span class="keywordflow">else</span> {
-<a name="l00321"></a>00321                 <span class="comment">/* Use the Big Block Depot */</span>
-<a name="l00322"></a>00322                 aulBlockDepot = aulBBD;
-<a name="l00323"></a>00323                 tBlockDepotLen = tBBDLen;
-<a name="l00324"></a>00324                 tBlockSize = BIG_BLOCK_SIZE;
-<a name="l00325"></a>00325         }
-<a name="l00326"></a>00326 
-<a name="l00327"></a>00327         <span class="keywordflow">if</span> (tBlockDepotLen == 0) {
-<a name="l00328"></a>00328                 DBG_MSG(<span class="stringliteral">&quot;The Block Depot length is zero&quot;</span>);
-<a name="l00329"></a>00329                 <span class="keywordflow">return</span> NULL;
-<a name="l00330"></a>00330         }
-<a name="l00331"></a>00331 
-<a name="l00332"></a>00332         <span class="comment">/* Read the Summery Information header */</span>
-<a name="l00333"></a>00333         <span class="keywordflow">if</span> (!bReadBuffer(pFile, ulStartBlock,
-<a name="l00334"></a>00334                         aulBlockDepot, tBlockDepotLen, tBlockSize,
-<a name="l00335"></a>00335                         aucHdr, 0, P_HEADER_SZ)) {
-<a name="l00336"></a>00336                 <span class="keywordflow">return</span> NULL;
-<a name="l00337"></a>00337         }
-<a name="l00338"></a>00338         NO_DBG_PRINT_BLOCK(aucHdr, P_HEADER_SZ);
-<a name="l00339"></a>00339 
-<a name="l00340"></a>00340         <span class="comment">/* Analyse the Summery Information header */</span>
-<a name="l00341"></a>00341         usLittleEndian =  usGetWord(0, aucHdr);
-<a name="l00342"></a>00342         <span class="keywordflow">if</span> (usLittleEndian != 0xfffe) {
-<a name="l00343"></a>00343                 DBG_HEX(usLittleEndian);
-<a name="l00344"></a>00344                 DBG_MSG_C(usLittleEndian == 0xfeff, <span class="stringliteral">&quot;Big endian&quot;</span>);
-<a name="l00345"></a>00345                 <span class="keywordflow">return</span> NULL;
-<a name="l00346"></a>00346         }
-<a name="l00347"></a>00347         usEmpty =  usGetWord(2, aucHdr);
-<a name="l00348"></a>00348         <span class="keywordflow">if</span> (usEmpty != 0x0000) {
-<a name="l00349"></a>00349                 DBG_DEC(usEmpty);
-<a name="l00350"></a>00350                 <span class="keywordflow">return</span> NULL;
-<a name="l00351"></a>00351         }
-<a name="l00352"></a>00352         ulTmp = ulGetLong(4, aucHdr);
-<a name="l00353"></a>00353         DBG_HEX(ulTmp);
-<a name="l00354"></a>00354         usOS = (USHORT)(ulTmp &gt;&gt; 16);
-<a name="l00355"></a>00355         usVersion = (USHORT)(ulTmp &amp; 0xffff);
-<a name="l00356"></a>00356         <span class="keywordflow">switch</span> (usOS) {
-<a name="l00357"></a>00357         <span class="keywordflow">case</span> 0:
-<a name="l00358"></a>00358                 DBG_MSG(<span class="stringliteral">&quot;Win16&quot;</span>);
-<a name="l00359"></a>00359                 DBG_HEX(usVersion);
-<a name="l00360"></a>00360                 <span class="keywordflow">break</span>;
-<a name="l00361"></a>00361         <span class="keywordflow">case</span> 1:
-<a name="l00362"></a>00362                 DBG_MSG(<span class="stringliteral">&quot;MacOS&quot;</span>);
-<a name="l00363"></a>00363                 DBG_HEX(usVersion);
-<a name="l00364"></a>00364                 <span class="keywordflow">break</span>;
-<a name="l00365"></a>00365         <span class="keywordflow">case</span> 2:
-<a name="l00366"></a>00366                 DBG_MSG(<span class="stringliteral">&quot;Win32&quot;</span>);
-<a name="l00367"></a>00367                 DBG_HEX(usVersion);
-<a name="l00368"></a>00368                 <span class="keywordflow">break</span>;
-<a name="l00369"></a>00369         <span class="keywordflow">default</span>:
-<a name="l00370"></a>00370                 DBG_DEC(usOS);
-<a name="l00371"></a>00371                 DBG_HEX(usVersion);
-<a name="l00372"></a>00372                 <span class="keywordflow">break</span>;
-<a name="l00373"></a>00373         }
-<a name="l00374"></a>00374         tSectionCount = (size_t)ulGetLong(24, aucHdr);
-<a name="l00375"></a>00375         DBG_DEC_C(tSectionCount != 1 &amp;&amp; tSectionCount != 2, tSectionCount);
-<a name="l00376"></a>00376         <span class="keywordflow">if</span> (tSectionCount != 1 &amp;&amp; tSectionCount != 2) {
-<a name="l00377"></a>00377                 <span class="keywordflow">return</span> NULL;
-<a name="l00378"></a>00378         }
-<a name="l00379"></a>00379 
-<a name="l00380"></a>00380         <span class="comment">/* Read the Summery Information Section Lists */</span>
-<a name="l00381"></a>00381         <span class="keywordflow">if</span> (!bReadBuffer(pFile, ulStartBlock,
-<a name="l00382"></a>00382                         aulBlockDepot, tBlockDepotLen, tBlockSize,
-<a name="l00383"></a>00383                         aucSecLst, P_HEADER_SZ, P_SECTION_SZ(tSectionCount))) {
-<a name="l00384"></a>00384                 <span class="keywordflow">return</span> NULL;
-<a name="l00385"></a>00385         }
-<a name="l00386"></a>00386         NO_DBG_PRINT_BLOCK(aucSecLst, P_SECTION_SZ(tSectionCount));
-<a name="l00387"></a>00387 
-<a name="l00388"></a>00388         ulTmp = ulGetLong(0, aucSecLst);
-<a name="l00389"></a>00389         DBG_HEX(ulTmp);
-<a name="l00390"></a>00390         ulTmp = ulGetLong(4, aucSecLst);
-<a name="l00391"></a>00391         DBG_HEX(ulTmp);
-<a name="l00392"></a>00392         ulTmp = ulGetLong(8, aucSecLst);
-<a name="l00393"></a>00393         DBG_HEX(ulTmp);
-<a name="l00394"></a>00394         ulTmp = ulGetLong(12, aucSecLst);
-<a name="l00395"></a>00395         DBG_HEX(ulTmp);
-<a name="l00396"></a>00396         ulOffset = ulGetLong(16, aucSecLst);
-<a name="l00397"></a>00397         DBG_DEC_C(ulOffset != P_HEADER_SZ + P_SECTIONLIST_SZ &amp;&amp;
-<a name="l00398"></a>00398                 ulOffset != P_HEADER_SZ + 2 * P_SECTIONLIST_SZ,
-<a name="l00399"></a>00399                 ulOffset);
-<a name="l00400"></a>00400         fail(ulOffset != P_HEADER_SZ + P_SECTIONLIST_SZ &amp;&amp;
-<a name="l00401"></a>00401                 ulOffset != P_HEADER_SZ + 2 * P_SECTIONLIST_SZ);
-<a name="l00402"></a>00402         tLength =
-<a name="l00403"></a>00403                 (size_t)ulGetLong(tSectionCount * P_SECTIONLIST_SZ, aucSecLst);
-<a name="l00404"></a>00404         NO_DBG_HEX(tLength);
-<a name="l00405"></a>00405         fail(ulOffset + tLength &gt; ulSize);
-<a name="l00406"></a>00406 
-<a name="l00407"></a>00407         <span class="comment">/* Read the Summery Information */</span>
-<a name="l00408"></a>00408         aucBuffer = xmalloc(tLength);
-<a name="l00409"></a>00409         <span class="keywordflow">if</span> (!bReadBuffer(pFile, ulStartBlock,
-<a name="l00410"></a>00410                         aulBlockDepot, tBlockDepotLen, tBlockSize,
-<a name="l00411"></a>00411                         aucBuffer, ulOffset, tLength)) {
-<a name="l00412"></a>00412                 aucBuffer = xfree(aucBuffer);
-<a name="l00413"></a>00413                 <span class="keywordflow">return</span> NULL;
-<a name="l00414"></a>00414         }
-<a name="l00415"></a>00415         NO_DBG_PRINT_BLOCK(aucBuffer, tLength);
-<a name="l00416"></a>00416         <span class="keywordflow">return</span> aucBuffer;
-<a name="l00417"></a>00417 } <span class="comment">/* end of pucAnalyseSummaryInfoHeader */</span>
-<a name="l00418"></a>00418 
-<a name="l00419"></a>00419 <span class="comment">/*</span>
-<a name="l00420"></a>00420 <span class="comment"> * vSet0SummaryInfo - set summary information from a Word for DOS file</span>
-<a name="l00421"></a>00421 <span class="comment"> */</span>
-<a name="l00422"></a>00422 <span class="keywordtype">void</span>
-<a name="l00423"></a>00423 vSet0SummaryInfo(FILE *pFile, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00424"></a>00424 {
-<a name="l00425"></a>00425         UCHAR   *aucBuffer;
-<a name="l00426"></a>00426         ULONG   ulBeginSumdInfo, ulBeginNextBlock;
-<a name="l00427"></a>00427         <span class="keywordtype">size_t</span>  tLen;
-<a name="l00428"></a>00428         USHORT  usCodepage, usOffset;
-<a name="l00429"></a>00429 
-<a name="l00430"></a>00430         TRACE_MSG(<span class="stringliteral">&quot;vSet0SummaryInfo&quot;</span>);
-<a name="l00431"></a>00431 
-<a name="l00432"></a>00432         fail(pFile == NULL || aucHeader == NULL);
-<a name="l00433"></a>00433 
-<a name="l00434"></a>00434         <span class="comment">/* First check the header */</span>
-<a name="l00435"></a>00435         usCodepage = usGetWord(0x7e, aucHeader);
-<a name="l00436"></a>00436         DBG_DEC(usCodepage);
-<a name="l00437"></a>00437         <span class="keywordflow">switch</span> (usCodepage) {
-<a name="l00438"></a>00438         <span class="keywordflow">case</span> 850: usLid = 0x0809; <span class="keywordflow">break</span>; <span class="comment">/* Latin1 -&gt; British English */</span>
-<a name="l00439"></a>00439         <span class="keywordflow">case</span> 862: usLid = 0x040d; <span class="keywordflow">break</span>; <span class="comment">/* Hebrew */</span>
-<a name="l00440"></a>00440         <span class="keywordflow">case</span> 866: usLid = 0x0419; <span class="keywordflow">break</span>; <span class="comment">/* Russian */</span>
-<a name="l00441"></a>00441         <span class="keywordflow">case</span> 0:
-<a name="l00442"></a>00442         <span class="keywordflow">case</span> 437:
-<a name="l00443"></a>00443         <span class="keywordflow">default</span>: usLid = 0x0409; <span class="keywordflow">break</span>; <span class="comment">/* ASCII -&gt; American English */</span>
-<a name="l00444"></a>00444         }
-<a name="l00445"></a>00445 
-<a name="l00446"></a>00446         <span class="comment">/* Second check the summary information block */</span>
-<a name="l00447"></a>00447         ulBeginSumdInfo = 128 * (ULONG)usGetWord(0x1c, aucHeader);
-<a name="l00448"></a>00448         DBG_HEX(ulBeginSumdInfo);
-<a name="l00449"></a>00449         ulBeginNextBlock = 128 * (ULONG)usGetWord(0x6a, aucHeader);
-<a name="l00450"></a>00450         DBG_HEX(ulBeginNextBlock);
-<a name="l00451"></a>00451 
-<a name="l00452"></a>00452         <span class="keywordflow">if</span> (ulBeginSumdInfo &gt;= ulBeginNextBlock || ulBeginNextBlock == 0) {
-<a name="l00453"></a>00453                 <span class="comment">/* There is no summary information block */</span>
-<a name="l00454"></a>00454                 <span class="keywordflow">return</span>;
-<a name="l00455"></a>00455         }
-<a name="l00456"></a>00456         tLen = (size_t)(ulBeginNextBlock - ulBeginSumdInfo);
-<a name="l00457"></a>00457         aucBuffer = xmalloc(tLen);
-<a name="l00458"></a>00458         <span class="comment">/* Read the summary information block */</span>
-<a name="l00459"></a>00459         <span class="keywordflow">if</span> (!bReadBytes(aucBuffer, tLen, ulBeginSumdInfo, pFile)) {
-<a name="l00460"></a>00460                 <span class="keywordflow">return</span>;
-<a name="l00461"></a>00461         }
-<a name="l00462"></a>00462         usOffset = usGetWord(0, aucBuffer);
-<a name="l00463"></a>00463         <span class="keywordflow">if</span> (aucBuffer[usOffset] != 0) {
-<a name="l00464"></a>00464                 NO_DBG_MSG(aucBuffer + usOffset);
-<a name="l00465"></a>00465                 szTitle = xstrdup((<span class="keywordtype">char</span> *)aucBuffer + usOffset);
-<a name="l00466"></a>00466         }
-<a name="l00467"></a>00467         usOffset = usGetWord(2, aucBuffer);
-<a name="l00468"></a>00468         <span class="keywordflow">if</span> (aucBuffer[usOffset] != 0) {
-<a name="l00469"></a>00469                 NO_DBG_MSG(aucBuffer + usOffset);
-<a name="l00470"></a>00470                 szAuthor = xstrdup((<span class="keywordtype">char</span> *)aucBuffer + usOffset);
-<a name="l00471"></a>00471         }
-<a name="l00472"></a>00472         usOffset = usGetWord(12, aucBuffer);
-<a name="l00473"></a>00473         <span class="keywordflow">if</span> (aucBuffer[usOffset] != 0) {
-<a name="l00474"></a>00474                 NO_DBG_STRN(aucBuffer + usOffset, 8);
-<a name="l00475"></a>00475                 tLastSaveDtm = tConvertDosDate((<span class="keywordtype">char</span> *)aucBuffer + usOffset);
-<a name="l00476"></a>00476         }
-<a name="l00477"></a>00477         usOffset = usGetWord(14, aucBuffer);
-<a name="l00478"></a>00478         <span class="keywordflow">if</span> (aucBuffer[usOffset] != 0) {
-<a name="l00479"></a>00479                 NO_DBG_STRN(aucBuffer + usOffset, 8);
-<a name="l00480"></a>00480                 tCreateDtm = tConvertDosDate((<span class="keywordtype">char</span> *)aucBuffer + usOffset);
-<a name="l00481"></a>00481         }
-<a name="l00482"></a>00482         aucBuffer = xfree(aucBuffer);
-<a name="l00483"></a>00483 } <span class="comment">/* end of vSet0SummaryInfo */</span>
-<a name="l00484"></a>00484 
-<a name="l00485"></a>00485 <span class="comment">/*</span>
-<a name="l00486"></a>00486 <span class="comment"> * vSet2SummaryInfo - set summary information from a WinWord 1/2 file</span>
-<a name="l00487"></a>00487 <span class="comment"> */</span>
-<a name="l00488"></a>00488 <span class="keywordtype">void</span>
-<a name="l00489"></a>00489 vSet2SummaryInfo(FILE *pFile, <span class="keywordtype">int</span> iWordVersion, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00490"></a>00490 {
-<a name="l00491"></a>00491         UCHAR   *aucBuffer;
-<a name="l00492"></a>00492         ULONG   ulBeginSumdInfo, ulBeginDocpInfo, ulTmp;
-<a name="l00493"></a>00493         <span class="keywordtype">size_t</span>  tSumdInfoLen, tDocpInfoLen, tLen, tCounter, tStart;
-<a name="l00494"></a>00494 
-<a name="l00495"></a>00495         TRACE_MSG(<span class="stringliteral">&quot;vSet2SummaryInfo&quot;</span>);
-<a name="l00496"></a>00496 
-<a name="l00497"></a>00497         fail(pFile == NULL || aucHeader == NULL);
-<a name="l00498"></a>00498         fail(iWordVersion != 1 &amp;&amp; iWordVersion != 2);
-<a name="l00499"></a>00499 
-<a name="l00500"></a>00500         <span class="comment">/* First check the header */</span>
-<a name="l00501"></a>00501         usLid = usGetWord(0x06, aucHeader); <span class="comment">/* Language IDentification */</span>
-<a name="l00502"></a>00502         DBG_HEX(usLid);
-<a name="l00503"></a>00503         <span class="keywordflow">if</span> (usLid &lt; 999 &amp;&amp; iWordVersion == 1) {
-<a name="l00504"></a>00504                 <span class="keywordflow">switch</span> (usLid) {
-<a name="l00505"></a>00505                 <span class="keywordflow">case</span>   1: usLid = 0x0409; <span class="keywordflow">break</span>;        <span class="comment">/* American English */</span>
-<a name="l00506"></a>00506                 <span class="keywordflow">case</span>   2: usLid = 0x0c0c; <span class="keywordflow">break</span>;        <span class="comment">/* Canadian French */</span>
-<a name="l00507"></a>00507                 <span class="keywordflow">case</span>  31: usLid = 0x0413; <span class="keywordflow">break</span>;        <span class="comment">/* Dutch */</span>
-<a name="l00508"></a>00508                 <span class="keywordflow">case</span>  33: usLid = 0x040c; <span class="keywordflow">break</span>;        <span class="comment">/* French */</span>
-<a name="l00509"></a>00509                 <span class="keywordflow">case</span>  34: usLid = 0x040a; <span class="keywordflow">break</span>;        <span class="comment">/* Spanish */</span>
-<a name="l00510"></a>00510                 <span class="keywordflow">case</span>  36: usLid = 0x040e; <span class="keywordflow">break</span>;        <span class="comment">/* Hungarian */</span>
-<a name="l00511"></a>00511                 <span class="keywordflow">case</span>  39: usLid = 0x0410; <span class="keywordflow">break</span>;        <span class="comment">/* Italian */</span>
-<a name="l00512"></a>00512                 <span class="keywordflow">case</span>  44: usLid = 0x0809; <span class="keywordflow">break</span>;        <span class="comment">/* British English */</span>
-<a name="l00513"></a>00513                 <span class="keywordflow">case</span>  45: usLid = 0x0406; <span class="keywordflow">break</span>;        <span class="comment">/* Danish */</span>
-<a name="l00514"></a>00514                 <span class="keywordflow">case</span>  46: usLid = 0x041f; <span class="keywordflow">break</span>;        <span class="comment">/* Swedish */</span>
-<a name="l00515"></a>00515                 <span class="keywordflow">case</span>  47: usLid = 0x0414; <span class="keywordflow">break</span>;        <span class="comment">/* Norwegian */</span>
-<a name="l00516"></a>00516                 <span class="keywordflow">case</span>  48: usLid = 0x0415; <span class="keywordflow">break</span>;        <span class="comment">/* Polish */</span>
-<a name="l00517"></a>00517                 <span class="keywordflow">case</span>  49: usLid = 0x0407; <span class="keywordflow">break</span>;        <span class="comment">/* German */</span>
-<a name="l00518"></a>00518                 <span class="keywordflow">case</span> 351: usLid = 0x0816; <span class="keywordflow">break</span>;        <span class="comment">/* Portuguese */</span>
-<a name="l00519"></a>00519                 <span class="keywordflow">case</span> 358: usLid = 0x040b; <span class="keywordflow">break</span>;        <span class="comment">/* Finnish */</span>
-<a name="l00520"></a>00520                 <span class="keywordflow">default</span>:
-<a name="l00521"></a>00521                         DBG_DEC(usLid);
-<a name="l00522"></a>00522                         DBG_FIXME();
-<a name="l00523"></a>00523                         usLid = 0x0409;         <span class="comment">/* American English */</span>
-<a name="l00524"></a>00524                         <span class="keywordflow">break</span>;
-<a name="l00525"></a>00525                 }
-<a name="l00526"></a>00526         }
-<a name="l00527"></a>00527 
-<a name="l00528"></a>00528         <span class="keywordflow">if</span> (iWordVersion != 2) {
-<a name="l00529"></a>00529                 <span class="comment">/* Unknown where to find the associated strings */</span>
-<a name="l00530"></a>00530                 <span class="keywordflow">return</span>;
-<a name="l00531"></a>00531         }
-<a name="l00532"></a>00532 
-<a name="l00533"></a>00533         <span class="comment">/* Second check the associated strings */</span>
-<a name="l00534"></a>00534         ulBeginSumdInfo = ulGetLong(0x118, aucHeader); <span class="comment">/* fcSttbfAssoc */</span>
-<a name="l00535"></a>00535         DBG_HEX(ulBeginSumdInfo);
-<a name="l00536"></a>00536         tSumdInfoLen = (size_t)usGetWord(0x11c, aucHeader); <span class="comment">/* cbSttbfAssoc */</span>
-<a name="l00537"></a>00537         DBG_DEC(tSumdInfoLen);
-<a name="l00538"></a>00538 
-<a name="l00539"></a>00539         <span class="keywordflow">if</span> (tSumdInfoLen == 0) {
-<a name="l00540"></a>00540                 <span class="comment">/* There is no summary information */</span>
-<a name="l00541"></a>00541                 <span class="keywordflow">return</span>;
-<a name="l00542"></a>00542         }
-<a name="l00543"></a>00543 
-<a name="l00544"></a>00544         aucBuffer = xmalloc(tSumdInfoLen);
-<a name="l00545"></a>00545         <span class="keywordflow">if</span> (!bReadBytes(aucBuffer, tSumdInfoLen, ulBeginSumdInfo, pFile)) {
-<a name="l00546"></a>00546                 aucBuffer = xfree(aucBuffer);
-<a name="l00547"></a>00547                 <span class="keywordflow">return</span>;
-<a name="l00548"></a>00548         }
-<a name="l00549"></a>00549         NO_DBG_PRINT_BLOCK(aucBuffer, tSumdInfoLen);
-<a name="l00550"></a>00550         tLen = (size_t)ucGetByte(0, aucBuffer);
-<a name="l00551"></a>00551         DBG_DEC_C(tSumdInfoLen != tLen, tSumdInfoLen);
-<a name="l00552"></a>00552         DBG_DEC_C(tSumdInfoLen != tLen, tLen);
-<a name="l00553"></a>00553         tStart = 1;
-<a name="l00554"></a>00554         <span class="keywordflow">for</span> (tCounter = 0; tCounter &lt; 17; tCounter++) {
-<a name="l00555"></a>00555                 <span class="keywordflow">if</span> (tStart &gt;= tSumdInfoLen) {
-<a name="l00556"></a>00556                         <span class="keywordflow">break</span>;
-<a name="l00557"></a>00557                 }
-<a name="l00558"></a>00558                 tLen = (size_t)ucGetByte(tStart, aucBuffer);
-<a name="l00559"></a>00559                 <span class="keywordflow">if</span> (tLen != 0) {
-<a name="l00560"></a>00560                         NO_DBG_DEC(tCounter);
-<a name="l00561"></a>00561                         NO_DBG_STRN(aucBuffer + tStart + 1, tLen);
-<a name="l00562"></a>00562                         <span class="keywordflow">switch</span> (tCounter) {
-<a name="l00563"></a>00563                         <span class="keywordflow">case</span> 3:
-<a name="l00564"></a>00564                                 szTitle = xmalloc(tLen + 1);
-<a name="l00565"></a>00565                                 strncpy(szTitle,
-<a name="l00566"></a>00566                                         (<span class="keywordtype">char</span> *)aucBuffer + tStart + 1, tLen);
-<a name="l00567"></a>00567                                 szTitle[tLen] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00568"></a>00568                                 <span class="keywordflow">break</span>;
-<a name="l00569"></a>00569                         <span class="keywordflow">case</span> 4:
-<a name="l00570"></a>00570                                 szSubject = xmalloc(tLen + 1);
-<a name="l00571"></a>00571                                 strncpy(szSubject,
-<a name="l00572"></a>00572                                         (<span class="keywordtype">char</span> *)aucBuffer + tStart + 1, tLen);
-<a name="l00573"></a>00573                                 szSubject[tLen] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00574"></a>00574                                 <span class="keywordflow">break</span>;
-<a name="l00575"></a>00575                         <span class="keywordflow">case</span> 7:
-<a name="l00576"></a>00576                                 szAuthor = xmalloc(tLen + 1);
-<a name="l00577"></a>00577                                 strncpy(szAuthor,
-<a name="l00578"></a>00578                                         (<span class="keywordtype">char</span> *)aucBuffer + tStart + 1, tLen);
-<a name="l00579"></a>00579                                 szAuthor[tLen] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00580"></a>00580                                 <span class="keywordflow">break</span>;
-<a name="l00581"></a>00581                         <span class="keywordflow">default</span>:
-<a name="l00582"></a>00582                                 <span class="keywordflow">break</span>;
-<a name="l00583"></a>00583                         }
-<a name="l00584"></a>00584                 }
-<a name="l00585"></a>00585                 tStart += tLen + 1;
-<a name="l00586"></a>00586         }
-<a name="l00587"></a>00587         aucBuffer = xfree(aucBuffer);
-<a name="l00588"></a>00588 
-<a name="l00589"></a>00589         <span class="comment">/* Third check the document properties */</span>
-<a name="l00590"></a>00590         ulBeginDocpInfo = ulGetLong(0x112, aucHeader); <span class="comment">/* fcDop */</span>
-<a name="l00591"></a>00591         DBG_HEX(ulBeginDocpInfo);
-<a name="l00592"></a>00592         tDocpInfoLen = (size_t)usGetWord(0x116, aucHeader); <span class="comment">/* cbDop */</span>
-<a name="l00593"></a>00593         DBG_DEC(tDocpInfoLen);
-<a name="l00594"></a>00594         <span class="keywordflow">if</span> (tDocpInfoLen &lt; 12) {
-<a name="l00595"></a>00595                 <span class="keywordflow">return</span>;
-<a name="l00596"></a>00596         }
-<a name="l00597"></a>00597 
-<a name="l00598"></a>00598         aucBuffer = xmalloc(tDocpInfoLen);
-<a name="l00599"></a>00599         <span class="keywordflow">if</span> (!bReadBytes(aucBuffer, tDocpInfoLen, ulBeginDocpInfo, pFile)) {
-<a name="l00600"></a>00600                 aucBuffer = xfree(aucBuffer);
-<a name="l00601"></a>00601                 <span class="keywordflow">return</span>;
-<a name="l00602"></a>00602         }
-<a name="l00603"></a>00603         ulTmp = ulGetLong(0x14, aucBuffer); <span class="comment">/* dttmCreated */</span>
-<a name="l00604"></a>00604         tCreateDtm = tConvertDTTM(ulTmp);
-<a name="l00605"></a>00605         ulTmp = ulGetLong(0x18, aucBuffer); <span class="comment">/* dttmRevised */</span>
-<a name="l00606"></a>00606         tLastSaveDtm = tConvertDTTM(ulTmp);
-<a name="l00607"></a>00607         aucBuffer = xfree(aucBuffer);
-<a name="l00608"></a>00608 } <span class="comment">/* end of vSet2SummaryInfo */</span>
-<a name="l00609"></a>00609 
-<a name="l00610"></a>00610 <span class="comment">/*</span>
-<a name="l00611"></a>00611 <span class="comment"> * vSetSummaryInfoOLE - set summary information from a Word 6+ file</span>
-<a name="l00612"></a>00612 <span class="comment"> */</span>
-<a name="l00613"></a>00613 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00614"></a>00614 vSetSummaryInfoOLE(FILE *pFile, <span class="keyword">const</span> pps_info_type *pPPS,
-<a name="l00615"></a>00615         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00616"></a>00616         <span class="keyword">const</span> ULONG *aulSBD, <span class="keywordtype">size_t</span> tSBDLen)
-<a name="l00617"></a>00617 {
-<a name="l00618"></a>00618         UCHAR   *pucBuffer;
-<a name="l00619"></a>00619 
-<a name="l00620"></a>00620         fail(pFile == NULL || pPPS == NULL);
-<a name="l00621"></a>00621         fail(aulBBD == NULL || aulSBD == NULL);
-<a name="l00622"></a>00622 
-<a name="l00623"></a>00623         <span class="comment">/* Summary Information */</span>
-<a name="l00624"></a>00624         pucBuffer = pucAnalyseSummaryInfoHeader(pFile,
-<a name="l00625"></a>00625                 pPPS-&gt;tSummaryInfo.ulSB, pPPS-&gt;tSummaryInfo.ulSize,
-<a name="l00626"></a>00626                 aulBBD, tBBDLen, aulSBD, tSBDLen);
-<a name="l00627"></a>00627         <span class="keywordflow">if</span> (pucBuffer != NULL) {
-<a name="l00628"></a>00628                 vAnalyseSummaryInfo(pucBuffer);
-<a name="l00629"></a>00629                 pucBuffer = xfree(pucBuffer);
-<a name="l00630"></a>00630         }
-<a name="l00631"></a>00631 
-<a name="l00632"></a>00632         <span class="comment">/* Document Summary Information */</span>
-<a name="l00633"></a>00633         pucBuffer = pucAnalyseSummaryInfoHeader(pFile,
-<a name="l00634"></a>00634                 pPPS-&gt;tDocSummaryInfo.ulSB, pPPS-&gt;tDocSummaryInfo.ulSize,
-<a name="l00635"></a>00635                 aulBBD, tBBDLen, aulSBD, tSBDLen);
-<a name="l00636"></a>00636         <span class="keywordflow">if</span> (pucBuffer != NULL) {
-<a name="l00637"></a>00637                 vAnalyseDocumentSummaryInfo(pucBuffer);
-<a name="l00638"></a>00638                 pucBuffer = xfree(pucBuffer);
-<a name="l00639"></a>00639         }
-<a name="l00640"></a>00640 } <span class="comment">/* end of vSetSummaryInfoOLE */</span>
-<a name="l00641"></a>00641 
-<a name="l00642"></a>00642 <span class="comment">/*</span>
-<a name="l00643"></a>00643 <span class="comment"> * vSet6SummaryInfo - set summary information from a Word 6/7 file</span>
-<a name="l00644"></a>00644 <span class="comment"> */</span>
-<a name="l00645"></a>00645 <span class="keywordtype">void</span>
-<a name="l00646"></a>00646 vSet6SummaryInfo(FILE *pFile, <span class="keyword">const</span> pps_info_type *pPPS,
-<a name="l00647"></a>00647         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00648"></a>00648         <span class="keyword">const</span> ULONG *aulSBD, <span class="keywordtype">size_t</span> tSBDLen,
-<a name="l00649"></a>00649         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00650"></a>00650 {
-<a name="l00651"></a>00651         TRACE_MSG(<span class="stringliteral">&quot;vSet6SummaryInfo&quot;</span>);
-<a name="l00652"></a>00652 
-<a name="l00653"></a>00653         <span class="comment">/* Header Information */</span>
-<a name="l00654"></a>00654         usLid = usGetWord(0x06, aucHeader); <span class="comment">/* Language IDentification */</span>
-<a name="l00655"></a>00655         DBG_HEX(usLid);
-<a name="l00656"></a>00656 
-<a name="l00657"></a>00657         <span class="comment">/* Summery Information */</span>
-<a name="l00658"></a>00658         vSetSummaryInfoOLE(pFile, pPPS, aulBBD, tBBDLen, aulSBD, tSBDLen);
-<a name="l00659"></a>00659 } <span class="comment">/* end of vSet6SummaryInfo */</span>
-<a name="l00660"></a>00660 
-<a name="l00661"></a>00661 <span class="comment">/*</span>
-<a name="l00662"></a>00662 <span class="comment"> * vSet8SummaryInfo - set summary information a Word 8/9/10 file</span>
-<a name="l00663"></a>00663 <span class="comment"> */</span>
-<a name="l00664"></a>00664 <span class="keywordtype">void</span>
-<a name="l00665"></a>00665 vSet8SummaryInfo(FILE *pFile, <span class="keyword">const</span> pps_info_type *pPPS,
-<a name="l00666"></a>00666         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00667"></a>00667         <span class="keyword">const</span> ULONG *aulSBD, <span class="keywordtype">size_t</span> tSBDLen,
-<a name="l00668"></a>00668         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00669"></a>00669 {
-<a name="l00670"></a>00670         USHORT  usTmp;
-<a name="l00671"></a>00671 
-<a name="l00672"></a>00672         TRACE_MSG(<span class="stringliteral">&quot;vSet8SummaryInfo&quot;</span>);
-<a name="l00673"></a>00673 
-<a name="l00674"></a>00674         <span class="comment">/* Header Information */</span>
-<a name="l00675"></a>00675         usTmp = usGetWord(0x0a, aucHeader);
-<a name="l00676"></a>00676         <span class="keywordflow">if</span> (usTmp &amp; BIT(14)) {
-<a name="l00677"></a>00677                 <span class="comment">/* Language IDentification Far East */</span>
-<a name="l00678"></a>00678                 usLid = usGetWord(0x3c, aucHeader);
-<a name="l00679"></a>00679         } <span class="keywordflow">else</span> {
-<a name="l00680"></a>00680                 <span class="comment">/* Language IDentification */</span>
-<a name="l00681"></a>00681                 usLid = usGetWord(0x06, aucHeader);
-<a name="l00682"></a>00682         }
-<a name="l00683"></a>00683         DBG_HEX(usLid);
-<a name="l00684"></a>00684 
-<a name="l00685"></a>00685         <span class="comment">/* Summery Information */</span>
-<a name="l00686"></a>00686         vSetSummaryInfoOLE(pFile, pPPS, aulBBD, tBBDLen, aulSBD, tSBDLen);
-<a name="l00687"></a>00687 } <span class="comment">/* end of vSet8SummaryInfo */</span>
-<a name="l00688"></a>00688 
-<a name="l00689"></a>00689 <span class="comment">/*</span>
-<a name="l00690"></a>00690 <span class="comment"> * szGetTitle - get the title field</span>
-<a name="l00691"></a>00691 <span class="comment"> */</span>
-<a name="l00692"></a>00692 <span class="keyword">const</span> <span class="keywordtype">char</span> *
-<a name="l00693"></a>00693 szGetTitle(<span class="keywordtype">void</span>)
-<a name="l00694"></a>00694 {
-<a name="l00695"></a>00695         <span class="keywordflow">return</span> szTitle;
-<a name="l00696"></a>00696 } <span class="comment">/* end of szGetTitle */</span>
-<a name="l00697"></a>00697 
-<a name="l00698"></a>00698 <span class="comment">/*</span>
-<a name="l00699"></a>00699 <span class="comment"> * szGetSubject - get the subject field</span>
-<a name="l00700"></a>00700 <span class="comment"> */</span>
-<a name="l00701"></a>00701 <span class="keyword">const</span> <span class="keywordtype">char</span> *
-<a name="l00702"></a>00702 szGetSubject(<span class="keywordtype">void</span>)
-<a name="l00703"></a>00703 {
-<a name="l00704"></a>00704         <span class="keywordflow">return</span> szSubject;
-<a name="l00705"></a>00705 } <span class="comment">/* end of szGetSubject */</span>
-<a name="l00706"></a>00706 
-<a name="l00707"></a>00707 <span class="comment">/*</span>
-<a name="l00708"></a>00708 <span class="comment"> * szGetAuthor - get the author field</span>
-<a name="l00709"></a>00709 <span class="comment"> */</span>
-<a name="l00710"></a>00710 <span class="keyword">const</span> <span class="keywordtype">char</span> *
-<a name="l00711"></a>00711 szGetAuthor(<span class="keywordtype">void</span>)
-<a name="l00712"></a>00712 {
-<a name="l00713"></a>00713         <span class="keywordflow">return</span> szAuthor;
-<a name="l00714"></a>00714 } <span class="comment">/* end of szGetAuthor */</span>
-<a name="l00715"></a>00715 
-<a name="l00716"></a>00716 <span class="comment">/*</span>
-<a name="l00717"></a>00717 <span class="comment"> * szGetLastSaveDtm - get the last save date field</span>
-<a name="l00718"></a>00718 <span class="comment"> */</span>
-<a name="l00719"></a>00719 <span class="keyword">const</span> <span class="keywordtype">char</span> *
-<a name="l00720"></a>00720 szGetLastSaveDtm(<span class="keywordtype">void</span>)
-<a name="l00721"></a>00721 {
-<a name="l00722"></a>00722         <span class="keyword">static</span> <span class="keywordtype">char</span>     szTime[12];
-<a name="l00723"></a>00723         <span class="keyword">struct </span>tm       *pTime;
-<a name="l00724"></a>00724 
-<a name="l00725"></a>00725         <span class="keywordflow">if</span> (tLastSaveDtm == (time_t)-1) {
-<a name="l00726"></a>00726                 <span class="keywordflow">return</span> NULL;
-<a name="l00727"></a>00727         }
-<a name="l00728"></a>00728         pTime = localtime(&amp;tLastSaveDtm);
-<a name="l00729"></a>00729         <span class="keywordflow">if</span> (pTime == NULL) {
-<a name="l00730"></a>00730                 <span class="keywordflow">return</span> NULL;
-<a name="l00731"></a>00731         }
-<a name="l00732"></a>00732         sprintf(szTime, <span class="stringliteral">&quot;%04d-%02d-%02d&quot;</span>,
-<a name="l00733"></a>00733                 pTime-&gt;tm_year + 1900, pTime-&gt;tm_mon + 1, pTime-&gt;tm_mday);
-<a name="l00734"></a>00734         <span class="keywordflow">return</span> szTime;
-<a name="l00735"></a>00735 } <span class="comment">/* end of szGetLastSaveDtm */</span>
-<a name="l00736"></a>00736 
-<a name="l00737"></a>00737 <span class="comment">/*</span>
-<a name="l00738"></a>00738 <span class="comment"> * szGetModDate - get the last save date field</span>
-<a name="l00739"></a>00739 <span class="comment"> */</span>
-<a name="l00740"></a>00740 <span class="keyword">const</span> <span class="keywordtype">char</span> *
-<a name="l00741"></a>00741 szGetModDate(<span class="keywordtype">void</span>)
-<a name="l00742"></a>00742 {
-<a name="l00743"></a>00743         <span class="keyword">static</span> <span class="keywordtype">char</span>     szTime[20];
-<a name="l00744"></a>00744         <span class="keyword">struct </span>tm       *pTime;
-<a name="l00745"></a>00745 
-<a name="l00746"></a>00746         <span class="keywordflow">if</span> (tLastSaveDtm == (time_t)-1) {
-<a name="l00747"></a>00747                 <span class="keywordflow">return</span> NULL;
-<a name="l00748"></a>00748         }
-<a name="l00749"></a>00749         pTime = localtime(&amp;tLastSaveDtm);
-<a name="l00750"></a>00750         <span class="keywordflow">if</span> (pTime == NULL) {
-<a name="l00751"></a>00751                 <span class="keywordflow">return</span> NULL;
-<a name="l00752"></a>00752         }
-<a name="l00753"></a>00753         sprintf(szTime, <span class="stringliteral">&quot;D:%04d%02d%02d%02d%02d&quot;</span>,
-<a name="l00754"></a>00754                 pTime-&gt;tm_year + 1900, pTime-&gt;tm_mon + 1, pTime-&gt;tm_mday,
-<a name="l00755"></a>00755                 pTime-&gt;tm_hour, pTime-&gt;tm_min);
-<a name="l00756"></a>00756         <span class="keywordflow">return</span> szTime;
-<a name="l00757"></a>00757 } <span class="comment">/* end of szGetModDate */</span>
-<a name="l00758"></a>00758 
-<a name="l00759"></a>00759 <span class="comment">/*</span>
-<a name="l00760"></a>00760 <span class="comment"> * szGetCreationDate - get the last save date field</span>
-<a name="l00761"></a>00761 <span class="comment"> */</span>
-<a name="l00762"></a>00762 <span class="keyword">const</span> <span class="keywordtype">char</span> *
-<a name="l00763"></a>00763 szGetCreationDate(<span class="keywordtype">void</span>)
-<a name="l00764"></a>00764 {
-<a name="l00765"></a>00765         <span class="keyword">static</span> <span class="keywordtype">char</span>     szTime[20];
-<a name="l00766"></a>00766         <span class="keyword">struct </span>tm       *pTime;
-<a name="l00767"></a>00767 
-<a name="l00768"></a>00768         <span class="keywordflow">if</span> (tCreateDtm == (time_t)-1) {
-<a name="l00769"></a>00769                 <span class="keywordflow">return</span> NULL;
-<a name="l00770"></a>00770         }
-<a name="l00771"></a>00771         pTime = localtime(&amp;tCreateDtm);
-<a name="l00772"></a>00772         <span class="keywordflow">if</span> (pTime == NULL) {
-<a name="l00773"></a>00773                 <span class="keywordflow">return</span> NULL;
-<a name="l00774"></a>00774         }
-<a name="l00775"></a>00775         sprintf(szTime, <span class="stringliteral">&quot;D:%04d%02d%02d%02d%02d&quot;</span>,
-<a name="l00776"></a>00776                 pTime-&gt;tm_year + 1900, pTime-&gt;tm_mon + 1, pTime-&gt;tm_mday,
-<a name="l00777"></a>00777                 pTime-&gt;tm_hour, pTime-&gt;tm_min);
-<a name="l00778"></a>00778         <span class="keywordflow">return</span> szTime;
-<a name="l00779"></a>00779 } <span class="comment">/* end of szGetCreationDate */</span>
-<a name="l00780"></a>00780 
-<a name="l00781"></a>00781 <span class="comment">/*</span>
-<a name="l00782"></a>00782 <span class="comment"> * szGetCompany - get the company field</span>
-<a name="l00783"></a>00783 <span class="comment"> */</span>
-<a name="l00784"></a>00784 <span class="keyword">const</span> <span class="keywordtype">char</span> *
-<a name="l00785"></a>00785 szGetCompany(<span class="keywordtype">void</span>)
-<a name="l00786"></a>00786 {
-<a name="l00787"></a>00787         <span class="keywordflow">return</span> szCompany;
-<a name="l00788"></a>00788 } <span class="comment">/* end of szGetCompany */</span>
-<a name="l00789"></a>00789 
-<a name="l00790"></a>00790 <span class="comment">/*</span>
-<a name="l00791"></a>00791 <span class="comment"> * szGetLanguage - get de language field</span>
-<a name="l00792"></a>00792 <span class="comment"> */</span>
-<a name="l00793"></a>00793 <span class="keyword">const</span> <span class="keywordtype">char</span> *
-<a name="l00794"></a>00794 szGetLanguage(<span class="keywordtype">void</span>)
-<a name="l00795"></a>00795 {
-<a name="l00796"></a>00796         <span class="keywordflow">if</span> (usLid == (USHORT)-1) {
-<a name="l00797"></a>00797                 <span class="comment">/* No Language IDentification */</span>
-<a name="l00798"></a>00798                 <span class="keywordflow">return</span> NULL;
-<a name="l00799"></a>00799         }
-<a name="l00800"></a>00800         <span class="keywordflow">if</span> (usLid &lt; 999) {
-<a name="l00801"></a>00801                 <span class="comment">/* This is a Locale, not a Language IDentification */</span>
-<a name="l00802"></a>00802                 DBG_DEC(usLid);
-<a name="l00803"></a>00803                 <span class="keywordflow">return</span> NULL;
-<a name="l00804"></a>00804         }
-<a name="l00805"></a>00805 
-<a name="l00806"></a>00806         <span class="comment">/* Exceptions to the general rule */</span>
-<a name="l00807"></a>00807         <span class="keywordflow">switch</span> (usLid) {
-<a name="l00808"></a>00808         <span class="keywordflow">case</span> 0x0404: <span class="keywordflow">return</span> <span class="stringliteral">&quot;zh_TW&quot;</span>; <span class="comment">/* Traditional Chinese */</span>
-<a name="l00809"></a>00809         <span class="keywordflow">case</span> 0x0804: <span class="keywordflow">return</span> <span class="stringliteral">&quot;zh_CN&quot;</span>; <span class="comment">/* Simplified Chinese */</span>
-<a name="l00810"></a>00810         <span class="keywordflow">case</span> 0x0c04: <span class="keywordflow">return</span> <span class="stringliteral">&quot;zh_HK&quot;</span>; <span class="comment">/* Hong Kong Chinese */</span>
-<a name="l00811"></a>00811         <span class="keywordflow">case</span> 0x1004: <span class="keywordflow">return</span> <span class="stringliteral">&quot;zh_SG&quot;</span>; <span class="comment">/* Singapore Chinese */</span>
-<a name="l00812"></a>00812         <span class="keywordflow">case</span> 0x0807: <span class="keywordflow">return</span> <span class="stringliteral">&quot;de_CH&quot;</span>; <span class="comment">/* Swiss German */</span>
-<a name="l00813"></a>00813         <span class="keywordflow">case</span> 0x0409: <span class="keywordflow">return</span> <span class="stringliteral">&quot;en_US&quot;</span>; <span class="comment">/* American English */</span>
-<a name="l00814"></a>00814         <span class="keywordflow">case</span> 0x0809: <span class="keywordflow">return</span> <span class="stringliteral">&quot;en_GB&quot;</span>; <span class="comment">/* British English */</span>
-<a name="l00815"></a>00815         <span class="keywordflow">case</span> 0x0c09: <span class="keywordflow">return</span> <span class="stringliteral">&quot;en_AU&quot;</span>; <span class="comment">/* Australian English */</span>
-<a name="l00816"></a>00816         <span class="keywordflow">case</span> 0x080a: <span class="keywordflow">return</span> <span class="stringliteral">&quot;es_MX&quot;</span>; <span class="comment">/* Mexican Spanish */</span>
-<a name="l00817"></a>00817         <span class="keywordflow">case</span> 0x080c: <span class="keywordflow">return</span> <span class="stringliteral">&quot;fr_BE&quot;</span>; <span class="comment">/* Belgian French */</span>
-<a name="l00818"></a>00818         <span class="keywordflow">case</span> 0x0c0c: <span class="keywordflow">return</span> <span class="stringliteral">&quot;fr_CA&quot;</span>; <span class="comment">/* Canadian French */</span>
-<a name="l00819"></a>00819         <span class="keywordflow">case</span> 0x100c: <span class="keywordflow">return</span> <span class="stringliteral">&quot;fr_CH&quot;</span>; <span class="comment">/* Swiss French */</span>
-<a name="l00820"></a>00820         <span class="keywordflow">case</span> 0x0810: <span class="keywordflow">return</span> <span class="stringliteral">&quot;it_CH&quot;</span>; <span class="comment">/* Swiss Italian */</span>
-<a name="l00821"></a>00821         <span class="keywordflow">case</span> 0x0813: <span class="keywordflow">return</span> <span class="stringliteral">&quot;nl_BE&quot;</span>; <span class="comment">/* Belgian Dutch */</span>
-<a name="l00822"></a>00822         <span class="keywordflow">case</span> 0x0416: <span class="keywordflow">return</span> <span class="stringliteral">&quot;pt_BR&quot;</span>; <span class="comment">/* Brazilian Portuguese */</span>
-<a name="l00823"></a>00823         <span class="keywordflow">case</span> 0x081a:
-<a name="l00824"></a>00824         <span class="keywordflow">case</span> 0x0c1a: <span class="keywordflow">return</span> <span class="stringliteral">&quot;sr&quot;</span>;    <span class="comment">/* Serbian */</span>
-<a name="l00825"></a>00825         <span class="keywordflow">case</span> 0x081d: <span class="keywordflow">return</span> <span class="stringliteral">&quot;sv_FI&quot;</span>; <span class="comment">/* Finland Swedish */</span>
-<a name="l00826"></a>00826         <span class="keywordflow">default</span>:
-<a name="l00827"></a>00827                 <span class="keywordflow">break</span>;
-<a name="l00828"></a>00828         }
-<a name="l00829"></a>00829 
-<a name="l00830"></a>00830         <span class="comment">/* The general rule */</span>
-<a name="l00831"></a>00831         <span class="keywordflow">switch</span> (usLid &amp; 0x00ff) {
-<a name="l00832"></a>00832         <span class="keywordflow">case</span> 0x01: <span class="keywordflow">return</span> <span class="stringliteral">&quot;ar&quot;</span>; <span class="comment">/* Arabic */</span>
-<a name="l00833"></a>00833         <span class="keywordflow">case</span> 0x02: <span class="keywordflow">return</span> <span class="stringliteral">&quot;bg&quot;</span>; <span class="comment">/* Bulgarian */</span>
-<a name="l00834"></a>00834         <span class="keywordflow">case</span> 0x03: <span class="keywordflow">return</span> <span class="stringliteral">&quot;ca&quot;</span>; <span class="comment">/* Catalan */</span>
-<a name="l00835"></a>00835         <span class="keywordflow">case</span> 0x04: <span class="keywordflow">return</span> <span class="stringliteral">&quot;zh&quot;</span>; <span class="comment">/* Chinese */</span>
-<a name="l00836"></a>00836         <span class="keywordflow">case</span> 0x05: <span class="keywordflow">return</span> <span class="stringliteral">&quot;cs&quot;</span>; <span class="comment">/* Czech */</span>
-<a name="l00837"></a>00837         <span class="keywordflow">case</span> 0x06: <span class="keywordflow">return</span> <span class="stringliteral">&quot;da&quot;</span>; <span class="comment">/* Danish */</span>
-<a name="l00838"></a>00838         <span class="keywordflow">case</span> 0x07: <span class="keywordflow">return</span> <span class="stringliteral">&quot;de&quot;</span>; <span class="comment">/* German */</span>
-<a name="l00839"></a>00839         <span class="keywordflow">case</span> 0x08: <span class="keywordflow">return</span> <span class="stringliteral">&quot;el&quot;</span>; <span class="comment">/* Greek */</span>
-<a name="l00840"></a>00840         <span class="keywordflow">case</span> 0x09: <span class="keywordflow">return</span> <span class="stringliteral">&quot;en&quot;</span>; <span class="comment">/* English */</span>
-<a name="l00841"></a>00841         <span class="keywordflow">case</span> 0x0a: <span class="keywordflow">return</span> <span class="stringliteral">&quot;es&quot;</span>; <span class="comment">/* Spanish */</span>
-<a name="l00842"></a>00842         <span class="keywordflow">case</span> 0x0b: <span class="keywordflow">return</span> <span class="stringliteral">&quot;fi&quot;</span>; <span class="comment">/* Finnish */</span>
-<a name="l00843"></a>00843         <span class="keywordflow">case</span> 0x0c: <span class="keywordflow">return</span> <span class="stringliteral">&quot;fr&quot;</span>; <span class="comment">/* French */</span>
-<a name="l00844"></a>00844         <span class="keywordflow">case</span> 0x0d: <span class="keywordflow">return</span> <span class="stringliteral">&quot;he&quot;</span>; <span class="comment">/* Hebrew */</span>
-<a name="l00845"></a>00845         <span class="keywordflow">case</span> 0x0e: <span class="keywordflow">return</span> <span class="stringliteral">&quot;hu&quot;</span>; <span class="comment">/* Hungarian */</span>
-<a name="l00846"></a>00846         <span class="keywordflow">case</span> 0x0f: <span class="keywordflow">return</span> <span class="stringliteral">&quot;is&quot;</span>; <span class="comment">/* Icelandic */</span>
-<a name="l00847"></a>00847         <span class="keywordflow">case</span> 0x10: <span class="keywordflow">return</span> <span class="stringliteral">&quot;it&quot;</span>; <span class="comment">/* Italian */</span>
-<a name="l00848"></a>00848         <span class="keywordflow">case</span> 0x11: <span class="keywordflow">return</span> <span class="stringliteral">&quot;ja&quot;</span>; <span class="comment">/* Japanese */</span>
-<a name="l00849"></a>00849         <span class="keywordflow">case</span> 0x12: <span class="keywordflow">return</span> <span class="stringliteral">&quot;ko&quot;</span>; <span class="comment">/* Korean */</span>
-<a name="l00850"></a>00850         <span class="keywordflow">case</span> 0x13: <span class="keywordflow">return</span> <span class="stringliteral">&quot;nl&quot;</span>; <span class="comment">/* Dutch */</span>
-<a name="l00851"></a>00851         <span class="keywordflow">case</span> 0x14: <span class="keywordflow">return</span> <span class="stringliteral">&quot;no&quot;</span>; <span class="comment">/* Norwegian */</span>
-<a name="l00852"></a>00852         <span class="keywordflow">case</span> 0x15: <span class="keywordflow">return</span> <span class="stringliteral">&quot;pl&quot;</span>; <span class="comment">/* Polish */</span>
-<a name="l00853"></a>00853         <span class="keywordflow">case</span> 0x16: <span class="keywordflow">return</span> <span class="stringliteral">&quot;pt&quot;</span>; <span class="comment">/* Portuguese */</span>
-<a name="l00854"></a>00854         <span class="keywordflow">case</span> 0x17: <span class="keywordflow">return</span> <span class="stringliteral">&quot;rm&quot;</span>; <span class="comment">/* Rhaeto-Romance */</span>
-<a name="l00855"></a>00855         <span class="keywordflow">case</span> 0x18: <span class="keywordflow">return</span> <span class="stringliteral">&quot;ro&quot;</span>; <span class="comment">/* Romanian */</span>
-<a name="l00856"></a>00856         <span class="keywordflow">case</span> 0x19: <span class="keywordflow">return</span> <span class="stringliteral">&quot;ru&quot;</span>; <span class="comment">/* Russian */</span>
-<a name="l00857"></a>00857         <span class="keywordflow">case</span> 0x1a: <span class="keywordflow">return</span> <span class="stringliteral">&quot;hr&quot;</span>; <span class="comment">/* Croatian */</span>
-<a name="l00858"></a>00858         <span class="keywordflow">case</span> 0x1b: <span class="keywordflow">return</span> <span class="stringliteral">&quot;sk&quot;</span>; <span class="comment">/* Slovak */</span>
-<a name="l00859"></a>00859         <span class="keywordflow">case</span> 0x1c: <span class="keywordflow">return</span> <span class="stringliteral">&quot;sq&quot;</span>; <span class="comment">/* Albanian */</span>
-<a name="l00860"></a>00860         <span class="keywordflow">case</span> 0x1d: <span class="keywordflow">return</span> <span class="stringliteral">&quot;sv&quot;</span>; <span class="comment">/* Swedish */</span>
-<a name="l00861"></a>00861         <span class="keywordflow">case</span> 0x1e: <span class="keywordflow">return</span> <span class="stringliteral">&quot;th&quot;</span>; <span class="comment">/* Thai */</span>
-<a name="l00862"></a>00862         <span class="keywordflow">case</span> 0x1f: <span class="keywordflow">return</span> <span class="stringliteral">&quot;tr&quot;</span>; <span class="comment">/* Turkish */</span>
-<a name="l00863"></a>00863         <span class="keywordflow">case</span> 0x20: <span class="keywordflow">return</span> <span class="stringliteral">&quot;ur&quot;</span>; <span class="comment">/* Urdu */</span>
-<a name="l00864"></a>00864         <span class="keywordflow">case</span> 0x21: <span class="keywordflow">return</span> <span class="stringliteral">&quot;id&quot;</span>; <span class="comment">/* Indonesian */</span>
-<a name="l00865"></a>00865         <span class="keywordflow">case</span> 0x22: <span class="keywordflow">return</span> <span class="stringliteral">&quot;uk&quot;</span>; <span class="comment">/* Ukrainian */</span>
-<a name="l00866"></a>00866         <span class="keywordflow">case</span> 0x23: <span class="keywordflow">return</span> <span class="stringliteral">&quot;be&quot;</span>; <span class="comment">/* Belarusian */</span>
-<a name="l00867"></a>00867         <span class="keywordflow">case</span> 0x24: <span class="keywordflow">return</span> <span class="stringliteral">&quot;sl&quot;</span>; <span class="comment">/* Slovenian */</span>
-<a name="l00868"></a>00868         <span class="keywordflow">case</span> 0x25: <span class="keywordflow">return</span> <span class="stringliteral">&quot;et&quot;</span>; <span class="comment">/* Estonian */</span>
-<a name="l00869"></a>00869         <span class="keywordflow">case</span> 0x26: <span class="keywordflow">return</span> <span class="stringliteral">&quot;lv&quot;</span>; <span class="comment">/* Latvian */</span>
-<a name="l00870"></a>00870         <span class="keywordflow">case</span> 0x27: <span class="keywordflow">return</span> <span class="stringliteral">&quot;lt&quot;</span>; <span class="comment">/* Lithuanian */</span>
-<a name="l00871"></a>00871         <span class="keywordflow">case</span> 0x29: <span class="keywordflow">return</span> <span class="stringliteral">&quot;fa&quot;</span>; <span class="comment">/* Farsi */</span>
-<a name="l00872"></a>00872         <span class="keywordflow">case</span> 0x2a: <span class="keywordflow">return</span> <span class="stringliteral">&quot;vi&quot;</span>; <span class="comment">/* Viet Nam */</span>
-<a name="l00873"></a>00873         <span class="keywordflow">case</span> 0x2b: <span class="keywordflow">return</span> <span class="stringliteral">&quot;hy&quot;</span>; <span class="comment">/* Armenian */</span>
-<a name="l00874"></a>00874         <span class="keywordflow">case</span> 0x2c: <span class="keywordflow">return</span> <span class="stringliteral">&quot;az&quot;</span>; <span class="comment">/* Azeri */</span>
-<a name="l00875"></a>00875         <span class="keywordflow">case</span> 0x2d: <span class="keywordflow">return</span> <span class="stringliteral">&quot;eu&quot;</span>; <span class="comment">/* Basque */</span>
-<a name="l00876"></a>00876         <span class="keywordflow">case</span> 0x2f: <span class="keywordflow">return</span> <span class="stringliteral">&quot;mk&quot;</span>; <span class="comment">/* Macedonian */</span>
-<a name="l00877"></a>00877         <span class="keywordflow">case</span> 0x36: <span class="keywordflow">return</span> <span class="stringliteral">&quot;af&quot;</span>; <span class="comment">/* Afrikaans */</span>
-<a name="l00878"></a>00878         <span class="keywordflow">case</span> 0x37: <span class="keywordflow">return</span> <span class="stringliteral">&quot;ka&quot;</span>; <span class="comment">/* Georgian */</span>
-<a name="l00879"></a>00879         <span class="keywordflow">case</span> 0x38: <span class="keywordflow">return</span> <span class="stringliteral">&quot;fo&quot;</span>; <span class="comment">/* Faeroese */</span>
-<a name="l00880"></a>00880         <span class="keywordflow">case</span> 0x39: <span class="keywordflow">return</span> <span class="stringliteral">&quot;hi&quot;</span>; <span class="comment">/* Hindi */</span>
-<a name="l00881"></a>00881         <span class="keywordflow">case</span> 0x3e: <span class="keywordflow">return</span> <span class="stringliteral">&quot;ms&quot;</span>; <span class="comment">/* Malay */</span>
-<a name="l00882"></a>00882         <span class="keywordflow">case</span> 0x3f: <span class="keywordflow">return</span> <span class="stringliteral">&quot;kk&quot;</span>; <span class="comment">/* Kazakh */</span>
-<a name="l00883"></a>00883         <span class="keywordflow">default</span>:
-<a name="l00884"></a>00884                 DBG_HEX(usLid);
-<a name="l00885"></a>00885                 DBG_FIXME();
-<a name="l00886"></a>00886                 <span class="keywordflow">return</span> NULL;
-<a name="l00887"></a>00887         }
-<a name="l00888"></a>00888 } <span class="comment">/* end of szGetLanguage */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/tabstop_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,228 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/tabstop.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/tabstop.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * tabstops.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1999-2004 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Read the tab stop information from a MS Word file</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00011"></a>00011 
-<a name="l00012"></a>00012 <span class="preprocessor">#define HALF_INCH       36000L  </span><span class="comment">/* In millipoints */</span>
-<a name="l00013"></a>00013 
-<a name="l00014"></a>00014 <span class="keyword">static</span> <span class="keywordtype">long</span>     lDefaultTabWidth = HALF_INCH;
-<a name="l00015"></a>00015 
-<a name="l00016"></a>00016 
-<a name="l00017"></a>00017 <span class="comment">/*</span>
-<a name="l00018"></a>00018 <span class="comment"> * vSet0DefaultTabWidth -</span>
-<a name="l00019"></a>00019 <span class="comment"> */</span>
-<a name="l00020"></a>00020 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00021"></a>00021 vSet0DefaultTabWidth(<span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00022"></a>00022 {
-<a name="l00023"></a>00023         USHORT  usTmp;
-<a name="l00024"></a>00024 
-<a name="l00025"></a>00025         fail(aucHeader == NULL);
-<a name="l00026"></a>00026 
-<a name="l00027"></a>00027         usTmp = usGetWord(0x70, aucHeader); <span class="comment">/* dxaTab */</span>
-<a name="l00028"></a>00028         DBG_DEC(usTmp);
-<a name="l00029"></a>00029         lDefaultTabWidth = usTmp == 0 ? HALF_INCH : lTwips2MilliPoints(usTmp);
-<a name="l00030"></a>00030         DBG_DEC(lDefaultTabWidth);
-<a name="l00031"></a>00031 } <span class="comment">/* end of vSet0DefaultTabWidth */</span>
-<a name="l00032"></a>00032 
-<a name="l00033"></a>00033 <span class="comment">/*</span>
-<a name="l00034"></a>00034 <span class="comment"> * vSet2DefaultTabWidth -</span>
-<a name="l00035"></a>00035 <span class="comment"> */</span>
-<a name="l00036"></a>00036 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00037"></a>00037 vSet2DefaultTabWidth(FILE *pFile, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00038"></a>00038 {
-<a name="l00039"></a>00039         UCHAR   *aucBuffer;
-<a name="l00040"></a>00040         ULONG   ulBeginDocpInfo;
-<a name="l00041"></a>00041         <span class="keywordtype">size_t</span>  tDocpInfoLen;
-<a name="l00042"></a>00042         USHORT  usTmp;
-<a name="l00043"></a>00043 
-<a name="l00044"></a>00044         fail(pFile == NULL || aucHeader == NULL);
-<a name="l00045"></a>00045 
-<a name="l00046"></a>00046         ulBeginDocpInfo = ulGetLong(0x112, aucHeader); <span class="comment">/* fcDop */</span>
-<a name="l00047"></a>00047         DBG_HEX(ulBeginDocpInfo);
-<a name="l00048"></a>00048         tDocpInfoLen = (size_t)usGetWord(0x116, aucHeader); <span class="comment">/* cbDop */</span>
-<a name="l00049"></a>00049         DBG_DEC(tDocpInfoLen);
-<a name="l00050"></a>00050         <span class="keywordflow">if</span> (tDocpInfoLen &lt; 12) {
-<a name="l00051"></a>00051                 DBG_MSG(<span class="stringliteral">&quot;No TAB information&quot;</span>);
-<a name="l00052"></a>00052                 <span class="keywordflow">return</span>;
-<a name="l00053"></a>00053         }
-<a name="l00054"></a>00054 
-<a name="l00055"></a>00055         aucBuffer = xmalloc(tDocpInfoLen);
-<a name="l00056"></a>00056         <span class="keywordflow">if</span> (!bReadBytes(aucBuffer, tDocpInfoLen, ulBeginDocpInfo, pFile)) {
-<a name="l00057"></a>00057                 aucBuffer = xfree(aucBuffer);
-<a name="l00058"></a>00058                 <span class="keywordflow">return</span>;
-<a name="l00059"></a>00059         }
-<a name="l00060"></a>00060         usTmp = usGetWord(0x0a, aucBuffer); <span class="comment">/* dxaTab */</span>
-<a name="l00061"></a>00061         lDefaultTabWidth = usTmp == 0 ? HALF_INCH : lTwips2MilliPoints(usTmp);
-<a name="l00062"></a>00062         DBG_DEC(lDefaultTabWidth);
-<a name="l00063"></a>00063         aucBuffer = xfree(aucBuffer);
-<a name="l00064"></a>00064 } <span class="comment">/* end of vSet2DefaultTabWidth */</span>
-<a name="l00065"></a>00065 
-<a name="l00066"></a>00066 <span class="comment">/*</span>
-<a name="l00067"></a>00067 <span class="comment"> * vSet6DefaultTabWidth -</span>
-<a name="l00068"></a>00068 <span class="comment"> */</span>
-<a name="l00069"></a>00069 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00070"></a>00070 vSet6DefaultTabWidth(FILE *pFile, ULONG ulStartBlock,
-<a name="l00071"></a>00071         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00072"></a>00072 {
-<a name="l00073"></a>00073         UCHAR   *aucBuffer;
-<a name="l00074"></a>00074         ULONG   ulBeginDocpInfo;
-<a name="l00075"></a>00075         <span class="keywordtype">size_t</span>  tDocpInfoLen;
-<a name="l00076"></a>00076         USHORT  usTmp;
-<a name="l00077"></a>00077 
-<a name="l00078"></a>00078         ulBeginDocpInfo = ulGetLong(0x150, aucHeader); <span class="comment">/* fcDop */</span>
-<a name="l00079"></a>00079         DBG_HEX(ulBeginDocpInfo);
-<a name="l00080"></a>00080         tDocpInfoLen = (size_t)ulGetLong(0x154, aucHeader); <span class="comment">/* lcbDop */</span>
-<a name="l00081"></a>00081         DBG_DEC(tDocpInfoLen);
-<a name="l00082"></a>00082         <span class="keywordflow">if</span> (tDocpInfoLen &lt; 12) {
-<a name="l00083"></a>00083                 DBG_MSG(<span class="stringliteral">&quot;No TAB information&quot;</span>);
-<a name="l00084"></a>00084                 <span class="keywordflow">return</span>;
-<a name="l00085"></a>00085         }
-<a name="l00086"></a>00086 
-<a name="l00087"></a>00087         aucBuffer = xmalloc(tDocpInfoLen);
-<a name="l00088"></a>00088         <span class="keywordflow">if</span> (!bReadBuffer(pFile, ulStartBlock,
-<a name="l00089"></a>00089                         aulBBD, tBBDLen, BIG_BLOCK_SIZE,
-<a name="l00090"></a>00090                         aucBuffer, ulBeginDocpInfo, tDocpInfoLen)) {
-<a name="l00091"></a>00091                 aucBuffer = xfree(aucBuffer);
-<a name="l00092"></a>00092                 <span class="keywordflow">return</span>;
-<a name="l00093"></a>00093         }
-<a name="l00094"></a>00094         usTmp = usGetWord(0x0a, aucBuffer); <span class="comment">/* dxaTab */</span>
-<a name="l00095"></a>00095         lDefaultTabWidth = usTmp == 0 ? HALF_INCH : lTwips2MilliPoints(usTmp);
-<a name="l00096"></a>00096         DBG_DEC(lDefaultTabWidth);
-<a name="l00097"></a>00097         aucBuffer = xfree(aucBuffer);
-<a name="l00098"></a>00098 } <span class="comment">/* end of vSet6DefaultTabWidth */</span>
-<a name="l00099"></a>00099 
-<a name="l00100"></a>00100 <span class="comment">/*</span>
-<a name="l00101"></a>00101 <span class="comment"> * vSet8DefaultTabWidth -</span>
-<a name="l00102"></a>00102 <span class="comment"> */</span>
-<a name="l00103"></a>00103 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00104"></a>00104 vSet8DefaultTabWidth(FILE *pFile, <span class="keyword">const</span> pps_info_type *pPPS,
-<a name="l00105"></a>00105         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00106"></a>00106         <span class="keyword">const</span> ULONG *aulSBD, <span class="keywordtype">size_t</span> tSBDLen,
-<a name="l00107"></a>00107         <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00108"></a>00108 {
-<a name="l00109"></a>00109         <span class="keyword">const</span> ULONG     *aulBlockDepot;
-<a name="l00110"></a>00110         UCHAR   *aucBuffer;
-<a name="l00111"></a>00111         ULONG   ulBeginDocpInfo;
-<a name="l00112"></a>00112         <span class="keywordtype">size_t</span>  tDocpInfoLen, tBlockDepotLen, tBlockSize;
-<a name="l00113"></a>00113         USHORT  usTmp;
-<a name="l00114"></a>00114 
-<a name="l00115"></a>00115         ulBeginDocpInfo = ulGetLong(0x192, aucHeader); <span class="comment">/* fcDop */</span>
-<a name="l00116"></a>00116         DBG_HEX(ulBeginDocpInfo);
-<a name="l00117"></a>00117         tDocpInfoLen = (size_t)ulGetLong(0x196, aucHeader); <span class="comment">/* lcbDop */</span>
-<a name="l00118"></a>00118         DBG_DEC(tDocpInfoLen);
-<a name="l00119"></a>00119         <span class="keywordflow">if</span> (tDocpInfoLen &lt; 12) {
-<a name="l00120"></a>00120                 DBG_MSG(<span class="stringliteral">&quot;No TAB information&quot;</span>);
-<a name="l00121"></a>00121                 <span class="keywordflow">return</span>;
-<a name="l00122"></a>00122         }
-<a name="l00123"></a>00123 
-<a name="l00124"></a>00124         DBG_DEC(pPPS-&gt;tTable.ulSB);
-<a name="l00125"></a>00125         DBG_HEX(pPPS-&gt;tTable.ulSize);
-<a name="l00126"></a>00126         <span class="keywordflow">if</span> (pPPS-&gt;tTable.ulSize == 0) {
-<a name="l00127"></a>00127                 DBG_MSG(<span class="stringliteral">&quot;No TAB information&quot;</span>);
-<a name="l00128"></a>00128                 <span class="keywordflow">return</span>;
-<a name="l00129"></a>00129         }
-<a name="l00130"></a>00130 
-<a name="l00131"></a>00131         <span class="keywordflow">if</span> (pPPS-&gt;tTable.ulSize &lt; MIN_SIZE_FOR_BBD_USE) {
-<a name="l00132"></a>00132                 <span class="comment">/* Use the Small Block Depot */</span>
-<a name="l00133"></a>00133                 aulBlockDepot = aulSBD;
-<a name="l00134"></a>00134                 tBlockDepotLen = tSBDLen;
-<a name="l00135"></a>00135                 tBlockSize = SMALL_BLOCK_SIZE;
-<a name="l00136"></a>00136         } <span class="keywordflow">else</span> {
-<a name="l00137"></a>00137                 <span class="comment">/* Use the Big Block Depot */</span>
-<a name="l00138"></a>00138                 aulBlockDepot = aulBBD;
-<a name="l00139"></a>00139                 tBlockDepotLen = tBBDLen;
-<a name="l00140"></a>00140                 tBlockSize = BIG_BLOCK_SIZE;
-<a name="l00141"></a>00141         }
-<a name="l00142"></a>00142         aucBuffer = xmalloc(tDocpInfoLen);
-<a name="l00143"></a>00143         <span class="keywordflow">if</span> (!bReadBuffer(pFile, pPPS-&gt;tTable.ulSB,
-<a name="l00144"></a>00144                         aulBlockDepot, tBlockDepotLen, tBlockSize,
-<a name="l00145"></a>00145                         aucBuffer, ulBeginDocpInfo, tDocpInfoLen)) {
-<a name="l00146"></a>00146                 aucBuffer = xfree(aucBuffer);
-<a name="l00147"></a>00147                 <span class="keywordflow">return</span>;
-<a name="l00148"></a>00148         }
-<a name="l00149"></a>00149         usTmp = usGetWord(0x0a, aucBuffer); <span class="comment">/* dxaTab */</span>
-<a name="l00150"></a>00150         lDefaultTabWidth = usTmp == 0 ? HALF_INCH : lTwips2MilliPoints(usTmp);
-<a name="l00151"></a>00151         DBG_DEC(lDefaultTabWidth);
-<a name="l00152"></a>00152         aucBuffer = xfree(aucBuffer);
-<a name="l00153"></a>00153 } <span class="comment">/* end of vSet8DefaultTabWidth */</span>
-<a name="l00154"></a>00154 
-<a name="l00155"></a>00155 <span class="comment">/*</span>
-<a name="l00156"></a>00156 <span class="comment"> * vSetDefaultTabWidth -</span>
-<a name="l00157"></a>00157 <span class="comment"> */</span>
-<a name="l00158"></a>00158 <span class="keywordtype">void</span>
-<a name="l00159"></a>00159 vSetDefaultTabWidth(FILE *pFile, <span class="keyword">const</span> pps_info_type *pPPS,
-<a name="l00160"></a>00160         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00161"></a>00161         <span class="keyword">const</span> ULONG *aulSBD, <span class="keywordtype">size_t</span> tSBDLen,
-<a name="l00162"></a>00162         <span class="keyword">const</span> UCHAR *aucHeader, <span class="keywordtype">int</span> iWordVersion)
-<a name="l00163"></a>00163 {
-<a name="l00164"></a>00164         fail(pFile == NULL &amp;&amp; iWordVersion &gt;= 1);
-<a name="l00165"></a>00165         fail(pPPS == NULL &amp;&amp; iWordVersion &gt;= 6);
-<a name="l00166"></a>00166         fail(aulBBD == NULL &amp;&amp; tBBDLen != 0);
-<a name="l00167"></a>00167         fail(aulSBD == NULL &amp;&amp; tSBDLen != 0);
-<a name="l00168"></a>00168         fail(aucHeader == NULL);
-<a name="l00169"></a>00169 
-<a name="l00170"></a>00170         <span class="comment">/* Reset to the default default value */</span>
-<a name="l00171"></a>00171         lDefaultTabWidth = HALF_INCH;
-<a name="l00172"></a>00172 
-<a name="l00173"></a>00173         <span class="keywordflow">switch</span> (iWordVersion) {
-<a name="l00174"></a>00174         <span class="keywordflow">case</span> 0:
-<a name="l00175"></a>00175                 vSet0DefaultTabWidth(aucHeader);
-<a name="l00176"></a>00176                 <span class="keywordflow">break</span>;
-<a name="l00177"></a>00177         <span class="keywordflow">case</span> 1:
-<a name="l00178"></a>00178         <span class="keywordflow">case</span> 2:
-<a name="l00179"></a>00179                 vSet2DefaultTabWidth(pFile, aucHeader);
-<a name="l00180"></a>00180                 <span class="keywordflow">break</span>;
-<a name="l00181"></a>00181         <span class="keywordflow">case</span> 4:
-<a name="l00182"></a>00182         <span class="keywordflow">case</span> 5:
-<a name="l00183"></a>00183                 <span class="keywordflow">break</span>;
-<a name="l00184"></a>00184         <span class="keywordflow">case</span> 6:
-<a name="l00185"></a>00185         <span class="keywordflow">case</span> 7:
-<a name="l00186"></a>00186                 vSet6DefaultTabWidth(pFile, pPPS-&gt;tWordDocument.ulSB,
-<a name="l00187"></a>00187                                 aulBBD, tBBDLen, aucHeader);
-<a name="l00188"></a>00188                 <span class="keywordflow">break</span>;
-<a name="l00189"></a>00189         <span class="keywordflow">case</span> 8:
-<a name="l00190"></a>00190                 vSet8DefaultTabWidth(pFile, pPPS,
-<a name="l00191"></a>00191                                 aulBBD, tBBDLen, aulSBD, tSBDLen, aucHeader);
-<a name="l00192"></a>00192                 <span class="keywordflow">break</span>;
-<a name="l00193"></a>00193         <span class="keywordflow">default</span>:
-<a name="l00194"></a>00194                 werr(0, <span class="stringliteral">&quot;Sorry, no TAB information&quot;</span>);
-<a name="l00195"></a>00195                 <span class="keywordflow">break</span>;
-<a name="l00196"></a>00196         }
-<a name="l00197"></a>00197 } <span class="comment">/* end of vSetDefaultTabWidth */</span>
-<a name="l00198"></a>00198 
-<a name="l00199"></a>00199 <span class="preprocessor">#if 0</span>
-<a name="l00200"></a>00200 <span class="preprocessor"></span><span class="comment">/*</span>
-<a name="l00201"></a>00201 <span class="comment"> * lGetDefaultTabWidth - Get the default tabwidth in millipoints</span>
-<a name="l00202"></a>00202 <span class="comment"> */</span>
-<a name="l00203"></a>00203 <span class="keywordtype">long</span>
-<a name="l00204"></a>00204 lGetDefaultTabWidth(<span class="keywordtype">void</span>)
-<a name="l00205"></a>00205 {
-<a name="l00206"></a>00206         <span class="keywordflow">if</span> (lDefaultTabWidth &lt;= 0) {
-<a name="l00207"></a>00207                 DBG_DEC(lDefaultTabWidth);
-<a name="l00208"></a>00208                 <span class="keywordflow">return</span> lTwips2MilliPoints(1);
-<a name="l00209"></a>00209         }
-<a name="l00210"></a>00210         <span class="keywordflow">return</span> lDefaultTabWidth;
-<a name="l00211"></a>00211 } <span class="comment">/* end of lGetDefaultTabWidth */</span>
-<a name="l00212"></a>00212 <span class="preprocessor">#endif</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/text_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,198 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/text.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/text.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * text.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1999-2004 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Functions to deal with the Text format</span>
-<a name="l00007"></a>00007 <span class="comment"> *</span>
-<a name="l00008"></a>00008 <span class="comment"> */</span>
-<a name="l00009"></a>00009 
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 <span class="comment">/* The character set */</span>
-<a name="l00014"></a>00014 <span class="keyword">static</span> encoding_type    eEncoding = encoding_neutral;
-<a name="l00015"></a>00015 <span class="comment">/* Current vertical position information */</span>
-<a name="l00016"></a>00016 <span class="keyword">static</span> <span class="keywordtype">long</span>             lYtopCurr = 0;
-<a name="l00017"></a>00017 <span class="comment">/* Local representation of the non-breaking space */</span>
-<a name="l00018"></a>00018 <span class="keyword">static</span> UCHAR            ucNbsp = 0;
-<a name="l00019"></a>00019 
-<a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="comment">/*</span>
-<a name="l00022"></a>00022 <span class="comment"> * vPrologueTXT - set options and perform the Text initialization</span>
-<a name="l00023"></a>00023 <span class="comment"> */</span>
-<a name="l00024"></a>00024 <span class="keywordtype">void</span>
-<a name="l00025"></a>00025 vPrologueTXT(diagram_type *pDiag, <span class="keyword">const</span> options_type *pOptions)
-<a name="l00026"></a>00026 {
-<a name="l00027"></a>00027         fail(pDiag == NULL);
-<a name="l00028"></a>00028         fail(pOptions == NULL);
-<a name="l00029"></a>00029 
-<a name="l00030"></a>00030         eEncoding = pOptions-&gt;eEncoding;
-<a name="l00031"></a>00031         pDiag-&gt;lXleft = 0;
-<a name="l00032"></a>00032         pDiag-&gt;lYtop = 0;
-<a name="l00033"></a>00033         lYtopCurr = 0;
-<a name="l00034"></a>00034 } <span class="comment">/* end of vPrologueTXT */</span>
-<a name="l00035"></a>00035 
-<a name="l00036"></a>00036 <span class="comment">/*</span>
-<a name="l00037"></a>00037 <span class="comment"> * vEpilogueTXT - clean up after everything is done</span>
-<a name="l00038"></a>00038 <span class="comment"> */</span>
-<a name="l00039"></a>00039 <span class="keywordtype">void</span>
-<a name="l00040"></a>00040 vEpilogueTXT(FILE *pOutFile)
-<a name="l00041"></a>00041 {
-<a name="l00042"></a>00042         fail(pOutFile == NULL);
-<a name="l00043"></a>00043 
-<a name="l00044"></a>00044         fprintf(pOutFile, <span class="stringliteral">&quot;\n&quot;</span>);
-<a name="l00045"></a>00045 } <span class="comment">/* end of vEpilogueTXT */</span>
-<a name="l00046"></a>00046 
-<a name="l00047"></a>00047 <span class="comment">/*</span>
-<a name="l00048"></a>00048 <span class="comment"> * vPrintTXT - print a Text string</span>
-<a name="l00049"></a>00049 <span class="comment"> */</span>
-<a name="l00050"></a>00050 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00051"></a>00051 vPrintTXT(FILE *pFile, <span class="keyword">const</span> <span class="keywordtype">char</span> *szString, <span class="keywordtype">size_t</span> tStringLength)
-<a name="l00052"></a>00052 {
-<a name="l00053"></a>00053         <span class="keyword">const</span> UCHAR     *ucBytes;
-<a name="l00054"></a>00054         <span class="keywordtype">size_t</span>          tCount;
-<a name="l00055"></a>00055 
-<a name="l00056"></a>00056         fail(szString == NULL);
-<a name="l00057"></a>00057 
-<a name="l00058"></a>00058         <span class="keywordflow">if</span> (szString == NULL || szString[0] == <span class="charliteral">&#39;\0&#39;</span> || tStringLength == 0) {
-<a name="l00059"></a>00059                 <span class="keywordflow">return</span>;
-<a name="l00060"></a>00060         }
-<a name="l00061"></a>00061 
-<a name="l00062"></a>00062         <span class="keywordflow">if</span> (eEncoding == encoding_utf_8) {
-<a name="l00063"></a>00063                 fprintf(pFile, <span class="stringliteral">&quot;%.*s&quot;</span>, (<span class="keywordtype">int</span>)tStringLength, szString);
-<a name="l00064"></a>00064                 <span class="keywordflow">return</span>;
-<a name="l00065"></a>00065         }
-<a name="l00066"></a>00066 
-<a name="l00067"></a>00067         <span class="keywordflow">if</span> (ucNbsp == 0) {
-<a name="l00068"></a>00068                 ucNbsp = ucGetNbspCharacter();
-<a name="l00069"></a>00069                 DBG_HEX_C(ucNbsp != 0xa0, ucNbsp);
-<a name="l00070"></a>00070         }
-<a name="l00071"></a>00071 
-<a name="l00072"></a>00072         ucBytes = (UCHAR *)szString;
-<a name="l00073"></a>00073         <span class="keywordflow">for</span> (tCount = 0; tCount &lt; tStringLength ; tCount++) {
-<a name="l00074"></a>00074                 <span class="keywordflow">if</span> (ucBytes[tCount] == ucNbsp) {
-<a name="l00075"></a>00075                         (void)putc(<span class="charliteral">&#39; &#39;</span>, pFile);
-<a name="l00076"></a>00076                 } <span class="keywordflow">else</span> {
-<a name="l00077"></a>00077                         (void)putc(szString[tCount], pFile);
-<a name="l00078"></a>00078                 }
-<a name="l00079"></a>00079         }
-<a name="l00080"></a>00080 } <span class="comment">/* end of vPrintTXT */</span>
-<a name="l00081"></a>00081 
-<a name="l00082"></a>00082 <span class="comment">/*</span>
-<a name="l00083"></a>00083 <span class="comment"> * vMoveTo - move to the given X,Y coordinates</span>
-<a name="l00084"></a>00084 <span class="comment"> *</span>
-<a name="l00085"></a>00085 <span class="comment"> * Move the current position of the given diagram to its X,Y coordinates,</span>
-<a name="l00086"></a>00086 <span class="comment"> * start on a new page if needed</span>
-<a name="l00087"></a>00087 <span class="comment"> */</span>
-<a name="l00088"></a>00088 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00089"></a>00089 vMoveTo(diagram_type *pDiag)
-<a name="l00090"></a>00090 {
-<a name="l00091"></a>00091         <span class="keywordtype">int</span>     iCount, iNbr;
-<a name="l00092"></a>00092 
-<a name="l00093"></a>00093         fail(pDiag == NULL);
-<a name="l00094"></a>00094         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00095"></a>00095 
-<a name="l00096"></a>00096         <span class="keywordflow">if</span> (pDiag-&gt;lYtop != lYtopCurr) {
-<a name="l00097"></a>00097                 iNbr = iDrawUnits2Char(pDiag-&gt;lXleft);
-<a name="l00098"></a>00098                 <span class="keywordflow">for</span> (iCount = 0; iCount &lt; iNbr; iCount++) {
-<a name="l00099"></a>00099                         (void)putc(FILLER_CHAR, pDiag-&gt;pOutFile);
-<a name="l00100"></a>00100                 }
-<a name="l00101"></a>00101                 lYtopCurr = pDiag-&gt;lYtop;
-<a name="l00102"></a>00102         }
-<a name="l00103"></a>00103 } <span class="comment">/* end of vMoveTo */</span>
-<a name="l00104"></a>00104 
-<a name="l00105"></a>00105 <span class="comment">/*</span>
-<a name="l00106"></a>00106 <span class="comment"> * vMove2NextLineTXT - move to the next line</span>
-<a name="l00107"></a>00107 <span class="comment"> */</span>
-<a name="l00108"></a>00108 <span class="keywordtype">void</span>
-<a name="l00109"></a>00109 vMove2NextLineTXT(diagram_type *pDiag)
-<a name="l00110"></a>00110 {
-<a name="l00111"></a>00111         fail(pDiag == NULL);
-<a name="l00112"></a>00112         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00113"></a>00113 
-<a name="l00114"></a>00114         pDiag-&gt;lYtop++;
-<a name="l00115"></a>00115         (void)fprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;\n&quot;</span>);
-<a name="l00116"></a>00116 } <span class="comment">/* end of vMove2NextLineTXT */</span>
-<a name="l00117"></a>00117 
-<a name="l00118"></a>00118 <span class="comment">/*</span>
-<a name="l00119"></a>00119 <span class="comment"> * vSubstringTXT - print a sub string</span>
-<a name="l00120"></a>00120 <span class="comment"> */</span>
-<a name="l00121"></a>00121 <span class="keywordtype">void</span>
-<a name="l00122"></a>00122 vSubstringTXT(diagram_type *pDiag,
-<a name="l00123"></a>00123         <span class="keyword">const</span> <span class="keywordtype">char</span> *szString, <span class="keywordtype">size_t</span> tStringLength, <span class="keywordtype">long</span> lStringWidth)
-<a name="l00124"></a>00124 {
-<a name="l00125"></a>00125         fail(pDiag == NULL || szString == NULL);
-<a name="l00126"></a>00126         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00127"></a>00127         fail(pDiag-&gt;lXleft &lt; 0);
-<a name="l00128"></a>00128         fail(tStringLength != strlen(szString));
-<a name="l00129"></a>00129 
-<a name="l00130"></a>00130         <span class="keywordflow">if</span> (szString[0] == <span class="charliteral">&#39;\0&#39;</span> || tStringLength == 0) {
-<a name="l00131"></a>00131                 <span class="keywordflow">return</span>;
-<a name="l00132"></a>00132         }
-<a name="l00133"></a>00133 
-<a name="l00134"></a>00134         vMoveTo(pDiag);
-<a name="l00135"></a>00135         vPrintTXT(pDiag-&gt;pOutFile, szString, tStringLength);
-<a name="l00136"></a>00136         pDiag-&gt;lXleft += lStringWidth;
-<a name="l00137"></a>00137 } <span class="comment">/* end of vSubstringTXT */</span>
-<a name="l00138"></a>00138 
-<a name="l00139"></a>00139 <span class="comment">/*</span>
-<a name="l00140"></a>00140 <span class="comment"> * Create an start of paragraph by moving the y-top mark</span>
-<a name="l00141"></a>00141 <span class="comment"> */</span>
-<a name="l00142"></a>00142 <span class="keywordtype">void</span>
-<a name="l00143"></a>00143 vStartOfParagraphTXT(diagram_type *pDiag, <span class="keywordtype">long</span> lBeforeIndentation)
-<a name="l00144"></a>00144 {
-<a name="l00145"></a>00145         fail(pDiag == NULL);
-<a name="l00146"></a>00146         fail(lBeforeIndentation &lt; 0);
-<a name="l00147"></a>00147 
-<a name="l00148"></a>00148         <span class="keywordflow">if</span> (lBeforeIndentation &gt;= lTwips2MilliPoints(HEADING_GAP)) {
-<a name="l00149"></a>00149                 <span class="comment">/* A large gap is replaced by an empty line */</span>
-<a name="l00150"></a>00150                 vMove2NextLineTXT(pDiag);
-<a name="l00151"></a>00151         }
-<a name="l00152"></a>00152 } <span class="comment">/* end of vStartOfParagraphTXT */</span>
-<a name="l00153"></a>00153 
-<a name="l00154"></a>00154 <span class="comment">/*</span>
-<a name="l00155"></a>00155 <span class="comment"> * Create an end of paragraph by moving the y-top mark</span>
-<a name="l00156"></a>00156 <span class="comment"> */</span>
-<a name="l00157"></a>00157 <span class="keywordtype">void</span>
-<a name="l00158"></a>00158 vEndOfParagraphTXT(diagram_type *pDiag, <span class="keywordtype">long</span> lAfterIndentation)
-<a name="l00159"></a>00159 {
-<a name="l00160"></a>00160         fail(pDiag == NULL);
-<a name="l00161"></a>00161         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00162"></a>00162         fail(lAfterIndentation &lt; 0);
-<a name="l00163"></a>00163 
-<a name="l00164"></a>00164         <span class="keywordflow">if</span> (pDiag-&gt;lXleft &gt; 0) {
-<a name="l00165"></a>00165                 <span class="comment">/* To the start of the line */</span>
-<a name="l00166"></a>00166                 vMove2NextLineTXT(pDiag);
-<a name="l00167"></a>00167         }
-<a name="l00168"></a>00168 
-<a name="l00169"></a>00169         <span class="keywordflow">if</span> (lAfterIndentation &gt;= lTwips2MilliPoints(HEADING_GAP)) {
-<a name="l00170"></a>00170                 <span class="comment">/* A large gap is replaced by an empty line */</span>
-<a name="l00171"></a>00171                 vMove2NextLineTXT(pDiag);
-<a name="l00172"></a>00172         }
-<a name="l00173"></a>00173 } <span class="comment">/* end of vEndOfParagraphTXT */</span>
-<a name="l00174"></a>00174 
-<a name="l00175"></a>00175 <span class="comment">/*</span>
-<a name="l00176"></a>00176 <span class="comment"> * Create an end of page</span>
-<a name="l00177"></a>00177 <span class="comment"> */</span>
-<a name="l00178"></a>00178 <span class="keywordtype">void</span>
-<a name="l00179"></a>00179 vEndOfPageTXT(diagram_type *pDiag, <span class="keywordtype">long</span> lAfterIndentation)
-<a name="l00180"></a>00180 {
-<a name="l00181"></a>00181         vEndOfParagraphTXT(pDiag, lAfterIndentation);
-<a name="l00182"></a>00182 } <span class="comment">/* end of vEndOfPageTXT */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/unix_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/unix.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/unix.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * unix.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2000 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Unix approximations of RISC-OS functions</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;stdarg.h&gt;</span>
-<a name="l00012"></a>00012 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00013"></a>00013 
-<a name="l00014"></a>00014 
-<a name="l00015"></a>00015 <span class="comment">/*</span>
-<a name="l00016"></a>00016 <span class="comment"> * werr - write an error message and exit if needed</span>
-<a name="l00017"></a>00017 <span class="comment"> */</span>
-<a name="l00018"></a>00018 <span class="keywordtype">void</span>
-<a name="l00019"></a>00019 werr(<span class="keywordtype">int</span> iFatal, <span class="keyword">const</span> <span class="keywordtype">char</span> *szFormat, ...)
-<a name="l00020"></a>00020 {
-<a name="l00021"></a>00021         va_list tArg;
-<a name="l00022"></a>00022 
-<a name="l00023"></a>00023         va_start(tArg, szFormat);
-<a name="l00024"></a>00024         (void)vfprintf(stderr, szFormat, tArg);
-<a name="l00025"></a>00025         va_end(tArg);
-<a name="l00026"></a>00026         fprintf(stderr, <span class="stringliteral">&quot;\n&quot;</span>);
-<a name="l00027"></a>00027         <span class="keywordflow">switch</span> (iFatal) {
-<a name="l00028"></a>00028         <span class="keywordflow">case</span> 0:         <span class="comment">/* The message is just a warning, so no exit */</span>
-<a name="l00029"></a>00029                 <span class="keywordflow">return</span>;
-<a name="l00030"></a>00030         <span class="keywordflow">case</span> 1:         <span class="comment">/* Fatal error with a standard exit */</span>
-<a name="l00031"></a>00031                 exit(EXIT_FAILURE);
-<a name="l00032"></a>00032         <span class="keywordflow">default</span>:        <span class="comment">/* Fatal error with a non-standard exit */</span>
-<a name="l00033"></a>00033                 exit(iFatal);
-<a name="l00034"></a>00034         }
-<a name="l00035"></a>00035 } <span class="comment">/* end of werr */</span>
-<a name="l00036"></a>00036 
-<a name="l00037"></a>00037 <span class="keywordtype">void</span>
-<a name="l00038"></a>00038 Hourglass_On(<span class="keywordtype">void</span>)
-<a name="l00039"></a>00039 {
-<a name="l00040"></a>00040 } <span class="comment">/* end of Hourglass_On */</span>
-<a name="l00041"></a>00041 
-<a name="l00042"></a>00042 <span class="keywordtype">void</span>
-<a name="l00043"></a>00043 Hourglass_Off(<span class="keywordtype">void</span>)
-<a name="l00044"></a>00044 {
-<a name="l00045"></a>00045 } <span class="comment">/* end of Hourglass_Off */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/utf8_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,276 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/utf8.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/utf8.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * utf8.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2001-2004 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> *====================================================================</span>
-<a name="l00006"></a>00006 <span class="comment"> * This part of the software is based on:</span>
-<a name="l00007"></a>00007 <span class="comment"> * An implementation of wcwidth() as defined in</span>
-<a name="l00008"></a>00008 <span class="comment"> * &quot;The Single UNIX Specification, Version 2, The Open Group, 1997&quot;</span>
-<a name="l00009"></a>00009 <span class="comment"> * &lt;http://www.UNIX-systems.org/online.html&gt;</span>
-<a name="l00010"></a>00010 <span class="comment"> * Markus Kuhn -- 2001-01-12 -- public domain</span>
-<a name="l00011"></a>00011 <span class="comment"> *====================================================================</span>
-<a name="l00012"></a>00012 <span class="comment"> * The credit should go to him, but all the bugs are mine.</span>
-<a name="l00013"></a>00013 <span class="comment"> */</span>
-<a name="l00014"></a>00014 
-<a name="l00015"></a>00015 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00016"></a>00016 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00017"></a>00017 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00018"></a>00018 
-<a name="l00019"></a>00019 <span class="keyword">struct </span>interval {
-<a name="l00020"></a>00020         USHORT  first;
-<a name="l00021"></a>00021         USHORT  last;
-<a name="l00022"></a>00022 };
-<a name="l00023"></a>00023 <span class="comment">/* Sorted list of non-overlapping intervals of non-spacing characters */</span>
-<a name="l00024"></a>00024 <span class="keyword">static</span> <span class="keyword">const</span> <span class="keyword">struct </span>interval combining[] = {
-<a name="l00025"></a>00025         { 0x0300, 0x034E }, { 0x0360, 0x0362 }, { 0x0483, 0x0486 },
-<a name="l00026"></a>00026         { 0x0488, 0x0489 }, { 0x0591, 0x05A1 }, { 0x05A3, 0x05B9 },
-<a name="l00027"></a>00027         { 0x05BB, 0x05BD }, { 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 },
-<a name="l00028"></a>00028         { 0x05C4, 0x05C4 }, { 0x064B, 0x0655 }, { 0x0670, 0x0670 },
-<a name="l00029"></a>00029         { 0x06D6, 0x06E4 }, { 0x06E7, 0x06E8 }, { 0x06EA, 0x06ED },
-<a name="l00030"></a>00030         { 0x070F, 0x070F }, { 0x0711, 0x0711 }, { 0x0730, 0x074A },
-<a name="l00031"></a>00031         { 0x07A6, 0x07B0 }, { 0x0901, 0x0902 }, { 0x093C, 0x093C },
-<a name="l00032"></a>00032         { 0x0941, 0x0948 }, { 0x094D, 0x094D }, { 0x0951, 0x0954 },
-<a name="l00033"></a>00033         { 0x0962, 0x0963 }, { 0x0981, 0x0981 }, { 0x09BC, 0x09BC },
-<a name="l00034"></a>00034         { 0x09C1, 0x09C4 }, { 0x09CD, 0x09CD }, { 0x09E2, 0x09E3 },
-<a name="l00035"></a>00035         { 0x0A02, 0x0A02 }, { 0x0A3C, 0x0A3C }, { 0x0A41, 0x0A42 },
-<a name="l00036"></a>00036         { 0x0A47, 0x0A48 }, { 0x0A4B, 0x0A4D }, { 0x0A70, 0x0A71 },
-<a name="l00037"></a>00037         { 0x0A81, 0x0A82 }, { 0x0ABC, 0x0ABC }, { 0x0AC1, 0x0AC5 },
-<a name="l00038"></a>00038         { 0x0AC7, 0x0AC8 }, { 0x0ACD, 0x0ACD }, { 0x0B01, 0x0B01 },
-<a name="l00039"></a>00039         { 0x0B3C, 0x0B3C }, { 0x0B3F, 0x0B3F }, { 0x0B41, 0x0B43 },
-<a name="l00040"></a>00040         { 0x0B4D, 0x0B4D }, { 0x0B56, 0x0B56 }, { 0x0B82, 0x0B82 },
-<a name="l00041"></a>00041         { 0x0BC0, 0x0BC0 }, { 0x0BCD, 0x0BCD }, { 0x0C3E, 0x0C40 },
-<a name="l00042"></a>00042         { 0x0C46, 0x0C48 }, { 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 },
-<a name="l00043"></a>00043         { 0x0CBF, 0x0CBF }, { 0x0CC6, 0x0CC6 }, { 0x0CCC, 0x0CCD },
-<a name="l00044"></a>00044         { 0x0D41, 0x0D43 }, { 0x0D4D, 0x0D4D }, { 0x0DCA, 0x0DCA },
-<a name="l00045"></a>00045         { 0x0DD2, 0x0DD4 }, { 0x0DD6, 0x0DD6 }, { 0x0E31, 0x0E31 },
-<a name="l00046"></a>00046         { 0x0E34, 0x0E3A }, { 0x0E47, 0x0E4E }, { 0x0EB1, 0x0EB1 },
-<a name="l00047"></a>00047         { 0x0EB4, 0x0EB9 }, { 0x0EBB, 0x0EBC }, { 0x0EC8, 0x0ECD },
-<a name="l00048"></a>00048         { 0x0F18, 0x0F19 }, { 0x0F35, 0x0F35 }, { 0x0F37, 0x0F37 },
-<a name="l00049"></a>00049         { 0x0F39, 0x0F39 }, { 0x0F71, 0x0F7E }, { 0x0F80, 0x0F84 },
-<a name="l00050"></a>00050         { 0x0F86, 0x0F87 }, { 0x0F90, 0x0F97 }, { 0x0F99, 0x0FBC },
-<a name="l00051"></a>00051         { 0x0FC6, 0x0FC6 }, { 0x102D, 0x1030 }, { 0x1032, 0x1032 },
-<a name="l00052"></a>00052         { 0x1036, 0x1037 }, { 0x1039, 0x1039 }, { 0x1058, 0x1059 },
-<a name="l00053"></a>00053         { 0x1160, 0x11FF }, { 0x17B7, 0x17BD }, { 0x17C6, 0x17C6 },
-<a name="l00054"></a>00054         { 0x17C9, 0x17D3 }, { 0x180B, 0x180E }, { 0x18A9, 0x18A9 },
-<a name="l00055"></a>00055         { 0x200B, 0x200F }, { 0x202A, 0x202E }, { 0x206A, 0x206F },
-<a name="l00056"></a>00056         { 0x20D0, 0x20E3 }, { 0x302A, 0x302F }, { 0x3099, 0x309A },
-<a name="l00057"></a>00057         { 0xFB1E, 0xFB1E }, { 0xFE20, 0xFE23 }, { 0xFEFF, 0xFEFF },
-<a name="l00058"></a>00058         { 0xFFF9, 0xFFFB }
-<a name="l00059"></a>00059 };
-<a name="l00060"></a>00060 
-<a name="l00061"></a>00061 <span class="comment">/* Auxiliary function for binary search in interval table */</span>
-<a name="l00062"></a>00062 <span class="keyword">static</span> BOOL
-<a name="l00063"></a>00063 bIsZeroWidthChar(ULONG ucs)
-<a name="l00064"></a>00064 {
-<a name="l00065"></a>00065         <span class="keywordtype">int</span> low = 0;
-<a name="l00066"></a>00066         <span class="keywordtype">int</span> high = elementsof(combining) - 1;
-<a name="l00067"></a>00067         <span class="keywordtype">int</span> mid;
-<a name="l00068"></a>00068 
-<a name="l00069"></a>00069         <span class="keywordflow">if</span> (ucs &lt; (ULONG)combining[low].first ||
-<a name="l00070"></a>00070             ucs &gt; (ULONG)combining[high].last) {
-<a name="l00071"></a>00071                 <span class="keywordflow">return</span> FALSE;
-<a name="l00072"></a>00072         }
-<a name="l00073"></a>00073 
-<a name="l00074"></a>00074         <span class="keywordflow">while</span> (high &gt;= low) {
-<a name="l00075"></a>00075                 mid = (low + high) / 2;
-<a name="l00076"></a>00076                 <span class="keywordflow">if</span> (ucs &gt; (ULONG)combining[mid].last) {
-<a name="l00077"></a>00077                         low = mid + 1;
-<a name="l00078"></a>00078                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ucs &lt; (ULONG)combining[mid].first) {
-<a name="l00079"></a>00079                         high = mid - 1;
-<a name="l00080"></a>00080                 } <span class="keywordflow">else</span> {
-<a name="l00081"></a>00081                         <span class="keywordflow">return</span> TRUE;
-<a name="l00082"></a>00082                 }
-<a name="l00083"></a>00083         }
-<a name="l00084"></a>00084         <span class="keywordflow">return</span> FALSE;
-<a name="l00085"></a>00085 } <span class="comment">/* end of bIsZeroWidthChar */</span>
-<a name="l00086"></a>00086 
-<a name="l00087"></a>00087 <span class="comment">/* The following functions define the column width of an ISO 10646</span>
-<a name="l00088"></a>00088 <span class="comment"> * character as follows:</span>
-<a name="l00089"></a>00089 <span class="comment"> *</span>
-<a name="l00090"></a>00090 <span class="comment"> *    - The null character (U+0000) has a column width of 0.</span>
-<a name="l00091"></a>00091 <span class="comment"> *</span>
-<a name="l00092"></a>00092 <span class="comment"> *    - Other C0/C1 control characters and DEL will lead to a return</span>
-<a name="l00093"></a>00093 <span class="comment"> *      value of -1.</span>
-<a name="l00094"></a>00094 <span class="comment"> *</span>
-<a name="l00095"></a>00095 <span class="comment"> *    - Non-spacing and enclosing combining characters (general</span>
-<a name="l00096"></a>00096 <span class="comment"> *      category code Mn or Me in the Unicode database) have a</span>
-<a name="l00097"></a>00097 <span class="comment"> *      column width of 0.</span>
-<a name="l00098"></a>00098 <span class="comment"> *</span>
-<a name="l00099"></a>00099 <span class="comment"> *    - Other format characters (general category code Cf in the Unicode</span>
-<a name="l00100"></a>00100 <span class="comment"> *      database) and ZERO WIDTH SPACE (U+200B) have a column width of 0.</span>
-<a name="l00101"></a>00101 <span class="comment"> *</span>
-<a name="l00102"></a>00102 <span class="comment"> *    - Hangul Jamo medial vowels and final consonants (U+1160-U+11FF)</span>
-<a name="l00103"></a>00103 <span class="comment"> *      have a column width of 0.</span>
-<a name="l00104"></a>00104 <span class="comment"> *</span>
-<a name="l00105"></a>00105 <span class="comment"> *    - Spacing characters in the East Asian Wide (W) or East Asian</span>
-<a name="l00106"></a>00106 <span class="comment"> *      FullWidth (F) category as defined in Unicode Technical</span>
-<a name="l00107"></a>00107 <span class="comment"> *      Report #11 have a column width of 2.</span>
-<a name="l00108"></a>00108 <span class="comment"> *</span>
-<a name="l00109"></a>00109 <span class="comment"> *    - All remaining characters (including all printable</span>
-<a name="l00110"></a>00110 <span class="comment"> *      ISO 8859-1 and WGL4 characters, Unicode control characters,</span>
-<a name="l00111"></a>00111 <span class="comment"> *      etc.) have a column width of 1.</span>
-<a name="l00112"></a>00112 <span class="comment"> *</span>
-<a name="l00113"></a>00113 <span class="comment"> * This implementation assumes that all characters are encoded</span>
-<a name="l00114"></a>00114 <span class="comment"> * in ISO 10646.</span>
-<a name="l00115"></a>00115 <span class="comment"> *</span>
-<a name="l00116"></a>00116 <span class="comment"> * This function is not named wcwidth() to prevent name clashes</span>
-<a name="l00117"></a>00117 <span class="comment"> */</span>
-<a name="l00118"></a>00118 <span class="keyword">static</span> <span class="keywordtype">int</span>
-<a name="l00119"></a>00119 iWcWidth(ULONG ucs)
-<a name="l00120"></a>00120 {
-<a name="l00121"></a>00121         <span class="comment">/* Test for 8-bit control characters */</span>
-<a name="l00122"></a>00122         <span class="keywordflow">if</span> (ucs == 0) {
-<a name="l00123"></a>00123                 <span class="keywordflow">return</span> 0;
-<a name="l00124"></a>00124         }
-<a name="l00125"></a>00125         <span class="keywordflow">if</span> (ucs &lt; 0x20 || (ucs &gt;= 0x7f &amp;&amp; ucs &lt; 0xa0)) {
-<a name="l00126"></a>00126                 NO_DBG_HEX(ucs);
-<a name="l00127"></a>00127                 <span class="keywordflow">return</span> -1;
-<a name="l00128"></a>00128         }
-<a name="l00129"></a>00129 
-<a name="l00130"></a>00130         <span class="comment">/* Binary search in table of non-spacing characters */</span>
-<a name="l00131"></a>00131         <span class="keywordflow">if</span> (bIsZeroWidthChar(ucs)) {
-<a name="l00132"></a>00132                 <span class="keywordflow">return</span> 0;
-<a name="l00133"></a>00133         }
-<a name="l00134"></a>00134 
-<a name="l00135"></a>00135         <span class="comment">/* Ucs is not a combining or C0/C1 control character */</span>
-<a name="l00136"></a>00136 
-<a name="l00137"></a>00137         <span class="keywordflow">return</span> 1 +
-<a name="l00138"></a>00138         (ucs &gt;= 0x1100 &amp;&amp;
-<a name="l00139"></a>00139          (ucs &lt;= 0x115f ||                    <span class="comment">/* Hangul Jamo init. consonants */</span>
-<a name="l00140"></a>00140           (ucs &gt;= 0x2e80 &amp;&amp; ucs &lt;= 0xa4cf &amp;&amp; (ucs &amp; ~0x0011) != 0x300a &amp;&amp;
-<a name="l00141"></a>00141            ucs != 0x303f) ||                  <span class="comment">/* CJK ... Yi */</span>
-<a name="l00142"></a>00142           (ucs &gt;= 0xac00 &amp;&amp; ucs &lt;= 0xd7a3) || <span class="comment">/* Hangul Syllables */</span>
-<a name="l00143"></a>00143           (ucs &gt;= 0xf900 &amp;&amp; ucs &lt;= 0xfaff) || <span class="comment">/* CJK Compatibility Ideographs */</span>
-<a name="l00144"></a>00144           (ucs &gt;= 0xfe30 &amp;&amp; ucs &lt;= 0xfe6f) || <span class="comment">/* CJK Compatibility Forms */</span>
-<a name="l00145"></a>00145           (ucs &gt;= 0xff00 &amp;&amp; ucs &lt;= 0xff5f) || <span class="comment">/* Fullwidth Forms */</span>
-<a name="l00146"></a>00146           (ucs &gt;= 0xffe0 &amp;&amp; ucs &lt;= 0xffe6) ||
-<a name="l00147"></a>00147           (ucs &gt;= 0x20000 &amp;&amp; ucs &lt;= 0x2ffff)));
-<a name="l00148"></a>00148 } <span class="comment">/* end of iWcWidth */</span>
-<a name="l00149"></a>00149 
-<a name="l00150"></a>00150 <span class="comment">/*</span>
-<a name="l00151"></a>00151 <span class="comment"> * utf8_to_ucs - convert from UTF-8 to UCS</span>
-<a name="l00152"></a>00152 <span class="comment"> *</span>
-<a name="l00153"></a>00153 <span class="comment"> * Returns the UCS character,</span>
-<a name="l00154"></a>00154 <span class="comment"> * Fills in the number of bytes in the UTF-8 character</span>
-<a name="l00155"></a>00155 <span class="comment"> */</span>
-<a name="l00156"></a>00156 <span class="keyword">static</span> ULONG
-<a name="l00157"></a>00157 utf8_to_ucs(<span class="keyword">const</span> <span class="keywordtype">char</span> *p, <span class="keywordtype">int</span> iStrLen, <span class="keywordtype">int</span> *piUtfLen)
-<a name="l00158"></a>00158 {
-<a name="l00159"></a>00159         ULONG   ulUcs;
-<a name="l00160"></a>00160         <span class="keywordtype">int</span>     iIndex, iCharLen;
-<a name="l00161"></a>00161 
-<a name="l00162"></a>00162         fail(p == NULL || piUtfLen == NULL);
-<a name="l00163"></a>00163         fail(iStrLen &lt; 1);
-<a name="l00164"></a>00164 
-<a name="l00165"></a>00165         ulUcs = (ULONG)(UCHAR)p[0];
-<a name="l00166"></a>00166 
-<a name="l00167"></a>00167         <span class="keywordflow">if</span> (ulUcs &lt; 0x80) {
-<a name="l00168"></a>00168                 *piUtfLen = 1;
-<a name="l00169"></a>00169                 <span class="keywordflow">return</span> ulUcs;
-<a name="l00170"></a>00170         }
-<a name="l00171"></a>00171 
-<a name="l00172"></a>00172         <span class="keywordflow">if</span> (ulUcs &lt; 0xe0){
-<a name="l00173"></a>00173                 iCharLen = 2;
-<a name="l00174"></a>00174                 ulUcs &amp;= 0x1f;
-<a name="l00175"></a>00175         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ulUcs &lt; 0xf0){
-<a name="l00176"></a>00176                 iCharLen = 3;
-<a name="l00177"></a>00177                 ulUcs &amp;= 0x0f;
-<a name="l00178"></a>00178         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ulUcs &lt; 0xf8){
-<a name="l00179"></a>00179                 iCharLen = 4;
-<a name="l00180"></a>00180                 ulUcs &amp;= 0x07;
-<a name="l00181"></a>00181         } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ulUcs &lt; 0xfc){
-<a name="l00182"></a>00182                 iCharLen = 5;
-<a name="l00183"></a>00183                 ulUcs &amp;= 0x03;
-<a name="l00184"></a>00184         } <span class="keywordflow">else</span> {
-<a name="l00185"></a>00185                 iCharLen = 6;
-<a name="l00186"></a>00186                 ulUcs &amp;= 0x01;
-<a name="l00187"></a>00187         }
-<a name="l00188"></a>00188         <span class="keywordflow">for</span> (iIndex = 1; iIndex &lt; iCharLen; iIndex++) {
-<a name="l00189"></a>00189                 ulUcs &lt;&lt;= 6;
-<a name="l00190"></a>00190                 <span class="keywordflow">if</span> (iIndex &lt; iStrLen) {
-<a name="l00191"></a>00191                         ulUcs |= (ULONG)(UCHAR)p[iIndex] &amp; 0x3f;
-<a name="l00192"></a>00192                 }
-<a name="l00193"></a>00193         }
-<a name="l00194"></a>00194         *piUtfLen = iCharLen;
-<a name="l00195"></a>00195         <span class="keywordflow">return</span> ulUcs;
-<a name="l00196"></a>00196 } <span class="comment">/* end of utf8_to_ucs */</span>
-<a name="l00197"></a>00197 
-<a name="l00198"></a>00198 <span class="comment">/*</span>
-<a name="l00199"></a>00199 <span class="comment"> * utf8_strwidth - compute the string width of an UTF-8 string</span>
-<a name="l00200"></a>00200 <span class="comment"> *</span>
-<a name="l00201"></a>00201 <span class="comment"> * Returns the string width in columns</span>
-<a name="l00202"></a>00202 <span class="comment"> */</span>
-<a name="l00203"></a>00203 <span class="keywordtype">long</span>
-<a name="l00204"></a>00204 utf8_strwidth(<span class="keyword">const</span> <span class="keywordtype">char</span> *pcString, <span class="keywordtype">size_t</span> tNumchars)
-<a name="l00205"></a>00205 {
-<a name="l00206"></a>00206         ULONG   ulUcs;
-<a name="l00207"></a>00207         <span class="keywordtype">long</span>    lTotal;
-<a name="l00208"></a>00208         <span class="keywordtype">int</span>     iToGo, iWidth, iUtflen;
-<a name="l00209"></a>00209 
-<a name="l00210"></a>00210         fail(pcString == NULL || tNumchars &gt; (<span class="keywordtype">size_t</span>)INT_MAX);
-<a name="l00211"></a>00211 
-<a name="l00212"></a>00212         lTotal = 0;
-<a name="l00213"></a>00213         iToGo = (int)tNumchars;
-<a name="l00214"></a>00214 
-<a name="l00215"></a>00215         <span class="keywordflow">while</span> (iToGo &gt; 0 &amp;&amp; *pcString != <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00216"></a>00216                 ulUcs = utf8_to_ucs(pcString, iToGo, &amp;iUtflen);
-<a name="l00217"></a>00217                 iWidth = iWcWidth(ulUcs);
-<a name="l00218"></a>00218                 <span class="keywordflow">if</span> (iWidth &gt; 0) {
-<a name="l00219"></a>00219                         lTotal += iWidth;
-<a name="l00220"></a>00220                 }
-<a name="l00221"></a>00221                 pcString += iUtflen;
-<a name="l00222"></a>00222                 iToGo -= iUtflen;
-<a name="l00223"></a>00223         }
-<a name="l00224"></a>00224         NO_DBG_DEC(lTotal);
-<a name="l00225"></a>00225         <span class="keywordflow">return</span> lTotal;
-<a name="l00226"></a>00226 } <span class="comment">/* end of utf8_strwidth */</span>
-<a name="l00227"></a>00227 
-<a name="l00228"></a>00228 <span class="comment">/*</span>
-<a name="l00229"></a>00229 <span class="comment"> * utf8_chrlength - get the number of bytes in an UTF-8 character</span>
-<a name="l00230"></a>00230 <span class="comment"> *</span>
-<a name="l00231"></a>00231 <span class="comment"> * Returns the number of bytes</span>
-<a name="l00232"></a>00232 <span class="comment"> */</span>
-<a name="l00233"></a>00233 <span class="keywordtype">int</span>
-<a name="l00234"></a>00234 utf8_chrlength(<span class="keyword">const</span> <span class="keywordtype">char</span> *p)
-<a name="l00235"></a>00235 {
-<a name="l00236"></a>00236         <span class="keywordtype">int</span>     iUtflen;
-<a name="l00237"></a>00237 
-<a name="l00238"></a>00238         fail(p == NULL);
-<a name="l00239"></a>00239 
-<a name="l00240"></a>00240         iUtflen = -1;           <span class="comment">/* Just to make sure */</span>
-<a name="l00241"></a>00241         (void)utf8_to_ucs(p, INT_MAX, &amp;iUtflen);
-<a name="l00242"></a>00242         NO_DBG_DEC(iUtflen);
-<a name="l00243"></a>00243         <span class="keywordflow">return</span> iUtflen;
-<a name="l00244"></a>00244 } <span class="comment">/* end of utf8_chrlength */</span>
-<a name="l00245"></a>00245 
-<a name="l00246"></a>00246 <span class="comment">/*</span>
-<a name="l00247"></a>00247 <span class="comment"> * is_locale_utf8 - return TRUE if the locale is UTF-8</span>
-<a name="l00248"></a>00248 <span class="comment"> */</span>
-<a name="l00249"></a>00249 BOOL
-<a name="l00250"></a>00250 is_locale_utf8(<span class="keywordtype">void</span>)
-<a name="l00251"></a>00251 {
-<a name="l00252"></a>00252         <span class="keywordtype">char</span>    szCodeset[20];
-<a name="l00253"></a>00253 
-<a name="l00254"></a>00254         szCodeset[0] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00255"></a>00255         <span class="keywordflow">if</span> (!bGetNormalizedCodeset(szCodeset, <span class="keyword">sizeof</span>(szCodeset), NULL)) {
-<a name="l00256"></a>00256                 <span class="keywordflow">return</span> FALSE;
-<a name="l00257"></a>00257         }
-<a name="l00258"></a>00258         DBG_MSG(szCodeset);
-<a name="l00259"></a>00259         <span class="keywordflow">return</span> STREQ(szCodeset, <span class="stringliteral">&quot;utf8&quot;</span>);
-<a name="l00260"></a>00260 } <span class="comment">/* end of is_locale_utf8 */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/version_8h_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/inc/version.h Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/inc/version.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * version.h</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2005 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Version and release information</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#if !defined(__version_h)</span>
-<a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor">#define __version_h 1</span>
-<a name="l00011"></a>00011 <span class="preprocessor"></span>
-<a name="l00012"></a>00012 <span class="comment">/* Strings for the info box */</span>
-<a name="l00013"></a>00013 <span class="preprocessor">#define PURPOSESTRING   &quot;Display MS-Word files&quot;</span>
-<a name="l00014"></a>00014 <span class="preprocessor"></span>
-<a name="l00015"></a>00015 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#define AUTHORSTRING    &quot;© 1998-2005 Adri van Os&quot;</span>
-<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define AUTHORSTRING    &quot;(C) 1998-2005 Adri van Os&quot;</span>
-<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="preprocessor">#define VERSIONSTRING   &quot;0.37  (21 Oct 2005)&quot;</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span>
-<a name="l00023"></a>00023 <span class="preprocessor">#if defined(__dos)</span>
-<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#if defined(__DJGPP__)</span>
-<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define VERSIONSTRING2  &quot; # 32-bit Protected Mode&quot;</span>
-<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define VERSIONSTRING2  &quot; # 16-bit Real Mode&quot;</span>
-<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __DJGPP__ */</span>
-<a name="l00029"></a>00029 <span class="preprocessor">#endif </span><span class="comment">/* __dos */</span>
-<a name="l00030"></a>00030 
-<a name="l00031"></a>00031 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define STATUSSTRING    &quot;DEBUG version&quot;</span>
-<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#define STATUSSTRING    &quot;GNU General Public License&quot;</span>
-<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00036"></a>00036 
-<a name="l00037"></a>00037 <span class="preprocessor">#endif </span><span class="comment">/* __version_h */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/word2text_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1521 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/word2text.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/word2text.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * word2text.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2005 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * MS Word to &quot;text&quot; functions</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00012"></a>00012 <span class="preprocessor">#include &lt;ctype.h&gt;</span>
-<a name="l00013"></a>00013 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#include &quot;DeskLib:Hourglass.h&quot;</span>
-<a name="l00015"></a>00015 <span class="preprocessor">#include &quot;drawfile.h&quot;</span>
-<a name="l00016"></a>00016 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00017"></a>00017 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00018"></a>00018 
-<a name="l00019"></a>00019 
-<a name="l00020"></a>00020 <span class="preprocessor">#define INITIAL_SIZE            40</span>
-<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define EXTENTION_SIZE          20</span>
-<a name="l00022"></a>00022 <span class="preprocessor"></span>
-<a name="l00023"></a>00023 
-<a name="l00024"></a>00024 <span class="comment">/* Macros to make sure all such statements will be identical */</span>
-<a name="l00025"></a>00025 <span class="preprocessor">#define OUTPUT_LINE()           \</span>
-<a name="l00026"></a>00026 <span class="preprocessor">        do {\</span>
-<a name="l00027"></a>00027 <span class="preprocessor">                vAlign2Window(pDiag, pAnchor, lWidthMax, ucAlignment);\</span>
-<a name="l00028"></a>00028 <span class="preprocessor">                TRACE_MSG(&quot;after vAlign2Window&quot;);\</span>
-<a name="l00029"></a>00029 <span class="preprocessor">                pAnchor = pStartNewOutput(pAnchor, NULL);\</span>
-<a name="l00030"></a>00030 <span class="preprocessor">                pOutput = pAnchor;\</span>
-<a name="l00031"></a>00031 <span class="preprocessor">        } while(0)</span>
-<a name="l00032"></a>00032 <span class="preprocessor"></span>
-<a name="l00033"></a>00033 <span class="preprocessor">#define RESET_LINE()            \</span>
-<a name="l00034"></a>00034 <span class="preprocessor">        do {\</span>
-<a name="l00035"></a>00035 <span class="preprocessor">                pAnchor = pStartNewOutput(pAnchor, NULL);\</span>
-<a name="l00036"></a>00036 <span class="preprocessor">                pOutput = pAnchor;\</span>
-<a name="l00037"></a>00037 <span class="preprocessor">        } while(0)</span>
-<a name="l00038"></a>00038 <span class="preprocessor"></span>
-<a name="l00039"></a>00039 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="comment">/* Length of the document in characters */</span>
-<a name="l00041"></a>00041 <span class="keyword">static</span> ULONG    ulDocumentLength;
-<a name="l00042"></a>00042 <span class="comment">/* Number of characters processed so far */</span>
-<a name="l00043"></a>00043 <span class="keyword">static</span> ULONG    ulCharCounter;
-<a name="l00044"></a>00044 <span class="keyword">static</span> <span class="keywordtype">int</span>      iCurrPct, iPrevPct;
-<a name="l00045"></a>00045 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00046"></a>00046 <span class="comment">/* The document is in the format belonging to this version of Word */</span>
-<a name="l00047"></a>00047 <span class="keyword">static</span> <span class="keywordtype">int</span>      iWordVersion = -1;
-<a name="l00048"></a>00048 <span class="comment">/* Special treatment for files from Word 4/5/6 on an Apple Macintosh */</span>
-<a name="l00049"></a>00049 <span class="keyword">static</span> BOOL     bOldMacFile = FALSE;
-<a name="l00050"></a>00050 <span class="comment">/* Section Information */</span>
-<a name="l00051"></a>00051 <span class="keyword">static</span> <span class="keyword">const</span> section_block_type *pSection = NULL;
-<a name="l00052"></a>00052 <span class="keyword">static</span> <span class="keyword">const</span> section_block_type *pSectionNext = NULL;
-<a name="l00053"></a>00053 <span class="comment">/* All the (command line) options */</span>
-<a name="l00054"></a>00054 <span class="keyword">static</span> options_type     tOptions;
-<a name="l00055"></a>00055 <span class="comment">/* Needed for reading a complete table row */</span>
-<a name="l00056"></a>00056 <span class="keyword">static</span> <span class="keyword">const</span> row_block_type     *pRowInfo = NULL;
-<a name="l00057"></a>00057 <span class="keyword">static</span> BOOL     bStartRow = FALSE;
-<a name="l00058"></a>00058 <span class="keyword">static</span> BOOL     bEndRowNorm = FALSE;
-<a name="l00059"></a>00059 <span class="keyword">static</span> BOOL     bEndRowFast = FALSE;
-<a name="l00060"></a>00060 <span class="keyword">static</span> BOOL     bIsTableRow = FALSE;
-<a name="l00061"></a>00061 <span class="comment">/* Index of the next style and font information */</span>
-<a name="l00062"></a>00062 <span class="keyword">static</span> USHORT   usIstdNext = ISTD_NORMAL;
-<a name="l00063"></a>00063 <span class="comment">/* Needed for finding the start of a style */</span>
-<a name="l00064"></a>00064 <span class="keyword">static</span> <span class="keyword">const</span> style_block_type   *pStyleInfo = NULL;
-<a name="l00065"></a>00065 <span class="keyword">static</span> style_block_type         tStyleNext;
-<a name="l00066"></a>00066 <span class="keyword">static</span> BOOL     bStartStyle = FALSE;
-<a name="l00067"></a>00067 <span class="keyword">static</span> BOOL     bStartStyleNext = FALSE;
-<a name="l00068"></a>00068 <span class="comment">/* Needed for finding the start of a font */</span>
-<a name="l00069"></a>00069 <span class="keyword">static</span> <span class="keyword">const</span> font_block_type    *pFontInfo = NULL;
-<a name="l00070"></a>00070 <span class="keyword">static</span> font_block_type          tFontNext;
-<a name="l00071"></a>00071 <span class="keyword">static</span> BOOL     bStartFont = FALSE;
-<a name="l00072"></a>00072 <span class="keyword">static</span> BOOL     bStartFontNext = FALSE;
-<a name="l00073"></a>00073 <span class="comment">/* Needed for finding an image */</span>
-<a name="l00074"></a>00074 <span class="keyword">static</span> ULONG    ulFileOffsetImage = FC_INVALID;
-<a name="l00075"></a>00075 
-<a name="l00076"></a>00076 
-<a name="l00077"></a>00077 <span class="comment">/*</span>
-<a name="l00078"></a>00078 <span class="comment"> * vUpdateCounters - Update the counters for the hourglass</span>
-<a name="l00079"></a>00079 <span class="comment"> */</span>
-<a name="l00080"></a>00080 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00081"></a>00081 vUpdateCounters(<span class="keywordtype">void</span>)
-<a name="l00082"></a>00082 {
-<a name="l00083"></a>00083 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00084"></a>00084 <span class="preprocessor"></span>        ulCharCounter++;
-<a name="l00085"></a>00085         iCurrPct = (int)((ulCharCounter * 100) / ulDocumentLength);
-<a name="l00086"></a>00086         <span class="keywordflow">if</span> (iCurrPct != iPrevPct) {
-<a name="l00087"></a>00087                 Hourglass_Percentage(iCurrPct);
-<a name="l00088"></a>00088                 iPrevPct = iCurrPct;
-<a name="l00089"></a>00089         }
-<a name="l00090"></a>00090 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00091"></a>00091 } <span class="comment">/* end of vUpdateCounters */</span>
-<a name="l00092"></a>00092 
-<a name="l00093"></a>00093 <span class="comment">/*</span>
-<a name="l00094"></a>00094 <span class="comment"> * bOutputContainsText - see if the output contains more than white space</span>
-<a name="l00095"></a>00095 <span class="comment"> */</span>
-<a name="l00096"></a>00096 BOOL
-<a name="l00097"></a>00097 bOutputContainsText(<span class="keyword">const</span> output_type *pAnchor)
-<a name="l00098"></a>00098 {
-<a name="l00099"></a>00099         <span class="keyword">const</span> output_type       *pCurr;
-<a name="l00100"></a>00100         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00101"></a>00101 
-<a name="l00102"></a>00102         fail(pAnchor == NULL);
-<a name="l00103"></a>00103 
-<a name="l00104"></a>00104         <span class="keywordflow">for</span> (pCurr = pAnchor; pCurr != NULL; pCurr = pCurr-&gt;pNext) {
-<a name="l00105"></a>00105                 fail(pCurr-&gt;lStringWidth &lt; 0);
-<a name="l00106"></a>00106                 <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; pCurr-&gt;tNextFree; tIndex++) {
-<a name="l00107"></a>00107                         <span class="keywordflow">if</span> (isspace((<span class="keywordtype">int</span>)(UCHAR)pCurr-&gt;szStorage[tIndex])) {
-<a name="l00108"></a>00108                                 <span class="keywordflow">continue</span>;
-<a name="l00109"></a>00109                         }
-<a name="l00110"></a>00110 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00111"></a>00111 <span class="preprocessor"></span>                        <span class="keywordflow">if</span> (pCurr-&gt;szStorage[tIndex] == FILLER_CHAR) {
-<a name="l00112"></a>00112                                 <span class="keywordflow">continue</span>;
-<a name="l00113"></a>00113                         }
-<a name="l00114"></a>00114 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00115"></a>00115                         <span class="keywordflow">return</span> TRUE;
-<a name="l00116"></a>00116                 }
-<a name="l00117"></a>00117         }
-<a name="l00118"></a>00118         <span class="keywordflow">return</span> FALSE;
-<a name="l00119"></a>00119 } <span class="comment">/* end of bOutputContainsText */</span>
-<a name="l00120"></a>00120 
-<a name="l00121"></a>00121 <span class="comment">/*</span>
-<a name="l00122"></a>00122 <span class="comment"> * lTotalStringWidth - compute the total width of the output string</span>
-<a name="l00123"></a>00123 <span class="comment"> */</span>
-<a name="l00124"></a>00124 <span class="keyword">static</span> <span class="keywordtype">long</span>
-<a name="l00125"></a>00125 lTotalStringWidth(<span class="keyword">const</span> output_type *pAnchor)
-<a name="l00126"></a>00126 {
-<a name="l00127"></a>00127         <span class="keyword">const</span> output_type       *pCurr;
-<a name="l00128"></a>00128         <span class="keywordtype">long</span>            lTotal;
-<a name="l00129"></a>00129 
-<a name="l00130"></a>00130         lTotal = 0;
-<a name="l00131"></a>00131         <span class="keywordflow">for</span> (pCurr = pAnchor; pCurr != NULL; pCurr = pCurr-&gt;pNext) {
-<a name="l00132"></a>00132                 DBG_DEC_C(pCurr-&gt;lStringWidth &lt; 0, pCurr-&gt;lStringWidth);
-<a name="l00133"></a>00133                 fail(pCurr-&gt;lStringWidth &lt; 0);
-<a name="l00134"></a>00134                 lTotal += pCurr-&gt;lStringWidth;
-<a name="l00135"></a>00135         }
-<a name="l00136"></a>00136         <span class="keywordflow">return</span> lTotal;
-<a name="l00137"></a>00137 } <span class="comment">/* end of lTotalStringWidth */</span>
-<a name="l00138"></a>00138 
-<a name="l00139"></a>00139 <span class="comment">/*</span>
-<a name="l00140"></a>00140 <span class="comment"> * vStoreByte - store one byte</span>
-<a name="l00141"></a>00141 <span class="comment"> */</span>
-<a name="l00142"></a>00142 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00143"></a>00143 vStoreByte(UCHAR ucChar, output_type *pOutput)
-<a name="l00144"></a>00144 {
-<a name="l00145"></a>00145         fail(pOutput == NULL);
-<a name="l00146"></a>00146 
-<a name="l00147"></a>00147         <span class="keywordflow">if</span> (ucChar == 0) {
-<a name="l00148"></a>00148                 pOutput-&gt;szStorage[pOutput-&gt;tNextFree] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00149"></a>00149                 <span class="keywordflow">return</span>;
-<a name="l00150"></a>00150         }
-<a name="l00151"></a>00151 
-<a name="l00152"></a>00152         <span class="keywordflow">while</span> (pOutput-&gt;tNextFree + 2 &gt; pOutput-&gt;tStorageSize) {
-<a name="l00153"></a>00153                 pOutput-&gt;tStorageSize += EXTENTION_SIZE;
-<a name="l00154"></a>00154                 pOutput-&gt;szStorage = xrealloc(pOutput-&gt;szStorage,
-<a name="l00155"></a>00155                                         pOutput-&gt;tStorageSize);
-<a name="l00156"></a>00156         }
-<a name="l00157"></a>00157         pOutput-&gt;szStorage[pOutput-&gt;tNextFree] = (char)ucChar;
-<a name="l00158"></a>00158         pOutput-&gt;szStorage[pOutput-&gt;tNextFree + 1] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00159"></a>00159         pOutput-&gt;tNextFree++;
-<a name="l00160"></a>00160 } <span class="comment">/* end of vStoreByte */</span>
-<a name="l00161"></a>00161 
-<a name="l00162"></a>00162 <span class="comment">/*</span>
-<a name="l00163"></a>00163 <span class="comment"> * vStoreChar - store a character as one or more bytes</span>
-<a name="l00164"></a>00164 <span class="comment"> */</span>
-<a name="l00165"></a>00165 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00166"></a>00166 vStoreChar(ULONG ulChar, BOOL bChangeAllowed, output_type *pOutput)
-<a name="l00167"></a>00167 {
-<a name="l00168"></a>00168         <span class="keywordtype">char</span>    szResult[4];
-<a name="l00169"></a>00169         <span class="keywordtype">size_t</span>  tIndex, tLen;
-<a name="l00170"></a>00170 
-<a name="l00171"></a>00171         fail(pOutput == NULL);
-<a name="l00172"></a>00172 
-<a name="l00173"></a>00173         <span class="keywordflow">if</span> (tOptions.eEncoding == encoding_utf_8 &amp;&amp; bChangeAllowed) {
-<a name="l00174"></a>00174                 DBG_HEX_C(ulChar &gt; 0xffff, ulChar);
-<a name="l00175"></a>00175                 fail(ulChar &gt; 0xffff);
-<a name="l00176"></a>00176                 tLen = tUcs2Utf8(ulChar, szResult, <span class="keyword">sizeof</span>(szResult));
-<a name="l00177"></a>00177                 <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tLen; tIndex++) {
-<a name="l00178"></a>00178                         vStoreByte((UCHAR)szResult[tIndex], pOutput);
-<a name="l00179"></a>00179                 }
-<a name="l00180"></a>00180         } <span class="keywordflow">else</span> {
-<a name="l00181"></a>00181                 DBG_HEX_C(ulChar &gt; 0xff, ulChar);
-<a name="l00182"></a>00182                 fail(ulChar &gt; 0xff);
-<a name="l00183"></a>00183                 vStoreByte((UCHAR)ulChar, pOutput);
-<a name="l00184"></a>00184                 tLen = 1;
-<a name="l00185"></a>00185         }
-<a name="l00186"></a>00186         pOutput-&gt;lStringWidth += lComputeStringWidth(
-<a name="l00187"></a>00187                                 pOutput-&gt;szStorage + pOutput-&gt;tNextFree - tLen,
-<a name="l00188"></a>00188                                 tLen,
-<a name="l00189"></a>00189                                 pOutput-&gt;tFontRef,
-<a name="l00190"></a>00190                                 pOutput-&gt;usFontSize);
-<a name="l00191"></a>00191 } <span class="comment">/* end of vStoreChar */</span>
-<a name="l00192"></a>00192 
-<a name="l00193"></a>00193 <span class="comment">/*</span>
-<a name="l00194"></a>00194 <span class="comment"> * vStoreCharacter - store one character</span>
-<a name="l00195"></a>00195 <span class="comment"> */</span>
-<a name="l00196"></a>00196 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00197"></a>00197 vStoreCharacter(ULONG ulChar, output_type *pOutput)
-<a name="l00198"></a>00198 {
-<a name="l00199"></a>00199         vStoreChar(ulChar, TRUE, pOutput);
-<a name="l00200"></a>00200 } <span class="comment">/* end of vStoreCharacter */</span>
-<a name="l00201"></a>00201 
-<a name="l00202"></a>00202 <span class="comment">/*</span>
-<a name="l00203"></a>00203 <span class="comment"> * vStoreString - store a string</span>
-<a name="l00204"></a>00204 <span class="comment"> */</span>
-<a name="l00205"></a>00205 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00206"></a>00206 vStoreString(<span class="keyword">const</span> <span class="keywordtype">char</span> *szString, <span class="keywordtype">size_t</span> tStringLength, output_type *pOutput)
-<a name="l00207"></a>00207 {
-<a name="l00208"></a>00208         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00209"></a>00209 
-<a name="l00210"></a>00210         fail(szString == NULL || pOutput == NULL);
-<a name="l00211"></a>00211 
-<a name="l00212"></a>00212         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tStringLength; tIndex++) {
-<a name="l00213"></a>00213                 vStoreCharacter((ULONG)(UCHAR)szString[tIndex], pOutput);
-<a name="l00214"></a>00214         }
-<a name="l00215"></a>00215 } <span class="comment">/* end of vStoreString */</span>
-<a name="l00216"></a>00216 
-<a name="l00217"></a>00217 <span class="comment">/*</span>
-<a name="l00218"></a>00218 <span class="comment"> * vStoreNumberAsDecimal - store a number as a decimal number</span>
-<a name="l00219"></a>00219 <span class="comment"> */</span>
-<a name="l00220"></a>00220 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00221"></a>00221 vStoreNumberAsDecimal(UINT uiNumber, output_type *pOutput)
-<a name="l00222"></a>00222 {
-<a name="l00223"></a>00223         <span class="keywordtype">size_t</span>  tLen;
-<a name="l00224"></a>00224         <span class="keywordtype">char</span>    szString[3 * <span class="keyword">sizeof</span>(UINT) + 1];
-<a name="l00225"></a>00225 
-<a name="l00226"></a>00226         fail(uiNumber == 0);
-<a name="l00227"></a>00227         fail(pOutput == NULL);
-<a name="l00228"></a>00228 
-<a name="l00229"></a>00229         tLen = (size_t)sprintf(szString, <span class="stringliteral">&quot;%u&quot;</span>, uiNumber);
-<a name="l00230"></a>00230         vStoreString(szString, tLen, pOutput);
-<a name="l00231"></a>00231 } <span class="comment">/* end of vStoreNumberAsDecimal */</span>
-<a name="l00232"></a>00232 
-<a name="l00233"></a>00233 <span class="comment">/*</span>
-<a name="l00234"></a>00234 <span class="comment"> * vStoreNumberAsRoman - store a number as a roman numerical</span>
-<a name="l00235"></a>00235 <span class="comment"> */</span>
-<a name="l00236"></a>00236 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00237"></a>00237 vStoreNumberAsRoman(UINT uiNumber, output_type *pOutput)
-<a name="l00238"></a>00238 {
-<a name="l00239"></a>00239         <span class="keywordtype">size_t</span>  tLen;
-<a name="l00240"></a>00240         <span class="keywordtype">char</span>    szString[15];
-<a name="l00241"></a>00241 
-<a name="l00242"></a>00242         fail(uiNumber == 0);
-<a name="l00243"></a>00243         fail(pOutput == NULL);
-<a name="l00244"></a>00244 
-<a name="l00245"></a>00245         tLen = tNumber2Roman(uiNumber, FALSE, szString);
-<a name="l00246"></a>00246         vStoreString(szString, tLen, pOutput);
-<a name="l00247"></a>00247 } <span class="comment">/* end of vStoreNumberAsRoman */</span>
-<a name="l00248"></a>00248 
-<a name="l00249"></a>00249 <span class="comment">/*</span>
-<a name="l00250"></a>00250 <span class="comment"> * vStoreStyle - store a style</span>
-<a name="l00251"></a>00251 <span class="comment"> */</span>
-<a name="l00252"></a>00252 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00253"></a>00253 vStoreStyle(diagram_type *pDiag, output_type *pOutput,
-<a name="l00254"></a>00254         <span class="keyword">const</span> style_block_type *pStyle)
-<a name="l00255"></a>00255 {
-<a name="l00256"></a>00256         <span class="keywordtype">size_t</span>  tLen;
-<a name="l00257"></a>00257         <span class="keywordtype">char</span>    szString[120];
-<a name="l00258"></a>00258 
-<a name="l00259"></a>00259         fail(pDiag == NULL);
-<a name="l00260"></a>00260         fail(pOutput == NULL);
-<a name="l00261"></a>00261         fail(pStyle == NULL);
-<a name="l00262"></a>00262 
-<a name="l00263"></a>00263         <span class="keywordflow">if</span> (tOptions.eConversionType == conversion_xml) {
-<a name="l00264"></a>00264                 vSetHeaders(pDiag, pStyle-&gt;usIstd);
-<a name="l00265"></a>00265         } <span class="keywordflow">else</span> {
-<a name="l00266"></a>00266                 tLen = tStyle2Window(szString, <span class="keyword">sizeof</span>(szString),
-<a name="l00267"></a>00267                                         pStyle, pSection);
-<a name="l00268"></a>00268                 vStoreString(szString, tLen, pOutput);
-<a name="l00269"></a>00269         }
-<a name="l00270"></a>00270 } <span class="comment">/* end of vStoreStyle */</span>
-<a name="l00271"></a>00271 
-<a name="l00272"></a>00272 <span class="comment">/*</span>
-<a name="l00273"></a>00273 <span class="comment"> * vPutIndentation - output the specified amount of indentation</span>
-<a name="l00274"></a>00274 <span class="comment"> */</span>
-<a name="l00275"></a>00275 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00276"></a>00276 vPutIndentation(diagram_type *pDiag, output_type *pOutput,
-<a name="l00277"></a>00277         BOOL bNoMarks, BOOL bFirstLine,
-<a name="l00278"></a>00278         UINT uiListNumber, UCHAR ucNFC, <span class="keyword">const</span> <span class="keywordtype">char</span> *szListChar,
-<a name="l00279"></a>00279         <span class="keywordtype">long</span> lLeftIndentation, <span class="keywordtype">long</span> lLeftIndentation1)
-<a name="l00280"></a>00280 {
-<a name="l00281"></a>00281         <span class="keywordtype">long</span>    lWidth;
-<a name="l00282"></a>00282         <span class="keywordtype">size_t</span>  tIndex, tNextFree;
-<a name="l00283"></a>00283         <span class="keywordtype">char</span>    szLine[30];
-<a name="l00284"></a>00284 
-<a name="l00285"></a>00285         fail(pDiag == NULL);
-<a name="l00286"></a>00286         fail(pOutput == NULL);
-<a name="l00287"></a>00287         fail(szListChar == NULL);
-<a name="l00288"></a>00288         fail(lLeftIndentation &lt; 0);
-<a name="l00289"></a>00289 
-<a name="l00290"></a>00290         <span class="keywordflow">if</span> (tOptions.eConversionType == conversion_xml) {
-<a name="l00291"></a>00291                 <span class="comment">/* XML does its own indentation at rendering time */</span>
-<a name="l00292"></a>00292                 <span class="keywordflow">return</span>;
-<a name="l00293"></a>00293         }
-<a name="l00294"></a>00294 
-<a name="l00295"></a>00295         <span class="keywordflow">if</span> (bNoMarks) {
-<a name="l00296"></a>00296                 <span class="keywordflow">if</span> (bFirstLine) {
-<a name="l00297"></a>00297                         lLeftIndentation += lLeftIndentation1;
-<a name="l00298"></a>00298                 }
-<a name="l00299"></a>00299                 <span class="keywordflow">if</span> (lLeftIndentation &lt; 0) {
-<a name="l00300"></a>00300                         lLeftIndentation = 0;
-<a name="l00301"></a>00301                 }
-<a name="l00302"></a>00302                 vSetLeftIndentation(pDiag, lLeftIndentation);
-<a name="l00303"></a>00303                 <span class="keywordflow">return</span>;
-<a name="l00304"></a>00304         }
-<a name="l00305"></a>00305         <span class="keywordflow">if</span> (lLeftIndentation &lt;= 0) {
-<a name="l00306"></a>00306                 DBG_HEX_C(ucNFC != 0x00, ucNFC);
-<a name="l00307"></a>00307                 vSetLeftIndentation(pDiag, 0);
-<a name="l00308"></a>00308                 <span class="keywordflow">return</span>;
-<a name="l00309"></a>00309         }
-<a name="l00310"></a>00310 
-<a name="l00311"></a>00311 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00312"></a>00312 <span class="preprocessor"></span>        <span class="keywordflow">if</span> (tOptions.eEncoding == encoding_utf_8) {
-<a name="l00313"></a>00313                 fail(strlen(szListChar) &gt; 3);
-<a name="l00314"></a>00314         } <span class="keywordflow">else</span> {
-<a name="l00315"></a>00315                 DBG_HEX_C(iscntrl((<span class="keywordtype">int</span>)szListChar[0]), szListChar[0]);
-<a name="l00316"></a>00316                 fail(iscntrl((<span class="keywordtype">int</span>)szListChar[0]));
-<a name="l00317"></a>00317                 fail(szListChar[1] != <span class="charliteral">&#39;\0&#39;</span>);
-<a name="l00318"></a>00318         }
-<a name="l00319"></a>00319 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00320"></a>00320 
-<a name="l00321"></a>00321         <span class="keywordflow">switch</span> (ucNFC) {
-<a name="l00322"></a>00322         <span class="keywordflow">case</span> LIST_ARABIC_NUM:
-<a name="l00323"></a>00323         <span class="keywordflow">case</span> LIST_NUMBER_TXT:
-<a name="l00324"></a>00324                 tNextFree = (size_t)sprintf(szLine, <span class="stringliteral">&quot;%u&quot;</span>, uiListNumber);
-<a name="l00325"></a>00325                 <span class="keywordflow">break</span>;
-<a name="l00326"></a>00326         <span class="keywordflow">case</span> LIST_UPPER_ROMAN:
-<a name="l00327"></a>00327         <span class="keywordflow">case</span> LIST_LOWER_ROMAN:
-<a name="l00328"></a>00328                 tNextFree = tNumber2Roman(uiListNumber,
-<a name="l00329"></a>00329                                 ucNFC == LIST_UPPER_ROMAN, szLine);
-<a name="l00330"></a>00330                 <span class="keywordflow">break</span>;
-<a name="l00331"></a>00331         <span class="keywordflow">case</span> LIST_UPPER_ALPHA:
-<a name="l00332"></a>00332         <span class="keywordflow">case</span> LIST_LOWER_ALPHA:
-<a name="l00333"></a>00333                 tNextFree = tNumber2Alpha(uiListNumber,
-<a name="l00334"></a>00334                                 ucNFC == LIST_UPPER_ALPHA, szLine);
-<a name="l00335"></a>00335                 <span class="keywordflow">break</span>;
-<a name="l00336"></a>00336         <span class="keywordflow">case</span> LIST_ORDINAL_NUM:
-<a name="l00337"></a>00337         <span class="keywordflow">case</span> LIST_ORDINAL_TXT:
-<a name="l00338"></a>00338                 <span class="keywordflow">if</span> (uiListNumber % 10 == 1 &amp;&amp; uiListNumber != 11) {
-<a name="l00339"></a>00339                         tNextFree =
-<a name="l00340"></a>00340                                 (size_t)sprintf(szLine, <span class="stringliteral">&quot;%ust&quot;</span>, uiListNumber);
-<a name="l00341"></a>00341                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (uiListNumber % 10 == 2 &amp;&amp; uiListNumber != 12) {
-<a name="l00342"></a>00342                         tNextFree =
-<a name="l00343"></a>00343                                 (size_t)sprintf(szLine, <span class="stringliteral">&quot;%und&quot;</span>, uiListNumber);
-<a name="l00344"></a>00344                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (uiListNumber % 10 == 3 &amp;&amp; uiListNumber != 13) {
-<a name="l00345"></a>00345                         tNextFree =
-<a name="l00346"></a>00346                                 (size_t)sprintf(szLine, <span class="stringliteral">&quot;%urd&quot;</span>, uiListNumber);
-<a name="l00347"></a>00347                 } <span class="keywordflow">else</span> {
-<a name="l00348"></a>00348                         tNextFree =
-<a name="l00349"></a>00349                                 (size_t)sprintf(szLine, <span class="stringliteral">&quot;%uth&quot;</span>, uiListNumber);
-<a name="l00350"></a>00350                 }
-<a name="l00351"></a>00351                 <span class="keywordflow">break</span>;
-<a name="l00352"></a>00352         <span class="keywordflow">case</span> LIST_OUTLINE_NUM:
-<a name="l00353"></a>00353                 tNextFree = (size_t)sprintf(szLine, <span class="stringliteral">&quot;%02u&quot;</span>, uiListNumber);
-<a name="l00354"></a>00354                 <span class="keywordflow">break</span>;
-<a name="l00355"></a>00355         <span class="keywordflow">case</span> LIST_SPECIAL:
-<a name="l00356"></a>00356         <span class="keywordflow">case</span> LIST_SPECIAL2:
-<a name="l00357"></a>00357         <span class="keywordflow">case</span> LIST_BULLETS:
-<a name="l00358"></a>00358                 tNextFree = 0;
-<a name="l00359"></a>00359                 <span class="keywordflow">break</span>;
-<a name="l00360"></a>00360         <span class="keywordflow">default</span>:
-<a name="l00361"></a>00361                 DBG_HEX(ucNFC);
-<a name="l00362"></a>00362                 DBG_FIXME();
-<a name="l00363"></a>00363                 tNextFree = (size_t)sprintf(szLine, <span class="stringliteral">&quot;%u&quot;</span>, uiListNumber);
-<a name="l00364"></a>00364                 <span class="keywordflow">break</span>;
-<a name="l00365"></a>00365         }
-<a name="l00366"></a>00366         tNextFree += (size_t)sprintf(szLine + tNextFree, <span class="stringliteral">&quot;%.3s&quot;</span>, szListChar);
-<a name="l00367"></a>00367         szLine[tNextFree++] = <span class="charliteral">&#39; &#39;</span>;
-<a name="l00368"></a>00368         szLine[tNextFree] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00369"></a>00369         lWidth = lComputeStringWidth(szLine, tNextFree,
-<a name="l00370"></a>00370                                 pOutput-&gt;tFontRef, pOutput-&gt;usFontSize);
-<a name="l00371"></a>00371         lLeftIndentation -= lWidth;
-<a name="l00372"></a>00372         <span class="keywordflow">if</span> (lLeftIndentation &lt; 0) {
-<a name="l00373"></a>00373                 lLeftIndentation = 0;
-<a name="l00374"></a>00374         }
-<a name="l00375"></a>00375         vSetLeftIndentation(pDiag, lLeftIndentation);
-<a name="l00376"></a>00376         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tNextFree; tIndex++) {
-<a name="l00377"></a>00377                 vStoreChar((ULONG)(UCHAR)szLine[tIndex], FALSE, pOutput);
-<a name="l00378"></a>00378         }
-<a name="l00379"></a>00379 } <span class="comment">/* end of vPutIndentation */</span>
-<a name="l00380"></a>00380 
-<a name="l00381"></a>00381 <span class="comment">/*</span>
-<a name="l00382"></a>00382 <span class="comment"> * vPutSeparatorLine - output a separator line</span>
-<a name="l00383"></a>00383 <span class="comment"> *</span>
-<a name="l00384"></a>00384 <span class="comment"> * A separator line is a horizontal line two inches long.</span>
-<a name="l00385"></a>00385 <span class="comment"> * Two inches equals 144000 millipoints.</span>
-<a name="l00386"></a>00386 <span class="comment"> */</span>
-<a name="l00387"></a>00387 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00388"></a>00388 vPutSeparatorLine(output_type *pOutput)
-<a name="l00389"></a>00389 {
-<a name="l00390"></a>00390         <span class="keywordtype">long</span>    lCharWidth;
-<a name="l00391"></a>00391         <span class="keywordtype">int</span>     iCounter, iChars;
-<a name="l00392"></a>00392         <span class="keywordtype">char</span>    szOne[2];
-<a name="l00393"></a>00393 
-<a name="l00394"></a>00394         fail(pOutput == NULL);
-<a name="l00395"></a>00395 
-<a name="l00396"></a>00396         szOne[0] = OUR_EM_DASH;
-<a name="l00397"></a>00397         szOne[1] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00398"></a>00398         lCharWidth = lComputeStringWidth(szOne, 1,
-<a name="l00399"></a>00399                                 pOutput-&gt;tFontRef, pOutput-&gt;usFontSize);
-<a name="l00400"></a>00400         NO_DBG_DEC(lCharWidth);
-<a name="l00401"></a>00401         iChars = (int)((144000 + lCharWidth / 2) / lCharWidth);
-<a name="l00402"></a>00402         NO_DBG_DEC(iChars);
-<a name="l00403"></a>00403         <span class="keywordflow">for</span> (iCounter = 0; iCounter &lt; iChars; iCounter++) {
-<a name="l00404"></a>00404                 vStoreCharacter((ULONG)(UCHAR)OUR_EM_DASH, pOutput);
-<a name="l00405"></a>00405         }
-<a name="l00406"></a>00406 } <span class="comment">/* end of vPutSeparatorLine */</span>
-<a name="l00407"></a>00407 
-<a name="l00408"></a>00408 <span class="comment">/*</span>
-<a name="l00409"></a>00409 <span class="comment"> * pStartNextOutput - start the next output record</span>
-<a name="l00410"></a>00410 <span class="comment"> *</span>
-<a name="l00411"></a>00411 <span class="comment"> * returns a pointer to the next record</span>
-<a name="l00412"></a>00412 <span class="comment"> */</span>
-<a name="l00413"></a>00413 <span class="keyword">static</span> output_type *
-<a name="l00414"></a>00414 pStartNextOutput(output_type *pCurrent)
-<a name="l00415"></a>00415 {
-<a name="l00416"></a>00416         output_type     *pNew;
-<a name="l00417"></a>00417 
-<a name="l00418"></a>00418         TRACE_MSG(<span class="stringliteral">&quot;pStartNextOutput&quot;</span>);
-<a name="l00419"></a>00419 
-<a name="l00420"></a>00420         <span class="keywordflow">if</span> (pCurrent-&gt;tNextFree == 0) {
-<a name="l00421"></a>00421                 <span class="comment">/* The current record is empty, re-use */</span>
-<a name="l00422"></a>00422                 fail(pCurrent-&gt;szStorage[0] != <span class="charliteral">&#39;\0&#39;</span>);
-<a name="l00423"></a>00423                 fail(pCurrent-&gt;lStringWidth != 0);
-<a name="l00424"></a>00424                 <span class="keywordflow">return</span> pCurrent;
-<a name="l00425"></a>00425         }
-<a name="l00426"></a>00426         <span class="comment">/* The current record is in use, make a new one */</span>
-<a name="l00427"></a>00427         pNew = xmalloc(<span class="keyword">sizeof</span>(*pNew));
-<a name="l00428"></a>00428         pCurrent-&gt;pNext = pNew;
-<a name="l00429"></a>00429         pNew-&gt;tStorageSize = INITIAL_SIZE;
-<a name="l00430"></a>00430         pNew-&gt;szStorage = xmalloc(pNew-&gt;tStorageSize);
-<a name="l00431"></a>00431         pNew-&gt;szStorage[0] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00432"></a>00432         pNew-&gt;tNextFree = 0;
-<a name="l00433"></a>00433         pNew-&gt;lStringWidth = 0;
-<a name="l00434"></a>00434         pNew-&gt;ucFontColor = FONT_COLOR_DEFAULT;
-<a name="l00435"></a>00435         pNew-&gt;usFontStyle = FONT_REGULAR;
-<a name="l00436"></a>00436         pNew-&gt;tFontRef = (drawfile_fontref)0;
-<a name="l00437"></a>00437         pNew-&gt;usFontSize = DEFAULT_FONT_SIZE;
-<a name="l00438"></a>00438         pNew-&gt;pPrev = pCurrent;
-<a name="l00439"></a>00439         pNew-&gt;pNext = NULL;
-<a name="l00440"></a>00440         <span class="keywordflow">return</span> pNew;
-<a name="l00441"></a>00441 } <span class="comment">/* end of pStartNextOutput */</span>
-<a name="l00442"></a>00442 
-<a name="l00443"></a>00443 <span class="comment">/*</span>
-<a name="l00444"></a>00444 <span class="comment"> * pStartNewOutput</span>
-<a name="l00445"></a>00445 <span class="comment"> */</span>
-<a name="l00446"></a>00446 <span class="keyword">static</span> output_type *
-<a name="l00447"></a>00447 pStartNewOutput(output_type *pAnchor, output_type *pLeftOver)
-<a name="l00448"></a>00448 {
-<a name="l00449"></a>00449         output_type     *pCurr, *pNext;
-<a name="l00450"></a>00450         USHORT          usFontStyle, usFontSize;
-<a name="l00451"></a>00451         drawfile_fontref        tFontRef;
-<a name="l00452"></a>00452         UCHAR           ucFontColor;
-<a name="l00453"></a>00453 
-<a name="l00454"></a>00454         TRACE_MSG(<span class="stringliteral">&quot;pStartNewOutput&quot;</span>);
-<a name="l00455"></a>00455 
-<a name="l00456"></a>00456         ucFontColor = FONT_COLOR_DEFAULT;
-<a name="l00457"></a>00457         usFontStyle = FONT_REGULAR;
-<a name="l00458"></a>00458         tFontRef = (drawfile_fontref)0;
-<a name="l00459"></a>00459         usFontSize = DEFAULT_FONT_SIZE;
-<a name="l00460"></a>00460         <span class="comment">/* Free the old output space */</span>
-<a name="l00461"></a>00461         pCurr = pAnchor;
-<a name="l00462"></a>00462         <span class="keywordflow">while</span> (pCurr != NULL) {
-<a name="l00463"></a>00463                 TRACE_MSG(<span class="stringliteral">&quot;Free the old output space&quot;</span>);
-<a name="l00464"></a>00464                 pNext = pCurr-&gt;pNext;
-<a name="l00465"></a>00465                 pCurr-&gt;szStorage = xfree(pCurr-&gt;szStorage);
-<a name="l00466"></a>00466                 <span class="keywordflow">if</span> (pCurr-&gt;pNext == NULL) {
-<a name="l00467"></a>00467                         ucFontColor = pCurr-&gt;ucFontColor;
-<a name="l00468"></a>00468                         usFontStyle = pCurr-&gt;usFontStyle;
-<a name="l00469"></a>00469                         tFontRef = pCurr-&gt;tFontRef;
-<a name="l00470"></a>00470                         usFontSize = pCurr-&gt;usFontSize;
-<a name="l00471"></a>00471                 }
-<a name="l00472"></a>00472                 pCurr = xfree(pCurr);
-<a name="l00473"></a>00473                 pCurr = pNext;
-<a name="l00474"></a>00474         }
-<a name="l00475"></a>00475         <span class="keywordflow">if</span> (pLeftOver == NULL) {
-<a name="l00476"></a>00476                 <span class="comment">/* Create new output space */</span>
-<a name="l00477"></a>00477                 TRACE_MSG(<span class="stringliteral">&quot;Create new output space&quot;</span>);
-<a name="l00478"></a>00478                 pLeftOver = xmalloc(<span class="keyword">sizeof</span>(*pLeftOver));
-<a name="l00479"></a>00479                 pLeftOver-&gt;tStorageSize = INITIAL_SIZE;
-<a name="l00480"></a>00480                 NO_DBG_DEC(pLeftOver-&gt;tStorageSize);
-<a name="l00481"></a>00481                 TRACE_MSG(<span class="stringliteral">&quot;before 2nd xmalloc&quot;</span>);
-<a name="l00482"></a>00482                 pLeftOver-&gt;szStorage = xmalloc(pLeftOver-&gt;tStorageSize);
-<a name="l00483"></a>00483                 TRACE_MSG(<span class="stringliteral">&quot;after 2nd xmalloc&quot;</span>);
-<a name="l00484"></a>00484                 pLeftOver-&gt;szStorage[0] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00485"></a>00485                 pLeftOver-&gt;tNextFree = 0;
-<a name="l00486"></a>00486                 pLeftOver-&gt;lStringWidth = 0;
-<a name="l00487"></a>00487                 pLeftOver-&gt;ucFontColor = ucFontColor;
-<a name="l00488"></a>00488                 pLeftOver-&gt;usFontStyle = usFontStyle;
-<a name="l00489"></a>00489                 pLeftOver-&gt;tFontRef = tFontRef;
-<a name="l00490"></a>00490                 pLeftOver-&gt;usFontSize = usFontSize;
-<a name="l00491"></a>00491                 pLeftOver-&gt;pPrev = NULL;
-<a name="l00492"></a>00492                 pLeftOver-&gt;pNext = NULL;
-<a name="l00493"></a>00493         }
-<a name="l00494"></a>00494         fail(!bCheckDoubleLinkedList(pLeftOver));
-<a name="l00495"></a>00495         <span class="keywordflow">return</span> pLeftOver;
-<a name="l00496"></a>00496 } <span class="comment">/* end of pStartNewOutput */</span>
-<a name="l00497"></a>00497 
-<a name="l00498"></a>00498 <span class="comment">/*</span>
-<a name="l00499"></a>00499 <span class="comment"> * ulGetChar - get the next character from the specified list</span>
-<a name="l00500"></a>00500 <span class="comment"> *</span>
-<a name="l00501"></a>00501 <span class="comment"> * returns the next character of EOF</span>
-<a name="l00502"></a>00502 <span class="comment"> */</span>
-<a name="l00503"></a>00503 <span class="keyword">static</span> ULONG
-<a name="l00504"></a>00504 ulGetChar(FILE *pFile, list_id_enum eListID)
-<a name="l00505"></a>00505 {
-<a name="l00506"></a>00506         <span class="keyword">const</span> font_block_type   *pCurr;
-<a name="l00507"></a>00507         ULONG           ulChar, ulFileOffset, ulCharPos;
-<a name="l00508"></a>00508         row_info_enum   eRowInfo;
-<a name="l00509"></a>00509         USHORT          usChar, usPropMod;
-<a name="l00510"></a>00510         BOOL            bSkip;
-<a name="l00511"></a>00511 
-<a name="l00512"></a>00512         fail(pFile == NULL);
-<a name="l00513"></a>00513 
-<a name="l00514"></a>00514         pCurr = pFontInfo;
-<a name="l00515"></a>00515         bSkip = FALSE;
-<a name="l00516"></a>00516         <span class="keywordflow">for</span> (;;) {
-<a name="l00517"></a>00517                 usChar = usNextChar(pFile, eListID,
-<a name="l00518"></a>00518                                 &amp;ulFileOffset, &amp;ulCharPos, &amp;usPropMod);
-<a name="l00519"></a>00519                 <span class="keywordflow">if</span> (usChar == (USHORT)EOF) {
-<a name="l00520"></a>00520                         <span class="keywordflow">return</span> (ULONG)EOF;
-<a name="l00521"></a>00521                 }
-<a name="l00522"></a>00522 
-<a name="l00523"></a>00523                 vUpdateCounters();
-<a name="l00524"></a>00524 
-<a name="l00525"></a>00525                 eRowInfo = ePropMod2RowInfo(usPropMod, iWordVersion);
-<a name="l00526"></a>00526                 <span class="keywordflow">if</span> (!bStartRow) {
-<a name="l00527"></a>00527 <span class="preprocessor">#if 0</span>
-<a name="l00528"></a>00528 <span class="preprocessor"></span>                        bStartRow = eRowInfo == found_a_cell ||
-<a name="l00529"></a>00529                                 (pRowInfo != NULL &amp;&amp;
-<a name="l00530"></a>00530                                  ulFileOffset == pRowInfo-&gt;ulFileOffsetStart &amp;&amp;
-<a name="l00531"></a>00531                                  eRowInfo != found_not_a_cell);
-<a name="l00532"></a>00532 <span class="preprocessor">#else</span>
-<a name="l00533"></a>00533 <span class="preprocessor"></span>                        bStartRow = pRowInfo != NULL &amp;&amp;
-<a name="l00534"></a>00534                                 ulFileOffset == pRowInfo-&gt;ulFileOffsetStart;
-<a name="l00535"></a>00535 <span class="preprocessor">#endif</span>
-<a name="l00536"></a>00536 <span class="preprocessor"></span>                        NO_DBG_HEX_C(bStartRow, pRowInfo-&gt;ulFileOffsetStart);
-<a name="l00537"></a>00537                 }
-<a name="l00538"></a>00538                 <span class="keywordflow">if</span> (!bEndRowNorm) {
-<a name="l00539"></a>00539 <span class="preprocessor">#if 0</span>
-<a name="l00540"></a>00540 <span class="preprocessor"></span>                        bEndRow = eRowInfo == found_end_of_row ||
-<a name="l00541"></a>00541                                 (pRowInfo != NULL &amp;&amp;
-<a name="l00542"></a>00542                                  ulFileOffset == pRowInfo-&gt;ulFileOffsetEnd &amp;&amp;
-<a name="l00543"></a>00543                                  eRowInfo != found_not_end_of_row);
-<a name="l00544"></a>00544 <span class="preprocessor">#else</span>
-<a name="l00545"></a>00545 <span class="preprocessor"></span>                        bEndRowNorm = pRowInfo != NULL &amp;&amp;
-<a name="l00546"></a>00546                                 ulFileOffset == pRowInfo-&gt;ulFileOffsetEnd;
-<a name="l00547"></a>00547 <span class="preprocessor">#endif</span>
-<a name="l00548"></a>00548 <span class="preprocessor"></span>                        NO_DBG_HEX_C(bEndRowNorm, pRowInfo-&gt;ulFileOffsetEnd);
-<a name="l00549"></a>00549                 }
-<a name="l00550"></a>00550                 <span class="keywordflow">if</span> (!bEndRowFast) {
-<a name="l00551"></a>00551                         bEndRowFast = eRowInfo == found_end_of_row;
-<a name="l00552"></a>00552                         NO_DBG_HEX_C(bEndRowFast, pRowInfo-&gt;ulFileOffsetEnd);
-<a name="l00553"></a>00553                 }
-<a name="l00554"></a>00554 
-<a name="l00555"></a>00555                 <span class="keywordflow">if</span> (!bStartStyle) {
-<a name="l00556"></a>00556                         bStartStyle = pStyleInfo != NULL &amp;&amp;
-<a name="l00557"></a>00557                                 ulFileOffset == pStyleInfo-&gt;ulFileOffset;
-<a name="l00558"></a>00558                         NO_DBG_HEX_C(bStartStyle, ulFileOffset);
-<a name="l00559"></a>00559                 }
-<a name="l00560"></a>00560                 <span class="keywordflow">if</span> (pCurr != NULL &amp;&amp; ulFileOffset == pCurr-&gt;ulFileOffset) {
-<a name="l00561"></a>00561                         bStartFont = TRUE;
-<a name="l00562"></a>00562                         NO_DBG_HEX(ulFileOffset);
-<a name="l00563"></a>00563                         pFontInfo = pCurr;
-<a name="l00564"></a>00564                         pCurr = pGetNextFontInfoListItem(pCurr);
-<a name="l00565"></a>00565                 }
-<a name="l00566"></a>00566 
-<a name="l00567"></a>00567                 <span class="comment">/* Skip embedded characters */</span>
-<a name="l00568"></a>00568                 <span class="keywordflow">if</span> (usChar == START_EMBEDDED) {
-<a name="l00569"></a>00569                         bSkip = TRUE;
-<a name="l00570"></a>00570                         <span class="keywordflow">continue</span>;
-<a name="l00571"></a>00571                 }
-<a name="l00572"></a>00572                 <span class="keywordflow">if</span> (usChar == END_IGNORE || usChar == END_EMBEDDED) {
-<a name="l00573"></a>00573                         bSkip = FALSE;
-<a name="l00574"></a>00574                         <span class="keywordflow">continue</span>;
-<a name="l00575"></a>00575                 }
-<a name="l00576"></a>00576                 <span class="keywordflow">if</span> (bSkip) {
-<a name="l00577"></a>00577                         <span class="keywordflow">continue</span>;
-<a name="l00578"></a>00578                 }
-<a name="l00579"></a>00579                 ulChar = ulTranslateCharacters(usChar,
-<a name="l00580"></a>00580                                         ulFileOffset,
-<a name="l00581"></a>00581                                         iWordVersion,
-<a name="l00582"></a>00582                                         tOptions.eConversionType,
-<a name="l00583"></a>00583                                         tOptions.eEncoding,
-<a name="l00584"></a>00584                                         bOldMacFile);
-<a name="l00585"></a>00585                 <span class="keywordflow">if</span> (ulChar == IGNORE_CHARACTER) {
-<a name="l00586"></a>00586                         <span class="keywordflow">continue</span>;
-<a name="l00587"></a>00587                 }
-<a name="l00588"></a>00588                 <span class="keywordflow">if</span> (ulChar == PICTURE) {
-<a name="l00589"></a>00589                         ulFileOffsetImage = ulGetPictInfoListItem(ulFileOffset);
-<a name="l00590"></a>00590                 } <span class="keywordflow">else</span> {
-<a name="l00591"></a>00591                         ulFileOffsetImage = FC_INVALID;
-<a name="l00592"></a>00592                 }
-<a name="l00593"></a>00593                 <span class="keywordflow">if</span> (ulChar == PAR_END) {
-<a name="l00594"></a>00594                         <span class="comment">/* End of paragraph seen, prepare for the next */</span>
-<a name="l00595"></a>00595                         vFillStyleFromStylesheet(usIstdNext, &amp;tStyleNext);
-<a name="l00596"></a>00596                         vCorrectStyleValues(&amp;tStyleNext);
-<a name="l00597"></a>00597                         bStartStyleNext = TRUE;
-<a name="l00598"></a>00598                         vFillFontFromStylesheet(usIstdNext, &amp;tFontNext);
-<a name="l00599"></a>00599                         vCorrectFontValues(&amp;tFontNext);
-<a name="l00600"></a>00600                         bStartFontNext = TRUE;
-<a name="l00601"></a>00601                 }
-<a name="l00602"></a>00602                 <span class="keywordflow">if</span> (ulChar == PAGE_BREAK) {
-<a name="l00603"></a>00603                         <span class="comment">/* Might be the start of a new section */</span>
-<a name="l00604"></a>00604                         pSectionNext = pGetSectionInfo(pSection, ulCharPos);
-<a name="l00605"></a>00605                 }
-<a name="l00606"></a>00606                 <span class="keywordflow">return</span> ulChar;
-<a name="l00607"></a>00607         }
-<a name="l00608"></a>00608 } <span class="comment">/* end of ulGetChar */</span>
-<a name="l00609"></a>00609 
-<a name="l00610"></a>00610 <span class="comment">/*</span>
-<a name="l00611"></a>00611 <span class="comment"> * lGetWidthMax - get the maximum line width from the paragraph break value</span>
-<a name="l00612"></a>00612 <span class="comment"> *</span>
-<a name="l00613"></a>00613 <span class="comment"> * Returns the maximum line width in millipoints</span>
-<a name="l00614"></a>00614 <span class="comment"> */</span>
-<a name="l00615"></a>00615 <span class="keyword">static</span> <span class="keywordtype">long</span>
-<a name="l00616"></a>00616 lGetWidthMax(<span class="keywordtype">int</span> iParagraphBreak)
-<a name="l00617"></a>00617 {
-<a name="l00618"></a>00618         fail(iParagraphBreak &lt; 0);
-<a name="l00619"></a>00619 
-<a name="l00620"></a>00620         <span class="keywordflow">if</span> (iParagraphBreak == 0) {
-<a name="l00621"></a>00621                 <span class="keywordflow">return</span> LONG_MAX;
-<a name="l00622"></a>00622         }
-<a name="l00623"></a>00623         <span class="keywordflow">if</span> (iParagraphBreak &lt; MIN_SCREEN_WIDTH) {
-<a name="l00624"></a>00624                 <span class="keywordflow">return</span> lChar2MilliPoints(MIN_SCREEN_WIDTH);
-<a name="l00625"></a>00625         }
-<a name="l00626"></a>00626         <span class="keywordflow">if</span> (iParagraphBreak &gt; MAX_SCREEN_WIDTH) {
-<a name="l00627"></a>00627                 <span class="keywordflow">return</span> lChar2MilliPoints(MAX_SCREEN_WIDTH);
-<a name="l00628"></a>00628         }
-<a name="l00629"></a>00629         <span class="keywordflow">return</span> lChar2MilliPoints(iParagraphBreak);
-<a name="l00630"></a>00630 } <span class="comment">/* end of lGetWidthMax */</span>
-<a name="l00631"></a>00631 
-<a name="l00632"></a>00632 <span class="comment">/*</span>
-<a name="l00633"></a>00633 <span class="comment"> * bWordDecryptor - turn Word to something more useful</span>
-<a name="l00634"></a>00634 <span class="comment"> *</span>
-<a name="l00635"></a>00635 <span class="comment"> * returns TRUE when succesful, otherwise FALSE</span>
-<a name="l00636"></a>00636 <span class="comment"> */</span>
-<a name="l00637"></a>00637 BOOL
-<a name="l00638"></a>00638 bWordDecryptor(FILE *pFile, <span class="keywordtype">long</span> lFilesize, diagram_type *pDiag)
-<a name="l00639"></a>00639 {
-<a name="l00640"></a>00640         imagedata_type  tImage;
-<a name="l00641"></a>00641         <span class="keyword">const</span> style_block_type  *pStyleTmp;
-<a name="l00642"></a>00642         <span class="keyword">const</span> font_block_type   *pFontTmp;
-<a name="l00643"></a>00643         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szListChar;
-<a name="l00644"></a>00644         output_type     *pAnchor, *pOutput, *pLeftOver;
-<a name="l00645"></a>00645         ULONG   ulChar;
-<a name="l00646"></a>00646         <span class="keywordtype">long</span>    lBeforeIndentation, lAfterIndentation;
-<a name="l00647"></a>00647         <span class="keywordtype">long</span>    lLeftIndentation, lLeftIndentation1, lRightIndentation;
-<a name="l00648"></a>00648         <span class="keywordtype">long</span>    lWidthCurr, lWidthMax, lDefaultTabWidth, lHalfSpaceWidth, lTmp;
-<a name="l00649"></a>00649         list_id_enum    eListID;
-<a name="l00650"></a>00650         image_info_enum eRes;
-<a name="l00651"></a>00651         UINT    uiFootnoteNumber, uiEndnoteNumber, uiTmp;
-<a name="l00652"></a>00652         <span class="keywordtype">int</span>     iListSeqNumber;
-<a name="l00653"></a>00653         BOOL    bWasTableRow, bTableFontClosed, bWasEndOfParagraph;
-<a name="l00654"></a>00654         BOOL    bInList, bWasInList, bNoMarks, bFirstLine;
-<a name="l00655"></a>00655         BOOL    bAllCapitals, bHiddenText, bMarkDelText, bSuccess;
-<a name="l00656"></a>00656         USHORT  usListNumber;
-<a name="l00657"></a>00657         USHORT  usFontStyle, usFontStyleMinimal, usFontSize, usTmp;
-<a name="l00658"></a>00658         UCHAR   ucFontNumber, ucFontColor;
-<a name="l00659"></a>00659         UCHAR   ucNFC, ucAlignment;
-<a name="l00660"></a>00660 
-<a name="l00661"></a>00661         fail(pFile == NULL || lFilesize &lt;= 0 || pDiag == NULL);
-<a name="l00662"></a>00662 
-<a name="l00663"></a>00663         TRACE_MSG(<span class="stringliteral">&quot;bWordDecryptor&quot;</span>);
-<a name="l00664"></a>00664 
-<a name="l00665"></a>00665         iWordVersion = iInitDocument(pFile, lFilesize);
-<a name="l00666"></a>00666         <span class="keywordflow">if</span> (iWordVersion &lt; 0) {
-<a name="l00667"></a>00667                 DBG_DEC(iWordVersion);
-<a name="l00668"></a>00668                 <span class="keywordflow">return</span> FALSE;
-<a name="l00669"></a>00669         }
-<a name="l00670"></a>00670 
-<a name="l00671"></a>00671         vGetOptions(&amp;tOptions);
-<a name="l00672"></a>00672         bOldMacFile = bIsOldMacFile();
-<a name="l00673"></a>00673         vPrepareHdrFtrText(pFile);
-<a name="l00674"></a>00674         vPrepareFootnoteText(pFile);
-<a name="l00675"></a>00675 
-<a name="l00676"></a>00676         vPrologue2(pDiag, iWordVersion);
-<a name="l00677"></a>00677 
-<a name="l00678"></a>00678         <span class="comment">/* Initialisation */</span>
-<a name="l00679"></a>00679 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00680"></a>00680 <span class="preprocessor"></span>        ulCharCounter = 0;
-<a name="l00681"></a>00681         iCurrPct = 0;
-<a name="l00682"></a>00682         iPrevPct = -1;
-<a name="l00683"></a>00683         ulDocumentLength = ulGetDocumentLength();
-<a name="l00684"></a>00684 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00685"></a>00685         pSection = pGetSectionInfo(NULL, 0);
-<a name="l00686"></a>00686         pSectionNext = pSection;
-<a name="l00687"></a>00687         lDefaultTabWidth = lGetDefaultTabWidth();
-<a name="l00688"></a>00688         DBG_DEC_C(lDefaultTabWidth != 36000, lDefaultTabWidth);
-<a name="l00689"></a>00689         pRowInfo = pGetNextRowInfoListItem();
-<a name="l00690"></a>00690         DBG_HEX_C(pRowInfo != NULL, pRowInfo-&gt;ulFileOffsetStart);
-<a name="l00691"></a>00691         DBG_HEX_C(pRowInfo != NULL, pRowInfo-&gt;ulFileOffsetEnd);
-<a name="l00692"></a>00692         DBG_MSG_C(pRowInfo == NULL, <span class="stringliteral">&quot;No rows at all&quot;</span>);
-<a name="l00693"></a>00693         bStartRow = FALSE;
-<a name="l00694"></a>00694         bEndRowNorm = FALSE;
-<a name="l00695"></a>00695         bEndRowFast = FALSE;
-<a name="l00696"></a>00696         bIsTableRow = FALSE;
-<a name="l00697"></a>00697         bWasTableRow = FALSE;
-<a name="l00698"></a>00698         vResetStyles();
-<a name="l00699"></a>00699         pStyleInfo = pGetNextTextStyle(NULL);
-<a name="l00700"></a>00700         bStartStyle = FALSE;
-<a name="l00701"></a>00701         bInList = FALSE;
-<a name="l00702"></a>00702         bWasInList = FALSE;
-<a name="l00703"></a>00703         iListSeqNumber = 0;
-<a name="l00704"></a>00704         usIstdNext = ISTD_NORMAL;
-<a name="l00705"></a>00705         pAnchor = NULL;
-<a name="l00706"></a>00706         pFontInfo = pGetNextFontInfoListItem(NULL);
-<a name="l00707"></a>00707         DBG_HEX_C(pFontInfo != NULL, pFontInfo-&gt;ulFileOffset);
-<a name="l00708"></a>00708         DBG_MSG_C(pFontInfo == NULL, <span class="stringliteral">&quot;No fonts at all&quot;</span>);
-<a name="l00709"></a>00709         bStartFont = FALSE;
-<a name="l00710"></a>00710         ucFontNumber = 0;
-<a name="l00711"></a>00711         usFontStyleMinimal = FONT_REGULAR;
-<a name="l00712"></a>00712         usFontStyle = FONT_REGULAR;
-<a name="l00713"></a>00713         usFontSize = DEFAULT_FONT_SIZE;
-<a name="l00714"></a>00714         ucFontColor = FONT_COLOR_DEFAULT;
-<a name="l00715"></a>00715         pAnchor = pStartNewOutput(pAnchor, NULL);
-<a name="l00716"></a>00716         pOutput = pAnchor;
-<a name="l00717"></a>00717         pOutput-&gt;ucFontColor = ucFontColor;
-<a name="l00718"></a>00718         pOutput-&gt;usFontStyle = usFontStyle;
-<a name="l00719"></a>00719         pOutput-&gt;tFontRef = tOpenFont(ucFontNumber, usFontStyle, usFontSize);
-<a name="l00720"></a>00720         pOutput-&gt;usFontSize = usFontSize;
-<a name="l00721"></a>00721         bTableFontClosed = TRUE;
-<a name="l00722"></a>00722         lBeforeIndentation = 0;
-<a name="l00723"></a>00723         lAfterIndentation = 0;
-<a name="l00724"></a>00724         lLeftIndentation = 0;
-<a name="l00725"></a>00725         lLeftIndentation1 = 0;
-<a name="l00726"></a>00726         lRightIndentation = 0;
-<a name="l00727"></a>00727         bWasEndOfParagraph = TRUE;
-<a name="l00728"></a>00728         bNoMarks = TRUE;
-<a name="l00729"></a>00729         bFirstLine = TRUE;
-<a name="l00730"></a>00730         ucNFC = LIST_BULLETS;
-<a name="l00731"></a>00731         <span class="keywordflow">if</span> (pStyleInfo != NULL) {
-<a name="l00732"></a>00732                 szListChar = pStyleInfo-&gt;szListChar;
-<a name="l00733"></a>00733                 pStyleTmp = pStyleInfo;
-<a name="l00734"></a>00734         } <span class="keywordflow">else</span> {
-<a name="l00735"></a>00735                 <span class="keywordflow">if</span> (tStyleNext.szListChar[0] == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00736"></a>00736                         vGetBulletValue(tOptions.eConversionType,
-<a name="l00737"></a>00737                                 tOptions.eEncoding, tStyleNext.szListChar, 4);
-<a name="l00738"></a>00738                 }
-<a name="l00739"></a>00739                 szListChar = tStyleNext.szListChar;
-<a name="l00740"></a>00740                 pStyleTmp = &amp;tStyleNext;
-<a name="l00741"></a>00741         }
-<a name="l00742"></a>00742         usListNumber = 0;
-<a name="l00743"></a>00743         ucAlignment = ALIGNMENT_LEFT;
-<a name="l00744"></a>00744         bAllCapitals = FALSE;
-<a name="l00745"></a>00745         bHiddenText = FALSE;
-<a name="l00746"></a>00746         bMarkDelText = FALSE;
-<a name="l00747"></a>00747         lWidthMax = lGetWidthMax(tOptions.iParagraphBreak);
-<a name="l00748"></a>00748         NO_DBG_DEC(lWidthMax);
-<a name="l00749"></a>00749 
-<a name="l00750"></a>00750         Hourglass_On();
-<a name="l00751"></a>00751 
-<a name="l00752"></a>00752         uiFootnoteNumber = 0;
-<a name="l00753"></a>00753         uiEndnoteNumber = 0;
-<a name="l00754"></a>00754         eListID = text_list;
-<a name="l00755"></a>00755         <span class="keywordflow">for</span>(;;) {
-<a name="l00756"></a>00756                 ulChar = ulGetChar(pFile, eListID);
-<a name="l00757"></a>00757                 <span class="keywordflow">if</span> (ulChar == (ULONG)EOF) {
-<a name="l00758"></a>00758                         <span class="keywordflow">if</span> (bOutputContainsText(pAnchor)) {
-<a name="l00759"></a>00759                                 OUTPUT_LINE();
-<a name="l00760"></a>00760                         } <span class="keywordflow">else</span> {
-<a name="l00761"></a>00761                                 RESET_LINE();
-<a name="l00762"></a>00762                         }
-<a name="l00763"></a>00763                         <span class="keywordflow">switch</span> (eListID) {
-<a name="l00764"></a>00764                         <span class="keywordflow">case</span> text_list:
-<a name="l00765"></a>00765                                 <span class="keywordflow">if</span> (tOptions.eConversionType !=
-<a name="l00766"></a>00766                                                         conversion_xml) {
-<a name="l00767"></a>00767                                         eListID = footnote_list;
-<a name="l00768"></a>00768                                         <span class="keywordflow">if</span> (uiFootnoteNumber != 0) {
-<a name="l00769"></a>00769                                                 vPutSeparatorLine(pAnchor);
-<a name="l00770"></a>00770                                                 OUTPUT_LINE();
-<a name="l00771"></a>00771                                                 uiFootnoteNumber = 0;
-<a name="l00772"></a>00772                                         }
-<a name="l00773"></a>00773                                         <span class="keywordflow">break</span>;
-<a name="l00774"></a>00774                                 }
-<a name="l00775"></a>00775                                 <span class="comment">/* No break or return */</span>
-<a name="l00776"></a>00776                         <span class="keywordflow">case</span> footnote_list:
-<a name="l00777"></a>00777                                 eListID = endnote_list;
-<a name="l00778"></a>00778                                 <span class="keywordflow">if</span> (uiEndnoteNumber != 0) {
-<a name="l00779"></a>00779                                         vPutSeparatorLine(pAnchor);
-<a name="l00780"></a>00780                                         OUTPUT_LINE();
-<a name="l00781"></a>00781                                         uiEndnoteNumber = 0;
-<a name="l00782"></a>00782                                 }
-<a name="l00783"></a>00783                                 <span class="keywordflow">break</span>;
-<a name="l00784"></a>00784                         <span class="keywordflow">case</span> endnote_list:
-<a name="l00785"></a>00785                                 eListID = textbox_list;
-<a name="l00786"></a>00786                                 <span class="keywordflow">if</span> (bExistsTextBox()) {
-<a name="l00787"></a>00787                                         vPutSeparatorLine(pAnchor);
-<a name="l00788"></a>00788                                         OUTPUT_LINE();
-<a name="l00789"></a>00789                                 }
-<a name="l00790"></a>00790                                 <span class="keywordflow">break</span>;
-<a name="l00791"></a>00791                         <span class="keywordflow">case</span> textbox_list:
-<a name="l00792"></a>00792                                 eListID = hdrtextbox_list;
-<a name="l00793"></a>00793                                 <span class="keywordflow">if</span> (bExistsHdrTextBox()) {
-<a name="l00794"></a>00794                                         vPutSeparatorLine(pAnchor);
-<a name="l00795"></a>00795                                         OUTPUT_LINE();
-<a name="l00796"></a>00796                                 }
-<a name="l00797"></a>00797                                 <span class="keywordflow">break</span>;
-<a name="l00798"></a>00798                         <span class="keywordflow">case</span> hdrtextbox_list:
-<a name="l00799"></a>00799                         <span class="keywordflow">default</span>:
-<a name="l00800"></a>00800                                 eListID = end_of_lists;
-<a name="l00801"></a>00801                                 <span class="keywordflow">break</span>;
-<a name="l00802"></a>00802                         }
-<a name="l00803"></a>00803                         <span class="keywordflow">if</span> (eListID == end_of_lists) {
-<a name="l00804"></a>00804                                 <span class="keywordflow">break</span>;
-<a name="l00805"></a>00805                         }
-<a name="l00806"></a>00806                         <span class="keywordflow">continue</span>;
-<a name="l00807"></a>00807                 }
-<a name="l00808"></a>00808 
-<a name="l00809"></a>00809                 <span class="keywordflow">if</span> (ulChar == UNKNOWN_NOTE_CHAR) {
-<a name="l00810"></a>00810                         <span class="keywordflow">switch</span> (eListID) {
-<a name="l00811"></a>00811                         <span class="keywordflow">case</span> footnote_list:
-<a name="l00812"></a>00812                                 ulChar = FOOTNOTE_CHAR;
-<a name="l00813"></a>00813                                 <span class="keywordflow">break</span>;
-<a name="l00814"></a>00814                         <span class="keywordflow">case</span> endnote_list:
-<a name="l00815"></a>00815                                 ulChar = ENDNOTE_CHAR;
-<a name="l00816"></a>00816                                 <span class="keywordflow">break</span>;
-<a name="l00817"></a>00817                         <span class="keywordflow">default</span>:
-<a name="l00818"></a>00818                                 <span class="keywordflow">break</span>;
-<a name="l00819"></a>00819                         }
-<a name="l00820"></a>00820                 }
-<a name="l00821"></a>00821 
-<a name="l00822"></a>00822                 <span class="keywordflow">if</span> (bStartRow) {
-<a name="l00823"></a>00823                         <span class="comment">/* Begin of a tablerow found */</span>
-<a name="l00824"></a>00824                         <span class="keywordflow">if</span> (bOutputContainsText(pAnchor)) {
-<a name="l00825"></a>00825                                 OUTPUT_LINE();
-<a name="l00826"></a>00826                         } <span class="keywordflow">else</span> {
-<a name="l00827"></a>00827                                 RESET_LINE();
-<a name="l00828"></a>00828                         }
-<a name="l00829"></a>00829                         fail(pAnchor != pOutput);
-<a name="l00830"></a>00830                         <span class="keywordflow">if</span> (bTableFontClosed) {
-<a name="l00831"></a>00831                                 <span class="comment">/* Start special table font */</span>
-<a name="l00832"></a>00832                                 vCloseFont();
-<a name="l00833"></a>00833                                 <span class="comment">/*</span>
-<a name="l00834"></a>00834 <span class="comment">                                 * Compensate for the fact that Word uses</span>
-<a name="l00835"></a>00835 <span class="comment">                                 * proportional fonts for its tables and we</span>
-<a name="l00836"></a>00836 <span class="comment">                                 * only one fixed-width font</span>
-<a name="l00837"></a>00837 <span class="comment">                                 */</span>
-<a name="l00838"></a>00838                                 uiTmp = ((UINT)usFontSize * 5 + 3) / 6;
-<a name="l00839"></a>00839                                 <span class="keywordflow">if</span> (uiTmp &lt; MIN_TABLEFONT_SIZE) {
-<a name="l00840"></a>00840                                         uiTmp = MIN_TABLEFONT_SIZE;
-<a name="l00841"></a>00841                                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (uiTmp &gt; MAX_TABLEFONT_SIZE) {
-<a name="l00842"></a>00842                                         uiTmp = MAX_TABLEFONT_SIZE;
-<a name="l00843"></a>00843                                 }
-<a name="l00844"></a>00844                                 pOutput-&gt;usFontSize = (USHORT)uiTmp;
-<a name="l00845"></a>00845                                 pOutput-&gt;tFontRef =
-<a name="l00846"></a>00846                                         tOpenTableFont(pOutput-&gt;usFontSize);
-<a name="l00847"></a>00847                                 pOutput-&gt;usFontStyle = FONT_REGULAR;
-<a name="l00848"></a>00848                                 pOutput-&gt;ucFontColor = FONT_COLOR_BLACK;
-<a name="l00849"></a>00849                                 bTableFontClosed = FALSE;
-<a name="l00850"></a>00850                         }
-<a name="l00851"></a>00851                         bIsTableRow = TRUE;
-<a name="l00852"></a>00852                         bStartRow = FALSE;
-<a name="l00853"></a>00853                 }
-<a name="l00854"></a>00854 
-<a name="l00855"></a>00855                 <span class="keywordflow">if</span> (bWasTableRow &amp;&amp;
-<a name="l00856"></a>00856                     !bIsTableRow &amp;&amp;
-<a name="l00857"></a>00857                     ulChar != PAR_END &amp;&amp;
-<a name="l00858"></a>00858                     ulChar != HARD_RETURN &amp;&amp;
-<a name="l00859"></a>00859                     ulChar != PAGE_BREAK &amp;&amp;
-<a name="l00860"></a>00860                     ulChar != COLUMN_FEED) {
-<a name="l00861"></a>00861                         <span class="comment">/*</span>
-<a name="l00862"></a>00862 <span class="comment">                         * The end of a table should be followed by an</span>
-<a name="l00863"></a>00863 <span class="comment">                         * empty line, like the end of a paragraph</span>
-<a name="l00864"></a>00864 <span class="comment">                         */</span>
-<a name="l00865"></a>00865                         OUTPUT_LINE();
-<a name="l00866"></a>00866                         vEndOfParagraph(pDiag,
-<a name="l00867"></a>00867                                         pOutput-&gt;tFontRef,
-<a name="l00868"></a>00868                                         pOutput-&gt;usFontSize,
-<a name="l00869"></a>00869                                         (<span class="keywordtype">long</span>)pOutput-&gt;usFontSize * 600);
-<a name="l00870"></a>00870                 }
-<a name="l00871"></a>00871 
-<a name="l00872"></a>00872                 <span class="keywordflow">switch</span> (ulChar) {
-<a name="l00873"></a>00873                 <span class="keywordflow">case</span> PAGE_BREAK:
-<a name="l00874"></a>00874                 <span class="keywordflow">case</span> COLUMN_FEED:
-<a name="l00875"></a>00875                         <span class="keywordflow">if</span> (bIsTableRow) {
-<a name="l00876"></a>00876                                 <span class="comment">/* Ignore when in a table */</span>
-<a name="l00877"></a>00877                                 <span class="keywordflow">break</span>;
-<a name="l00878"></a>00878                         }
-<a name="l00879"></a>00879                         <span class="keywordflow">if</span> (bOutputContainsText(pAnchor)) {
-<a name="l00880"></a>00880                                 OUTPUT_LINE();
-<a name="l00881"></a>00881                         } <span class="keywordflow">else</span> {
-<a name="l00882"></a>00882                                 RESET_LINE();
-<a name="l00883"></a>00883                         }
-<a name="l00884"></a>00884                         <span class="keywordflow">if</span> (ulChar == PAGE_BREAK) {
-<a name="l00885"></a>00885                                 vEndOfPage(pDiag, lAfterIndentation,
-<a name="l00886"></a>00886                                                 pSection != pSectionNext);
-<a name="l00887"></a>00887                         } <span class="keywordflow">else</span> {
-<a name="l00888"></a>00888                                 vEndOfParagraph(pDiag,
-<a name="l00889"></a>00889                                         pOutput-&gt;tFontRef,
-<a name="l00890"></a>00890                                         pOutput-&gt;usFontSize,
-<a name="l00891"></a>00891                                         lAfterIndentation);
-<a name="l00892"></a>00892                         }
-<a name="l00893"></a>00893                         <span class="keywordflow">break</span>;
-<a name="l00894"></a>00894                 <span class="keywordflow">default</span>:
-<a name="l00895"></a>00895                         <span class="keywordflow">break</span>;
-<a name="l00896"></a>00896                 }
-<a name="l00897"></a>00897 
-<a name="l00898"></a>00898                 <span class="keywordflow">if</span> (bStartFont || (bStartFontNext &amp;&amp; ulChar != PAR_END)) {
-<a name="l00899"></a>00899                         <span class="comment">/* Begin of a font found */</span>
-<a name="l00900"></a>00900                         <span class="keywordflow">if</span> (bStartFont) {
-<a name="l00901"></a>00901                                 <span class="comment">/* bStartFont takes priority */</span>
-<a name="l00902"></a>00902                                 fail(pFontInfo == NULL);
-<a name="l00903"></a>00903                                 pFontTmp = pFontInfo;
-<a name="l00904"></a>00904                         } <span class="keywordflow">else</span> {
-<a name="l00905"></a>00905                                 pFontTmp = &amp;tFontNext;
-<a name="l00906"></a>00906                         }
-<a name="l00907"></a>00907                         bAllCapitals = bIsCapitals(pFontTmp-&gt;usFontStyle);
-<a name="l00908"></a>00908                         bHiddenText = bIsHidden(pFontTmp-&gt;usFontStyle);
-<a name="l00909"></a>00909                         bMarkDelText = bIsMarkDel(pFontTmp-&gt;usFontStyle);
-<a name="l00910"></a>00910                         usTmp = pFontTmp-&gt;usFontStyle &amp;
-<a name="l00911"></a>00911                                 (FONT_BOLD|FONT_ITALIC|FONT_UNDERLINE|
-<a name="l00912"></a>00912                                  FONT_STRIKE|FONT_MARKDEL|
-<a name="l00913"></a>00913                                  FONT_SUPERSCRIPT|FONT_SUBSCRIPT);
-<a name="l00914"></a>00914                         <span class="keywordflow">if</span> (!bIsTableRow &amp;&amp;
-<a name="l00915"></a>00915                             (usFontSize != pFontTmp-&gt;usFontSize ||
-<a name="l00916"></a>00916                              ucFontNumber != pFontTmp-&gt;ucFontNumber ||
-<a name="l00917"></a>00917                              usFontStyleMinimal != usTmp ||
-<a name="l00918"></a>00918                              ucFontColor != pFontTmp-&gt;ucFontColor)) {
-<a name="l00919"></a>00919                                 pOutput = pStartNextOutput(pOutput);
-<a name="l00920"></a>00920                                 vCloseFont();
-<a name="l00921"></a>00921                                 pOutput-&gt;ucFontColor = pFontTmp-&gt;ucFontColor;
-<a name="l00922"></a>00922                                 pOutput-&gt;usFontStyle = pFontTmp-&gt;usFontStyle;
-<a name="l00923"></a>00923                                 pOutput-&gt;usFontSize = pFontTmp-&gt;usFontSize;
-<a name="l00924"></a>00924                                 pOutput-&gt;tFontRef = tOpenFont(
-<a name="l00925"></a>00925                                                 pFontTmp-&gt;ucFontNumber,
-<a name="l00926"></a>00926                                                 pFontTmp-&gt;usFontStyle,
-<a name="l00927"></a>00927                                                 pFontTmp-&gt;usFontSize);
-<a name="l00928"></a>00928                                 fail(!bCheckDoubleLinkedList(pAnchor));
-<a name="l00929"></a>00929                         }
-<a name="l00930"></a>00930                         ucFontNumber = pFontTmp-&gt;ucFontNumber;
-<a name="l00931"></a>00931                         usFontSize = pFontTmp-&gt;usFontSize;
-<a name="l00932"></a>00932                         ucFontColor = pFontTmp-&gt;ucFontColor;
-<a name="l00933"></a>00933                         usFontStyle = pFontTmp-&gt;usFontStyle;
-<a name="l00934"></a>00934                         usFontStyleMinimal = usTmp;
-<a name="l00935"></a>00935                         <span class="keywordflow">if</span> (bStartFont) {
-<a name="l00936"></a>00936                                 <span class="comment">/* Get the next font info */</span>
-<a name="l00937"></a>00937                                 pFontInfo = pGetNextFontInfoListItem(pFontInfo);
-<a name="l00938"></a>00938                                 NO_DBG_HEX_C(pFontInfo != NULL,
-<a name="l00939"></a>00939                                                 pFontInfo-&gt;ulFileOffset);
-<a name="l00940"></a>00940                                 DBG_MSG_C(pFontInfo == NULL, <span class="stringliteral">&quot;No more fonts&quot;</span>);
-<a name="l00941"></a>00941                         }
-<a name="l00942"></a>00942                         bStartFont = FALSE;
-<a name="l00943"></a>00943                         bStartFontNext = FALSE;
-<a name="l00944"></a>00944                 }
-<a name="l00945"></a>00945 
-<a name="l00946"></a>00946                 <span class="keywordflow">if</span> (bStartStyle || (bStartStyleNext &amp;&amp; ulChar != PAR_END)) {
-<a name="l00947"></a>00947                         bFirstLine = TRUE;
-<a name="l00948"></a>00948                         <span class="comment">/* Begin of a style found */</span>
-<a name="l00949"></a>00949                         <span class="keywordflow">if</span> (bStartStyle) {
-<a name="l00950"></a>00950                                 <span class="comment">/* bStartStyle takes priority */</span>
-<a name="l00951"></a>00951                                 fail(pStyleInfo == NULL);
-<a name="l00952"></a>00952                                 pStyleTmp = pStyleInfo;
-<a name="l00953"></a>00953                         } <span class="keywordflow">else</span> {
-<a name="l00954"></a>00954                                 pStyleTmp = &amp;tStyleNext;
-<a name="l00955"></a>00955                         }
-<a name="l00956"></a>00956                         <span class="keywordflow">if</span> (!bIsTableRow) {
-<a name="l00957"></a>00957                                 vStoreStyle(pDiag, pOutput, pStyleTmp);
-<a name="l00958"></a>00958                         }
-<a name="l00959"></a>00959                         usIstdNext = pStyleTmp-&gt;usIstdNext;
-<a name="l00960"></a>00960                         lBeforeIndentation =
-<a name="l00961"></a>00961                                 lTwips2MilliPoints(pStyleTmp-&gt;usBeforeIndent);
-<a name="l00962"></a>00962                         lAfterIndentation =
-<a name="l00963"></a>00963                                 lTwips2MilliPoints(pStyleTmp-&gt;usAfterIndent);
-<a name="l00964"></a>00964                         lLeftIndentation =
-<a name="l00965"></a>00965                                 lTwips2MilliPoints(pStyleTmp-&gt;sLeftIndent);
-<a name="l00966"></a>00966                         lLeftIndentation1 =
-<a name="l00967"></a>00967                                 lTwips2MilliPoints(pStyleTmp-&gt;sLeftIndent1);
-<a name="l00968"></a>00968                         lRightIndentation =
-<a name="l00969"></a>00969                                 lTwips2MilliPoints(pStyleTmp-&gt;sRightIndent);
-<a name="l00970"></a>00970                         bInList = bStyleImpliesList(pStyleTmp, iWordVersion);
-<a name="l00971"></a>00971                         bNoMarks = !bInList || pStyleTmp-&gt;bNumPause;
-<a name="l00972"></a>00972                         ucNFC = pStyleTmp-&gt;ucNFC;
-<a name="l00973"></a>00973                         szListChar = pStyleTmp-&gt;szListChar;
-<a name="l00974"></a>00974                         ucAlignment = pStyleTmp-&gt;ucAlignment;
-<a name="l00975"></a>00975                         <span class="keywordflow">if</span> (bInList &amp;&amp; !bWasInList) {
-<a name="l00976"></a>00976                                 <span class="comment">/* Start of a list */</span>
-<a name="l00977"></a>00977                                 iListSeqNumber++;
-<a name="l00978"></a>00978                                 vStartOfList(pDiag, ucNFC,
-<a name="l00979"></a>00979                                                 bWasTableRow &amp;&amp; !bIsTableRow);
-<a name="l00980"></a>00980                         }
-<a name="l00981"></a>00981                         <span class="keywordflow">if</span> (!bInList &amp;&amp; bWasInList) {
-<a name="l00982"></a>00982                                 <span class="comment">/* End of a list */</span>
-<a name="l00983"></a>00983                                 vEndOfList(pDiag);
-<a name="l00984"></a>00984                         }
-<a name="l00985"></a>00985                         bWasInList = bInList;
-<a name="l00986"></a>00986                         <span class="keywordflow">if</span> (bStartStyle) {
-<a name="l00987"></a>00987                                 pStyleInfo = pGetNextTextStyle(pStyleInfo);
-<a name="l00988"></a>00988                                 NO_DBG_HEX_C(pStyleInfo != NULL,
-<a name="l00989"></a>00989                                                 pStyleInfo-&gt;ulFileOffset);
-<a name="l00990"></a>00990                                 DBG_MSG_C(pStyleInfo == NULL,
-<a name="l00991"></a>00991                                                 <span class="stringliteral">&quot;No more styles&quot;</span>);
-<a name="l00992"></a>00992                         }
-<a name="l00993"></a>00993                         bStartStyle = FALSE;
-<a name="l00994"></a>00994                         bStartStyleNext = FALSE;
-<a name="l00995"></a>00995                 }
-<a name="l00996"></a>00996 
-<a name="l00997"></a>00997                 <span class="keywordflow">if</span> (bWasEndOfParagraph) {
-<a name="l00998"></a>00998                         vStartOfParagraph1(pDiag, lBeforeIndentation);
-<a name="l00999"></a>00999                 }
-<a name="l01000"></a>01000 
-<a name="l01001"></a>01001                 <span class="keywordflow">if</span> (!bIsTableRow &amp;&amp;
-<a name="l01002"></a>01002                     lTotalStringWidth(pAnchor) == 0) {
-<a name="l01003"></a>01003                         <span class="keywordflow">if</span> (!bNoMarks) {
-<a name="l01004"></a>01004                                 usListNumber = usGetListValue(iListSeqNumber,
-<a name="l01005"></a>01005                                                         iWordVersion,
-<a name="l01006"></a>01006                                                         pStyleTmp);
-<a name="l01007"></a>01007                         }
-<a name="l01008"></a>01008                         <span class="keywordflow">if</span> (bInList &amp;&amp; bFirstLine) {
-<a name="l01009"></a>01009                                 vStartOfListItem(pDiag, bNoMarks);
-<a name="l01010"></a>01010                         }
-<a name="l01011"></a>01011                         vPutIndentation(pDiag, pAnchor, bNoMarks, bFirstLine,
-<a name="l01012"></a>01012                                         usListNumber, ucNFC, szListChar,
-<a name="l01013"></a>01013                                         lLeftIndentation, lLeftIndentation1);
-<a name="l01014"></a>01014                         bFirstLine = FALSE;
-<a name="l01015"></a>01015                         <span class="comment">/* One number or mark per paragraph will do */</span>
-<a name="l01016"></a>01016                         bNoMarks = TRUE;
-<a name="l01017"></a>01017                 }
-<a name="l01018"></a>01018 
-<a name="l01019"></a>01019                 <span class="keywordflow">if</span> (bWasEndOfParagraph) {
-<a name="l01020"></a>01020                         vStartOfParagraph2(pDiag);
-<a name="l01021"></a>01021                         bWasEndOfParagraph = FALSE;
-<a name="l01022"></a>01022                 }
-<a name="l01023"></a>01023 
-<a name="l01024"></a>01024                 <span class="keywordflow">switch</span> (ulChar) {
-<a name="l01025"></a>01025                 <span class="keywordflow">case</span> PICTURE:
-<a name="l01026"></a>01026                         (void)memset(&amp;tImage, 0, <span class="keyword">sizeof</span>(tImage));
-<a name="l01027"></a>01027                         eRes = eExamineImage(pFile, ulFileOffsetImage, &amp;tImage);
-<a name="l01028"></a>01028                         <span class="keywordflow">switch</span> (eRes) {
-<a name="l01029"></a>01029                         <span class="keywordflow">case</span> image_no_information:
-<a name="l01030"></a>01030                                 bSuccess = FALSE;
-<a name="l01031"></a>01031                                 <span class="keywordflow">break</span>;
-<a name="l01032"></a>01032                         <span class="keywordflow">case</span> image_minimal_information:
-<a name="l01033"></a>01033                         <span class="keywordflow">case</span> image_full_information:
-<a name="l01034"></a>01034 <span class="preprocessor">#if 0</span>
-<a name="l01035"></a>01035 <span class="preprocessor"></span>                                <span class="keywordflow">if</span> (bOutputContainsText(pAnchor)) {
-<a name="l01036"></a>01036                                         OUTPUT_LINE();
-<a name="l01037"></a>01037                                 } <span class="keywordflow">else</span> {
-<a name="l01038"></a>01038                                         RESET_LINE();
-<a name="l01039"></a>01039                                 }
-<a name="l01040"></a>01040 <span class="preprocessor">#endif</span>
-<a name="l01041"></a>01041 <span class="preprocessor"></span>                                bSuccess = bTranslateImage(pDiag, pFile,
-<a name="l01042"></a>01042                                         eRes == image_minimal_information,
-<a name="l01043"></a>01043                                         ulFileOffsetImage, &amp;tImage);
-<a name="l01044"></a>01044                                 <span class="keywordflow">break</span>;
-<a name="l01045"></a>01045                         <span class="keywordflow">default</span>:
-<a name="l01046"></a>01046                                 DBG_DEC(eRes);
-<a name="l01047"></a>01047                                 bSuccess = FALSE;
-<a name="l01048"></a>01048                                 <span class="keywordflow">break</span>;
-<a name="l01049"></a>01049                         }
-<a name="l01050"></a>01050                         <span class="keywordflow">if</span> (!bSuccess) {
-<a name="l01051"></a>01051                                 vStoreString(<span class="stringliteral">&quot;[pic]&quot;</span>, 5, pOutput);
-<a name="l01052"></a>01052                         }
-<a name="l01053"></a>01053                         <span class="keywordflow">break</span>;
-<a name="l01054"></a>01054                 <span class="keywordflow">case</span> FOOTNOTE_CHAR:
-<a name="l01055"></a>01055                         uiFootnoteNumber++;
-<a name="l01056"></a>01056                         <span class="keywordflow">if</span> (tOptions.eConversionType == conversion_xml) {
-<a name="l01057"></a>01057                                 vStoreCharacter((ULONG)FOOTNOTE_OR_ENDNOTE,
-<a name="l01058"></a>01058                                                                 pOutput);
-<a name="l01059"></a>01059                                 <span class="keywordflow">break</span>;
-<a name="l01060"></a>01060                         }
-<a name="l01061"></a>01061                         vStoreCharacter((ULONG)<span class="charliteral">&#39;[&#39;</span>, pOutput);
-<a name="l01062"></a>01062                         vStoreNumberAsDecimal(uiFootnoteNumber, pOutput);
-<a name="l01063"></a>01063                         vStoreCharacter((ULONG)<span class="charliteral">&#39;]&#39;</span>, pOutput);
-<a name="l01064"></a>01064                         <span class="keywordflow">break</span>;
-<a name="l01065"></a>01065                 <span class="keywordflow">case</span> ENDNOTE_CHAR:
-<a name="l01066"></a>01066                         uiEndnoteNumber++;
-<a name="l01067"></a>01067                         vStoreCharacter((ULONG)<span class="charliteral">&#39;[&#39;</span>, pOutput);
-<a name="l01068"></a>01068                         vStoreNumberAsRoman(uiEndnoteNumber, pOutput);
-<a name="l01069"></a>01069                         vStoreCharacter((ULONG)<span class="charliteral">&#39;]&#39;</span>, pOutput);
-<a name="l01070"></a>01070                         <span class="keywordflow">break</span>;
-<a name="l01071"></a>01071                 <span class="keywordflow">case</span> UNKNOWN_NOTE_CHAR:
-<a name="l01072"></a>01072                         vStoreString(<span class="stringliteral">&quot;[?]&quot;</span>, 3, pOutput);
-<a name="l01073"></a>01073                         <span class="keywordflow">break</span>;
-<a name="l01074"></a>01074                 <span class="keywordflow">case</span> PAR_END:
-<a name="l01075"></a>01075                         <span class="keywordflow">if</span> (bIsTableRow) {
-<a name="l01076"></a>01076                                 vStoreCharacter((ULONG)<span class="charliteral">&#39;\n&#39;</span>, pOutput);
-<a name="l01077"></a>01077                                 <span class="keywordflow">break</span>;
-<a name="l01078"></a>01078                         }
-<a name="l01079"></a>01079                         <span class="keywordflow">if</span> (bOutputContainsText(pAnchor)) {
-<a name="l01080"></a>01080                                 OUTPUT_LINE();
-<a name="l01081"></a>01081                         } <span class="keywordflow">else</span> {
-<a name="l01082"></a>01082                                 vMove2NextLine(pDiag,
-<a name="l01083"></a>01083                                         pOutput-&gt;tFontRef, pOutput-&gt;usFontSize);
-<a name="l01084"></a>01084                                 RESET_LINE();
-<a name="l01085"></a>01085                         }
-<a name="l01086"></a>01086                         vEndOfParagraph(pDiag,
-<a name="l01087"></a>01087                                         pOutput-&gt;tFontRef,
-<a name="l01088"></a>01088                                         pOutput-&gt;usFontSize,
-<a name="l01089"></a>01089                                         lAfterIndentation);
-<a name="l01090"></a>01090                         bWasEndOfParagraph = TRUE;
-<a name="l01091"></a>01091                         <span class="keywordflow">break</span>;
-<a name="l01092"></a>01092                 <span class="keywordflow">case</span> HARD_RETURN:
-<a name="l01093"></a>01093                         <span class="keywordflow">if</span> (bIsTableRow) {
-<a name="l01094"></a>01094                                 vStoreCharacter((ULONG)<span class="charliteral">&#39;\n&#39;</span>, pOutput);
-<a name="l01095"></a>01095                                 <span class="keywordflow">break</span>;
-<a name="l01096"></a>01096                         }
-<a name="l01097"></a>01097                         <span class="keywordflow">if</span> (bOutputContainsText(pAnchor)) {
-<a name="l01098"></a>01098                                 OUTPUT_LINE();
-<a name="l01099"></a>01099                         } <span class="keywordflow">else</span> {
-<a name="l01100"></a>01100                                 vMove2NextLine(pDiag,
-<a name="l01101"></a>01101                                         pOutput-&gt;tFontRef, pOutput-&gt;usFontSize);
-<a name="l01102"></a>01102                                 RESET_LINE();
-<a name="l01103"></a>01103                         }
-<a name="l01104"></a>01104                         <span class="keywordflow">break</span>;
-<a name="l01105"></a>01105                 <span class="keywordflow">case</span> PAGE_BREAK:
-<a name="l01106"></a>01106                 <span class="keywordflow">case</span> COLUMN_FEED:
-<a name="l01107"></a>01107                         pSection = pSectionNext;
-<a name="l01108"></a>01108                         <span class="keywordflow">break</span>;
-<a name="l01109"></a>01109                 <span class="keywordflow">case</span> TABLE_SEPARATOR:
-<a name="l01110"></a>01110                         <span class="keywordflow">if</span> (bIsTableRow) {
-<a name="l01111"></a>01111                                 vStoreCharacter(ulChar, pOutput);
-<a name="l01112"></a>01112                                 <span class="keywordflow">break</span>;
-<a name="l01113"></a>01113                         }
-<a name="l01114"></a>01114                         vStoreCharacter((ULONG)<span class="charliteral">&#39; &#39;</span>, pOutput);
-<a name="l01115"></a>01115                         vStoreCharacter((ULONG)TABLE_SEPARATOR_CHAR, pOutput);
-<a name="l01116"></a>01116                         <span class="keywordflow">break</span>;
-<a name="l01117"></a>01117                 <span class="keywordflow">case</span> TAB:
-<a name="l01118"></a>01118                         <span class="keywordflow">if</span> (bIsTableRow ||
-<a name="l01119"></a>01119                             tOptions.eConversionType == conversion_xml) {
-<a name="l01120"></a>01120                                 vStoreCharacter((ULONG)<span class="charliteral">&#39; &#39;</span>, pOutput);
-<a name="l01121"></a>01121                                 <span class="keywordflow">break</span>;
-<a name="l01122"></a>01122                         }
-<a name="l01123"></a>01123                         <span class="keywordflow">if</span> (tOptions.iParagraphBreak == 0 &amp;&amp;
-<a name="l01124"></a>01124                             (tOptions.eConversionType == conversion_text ||
-<a name="l01125"></a>01125                              tOptions.eConversionType == conversion_fmt_text)) {
-<a name="l01126"></a>01126                                 <span class="comment">/* No logical lines, so no tab expansion */</span>
-<a name="l01127"></a>01127                                 vStoreCharacter(TAB, pOutput);
-<a name="l01128"></a>01128                                 <span class="keywordflow">break</span>;
-<a name="l01129"></a>01129                         }
-<a name="l01130"></a>01130                         lHalfSpaceWidth = (lComputeSpaceWidth(
-<a name="l01131"></a>01131                                         pOutput-&gt;tFontRef,
-<a name="l01132"></a>01132                                         pOutput-&gt;usFontSize) + 1) / 2;
-<a name="l01133"></a>01133                         lTmp = lTotalStringWidth(pAnchor);
-<a name="l01134"></a>01134                         lTmp += lDrawUnits2MilliPoints(pDiag-&gt;lXleft);
-<a name="l01135"></a>01135                         lTmp /= lDefaultTabWidth;
-<a name="l01136"></a>01136                         <span class="keywordflow">do</span> {
-<a name="l01137"></a>01137                                 vStoreCharacter((ULONG)FILLER_CHAR, pOutput);
-<a name="l01138"></a>01138                                 lWidthCurr = lTotalStringWidth(pAnchor);
-<a name="l01139"></a>01139                                 lWidthCurr +=
-<a name="l01140"></a>01140                                         lDrawUnits2MilliPoints(pDiag-&gt;lXleft);
-<a name="l01141"></a>01141                         } <span class="keywordflow">while</span> (lTmp == lWidthCurr / lDefaultTabWidth &amp;&amp;
-<a name="l01142"></a>01142                                  lWidthCurr &lt; lWidthMax + lRightIndentation);
-<a name="l01143"></a>01143                         <span class="keywordflow">break</span>;
-<a name="l01144"></a>01144                 <span class="keywordflow">default</span>:
-<a name="l01145"></a>01145                         <span class="keywordflow">if</span> (bHiddenText &amp;&amp; tOptions.bHideHiddenText) {
-<a name="l01146"></a>01146                                 <span class="keywordflow">continue</span>;
-<a name="l01147"></a>01147                         }
-<a name="l01148"></a>01148                         <span class="keywordflow">if</span> (bMarkDelText &amp;&amp; tOptions.bRemoveRemovedText) {
-<a name="l01149"></a>01149                                 <span class="keywordflow">continue</span>;
-<a name="l01150"></a>01150                         }
-<a name="l01151"></a>01151                         <span class="keywordflow">if</span> (ulChar == UNICODE_ELLIPSIS &amp;&amp;
-<a name="l01152"></a>01152                             tOptions.eEncoding != encoding_utf_8) {
-<a name="l01153"></a>01153                                 vStoreString(<span class="stringliteral">&quot;...&quot;</span>, 3, pOutput);
-<a name="l01154"></a>01154                         } <span class="keywordflow">else</span> {
-<a name="l01155"></a>01155                                 <span class="keywordflow">if</span> (bAllCapitals) {
-<a name="l01156"></a>01156                                         ulChar = ulToUpper(ulChar);
-<a name="l01157"></a>01157                                 }
-<a name="l01158"></a>01158                                 vStoreCharacter(ulChar, pOutput);
-<a name="l01159"></a>01159                         }
-<a name="l01160"></a>01160                         <span class="keywordflow">break</span>;
-<a name="l01161"></a>01161                 }
-<a name="l01162"></a>01162 
-<a name="l01163"></a>01163                 <span class="keywordflow">if</span> (bWasTableRow &amp;&amp; !bIsTableRow) {
-<a name="l01164"></a>01164                         <span class="comment">/* End of a table */</span>
-<a name="l01165"></a>01165                         vEndOfTable(pDiag);
-<a name="l01166"></a>01166                         <span class="comment">/* Resume normal font */</span>
-<a name="l01167"></a>01167                         NO_DBG_MSG(<span class="stringliteral">&quot;End of table font&quot;</span>);
-<a name="l01168"></a>01168                         vCloseFont();
-<a name="l01169"></a>01169                         bTableFontClosed = TRUE;
-<a name="l01170"></a>01170                         pOutput-&gt;ucFontColor = ucFontColor;
-<a name="l01171"></a>01171                         pOutput-&gt;usFontStyle = usFontStyle;
-<a name="l01172"></a>01172                         pOutput-&gt;usFontSize = usFontSize;
-<a name="l01173"></a>01173                         pOutput-&gt;tFontRef = tOpenFont(
-<a name="l01174"></a>01174                                         ucFontNumber, usFontStyle, usFontSize);
-<a name="l01175"></a>01175                 }
-<a name="l01176"></a>01176                 bWasTableRow = bIsTableRow;
-<a name="l01177"></a>01177 
-<a name="l01178"></a>01178                 <span class="keywordflow">if</span> (bIsTableRow) {
-<a name="l01179"></a>01179                         fail(pAnchor != pOutput);
-<a name="l01180"></a>01180                         <span class="keywordflow">if</span> (!bEndRowNorm &amp;&amp; !bEndRowFast) {
-<a name="l01181"></a>01181                                 <span class="keywordflow">continue</span>;
-<a name="l01182"></a>01182                         }
-<a name="l01183"></a>01183                         <span class="comment">/* End of a table row */</span>
-<a name="l01184"></a>01184                         <span class="keywordflow">if</span> (bEndRowNorm) {
-<a name="l01185"></a>01185                                 fail(pRowInfo == NULL);
-<a name="l01186"></a>01186                                 vTableRow2Window(pDiag, pAnchor, pRowInfo,
-<a name="l01187"></a>01187                                                 tOptions.eConversionType,
-<a name="l01188"></a>01188                                                 tOptions.iParagraphBreak);
-<a name="l01189"></a>01189                         } <span class="keywordflow">else</span> {
-<a name="l01190"></a>01190                                 fail(!bEndRowFast);
-<a name="l01191"></a>01191                         }
-<a name="l01192"></a>01192                         <span class="comment">/* Reset */</span>
-<a name="l01193"></a>01193                         pAnchor = pStartNewOutput(pAnchor, NULL);
-<a name="l01194"></a>01194                         pOutput = pAnchor;
-<a name="l01195"></a>01195                         <span class="keywordflow">if</span> (bEndRowNorm) {
-<a name="l01196"></a>01196                                 pRowInfo = pGetNextRowInfoListItem();
-<a name="l01197"></a>01197                         }
-<a name="l01198"></a>01198                         bIsTableRow = FALSE;
-<a name="l01199"></a>01199                         bEndRowNorm = FALSE;
-<a name="l01200"></a>01200                         bEndRowFast = FALSE;
-<a name="l01201"></a>01201                         NO_DBG_HEX_C(pRowInfo != NULL,
-<a name="l01202"></a>01202                                                 pRowInfo-&gt;ulFileOffsetStart);
-<a name="l01203"></a>01203                         NO_DBG_HEX_C(pRowInfo != NULL,
-<a name="l01204"></a>01204                                                 pRowInfo-&gt;ulFileOffsetEnd);
-<a name="l01205"></a>01205                         <span class="keywordflow">continue</span>;
-<a name="l01206"></a>01206                 }
-<a name="l01207"></a>01207                 lWidthCurr = lTotalStringWidth(pAnchor);
-<a name="l01208"></a>01208                 lWidthCurr += lDrawUnits2MilliPoints(pDiag-&gt;lXleft);
-<a name="l01209"></a>01209                 <span class="keywordflow">if</span> (lWidthCurr &lt; lWidthMax + lRightIndentation) {
-<a name="l01210"></a>01210                         <span class="keywordflow">continue</span>;
-<a name="l01211"></a>01211                 }
-<a name="l01212"></a>01212                 pLeftOver = pSplitList(pAnchor);
-<a name="l01213"></a>01213                 vJustify2Window(pDiag, pAnchor,
-<a name="l01214"></a>01214                                 lWidthMax, lRightIndentation, ucAlignment);
-<a name="l01215"></a>01215                 pAnchor = pStartNewOutput(pAnchor, pLeftOver);
-<a name="l01216"></a>01216                 <span class="keywordflow">for</span> (pOutput = pAnchor;
-<a name="l01217"></a>01217                      pOutput-&gt;pNext != NULL;
-<a name="l01218"></a>01218                      pOutput = pOutput-&gt;pNext)
-<a name="l01219"></a>01219                         ;       <span class="comment">/* EMPTY */</span>
-<a name="l01220"></a>01220                 fail(pOutput == NULL);
-<a name="l01221"></a>01221                 <span class="keywordflow">if</span> (lTotalStringWidth(pAnchor) &gt; 0) {
-<a name="l01222"></a>01222                         vSetLeftIndentation(pDiag, lLeftIndentation);
-<a name="l01223"></a>01223                 }
-<a name="l01224"></a>01224         }
-<a name="l01225"></a>01225 
-<a name="l01226"></a>01226         pAnchor = pStartNewOutput(pAnchor, NULL);
-<a name="l01227"></a>01227         pAnchor-&gt;szStorage = xfree(pAnchor-&gt;szStorage);
-<a name="l01228"></a>01228         pAnchor = xfree(pAnchor);
-<a name="l01229"></a>01229         vCloseFont();
-<a name="l01230"></a>01230         vFreeDocument();
-<a name="l01231"></a>01231         Hourglass_Off();
-<a name="l01232"></a>01232         <span class="keywordflow">return</span> TRUE;
-<a name="l01233"></a>01233 } <span class="comment">/* end of bWordDecryptor */</span>
-<a name="l01234"></a>01234 
-<a name="l01235"></a>01235 <span class="comment">/*</span>
-<a name="l01236"></a>01236 <span class="comment"> * lLastStringWidth - compute the width of the last part of the output string</span>
-<a name="l01237"></a>01237 <span class="comment"> */</span>
-<a name="l01238"></a>01238 <span class="keyword">static</span> <span class="keywordtype">long</span>
-<a name="l01239"></a>01239 lLastStringWidth(<span class="keyword">const</span> output_type *pAnchor)
-<a name="l01240"></a>01240 {
-<a name="l01241"></a>01241         <span class="keyword">const</span> output_type       *pCurr, *pStart;
-<a name="l01242"></a>01242 
-<a name="l01243"></a>01243         pStart = NULL;
-<a name="l01244"></a>01244         <span class="keywordflow">for</span> (pCurr = pAnchor; pCurr != NULL; pCurr = pCurr-&gt;pNext) {
-<a name="l01245"></a>01245                 <span class="keywordflow">if</span> (pCurr-&gt;tNextFree == 1 &amp;&amp;
-<a name="l01246"></a>01246                     (pCurr-&gt;szStorage[0] == PAR_END ||
-<a name="l01247"></a>01247                      pCurr-&gt;szStorage[0] == HARD_RETURN)) {
-<a name="l01248"></a>01248                         <span class="comment">/* Found a separator. Start after the separator */</span>
-<a name="l01249"></a>01249                         pStart = pCurr-&gt;pNext;
-<a name="l01250"></a>01250                 }
-<a name="l01251"></a>01251         }
-<a name="l01252"></a>01252         <span class="keywordflow">if</span> (pStart == NULL) {
-<a name="l01253"></a>01253                 <span class="comment">/* No separators. Use the whole output string */</span>
-<a name="l01254"></a>01254                 pStart = pAnchor;
-<a name="l01255"></a>01255         }
-<a name="l01256"></a>01256         <span class="keywordflow">return</span> lTotalStringWidth(pStart);
-<a name="l01257"></a>01257 } <span class="comment">/* end of lLastStringWidth */</span>
-<a name="l01258"></a>01258 
-<a name="l01259"></a>01259 <span class="comment">/*</span>
-<a name="l01260"></a>01260 <span class="comment"> * pHdrFtrDecryptor - turn a header/footer list element to something useful</span>
-<a name="l01261"></a>01261 <span class="comment"> */</span>
-<a name="l01262"></a>01262 output_type *
-<a name="l01263"></a>01263 pHdrFtrDecryptor(FILE *pFile, ULONG ulCharPosStart, ULONG ulCharPosNext)
-<a name="l01264"></a>01264 {
-<a name="l01265"></a>01265         output_type     *pAnchor, *pOutput, *pLeftOver;
-<a name="l01266"></a>01266         ULONG   ulChar, ulFileOffset, ulCharPos;
-<a name="l01267"></a>01267         <span class="keywordtype">long</span>    lWidthCurr, lWidthMax;
-<a name="l01268"></a>01268         <span class="keywordtype">long</span>    lRightIndentation;
-<a name="l01269"></a>01269         USHORT  usChar;
-<a name="l01270"></a>01270         UCHAR   ucAlignment;
-<a name="l01271"></a>01271         BOOL    bSkip;
-<a name="l01272"></a>01272 
-<a name="l01273"></a>01273         fail(iWordVersion &lt; 0);
-<a name="l01274"></a>01274         fail(tOptions.eConversionType == conversion_unknown);
-<a name="l01275"></a>01275         fail(tOptions.eEncoding == 0);
-<a name="l01276"></a>01276 
-<a name="l01277"></a>01277         <span class="keywordflow">if</span> (ulCharPosStart == ulCharPosNext) {
-<a name="l01278"></a>01278                 <span class="comment">/* There are no bytes to decrypt */</span>
-<a name="l01279"></a>01279                 <span class="keywordflow">return</span> NULL;
-<a name="l01280"></a>01280         }
-<a name="l01281"></a>01281 
-<a name="l01282"></a>01282         lRightIndentation = 0;
-<a name="l01283"></a>01283         ucAlignment = ALIGNMENT_LEFT;
-<a name="l01284"></a>01284         bSkip = FALSE;
-<a name="l01285"></a>01285         lWidthMax = lGetWidthMax(tOptions.iParagraphBreak);
-<a name="l01286"></a>01286         pAnchor = pStartNewOutput(NULL, NULL);
-<a name="l01287"></a>01287         pOutput = pAnchor;
-<a name="l01288"></a>01288         pOutput-&gt;tFontRef = tOpenFont(0, FONT_REGULAR, DEFAULT_FONT_SIZE);
-<a name="l01289"></a>01289         usChar = usToHdrFtrPosition(pFile, ulCharPosStart);
-<a name="l01290"></a>01290         ulCharPos = ulCharPosStart;
-<a name="l01291"></a>01291         ulFileOffset = ulCharPos2FileOffset(ulCharPos);
-<a name="l01292"></a>01292         <span class="keywordflow">while</span> (usChar != (USHORT)EOF &amp;&amp; ulCharPos != ulCharPosNext) {
-<a name="l01293"></a>01293                 <span class="comment">/* Skip embedded characters */</span>
-<a name="l01294"></a>01294                 <span class="keywordflow">if</span> (usChar == START_EMBEDDED) {
-<a name="l01295"></a>01295                         bSkip = TRUE;
-<a name="l01296"></a>01296                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (usChar == END_IGNORE || usChar == END_EMBEDDED) {
-<a name="l01297"></a>01297                         bSkip = FALSE;
-<a name="l01298"></a>01298                 }
-<a name="l01299"></a>01299                 <span class="comment">/* Translate character */</span>
-<a name="l01300"></a>01300                 <span class="keywordflow">if</span> (bSkip || usChar == END_IGNORE || usChar == END_EMBEDDED) {
-<a name="l01301"></a>01301                         ulChar = IGNORE_CHARACTER;
-<a name="l01302"></a>01302                 } <span class="keywordflow">else</span> {
-<a name="l01303"></a>01303                         ulChar = ulTranslateCharacters(usChar,
-<a name="l01304"></a>01304                                         ulFileOffset,
-<a name="l01305"></a>01305                                         iWordVersion,
-<a name="l01306"></a>01306                                         tOptions.eConversionType,
-<a name="l01307"></a>01307                                         tOptions.eEncoding,
-<a name="l01308"></a>01308                                         bOldMacFile);
-<a name="l01309"></a>01309                 }
-<a name="l01310"></a>01310                 <span class="comment">/* Process character */</span>
-<a name="l01311"></a>01311                 <span class="keywordflow">if</span> (ulChar != IGNORE_CHARACTER) {
-<a name="l01312"></a>01312                         <span class="keywordflow">switch</span> (ulChar) {
-<a name="l01313"></a>01313                         <span class="keywordflow">case</span> PICTURE:
-<a name="l01314"></a>01314                                 vStoreString(<span class="stringliteral">&quot;[pic]&quot;</span>, 5, pOutput);
-<a name="l01315"></a>01315                                 <span class="keywordflow">break</span>;
-<a name="l01316"></a>01316                         <span class="keywordflow">case</span> PAR_END:
-<a name="l01317"></a>01317                         <span class="keywordflow">case</span> HARD_RETURN:
-<a name="l01318"></a>01318                         <span class="keywordflow">case</span> PAGE_BREAK:
-<a name="l01319"></a>01319                         <span class="keywordflow">case</span> COLUMN_FEED:
-<a name="l01320"></a>01320                                 <span class="comment">/* To the next substring */</span>
-<a name="l01321"></a>01321                                 pOutput = pStartNextOutput(pOutput);
-<a name="l01322"></a>01322                                 vCloseFont();
-<a name="l01323"></a>01323                                 pOutput-&gt;tFontRef = tOpenFont(0,
-<a name="l01324"></a>01324                                         FONT_REGULAR, DEFAULT_FONT_SIZE);
-<a name="l01325"></a>01325                                 <span class="comment">/* A substring with just one character */</span>
-<a name="l01326"></a>01326                                 <span class="keywordflow">if</span> (ulChar == HARD_RETURN) {
-<a name="l01327"></a>01327                                         vStoreCharacter(HARD_RETURN, pOutput);
-<a name="l01328"></a>01328                                 } <span class="keywordflow">else</span> {
-<a name="l01329"></a>01329                                         vStoreCharacter(PAR_END, pOutput);
-<a name="l01330"></a>01330                                 }
-<a name="l01331"></a>01331                                 <span class="comment">/* To the next substring */</span>
-<a name="l01332"></a>01332                                 pOutput = pStartNextOutput(pOutput);
-<a name="l01333"></a>01333                                 vCloseFont();
-<a name="l01334"></a>01334                                 pOutput-&gt;tFontRef = tOpenFont(0,
-<a name="l01335"></a>01335                                         FONT_REGULAR, DEFAULT_FONT_SIZE);
-<a name="l01336"></a>01336                                 fail(!bCheckDoubleLinkedList(pAnchor));
-<a name="l01337"></a>01337                                 <span class="keywordflow">break</span>;
-<a name="l01338"></a>01338                         <span class="keywordflow">case</span> TABLE_SEPARATOR:
-<a name="l01339"></a>01339                                 vStoreCharacter((ULONG)<span class="charliteral">&#39; &#39;</span>, pOutput);
-<a name="l01340"></a>01340                                 vStoreCharacter((ULONG)TABLE_SEPARATOR_CHAR,
-<a name="l01341"></a>01341                                                         pOutput);
-<a name="l01342"></a>01342                                 <span class="keywordflow">break</span>;
-<a name="l01343"></a>01343                         <span class="keywordflow">case</span> TAB:
-<a name="l01344"></a>01344                                 vStoreCharacter((ULONG)FILLER_CHAR, pOutput);
-<a name="l01345"></a>01345                                 <span class="keywordflow">break</span>;
-<a name="l01346"></a>01346                         <span class="keywordflow">default</span>:
-<a name="l01347"></a>01347                                 vStoreCharacter(ulChar, pOutput);
-<a name="l01348"></a>01348                                 <span class="keywordflow">break</span>;
-<a name="l01349"></a>01349                         }
-<a name="l01350"></a>01350                 }
-<a name="l01351"></a>01351                 lWidthCurr = lLastStringWidth(pAnchor);
-<a name="l01352"></a>01352                 <span class="keywordflow">if</span> (lWidthCurr &gt;= lWidthMax + lRightIndentation) {
-<a name="l01353"></a>01353                         pLeftOver = pSplitList(pAnchor);
-<a name="l01354"></a>01354                         <span class="keywordflow">for</span> (pOutput = pAnchor;
-<a name="l01355"></a>01355                              pOutput-&gt;pNext != NULL;
-<a name="l01356"></a>01356                              pOutput = pOutput-&gt;pNext)
-<a name="l01357"></a>01357                                 ;       <span class="comment">/* EMPTY */</span>
-<a name="l01358"></a>01358                         fail(pOutput == NULL);
-<a name="l01359"></a>01359                         <span class="comment">/* To the next substring */</span>
-<a name="l01360"></a>01360                         pOutput = pStartNextOutput(pOutput);
-<a name="l01361"></a>01361                         <span class="comment">/* A substring with just one HARD_RETURN */</span>
-<a name="l01362"></a>01362                         vStoreCharacter(HARD_RETURN, pOutput);
-<a name="l01363"></a>01363                         <span class="comment">/* Put the leftover piece(s) at the end */</span>
-<a name="l01364"></a>01364                         pOutput-&gt;pNext = pLeftOver;
-<a name="l01365"></a>01365                         <span class="keywordflow">if</span> (pLeftOver != NULL) {
-<a name="l01366"></a>01366                                 pLeftOver-&gt;pPrev = pOutput;
-<a name="l01367"></a>01367                         }
-<a name="l01368"></a>01368                         fail(!bCheckDoubleLinkedList(pAnchor));
-<a name="l01369"></a>01369                         <span class="keywordflow">for</span> (pOutput = pAnchor;
-<a name="l01370"></a>01370                              pOutput-&gt;pNext != NULL;
-<a name="l01371"></a>01371                              pOutput = pOutput-&gt;pNext)
-<a name="l01372"></a>01372                                 ;       <span class="comment">/* EMPTY */</span>
-<a name="l01373"></a>01373                         fail(pOutput == NULL);
-<a name="l01374"></a>01374                 }
-<a name="l01375"></a>01375                 usChar = usNextChar(pFile, hdrftr_list,
-<a name="l01376"></a>01376                                         &amp;ulFileOffset, &amp;ulCharPos, NULL);
-<a name="l01377"></a>01377         }
-<a name="l01378"></a>01378         vCloseFont();
-<a name="l01379"></a>01379         <span class="keywordflow">if</span> (bOutputContainsText(pAnchor)) {
-<a name="l01380"></a>01380                 <span class="keywordflow">return</span> pAnchor;
-<a name="l01381"></a>01381         }
-<a name="l01382"></a>01382         pAnchor = pStartNewOutput(pAnchor, NULL);
-<a name="l01383"></a>01383         pAnchor-&gt;szStorage = xfree(pAnchor-&gt;szStorage);
-<a name="l01384"></a>01384         pAnchor = xfree(pAnchor);
-<a name="l01385"></a>01385         <span class="keywordflow">return</span> NULL;
-<a name="l01386"></a>01386 } <span class="comment">/* end of pHdrFtrDecryptor */</span>
-<a name="l01387"></a>01387 
-<a name="l01388"></a>01388 <span class="comment">/*</span>
-<a name="l01389"></a>01389 <span class="comment"> * pFootnoteDecryptor - turn a footnote text list element into text</span>
-<a name="l01390"></a>01390 <span class="comment"> */</span>
-<a name="l01391"></a>01391 <span class="keywordtype">char</span> *
-<a name="l01392"></a>01392 szFootnoteDecryptor(FILE *pFile, ULONG ulCharPosStart, ULONG ulCharPosNext)
-<a name="l01393"></a>01393 {
-<a name="l01394"></a>01394         <span class="keywordtype">char</span>    *szText;
-<a name="l01395"></a>01395         ULONG   ulChar, ulFileOffset, ulCharPos;
-<a name="l01396"></a>01396         USHORT  usChar;
-<a name="l01397"></a>01397         <span class="keywordtype">size_t</span>  tLen, tIndex, tNextFree, tStorageSize;
-<a name="l01398"></a>01398         <span class="keywordtype">char</span>    szResult[6];
-<a name="l01399"></a>01399         BOOL    bSkip;
-<a name="l01400"></a>01400 
-<a name="l01401"></a>01401         fail(iWordVersion &lt; 0);
-<a name="l01402"></a>01402         fail(tOptions.eConversionType == conversion_unknown);
-<a name="l01403"></a>01403         fail(tOptions.eEncoding == 0);
-<a name="l01404"></a>01404 
-<a name="l01405"></a>01405         <span class="keywordflow">if</span> (ulCharPosStart == ulCharPosNext) {
-<a name="l01406"></a>01406                 <span class="comment">/* There are no bytes to decrypt */</span>
-<a name="l01407"></a>01407                 <span class="keywordflow">return</span> NULL;
-<a name="l01408"></a>01408         }
-<a name="l01409"></a>01409 
-<a name="l01410"></a>01410         <span class="keywordflow">if</span> (tOptions.eConversionType != conversion_xml) {
-<a name="l01411"></a>01411                 <span class="comment">/* Only implemented for XML output */</span>
-<a name="l01412"></a>01412                 <span class="keywordflow">return</span> NULL;
-<a name="l01413"></a>01413         }
-<a name="l01414"></a>01414 
-<a name="l01415"></a>01415         bSkip = FALSE;
-<a name="l01416"></a>01416 
-<a name="l01417"></a>01417         <span class="comment">/* Initialise the text buffer */</span>
-<a name="l01418"></a>01418         tStorageSize = INITIAL_SIZE;
-<a name="l01419"></a>01419         szText = xmalloc(tStorageSize);
-<a name="l01420"></a>01420         tNextFree = 0;
-<a name="l01421"></a>01421         szText[tNextFree] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l01422"></a>01422 
-<a name="l01423"></a>01423         <span class="comment">/* Goto the start */</span>
-<a name="l01424"></a>01424         usChar = usToFootnotePosition(pFile, ulCharPosStart);
-<a name="l01425"></a>01425         ulCharPos = ulCharPosStart;
-<a name="l01426"></a>01426         ulFileOffset = ulCharPos2FileOffset(ulCharPos);
-<a name="l01427"></a>01427         <span class="comment">/* Skip the unwanted starting characters */</span>
-<a name="l01428"></a>01428         <span class="keywordflow">while</span> (usChar != (USHORT)EOF &amp;&amp; ulCharPos != ulCharPosNext &amp;&amp;
-<a name="l01429"></a>01429                (usChar == FOOTNOTE_OR_ENDNOTE ||
-<a name="l01430"></a>01430                 usChar == PAR_END ||
-<a name="l01431"></a>01431                 usChar == TAB ||
-<a name="l01432"></a>01432                 usChar == (USHORT)<span class="charliteral">&#39; &#39;</span>)) {
-<a name="l01433"></a>01433                 usChar = usNextChar(pFile, footnote_list,
-<a name="l01434"></a>01434                                         &amp;ulFileOffset, &amp;ulCharPos, NULL);
-<a name="l01435"></a>01435         }
-<a name="l01436"></a>01436         <span class="comment">/* Process the footnote text */</span>
-<a name="l01437"></a>01437         <span class="keywordflow">while</span> (usChar != (USHORT)EOF &amp;&amp; ulCharPos != ulCharPosNext) {
-<a name="l01438"></a>01438                 <span class="comment">/* Skip embedded characters */</span>
-<a name="l01439"></a>01439                 <span class="keywordflow">if</span> (usChar == START_EMBEDDED) {
-<a name="l01440"></a>01440                         bSkip = TRUE;
-<a name="l01441"></a>01441                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (usChar == END_IGNORE || usChar == END_EMBEDDED) {
-<a name="l01442"></a>01442                         bSkip = FALSE;
-<a name="l01443"></a>01443                 }
-<a name="l01444"></a>01444                 <span class="comment">/* Translate character */</span>
-<a name="l01445"></a>01445                 <span class="keywordflow">if</span> (bSkip ||
-<a name="l01446"></a>01446                     usChar == END_IGNORE ||
-<a name="l01447"></a>01447                     usChar == END_EMBEDDED ||
-<a name="l01448"></a>01448                     usChar == FOOTNOTE_OR_ENDNOTE) {
-<a name="l01449"></a>01449                         ulChar = IGNORE_CHARACTER;
-<a name="l01450"></a>01450                 } <span class="keywordflow">else</span> {
-<a name="l01451"></a>01451                         ulChar = ulTranslateCharacters(usChar,
-<a name="l01452"></a>01452                                         ulFileOffset,
-<a name="l01453"></a>01453                                         iWordVersion,
-<a name="l01454"></a>01454                                         tOptions.eConversionType,
-<a name="l01455"></a>01455                                         tOptions.eEncoding,
-<a name="l01456"></a>01456                                         bOldMacFile);
-<a name="l01457"></a>01457                 }
-<a name="l01458"></a>01458                 <span class="comment">/* Process character */</span>
-<a name="l01459"></a>01459                 <span class="keywordflow">if</span> (ulChar == PICTURE) {
-<a name="l01460"></a>01460                         tLen = 5;
-<a name="l01461"></a>01461                         strcpy(szResult, <span class="stringliteral">&quot;[pic]&quot;</span>);
-<a name="l01462"></a>01462                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ulChar == IGNORE_CHARACTER) {
-<a name="l01463"></a>01463                         tLen = 0;
-<a name="l01464"></a>01464                         szResult[0] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l01465"></a>01465                 } <span class="keywordflow">else</span> {
-<a name="l01466"></a>01466                         <span class="keywordflow">switch</span> (ulChar) {
-<a name="l01467"></a>01467                         <span class="keywordflow">case</span> PAR_END:
-<a name="l01468"></a>01468                         <span class="keywordflow">case</span> HARD_RETURN:
-<a name="l01469"></a>01469                         <span class="keywordflow">case</span> PAGE_BREAK:
-<a name="l01470"></a>01470                         <span class="keywordflow">case</span> COLUMN_FEED:
-<a name="l01471"></a>01471                                 ulChar = (ULONG)PAR_END;
-<a name="l01472"></a>01472                                 <span class="keywordflow">break</span>;
-<a name="l01473"></a>01473                         <span class="keywordflow">case</span> TAB:
-<a name="l01474"></a>01474                                 ulChar = (ULONG)<span class="charliteral">&#39; &#39;</span>;
-<a name="l01475"></a>01475                                 <span class="keywordflow">break</span>;
-<a name="l01476"></a>01476                         <span class="keywordflow">default</span>:
-<a name="l01477"></a>01477                                 <span class="keywordflow">break</span>;
-<a name="l01478"></a>01478                         }
-<a name="l01479"></a>01479                         tLen = tUcs2Utf8(ulChar, szResult, <span class="keyword">sizeof</span>(szResult));
-<a name="l01480"></a>01480                 }
-<a name="l01481"></a>01481                 <span class="comment">/* Add the results to the text */</span>
-<a name="l01482"></a>01482                 <span class="keywordflow">if</span> (tNextFree + tLen + 1 &gt; tStorageSize) {
-<a name="l01483"></a>01483                         tStorageSize += EXTENTION_SIZE;
-<a name="l01484"></a>01484                         szText = xrealloc(szText, tStorageSize);
-<a name="l01485"></a>01485                 }
-<a name="l01486"></a>01486                 <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tLen; tIndex++) {
-<a name="l01487"></a>01487                         szText[tNextFree++] = szResult[tIndex];
-<a name="l01488"></a>01488                 }
-<a name="l01489"></a>01489                 szText[tNextFree] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l01490"></a>01490                 <span class="comment">/* Next character */</span>
-<a name="l01491"></a>01491                 usChar = usNextChar(pFile, footnote_list,
-<a name="l01492"></a>01492                                         &amp;ulFileOffset, &amp;ulCharPos, NULL);
-<a name="l01493"></a>01493         }
-<a name="l01494"></a>01494         <span class="comment">/* Remove redundant spaces */</span>
-<a name="l01495"></a>01495         <span class="keywordflow">while</span> (tNextFree != 0 &amp;&amp; szText[tNextFree - 1] == <span class="charliteral">&#39; &#39;</span>) {
-<a name="l01496"></a>01496                 szText[tNextFree - 1] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l01497"></a>01497                 tNextFree--;
-<a name="l01498"></a>01498         }
-<a name="l01499"></a>01499         <span class="keywordflow">if</span> (tNextFree == 0) {
-<a name="l01500"></a>01500                 <span class="comment">/* No text */</span>
-<a name="l01501"></a>01501                 szText = xfree(szText);
-<a name="l01502"></a>01502                 <span class="keywordflow">return</span> NULL;
-<a name="l01503"></a>01503         }
-<a name="l01504"></a>01504         <span class="keywordflow">return</span> szText;
-<a name="l01505"></a>01505 } <span class="comment">/* end of szFootnoteDecryptor */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/wordconst_8h_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,337 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/inc/wordconst.h Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/inc/wordconst.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * wordconst.h</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2004 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Constants and macros for the interpretation of MS Word files</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#if !defined(__wordconst_h)</span>
-<a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor">#define __wordconst_h 1</span>
-<a name="l00011"></a>00011 <span class="preprocessor"></span>
-<a name="l00012"></a>00012 <span class="comment">/*</span>
-<a name="l00013"></a>00013 <span class="comment"> * A bit odd definition of the type Boolean, but RISC OS insists</span>
-<a name="l00014"></a>00014 <span class="comment"> * on this and Linux/Unix doesn&#39;t mind.</span>
-<a name="l00015"></a>00015 <span class="comment"> */</span>
-<a name="l00016"></a>00016 <span class="preprocessor">#if !defined(BOOL)</span>
-<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#define BOOL int</span>
-<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define TRUE 1</span>
-<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define FALSE 0</span>
-<a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* !BOOL */</span>
-<a name="l00021"></a>00021 
-<a name="l00022"></a>00022 <span class="comment">/* Block sizes */</span>
-<a name="l00023"></a>00023 <span class="preprocessor">#define HEADER_SIZE                     768</span>
-<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define BIG_BLOCK_SIZE                  512</span>
-<a name="l00025"></a>00025 <span class="preprocessor"></span><span class="preprocessor">#define PROPERTY_SET_STORAGE_SIZE       128</span>
-<a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define SMALL_BLOCK_SIZE                 64</span>
-<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="comment">/* Switch size of Depot use */</span>
-<a name="l00028"></a>00028 <span class="preprocessor">#define MIN_SIZE_FOR_BBD_USE            0x1000</span>
-<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="comment">/* Table sizes */</span>
-<a name="l00030"></a>00030 <span class="preprocessor">#define TABLE_COLUMN_MAX                 31</span>
-<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="comment">/* Maximum number of tabs positions in a paragraph */</span>
-<a name="l00032"></a>00032 <span class="preprocessor">#define NUMBER_OF_TABS_MAX               64</span>
-<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="comment">/* Font sizes (in half-points) */</span>
-<a name="l00034"></a>00034 <span class="preprocessor">#define MIN_FONT_SIZE                     8</span>
-<a name="l00035"></a>00035 <span class="preprocessor"></span><span class="preprocessor">#define DEFAULT_FONT_SIZE                20</span>
-<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#define MAX_FONT_SIZE                   240</span>
-<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define MIN_TABLEFONT_SIZE               16</span>
-<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#define MAX_TABLEFONT_SIZE               20</span>
-<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="comment">/* Font styles */</span>
-<a name="l00040"></a>00040 <span class="preprocessor">#define FONT_REGULAR                    0x0000</span>
-<a name="l00041"></a>00041 <span class="preprocessor"></span><span class="preprocessor">#define FONT_BOLD                       0x0001</span>
-<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#define FONT_ITALIC                     0x0002</span>
-<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#define FONT_UNDERLINE                  0x0004</span>
-<a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#define FONT_CAPITALS                   0x0008</span>
-<a name="l00045"></a>00045 <span class="preprocessor"></span><span class="preprocessor">#define FONT_SMALL_CAPITALS             0x0010</span>
-<a name="l00046"></a>00046 <span class="preprocessor"></span><span class="preprocessor">#define FONT_STRIKE                     0x0020</span>
-<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#define FONT_HIDDEN                     0x0040</span>
-<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#define FONT_MARKDEL                    0x0080</span>
-<a name="l00049"></a>00049 <span class="preprocessor"></span><span class="preprocessor">#define FONT_SUPERSCRIPT                0x0100</span>
-<a name="l00050"></a>00050 <span class="preprocessor"></span><span class="preprocessor">#define FONT_SUBSCRIPT                  0x0200</span>
-<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="comment">/* Font colors */</span>
-<a name="l00052"></a>00052 <span class="preprocessor">#define FONT_COLOR_DEFAULT               0</span>
-<a name="l00053"></a>00053 <span class="preprocessor"></span><span class="preprocessor">#define FONT_COLOR_BLACK                 1</span>
-<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor">#define FONT_COLOR_BLUE                  2</span>
-<a name="l00055"></a>00055 <span class="preprocessor"></span><span class="preprocessor">#define FONT_COLOR_CYAN                  3</span>
-<a name="l00056"></a>00056 <span class="preprocessor"></span><span class="preprocessor">#define FONT_COLOR_GREEN                 4</span>
-<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor">#define FONT_COLOR_MAGENTA               5</span>
-<a name="l00058"></a>00058 <span class="preprocessor"></span><span class="preprocessor">#define FONT_COLOR_RED                   6</span>
-<a name="l00059"></a>00059 <span class="preprocessor"></span><span class="preprocessor">#define FONT_COLOR_YELLOW                7</span>
-<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor">#define FONT_COLOR_WHITE                 8</span>
-<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="comment">/* Special block numbers */</span>
-<a name="l00062"></a>00062 <span class="preprocessor">#define END_OF_CHAIN                    0xfffffffeUL</span>
-<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor">#define UNUSED_BLOCK                    0xffffffffUL</span>
-<a name="l00064"></a>00064 <span class="preprocessor"></span><span class="comment">/* Blocksize (512 bytes) and maximum filesize (4 GB) gives 0..7fffff */</span>
-<a name="l00065"></a>00065 <span class="preprocessor">#define MAX_BLOCKNUMBER                 0x007fffffUL</span>
-<a name="l00066"></a>00066 <span class="preprocessor"></span><span class="comment">/* Invalid character position */</span>
-<a name="l00067"></a>00067 <span class="preprocessor">#define CP_INVALID                      0xffffffffUL</span>
-<a name="l00068"></a>00068 <span class="preprocessor"></span><span class="comment">/* Invalid file offset */</span>
-<a name="l00069"></a>00069 <span class="preprocessor">#define FC_INVALID                      0xffffffffUL</span>
-<a name="l00070"></a>00070 <span class="preprocessor"></span><span class="comment">/* Special istd values */</span>
-<a name="l00071"></a>00071 <span class="preprocessor">#define ISTD_INVALID                    USHRT_MAX</span>
-<a name="l00072"></a>00072 <span class="preprocessor"></span><span class="preprocessor">#define ISTD_NORMAL                     0</span>
-<a name="l00073"></a>00073 <span class="preprocessor"></span><span class="comment">/* Properties modifier without value */</span>
-<a name="l00074"></a>00074 <span class="preprocessor">#define IGNORE_PROPMOD                  0</span>
-<a name="l00075"></a>00075 <span class="preprocessor"></span><span class="comment">/* Types of lists */</span>
-<a name="l00076"></a>00076 <span class="preprocessor">#define LIST_ARABIC_NUM                 0x00</span>
-<a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor">#define LIST_UPPER_ROMAN                0x01</span>
-<a name="l00078"></a>00078 <span class="preprocessor"></span><span class="preprocessor">#define LIST_LOWER_ROMAN                0x02</span>
-<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">#define LIST_UPPER_ALPHA                0x03</span>
-<a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor">#define LIST_LOWER_ALPHA                0x04</span>
-<a name="l00081"></a>00081 <span class="preprocessor"></span><span class="preprocessor">#define LIST_ORDINAL_NUM                0x05</span>
-<a name="l00082"></a>00082 <span class="preprocessor"></span><span class="preprocessor">#define LIST_NUMBER_TXT                 0x06</span>
-<a name="l00083"></a>00083 <span class="preprocessor"></span><span class="preprocessor">#define LIST_ORDINAL_TXT                0x07</span>
-<a name="l00084"></a>00084 <span class="preprocessor"></span><span class="preprocessor">#define LIST_OUTLINE_NUM                0x16</span>
-<a name="l00085"></a>00085 <span class="preprocessor"></span><span class="preprocessor">#define LIST_SPECIAL                    0x17</span>
-<a name="l00086"></a>00086 <span class="preprocessor"></span><span class="preprocessor">#define LIST_SPECIAL2                   0x19</span>
-<a name="l00087"></a>00087 <span class="preprocessor"></span><span class="preprocessor">#define LIST_BULLETS                    0xff</span>
-<a name="l00088"></a>00088 <span class="preprocessor"></span><span class="comment">/* Types of paragraph alignment */</span>
-<a name="l00089"></a>00089 <span class="preprocessor">#define ALIGNMENT_LEFT                  0x00</span>
-<a name="l00090"></a>00090 <span class="preprocessor"></span><span class="preprocessor">#define ALIGNMENT_CENTER                0x01</span>
-<a name="l00091"></a>00091 <span class="preprocessor"></span><span class="preprocessor">#define ALIGNMENT_RIGHT                 0x02</span>
-<a name="l00092"></a>00092 <span class="preprocessor"></span><span class="preprocessor">#define ALIGNMENT_JUSTIFY               0x03</span>
-<a name="l00093"></a>00093 <span class="preprocessor"></span><span class="comment">/* Minimum vertical space before and after a heading line */</span>
-<a name="l00094"></a>00094 <span class="preprocessor">#define HEADING_GAP                     120     </span><span class="comment">/* twips */</span>
-<a name="l00095"></a>00095 <span class="comment">/* Style identifier */</span>
-<a name="l00096"></a>00096 <span class="preprocessor">#define STI_USER                        0xffe</span>
-<a name="l00097"></a>00097 <span class="preprocessor"></span><span class="preprocessor">#define STI_NIL                         0xfff</span>
-<a name="l00098"></a>00098 <span class="preprocessor"></span><span class="comment">/* Table border style codes */</span>
-<a name="l00099"></a>00099 <span class="preprocessor">#define TABLE_BORDER_TOP                0x01</span>
-<a name="l00100"></a>00100 <span class="preprocessor"></span><span class="preprocessor">#define TABLE_BORDER_LEFT               0x02</span>
-<a name="l00101"></a>00101 <span class="preprocessor"></span><span class="preprocessor">#define TABLE_BORDER_BOTTOM             0x04</span>
-<a name="l00102"></a>00102 <span class="preprocessor"></span><span class="preprocessor">#define TABLE_BORDER_RIGHT              0x08</span>
-<a name="l00103"></a>00103 <span class="preprocessor"></span>
-<a name="l00104"></a>00104 <span class="comment">/* Macros */</span>
-<a name="l00105"></a>00105         <span class="comment">/* Get macros */</span>
-<a name="l00106"></a>00106 <span class="preprocessor">#define ucGetByte(i,a)          ((unsigned char)(a[i]))</span>
-<a name="l00107"></a>00107 <span class="preprocessor"></span><span class="preprocessor">#define usGetWord(i,a)          ((unsigned short)\</span>
-<a name="l00108"></a>00108 <span class="preprocessor">                                        ((unsigned int)(a[(i)+1])&lt;&lt;8|\</span>
-<a name="l00109"></a>00109 <span class="preprocessor">                                         (unsigned int)(a[i])))</span>
-<a name="l00110"></a>00110 <span class="preprocessor"></span><span class="preprocessor">#define ulGetLong(i,a)          ((unsigned long)(a[i])|\</span>
-<a name="l00111"></a>00111 <span class="preprocessor">                                        (unsigned long)(a[(i)+1])&lt;&lt;8|\</span>
-<a name="l00112"></a>00112 <span class="preprocessor">                                        (unsigned long)(a[(i)+2])&lt;&lt;16|\</span>
-<a name="l00113"></a>00113 <span class="preprocessor">                                        (unsigned long)(a[(i)+3])&lt;&lt;24)</span>
-<a name="l00114"></a>00114 <span class="preprocessor"></span><span class="preprocessor">#define usGetWordBE(i,a)        ((unsigned short)\</span>
-<a name="l00115"></a>00115 <span class="preprocessor">                                        ((unsigned int)(a[i])&lt;&lt;8|\</span>
-<a name="l00116"></a>00116 <span class="preprocessor">                                         (unsigned int)(a[(i)+1])))</span>
-<a name="l00117"></a>00117 <span class="preprocessor"></span><span class="preprocessor">#define ulGetLongBE(i,a)        ((unsigned long)(a[(i)+3])|\</span>
-<a name="l00118"></a>00118 <span class="preprocessor">                                        (unsigned long)(a[(i)+2])&lt;&lt;8|\</span>
-<a name="l00119"></a>00119 <span class="preprocessor">                                        (unsigned long)(a[(i)+1])&lt;&lt;16|\</span>
-<a name="l00120"></a>00120 <span class="preprocessor">                                        (unsigned long)(a[i])&lt;&lt;24)</span>
-<a name="l00121"></a>00121 <span class="preprocessor"></span>        <span class="comment">/* Font style macros */</span>
-<a name="l00122"></a>00122 <span class="preprocessor">#define bIsBold(x)              (((x) &amp; FONT_BOLD) == FONT_BOLD)</span>
-<a name="l00123"></a>00123 <span class="preprocessor"></span><span class="preprocessor">#define bIsItalic(x)            (((x) &amp; FONT_ITALIC) == FONT_ITALIC)</span>
-<a name="l00124"></a>00124 <span class="preprocessor"></span><span class="preprocessor">#define bIsUnderline(x)         (((x) &amp; FONT_UNDERLINE) == FONT_UNDERLINE)</span>
-<a name="l00125"></a>00125 <span class="preprocessor"></span><span class="preprocessor">#define bIsCapitals(x)          (((x) &amp; FONT_CAPITALS) == FONT_CAPITALS)</span>
-<a name="l00126"></a>00126 <span class="preprocessor"></span><span class="preprocessor">#define bIsSmallCapitals(x)     (((x) &amp; FONT_SMALL_CAPITALS) == FONT_SMALL_CAPITALS)</span>
-<a name="l00127"></a>00127 <span class="preprocessor"></span><span class="preprocessor">#define bIsStrike(x)            (((x) &amp; FONT_STRIKE) == FONT_STRIKE)</span>
-<a name="l00128"></a>00128 <span class="preprocessor"></span><span class="preprocessor">#define bIsHidden(x)            (((x) &amp; FONT_HIDDEN) == FONT_HIDDEN)</span>
-<a name="l00129"></a>00129 <span class="preprocessor"></span><span class="preprocessor">#define bIsMarkDel(x)           (((x) &amp; FONT_MARKDEL) == FONT_MARKDEL)</span>
-<a name="l00130"></a>00130 <span class="preprocessor"></span><span class="preprocessor">#define bIsSuperscript(x)       (((x) &amp; FONT_SUPERSCRIPT) == FONT_SUPERSCRIPT)</span>
-<a name="l00131"></a>00131 <span class="preprocessor"></span><span class="preprocessor">#define bIsSubscript(x)         (((x) &amp; FONT_SUBSCRIPT) == FONT_SUBSCRIPT)</span>
-<a name="l00132"></a>00132 <span class="preprocessor"></span>        <span class="comment">/* Table border style code macros */</span>
-<a name="l00133"></a>00133 <span class="preprocessor">#define bIsTableBorderTop(x)    (((x) &amp; TABLE_BORDER_TOP) == TABLE_BORDER_TOP)</span>
-<a name="l00134"></a>00134 <span class="preprocessor"></span><span class="preprocessor">#define bIsTableBorderLeft(x)   (((x) &amp; TABLE_BORDER_LEFT) == TABLE_BORDER_LEFT)</span>
-<a name="l00135"></a>00135 <span class="preprocessor"></span><span class="preprocessor">#define bIsTableBorderBottom(x) (((x) &amp; TABLE_BORDER_BOTTOM) == TABLE_BORDER_BOTTOM)</span>
-<a name="l00136"></a>00136 <span class="preprocessor"></span><span class="preprocessor">#define bIsTableBorderRight(x)  (((x) &amp; TABLE_BORDER_RIGHT) == TABLE_BORDER_RIGHT)</span>
-<a name="l00137"></a>00137 <span class="preprocessor"></span>        <span class="comment">/* Computation macros */</span>
-<a name="l00138"></a>00138 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00139"></a>00139 <span class="preprocessor"></span><span class="comment">/* From Words half-points to draw units (plus a percentage) */</span>
-<a name="l00140"></a>00140 <span class="preprocessor">#define lWord2DrawUnits00(x)    ((long)(x) * 320)</span>
-<a name="l00141"></a>00141 <span class="preprocessor"></span><span class="preprocessor">#define lWord2DrawUnits20(x)    ((long)(x) * 384)</span>
-<a name="l00142"></a>00142 <span class="preprocessor"></span><span class="preprocessor">#define lToBaseLine(x)          ((long)(x) *  45)</span>
-<a name="l00143"></a>00143 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00144"></a>00144 <span class="comment">/* From twips (1/20 of a point) to millipoints */</span>
-<a name="l00145"></a>00145 <span class="preprocessor">#define lTwips2MilliPoints(x)   ((long)(x) * 50)</span>
-<a name="l00146"></a>00146 <span class="preprocessor"></span><span class="comment">/* From twips (1/20 of a point) to points */</span>
-<a name="l00147"></a>00147 <span class="preprocessor">#define dTwips2Points(x)        ((double)(x) / 20.0)</span>
-<a name="l00148"></a>00148 <span class="preprocessor"></span><span class="comment">/* From default characters (16 OS units wide) to millipoints */</span>
-<a name="l00149"></a>00149 <span class="preprocessor">#define lChar2MilliPoints(x)    ((long)(x) * 6400)</span>
-<a name="l00150"></a>00150 <span class="preprocessor"></span><span class="preprocessor">#define iMilliPoints2Char(x)    (int)(((long)(x) + 3200) / 6400)</span>
-<a name="l00151"></a>00151 <span class="preprocessor"></span><span class="preprocessor">#define iDrawUnits2Char(x)      (int)(((long)(x) + 2048) / 4096)</span>
-<a name="l00152"></a>00152 <span class="preprocessor"></span><span class="comment">/* From draw units (1/180*256 inch) to millipoints (1/72*1000 inch) */</span>
-<a name="l00153"></a>00153 <span class="preprocessor">#define lDrawUnits2MilliPoints(x)       (((long)(x) * 25 +  8) / 16)</span>
-<a name="l00154"></a>00154 <span class="preprocessor"></span><span class="preprocessor">#define lMilliPoints2DrawUnits(x)       (((long)(x) * 16 + 12) / 25)</span>
-<a name="l00155"></a>00155 <span class="preprocessor"></span><span class="preprocessor">#define lPoints2DrawUnits(x)            ((long)(x) * 640)</span>
-<a name="l00156"></a>00156 <span class="preprocessor"></span><span class="preprocessor">#define dDrawUnits2Points(x)            ((double)(x) / 640.0)</span>
-<a name="l00157"></a>00157 <span class="preprocessor"></span>
-<a name="l00158"></a>00158 <span class="comment">/* Special characters */</span>
-<a name="l00159"></a>00159 <span class="preprocessor">#define IGNORE_CHARACTER        0x00    </span><span class="comment">/* ^@ */</span>
-<a name="l00160"></a>00160 <span class="preprocessor">#define PICTURE                 0x01    </span><span class="comment">/* ^A */</span>
-<a name="l00161"></a>00161 <span class="preprocessor">#define FOOTNOTE_OR_ENDNOTE     0x02    </span><span class="comment">/* ^B */</span>
-<a name="l00162"></a>00162 <span class="preprocessor">#define FOOTNOTE_SEPARATOR      0x03    </span><span class="comment">/* ^C */</span>
-<a name="l00163"></a>00163 <span class="preprocessor">#define FOOTNOTE_CONTINUATION   0x04    </span><span class="comment">/* ^D */</span>
-<a name="l00164"></a>00164 <span class="preprocessor">#define ANNOTATION              0x05    </span><span class="comment">/* ^E */</span>
-<a name="l00165"></a>00165 <span class="preprocessor">#define TABLE_SEPARATOR         0x07    </span><span class="comment">/* ^G */</span>
-<a name="l00166"></a>00166 <span class="preprocessor">#define FRAME                   0x08    </span><span class="comment">/* ^H */</span>
-<a name="l00167"></a>00167 <span class="preprocessor">#define TAB                     0x09    </span><span class="comment">/* ^I */</span>
-<a name="l00168"></a>00168 <span class="comment">/* End of line characters */</span>
-<a name="l00169"></a>00169 <span class="preprocessor">#define LINE_FEED               0x0a    </span><span class="comment">/* ^J */</span>
-<a name="l00170"></a>00170 <span class="preprocessor">#define HARD_RETURN             0x0b    </span><span class="comment">/* ^K */</span>
-<a name="l00171"></a>00171 <span class="preprocessor">#define PAGE_BREAK              0x0c    </span><span class="comment">/* ^L */</span>
-<a name="l00172"></a>00172 <span class="preprocessor">#define PAR_END                 0x0d    </span><span class="comment">/* ^M */</span>
-<a name="l00173"></a>00173 <span class="preprocessor">#define COLUMN_FEED             0x0e    </span><span class="comment">/* ^N */</span>
-<a name="l00174"></a>00174 <span class="comment">/* Embedded stuff */</span>
-<a name="l00175"></a>00175 <span class="preprocessor">#define START_EMBEDDED          0x13    </span><span class="comment">/* ^S */</span>
-<a name="l00176"></a>00176 <span class="preprocessor">#define END_IGNORE              0x14    </span><span class="comment">/* ^T */</span>
-<a name="l00177"></a>00177 <span class="preprocessor">#define END_EMBEDDED            0x15    </span><span class="comment">/* ^U */</span>
-<a name="l00178"></a>00178 <span class="comment">/* Special characters */</span>
-<a name="l00179"></a>00179 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00180"></a>00180 <span class="preprocessor"></span><span class="preprocessor">#define FILLER_CHAR             &#39;~&#39;</span>
-<a name="l00181"></a>00181 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00182"></a>00182 <span class="preprocessor"></span><span class="preprocessor">#define FILLER_CHAR             &#39; &#39;</span>
-<a name="l00183"></a>00183 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00184"></a>00184 <span class="preprocessor">#define TABLE_SEPARATOR_CHAR    &#39;|&#39;</span>
-<a name="l00185"></a>00185 <span class="preprocessor"></span><span class="comment">/* Pseudo characters. These must be outside the Unicode range */</span>
-<a name="l00186"></a>00186 <span class="preprocessor">#define FOOTNOTE_CHAR           ((unsigned long)0xffff + 1)</span>
-<a name="l00187"></a>00187 <span class="preprocessor"></span><span class="preprocessor">#define ENDNOTE_CHAR            ((unsigned long)0xffff + 2)</span>
-<a name="l00188"></a>00188 <span class="preprocessor"></span><span class="preprocessor">#define UNKNOWN_NOTE_CHAR       ((unsigned long)0xffff + 3)</span>
-<a name="l00189"></a>00189 <span class="preprocessor"></span>
-<a name="l00190"></a>00190 <span class="comment">/* Charactercodes as used by Word */</span>
-<a name="l00191"></a>00191 <span class="preprocessor">#define WORD_UNBREAKABLE_JOIN           0x1e</span>
-<a name="l00192"></a>00192 <span class="preprocessor"></span><span class="preprocessor">#define WORD_SOFT_HYPHEN                0x1f</span>
-<a name="l00193"></a>00193 <span class="preprocessor"></span>
-<a name="l00194"></a>00194 <span class="comment">/* Unicode characters */</span>
-<a name="l00195"></a>00195 <span class="preprocessor">#define UNICODE_DOUBLE_LEFT_ANGLE_QMARK 0x00ab</span>
-<a name="l00196"></a>00196 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_MIDDLE_DOT              0x00b7</span>
-<a name="l00197"></a>00197 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_DOUBLE_RIGHT_ANGLE_QMARK        0x00bb</span>
-<a name="l00198"></a>00198 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_CAPITAL_D_WITH_STROKE   0x0110</span>
-<a name="l00199"></a>00199 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_SMALL_D_WITH_STROKE     0x0111</span>
-<a name="l00200"></a>00200 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_CAPITAL_LIGATURE_OE     0x0152</span>
-<a name="l00201"></a>00201 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_SMALL_LIGATURE_OE       0x0153</span>
-<a name="l00202"></a>00202 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_SMALL_F_HOOK            0x0192</span>
-<a name="l00203"></a>00203 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_GREEK_CAPITAL_CHI       0x03a7</span>
-<a name="l00204"></a>00204 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_GREEK_SMALL_UPSILON     0x03c5</span>
-<a name="l00205"></a>00205 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_MODIFIER_CIRCUMFLEX     0x02c6</span>
-<a name="l00206"></a>00206 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_SMALL_TILDE             0x02dc</span>
-<a name="l00207"></a>00207 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_SMALL_LETTER_OMEGA      0x03c9</span>
-<a name="l00208"></a>00208 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_EN_QUAD                 0x2000</span>
-<a name="l00209"></a>00209 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_EM_QUAD                 0x2001</span>
-<a name="l00210"></a>00210 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_EN_SPACE                0x2002</span>
-<a name="l00211"></a>00211 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_EM_SPACE                0x2003</span>
-<a name="l00212"></a>00212 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_THREE_PER_EM_SPACE      0x2004</span>
-<a name="l00213"></a>00213 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_FOUR_PER_EM_SPACE       0x2005</span>
-<a name="l00214"></a>00214 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_SIX_PER_EM_SPACE        0x2006</span>
-<a name="l00215"></a>00215 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_FIGURE_SPACE            0x2007</span>
-<a name="l00216"></a>00216 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_PUNCTUATION_SPACE       0x2008</span>
-<a name="l00217"></a>00217 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_THIN_SPACE              0x2009</span>
-<a name="l00218"></a>00218 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_HAIR_SPACE              0x200a</span>
-<a name="l00219"></a>00219 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_ZERO_WIDTH_SPACE        0x200b</span>
-<a name="l00220"></a>00220 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_ZERO_WIDTH_NON_JOINER   0x200c</span>
-<a name="l00221"></a>00221 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_ZERO_WIDTH_JOINER       0x200d</span>
-<a name="l00222"></a>00222 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_LEFT_TO_RIGHT_MARK      0x200e</span>
-<a name="l00223"></a>00223 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_RIGHT_TO_LEFT_MARK      0x200f</span>
-<a name="l00224"></a>00224 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_HYPHEN                  0x2010</span>
-<a name="l00225"></a>00225 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_NON_BREAKING_HYPHEN     0x2011</span>
-<a name="l00226"></a>00226 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_FIGURE_DASH             0x2012</span>
-<a name="l00227"></a>00227 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_EN_DASH                 0x2013</span>
-<a name="l00228"></a>00228 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_EM_DASH                 0x2014</span>
-<a name="l00229"></a>00229 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_HORIZONTAL_BAR          0x2015</span>
-<a name="l00230"></a>00230 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_DOUBLE_VERTICAL_LINE    0x2016</span>
-<a name="l00231"></a>00231 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_DOUBLE_LOW_LINE         0x2017</span>
-<a name="l00232"></a>00232 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_LEFT_SINGLE_QMARK       0x2018</span>
-<a name="l00233"></a>00233 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_RIGHT_SINGLE_QMARK      0x2019</span>
-<a name="l00234"></a>00234 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_SINGLE_LOW_9_QMARK      0x201a</span>
-<a name="l00235"></a>00235 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_SINGLE_HIGH_REV_9_QMARK 0x201b</span>
-<a name="l00236"></a>00236 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_LEFT_DOUBLE_QMARK       0x201c</span>
-<a name="l00237"></a>00237 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_RIGHT_DOUBLE_QMARK      0x201d</span>
-<a name="l00238"></a>00238 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_DOUBLE_LOW_9_QMARK      0x201e</span>
-<a name="l00239"></a>00239 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_DOUBLE_HIGH_REV_9_QMARK 0x201f</span>
-<a name="l00240"></a>00240 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_DAGGER                  0x2020</span>
-<a name="l00241"></a>00241 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_DOUBLE_DAGGER           0x2021</span>
-<a name="l00242"></a>00242 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BULLET                  0x2022</span>
-<a name="l00243"></a>00243 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_TRIANGULAR_BULLET       0x2023</span>
-<a name="l00244"></a>00244 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_ONE_DOT_LEADER          0x2024</span>
-<a name="l00245"></a>00245 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_TWO_DOT_LEADER          0x2025</span>
-<a name="l00246"></a>00246 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_ELLIPSIS                0x2026</span>
-<a name="l00247"></a>00247 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_HYPHENATION_POINT       0x2027</span>
-<a name="l00248"></a>00248 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_LEFT_TO_RIGHT_EMBEDDING 0x202a</span>
-<a name="l00249"></a>00249 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_RIGHT_TO_LEFT_EMBEDDING 0x202b</span>
-<a name="l00250"></a>00250 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_POP_DIRECTIONAL_FORMATTING      0x202c</span>
-<a name="l00251"></a>00251 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_LEFT_TO_RIGHT_OVERRIDE  0x202d</span>
-<a name="l00252"></a>00252 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_RIGHT_TO_LEFT_OVERRIDE  0x202e</span>
-<a name="l00253"></a>00253 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_NARROW_NO_BREAK_SPACE   0x202f</span>
-<a name="l00254"></a>00254 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_PER_MILLE_SIGN          0x2030</span>
-<a name="l00255"></a>00255 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_PRIME                   0x2032</span>
-<a name="l00256"></a>00256 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_DOUBLE_PRIME            0x2033</span>
-<a name="l00257"></a>00257 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_SINGLE_LEFT_ANGLE_QMARK 0x2039</span>
-<a name="l00258"></a>00258 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_SINGLE_RIGHT_ANGLE_QMARK        0x203a</span>
-<a name="l00259"></a>00259 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_UNDERTIE                0x203f</span>
-<a name="l00260"></a>00260 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_FRACTION_SLASH          0x2044</span>
-<a name="l00261"></a>00261 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_EURO_SIGN               0x20ac</span>
-<a name="l00262"></a>00262 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_CIRCLE                  0x20dd</span>
-<a name="l00263"></a>00263 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_SQUARE                  0x20de</span>
-<a name="l00264"></a>00264 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_DIAMOND                 0x20df</span>
-<a name="l00265"></a>00265 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_NUMERO_SIGN             0x2116</span>
-<a name="l00266"></a>00266 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_TRADEMARK_SIGN          0x2122</span>
-<a name="l00267"></a>00267 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_KELVIN_SIGN             0x212a</span>
-<a name="l00268"></a>00268 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_LEFTWARDS_ARROW         0x2190</span>
-<a name="l00269"></a>00269 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_UPWARDS_ARROW           0x2191</span>
-<a name="l00270"></a>00270 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_RIGHTWARDS_ARROW        0x2192</span>
-<a name="l00271"></a>00271 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_DOWNWARDS_ARROW         0x2193</span>
-<a name="l00272"></a>00272 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_N_ARY_SUMMATION         0x2211</span>
-<a name="l00273"></a>00273 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_MINUS_SIGN              0x2212</span>
-<a name="l00274"></a>00274 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_DIVISION_SLASH          0x2215</span>
-<a name="l00275"></a>00275 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_ASTERISK_OPERATOR       0x2217</span>
-<a name="l00276"></a>00276 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BULLET_OPERATOR         0x2219</span>
-<a name="l00277"></a>00277 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_RATIO                   0x2236</span>
-<a name="l00278"></a>00278 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_TILDE_OPERATOR          0x223c</span>
-<a name="l00279"></a>00279 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BD_LIGHT_HORIZONTAL     0x2500</span>
-<a name="l00280"></a>00280 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BD_LIGHT_VERTICAL       0x2502</span>
-<a name="l00281"></a>00281 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BD_LIGHT_DOWN_RIGHT     0x250c</span>
-<a name="l00282"></a>00282 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BD_LIGHT_DOWN_AND_LEFT  0x2510</span>
-<a name="l00283"></a>00283 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BD_LIGHT_UP_AND_RIGHT   0x2514</span>
-<a name="l00284"></a>00284 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BD_LIGHT_UP_AND_LEFT    0x2518</span>
-<a name="l00285"></a>00285 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BD_LIGHT_VERTICAL_AND_RIGHT     0x251c</span>
-<a name="l00286"></a>00286 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BD_LIGHT_VERTICAL_AND_LEFT      0x2524</span>
-<a name="l00287"></a>00287 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BD_LIGHT_DOWN_AND_HORIZONTAL    0x252c</span>
-<a name="l00288"></a>00288 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BD_LIGHT_UP_AND_HORIZONTAL      0x2534</span>
-<a name="l00289"></a>00289 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BD_LIGHT_VERTICAL_AND_HORIZONTAL        0x253c</span>
-<a name="l00290"></a>00290 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BD_DOUBLE_HORIZONTAL    0x2550</span>
-<a name="l00291"></a>00291 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BD_DOUBLE_VERTICAL      0x2551</span>
-<a name="l00292"></a>00292 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BD_DOUBLE_DOWN_AND_RIGHT        0x2554</span>
-<a name="l00293"></a>00293 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BD_DOUBLE_DOWN_AND_LEFT 0x2557</span>
-<a name="l00294"></a>00294 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BD_DOUBLE_UP_AND_RIGHT  0x255a</span>
-<a name="l00295"></a>00295 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BD_DOUBLE_UP_AND_LEFT   0x255d</span>
-<a name="l00296"></a>00296 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BD_DOUBLE_VERTICAL_AND_RIGHT    0x2560</span>
-<a name="l00297"></a>00297 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BD_DOUBLE_VERTICAL_AND_LEFT     0x2563</span>
-<a name="l00298"></a>00298 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BD_DOUBLE_DOWN_AND_HORIZONTAL   0x2566</span>
-<a name="l00299"></a>00299 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BD_DOUBLE_UP_AND_HORIZONTAL     0x2569</span>
-<a name="l00300"></a>00300 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BD_DOUBLE_VERTICAL_AND_HORIZONTAL       0x256c</span>
-<a name="l00301"></a>00301 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_LIGHT_SHADE             0x2591</span>
-<a name="l00302"></a>00302 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_MEDIUM_SHADE            0x2592</span>
-<a name="l00303"></a>00303 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_DARK_SHADE              0x2593</span>
-<a name="l00304"></a>00304 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BLACK_SQUARE            0x25a0</span>
-<a name="l00305"></a>00305 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_BLACK_CLUB_SUIT         0x2663</span>
-<a name="l00306"></a>00306 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_SMALL_LIGATURE_FI       0xfb01</span>
-<a name="l00307"></a>00307 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_SMALL_LIGATURE_FL       0xfb02</span>
-<a name="l00308"></a>00308 <span class="preprocessor"></span><span class="preprocessor">#define UNICODE_ZERO_WIDTH_NO_BREAK_SPACE       0xfeff</span>
-<a name="l00309"></a>00309 <span class="preprocessor"></span>
-<a name="l00310"></a>00310 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00311"></a>00311 <span class="preprocessor"></span><span class="preprocessor">#define OUR_ELLIPSIS                    0x8c</span>
-<a name="l00312"></a>00312 <span class="preprocessor"></span><span class="preprocessor">#define OUR_EM_DASH                     0x98</span>
-<a name="l00313"></a>00313 <span class="preprocessor"></span><span class="preprocessor">#define OUR_UNBREAKABLE_JOIN            0x99</span>
-<a name="l00314"></a>00314 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00315"></a>00315 <span class="preprocessor"></span><span class="preprocessor">#define OUR_ELLIPSIS                    &#39;.&#39;</span>
-<a name="l00316"></a>00316 <span class="preprocessor"></span><span class="preprocessor">#define OUR_EM_DASH                     &#39;-&#39;</span>
-<a name="l00317"></a>00317 <span class="preprocessor"></span><span class="preprocessor">#define OUR_UNBREAKABLE_JOIN            &#39;-&#39;</span>
-<a name="l00318"></a>00318 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00319"></a>00319 <span class="preprocessor">#define OUR_DIAMOND                     &#39;-&#39;</span>
-<a name="l00320"></a>00320 <span class="preprocessor"></span>
-<a name="l00321"></a>00321 <span class="preprocessor">#endif </span><span class="comment">/* __wordconst_h */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/worddos_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/worddos.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/worddos.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * worddos.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2002-2005 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Deal with the DOS internals of a MS Word file</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00010"></a>00010 
-<a name="l00011"></a>00011 
-<a name="l00012"></a>00012 <span class="comment">/*</span>
-<a name="l00013"></a>00013 <span class="comment"> * bGetDocumentText - make a list of the text blocks of a Word document</span>
-<a name="l00014"></a>00014 <span class="comment"> *</span>
-<a name="l00015"></a>00015 <span class="comment"> * Return TRUE when succesful, otherwise FALSE</span>
-<a name="l00016"></a>00016 <span class="comment"> */</span>
-<a name="l00017"></a>00017 <span class="keyword">static</span> BOOL
-<a name="l00018"></a>00018 bGetDocumentText(FILE *pFile, <span class="keywordtype">long</span> lFilesize, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00019"></a>00019 {
-<a name="l00020"></a>00020         text_block_type tTextBlock;
-<a name="l00021"></a>00021         ULONG   ulTextLen;
-<a name="l00022"></a>00022         BOOL    bFastSaved;
-<a name="l00023"></a>00023         UCHAR   ucDocStatus, ucVersion;
-<a name="l00024"></a>00024 
-<a name="l00025"></a>00025         fail(pFile == NULL);
-<a name="l00026"></a>00026         fail(lFilesize &lt; 128);
-<a name="l00027"></a>00027         fail(aucHeader == NULL);
-<a name="l00028"></a>00028 
-<a name="l00029"></a>00029         <span class="comment">/* Get the status flags from the header */</span>
-<a name="l00030"></a>00030         ucDocStatus = ucGetByte(0x75, aucHeader);
-<a name="l00031"></a>00031         DBG_HEX(ucDocStatus);
-<a name="l00032"></a>00032         bFastSaved = (ucDocStatus &amp; BIT(1)) != 0;
-<a name="l00033"></a>00033         DBG_MSG_C(bFastSaved, <span class="stringliteral">&quot;This document is Fast Saved&quot;</span>);
-<a name="l00034"></a>00034         ucVersion = ucGetByte(0x74, aucHeader);
-<a name="l00035"></a>00035         DBG_DEC(ucVersion);
-<a name="l00036"></a>00036         DBG_MSG_C(ucVersion == 0, <span class="stringliteral">&quot;Written by Word 4.0 or earlier&quot;</span>);
-<a name="l00037"></a>00037         DBG_MSG_C(ucVersion == 3, <span class="stringliteral">&quot;Word 5.0 format, but not written by Word&quot;</span>);
-<a name="l00038"></a>00038         DBG_MSG_C(ucVersion == 4, <span class="stringliteral">&quot;Written by Word 5.x&quot;</span>);
-<a name="l00039"></a>00039         <span class="keywordflow">if</span> (bFastSaved) {
-<a name="l00040"></a>00040                 werr(0, <span class="stringliteral">&quot;Word for DOS: autosave documents are not supported&quot;</span>);
-<a name="l00041"></a>00041                 <span class="keywordflow">return</span> FALSE;
-<a name="l00042"></a>00042         }
-<a name="l00043"></a>00043 
-<a name="l00044"></a>00044         <span class="comment">/* Get length information */</span>
-<a name="l00045"></a>00045         ulTextLen = ulGetLong(0x0e, aucHeader);
-<a name="l00046"></a>00046         DBG_HEX(ulTextLen);
-<a name="l00047"></a>00047         ulTextLen -= 128;
-<a name="l00048"></a>00048         DBG_DEC(ulTextLen);
-<a name="l00049"></a>00049         tTextBlock.ulFileOffset = 128;
-<a name="l00050"></a>00050         tTextBlock.ulCharPos = 128;
-<a name="l00051"></a>00051         tTextBlock.ulLength = ulTextLen;
-<a name="l00052"></a>00052         tTextBlock.bUsesUnicode = FALSE;
-<a name="l00053"></a>00053         tTextBlock.usPropMod = IGNORE_PROPMOD;
-<a name="l00054"></a>00054         <span class="keywordflow">if</span> (!bAdd2TextBlockList(&amp;tTextBlock)) {
-<a name="l00055"></a>00055                 DBG_HEX(tTextBlock.ulFileOffset);
-<a name="l00056"></a>00056                 DBG_HEX(tTextBlock.ulCharPos);
-<a name="l00057"></a>00057                 DBG_DEC(tTextBlock.ulLength);
-<a name="l00058"></a>00058                 DBG_DEC(tTextBlock.bUsesUnicode);
-<a name="l00059"></a>00059                 DBG_DEC(tTextBlock.usPropMod);
-<a name="l00060"></a>00060                 <span class="keywordflow">return</span> FALSE;
-<a name="l00061"></a>00061         }
-<a name="l00062"></a>00062         <span class="keywordflow">return</span> TRUE;
-<a name="l00063"></a>00063 } <span class="comment">/* end of bGetDocumentText */</span>
-<a name="l00064"></a>00064 
-<a name="l00065"></a>00065 <span class="comment">/*</span>
-<a name="l00066"></a>00066 <span class="comment"> * iInitDocumentDOS - initialize an DOS document</span>
-<a name="l00067"></a>00067 <span class="comment"> *</span>
-<a name="l00068"></a>00068 <span class="comment"> * Returns the version of Word that made the document or -1</span>
-<a name="l00069"></a>00069 <span class="comment"> */</span>
-<a name="l00070"></a>00070 <span class="keywordtype">int</span>
-<a name="l00071"></a>00071 iInitDocumentDOS(FILE *pFile, <span class="keywordtype">long</span> lFilesize)
-<a name="l00072"></a>00072 {
-<a name="l00073"></a>00073         <span class="keywordtype">int</span>     iWordVersion;
-<a name="l00074"></a>00074         BOOL    bSuccess;
-<a name="l00075"></a>00075         USHORT  usIdent;
-<a name="l00076"></a>00076         UCHAR   aucHeader[128];
-<a name="l00077"></a>00077 
-<a name="l00078"></a>00078         fail(pFile == NULL);
-<a name="l00079"></a>00079 
-<a name="l00080"></a>00080         <span class="keywordflow">if</span> (lFilesize &lt; 128) {
-<a name="l00081"></a>00081                 <span class="keywordflow">return</span> -1;
-<a name="l00082"></a>00082         }
-<a name="l00083"></a>00083 
-<a name="l00084"></a>00084         <span class="comment">/* Read the headerblock */</span>
-<a name="l00085"></a>00085         <span class="keywordflow">if</span> (!bReadBytes(aucHeader, 128, 0x00, pFile)) {
-<a name="l00086"></a>00086                 <span class="keywordflow">return</span> -1;
-<a name="l00087"></a>00087         }
-<a name="l00088"></a>00088         <span class="comment">/* Get the &quot;magic number&quot; from the header */</span>
-<a name="l00089"></a>00089         usIdent = usGetWord(0x00, aucHeader);
-<a name="l00090"></a>00090         DBG_HEX(usIdent);
-<a name="l00091"></a>00091         fail(usIdent != 0xbe31);        <span class="comment">/* Word for DOS */</span>
-<a name="l00092"></a>00092         iWordVersion = iGetVersionNumber(aucHeader);
-<a name="l00093"></a>00093         <span class="keywordflow">if</span> (iWordVersion != 0) {
-<a name="l00094"></a>00094                 werr(0, <span class="stringliteral">&quot;This file is not from &#39;Word for DOS&#39;.&quot;</span>);
-<a name="l00095"></a>00095                 <span class="keywordflow">return</span> -1;
-<a name="l00096"></a>00096         }
-<a name="l00097"></a>00097         bSuccess = bGetDocumentText(pFile, lFilesize, aucHeader);
-<a name="l00098"></a>00098         <span class="keywordflow">if</span> (bSuccess) {
-<a name="l00099"></a>00099                 vGetPropertyInfo(pFile, NULL,
-<a name="l00100"></a>00100                                 NULL, 0, NULL, 0,
-<a name="l00101"></a>00101                                 aucHeader, iWordVersion);
-<a name="l00102"></a>00102                 vSetDefaultTabWidth(pFile, NULL,
-<a name="l00103"></a>00103                                 NULL, 0, NULL, 0,
-<a name="l00104"></a>00104                                 aucHeader, iWordVersion);
-<a name="l00105"></a>00105                 vGetNotesInfo(pFile, NULL,
-<a name="l00106"></a>00106                                 NULL, 0, NULL, 0,
-<a name="l00107"></a>00107                                 aucHeader, iWordVersion);
-<a name="l00108"></a>00108         }
-<a name="l00109"></a>00109         <span class="keywordflow">return</span> bSuccess ? iWordVersion : -1;
-<a name="l00110"></a>00110 } <span class="comment">/* end of iInitDocumentDOS */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/wordlib_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,375 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/wordlib.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/wordlib.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * wordlib.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2004 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Deal with the internals of a MS Word file</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00010"></a>00010 
-<a name="l00011"></a>00011 <span class="keyword">static</span> BOOL     bOldMacFile = FALSE;
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 
-<a name="l00014"></a>00014 <span class="comment">/*</span>
-<a name="l00015"></a>00015 <span class="comment"> * Common part of the file checking functions</span>
-<a name="l00016"></a>00016 <span class="comment"> */</span>
-<a name="l00017"></a>00017 <span class="keyword">static</span> BOOL
-<a name="l00018"></a>00018 bCheckBytes(FILE *pFile, <span class="keyword">const</span> UCHAR *aucBytes, <span class="keywordtype">size_t</span> tBytes)
-<a name="l00019"></a>00019 {
-<a name="l00020"></a>00020         <span class="keywordtype">int</span>     iIndex, iChar;
-<a name="l00021"></a>00021 
-<a name="l00022"></a>00022         fail(pFile == NULL || aucBytes == NULL || tBytes == 0);
-<a name="l00023"></a>00023 
-<a name="l00024"></a>00024         rewind(pFile);
-<a name="l00025"></a>00025 
-<a name="l00026"></a>00026         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; (int)tBytes; iIndex++) {
-<a name="l00027"></a>00027                 iChar = getc(pFile);
-<a name="l00028"></a>00028                 <span class="keywordflow">if</span> (iChar == EOF || iChar != (<span class="keywordtype">int</span>)aucBytes[iIndex]) {
-<a name="l00029"></a>00029                         NO_DBG_HEX(iChar);
-<a name="l00030"></a>00030                         NO_DBG_HEX(aucBytes[iIndex]);
-<a name="l00031"></a>00031                         <span class="keywordflow">return</span> FALSE;
-<a name="l00032"></a>00032                 }
-<a name="l00033"></a>00033         }
-<a name="l00034"></a>00034         <span class="keywordflow">return</span> TRUE;
-<a name="l00035"></a>00035 } <span class="comment">/* end of bCheckBytes */</span>
-<a name="l00036"></a>00036 
-<a name="l00037"></a>00037 <span class="comment">/*</span>
-<a name="l00038"></a>00038 <span class="comment"> * This function checks whether the given file is or is not a &quot;Word for DOS&quot;</span>
-<a name="l00039"></a>00039 <span class="comment"> * document</span>
-<a name="l00040"></a>00040 <span class="comment"> */</span>
-<a name="l00041"></a>00041 BOOL
-<a name="l00042"></a>00042 bIsWordForDosFile(FILE *pFile, <span class="keywordtype">long</span> lFilesize)
-<a name="l00043"></a>00043 {
-<a name="l00044"></a>00044         <span class="keyword">static</span> UCHAR    aucBytes[] =
-<a name="l00045"></a>00045                 { 0x31, 0xbe, 0x00, 0x00, 0x00, 0xab }; <span class="comment">/* Word for DOS */</span>
-<a name="l00046"></a>00046 
-<a name="l00047"></a>00047         DBG_MSG(<span class="stringliteral">&quot;bIsWordForDosFile&quot;</span>);
-<a name="l00048"></a>00048 
-<a name="l00049"></a>00049         <span class="keywordflow">if</span> (pFile == NULL || lFilesize &lt; 0) {
-<a name="l00050"></a>00050                 DBG_MSG(<span class="stringliteral">&quot;No proper file given&quot;</span>);
-<a name="l00051"></a>00051                 <span class="keywordflow">return</span> FALSE;
-<a name="l00052"></a>00052         }
-<a name="l00053"></a>00053         <span class="keywordflow">if</span> (lFilesize &lt; 128) {
-<a name="l00054"></a>00054                 DBG_MSG(<span class="stringliteral">&quot;File too small to be a Word document&quot;</span>);
-<a name="l00055"></a>00055                 <span class="keywordflow">return</span> FALSE;
-<a name="l00056"></a>00056         }
-<a name="l00057"></a>00057         <span class="keywordflow">return</span> bCheckBytes(pFile, aucBytes, elementsof(aucBytes));
-<a name="l00058"></a>00058 } <span class="comment">/* end of bIsWordForDosFile */</span>
-<a name="l00059"></a>00059 
-<a name="l00060"></a>00060 <span class="comment">/*</span>
-<a name="l00061"></a>00061 <span class="comment"> * This function checks whether the given file is or is not a file with an</span>
-<a name="l00062"></a>00062 <span class="comment"> * OLE envelope (That is a document made by Word 6 or later)</span>
-<a name="l00063"></a>00063 <span class="comment"> */</span>
-<a name="l00064"></a>00064 <span class="keyword">static</span> BOOL
-<a name="l00065"></a>00065 bIsWordFileWithOLE(FILE *pFile, <span class="keywordtype">long</span> lFilesize)
-<a name="l00066"></a>00066 {
-<a name="l00067"></a>00067         <span class="keyword">static</span> UCHAR    aucBytes[] =
-<a name="l00068"></a>00068                 { 0xd0, 0xcf, 0x11, 0xe0, 0xa1, 0xb1, 0x1a, 0xe1 };
-<a name="l00069"></a>00069         <span class="keywordtype">int</span>     iTailLen;
-<a name="l00070"></a>00070 
-<a name="l00071"></a>00071         <span class="keywordflow">if</span> (pFile == NULL || lFilesize &lt; 0) {
-<a name="l00072"></a>00072                 DBG_MSG(<span class="stringliteral">&quot;No proper file given&quot;</span>);
-<a name="l00073"></a>00073                 <span class="keywordflow">return</span> FALSE;
-<a name="l00074"></a>00074         }
-<a name="l00075"></a>00075         <span class="keywordflow">if</span> (lFilesize &lt; (<span class="keywordtype">long</span>)BIG_BLOCK_SIZE * 3) {
-<a name="l00076"></a>00076                 DBG_MSG(<span class="stringliteral">&quot;This file is too small to be a Word document&quot;</span>);
-<a name="l00077"></a>00077                 <span class="keywordflow">return</span> FALSE;
-<a name="l00078"></a>00078         }
-<a name="l00079"></a>00079 
-<a name="l00080"></a>00080         iTailLen = (int)(lFilesize % BIG_BLOCK_SIZE);
-<a name="l00081"></a>00081         <span class="keywordflow">switch</span> (iTailLen) {
-<a name="l00082"></a>00082         <span class="keywordflow">case</span> 0:         <span class="comment">/* No tail, as it should be */</span>
-<a name="l00083"></a>00083                 <span class="keywordflow">break</span>;
-<a name="l00084"></a>00084         <span class="keywordflow">case</span> 1:
-<a name="l00085"></a>00085         <span class="keywordflow">case</span> 2:         <span class="comment">/* Filesize mismatch or a buggy email program */</span>
-<a name="l00086"></a>00086                 <span class="keywordflow">if</span> ((<span class="keywordtype">int</span>)(lFilesize % 3) == iTailLen) {
-<a name="l00087"></a>00087                         DBG_DEC(lFilesize);
-<a name="l00088"></a>00088                         <span class="keywordflow">return</span> FALSE;
-<a name="l00089"></a>00089                 }
-<a name="l00090"></a>00090                 <span class="comment">/*</span>
-<a name="l00091"></a>00091 <span class="comment">                 * Ignore extra bytes caused by buggy email programs.</span>
-<a name="l00092"></a>00092 <span class="comment">                 * They have bugs in their base64 encoding or decoding.</span>
-<a name="l00093"></a>00093 <span class="comment">                 * 3 bytes -&gt; 4 ascii chars -&gt; 3 bytes</span>
-<a name="l00094"></a>00094 <span class="comment">                 */</span>
-<a name="l00095"></a>00095                 DBG_MSG(<span class="stringliteral">&quot;Document with extra bytes&quot;</span>);
-<a name="l00096"></a>00096                 <span class="keywordflow">break</span>;
-<a name="l00097"></a>00097         <span class="keywordflow">default</span>:        <span class="comment">/* Wrong filesize for a Word document */</span>
-<a name="l00098"></a>00098                 DBG_DEC(lFilesize);
-<a name="l00099"></a>00099                 DBG_DEC(iTailLen);
-<a name="l00100"></a>00100                 <span class="keywordflow">return</span> FALSE;
-<a name="l00101"></a>00101         }
-<a name="l00102"></a>00102         <span class="keywordflow">return</span> bCheckBytes(pFile, aucBytes, elementsof(aucBytes));
-<a name="l00103"></a>00103 } <span class="comment">/* end of bIsWordFileWithOLE */</span>
-<a name="l00104"></a>00104 
-<a name="l00105"></a>00105 <span class="comment">/*</span>
-<a name="l00106"></a>00106 <span class="comment"> * This function checks whether the given file is or is not a RTF document</span>
-<a name="l00107"></a>00107 <span class="comment"> */</span>
-<a name="l00108"></a>00108 BOOL
-<a name="l00109"></a>00109 bIsRtfFile(FILE *pFile)
-<a name="l00110"></a>00110 {
-<a name="l00111"></a>00111         <span class="keyword">static</span> UCHAR    aucBytes[] =
-<a name="l00112"></a>00112                 { <span class="charliteral">&#39;{&#39;</span>, <span class="charliteral">&#39;\\&#39;</span>, <span class="charliteral">&#39;r&#39;</span>, <span class="charliteral">&#39;t&#39;</span>, <span class="charliteral">&#39;f&#39;</span>, <span class="charliteral">&#39;1&#39;</span> };
-<a name="l00113"></a>00113 
-<a name="l00114"></a>00114         DBG_MSG(<span class="stringliteral">&quot;bIsRtfFile&quot;</span>);
-<a name="l00115"></a>00115 
-<a name="l00116"></a>00116         <span class="keywordflow">return</span> bCheckBytes(pFile, aucBytes, elementsof(aucBytes));
-<a name="l00117"></a>00117 } <span class="comment">/* end of bIsRtfFile */</span>
-<a name="l00118"></a>00118 
-<a name="l00119"></a>00119 <span class="comment">/*</span>
-<a name="l00120"></a>00120 <span class="comment"> * This function checks whether the given file is or is not a WP document</span>
-<a name="l00121"></a>00121 <span class="comment"> */</span>
-<a name="l00122"></a>00122 BOOL
-<a name="l00123"></a>00123 bIsWordPerfectFile(FILE *pFile)
-<a name="l00124"></a>00124 {
-<a name="l00125"></a>00125         <span class="keyword">static</span> UCHAR    aucBytes[] =
-<a name="l00126"></a>00126                 { 0xff, <span class="charliteral">&#39;W&#39;</span>, <span class="charliteral">&#39;P&#39;</span>, <span class="charliteral">&#39;C&#39;</span> };
-<a name="l00127"></a>00127 
-<a name="l00128"></a>00128         DBG_MSG(<span class="stringliteral">&quot;bIsWordPerfectFile&quot;</span>);
-<a name="l00129"></a>00129 
-<a name="l00130"></a>00130         <span class="keywordflow">return</span> bCheckBytes(pFile, aucBytes, elementsof(aucBytes));
-<a name="l00131"></a>00131 } <span class="comment">/* end of bIsWordPerfectFile */</span>
-<a name="l00132"></a>00132 
-<a name="l00133"></a>00133 <span class="comment">/*</span>
-<a name="l00134"></a>00134 <span class="comment"> * This function checks whether the given file is or is not a &quot;Win Word 1 or 2&quot;</span>
-<a name="l00135"></a>00135 <span class="comment"> * document</span>
-<a name="l00136"></a>00136 <span class="comment"> */</span>
-<a name="l00137"></a>00137 BOOL
-<a name="l00138"></a>00138 bIsWinWord12File(FILE *pFile, <span class="keywordtype">long</span> lFilesize)
-<a name="l00139"></a>00139 {
-<a name="l00140"></a>00140         <span class="keyword">static</span> UCHAR    aucBytes[2][4] = {
-<a name="l00141"></a>00141                 { 0x9b, 0xa5, 0x21, 0x00 },     <span class="comment">/* Win Word 1.x */</span>
-<a name="l00142"></a>00142                 { 0xdb, 0xa5, 0x2d, 0x00 },     <span class="comment">/* Win Word 2.0 */</span>
-<a name="l00143"></a>00143         };
-<a name="l00144"></a>00144         <span class="keywordtype">int</span>     iIndex;
-<a name="l00145"></a>00145 
-<a name="l00146"></a>00146         DBG_MSG(<span class="stringliteral">&quot;bIsWinWord12File&quot;</span>);
-<a name="l00147"></a>00147 
-<a name="l00148"></a>00148         <span class="keywordflow">if</span> (pFile == NULL || lFilesize &lt; 0) {
-<a name="l00149"></a>00149                 DBG_MSG(<span class="stringliteral">&quot;No proper file given&quot;</span>);
-<a name="l00150"></a>00150                 <span class="keywordflow">return</span> FALSE;
-<a name="l00151"></a>00151         }
-<a name="l00152"></a>00152         <span class="keywordflow">if</span> (lFilesize &lt; 384) {
-<a name="l00153"></a>00153                 DBG_MSG(<span class="stringliteral">&quot;This file is too small to be a Word document&quot;</span>);
-<a name="l00154"></a>00154                 <span class="keywordflow">return</span> FALSE;
-<a name="l00155"></a>00155         }
-<a name="l00156"></a>00156 
-<a name="l00157"></a>00157         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; (int)elementsof(aucBytes); iIndex++) {
-<a name="l00158"></a>00158                 <span class="keywordflow">if</span> (bCheckBytes(pFile,
-<a name="l00159"></a>00159                                 aucBytes[iIndex],
-<a name="l00160"></a>00160                                 elementsof(aucBytes[iIndex]))) {
-<a name="l00161"></a>00161                         <span class="keywordflow">return</span> TRUE;
-<a name="l00162"></a>00162                 }
-<a name="l00163"></a>00163         }
-<a name="l00164"></a>00164         <span class="keywordflow">return</span> FALSE;
-<a name="l00165"></a>00165 } <span class="comment">/* end of bIsWinWord12File */</span>
-<a name="l00166"></a>00166 
-<a name="l00167"></a>00167 <span class="comment">/*</span>
-<a name="l00168"></a>00168 <span class="comment"> * This function checks whether the given file is or is not a &quot;Mac Word 4 or 5&quot;</span>
-<a name="l00169"></a>00169 <span class="comment"> * document</span>
-<a name="l00170"></a>00170 <span class="comment"> */</span>
-<a name="l00171"></a>00171 BOOL
-<a name="l00172"></a>00172 bIsMacWord45File(FILE *pFile)
-<a name="l00173"></a>00173 {
-<a name="l00174"></a>00174         <span class="keyword">static</span> UCHAR    aucBytes[2][6] = {
-<a name="l00175"></a>00175                 { 0xfe, 0x37, 0x00, 0x1c, 0x00, 0x00 }, <span class="comment">/* Mac Word 4 */</span>
-<a name="l00176"></a>00176                 { 0xfe, 0x37, 0x00, 0x23, 0x00, 0x00 }, <span class="comment">/* Mac Word 5 */</span>
-<a name="l00177"></a>00177         };
-<a name="l00178"></a>00178         <span class="keywordtype">int</span>     iIndex;
-<a name="l00179"></a>00179 
-<a name="l00180"></a>00180         DBG_MSG(<span class="stringliteral">&quot;bIsMacWord45File&quot;</span>);
-<a name="l00181"></a>00181 
-<a name="l00182"></a>00182         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; (int)elementsof(aucBytes); iIndex++) {
-<a name="l00183"></a>00183                 <span class="keywordflow">if</span> (bCheckBytes(pFile,
-<a name="l00184"></a>00184                                 aucBytes[iIndex],
-<a name="l00185"></a>00185                                 elementsof(aucBytes[iIndex]))) {
-<a name="l00186"></a>00186                         <span class="keywordflow">return</span> TRUE;
-<a name="l00187"></a>00187                 }
-<a name="l00188"></a>00188         }
-<a name="l00189"></a>00189         <span class="keywordflow">return</span> FALSE;
-<a name="l00190"></a>00190 } <span class="comment">/* end of bIsMacWord45File */</span>
-<a name="l00191"></a>00191 
-<a name="l00192"></a>00192 <span class="comment">/*</span>
-<a name="l00193"></a>00193 <span class="comment"> * iGuessVersionNumber - guess the Word version number from first few bytes</span>
-<a name="l00194"></a>00194 <span class="comment"> *</span>
-<a name="l00195"></a>00195 <span class="comment"> * Returns the guessed version number or -1 when no guess it possible</span>
-<a name="l00196"></a>00196 <span class="comment"> */</span>
-<a name="l00197"></a>00197 <span class="keywordtype">int</span>
-<a name="l00198"></a>00198 iGuessVersionNumber(FILE *pFile, <span class="keywordtype">long</span> lFilesize)
-<a name="l00199"></a>00199 {
-<a name="l00200"></a>00200         <span class="keywordflow">if</span>(bIsWordForDosFile(pFile, lFilesize)) {
-<a name="l00201"></a>00201                 <span class="keywordflow">return</span> 0;
-<a name="l00202"></a>00202         }
-<a name="l00203"></a>00203         <span class="keywordflow">if</span> (bIsWinWord12File(pFile, lFilesize)) {
-<a name="l00204"></a>00204                 <span class="keywordflow">return</span> 2;
-<a name="l00205"></a>00205         }
-<a name="l00206"></a>00206         <span class="keywordflow">if</span> (bIsMacWord45File(pFile)) {
-<a name="l00207"></a>00207                 <span class="keywordflow">return</span> 5;
-<a name="l00208"></a>00208         }
-<a name="l00209"></a>00209         <span class="keywordflow">if</span> (bIsWordFileWithOLE(pFile, lFilesize)) {
-<a name="l00210"></a>00210                 <span class="keywordflow">return</span> 6;
-<a name="l00211"></a>00211         }
-<a name="l00212"></a>00212         <span class="keywordflow">return</span> -1;
-<a name="l00213"></a>00213 } <span class="comment">/* end of iGuessVersionNumber */</span>
-<a name="l00214"></a>00214 
-<a name="l00215"></a>00215 <span class="comment">/*</span>
-<a name="l00216"></a>00216 <span class="comment"> * iGetVersionNumber - get the Word version number from the header</span>
-<a name="l00217"></a>00217 <span class="comment"> *</span>
-<a name="l00218"></a>00218 <span class="comment"> * Returns the version number or -1 when unknown</span>
-<a name="l00219"></a>00219 <span class="comment"> */</span>
-<a name="l00220"></a>00220 <span class="keywordtype">int</span>
-<a name="l00221"></a>00221 iGetVersionNumber(<span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00222"></a>00222 {
-<a name="l00223"></a>00223         USHORT  usFib, usChse;
-<a name="l00224"></a>00224 
-<a name="l00225"></a>00225         usFib = usGetWord(0x02, aucHeader);
-<a name="l00226"></a>00226         <span class="keywordflow">if</span> (usFib &gt;= 0x1000) {
-<a name="l00227"></a>00227                 <span class="comment">/* To big: must be MacWord using Big Endian */</span>
-<a name="l00228"></a>00228                 DBG_HEX(usFib);
-<a name="l00229"></a>00229                 usFib = usGetWordBE(0x02, aucHeader);
-<a name="l00230"></a>00230         }
-<a name="l00231"></a>00231         DBG_DEC(usFib);
-<a name="l00232"></a>00232         bOldMacFile = FALSE;
-<a name="l00233"></a>00233         <span class="keywordflow">switch</span> (usFib) {
-<a name="l00234"></a>00234         <span class="keywordflow">case</span>   0:
-<a name="l00235"></a>00235                 DBG_MSG(<span class="stringliteral">&quot;Word for DOS&quot;</span>);
-<a name="l00236"></a>00236                 <span class="keywordflow">return</span> 0;
-<a name="l00237"></a>00237         <span class="keywordflow">case</span>  28:
-<a name="l00238"></a>00238                 DBG_MSG(<span class="stringliteral">&quot;Word 4 for Macintosh&quot;</span>);
-<a name="l00239"></a>00239                 bOldMacFile = TRUE;
-<a name="l00240"></a>00240                 <span class="keywordflow">return</span> 4;
-<a name="l00241"></a>00241         <span class="keywordflow">case</span>  33:
-<a name="l00242"></a>00242                 DBG_MSG(<span class="stringliteral">&quot;Word 1.x for Windows&quot;</span>);
-<a name="l00243"></a>00243                 <span class="keywordflow">return</span> 1;
-<a name="l00244"></a>00244         <span class="keywordflow">case</span>  35:
-<a name="l00245"></a>00245                 DBG_MSG(<span class="stringliteral">&quot;Word 5 for Macintosh&quot;</span>);
-<a name="l00246"></a>00246                 bOldMacFile = TRUE;
-<a name="l00247"></a>00247                 <span class="keywordflow">return</span> 5;
-<a name="l00248"></a>00248         <span class="keywordflow">case</span>  45:
-<a name="l00249"></a>00249                 DBG_MSG(<span class="stringliteral">&quot;Word 2 for Windows&quot;</span>);
-<a name="l00250"></a>00250                 <span class="keywordflow">return</span> 2;
-<a name="l00251"></a>00251         <span class="keywordflow">case</span> 101:
-<a name="l00252"></a>00252         <span class="keywordflow">case</span> 102:
-<a name="l00253"></a>00253                 DBG_MSG(<span class="stringliteral">&quot;Word 6 for Windows&quot;</span>);
-<a name="l00254"></a>00254                 <span class="keywordflow">return</span> 6;
-<a name="l00255"></a>00255         <span class="keywordflow">case</span> 103:
-<a name="l00256"></a>00256         <span class="keywordflow">case</span> 104:
-<a name="l00257"></a>00257                 usChse = usGetWord(0x14, aucHeader);
-<a name="l00258"></a>00258                 DBG_DEC(usChse);
-<a name="l00259"></a>00259                 <span class="keywordflow">switch</span> (usChse) {
-<a name="l00260"></a>00260                 <span class="keywordflow">case</span> 0:
-<a name="l00261"></a>00261                         DBG_MSG(<span class="stringliteral">&quot;Word 7 for Win95&quot;</span>);
-<a name="l00262"></a>00262                         <span class="keywordflow">return</span> 7;
-<a name="l00263"></a>00263                 <span class="keywordflow">case</span> 256:
-<a name="l00264"></a>00264                         DBG_MSG(<span class="stringliteral">&quot;Word 6 for Macintosh&quot;</span>);
-<a name="l00265"></a>00265                         bOldMacFile = TRUE;
-<a name="l00266"></a>00266                         <span class="keywordflow">return</span> 6;
-<a name="l00267"></a>00267                 <span class="keywordflow">default</span>:
-<a name="l00268"></a>00268                         DBG_FIXME();
-<a name="l00269"></a>00269                         <span class="keywordflow">if</span> ((<span class="keywordtype">int</span>)ucGetByte(0x05, aucHeader) == 0xe0) {
-<a name="l00270"></a>00270                                 DBG_MSG(<span class="stringliteral">&quot;Word 7 for Win95&quot;</span>);
-<a name="l00271"></a>00271                                 <span class="keywordflow">return</span> 7;
-<a name="l00272"></a>00272                         }
-<a name="l00273"></a>00273                         DBG_MSG(<span class="stringliteral">&quot;Word 6 for Macintosh&quot;</span>);
-<a name="l00274"></a>00274                         bOldMacFile = TRUE;
-<a name="l00275"></a>00275                         <span class="keywordflow">return</span> 6;
-<a name="l00276"></a>00276                 }
-<a name="l00277"></a>00277         <span class="keywordflow">default</span>:
-<a name="l00278"></a>00278                 usChse = usGetWord(0x14, aucHeader);
-<a name="l00279"></a>00279                 DBG_DEC(usChse);
-<a name="l00280"></a>00280                 <span class="keywordflow">if</span> (usFib &lt; 192) {
-<a name="l00281"></a>00281                         <span class="comment">/* Unknown or unsupported version of Word */</span>
-<a name="l00282"></a>00282                         DBG_DEC(usFib);
-<a name="l00283"></a>00283                         <span class="keywordflow">return</span> -1;
-<a name="l00284"></a>00284                 }
-<a name="l00285"></a>00285                 DBG_MSG_C(usChse != 256, <span class="stringliteral">&quot;Word97 for Win95/98/NT&quot;</span>);
-<a name="l00286"></a>00286                 DBG_MSG_C(usChse == 256, <span class="stringliteral">&quot;Word98 for Macintosh&quot;</span>);
-<a name="l00287"></a>00287                 <span class="keywordflow">return</span> 8;
-<a name="l00288"></a>00288         }
-<a name="l00289"></a>00289 } <span class="comment">/* end of iGetVersionNumber */</span>
-<a name="l00290"></a>00290 
-<a name="l00291"></a>00291 <span class="comment">/*</span>
-<a name="l00292"></a>00292 <span class="comment"> * TRUE if the current file was made by Word version 6 or older on an</span>
-<a name="l00293"></a>00293 <span class="comment"> * Apple Macintosh, otherwise FALSE.</span>
-<a name="l00294"></a>00294 <span class="comment"> * This function hides the methode of how to find out from the rest of the</span>
-<a name="l00295"></a>00295 <span class="comment"> * program.</span>
-<a name="l00296"></a>00296 <span class="comment"> */</span>
-<a name="l00297"></a>00297 BOOL
-<a name="l00298"></a>00298 bIsOldMacFile(<span class="keywordtype">void</span>)
-<a name="l00299"></a>00299 {
-<a name="l00300"></a>00300         <span class="keywordflow">return</span> bOldMacFile;
-<a name="l00301"></a>00301 } <span class="comment">/* end of bIsOldMacFile */</span>
-<a name="l00302"></a>00302 
-<a name="l00303"></a>00303 <span class="comment">/*</span>
-<a name="l00304"></a>00304 <span class="comment"> * iInitDocument - initialize a document</span>
-<a name="l00305"></a>00305 <span class="comment"> *</span>
-<a name="l00306"></a>00306 <span class="comment"> * Returns the version of Word that made the document or -1</span>
-<a name="l00307"></a>00307 <span class="comment"> */</span>
-<a name="l00308"></a>00308 <span class="keywordtype">int</span>
-<a name="l00309"></a>00309 iInitDocument(FILE *pFile, <span class="keywordtype">long</span> lFilesize)
-<a name="l00310"></a>00310 {
-<a name="l00311"></a>00311         <span class="keywordtype">int</span>     iGuess, iWordVersion;
-<a name="l00312"></a>00312 
-<a name="l00313"></a>00313         iGuess = iGuessVersionNumber(pFile, lFilesize);
-<a name="l00314"></a>00314         <span class="keywordflow">switch</span> (iGuess) {
-<a name="l00315"></a>00315         <span class="keywordflow">case</span> 0:
-<a name="l00316"></a>00316                 iWordVersion = iInitDocumentDOS(pFile, lFilesize);
-<a name="l00317"></a>00317                 <span class="keywordflow">break</span>;
-<a name="l00318"></a>00318         <span class="keywordflow">case</span> 2:
-<a name="l00319"></a>00319                 iWordVersion = iInitDocumentWIN(pFile, lFilesize);
-<a name="l00320"></a>00320                 <span class="keywordflow">break</span>;
-<a name="l00321"></a>00321         <span class="keywordflow">case</span> 5:
-<a name="l00322"></a>00322                 iWordVersion = iInitDocumentMAC(pFile, lFilesize);
-<a name="l00323"></a>00323                 <span class="keywordflow">break</span>;
-<a name="l00324"></a>00324         <span class="keywordflow">case</span> 6:
-<a name="l00325"></a>00325                 iWordVersion = iInitDocumentOLE(pFile, lFilesize);
-<a name="l00326"></a>00326                 <span class="keywordflow">break</span>;
-<a name="l00327"></a>00327         <span class="keywordflow">default</span>:
-<a name="l00328"></a>00328                 DBG_DEC(iGuess);
-<a name="l00329"></a>00329                 iWordVersion = -1;
-<a name="l00330"></a>00330                 <span class="keywordflow">break</span>;
-<a name="l00331"></a>00331         }
-<a name="l00332"></a>00332         <span class="keywordflow">return</span> iWordVersion;
-<a name="l00333"></a>00333 } <span class="comment">/* end of iInitDocument */</span>
-<a name="l00334"></a>00334 
-<a name="l00335"></a>00335 <span class="comment">/*</span>
-<a name="l00336"></a>00336 <span class="comment"> * vFreeDocument - free a document by free-ing its parts</span>
-<a name="l00337"></a>00337 <span class="comment"> */</span>
-<a name="l00338"></a>00338 <span class="keywordtype">void</span>
-<a name="l00339"></a>00339 vFreeDocument(<span class="keywordtype">void</span>)
-<a name="l00340"></a>00340 {
-<a name="l00341"></a>00341         DBG_MSG(<span class="stringliteral">&quot;vFreeDocument&quot;</span>);
-<a name="l00342"></a>00342 
-<a name="l00343"></a>00343         <span class="comment">/* Free the memory */</span>
-<a name="l00344"></a>00344         vDestroyTextBlockList();
-<a name="l00345"></a>00345         vDestroyDataBlockList();
-<a name="l00346"></a>00346         vDestroyListInfoList();
-<a name="l00347"></a>00347         vDestroyRowInfoList();
-<a name="l00348"></a>00348         vDestroyStyleInfoList();
-<a name="l00349"></a>00349         vDestroyFontInfoList();
-<a name="l00350"></a>00350         vDestroyStylesheetList();
-<a name="l00351"></a>00351         vDestroyPictInfoList();
-<a name="l00352"></a>00352         vDestroyDocumentInfoList();
-<a name="l00353"></a>00353         vDestroySectionInfoList();
-<a name="l00354"></a>00354         vDestroyHdrFtrInfoList();
-<a name="l00355"></a>00355         vDestroyPropModList();
-<a name="l00356"></a>00356         vDestroyNotesInfoLists();
-<a name="l00357"></a>00357         vDestroyFontTable();
-<a name="l00358"></a>00358         vDestroySummaryInfo();
-<a name="l00359"></a>00359 } <span class="comment">/* end of vFreeDocument */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/wordmac_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,124 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/wordmac.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/wordmac.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * wordmac.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2002-2004 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Deal with the MAC internals of a MS Word file</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00010"></a>00010 
-<a name="l00011"></a>00011 
-<a name="l00012"></a>00012 <span class="comment">/*</span>
-<a name="l00013"></a>00013 <span class="comment"> * bGetDocumentText - make a list of the text blocks of a Word document</span>
-<a name="l00014"></a>00014 <span class="comment"> *</span>
-<a name="l00015"></a>00015 <span class="comment"> * Return TRUE when succesful, otherwise FALSE</span>
-<a name="l00016"></a>00016 <span class="comment"> */</span>
-<a name="l00017"></a>00017 <span class="keyword">static</span> BOOL
-<a name="l00018"></a>00018 bGetDocumentText(FILE *pFile, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00019"></a>00019 {
-<a name="l00020"></a>00020         text_block_type tTextBlock;
-<a name="l00021"></a>00021         ULONG   ulBeginOfText, ulEndOfText;
-<a name="l00022"></a>00022         ULONG   ulTextLen;
-<a name="l00023"></a>00023         UCHAR   ucDocStatus;
-<a name="l00024"></a>00024         BOOL    bFastSaved;
-<a name="l00025"></a>00025 
-<a name="l00026"></a>00026         fail(pFile == NULL);
-<a name="l00027"></a>00027         fail(aucHeader == NULL);
-<a name="l00028"></a>00028 
-<a name="l00029"></a>00029         DBG_MSG(<span class="stringliteral">&quot;bGetDocumentText&quot;</span>);
-<a name="l00030"></a>00030 
-<a name="l00031"></a>00031         NO_DBG_PRINT_BLOCK(aucHeader, 0x20);
-<a name="l00032"></a>00032 
-<a name="l00033"></a>00033         <span class="comment">/* Get the status flags from the header */</span>
-<a name="l00034"></a>00034         ucDocStatus = ucGetByte(0x0a, aucHeader);
-<a name="l00035"></a>00035         DBG_HEX(ucDocStatus);
-<a name="l00036"></a>00036         bFastSaved = (ucDocStatus &amp; BIT(5)) != 0;
-<a name="l00037"></a>00037         DBG_MSG_C(bFastSaved, <span class="stringliteral">&quot;This document is Fast Saved&quot;</span>);
-<a name="l00038"></a>00038         <span class="keywordflow">if</span> (bFastSaved) {
-<a name="l00039"></a>00039                 werr(0, <span class="stringliteral">&quot;MacWord: fast saved documents are not supported yet&quot;</span>);
-<a name="l00040"></a>00040                 <span class="keywordflow">return</span> FALSE;
-<a name="l00041"></a>00041         }
-<a name="l00042"></a>00042 
-<a name="l00043"></a>00043         <span class="comment">/* Get length information */</span>
-<a name="l00044"></a>00044         ulBeginOfText = ulGetLongBE(0x14, aucHeader);
-<a name="l00045"></a>00045         DBG_HEX(ulBeginOfText);
-<a name="l00046"></a>00046         ulEndOfText = ulGetLongBE(0x18, aucHeader);
-<a name="l00047"></a>00047         DBG_HEX(ulEndOfText);
-<a name="l00048"></a>00048         ulTextLen = ulEndOfText - ulBeginOfText;
-<a name="l00049"></a>00049         DBG_DEC(ulTextLen);
-<a name="l00050"></a>00050         tTextBlock.ulFileOffset = ulBeginOfText;
-<a name="l00051"></a>00051         tTextBlock.ulCharPos = ulBeginOfText;
-<a name="l00052"></a>00052         tTextBlock.ulLength = ulTextLen;
-<a name="l00053"></a>00053         tTextBlock.bUsesUnicode = FALSE;
-<a name="l00054"></a>00054         tTextBlock.usPropMod = IGNORE_PROPMOD;
-<a name="l00055"></a>00055         <span class="keywordflow">if</span> (!bAdd2TextBlockList(&amp;tTextBlock)) {
-<a name="l00056"></a>00056                 DBG_HEX(tTextBlock.ulFileOffset);
-<a name="l00057"></a>00057                 DBG_HEX(tTextBlock.ulCharPos);
-<a name="l00058"></a>00058                 DBG_DEC(tTextBlock.ulLength);
-<a name="l00059"></a>00059                 DBG_DEC(tTextBlock.bUsesUnicode);
-<a name="l00060"></a>00060                 DBG_DEC(tTextBlock.usPropMod);
-<a name="l00061"></a>00061                 <span class="keywordflow">return</span> FALSE;
-<a name="l00062"></a>00062         }
-<a name="l00063"></a>00063         <span class="keywordflow">return</span> TRUE;
-<a name="l00064"></a>00064 } <span class="comment">/* end of bGetDocumentText */</span>
-<a name="l00065"></a>00065 
-<a name="l00066"></a>00066 <span class="comment">/*</span>
-<a name="l00067"></a>00067 <span class="comment"> * iInitDocumentMAC - initialize an MAC document</span>
-<a name="l00068"></a>00068 <span class="comment"> *</span>
-<a name="l00069"></a>00069 <span class="comment"> * Returns the version of Word that made the document or -1</span>
-<a name="l00070"></a>00070 <span class="comment"> */</span>
-<a name="l00071"></a>00071 <span class="keywordtype">int</span>
-<a name="l00072"></a>00072 iInitDocumentMAC(FILE *pFile, <span class="keywordtype">long</span> lFilesize)
-<a name="l00073"></a>00073 {
-<a name="l00074"></a>00074         <span class="keywordtype">int</span>     iWordVersion;
-<a name="l00075"></a>00075         BOOL    bSuccess;
-<a name="l00076"></a>00076         USHORT  usIdent;
-<a name="l00077"></a>00077         UCHAR   aucHeader[256];
-<a name="l00078"></a>00078 
-<a name="l00079"></a>00079         fail(pFile == NULL);
-<a name="l00080"></a>00080 
-<a name="l00081"></a>00081         <span class="keywordflow">if</span> (lFilesize &lt; 256) {
-<a name="l00082"></a>00082                 <span class="keywordflow">return</span> -1;
-<a name="l00083"></a>00083         }
-<a name="l00084"></a>00084 
-<a name="l00085"></a>00085         <span class="comment">/* Read the headerblock */</span>
-<a name="l00086"></a>00086         <span class="keywordflow">if</span> (!bReadBytes(aucHeader, 256, 0x00, pFile)) {
-<a name="l00087"></a>00087                 <span class="keywordflow">return</span> -1;
-<a name="l00088"></a>00088         }
-<a name="l00089"></a>00089         <span class="comment">/* Get the &quot;magic number&quot; from the header */</span>
-<a name="l00090"></a>00090         usIdent = usGetWord(0x00, aucHeader);
-<a name="l00091"></a>00091         DBG_HEX(usIdent);
-<a name="l00092"></a>00092         fail(usIdent != 0x37fe);        <span class="comment">/* MacWord 4 and 5 */</span>
-<a name="l00093"></a>00093         iWordVersion = iGetVersionNumber(aucHeader);
-<a name="l00094"></a>00094         <span class="keywordflow">if</span> (iWordVersion != 4 &amp;&amp; iWordVersion != 5) {
-<a name="l00095"></a>00095                 werr(0, <span class="stringliteral">&quot;This file is not from &#39;&#39;Mac Word 4 or 5&#39;.&quot;</span>);
-<a name="l00096"></a>00096                 <span class="keywordflow">return</span> -1;
-<a name="l00097"></a>00097         }
-<a name="l00098"></a>00098         bSuccess = bGetDocumentText(pFile, aucHeader);
-<a name="l00099"></a>00099         <span class="keywordflow">if</span> (bSuccess) {
-<a name="l00100"></a>00100                 vGetPropertyInfo(pFile, NULL,
-<a name="l00101"></a>00101                                 NULL, 0, NULL, 0,
-<a name="l00102"></a>00102                                 aucHeader, iWordVersion);
-<a name="l00103"></a>00103                 vSetDefaultTabWidth(pFile, NULL,
-<a name="l00104"></a>00104                                 NULL, 0, NULL, 0,
-<a name="l00105"></a>00105                                 aucHeader, iWordVersion);
-<a name="l00106"></a>00106         }
-<a name="l00107"></a>00107         <span class="keywordflow">return</span> bSuccess ? iWordVersion : -1;
-<a name="l00108"></a>00108 } <span class="comment">/* end of iInitDocumentMAC */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/wordole_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,820 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/wordole.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/wordole.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * wordole.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2004 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Deal with the OLE internals of a MS Word file</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00011"></a>00011 
-<a name="l00012"></a>00012 <span class="comment">/* Private type for Property Set Storage entries */</span>
-<a name="l00013"></a>00013 <span class="keyword">typedef</span> <span class="keyword">struct </span>pps_entry_tag {
-<a name="l00014"></a>00014         ULONG   ulNext;
-<a name="l00015"></a>00015         ULONG   ulPrevious;
-<a name="l00016"></a>00016         ULONG   ulDir;
-<a name="l00017"></a>00017         ULONG   ulSB;
-<a name="l00018"></a>00018         ULONG   ulSize;
-<a name="l00019"></a>00019         <span class="keywordtype">int</span>     iLevel;
-<a name="l00020"></a>00020         <span class="keywordtype">char</span>    szName[32];
-<a name="l00021"></a>00021         UCHAR   ucType;
-<a name="l00022"></a>00022 } pps_entry_type;
-<a name="l00023"></a>00023 
-<a name="l00024"></a>00024 <span class="comment">/* Show that a PPS number or index should not be used */</span>
-<a name="l00025"></a>00025 <span class="preprocessor">#define PPS_NUMBER_INVALID      0xffffffffUL</span>
-<a name="l00026"></a>00026 <span class="preprocessor"></span>
-<a name="l00027"></a>00027 
-<a name="l00028"></a>00028 <span class="comment">/* Macro to make sure all such statements will be identical */</span>
-<a name="l00029"></a>00029 <span class="preprocessor">#define FREE_ALL()              \</span>
-<a name="l00030"></a>00030 <span class="preprocessor">        do {\</span>
-<a name="l00031"></a>00031 <span class="preprocessor">                vDestroySmallBlockList();\</span>
-<a name="l00032"></a>00032 <span class="preprocessor">                aulRootList = xfree(aulRootList);\</span>
-<a name="l00033"></a>00033 <span class="preprocessor">                aulSbdList = xfree(aulSbdList);\</span>
-<a name="l00034"></a>00034 <span class="preprocessor">                aulBbdList = xfree(aulBbdList);\</span>
-<a name="l00035"></a>00035 <span class="preprocessor">                aulSBD = xfree(aulSBD);\</span>
-<a name="l00036"></a>00036 <span class="preprocessor">                aulBBD = xfree(aulBBD);\</span>
-<a name="l00037"></a>00037 <span class="preprocessor">        } while(0)</span>
-<a name="l00038"></a>00038 <span class="preprocessor"></span>
-<a name="l00039"></a>00039 
-<a name="l00040"></a>00040 <span class="comment">/*</span>
-<a name="l00041"></a>00041 <span class="comment"> * ulReadLong - read four bytes from the given file and offset</span>
-<a name="l00042"></a>00042 <span class="comment"> */</span>
-<a name="l00043"></a>00043 <span class="keyword">static</span> ULONG
-<a name="l00044"></a>00044 ulReadLong(FILE *pFile, ULONG ulOffset)
-<a name="l00045"></a>00045 {
-<a name="l00046"></a>00046         UCHAR   aucBytes[4];
-<a name="l00047"></a>00047 
-<a name="l00048"></a>00048         fail(pFile == NULL);
-<a name="l00049"></a>00049 
-<a name="l00050"></a>00050         <span class="keywordflow">if</span> (!bReadBytes(aucBytes, 4, ulOffset, pFile)) {
-<a name="l00051"></a>00051                 werr(1, <span class="stringliteral">&quot;Read long 0x%lx not possible&quot;</span>, ulOffset);
-<a name="l00052"></a>00052         }
-<a name="l00053"></a>00053         <span class="keywordflow">return</span> ulGetLong(0, aucBytes);
-<a name="l00054"></a>00054 } <span class="comment">/* end of ulReadLong */</span>
-<a name="l00055"></a>00055 
-<a name="l00056"></a>00056 <span class="comment">/*</span>
-<a name="l00057"></a>00057 <span class="comment"> * vName2String - turn the name into a proper string.</span>
-<a name="l00058"></a>00058 <span class="comment"> */</span>
-<a name="l00059"></a>00059 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00060"></a>00060 vName2String(<span class="keywordtype">char</span> *szName, <span class="keyword">const</span> UCHAR *aucBytes, <span class="keywordtype">size_t</span> tNameSize)
-<a name="l00061"></a>00061 {
-<a name="l00062"></a>00062         <span class="keywordtype">char</span>    *pcChar;
-<a name="l00063"></a>00063         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00064"></a>00064 
-<a name="l00065"></a>00065         fail(aucBytes == NULL || szName == NULL);
-<a name="l00066"></a>00066 
-<a name="l00067"></a>00067         <span class="keywordflow">if</span> (tNameSize &lt; 2) {
-<a name="l00068"></a>00068                 szName[0] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00069"></a>00069                 <span class="keywordflow">return</span>;
-<a name="l00070"></a>00070         }
-<a name="l00071"></a>00071         <span class="keywordflow">for</span> (tIndex = 0, pcChar = szName;
-<a name="l00072"></a>00072              tIndex &lt; 2 * tNameSize;
-<a name="l00073"></a>00073              tIndex += 2, pcChar++) {
-<a name="l00074"></a>00074                 *pcChar = (char)aucBytes[tIndex];
-<a name="l00075"></a>00075         }
-<a name="l00076"></a>00076         szName[tNameSize - 1] = <span class="charliteral">&#39;\0&#39;</span>;
-<a name="l00077"></a>00077 } <span class="comment">/* end of vName2String */</span>
-<a name="l00078"></a>00078 
-<a name="l00079"></a>00079 <span class="comment">/*</span>
-<a name="l00080"></a>00080 <span class="comment"> * tReadBlockIndices - read the Big/Small Block Depot indices</span>
-<a name="l00081"></a>00081 <span class="comment"> *</span>
-<a name="l00082"></a>00082 <span class="comment"> * Returns the number of indices read</span>
-<a name="l00083"></a>00083 <span class="comment"> */</span>
-<a name="l00084"></a>00084 <span class="keyword">static</span> <span class="keywordtype">size_t</span>
-<a name="l00085"></a>00085 tReadBlockIndices(FILE *pFile, ULONG *aulBlockDepot,
-<a name="l00086"></a>00086         <span class="keywordtype">size_t</span> tMaxRec, ULONG ulOffset)
-<a name="l00087"></a>00087 {
-<a name="l00088"></a>00088         <span class="keywordtype">size_t</span>  tDone;
-<a name="l00089"></a>00089         <span class="keywordtype">int</span>     iIndex;
-<a name="l00090"></a>00090         UCHAR   aucBytes[BIG_BLOCK_SIZE];
-<a name="l00091"></a>00091 
-<a name="l00092"></a>00092         fail(pFile == NULL || aulBlockDepot == NULL);
-<a name="l00093"></a>00093         fail(tMaxRec == 0);
-<a name="l00094"></a>00094 
-<a name="l00095"></a>00095         <span class="comment">/* Read a big block with BBD or SBD indices */</span>
-<a name="l00096"></a>00096         <span class="keywordflow">if</span> (!bReadBytes(aucBytes, BIG_BLOCK_SIZE, ulOffset, pFile)) {
-<a name="l00097"></a>00097                 werr(0, <span class="stringliteral">&quot;Reading big block from 0x%lx is not possible&quot;</span>,
-<a name="l00098"></a>00098                         ulOffset);
-<a name="l00099"></a>00099                 <span class="keywordflow">return</span> 0;
-<a name="l00100"></a>00100         }
-<a name="l00101"></a>00101         <span class="comment">/* Split the big block into indices, an index is four bytes */</span>
-<a name="l00102"></a>00102         tDone = min(tMaxRec, (<span class="keywordtype">size_t</span>)BIG_BLOCK_SIZE / 4);
-<a name="l00103"></a>00103         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; (int)tDone; iIndex++) {
-<a name="l00104"></a>00104                 aulBlockDepot[iIndex] = ulGetLong(4 * iIndex, aucBytes);
-<a name="l00105"></a>00105                 NO_DBG_DEC(aulBlockDepot[iIndex]);
-<a name="l00106"></a>00106         }
-<a name="l00107"></a>00107         <span class="keywordflow">return</span> tDone;
-<a name="l00108"></a>00108 } <span class="comment">/* end of tReadBlockIndices */</span>
-<a name="l00109"></a>00109 
-<a name="l00110"></a>00110 <span class="comment">/*</span>
-<a name="l00111"></a>00111 <span class="comment"> * bGetBBD - get the Big Block Depot indices from the index-blocks</span>
-<a name="l00112"></a>00112 <span class="comment"> */</span>
-<a name="l00113"></a>00113 <span class="keyword">static</span> BOOL
-<a name="l00114"></a>00114 bGetBBD(FILE *pFile, <span class="keyword">const</span> ULONG *aulDepot, <span class="keywordtype">size_t</span> tDepotLen,
-<a name="l00115"></a>00115         ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen)
-<a name="l00116"></a>00116 {
-<a name="l00117"></a>00117         ULONG   ulBegin;
-<a name="l00118"></a>00118         <span class="keywordtype">size_t</span>  tToGo, tDone;
-<a name="l00119"></a>00119         <span class="keywordtype">int</span>     iIndex;
-<a name="l00120"></a>00120 
-<a name="l00121"></a>00121         fail(pFile == NULL || aulDepot == NULL || aulBBD == NULL);
-<a name="l00122"></a>00122 
-<a name="l00123"></a>00123         DBG_MSG(<span class="stringliteral">&quot;bGetBBD&quot;</span>);
-<a name="l00124"></a>00124 
-<a name="l00125"></a>00125         tToGo = tBBDLen;
-<a name="l00126"></a>00126         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; (int)tDepotLen &amp;&amp; tToGo != 0; iIndex++) {
-<a name="l00127"></a>00127                 ulBegin = (aulDepot[iIndex] + 1) * BIG_BLOCK_SIZE;
-<a name="l00128"></a>00128                 NO_DBG_HEX(ulBegin);
-<a name="l00129"></a>00129                 tDone = tReadBlockIndices(pFile, aulBBD, tToGo, ulBegin);
-<a name="l00130"></a>00130                 fail(tDone &gt; tToGo);
-<a name="l00131"></a>00131                 <span class="keywordflow">if</span> (tDone == 0) {
-<a name="l00132"></a>00132                         <span class="keywordflow">return</span> FALSE;
-<a name="l00133"></a>00133                 }
-<a name="l00134"></a>00134                 aulBBD += tDone;
-<a name="l00135"></a>00135                 tToGo -= tDone;
-<a name="l00136"></a>00136         }
-<a name="l00137"></a>00137         <span class="keywordflow">return</span> tToGo == 0;
-<a name="l00138"></a>00138 } <span class="comment">/* end of bGetBBD */</span>
-<a name="l00139"></a>00139 
-<a name="l00140"></a>00140 <span class="comment">/*</span>
-<a name="l00141"></a>00141 <span class="comment"> * bGetSBD - get the Small Block Depot indices from the index-blocks</span>
-<a name="l00142"></a>00142 <span class="comment"> */</span>
-<a name="l00143"></a>00143 <span class="keyword">static</span> BOOL
-<a name="l00144"></a>00144 bGetSBD(FILE *pFile, <span class="keyword">const</span> ULONG *aulDepot, <span class="keywordtype">size_t</span> tDepotLen,
-<a name="l00145"></a>00145         ULONG *aulSBD, <span class="keywordtype">size_t</span> tSBDLen)
-<a name="l00146"></a>00146 {
-<a name="l00147"></a>00147         ULONG   ulBegin;
-<a name="l00148"></a>00148         <span class="keywordtype">size_t</span>  tToGo, tDone;
-<a name="l00149"></a>00149         <span class="keywordtype">int</span>     iIndex;
-<a name="l00150"></a>00150 
-<a name="l00151"></a>00151         fail(pFile == NULL || aulDepot == NULL || aulSBD == NULL);
-<a name="l00152"></a>00152 
-<a name="l00153"></a>00153         DBG_MSG(<span class="stringliteral">&quot;bGetSBD&quot;</span>);
-<a name="l00154"></a>00154 
-<a name="l00155"></a>00155         tToGo = tSBDLen;
-<a name="l00156"></a>00156         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; (int)tDepotLen &amp;&amp; tToGo != 0; iIndex++) {
-<a name="l00157"></a>00157                 fail(aulDepot[iIndex] &gt;= ULONG_MAX / BIG_BLOCK_SIZE);
-<a name="l00158"></a>00158                 ulBegin = (aulDepot[iIndex] + 1) * BIG_BLOCK_SIZE;
-<a name="l00159"></a>00159                 NO_DBG_HEX(ulBegin);
-<a name="l00160"></a>00160                 tDone = tReadBlockIndices(pFile, aulSBD, tToGo, ulBegin);
-<a name="l00161"></a>00161                 fail(tDone &gt; tToGo);
-<a name="l00162"></a>00162                 <span class="keywordflow">if</span> (tDone == 0) {
-<a name="l00163"></a>00163                         <span class="keywordflow">return</span> FALSE;
-<a name="l00164"></a>00164                 }
-<a name="l00165"></a>00165                 aulSBD += tDone;
-<a name="l00166"></a>00166                 tToGo -= tDone;
-<a name="l00167"></a>00167         }
-<a name="l00168"></a>00168         <span class="keywordflow">return</span> tToGo == 0;
-<a name="l00169"></a>00169 } <span class="comment">/* end of bGetSBD */</span>
-<a name="l00170"></a>00170 
-<a name="l00171"></a>00171 <span class="comment">/*</span>
-<a name="l00172"></a>00172 <span class="comment"> * vComputePPSlevels - compute the levels of the Property Set Storage entries</span>
-<a name="l00173"></a>00173 <span class="comment"> */</span>
-<a name="l00174"></a>00174 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00175"></a>00175 vComputePPSlevels(pps_entry_type *atPPSlist, pps_entry_type *pNode,
-<a name="l00176"></a>00176                         <span class="keywordtype">int</span> iLevel, <span class="keywordtype">int</span> iRecursionLevel)
-<a name="l00177"></a>00177 {
-<a name="l00178"></a>00178         fail(atPPSlist == NULL || pNode == NULL);
-<a name="l00179"></a>00179         fail(iLevel &lt; 0 || iRecursionLevel &lt; 0);
-<a name="l00180"></a>00180 
-<a name="l00181"></a>00181         <span class="keywordflow">if</span> (iRecursionLevel &gt; 25) {
-<a name="l00182"></a>00182                 <span class="comment">/* This removes the possibility of an infinite recursion */</span>
-<a name="l00183"></a>00183                 DBG_DEC(iRecursionLevel);
-<a name="l00184"></a>00184                 <span class="keywordflow">return</span>;
-<a name="l00185"></a>00185         }
-<a name="l00186"></a>00186         <span class="keywordflow">if</span> (pNode-&gt;iLevel &lt;= iLevel) {
-<a name="l00187"></a>00187                 <span class="comment">/* Avoid entering a loop */</span>
-<a name="l00188"></a>00188                 DBG_DEC(iLevel);
-<a name="l00189"></a>00189                 DBG_DEC(pNode-&gt;iLevel);
-<a name="l00190"></a>00190                 <span class="keywordflow">return</span>;
-<a name="l00191"></a>00191         }
-<a name="l00192"></a>00192 
-<a name="l00193"></a>00193         pNode-&gt;iLevel = iLevel;
-<a name="l00194"></a>00194 
-<a name="l00195"></a>00195         <span class="keywordflow">if</span> (pNode-&gt;ulDir != PPS_NUMBER_INVALID) {
-<a name="l00196"></a>00196                 vComputePPSlevels(atPPSlist,
-<a name="l00197"></a>00197                                 &amp;atPPSlist[pNode-&gt;ulDir],
-<a name="l00198"></a>00198                                 iLevel + 1,
-<a name="l00199"></a>00199                                 iRecursionLevel + 1);
-<a name="l00200"></a>00200         }
-<a name="l00201"></a>00201         <span class="keywordflow">if</span> (pNode-&gt;ulNext != PPS_NUMBER_INVALID) {
-<a name="l00202"></a>00202                 vComputePPSlevels(atPPSlist,
-<a name="l00203"></a>00203                                 &amp;atPPSlist[pNode-&gt;ulNext],
-<a name="l00204"></a>00204                                 iLevel,
-<a name="l00205"></a>00205                                 iRecursionLevel + 1);
-<a name="l00206"></a>00206         }
-<a name="l00207"></a>00207         <span class="keywordflow">if</span> (pNode-&gt;ulPrevious != PPS_NUMBER_INVALID) {
-<a name="l00208"></a>00208                 vComputePPSlevels(atPPSlist,
-<a name="l00209"></a>00209                                 &amp;atPPSlist[pNode-&gt;ulPrevious],
-<a name="l00210"></a>00210                                 iLevel,
-<a name="l00211"></a>00211                                 iRecursionLevel + 1);
-<a name="l00212"></a>00212         }
-<a name="l00213"></a>00213 } <span class="comment">/* end of vComputePPSlevels */</span>
-<a name="l00214"></a>00214 
-<a name="l00215"></a>00215 <span class="comment">/*</span>
-<a name="l00216"></a>00216 <span class="comment"> * bGetPPS - search the Property Set Storage for three sets</span>
-<a name="l00217"></a>00217 <span class="comment"> *</span>
-<a name="l00218"></a>00218 <span class="comment"> * Return TRUE if the WordDocument PPS is found</span>
-<a name="l00219"></a>00219 <span class="comment"> */</span>
-<a name="l00220"></a>00220 <span class="keyword">static</span> BOOL
-<a name="l00221"></a>00221 bGetPPS(FILE *pFile,
-<a name="l00222"></a>00222         <span class="keyword">const</span> ULONG *aulRootList, <span class="keywordtype">size_t</span> tRootListLen, pps_info_type *pPPS)
-<a name="l00223"></a>00223 {
-<a name="l00224"></a>00224         pps_entry_type  *atPPSlist;
-<a name="l00225"></a>00225         ULONG   ulBegin, ulOffset, ulTmp;
-<a name="l00226"></a>00226         <span class="keywordtype">size_t</span>  tNbrOfPPS, tNameSize;
-<a name="l00227"></a>00227         <span class="keywordtype">int</span>     iIndex, iStartBlock, iRootIndex;
-<a name="l00228"></a>00228         BOOL    bWord, bExcel;
-<a name="l00229"></a>00229         UCHAR   aucBytes[PROPERTY_SET_STORAGE_SIZE];
-<a name="l00230"></a>00230 
-<a name="l00231"></a>00231         fail(pFile == NULL || aulRootList == NULL || pPPS == NULL);
-<a name="l00232"></a>00232 
-<a name="l00233"></a>00233         DBG_MSG(<span class="stringliteral">&quot;bGetPPS&quot;</span>);
-<a name="l00234"></a>00234 
-<a name="l00235"></a>00235         NO_DBG_DEC(tRootListLen);
-<a name="l00236"></a>00236 
-<a name="l00237"></a>00237         bWord = FALSE;
-<a name="l00238"></a>00238         bExcel = FALSE;
-<a name="l00239"></a>00239         (void)memset(pPPS, 0, <span class="keyword">sizeof</span>(*pPPS));
-<a name="l00240"></a>00240 
-<a name="l00241"></a>00241         <span class="comment">/* Read and store all the Property Set Storage entries */</span>
-<a name="l00242"></a>00242 
-<a name="l00243"></a>00243         tNbrOfPPS = tRootListLen * BIG_BLOCK_SIZE / PROPERTY_SET_STORAGE_SIZE;
-<a name="l00244"></a>00244         atPPSlist = xcalloc(tNbrOfPPS, <span class="keyword">sizeof</span>(pps_entry_type));
-<a name="l00245"></a>00245         iRootIndex = 0;
-<a name="l00246"></a>00246 
-<a name="l00247"></a>00247         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; (int)tNbrOfPPS; iIndex++) {
-<a name="l00248"></a>00248                 ulTmp = (ULONG)iIndex * PROPERTY_SET_STORAGE_SIZE;
-<a name="l00249"></a>00249                 iStartBlock = (int)(ulTmp / BIG_BLOCK_SIZE);
-<a name="l00250"></a>00250                 ulOffset = ulTmp % BIG_BLOCK_SIZE;
-<a name="l00251"></a>00251                 ulBegin = (aulRootList[iStartBlock] + 1) * BIG_BLOCK_SIZE +
-<a name="l00252"></a>00252                                 ulOffset;
-<a name="l00253"></a>00253                 NO_DBG_HEX(ulBegin);
-<a name="l00254"></a>00254                 <span class="keywordflow">if</span> (!bReadBytes(aucBytes, PROPERTY_SET_STORAGE_SIZE,
-<a name="l00255"></a>00255                                                         ulBegin, pFile)) {
-<a name="l00256"></a>00256                         werr(0, <span class="stringliteral">&quot;Reading PPS %d is not possible&quot;</span>, iIndex);
-<a name="l00257"></a>00257                         atPPSlist = xfree(atPPSlist);
-<a name="l00258"></a>00258                         <span class="keywordflow">return</span> FALSE;
-<a name="l00259"></a>00259                 }
-<a name="l00260"></a>00260                 tNameSize = (size_t)usGetWord(0x40, aucBytes);
-<a name="l00261"></a>00261                 tNameSize = (tNameSize + 1) / 2;
-<a name="l00262"></a>00262                 vName2String(atPPSlist[iIndex].szName, aucBytes, tNameSize);
-<a name="l00263"></a>00263                 atPPSlist[iIndex].ucType = ucGetByte(0x42, aucBytes);
-<a name="l00264"></a>00264                 <span class="keywordflow">if</span> (atPPSlist[iIndex].ucType == 5) {
-<a name="l00265"></a>00265                         iRootIndex = iIndex;
-<a name="l00266"></a>00266                 }
-<a name="l00267"></a>00267                 atPPSlist[iIndex].ulPrevious = ulGetLong(0x44, aucBytes);
-<a name="l00268"></a>00268                 atPPSlist[iIndex].ulNext = ulGetLong(0x48, aucBytes);
-<a name="l00269"></a>00269                 atPPSlist[iIndex].ulDir = ulGetLong(0x4c, aucBytes);
-<a name="l00270"></a>00270                 atPPSlist[iIndex].ulSB = ulGetLong(0x74, aucBytes);
-<a name="l00271"></a>00271                 atPPSlist[iIndex].ulSize = ulGetLong(0x78, aucBytes);
-<a name="l00272"></a>00272                 atPPSlist[iIndex].iLevel = INT_MAX;
-<a name="l00273"></a>00273                 <span class="keywordflow">if</span> ((atPPSlist[iIndex].ulPrevious &gt;= (ULONG)tNbrOfPPS &amp;&amp;
-<a name="l00274"></a>00274                      atPPSlist[iIndex].ulPrevious != PPS_NUMBER_INVALID) ||
-<a name="l00275"></a>00275                     (atPPSlist[iIndex].ulNext &gt;= (ULONG)tNbrOfPPS &amp;&amp;
-<a name="l00276"></a>00276                      atPPSlist[iIndex].ulNext != PPS_NUMBER_INVALID) ||
-<a name="l00277"></a>00277                     (atPPSlist[iIndex].ulDir &gt;= (ULONG)tNbrOfPPS &amp;&amp;
-<a name="l00278"></a>00278                      atPPSlist[iIndex].ulDir != PPS_NUMBER_INVALID)) {
-<a name="l00279"></a>00279                         DBG_DEC(iIndex);
-<a name="l00280"></a>00280                         DBG_DEC(atPPSlist[iIndex].ulPrevious);
-<a name="l00281"></a>00281                         DBG_DEC(atPPSlist[iIndex].ulNext);
-<a name="l00282"></a>00282                         DBG_DEC(atPPSlist[iIndex].ulDir);
-<a name="l00283"></a>00283                         DBG_DEC(tNbrOfPPS);
-<a name="l00284"></a>00284                         werr(0, <span class="stringliteral">&quot;The Property Set Storage is damaged&quot;</span>);
-<a name="l00285"></a>00285                         atPPSlist = xfree(atPPSlist);
-<a name="l00286"></a>00286                         <span class="keywordflow">return</span> FALSE;
-<a name="l00287"></a>00287                 }
-<a name="l00288"></a>00288         }
-<a name="l00289"></a>00289 
-<a name="l00290"></a>00290 <span class="preprocessor">#if 0 </span><span class="comment">/* defined(DEBUG) */</span>
-<a name="l00291"></a>00291         DBG_MSG(<span class="stringliteral">&quot;Before&quot;</span>);
-<a name="l00292"></a>00292         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; (int)tNbrOfPPS; iIndex++) {
-<a name="l00293"></a>00293                 DBG_MSG(atPPSlist[iIndex].szName);
-<a name="l00294"></a>00294                 DBG_HEX(atPPSlist[iIndex].ulDir);
-<a name="l00295"></a>00295                 DBG_HEX(atPPSlist[iIndex].ulPrevious);
-<a name="l00296"></a>00296                 DBG_HEX(atPPSlist[iIndex].ulNext);
-<a name="l00297"></a>00297                 DBG_DEC(atPPSlist[iIndex].ulSB);
-<a name="l00298"></a>00298                 DBG_HEX(atPPSlist[iIndex].ulSize);
-<a name="l00299"></a>00299                 DBG_DEC(atPPSlist[iIndex].iLevel);
-<a name="l00300"></a>00300         }
-<a name="l00301"></a>00301 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00302"></a>00302 
-<a name="l00303"></a>00303         <span class="comment">/* Add level information to each entry */</span>
-<a name="l00304"></a>00304         vComputePPSlevels(atPPSlist, &amp;atPPSlist[iRootIndex], 0, 0);
-<a name="l00305"></a>00305 
-<a name="l00306"></a>00306         <span class="comment">/* Check the entries on level 1 for the required information */</span>
-<a name="l00307"></a>00307         NO_DBG_MSG(<span class="stringliteral">&quot;After&quot;</span>);
-<a name="l00308"></a>00308         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; (int)tNbrOfPPS; iIndex++) {
-<a name="l00309"></a>00309 <span class="preprocessor">#if 0 </span><span class="comment">/* defined(DEBUG) */</span>
-<a name="l00310"></a>00310                 DBG_MSG(atPPSlist[iIndex].szName);
-<a name="l00311"></a>00311                 DBG_HEX(atPPSlist[iIndex].ulDir);
-<a name="l00312"></a>00312                 DBG_HEX(atPPSlist[iIndex].ulPrevious);
-<a name="l00313"></a>00313                 DBG_HEX(atPPSlist[iIndex].ulNext);
-<a name="l00314"></a>00314                 DBG_DEC(atPPSlist[iIndex].ulSB);
-<a name="l00315"></a>00315                 DBG_HEX(atPPSlist[iIndex].ulSize);
-<a name="l00316"></a>00316                 DBG_DEC(atPPSlist[iIndex].iLevel);
-<a name="l00317"></a>00317 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00318"></a>00318                 <span class="keywordflow">if</span> (atPPSlist[iIndex].iLevel != 1 ||
-<a name="l00319"></a>00319                     atPPSlist[iIndex].ucType != 2 ||
-<a name="l00320"></a>00320                     atPPSlist[iIndex].szName[0] == <span class="charliteral">&#39;\0&#39;</span> ||
-<a name="l00321"></a>00321                     atPPSlist[iIndex].ulSize == 0) {
-<a name="l00322"></a>00322                         <span class="comment">/* This entry can be ignored */</span>
-<a name="l00323"></a>00323                         <span class="keywordflow">continue</span>;
-<a name="l00324"></a>00324                 }
-<a name="l00325"></a>00325                 <span class="keywordflow">if</span> (pPPS-&gt;tWordDocument.ulSize == 0 &amp;&amp;
-<a name="l00326"></a>00326                     STREQ(atPPSlist[iIndex].szName, <span class="stringliteral">&quot;WordDocument&quot;</span>)) {
-<a name="l00327"></a>00327                         pPPS-&gt;tWordDocument.ulSB = atPPSlist[iIndex].ulSB;
-<a name="l00328"></a>00328                         pPPS-&gt;tWordDocument.ulSize = atPPSlist[iIndex].ulSize;
-<a name="l00329"></a>00329                         bWord = TRUE;
-<a name="l00330"></a>00330                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pPPS-&gt;tData.ulSize == 0 &amp;&amp;
-<a name="l00331"></a>00331                            STREQ(atPPSlist[iIndex].szName, <span class="stringliteral">&quot;Data&quot;</span>)) {
-<a name="l00332"></a>00332                         pPPS-&gt;tData.ulSB = atPPSlist[iIndex].ulSB;
-<a name="l00333"></a>00333                         pPPS-&gt;tData.ulSize = atPPSlist[iIndex].ulSize;
-<a name="l00334"></a>00334                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pPPS-&gt;t0Table.ulSize == 0 &amp;&amp;
-<a name="l00335"></a>00335                            STREQ(atPPSlist[iIndex].szName, <span class="stringliteral">&quot;0Table&quot;</span>)) {
-<a name="l00336"></a>00336                         pPPS-&gt;t0Table.ulSB = atPPSlist[iIndex].ulSB;
-<a name="l00337"></a>00337                         pPPS-&gt;t0Table.ulSize = atPPSlist[iIndex].ulSize;
-<a name="l00338"></a>00338                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pPPS-&gt;t1Table.ulSize == 0 &amp;&amp;
-<a name="l00339"></a>00339                            STREQ(atPPSlist[iIndex].szName, <span class="stringliteral">&quot;1Table&quot;</span>)) {
-<a name="l00340"></a>00340                         pPPS-&gt;t1Table.ulSB = atPPSlist[iIndex].ulSB;
-<a name="l00341"></a>00341                         pPPS-&gt;t1Table.ulSize = atPPSlist[iIndex].ulSize;
-<a name="l00342"></a>00342                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pPPS-&gt;tSummaryInfo.ulSize == 0 &amp;&amp;
-<a name="l00343"></a>00343                            STREQ(atPPSlist[iIndex].szName,
-<a name="l00344"></a>00344                                                 <span class="stringliteral">&quot;\005SummaryInformation&quot;</span>)) {
-<a name="l00345"></a>00345                         pPPS-&gt;tSummaryInfo.ulSB = atPPSlist[iIndex].ulSB;
-<a name="l00346"></a>00346                         pPPS-&gt;tSummaryInfo.ulSize = atPPSlist[iIndex].ulSize;
-<a name="l00347"></a>00347                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (pPPS-&gt;tDocSummaryInfo.ulSize == 0 &amp;&amp;
-<a name="l00348"></a>00348                            STREQ(atPPSlist[iIndex].szName,
-<a name="l00349"></a>00349                                         <span class="stringliteral">&quot;\005DocumentSummaryInformation&quot;</span>)) {
-<a name="l00350"></a>00350                         pPPS-&gt;tDocSummaryInfo.ulSB = atPPSlist[iIndex].ulSB;
-<a name="l00351"></a>00351                         pPPS-&gt;tDocSummaryInfo.ulSize = atPPSlist[iIndex].ulSize;
-<a name="l00352"></a>00352                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (STREQ(atPPSlist[iIndex].szName, <span class="stringliteral">&quot;Book&quot;</span>) ||
-<a name="l00353"></a>00353                            STREQ(atPPSlist[iIndex].szName, <span class="stringliteral">&quot;Workbook&quot;</span>)) {
-<a name="l00354"></a>00354                         bExcel = TRUE;
-<a name="l00355"></a>00355                 }
-<a name="l00356"></a>00356         }
-<a name="l00357"></a>00357 
-<a name="l00358"></a>00358         <span class="comment">/* Free the space for the Property Set Storage entries */</span>
-<a name="l00359"></a>00359         atPPSlist = xfree(atPPSlist);
-<a name="l00360"></a>00360 
-<a name="l00361"></a>00361         <span class="comment">/* Draw your conclusions */</span>
-<a name="l00362"></a>00362         <span class="keywordflow">if</span> (bWord) {
-<a name="l00363"></a>00363                 <span class="keywordflow">return</span> TRUE;
-<a name="l00364"></a>00364         }
-<a name="l00365"></a>00365 
-<a name="l00366"></a>00366         <span class="keywordflow">if</span> (bExcel) {
-<a name="l00367"></a>00367                 werr(0, <span class="stringliteral">&quot;Sorry, but this is an Excel spreadsheet&quot;</span>);
-<a name="l00368"></a>00368         } <span class="keywordflow">else</span> {
-<a name="l00369"></a>00369                 werr(0, <span class="stringliteral">&quot;This OLE file does not contain a Word document&quot;</span>);
-<a name="l00370"></a>00370         }
-<a name="l00371"></a>00371         <span class="keywordflow">return</span> FALSE;
-<a name="l00372"></a>00372 } <span class="comment">/* end of bGetPPS */</span>
-<a name="l00373"></a>00373 
-<a name="l00374"></a>00374 <span class="comment">/*</span>
-<a name="l00375"></a>00375 <span class="comment"> * vGetBbdList - make a list of the places to find big blocks</span>
-<a name="l00376"></a>00376 <span class="comment"> */</span>
-<a name="l00377"></a>00377 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00378"></a>00378 vGetBbdList(FILE *pFile, <span class="keywordtype">int</span> iNbr, ULONG *aulBbdList, ULONG ulOffset)
-<a name="l00379"></a>00379 {
-<a name="l00380"></a>00380         <span class="keywordtype">int</span>     iIndex;
-<a name="l00381"></a>00381 
-<a name="l00382"></a>00382         fail(pFile == NULL);
-<a name="l00383"></a>00383         fail(iNbr &gt; 127);
-<a name="l00384"></a>00384         fail(aulBbdList == NULL);
-<a name="l00385"></a>00385 
-<a name="l00386"></a>00386         NO_DBG_DEC(iNbr);
-<a name="l00387"></a>00387         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; iNbr; iIndex++) {
-<a name="l00388"></a>00388                 aulBbdList[iIndex] =
-<a name="l00389"></a>00389                         ulReadLong(pFile, ulOffset + 4 * (ULONG)iIndex);
-<a name="l00390"></a>00390                 NO_DBG_DEC(iIndex);
-<a name="l00391"></a>00391                 NO_DBG_HEX(aulBbdList[iIndex]);
-<a name="l00392"></a>00392         }
-<a name="l00393"></a>00393 } <span class="comment">/* end of vGetBbdList */</span>
-<a name="l00394"></a>00394 
-<a name="l00395"></a>00395 <span class="comment">/*</span>
-<a name="l00396"></a>00396 <span class="comment"> * bGetDocumentText - make a list of the text blocks of a Word document</span>
-<a name="l00397"></a>00397 <span class="comment"> *</span>
-<a name="l00398"></a>00398 <span class="comment"> * Return TRUE when succesful, otherwise FALSE</span>
-<a name="l00399"></a>00399 <span class="comment"> */</span>
-<a name="l00400"></a>00400 <span class="keyword">static</span> BOOL
-<a name="l00401"></a>00401 bGetDocumentText(FILE *pFile, <span class="keyword">const</span> pps_info_type *pPPS,
-<a name="l00402"></a>00402         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00403"></a>00403         <span class="keyword">const</span> ULONG *aulSBD, <span class="keywordtype">size_t</span> tSBDLen,
-<a name="l00404"></a>00404         <span class="keyword">const</span> UCHAR *aucHeader, <span class="keywordtype">int</span> iWordVersion)
-<a name="l00405"></a>00405 {
-<a name="l00406"></a>00406         ULONG   ulBeginOfText;
-<a name="l00407"></a>00407         ULONG   ulTextLen, ulFootnoteLen, ulEndnoteLen;
-<a name="l00408"></a>00408         ULONG   ulHdrFtrLen, ulMacroLen, ulAnnotationLen;
-<a name="l00409"></a>00409         ULONG   ulTextBoxLen, ulHdrTextBoxLen;
-<a name="l00410"></a>00410         UINT    uiQuickSaves;
-<a name="l00411"></a>00411         BOOL    bFarEastWord, bTemplate, bFastSaved, bEncrypted, bSuccess;
-<a name="l00412"></a>00412         USHORT  usIdent, usDocStatus;
-<a name="l00413"></a>00413 
-<a name="l00414"></a>00414         fail(pFile == NULL || pPPS == NULL);
-<a name="l00415"></a>00415         fail(aulBBD == NULL);
-<a name="l00416"></a>00416         fail(aulSBD == NULL);
-<a name="l00417"></a>00417 
-<a name="l00418"></a>00418         DBG_MSG(<span class="stringliteral">&quot;bGetDocumentText&quot;</span>);
-<a name="l00419"></a>00419 
-<a name="l00420"></a>00420         <span class="comment">/* Get the &quot;magic number&quot; from the header */</span>
-<a name="l00421"></a>00421         usIdent = usGetWord(0x00, aucHeader);
-<a name="l00422"></a>00422         DBG_HEX(usIdent);
-<a name="l00423"></a>00423         bFarEastWord = usIdent == 0x8098 || usIdent == 0x8099 ||
-<a name="l00424"></a>00424                         usIdent == 0xa697 || usIdent == 0xa699;
-<a name="l00425"></a>00425         <span class="comment">/* Get the status flags from the header */</span>
-<a name="l00426"></a>00426         usDocStatus = usGetWord(0x0a, aucHeader);
-<a name="l00427"></a>00427         DBG_HEX(usDocStatus);
-<a name="l00428"></a>00428         bTemplate = (usDocStatus &amp; BIT(0)) != 0;
-<a name="l00429"></a>00429         DBG_MSG_C(bTemplate, <span class="stringliteral">&quot;This document is a Template&quot;</span>);
-<a name="l00430"></a>00430         bFastSaved = (usDocStatus &amp; BIT(2)) != 0;
-<a name="l00431"></a>00431         uiQuickSaves = (UINT)(usDocStatus &amp; 0x00f0) &gt;&gt; 4;
-<a name="l00432"></a>00432         DBG_MSG_C(bFastSaved, <span class="stringliteral">&quot;This document is Fast Saved&quot;</span>);
-<a name="l00433"></a>00433         DBG_DEC_C(bFastSaved, uiQuickSaves);
-<a name="l00434"></a>00434         bEncrypted = (usDocStatus &amp; BIT(8)) != 0;
-<a name="l00435"></a>00435         <span class="keywordflow">if</span> (bEncrypted) {
-<a name="l00436"></a>00436                 werr(0, <span class="stringliteral">&quot;Encrypted documents are not supported&quot;</span>);
-<a name="l00437"></a>00437                 <span class="keywordflow">return</span> FALSE;
-<a name="l00438"></a>00438         }
-<a name="l00439"></a>00439 
-<a name="l00440"></a>00440         <span class="comment">/* Get length information */</span>
-<a name="l00441"></a>00441         ulBeginOfText = ulGetLong(0x18, aucHeader);
-<a name="l00442"></a>00442         DBG_HEX(ulBeginOfText);
-<a name="l00443"></a>00443         <span class="keywordflow">switch</span> (iWordVersion) {
-<a name="l00444"></a>00444         <span class="keywordflow">case</span> 6:
-<a name="l00445"></a>00445         <span class="keywordflow">case</span> 7:
-<a name="l00446"></a>00446                 ulTextLen = ulGetLong(0x34, aucHeader);
-<a name="l00447"></a>00447                 ulFootnoteLen = ulGetLong(0x38, aucHeader);
-<a name="l00448"></a>00448                 ulHdrFtrLen = ulGetLong(0x3c, aucHeader);
-<a name="l00449"></a>00449                 ulMacroLen = ulGetLong(0x40, aucHeader);
-<a name="l00450"></a>00450                 ulAnnotationLen = ulGetLong(0x44, aucHeader);
-<a name="l00451"></a>00451                 ulEndnoteLen = ulGetLong(0x48, aucHeader);
-<a name="l00452"></a>00452                 ulTextBoxLen = ulGetLong(0x4c, aucHeader);
-<a name="l00453"></a>00453                 ulHdrTextBoxLen = ulGetLong(0x50, aucHeader);
-<a name="l00454"></a>00454                 <span class="keywordflow">break</span>;
-<a name="l00455"></a>00455         <span class="keywordflow">case</span> 8:
-<a name="l00456"></a>00456                 ulTextLen = ulGetLong(0x4c, aucHeader);
-<a name="l00457"></a>00457                 ulFootnoteLen = ulGetLong(0x50, aucHeader);
-<a name="l00458"></a>00458                 ulHdrFtrLen = ulGetLong(0x54, aucHeader);
-<a name="l00459"></a>00459                 ulMacroLen = ulGetLong(0x58, aucHeader);
-<a name="l00460"></a>00460                 ulAnnotationLen = ulGetLong(0x5c, aucHeader);
-<a name="l00461"></a>00461                 ulEndnoteLen = ulGetLong(0x60, aucHeader);
-<a name="l00462"></a>00462                 ulTextBoxLen = ulGetLong(0x64, aucHeader);
-<a name="l00463"></a>00463                 ulHdrTextBoxLen = ulGetLong(0x68, aucHeader);
-<a name="l00464"></a>00464                 <span class="keywordflow">break</span>;
-<a name="l00465"></a>00465         <span class="keywordflow">default</span>:
-<a name="l00466"></a>00466                 werr(0, <span class="stringliteral">&quot;This version of Word is not supported&quot;</span>);
-<a name="l00467"></a>00467                 <span class="keywordflow">return</span> FALSE;
-<a name="l00468"></a>00468         }
-<a name="l00469"></a>00469         DBG_DEC(ulTextLen);
-<a name="l00470"></a>00470         DBG_DEC(ulFootnoteLen);
-<a name="l00471"></a>00471         DBG_DEC(ulHdrFtrLen);
-<a name="l00472"></a>00472         DBG_DEC(ulMacroLen);
-<a name="l00473"></a>00473         DBG_DEC(ulAnnotationLen);
-<a name="l00474"></a>00474         DBG_DEC(ulEndnoteLen);
-<a name="l00475"></a>00475         DBG_DEC(ulTextBoxLen);
-<a name="l00476"></a>00476         DBG_DEC(ulHdrTextBoxLen);
-<a name="l00477"></a>00477 
-<a name="l00478"></a>00478         <span class="comment">/* Make a list of the text blocks */</span>
-<a name="l00479"></a>00479         <span class="keywordflow">switch</span> (iWordVersion) {
-<a name="l00480"></a>00480         <span class="keywordflow">case</span> 6:
-<a name="l00481"></a>00481         <span class="keywordflow">case</span> 7:
-<a name="l00482"></a>00482                 <span class="keywordflow">if</span> (bFastSaved) {
-<a name="l00483"></a>00483                         bSuccess = bGet6DocumentText(pFile,
-<a name="l00484"></a>00484                                         bFarEastWord,
-<a name="l00485"></a>00485                                         pPPS-&gt;tWordDocument.ulSB,
-<a name="l00486"></a>00486                                         aulBBD, tBBDLen,
-<a name="l00487"></a>00487                                         aucHeader);
-<a name="l00488"></a>00488                 } <span class="keywordflow">else</span> {
-<a name="l00489"></a>00489                         bSuccess = bAddTextBlocks(ulBeginOfText,
-<a name="l00490"></a>00490                                 ulTextLen +
-<a name="l00491"></a>00491                                 ulFootnoteLen +
-<a name="l00492"></a>00492                                 ulHdrFtrLen +
-<a name="l00493"></a>00493                                 ulMacroLen + ulAnnotationLen +
-<a name="l00494"></a>00494                                 ulEndnoteLen +
-<a name="l00495"></a>00495                                 ulTextBoxLen + ulHdrTextBoxLen,
-<a name="l00496"></a>00496                                 bFarEastWord,
-<a name="l00497"></a>00497                                 IGNORE_PROPMOD,
-<a name="l00498"></a>00498                                 pPPS-&gt;tWordDocument.ulSB,
-<a name="l00499"></a>00499                                 aulBBD, tBBDLen);
-<a name="l00500"></a>00500                 }
-<a name="l00501"></a>00501                 <span class="keywordflow">break</span>;
-<a name="l00502"></a>00502         <span class="keywordflow">case</span> 8:
-<a name="l00503"></a>00503                 bSuccess = bGet8DocumentText(pFile,
-<a name="l00504"></a>00504                                 pPPS,
-<a name="l00505"></a>00505                                 aulBBD, tBBDLen, aulSBD, tSBDLen,
-<a name="l00506"></a>00506                                 aucHeader);
-<a name="l00507"></a>00507                 <span class="keywordflow">break</span>;
-<a name="l00508"></a>00508         <span class="keywordflow">default</span>:
-<a name="l00509"></a>00509                 werr(0, <span class="stringliteral">&quot;This version of Word is not supported&quot;</span>);
-<a name="l00510"></a>00510                 bSuccess = FALSE;
-<a name="l00511"></a>00511                 <span class="keywordflow">break</span>;
-<a name="l00512"></a>00512         }
-<a name="l00513"></a>00513 
-<a name="l00514"></a>00514         <span class="keywordflow">if</span> (bSuccess) {
-<a name="l00515"></a>00515                 vSplitBlockList(pFile,
-<a name="l00516"></a>00516                                 ulTextLen,
-<a name="l00517"></a>00517                                 ulFootnoteLen,
-<a name="l00518"></a>00518                                 ulHdrFtrLen,
-<a name="l00519"></a>00519                                 ulMacroLen,
-<a name="l00520"></a>00520                                 ulAnnotationLen,
-<a name="l00521"></a>00521                                 ulEndnoteLen,
-<a name="l00522"></a>00522                                 ulTextBoxLen,
-<a name="l00523"></a>00523                                 ulHdrTextBoxLen,
-<a name="l00524"></a>00524                                 !bFastSaved &amp;&amp; iWordVersion == 8);
-<a name="l00525"></a>00525         } <span class="keywordflow">else</span> {
-<a name="l00526"></a>00526                 vDestroyTextBlockList();
-<a name="l00527"></a>00527                 werr(0, <span class="stringliteral">&quot;I can&#39;t find the text of this document&quot;</span>);
-<a name="l00528"></a>00528         }
-<a name="l00529"></a>00529         <span class="keywordflow">return</span> bSuccess;
-<a name="l00530"></a>00530 } <span class="comment">/* end of bGetDocumentText */</span>
-<a name="l00531"></a>00531 
-<a name="l00532"></a>00532 <span class="comment">/*</span>
-<a name="l00533"></a>00533 <span class="comment"> * vGetDocumentData - make a list of the data blocks of a Word document</span>
-<a name="l00534"></a>00534 <span class="comment"> */</span>
-<a name="l00535"></a>00535 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00536"></a>00536 vGetDocumentData(FILE *pFile, <span class="keyword">const</span> pps_info_type *pPPS,
-<a name="l00537"></a>00537         <span class="keyword">const</span> ULONG *aulBBD, <span class="keywordtype">size_t</span> tBBDLen,
-<a name="l00538"></a>00538         <span class="keyword">const</span> UCHAR *aucHeader, <span class="keywordtype">int</span> iWordVersion)
-<a name="l00539"></a>00539 {
-<a name="l00540"></a>00540         options_type    tOptions;
-<a name="l00541"></a>00541         ULONG   ulBeginOfText;
-<a name="l00542"></a>00542         BOOL    bFastSaved, bHasImages, bSuccess;
-<a name="l00543"></a>00543         USHORT  usDocStatus;
-<a name="l00544"></a>00544 
-<a name="l00545"></a>00545         fail(pFile == NULL);
-<a name="l00546"></a>00546         fail(pPPS == NULL);
-<a name="l00547"></a>00547         fail(aulBBD == NULL);
-<a name="l00548"></a>00548 
-<a name="l00549"></a>00549         <span class="comment">/* Get the options */</span>
-<a name="l00550"></a>00550         vGetOptions(&amp;tOptions);
-<a name="l00551"></a>00551 
-<a name="l00552"></a>00552         <span class="comment">/* Get the status flags from the header */</span>
-<a name="l00553"></a>00553         usDocStatus = usGetWord(0x0a, aucHeader);
-<a name="l00554"></a>00554         DBG_HEX(usDocStatus);
-<a name="l00555"></a>00555         bFastSaved = (usDocStatus &amp; BIT(2)) != 0;
-<a name="l00556"></a>00556         bHasImages = (usDocStatus &amp; BIT(3)) != 0;
-<a name="l00557"></a>00557 
-<a name="l00558"></a>00558         <span class="keywordflow">if</span> (!bHasImages ||
-<a name="l00559"></a>00559             tOptions.eConversionType == conversion_text ||
-<a name="l00560"></a>00560             tOptions.eConversionType == conversion_fmt_text ||
-<a name="l00561"></a>00561             tOptions.eConversionType == conversion_xml ||
-<a name="l00562"></a>00562             tOptions.eImageLevel == level_no_images) {
-<a name="l00563"></a>00563                 <span class="comment">/*</span>
-<a name="l00564"></a>00564 <span class="comment">                 * No images in the document or text-only output or</span>
-<a name="l00565"></a>00565 <span class="comment">                 * no images wanted, so no data blocks will be needed</span>
-<a name="l00566"></a>00566 <span class="comment">                 */</span>
-<a name="l00567"></a>00567                 vDestroyDataBlockList();
-<a name="l00568"></a>00568                 <span class="keywordflow">return</span>;
-<a name="l00569"></a>00569         }
-<a name="l00570"></a>00570 
-<a name="l00571"></a>00571         <span class="comment">/* Get length information */</span>
-<a name="l00572"></a>00572         ulBeginOfText = ulGetLong(0x18, aucHeader);
-<a name="l00573"></a>00573         DBG_HEX(ulBeginOfText);
-<a name="l00574"></a>00574 
-<a name="l00575"></a>00575         <span class="comment">/* Make a list of the data blocks */</span>
-<a name="l00576"></a>00576         <span class="keywordflow">switch</span> (iWordVersion) {
-<a name="l00577"></a>00577         <span class="keywordflow">case</span> 6:
-<a name="l00578"></a>00578         <span class="keywordflow">case</span> 7:
-<a name="l00579"></a>00579                 <span class="comment">/*</span>
-<a name="l00580"></a>00580 <span class="comment">                 * The data blocks are in the text stream. The text stream</span>
-<a name="l00581"></a>00581 <span class="comment">                 * is in &quot;fast saved&quot; format or &quot;normal saved&quot; format</span>
-<a name="l00582"></a>00582 <span class="comment">                 */</span>
-<a name="l00583"></a>00583                 <span class="keywordflow">if</span> (bFastSaved) {
-<a name="l00584"></a>00584                         bSuccess = bGet6DocumentData(pFile,
-<a name="l00585"></a>00585                                         pPPS-&gt;tWordDocument.ulSB,
-<a name="l00586"></a>00586                                         aulBBD, tBBDLen,
-<a name="l00587"></a>00587                                         aucHeader);
-<a name="l00588"></a>00588                 } <span class="keywordflow">else</span> {
-<a name="l00589"></a>00589                         bSuccess = bAddDataBlocks(ulBeginOfText,
-<a name="l00590"></a>00590                                         (ULONG)LONG_MAX,
-<a name="l00591"></a>00591                                         pPPS-&gt;tWordDocument.ulSB,
-<a name="l00592"></a>00592                                         aulBBD, tBBDLen);
-<a name="l00593"></a>00593                 }
-<a name="l00594"></a>00594                 <span class="keywordflow">break</span>;
-<a name="l00595"></a>00595         <span class="keywordflow">case</span> 8:
-<a name="l00596"></a>00596                 <span class="comment">/*</span>
-<a name="l00597"></a>00597 <span class="comment">                 * The data blocks are in the data stream. The data stream</span>
-<a name="l00598"></a>00598 <span class="comment">                 * is always in &quot;normal saved&quot; format</span>
-<a name="l00599"></a>00599 <span class="comment">                 */</span>
-<a name="l00600"></a>00600                 bSuccess = bAddDataBlocks(0, (ULONG)LONG_MAX,
-<a name="l00601"></a>00601                                 pPPS-&gt;tData.ulSB, aulBBD, tBBDLen);
-<a name="l00602"></a>00602                 <span class="keywordflow">break</span>;
-<a name="l00603"></a>00603         <span class="keywordflow">default</span>:
-<a name="l00604"></a>00604                 werr(0, <span class="stringliteral">&quot;This version of Word is not supported&quot;</span>);
-<a name="l00605"></a>00605                 bSuccess = FALSE;
-<a name="l00606"></a>00606                 <span class="keywordflow">break</span>;
-<a name="l00607"></a>00607         }
-<a name="l00608"></a>00608 
-<a name="l00609"></a>00609         <span class="keywordflow">if</span> (!bSuccess) {
-<a name="l00610"></a>00610                 vDestroyDataBlockList();
-<a name="l00611"></a>00611                 werr(0, <span class="stringliteral">&quot;I can&#39;t find the data of this document&quot;</span>);
-<a name="l00612"></a>00612         }
-<a name="l00613"></a>00613 } <span class="comment">/* end of vGetDocumentData */</span>
-<a name="l00614"></a>00614 
-<a name="l00615"></a>00615 <span class="comment">/*</span>
-<a name="l00616"></a>00616 <span class="comment"> * iInitDocumentOLE - initialize an OLE document</span>
-<a name="l00617"></a>00617 <span class="comment"> *</span>
-<a name="l00618"></a>00618 <span class="comment"> * Returns the version of Word that made the document or -1</span>
-<a name="l00619"></a>00619 <span class="comment"> */</span>
-<a name="l00620"></a>00620 <span class="keywordtype">int</span>
-<a name="l00621"></a>00621 iInitDocumentOLE(FILE *pFile, <span class="keywordtype">long</span> lFilesize)
-<a name="l00622"></a>00622 {
-<a name="l00623"></a>00623         pps_info_type   PPS_info;
-<a name="l00624"></a>00624         ULONG   *aulBBD, *aulSBD;
-<a name="l00625"></a>00625         ULONG   *aulRootList, *aulBbdList, *aulSbdList;
-<a name="l00626"></a>00626         ULONG   ulBdbListStart, ulAdditionalBBDlist;
-<a name="l00627"></a>00627         ULONG   ulRootStartblock, ulSbdStartblock, ulSBLstartblock;
-<a name="l00628"></a>00628         ULONG   ulStart, ulTmp;
-<a name="l00629"></a>00629         <span class="keywordtype">long</span>    lMaxBlock;
-<a name="l00630"></a>00630         <span class="keywordtype">size_t</span>  tBBDLen, tSBDLen, tNumBbdBlocks, tRootListLen;
-<a name="l00631"></a>00631         <span class="keywordtype">int</span>     iWordVersion, iIndex, iToGo;
-<a name="l00632"></a>00632         BOOL    bSuccess;
-<a name="l00633"></a>00633         USHORT  usIdent, usDocStatus;
-<a name="l00634"></a>00634         UCHAR   aucHeader[HEADER_SIZE];
-<a name="l00635"></a>00635 
-<a name="l00636"></a>00636         fail(pFile == NULL);
-<a name="l00637"></a>00637 
-<a name="l00638"></a>00638         lMaxBlock = lFilesize / BIG_BLOCK_SIZE - 2;
-<a name="l00639"></a>00639         DBG_DEC(lMaxBlock);
-<a name="l00640"></a>00640         <span class="keywordflow">if</span> (lMaxBlock &lt; 1) {
-<a name="l00641"></a>00641                 <span class="keywordflow">return</span> -1;
-<a name="l00642"></a>00642         }
-<a name="l00643"></a>00643         tBBDLen = (size_t)(lMaxBlock + 1);
-<a name="l00644"></a>00644         tNumBbdBlocks = (size_t)ulReadLong(pFile, 0x2c);
-<a name="l00645"></a>00645         DBG_DEC(tNumBbdBlocks);
-<a name="l00646"></a>00646         ulRootStartblock = ulReadLong(pFile, 0x30);
-<a name="l00647"></a>00647         DBG_DEC(ulRootStartblock);
-<a name="l00648"></a>00648         ulSbdStartblock = ulReadLong(pFile, 0x3c);
-<a name="l00649"></a>00649         DBG_DEC(ulSbdStartblock);
-<a name="l00650"></a>00650         ulAdditionalBBDlist = ulReadLong(pFile, 0x44);
-<a name="l00651"></a>00651         DBG_HEX(ulAdditionalBBDlist);
-<a name="l00652"></a>00652         ulSBLstartblock = ulReadLong(pFile,
-<a name="l00653"></a>00653                         (ulRootStartblock + 1) * BIG_BLOCK_SIZE + 0x74);
-<a name="l00654"></a>00654         DBG_DEC(ulSBLstartblock);
-<a name="l00655"></a>00655         tSBDLen = (size_t)(ulReadLong(pFile,
-<a name="l00656"></a>00656                         (ulRootStartblock + 1) * BIG_BLOCK_SIZE + 0x78) /
-<a name="l00657"></a>00657                         SMALL_BLOCK_SIZE);
-<a name="l00658"></a>00658         <span class="comment">/* All to be xcalloc-ed pointers to NULL */</span>
-<a name="l00659"></a>00659         aulRootList = NULL;
-<a name="l00660"></a>00660         aulSbdList = NULL;
-<a name="l00661"></a>00661         aulBbdList = NULL;
-<a name="l00662"></a>00662         aulSBD = NULL;
-<a name="l00663"></a>00663         aulBBD = NULL;
-<a name="l00664"></a>00664 <span class="comment">/* Big Block Depot */</span>
-<a name="l00665"></a>00665         aulBbdList = xcalloc(tNumBbdBlocks, <span class="keyword">sizeof</span>(ULONG));
-<a name="l00666"></a>00666         aulBBD = xcalloc(tBBDLen, <span class="keyword">sizeof</span>(ULONG));
-<a name="l00667"></a>00667         iToGo = (int)tNumBbdBlocks;
-<a name="l00668"></a>00668         vGetBbdList(pFile, min(iToGo, 109),  aulBbdList, 0x4c);
-<a name="l00669"></a>00669         ulStart = 109;
-<a name="l00670"></a>00670         iToGo -= 109;
-<a name="l00671"></a>00671         <span class="keywordflow">while</span> (ulAdditionalBBDlist != END_OF_CHAIN &amp;&amp; iToGo &gt; 0) {
-<a name="l00672"></a>00672                 ulBdbListStart = (ulAdditionalBBDlist + 1) * BIG_BLOCK_SIZE;
-<a name="l00673"></a>00673                 vGetBbdList(pFile, min(iToGo, 127),
-<a name="l00674"></a>00674                                         aulBbdList + ulStart, ulBdbListStart);
-<a name="l00675"></a>00675                 ulAdditionalBBDlist = ulReadLong(pFile,
-<a name="l00676"></a>00676                                         ulBdbListStart + 4 * 127);
-<a name="l00677"></a>00677                 DBG_DEC(ulAdditionalBBDlist);
-<a name="l00678"></a>00678                 DBG_HEX(ulAdditionalBBDlist);
-<a name="l00679"></a>00679                 ulStart += 127;
-<a name="l00680"></a>00680                 iToGo -= 127;
-<a name="l00681"></a>00681         }
-<a name="l00682"></a>00682         <span class="keywordflow">if</span> (!bGetBBD(pFile, aulBbdList, tNumBbdBlocks, aulBBD, tBBDLen)) {
-<a name="l00683"></a>00683                 FREE_ALL();
-<a name="l00684"></a>00684                 <span class="keywordflow">return</span> -1;
-<a name="l00685"></a>00685         }
-<a name="l00686"></a>00686         aulBbdList = xfree(aulBbdList);
-<a name="l00687"></a>00687 <span class="comment">/* Small Block Depot */</span>
-<a name="l00688"></a>00688         aulSbdList = xcalloc(tBBDLen, <span class="keyword">sizeof</span>(ULONG));
-<a name="l00689"></a>00689         aulSBD = xcalloc(tSBDLen, <span class="keyword">sizeof</span>(ULONG));
-<a name="l00690"></a>00690         <span class="keywordflow">for</span> (iIndex = 0, ulTmp = ulSbdStartblock;
-<a name="l00691"></a>00691              iIndex &lt; (int)tBBDLen &amp;&amp; ulTmp != END_OF_CHAIN;
-<a name="l00692"></a>00692              iIndex++, ulTmp = aulBBD[ulTmp]) {
-<a name="l00693"></a>00693                 <span class="keywordflow">if</span> (ulTmp &gt;= (ULONG)tBBDLen) {
-<a name="l00694"></a>00694                         DBG_DEC(ulTmp);
-<a name="l00695"></a>00695                         DBG_DEC(tBBDLen);
-<a name="l00696"></a>00696                         werr(1, <span class="stringliteral">&quot;The Big Block Depot is damaged&quot;</span>);
-<a name="l00697"></a>00697                 }
-<a name="l00698"></a>00698                 aulSbdList[iIndex] = ulTmp;
-<a name="l00699"></a>00699                 NO_DBG_HEX(aulSbdList[iIndex]);
-<a name="l00700"></a>00700         }
-<a name="l00701"></a>00701         <span class="keywordflow">if</span> (!bGetSBD(pFile, aulSbdList, tBBDLen, aulSBD, tSBDLen)) {
-<a name="l00702"></a>00702                 FREE_ALL();
-<a name="l00703"></a>00703                 <span class="keywordflow">return</span> -1;
-<a name="l00704"></a>00704         }
-<a name="l00705"></a>00705         aulSbdList = xfree(aulSbdList);
-<a name="l00706"></a>00706 <span class="comment">/* Root list */</span>
-<a name="l00707"></a>00707         <span class="keywordflow">for</span> (tRootListLen = 0, ulTmp = ulRootStartblock;
-<a name="l00708"></a>00708              tRootListLen &lt; tBBDLen &amp;&amp; ulTmp != END_OF_CHAIN;
-<a name="l00709"></a>00709              tRootListLen++, ulTmp = aulBBD[ulTmp]) {
-<a name="l00710"></a>00710                 <span class="keywordflow">if</span> (ulTmp &gt;= (ULONG)tBBDLen) {
-<a name="l00711"></a>00711                         DBG_DEC(ulTmp);
-<a name="l00712"></a>00712                         DBG_DEC(tBBDLen);
-<a name="l00713"></a>00713                         werr(1, <span class="stringliteral">&quot;The Big Block Depot is damaged&quot;</span>);
-<a name="l00714"></a>00714                 }
-<a name="l00715"></a>00715         }
-<a name="l00716"></a>00716         <span class="keywordflow">if</span> (tRootListLen == 0) {
-<a name="l00717"></a>00717                 werr(0, <span class="stringliteral">&quot;No Rootlist found&quot;</span>);
-<a name="l00718"></a>00718                 FREE_ALL();
-<a name="l00719"></a>00719                 <span class="keywordflow">return</span> -1;
-<a name="l00720"></a>00720         }
-<a name="l00721"></a>00721         aulRootList = xcalloc(tRootListLen, <span class="keyword">sizeof</span>(ULONG));
-<a name="l00722"></a>00722         <span class="keywordflow">for</span> (iIndex = 0, ulTmp = ulRootStartblock;
-<a name="l00723"></a>00723              iIndex &lt; (int)tBBDLen &amp;&amp; ulTmp != END_OF_CHAIN;
-<a name="l00724"></a>00724              iIndex++, ulTmp = aulBBD[ulTmp]) {
-<a name="l00725"></a>00725                 <span class="keywordflow">if</span> (ulTmp &gt;= (ULONG)tBBDLen) {
-<a name="l00726"></a>00726                         DBG_DEC(ulTmp);
-<a name="l00727"></a>00727                         DBG_DEC(tBBDLen);
-<a name="l00728"></a>00728                         werr(1, <span class="stringliteral">&quot;The Big Block Depot is damaged&quot;</span>);
-<a name="l00729"></a>00729                 }
-<a name="l00730"></a>00730                 aulRootList[iIndex] = ulTmp;
-<a name="l00731"></a>00731                 NO_DBG_DEC(aulRootList[iIndex]);
-<a name="l00732"></a>00732         }
-<a name="l00733"></a>00733         fail(tRootListLen != (<span class="keywordtype">size_t</span>)iIndex);
-<a name="l00734"></a>00734         bSuccess = bGetPPS(pFile, aulRootList, tRootListLen, &amp;PPS_info);
-<a name="l00735"></a>00735         aulRootList = xfree(aulRootList);
-<a name="l00736"></a>00736         <span class="keywordflow">if</span> (!bSuccess) {
-<a name="l00737"></a>00737                 FREE_ALL();
-<a name="l00738"></a>00738                 <span class="keywordflow">return</span> -1;
-<a name="l00739"></a>00739         }
-<a name="l00740"></a>00740 <span class="comment">/* Small block list */</span>
-<a name="l00741"></a>00741         <span class="keywordflow">if</span> (!bCreateSmallBlockList(ulSBLstartblock, aulBBD, tBBDLen)) {
-<a name="l00742"></a>00742                 FREE_ALL();
-<a name="l00743"></a>00743                 <span class="keywordflow">return</span> -1;
-<a name="l00744"></a>00744         }
-<a name="l00745"></a>00745 
-<a name="l00746"></a>00746         <span class="keywordflow">if</span> (PPS_info.tWordDocument.ulSize &lt; MIN_SIZE_FOR_BBD_USE) {
-<a name="l00747"></a>00747                 DBG_DEC(PPS_info.tWordDocument.ulSize);
-<a name="l00748"></a>00748                 FREE_ALL();
-<a name="l00749"></a>00749                 werr(0, <span class="stringliteral">&quot;I&#39;m afraid the text stream of this file &quot;</span>
-<a name="l00750"></a>00750                         <span class="stringliteral">&quot;is too small to handle.&quot;</span>);
-<a name="l00751"></a>00751                 <span class="keywordflow">return</span> -1;
-<a name="l00752"></a>00752         }
-<a name="l00753"></a>00753         <span class="comment">/* Read the headerblock */</span>
-<a name="l00754"></a>00754         <span class="keywordflow">if</span> (!bReadBuffer(pFile, PPS_info.tWordDocument.ulSB,
-<a name="l00755"></a>00755                         aulBBD, tBBDLen, BIG_BLOCK_SIZE,
-<a name="l00756"></a>00756                         aucHeader, 0, HEADER_SIZE)) {
-<a name="l00757"></a>00757                 FREE_ALL();
-<a name="l00758"></a>00758                 <span class="keywordflow">return</span> -1;
-<a name="l00759"></a>00759         }
-<a name="l00760"></a>00760         usIdent = usGetWord(0x00, aucHeader);
-<a name="l00761"></a>00761         DBG_HEX(usIdent);
-<a name="l00762"></a>00762         fail(usIdent != 0x8098 &amp;&amp;       <span class="comment">/* Word 7 for oriental languages */</span>
-<a name="l00763"></a>00763              usIdent != 0x8099 &amp;&amp;       <span class="comment">/* Word 7 for oriental languages */</span>
-<a name="l00764"></a>00764              usIdent != 0xa5dc &amp;&amp;       <span class="comment">/* Word 6 &amp; 7 */</span>
-<a name="l00765"></a>00765              usIdent != 0xa5ec &amp;&amp;       <span class="comment">/* Word 7 &amp; 97 &amp; 98 */</span>
-<a name="l00766"></a>00766              usIdent != 0xa697 &amp;&amp;       <span class="comment">/* Word 7 for oriental languages */</span>
-<a name="l00767"></a>00767              usIdent != 0xa699);        <span class="comment">/* Word 7 for oriental languages */</span>
-<a name="l00768"></a>00768         iWordVersion = iGetVersionNumber(aucHeader);
-<a name="l00769"></a>00769         <span class="keywordflow">if</span> (iWordVersion &lt; 6) {
-<a name="l00770"></a>00770                 FREE_ALL();
-<a name="l00771"></a>00771                 werr(0, <span class="stringliteral">&quot;This file is from a version of Word before Word 6.&quot;</span>);
-<a name="l00772"></a>00772                 <span class="keywordflow">return</span> -1;
-<a name="l00773"></a>00773         }
-<a name="l00774"></a>00774 
-<a name="l00775"></a>00775         <span class="comment">/* Get the status flags from the header */</span>
-<a name="l00776"></a>00776         usDocStatus = usGetWord(0x0a, aucHeader);
-<a name="l00777"></a>00777         <span class="keywordflow">if</span> (usDocStatus &amp; BIT(9)) {
-<a name="l00778"></a>00778                 PPS_info.tTable = PPS_info.t1Table;
-<a name="l00779"></a>00779         } <span class="keywordflow">else</span> {
-<a name="l00780"></a>00780                 PPS_info.tTable = PPS_info.t0Table;
-<a name="l00781"></a>00781         }
-<a name="l00782"></a>00782         <span class="comment">/* Clean the entries that should not be used */</span>
-<a name="l00783"></a>00783         memset(&amp;PPS_info.t0Table, 0, <span class="keyword">sizeof</span>(PPS_info.t0Table));
-<a name="l00784"></a>00784         memset(&amp;PPS_info.t1Table, 0, <span class="keyword">sizeof</span>(PPS_info.t1Table));
-<a name="l00785"></a>00785 
-<a name="l00786"></a>00786         bSuccess = bGetDocumentText(pFile, &amp;PPS_info,
-<a name="l00787"></a>00787                         aulBBD, tBBDLen, aulSBD, tSBDLen,
-<a name="l00788"></a>00788                         aucHeader, iWordVersion);
-<a name="l00789"></a>00789         <span class="keywordflow">if</span> (bSuccess) {
-<a name="l00790"></a>00790                 vGetDocumentData(pFile, &amp;PPS_info,
-<a name="l00791"></a>00791                         aulBBD, tBBDLen, aucHeader, iWordVersion);
-<a name="l00792"></a>00792                 vGetPropertyInfo(pFile, &amp;PPS_info,
-<a name="l00793"></a>00793                         aulBBD, tBBDLen, aulSBD, tSBDLen,
-<a name="l00794"></a>00794                         aucHeader, iWordVersion);
-<a name="l00795"></a>00795                 vSetDefaultTabWidth(pFile, &amp;PPS_info,
-<a name="l00796"></a>00796                         aulBBD, tBBDLen, aulSBD, tSBDLen,
-<a name="l00797"></a>00797                         aucHeader, iWordVersion);
-<a name="l00798"></a>00798                 vGetNotesInfo(pFile, &amp;PPS_info,
-<a name="l00799"></a>00799                         aulBBD, tBBDLen, aulSBD, tSBDLen,
-<a name="l00800"></a>00800                         aucHeader, iWordVersion);
-<a name="l00801"></a>00801         }
-<a name="l00802"></a>00802         FREE_ALL();
-<a name="l00803"></a>00803         <span class="keywordflow">return</span> bSuccess ? iWordVersion : -1;
-<a name="l00804"></a>00804 } <span class="comment">/* end of iInitDocumentOLE */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/wordtypes_8h_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,333 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/inc/wordtypes.h Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/inc/wordtypes.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * wordtypes.h</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2004 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Typedefs for the interpretation of MS Word files</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#if !defined(__wordtypes_h)</span>
-<a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor">#define __wordtypes_h 1</span>
-<a name="l00011"></a>00011 <span class="preprocessor"></span>
-<a name="l00012"></a>00012 <span class="preprocessor">#include &lt;time.h&gt;</span>
-<a name="l00013"></a>00013 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#include &quot;DeskLib:Font.h&quot;</span>
-<a name="l00015"></a>00015 <span class="preprocessor">#include &quot;DeskLib:Wimp.h&quot;</span>
-<a name="l00016"></a>00016 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00017"></a>00017 
-<a name="l00018"></a>00018 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>   UCHAR;
-<a name="l00019"></a>00019 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span>  USHORT;
-<a name="l00020"></a>00020 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>    UINT;
-<a name="l00021"></a>00021 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span>   ULONG;
-<a name="l00022"></a>00022 
-<a name="l00023"></a>00023 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keyword">struct </span>diagram_tag {
-<a name="l00025"></a>00025         <a class="code" href="structdrawfile__info.html">drawfile_info</a>   tInfo;
-<a name="l00026"></a>00026         window_handle   tMainWindow;
-<a name="l00027"></a>00027         window_handle   tScaleWindow;
-<a name="l00028"></a>00028         menu_ptr        pSaveMenu;
-<a name="l00029"></a>00029         <span class="keywordtype">long</span>            lXleft;                 <span class="comment">/* In DrawUnits */</span>
-<a name="l00030"></a>00030         <span class="keywordtype">long</span>            lYtop;                  <span class="comment">/* In DrawUnits */</span>
-<a name="l00031"></a>00031         <span class="keywordtype">size_t</span>          tMemorySize;
-<a name="l00032"></a>00032         <span class="keywordtype">int</span>             iScaleFactorCurr;       <span class="comment">/* In percentage */</span>
-<a name="l00033"></a>00033         <span class="keywordtype">int</span>             iScaleFactorTemp;       <span class="comment">/* In percentage */</span>
-<a name="l00034"></a>00034         <span class="keywordtype">char</span>            szFilename[19+1];
-<a name="l00035"></a>00035 } diagram_type;
-<a name="l00036"></a>00036 <span class="preprocessor">#else</span>
-<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keyword">struct </span>diagram_tag {
-<a name="l00038"></a>00038         FILE            *pOutFile;
-<a name="l00039"></a>00039         <span class="keywordtype">long</span>            lXleft;                 <span class="comment">/* In DrawUnits */</span>
-<a name="l00040"></a>00040         <span class="keywordtype">long</span>            lYtop;                  <span class="comment">/* In DrawUnits */</span>
-<a name="l00041"></a>00041 } diagram_type;
-<a name="l00042"></a>00042 <span class="keyword">typedef</span> UCHAR           drawfile_fontref;
-<a name="l00043"></a>00043 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00044"></a>00044 
-<a name="l00045"></a>00045 <span class="keyword">typedef</span> <span class="keyword">struct </span>output_tag {
-<a name="l00046"></a>00046         <span class="keywordtype">char</span>    *szStorage;
-<a name="l00047"></a>00047         <span class="keywordtype">long</span>    lStringWidth;           <span class="comment">/* In millipoints */</span>
-<a name="l00048"></a>00048         <span class="keywordtype">size_t</span>  tStorageSize;
-<a name="l00049"></a>00049         <span class="keywordtype">size_t</span>  tNextFree;
-<a name="l00050"></a>00050         USHORT  usFontStyle;
-<a name="l00051"></a>00051         USHORT  usFontSize;
-<a name="l00052"></a>00052         UCHAR   ucFontColor;
-<a name="l00053"></a>00053         drawfile_fontref        tFontRef;
-<a name="l00054"></a>00054         <span class="keyword">struct </span>output_tag       *pPrev;
-<a name="l00055"></a>00055         <span class="keyword">struct </span>output_tag       *pNext;
-<a name="l00056"></a>00056 } output_type;
-<a name="l00057"></a>00057 
-<a name="l00058"></a>00058 <span class="comment">/* Types of conversion */</span>
-<a name="l00059"></a>00059 <span class="keyword">typedef</span> <span class="keyword">enum</span> conversion_tag {
-<a name="l00060"></a>00060         conversion_unknown = 0,
-<a name="l00061"></a>00061         conversion_text,
-<a name="l00062"></a>00062         conversion_draw,
-<a name="l00063"></a>00063         conversion_ps,
-<a name="l00064"></a>00064         conversion_xml,
-<a name="l00065"></a>00065         conversion_pdf,
-<a name="l00066"></a>00066         conversion_fmt_text
-<a name="l00067"></a>00067 } conversion_type;
-<a name="l00068"></a>00068 
-<a name="l00069"></a>00069 <span class="comment">/* Types of encoding */</span>
-<a name="l00070"></a>00070 <span class="keyword">typedef</span> <span class="keyword">enum</span> encoding_tag {
-<a name="l00071"></a>00071         encoding_neutral = 100,
-<a name="l00072"></a>00072         encoding_latin_1 = 801,
-<a name="l00073"></a>00073         encoding_latin_2 = 802,
-<a name="l00074"></a>00074         encoding_cyrillic = 805,
-<a name="l00075"></a>00075         encoding_utf_8 = 1601
-<a name="l00076"></a>00076 } encoding_type;
-<a name="l00077"></a>00077 
-<a name="l00078"></a>00078 <span class="comment">/* Font translation table entry */</span>
-<a name="l00079"></a>00079 <span class="keyword">typedef</span> <span class="keyword">struct </span>font_table_tag {
-<a name="l00080"></a>00080         USHORT  usFontStyle;
-<a name="l00081"></a>00081         UCHAR   ucWordFontNumber;
-<a name="l00082"></a>00082         UCHAR   ucFFN;
-<a name="l00083"></a>00083         UCHAR   ucEmphasis;
-<a name="l00084"></a>00084         UCHAR   ucInUse;
-<a name="l00085"></a>00085         <span class="keywordtype">char</span>    szWordFontname[65];
-<a name="l00086"></a>00086         <span class="keywordtype">char</span>    szOurFontname[33];
-<a name="l00087"></a>00087 } font_table_type;
-<a name="l00088"></a>00088 
-<a name="l00089"></a>00089 <span class="comment">/* Options */</span>
-<a name="l00090"></a>00090 <span class="keyword">typedef</span> <span class="keyword">enum</span> image_level_tag {
-<a name="l00091"></a>00091         level_gs_special = 0,
-<a name="l00092"></a>00092         level_no_images,
-<a name="l00093"></a>00093         level_ps_2,
-<a name="l00094"></a>00094         level_ps_3,
-<a name="l00095"></a>00095         level_default = level_ps_2
-<a name="l00096"></a>00096 } image_level_enum;
-<a name="l00097"></a>00097 
-<a name="l00098"></a>00098 <span class="keyword">typedef</span> <span class="keyword">struct </span>options_tag {
-<a name="l00099"></a>00099         <span class="keywordtype">int</span>             iParagraphBreak;
-<a name="l00100"></a>00100         conversion_type eConversionType;
-<a name="l00101"></a>00101         BOOL            bHideHiddenText;
-<a name="l00102"></a>00102         BOOL            bRemoveRemovedText;
-<a name="l00103"></a>00103         BOOL            bUseLandscape;
-<a name="l00104"></a>00104         encoding_type   eEncoding;
-<a name="l00105"></a>00105         <span class="keywordtype">int</span>             iPageHeight;            <span class="comment">/* In points */</span>
-<a name="l00106"></a>00106         <span class="keywordtype">int</span>             iPageWidth;             <span class="comment">/* In points */</span>
-<a name="l00107"></a>00107         image_level_enum        eImageLevel;
-<a name="l00108"></a>00108 <span class="preprocessor">#if defined(__riscos)</span>
-<a name="l00109"></a>00109 <span class="preprocessor"></span>        BOOL            bAutofiletypeAllowed;
-<a name="l00110"></a>00110         <span class="keywordtype">int</span>             iScaleFactor;           <span class="comment">/* As a percentage */</span>
-<a name="l00111"></a>00111 <span class="preprocessor">#endif </span><span class="comment">/* __riscos */</span>
-<a name="l00112"></a>00112 } options_type;
-<a name="l00113"></a>00113 
-<a name="l00114"></a>00114 <span class="comment">/* Property Set Storage */</span>
-<a name="l00115"></a>00115 <span class="keyword">typedef</span> <span class="keyword">struct </span>pps_tag {
-<a name="l00116"></a>00116         ULONG   ulSB;
-<a name="l00117"></a>00117         ULONG   ulSize;
-<a name="l00118"></a>00118 } pps_type;
-<a name="l00119"></a>00119 <span class="keyword">typedef</span> <span class="keyword">struct </span>pps_info_tag {
-<a name="l00120"></a>00120         pps_type        tWordDocument;  <span class="comment">/* Text stream */</span>
-<a name="l00121"></a>00121         pps_type        tData;          <span class="comment">/* Data stream */</span>
-<a name="l00122"></a>00122         pps_type        tTable;         <span class="comment">/* Table stream */</span>
-<a name="l00123"></a>00123         pps_type        tSummaryInfo;   <span class="comment">/* Summary Information */</span>
-<a name="l00124"></a>00124         pps_type        tDocSummaryInfo;<span class="comment">/* Document Summary Information */</span>
-<a name="l00125"></a>00125         pps_type        t0Table;        <span class="comment">/* Table 0 stream */</span>
-<a name="l00126"></a>00126         pps_type        t1Table;        <span class="comment">/* Table 1 stream */</span>
-<a name="l00127"></a>00127 } pps_info_type;
-<a name="l00128"></a>00128 
-<a name="l00129"></a>00129 <span class="comment">/* Record of data block information */</span>
-<a name="l00130"></a>00130 <span class="keyword">typedef</span> <span class="keyword">struct </span>data_block_tag {
-<a name="l00131"></a>00131         ULONG   ulFileOffset;
-<a name="l00132"></a>00132         ULONG   ulDataPos;
-<a name="l00133"></a>00133         ULONG   ulLength;
-<a name="l00134"></a>00134 } data_block_type;
-<a name="l00135"></a>00135 
-<a name="l00136"></a>00136 <span class="comment">/* Record of text block information */</span>
-<a name="l00137"></a>00137 <span class="keyword">typedef</span> <span class="keyword">struct </span>text_block_tag {
-<a name="l00138"></a>00138         ULONG   ulFileOffset;
-<a name="l00139"></a>00139         ULONG   ulCharPos;
-<a name="l00140"></a>00140         ULONG   ulLength;
-<a name="l00141"></a>00141         BOOL    bUsesUnicode;   <span class="comment">/* This block uses 16 bits per character */</span>
-<a name="l00142"></a>00142         USHORT  usPropMod;
-<a name="l00143"></a>00143 } text_block_type;
-<a name="l00144"></a>00144 
-<a name="l00145"></a>00145 <span class="comment">/* Record of the document block information */</span>
-<a name="l00146"></a>00146 <span class="keyword">typedef</span> <span class="keyword">struct </span>document_block_tag {
-<a name="l00147"></a>00147         time_t  tCreateDate;            <span class="comment">/* Unix timestamp */</span>
-<a name="l00148"></a>00148         time_t  tRevisedDate;           <span class="comment">/* Unix timestamp */</span>
-<a name="l00149"></a>00149         USHORT  usDefaultTabWidth;      <span class="comment">/* In twips */</span>
-<a name="l00150"></a>00150         UCHAR   ucHdrFtrSpecification;
-<a name="l00151"></a>00151 } document_block_type;
-<a name="l00152"></a>00152 
-<a name="l00153"></a>00153 <span class="comment">/* Record of table-row block information */</span>
-<a name="l00154"></a>00154 <span class="keyword">typedef</span> <span class="keyword">struct </span>row_block_tag {
-<a name="l00155"></a>00155         ULONG   ulFileOffsetStart;
-<a name="l00156"></a>00156         ULONG   ulFileOffsetEnd;
-<a name="l00157"></a>00157         ULONG   ulCharPosStart;
-<a name="l00158"></a>00158         ULONG   ulCharPosEnd;
-<a name="l00159"></a>00159         <span class="keywordtype">short</span>   asColumnWidth[TABLE_COLUMN_MAX+1];      <span class="comment">/* In twips */</span>
-<a name="l00160"></a>00160         UCHAR   ucNumberOfColumns;
-<a name="l00161"></a>00161         UCHAR   ucBorderInfo;
-<a name="l00162"></a>00162 } row_block_type;
-<a name="l00163"></a>00163 
-<a name="l00164"></a>00164 <span class="comment">/* Various level types */</span>
-<a name="l00165"></a>00165 <span class="keyword">typedef</span> <span class="keyword">enum</span> level_type_tag {
-<a name="l00166"></a>00166         level_type_none = 0,
-<a name="l00167"></a>00167         level_type_outline,
-<a name="l00168"></a>00168         level_type_numbering,
-<a name="l00169"></a>00169         level_type_sequence,
-<a name="l00170"></a>00170         level_type_pause
-<a name="l00171"></a>00171 } level_type_enum;
-<a name="l00172"></a>00172 
-<a name="l00173"></a>00173 <span class="keyword">typedef</span> <span class="keyword">enum</span> list_id_tag {
-<a name="l00174"></a>00174         no_list = 0,
-<a name="l00175"></a>00175         text_list,
-<a name="l00176"></a>00176         footnote_list,
-<a name="l00177"></a>00177         hdrftr_list,
-<a name="l00178"></a>00178         macro_list,
-<a name="l00179"></a>00179         annotation_list,
-<a name="l00180"></a>00180         endnote_list,
-<a name="l00181"></a>00181         textbox_list,
-<a name="l00182"></a>00182         hdrtextbox_list,
-<a name="l00183"></a>00183         end_of_lists
-<a name="l00184"></a>00184 } list_id_enum;
-<a name="l00185"></a>00185 
-<a name="l00186"></a>00186 <span class="comment">/* Linked list of style description information */</span>
-<a name="l00187"></a>00187 <span class="keyword">typedef</span> <span class="keyword">struct </span>style_block_tag {
-<a name="l00188"></a>00188         ULONG   ulFileOffset;   <span class="comment">/* The style start with this character */</span>
-<a name="l00189"></a>00189         list_id_enum    eListID;<span class="comment">/* The fileoffset is in this list */</span>
-<a name="l00190"></a>00190         BOOL    bNumPause;
-<a name="l00191"></a>00191         BOOL    bNoRestart;     <span class="comment">/* Don&#39;t restart by more significant levels */</span>
-<a name="l00192"></a>00192         USHORT  usIstd;         <span class="comment">/* Current style */</span>
-<a name="l00193"></a>00193         USHORT  usIstdNext;     <span class="comment">/* Next style unless overruled */</span>
-<a name="l00194"></a>00194         USHORT  usStartAt;      <span class="comment">/* Number at the start of a list */</span>
-<a name="l00195"></a>00195         USHORT  usBeforeIndent; <span class="comment">/* Vertical indent before paragraph in twips */</span>
-<a name="l00196"></a>00196         USHORT  usAfterIndent;  <span class="comment">/* Vertical indent after paragraph in twips */</span>
-<a name="l00197"></a>00197         USHORT  usListIndex;    <span class="comment">/* Before Word 8 this field was not filled */</span>
-<a name="l00198"></a>00198         USHORT  usListChar;     <span class="comment">/* Character for an itemized list (Unicode) */</span>
-<a name="l00199"></a>00199         <span class="keywordtype">short</span>   sLeftIndent;    <span class="comment">/* Left indentation in twips */</span>
-<a name="l00200"></a>00200         <span class="keywordtype">short</span>   sLeftIndent1;   <span class="comment">/* First line left indentation in twips */</span>
-<a name="l00201"></a>00201         <span class="keywordtype">short</span>   sRightIndent;   <span class="comment">/* Right indentation in twips */</span>
-<a name="l00202"></a>00202         UCHAR   ucAlignment;
-<a name="l00203"></a>00203         UCHAR   ucNFC;          <span class="comment">/* Number format code */</span>
-<a name="l00204"></a>00204         UCHAR   ucNumLevel;
-<a name="l00205"></a>00205         UCHAR   ucListLevel;    <span class="comment">/* Before Word 8 this field was not filled */</span>
-<a name="l00206"></a>00206         <span class="keywordtype">char</span>    szListChar[4];  <span class="comment">/* Character for an itemized list */</span>
-<a name="l00207"></a>00207 } style_block_type;
-<a name="l00208"></a>00208 
-<a name="l00209"></a>00209 <span class="comment">/* Font description information */</span>
-<a name="l00210"></a>00210 <span class="keyword">typedef</span> <span class="keyword">struct </span>font_block_tag {
-<a name="l00211"></a>00211         ULONG   ulFileOffset;
-<a name="l00212"></a>00212         USHORT  usFontStyle;
-<a name="l00213"></a>00213         USHORT  usFontSize;
-<a name="l00214"></a>00214         UCHAR   ucFontNumber;
-<a name="l00215"></a>00215         UCHAR   ucFontColor;
-<a name="l00216"></a>00216 } font_block_type;
-<a name="l00217"></a>00217 
-<a name="l00218"></a>00218 <span class="comment">/* Picture description information */</span>
-<a name="l00219"></a>00219 <span class="keyword">typedef</span> <span class="keyword">struct </span>picture_block_tag {
-<a name="l00220"></a>00220         ULONG   ulFileOffset;
-<a name="l00221"></a>00221         ULONG   ulFileOffsetPicture;
-<a name="l00222"></a>00222         ULONG   ulPictureOffset;
-<a name="l00223"></a>00223 } picture_block_type;
-<a name="l00224"></a>00224 
-<a name="l00225"></a>00225 <span class="comment">/* Section description information */</span>
-<a name="l00226"></a>00226 <span class="keyword">typedef</span> <span class="keyword">struct </span>section_block_tag {
-<a name="l00227"></a>00227         BOOL    bNewPage;
-<a name="l00228"></a>00228         USHORT  usNeedPrevLvl;          <span class="comment">/* Print previous level numbers */</span>
-<a name="l00229"></a>00229         USHORT  usHangingIndent;
-<a name="l00230"></a>00230         UCHAR   aucNFC[9];              <span class="comment">/* Number format code */</span>
-<a name="l00231"></a>00231         UCHAR   ucHdrFtrSpecification;  <span class="comment">/* Which headers/footers Word &lt; 8 */</span>
-<a name="l00232"></a>00232 } section_block_type;
-<a name="l00233"></a>00233 
-<a name="l00234"></a>00234 <span class="comment">/* Header/footer description information */</span>
-<a name="l00235"></a>00235 <span class="keyword">typedef</span> <span class="keyword">struct </span>hdrftr_block_tag {
-<a name="l00236"></a>00236         output_type     *pText;
-<a name="l00237"></a>00237         <span class="keywordtype">long</span>            lHeight;        <span class="comment">/* In DrawUnits */</span>
-<a name="l00238"></a>00238 } hdrftr_block_type;
-<a name="l00239"></a>00239 
-<a name="l00240"></a>00240 <span class="comment">/* Footnote description information */</span>
-<a name="l00241"></a>00241 <span class="keyword">typedef</span> <span class="keyword">struct </span>footnote_block_tag {
-<a name="l00242"></a>00242         <span class="keywordtype">char</span>            *szText;
-<a name="l00243"></a>00243 } footnote_block_type;
-<a name="l00244"></a>00244 
-<a name="l00245"></a>00245 <span class="comment">/* List description information */</span>
-<a name="l00246"></a>00246 <span class="keyword">typedef</span> <span class="keyword">struct </span>list_block_tag {
-<a name="l00247"></a>00247         ULONG   ulStartAt;      <span class="comment">/* Number at the start of a list */</span>
-<a name="l00248"></a>00248         BOOL    bNoRestart;     <span class="comment">/* Don&#39;t restart by more significant levels */</span>
-<a name="l00249"></a>00249         USHORT  usListChar;     <span class="comment">/* Character for an itemized list (Unicode) */</span>
-<a name="l00250"></a>00250         <span class="keywordtype">short</span>   sLeftIndent;    <span class="comment">/* Left indentation in twips */</span>
-<a name="l00251"></a>00251         UCHAR   ucNFC;          <span class="comment">/* Number format code */</span>
-<a name="l00252"></a>00252 } list_block_type;
-<a name="l00253"></a>00253 
-<a name="l00254"></a>00254 <span class="comment">/* Types of images */</span>
-<a name="l00255"></a>00255 <span class="keyword">typedef</span> <span class="keyword">enum</span> imagetype_tag {
-<a name="l00256"></a>00256         imagetype_is_unknown = 0,
-<a name="l00257"></a>00257         imagetype_is_external,
-<a name="l00258"></a>00258         imagetype_is_emf,
-<a name="l00259"></a>00259         imagetype_is_wmf,
-<a name="l00260"></a>00260         imagetype_is_pict,
-<a name="l00261"></a>00261         imagetype_is_jpeg,
-<a name="l00262"></a>00262         imagetype_is_png,
-<a name="l00263"></a>00263         imagetype_is_dib
-<a name="l00264"></a>00264 } imagetype_enum;
-<a name="l00265"></a>00265 
-<a name="l00266"></a>00266 <span class="comment">/* Types of compression */</span>
-<a name="l00267"></a>00267 <span class="keyword">typedef</span> <span class="keyword">enum</span> compression_tag {
-<a name="l00268"></a>00268         compression_unknown = 0,
-<a name="l00269"></a>00269         compression_none,
-<a name="l00270"></a>00270         compression_rle4,
-<a name="l00271"></a>00271         compression_rle8,
-<a name="l00272"></a>00272         compression_jpeg,
-<a name="l00273"></a>00273         compression_zlib
-<a name="l00274"></a>00274 } compression_enum;
-<a name="l00275"></a>00275 
-<a name="l00276"></a>00276 <span class="comment">/* Image information */</span>
-<a name="l00277"></a>00277 <span class="keyword">typedef</span> <span class="keyword">struct </span>imagedata_tag {
-<a name="l00278"></a>00278         <span class="comment">/* The type of the image */</span>
-<a name="l00279"></a>00279         imagetype_enum  eImageType;
-<a name="l00280"></a>00280         <span class="comment">/* Information from the Word document */</span>
-<a name="l00281"></a>00281         <span class="keywordtype">size_t</span>  tPosition;
-<a name="l00282"></a>00282         <span class="keywordtype">size_t</span>  tLength;
-<a name="l00283"></a>00283         <span class="keywordtype">int</span>     iHorSizeScaled;         <span class="comment">/* Size in points */</span>
-<a name="l00284"></a>00284         <span class="keywordtype">int</span>     iVerSizeScaled;         <span class="comment">/* Size in points */</span>
-<a name="l00285"></a>00285         <span class="comment">/* Information from the image */</span>
-<a name="l00286"></a>00286         <span class="keywordtype">int</span>     iWidth;                 <span class="comment">/* Size in pixels */</span>
-<a name="l00287"></a>00287         <span class="keywordtype">int</span>     iHeight;                <span class="comment">/* Size in pixels */</span>
-<a name="l00288"></a>00288         <span class="keywordtype">int</span>     iComponents;            <span class="comment">/* Number of color components */</span>
-<a name="l00289"></a>00289         UINT    uiBitsPerComponent;     <span class="comment">/* Bits per color component */</span>
-<a name="l00290"></a>00290         BOOL    bAdobe; <span class="comment">/* Image includes Adobe comment marker */</span>
-<a name="l00291"></a>00291         compression_enum        eCompression;   <span class="comment">/* Type of compression */</span>
-<a name="l00292"></a>00292         BOOL    bColorImage;    <span class="comment">/* Is color image */</span>
-<a name="l00293"></a>00293         <span class="keywordtype">int</span>     iColorsUsed;    <span class="comment">/* 0 = uses the maximum number of colors */</span>
-<a name="l00294"></a>00294         UCHAR   aucPalette[256][3];     <span class="comment">/* RGB palette */</span>
-<a name="l00295"></a>00295 } imagedata_type;
-<a name="l00296"></a>00296 
-<a name="l00297"></a>00297 <span class="keyword">typedef</span> <span class="keyword">enum</span> row_info_tag {
-<a name="l00298"></a>00298         found_nothing,
-<a name="l00299"></a>00299         found_a_cell,
-<a name="l00300"></a>00300         found_not_a_cell,
-<a name="l00301"></a>00301         found_end_of_row,
-<a name="l00302"></a>00302         found_not_end_of_row
-<a name="l00303"></a>00303 } row_info_enum;
-<a name="l00304"></a>00304 
-<a name="l00305"></a>00305 <span class="keyword">typedef</span> <span class="keyword">enum</span> notetype_tag {
-<a name="l00306"></a>00306         notetype_is_footnote,
-<a name="l00307"></a>00307         notetype_is_endnote,
-<a name="l00308"></a>00308         notetype_is_unknown
-<a name="l00309"></a>00309 } notetype_enum;
-<a name="l00310"></a>00310 
-<a name="l00311"></a>00311 <span class="keyword">typedef</span> <span class="keyword">enum</span> image_info_tag {
-<a name="l00312"></a>00312         image_no_information,
-<a name="l00313"></a>00313         image_minimal_information,
-<a name="l00314"></a>00314         image_full_information
-<a name="l00315"></a>00315 } image_info_enum;
-<a name="l00316"></a>00316 
-<a name="l00317"></a>00317 <span class="preprocessor">#endif </span><span class="comment">/* __wordtypes_h */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/wordwin_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,225 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/wordwin.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/wordwin.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * wordwin.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2002-2005 A.J. van Os; Released under GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Deal with the WIN internals of a MS Word file</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00010"></a>00010 
-<a name="l00011"></a>00011 
-<a name="l00012"></a>00012 <span class="comment">/*</span>
-<a name="l00013"></a>00013 <span class="comment"> * bGetDocumentText - make a list of the text blocks of a Word document</span>
-<a name="l00014"></a>00014 <span class="comment"> *</span>
-<a name="l00015"></a>00015 <span class="comment"> * Return TRUE when succesful, otherwise FALSE</span>
-<a name="l00016"></a>00016 <span class="comment"> */</span>
-<a name="l00017"></a>00017 <span class="keyword">static</span> BOOL
-<a name="l00018"></a>00018 bGetDocumentText(FILE *pFile, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00019"></a>00019 {
-<a name="l00020"></a>00020         text_block_type tTextBlock;
-<a name="l00021"></a>00021         ULONG   ulBeginOfText;
-<a name="l00022"></a>00022         ULONG   ulTextLen, ulFootnoteLen;
-<a name="l00023"></a>00023         ULONG   ulHdrFtrLen, ulMacroLen, ulAnnotationLen;
-<a name="l00024"></a>00024         UINT    uiQuickSaves;
-<a name="l00025"></a>00025         USHORT  usDocStatus;
-<a name="l00026"></a>00026         BOOL    bTemplate, bFastSaved, bEncrypted, bSuccess;
-<a name="l00027"></a>00027 
-<a name="l00028"></a>00028         fail(pFile == NULL);
-<a name="l00029"></a>00029         fail(aucHeader == NULL);
-<a name="l00030"></a>00030 
-<a name="l00031"></a>00031         DBG_MSG(<span class="stringliteral">&quot;bGetDocumentText&quot;</span>);
-<a name="l00032"></a>00032 
-<a name="l00033"></a>00033         <span class="comment">/* Get the status flags from the header */</span>
-<a name="l00034"></a>00034         usDocStatus = usGetWord(0x0a, aucHeader);
-<a name="l00035"></a>00035         DBG_HEX(usDocStatus);
-<a name="l00036"></a>00036         bTemplate = (usDocStatus &amp; BIT(0)) != 0;
-<a name="l00037"></a>00037         DBG_MSG_C(bTemplate, <span class="stringliteral">&quot;This document is a Template&quot;</span>);
-<a name="l00038"></a>00038         bFastSaved = (usDocStatus &amp; BIT(2)) != 0;
-<a name="l00039"></a>00039         uiQuickSaves = (UINT)(usDocStatus &amp; 0x00f0) &gt;&gt; 4;
-<a name="l00040"></a>00040         DBG_MSG_C(bFastSaved, <span class="stringliteral">&quot;This document is Fast Saved&quot;</span>);
-<a name="l00041"></a>00041         DBG_DEC_C(bFastSaved, uiQuickSaves);
-<a name="l00042"></a>00042         <span class="keywordflow">if</span> (bFastSaved) {
-<a name="l00043"></a>00043                 werr(0, <span class="stringliteral">&quot;Word2: fast saved documents are not supported yet&quot;</span>);
-<a name="l00044"></a>00044                 <span class="keywordflow">return</span> FALSE;
-<a name="l00045"></a>00045         }
-<a name="l00046"></a>00046         bEncrypted = (usDocStatus &amp; BIT(8)) != 0;
-<a name="l00047"></a>00047         <span class="keywordflow">if</span> (bEncrypted) {
-<a name="l00048"></a>00048                 werr(0, <span class="stringliteral">&quot;Encrypted documents are not supported&quot;</span>);
-<a name="l00049"></a>00049                 <span class="keywordflow">return</span> FALSE;
-<a name="l00050"></a>00050         }
-<a name="l00051"></a>00051 
-<a name="l00052"></a>00052         <span class="comment">/* Get length information */</span>
-<a name="l00053"></a>00053         ulBeginOfText = ulGetLong(0x18, aucHeader);
-<a name="l00054"></a>00054         DBG_HEX(ulBeginOfText);
-<a name="l00055"></a>00055         ulTextLen = ulGetLong(0x34, aucHeader);
-<a name="l00056"></a>00056         ulFootnoteLen = ulGetLong(0x38, aucHeader);
-<a name="l00057"></a>00057         ulHdrFtrLen = ulGetLong(0x3c, aucHeader);
-<a name="l00058"></a>00058         ulMacroLen = ulGetLong(0x40, aucHeader);
-<a name="l00059"></a>00059         ulAnnotationLen = ulGetLong(0x44, aucHeader);
-<a name="l00060"></a>00060         DBG_DEC(ulTextLen);
-<a name="l00061"></a>00061         DBG_DEC(ulFootnoteLen);
-<a name="l00062"></a>00062         DBG_DEC(ulHdrFtrLen);
-<a name="l00063"></a>00063         DBG_DEC(ulMacroLen);
-<a name="l00064"></a>00064         DBG_DEC(ulAnnotationLen);
-<a name="l00065"></a>00065         <span class="keywordflow">if</span> (bFastSaved) {
-<a name="l00066"></a>00066                 bSuccess = FALSE;
-<a name="l00067"></a>00067         } <span class="keywordflow">else</span> {
-<a name="l00068"></a>00068                 tTextBlock.ulFileOffset = ulBeginOfText;
-<a name="l00069"></a>00069                 tTextBlock.ulCharPos = ulBeginOfText;
-<a name="l00070"></a>00070                 tTextBlock.ulLength = ulTextLen +
-<a name="l00071"></a>00071                                 ulFootnoteLen +
-<a name="l00072"></a>00072                                 ulHdrFtrLen + ulMacroLen + ulAnnotationLen;
-<a name="l00073"></a>00073                 tTextBlock.bUsesUnicode = FALSE;
-<a name="l00074"></a>00074                 tTextBlock.usPropMod = IGNORE_PROPMOD;
-<a name="l00075"></a>00075                 bSuccess = bAdd2TextBlockList(&amp;tTextBlock);
-<a name="l00076"></a>00076                 DBG_HEX_C(!bSuccess, tTextBlock.ulFileOffset);
-<a name="l00077"></a>00077                 DBG_HEX_C(!bSuccess, tTextBlock.ulCharPos);
-<a name="l00078"></a>00078                 DBG_DEC_C(!bSuccess, tTextBlock.ulLength);
-<a name="l00079"></a>00079                 DBG_DEC_C(!bSuccess, tTextBlock.bUsesUnicode);
-<a name="l00080"></a>00080                 DBG_DEC_C(!bSuccess, tTextBlock.usPropMod);
-<a name="l00081"></a>00081         }
-<a name="l00082"></a>00082 
-<a name="l00083"></a>00083         <span class="keywordflow">if</span> (bSuccess) {
-<a name="l00084"></a>00084                 vSplitBlockList(pFile,
-<a name="l00085"></a>00085                                 ulTextLen,
-<a name="l00086"></a>00086                                 ulFootnoteLen,
-<a name="l00087"></a>00087                                 ulHdrFtrLen,
-<a name="l00088"></a>00088                                 ulMacroLen,
-<a name="l00089"></a>00089                                 ulAnnotationLen,
-<a name="l00090"></a>00090                                 0,
-<a name="l00091"></a>00091                                 0,
-<a name="l00092"></a>00092                                 0,
-<a name="l00093"></a>00093                                 FALSE);
-<a name="l00094"></a>00094         } <span class="keywordflow">else</span> {
-<a name="l00095"></a>00095                 vDestroyTextBlockList();
-<a name="l00096"></a>00096                 werr(0, <span class="stringliteral">&quot;I can&#39;t find the text of this document&quot;</span>);
-<a name="l00097"></a>00097         }
-<a name="l00098"></a>00098         <span class="keywordflow">return</span> bSuccess;
-<a name="l00099"></a>00099 } <span class="comment">/* end of bGetDocumentText */</span>
-<a name="l00100"></a>00100 
-<a name="l00101"></a>00101 <span class="comment">/*</span>
-<a name="l00102"></a>00102 <span class="comment"> * vGetDocumentData - make a list of the data blocks of a Word document</span>
-<a name="l00103"></a>00103 <span class="comment"> */</span>
-<a name="l00104"></a>00104 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00105"></a>00105 vGetDocumentData(FILE *pFile, <span class="keyword">const</span> UCHAR *aucHeader)
-<a name="l00106"></a>00106 {
-<a name="l00107"></a>00107         data_block_type tDataBlock;
-<a name="l00108"></a>00108         options_type    tOptions;
-<a name="l00109"></a>00109         ULONG   ulEndOfText, ulBeginCharInfo;
-<a name="l00110"></a>00110         BOOL    bFastSaved, bHasImages, bSuccess;
-<a name="l00111"></a>00111         USHORT  usDocStatus;
-<a name="l00112"></a>00112 
-<a name="l00113"></a>00113         <span class="comment">/* Get the options */</span>
-<a name="l00114"></a>00114         vGetOptions(&amp;tOptions);
-<a name="l00115"></a>00115 
-<a name="l00116"></a>00116         <span class="comment">/* Get the status flags from the header */</span>
-<a name="l00117"></a>00117         usDocStatus = usGetWord(0x0a, aucHeader);
-<a name="l00118"></a>00118         DBG_HEX(usDocStatus);
-<a name="l00119"></a>00119         bFastSaved = (usDocStatus &amp; BIT(2)) != 0;
-<a name="l00120"></a>00120         bHasImages = (usDocStatus &amp; BIT(3)) != 0;
-<a name="l00121"></a>00121 
-<a name="l00122"></a>00122         <span class="keywordflow">if</span> (!bHasImages ||
-<a name="l00123"></a>00123             tOptions.eConversionType == conversion_text ||
-<a name="l00124"></a>00124             tOptions.eConversionType == conversion_fmt_text ||
-<a name="l00125"></a>00125             tOptions.eConversionType == conversion_xml ||
-<a name="l00126"></a>00126             tOptions.eImageLevel == level_no_images) {
-<a name="l00127"></a>00127                 <span class="comment">/*</span>
-<a name="l00128"></a>00128 <span class="comment">                 * No images in the document or text-only output or</span>
-<a name="l00129"></a>00129 <span class="comment">                 * no images wanted, so no data blocks will be needed</span>
-<a name="l00130"></a>00130 <span class="comment">                 */</span>
-<a name="l00131"></a>00131                 vDestroyDataBlockList();
-<a name="l00132"></a>00132                 <span class="keywordflow">return</span>;
-<a name="l00133"></a>00133         }
-<a name="l00134"></a>00134 
-<a name="l00135"></a>00135         <span class="keywordflow">if</span> (bFastSaved) {
-<a name="l00136"></a>00136                 bSuccess = FALSE;
-<a name="l00137"></a>00137         } <span class="keywordflow">else</span> {
-<a name="l00138"></a>00138                 <span class="comment">/* This datablock is too big, but it contains all images */</span>
-<a name="l00139"></a>00139                 ulEndOfText = ulGetLong(0x1c, aucHeader);
-<a name="l00140"></a>00140                 DBG_HEX(ulEndOfText);
-<a name="l00141"></a>00141                 ulBeginCharInfo = ulGetLong(0xa0, aucHeader);
-<a name="l00142"></a>00142                 DBG_HEX(ulBeginCharInfo);
-<a name="l00143"></a>00143                 <span class="keywordflow">if</span> (ulBeginCharInfo &gt; ulEndOfText) {
-<a name="l00144"></a>00144                         tDataBlock.ulFileOffset = ulEndOfText;
-<a name="l00145"></a>00145                         tDataBlock.ulDataPos = ulEndOfText;
-<a name="l00146"></a>00146                         tDataBlock.ulLength = ulBeginCharInfo - ulEndOfText;
-<a name="l00147"></a>00147                         bSuccess = bAdd2DataBlockList(&amp;tDataBlock);
-<a name="l00148"></a>00148                         DBG_HEX_C(!bSuccess, tDataBlock.ulFileOffset);
-<a name="l00149"></a>00149                         DBG_HEX_C(!bSuccess, tDataBlock.ulDataPos);
-<a name="l00150"></a>00150                         DBG_DEC_C(!bSuccess, tDataBlock.ulLength);
-<a name="l00151"></a>00151                 } <span class="keywordflow">else</span> {
-<a name="l00152"></a>00152                         bSuccess = ulBeginCharInfo == ulEndOfText;
-<a name="l00153"></a>00153                 }
-<a name="l00154"></a>00154         }
-<a name="l00155"></a>00155 
-<a name="l00156"></a>00156         <span class="keywordflow">if</span> (!bSuccess) {
-<a name="l00157"></a>00157                 vDestroyDataBlockList();
-<a name="l00158"></a>00158                 werr(0, <span class="stringliteral">&quot;I can&#39;t find the data of this document&quot;</span>);
-<a name="l00159"></a>00159         }
-<a name="l00160"></a>00160 } <span class="comment">/* end of vGetDocumentData */</span>
-<a name="l00161"></a>00161 
-<a name="l00162"></a>00162 <span class="comment">/*</span>
-<a name="l00163"></a>00163 <span class="comment"> * iInitDocumentWIN - initialize an WIN document</span>
-<a name="l00164"></a>00164 <span class="comment"> *</span>
-<a name="l00165"></a>00165 <span class="comment"> * Returns the version of Word that made the document or -1</span>
-<a name="l00166"></a>00166 <span class="comment"> */</span>
-<a name="l00167"></a>00167 <span class="keywordtype">int</span>
-<a name="l00168"></a>00168 iInitDocumentWIN(FILE *pFile, <span class="keywordtype">long</span> lFilesize)
-<a name="l00169"></a>00169 {
-<a name="l00170"></a>00170         <span class="keywordtype">int</span>     iWordVersion;
-<a name="l00171"></a>00171         BOOL    bSuccess;
-<a name="l00172"></a>00172         USHORT  usIdent;
-<a name="l00173"></a>00173         UCHAR   aucHeader[384];
-<a name="l00174"></a>00174 
-<a name="l00175"></a>00175         fail(pFile == NULL);
-<a name="l00176"></a>00176 
-<a name="l00177"></a>00177         <span class="keywordflow">if</span> (lFilesize &lt; 384) {
-<a name="l00178"></a>00178                 <span class="keywordflow">return</span> -1;
-<a name="l00179"></a>00179         }
-<a name="l00180"></a>00180 
-<a name="l00181"></a>00181         <span class="comment">/* Read the headerblock */</span>
-<a name="l00182"></a>00182         <span class="keywordflow">if</span> (!bReadBytes(aucHeader, 384, 0x00, pFile)) {
-<a name="l00183"></a>00183                 <span class="keywordflow">return</span> -1;
-<a name="l00184"></a>00184         }
-<a name="l00185"></a>00185         <span class="comment">/* Get the &quot;magic number&quot; from the header */</span>
-<a name="l00186"></a>00186         usIdent = usGetWord(0x00, aucHeader);
-<a name="l00187"></a>00187         DBG_HEX(usIdent);
-<a name="l00188"></a>00188         fail(usIdent != 0xa59b &amp;&amp;       <span class="comment">/* WinWord 1.x */</span>
-<a name="l00189"></a>00189                 usIdent != 0xa5db);     <span class="comment">/* WinWord 2.0 */</span>
-<a name="l00190"></a>00190         iWordVersion = iGetVersionNumber(aucHeader);
-<a name="l00191"></a>00191         <span class="keywordflow">if</span> (iWordVersion != 1 &amp;&amp; iWordVersion != 2) {
-<a name="l00192"></a>00192                 werr(0, <span class="stringliteral">&quot;This file is not from &#39;&#39;Win Word 1 or 2&#39;.&quot;</span>);
-<a name="l00193"></a>00193                 <span class="keywordflow">return</span> -1;
-<a name="l00194"></a>00194         }
-<a name="l00195"></a>00195         bSuccess = bGetDocumentText(pFile, aucHeader);
-<a name="l00196"></a>00196         <span class="keywordflow">if</span> (bSuccess) {
-<a name="l00197"></a>00197                 vGetDocumentData(pFile, aucHeader);
-<a name="l00198"></a>00198                 vGetPropertyInfo(pFile, NULL,
-<a name="l00199"></a>00199                                 NULL, 0, NULL, 0,
-<a name="l00200"></a>00200                                 aucHeader, iWordVersion);
-<a name="l00201"></a>00201                 vSetDefaultTabWidth(pFile, NULL,
-<a name="l00202"></a>00202                                 NULL, 0, NULL, 0,
-<a name="l00203"></a>00203                                 aucHeader, iWordVersion);
-<a name="l00204"></a>00204                 vGetNotesInfo(pFile, NULL,
-<a name="l00205"></a>00205                                 NULL, 0, NULL, 0,
-<a name="l00206"></a>00206                                 aucHeader, iWordVersion);
-<a name="l00207"></a>00207         }
-<a name="l00208"></a>00208         <span class="keywordflow">return</span> bSuccess ? iWordVersion : -1;
-<a name="l00209"></a>00209 } <span class="comment">/* end of iInitDocumentWIN */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/xmalloc_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/xmalloc.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/xmalloc.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * xmalloc.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 1998-2005 A.J. van Os</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Extended malloc and friends</span>
-<a name="l00007"></a>00007 <span class="comment"> */</span>
-<a name="l00008"></a>00008 
-<a name="l00009"></a>00009 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 <span class="keyword">static</span> <span class="keywordtype">char</span> *szMessage =
-<a name="l00014"></a>00014         <span class="stringliteral">&quot;Memory allocation failed, unable to continue&quot;</span>;
-<a name="l00015"></a>00015 <span class="preprocessor">#if defined(__dos) &amp;&amp; !defined(__DJGPP__)</span>
-<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keywordtype">char</span> *szDosMessage =
-<a name="l00017"></a>00017         <span class="stringliteral">&quot;DOS can&#39;t allocate this kind of memory, unable to continue&quot;</span>;
-<a name="l00018"></a>00018 <span class="preprocessor">#endif </span><span class="comment">/* __dos &amp;&amp; !__DJGPP__ */</span>
-<a name="l00019"></a>00019 
-<a name="l00020"></a>00020 
-<a name="l00021"></a>00021 <span class="comment">/*</span>
-<a name="l00022"></a>00022 <span class="comment"> * xmalloc - Allocates dynamic memory</span>
-<a name="l00023"></a>00023 <span class="comment"> *</span>
-<a name="l00024"></a>00024 <span class="comment"> * See malloc(3), but unlike malloc(3) xmalloc does not return in case</span>
-<a name="l00025"></a>00025 <span class="comment"> * of error.</span>
-<a name="l00026"></a>00026 <span class="comment"> */</span>
-<a name="l00027"></a>00027 <span class="keywordtype">void</span> *
-<a name="l00028"></a>00028 xmalloc(<span class="keywordtype">size_t</span> tSize)
-<a name="l00029"></a>00029 {
-<a name="l00030"></a>00030         <span class="keywordtype">void</span>    *pvTmp;
-<a name="l00031"></a>00031 
-<a name="l00032"></a>00032         TRACE_MSG(<span class="stringliteral">&quot;xmalloc&quot;</span>);
-<a name="l00033"></a>00033 
-<a name="l00034"></a>00034         <span class="keywordflow">if</span> (tSize == 0) {
-<a name="l00035"></a>00035                 tSize = 1;
-<a name="l00036"></a>00036         }
-<a name="l00037"></a>00037         pvTmp = malloc(tSize);
-<a name="l00038"></a>00038         <span class="keywordflow">if</span> (pvTmp == NULL) {
-<a name="l00039"></a>00039                 DBG_MSG(<span class="stringliteral">&quot;xmalloc returned NULL&quot;</span>);
-<a name="l00040"></a>00040                 DBG_DEC(tSize);
-<a name="l00041"></a>00041                 werr(1, szMessage);
-<a name="l00042"></a>00042         }
-<a name="l00043"></a>00043         <span class="keywordflow">return</span> pvTmp;
-<a name="l00044"></a>00044 } <span class="comment">/* end of xmalloc */</span>
-<a name="l00045"></a>00045 
-<a name="l00046"></a>00046 <span class="comment">/*</span>
-<a name="l00047"></a>00047 <span class="comment"> * xcalloc - Allocates and zeros dynamic memory</span>
-<a name="l00048"></a>00048 <span class="comment"> *</span>
-<a name="l00049"></a>00049 <span class="comment"> * See calloc(3), but unlike calloc(3) xcalloc does not return in case of error</span>
-<a name="l00050"></a>00050 <span class="comment"> */</span>
-<a name="l00051"></a>00051 <span class="keywordtype">void</span> *
-<a name="l00052"></a>00052 xcalloc(<span class="keywordtype">size_t</span> tNmemb, <span class="keywordtype">size_t</span> tSize)
-<a name="l00053"></a>00053 {
-<a name="l00054"></a>00054         <span class="keywordtype">void</span>    *pvTmp;
-<a name="l00055"></a>00055 
-<a name="l00056"></a>00056         TRACE_MSG(<span class="stringliteral">&quot;xcalloc&quot;</span>);
-<a name="l00057"></a>00057 
-<a name="l00058"></a>00058 <span class="preprocessor">#if defined(__dos) &amp;&amp; !defined(__DJGPP__)</span>
-<a name="l00059"></a>00059 <span class="preprocessor"></span>        <span class="keywordflow">if</span> ((ULONG)tNmemb * (ULONG)tSize &gt; 0xffffUL) {
-<a name="l00060"></a>00060                 DBG_DEC((ULONG)tNmemb * (ULONG)tSize);
-<a name="l00061"></a>00061                 werr(1, szDosMessage);
-<a name="l00062"></a>00062         }
-<a name="l00063"></a>00063 <span class="preprocessor">#endif </span><span class="comment">/* __dos &amp;&amp; !__DJGPP__ */</span>
-<a name="l00064"></a>00064 
-<a name="l00065"></a>00065         <span class="keywordflow">if</span> (tNmemb == 0 || tSize == 0) {
-<a name="l00066"></a>00066                 tNmemb = 1;
-<a name="l00067"></a>00067                 tSize = 1;
-<a name="l00068"></a>00068         }
-<a name="l00069"></a>00069         pvTmp = calloc(tNmemb, tSize);
-<a name="l00070"></a>00070         <span class="keywordflow">if</span> (pvTmp == NULL) {
-<a name="l00071"></a>00071                 DBG_MSG(<span class="stringliteral">&quot;xcalloc returned NULL&quot;</span>);
-<a name="l00072"></a>00072                 werr(1, szMessage);
-<a name="l00073"></a>00073         }
-<a name="l00074"></a>00074         <span class="keywordflow">return</span> pvTmp;
-<a name="l00075"></a>00075 } <span class="comment">/* end of xcalloc */</span>
-<a name="l00076"></a>00076 
-<a name="l00077"></a>00077 <span class="comment">/*</span>
-<a name="l00078"></a>00078 <span class="comment"> * xrealloc - Changes the size of a memory object</span>
-<a name="l00079"></a>00079 <span class="comment"> *</span>
-<a name="l00080"></a>00080 <span class="comment"> * See realloc(3), but unlike realloc(3) xrealloc does not return in case</span>
-<a name="l00081"></a>00081 <span class="comment"> * of error.</span>
-<a name="l00082"></a>00082 <span class="comment"> */</span>
-<a name="l00083"></a>00083 <span class="keywordtype">void</span> *
-<a name="l00084"></a>00084 xrealloc(<span class="keywordtype">void</span> *pvArg, <span class="keywordtype">size_t</span> tSize)
-<a name="l00085"></a>00085 {
-<a name="l00086"></a>00086         <span class="keywordtype">void</span>    *pvTmp;
-<a name="l00087"></a>00087 
-<a name="l00088"></a>00088         TRACE_MSG(<span class="stringliteral">&quot;xrealloc&quot;</span>);
-<a name="l00089"></a>00089 
-<a name="l00090"></a>00090         pvTmp = realloc(pvArg, tSize);
-<a name="l00091"></a>00091         <span class="keywordflow">if</span> (pvTmp == NULL) {
-<a name="l00092"></a>00092                 DBG_MSG(<span class="stringliteral">&quot;realloc returned NULL&quot;</span>);
-<a name="l00093"></a>00093                 werr(1, szMessage);
-<a name="l00094"></a>00094         }
-<a name="l00095"></a>00095         <span class="keywordflow">return</span> pvTmp;
-<a name="l00096"></a>00096 } <span class="comment">/* end of xrealloc */</span>
-<a name="l00097"></a>00097 
-<a name="l00098"></a>00098 <span class="comment">/*</span>
-<a name="l00099"></a>00099 <span class="comment"> * xstrdup - Duplicate a string</span>
-<a name="l00100"></a>00100 <span class="comment"> *</span>
-<a name="l00101"></a>00101 <span class="comment"> * See strdup(3), but unlike strdup(3) xstrdup does not return in case</span>
-<a name="l00102"></a>00102 <span class="comment"> * of error.</span>
-<a name="l00103"></a>00103 <span class="comment"> *</span>
-<a name="l00104"></a>00104 <span class="comment"> * NOTE:</span>
-<a name="l00105"></a>00105 <span class="comment"> * Does not use strdup(3), because some systems don&#39;t have it.</span>
-<a name="l00106"></a>00106 <span class="comment"> */</span>
-<a name="l00107"></a>00107 <span class="keywordtype">char</span> *
-<a name="l00108"></a>00108 xstrdup(<span class="keyword">const</span> <span class="keywordtype">char</span> *szArg)
-<a name="l00109"></a>00109 {
-<a name="l00110"></a>00110         <span class="keywordtype">char</span>    *szTmp;
-<a name="l00111"></a>00111 
-<a name="l00112"></a>00112         TRACE_MSG(<span class="stringliteral">&quot;xstrdup&quot;</span>);
-<a name="l00113"></a>00113 
-<a name="l00114"></a>00114         szTmp = xmalloc(strlen(szArg) + 1);
-<a name="l00115"></a>00115         strcpy(szTmp, szArg);
-<a name="l00116"></a>00116         <span class="keywordflow">return</span> szTmp;
-<a name="l00117"></a>00117 } <span class="comment">/* end of xstrdup */</span>
-<a name="l00118"></a>00118 
-<a name="l00119"></a>00119 <span class="comment">/*</span>
-<a name="l00120"></a>00120 <span class="comment"> * xfree - Deallocates dynamic memory</span>
-<a name="l00121"></a>00121 <span class="comment"> *</span>
-<a name="l00122"></a>00122 <span class="comment"> * See free(3).</span>
-<a name="l00123"></a>00123 <span class="comment"> *</span>
-<a name="l00124"></a>00124 <span class="comment"> * returns NULL;</span>
-<a name="l00125"></a>00125 <span class="comment"> * This makes p=xfree(p) possible, free memory and overwrite the pointer to it.</span>
-<a name="l00126"></a>00126 <span class="comment"> */</span>
-<a name="l00127"></a>00127 <span class="keywordtype">void</span> *
-<a name="l00128"></a>00128 xfree(<span class="keywordtype">void</span> *pvArg)
-<a name="l00129"></a>00129 {
-<a name="l00130"></a>00130         TRACE_MSG(<span class="stringliteral">&quot;xfree&quot;</span>);
-<a name="l00131"></a>00131 
-<a name="l00132"></a>00132         <span class="keywordflow">if</span> (pvArg != NULL) {
-<a name="l00133"></a>00133                 free(pvArg);
-<a name="l00134"></a>00134         }
-<a name="l00135"></a>00135         <span class="keywordflow">return</span> NULL;
-<a name="l00136"></a>00136 } <span class="comment">/* end of xfree */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
--- a/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/xml_8c_source.html	Fri Jun 11 15:24:34 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1454 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<title>TB9.2 Example Applications: examples/PIPS/antiword/src/xml.c Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<link href="doxygen.css" rel="stylesheet" type="text/css"/>
-</head>
-<body>
-<!-- Generated by Doxygen 1.6.2 -->
-<h1>examples/PIPS/antiword/src/xml.c</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
-<a name="l00002"></a>00002 <span class="comment"> * xml.c</span>
-<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2002-2005 A.J. van Os; Released under GNU GPL</span>
-<a name="l00004"></a>00004 <span class="comment"> *</span>
-<a name="l00005"></a>00005 <span class="comment"> * Description:</span>
-<a name="l00006"></a>00006 <span class="comment"> * Functions to deal with the XML/DocBook format</span>
-<a name="l00007"></a>00007 <span class="comment"> *</span>
-<a name="l00008"></a>00008 <span class="comment"> */</span>
-<a name="l00009"></a>00009 
-<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;string.h&gt;</span>
-<a name="l00011"></a>00011 <span class="preprocessor">#include &quot;antiword.h&quot;</span>
-<a name="l00012"></a>00012 
-<a name="l00013"></a>00013 
-<a name="l00014"></a>00014 <span class="preprocessor">#define vAddEndTagsUntil1(p,t)  vAddEndTagsUntil2(p,t,TAG_NOTAG)        </span>
-<a name="l00015"></a>00015 <span class="preprocessor"></span>
-<a name="l00016"></a>00016 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00017"></a>00017 <span class="preprocessor"></span><span class="preprocessor">#define vStackTrace()   __vStackTrace(__LINE__)</span>
-<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00019"></a>00019 <span class="preprocessor"></span><span class="preprocessor">#define vStackTrace()   </span><span class="comment">/* EMPTY */</span>
-<a name="l00020"></a>00020 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00021"></a>00021 
-<a name="l00022"></a>00022 <span class="comment">/* The character set */</span>
-<a name="l00023"></a>00023 <span class="keyword">static</span> encoding_type    eEncoding = encoding_neutral;
-<a name="l00024"></a>00024 <span class="comment">/* Word version */</span>
-<a name="l00025"></a>00025 <span class="keyword">static</span> <span class="keywordtype">int</span>      iWordVersion = -1;
-<a name="l00026"></a>00026 <span class="comment">/* Special treatment for files from Word 4/5/6 on an Apple Macintosh */</span>
-<a name="l00027"></a>00027 <span class="keyword">static</span> BOOL     bOldMacFile = FALSE;
-<a name="l00028"></a>00028 <span class="comment">/* Text is emphasised */</span>
-<a name="l00029"></a>00029 <span class="keyword">static</span> BOOL     bEmphasisOpen = FALSE;
-<a name="l00030"></a>00030 <span class="comment">/* Text is superscript */</span>
-<a name="l00031"></a>00031 <span class="keyword">static</span> BOOL     bSuperscriptOpen = FALSE;
-<a name="l00032"></a>00032 <span class="comment">/* Text is subscript */</span>
-<a name="l00033"></a>00033 <span class="keyword">static</span> BOOL     bSubscriptOpen = FALSE;
-<a name="l00034"></a>00034 <span class="comment">/* Title is open */</span>
-<a name="l00035"></a>00035 <span class="keyword">static</span> BOOL     bTitleOpen = FALSE;
-<a name="l00036"></a>00036 <span class="comment">/* Table is open */</span>
-<a name="l00037"></a>00037 <span class="keyword">static</span> BOOL     bTableOpen = FALSE;
-<a name="l00038"></a>00038 <span class="comment">/* Footnote is open */</span>
-<a name="l00039"></a>00039 <span class="keyword">static</span> BOOL     bFootnoteOpen = FALSE;
-<a name="l00040"></a>00040 <span class="comment">/* Current paragraph level */</span>
-<a name="l00041"></a>00041 <span class="keyword">static</span> UINT     uiParagraphLevel = 0;
-<a name="l00042"></a>00042 <span class="comment">/* Current list level */</span>
-<a name="l00043"></a>00043 <span class="keyword">static</span> UINT     uiListLevel = 0;
-<a name="l00044"></a>00044 <span class="comment">/* Current list level is still empty */</span>
-<a name="l00045"></a>00045 <span class="keyword">static</span> BOOL     bEmptyListLevel = TRUE;
-<a name="l00046"></a>00046 <span class="comment">/* Current header level */</span>
-<a name="l00047"></a>00047 <span class="keyword">static</span> USHORT   usHeaderLevelCurrent = 0;
-<a name="l00048"></a>00048 <span class="comment">/* Current header level is still empty */</span>
-<a name="l00049"></a>00049 <span class="keyword">static</span> BOOL     bEmptyHeaderLevel = TRUE;
-<a name="l00050"></a>00050 <span class="comment">/* Number of columns in the current table */</span>
-<a name="l00051"></a>00051 <span class="keyword">static</span> <span class="keywordtype">int</span>      iTableColumnsCurrent = 0;
-<a name="l00052"></a>00052 <span class="comment">/* Footnote number */</span>
-<a name="l00053"></a>00053 <span class="keyword">static</span> UINT     uiFootnoteNumber = 0;
-<a name="l00054"></a>00054 
-<a name="l00055"></a>00055 <span class="comment">/* Constants for the stack */</span>
-<a name="l00056"></a>00056 <span class="preprocessor">#define INITIAL_STACK_SIZE      10</span>
-<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00058"></a>00058 <span class="preprocessor"></span><span class="preprocessor">#define EXTENSION_STACK_SIZE     2</span>
-<a name="l00059"></a>00059 <span class="preprocessor"></span><span class="preprocessor">#else</span>
-<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="preprocessor">#define EXTENSION_STACK_SIZE    10</span>
-<a name="l00061"></a>00061 <span class="preprocessor"></span><span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00062"></a>00062 
-<a name="l00063"></a>00063 <span class="comment">/* Variables for the stack */</span>
-<a name="l00064"></a>00064 <span class="keyword">static</span> UCHAR    *aucStack = NULL;
-<a name="l00065"></a>00065 <span class="keyword">static</span> <span class="keywordtype">size_t</span>   tStacksize = 0;
-<a name="l00066"></a>00066 <span class="keyword">static</span> <span class="keywordtype">size_t</span>   tStackNextFree = 0;
-<a name="l00067"></a>00067 
-<a name="l00068"></a>00068 <span class="comment">/* Constants for the tags */</span>
-<a name="l00069"></a>00069 <span class="preprocessor">#define TAG_NOTAG               (UCHAR)0</span>
-<a name="l00070"></a>00070 <span class="preprocessor"></span><span class="preprocessor">#define TAG_AUTHOR              (UCHAR)1</span>
-<a name="l00071"></a>00071 <span class="preprocessor"></span><span class="preprocessor">#define TAG_BEGINPAGE           (UCHAR)2</span>
-<a name="l00072"></a>00072 <span class="preprocessor"></span><span class="preprocessor">#define TAG_BOOK                (UCHAR)3</span>
-<a name="l00073"></a>00073 <span class="preprocessor"></span><span class="preprocessor">#define TAG_BOOKINFO            (UCHAR)4</span>
-<a name="l00074"></a>00074 <span class="preprocessor"></span><span class="preprocessor">#define TAG_CHAPTER             (UCHAR)5</span>
-<a name="l00075"></a>00075 <span class="preprocessor"></span><span class="preprocessor">#define TAG_COLSPEC             (UCHAR)6</span>
-<a name="l00076"></a>00076 <span class="preprocessor"></span><span class="preprocessor">#define TAG_CORPNAME            (UCHAR)7</span>
-<a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor">#define TAG_DATE                (UCHAR)8</span>
-<a name="l00078"></a>00078 <span class="preprocessor"></span><span class="preprocessor">#define TAG_EMPHASIS            (UCHAR)9</span>
-<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">#define TAG_ENTRY               (UCHAR)10</span>
-<a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor">#define TAG_FILENAME            (UCHAR)11</span>
-<a name="l00081"></a>00081 <span class="preprocessor"></span><span class="preprocessor">#define TAG_FOOTNOTE            (UCHAR)12</span>
-<a name="l00082"></a>00082 <span class="preprocessor"></span><span class="preprocessor">#define TAG_INFORMALTABLE       (UCHAR)13</span>
-<a name="l00083"></a>00083 <span class="preprocessor"></span><span class="preprocessor">#define TAG_ITEMIZEDLIST        (UCHAR)14</span>
-<a name="l00084"></a>00084 <span class="preprocessor"></span><span class="preprocessor">#define TAG_LISTITEM            (UCHAR)15</span>
-<a name="l00085"></a>00085 <span class="preprocessor"></span><span class="preprocessor">#define TAG_ORDEREDLIST         (UCHAR)16</span>
-<a name="l00086"></a>00086 <span class="preprocessor"></span><span class="preprocessor">#define TAG_PARA                (UCHAR)17</span>
-<a name="l00087"></a>00087 <span class="preprocessor"></span><span class="preprocessor">#define TAG_ROW                 (UCHAR)18</span>
-<a name="l00088"></a>00088 <span class="preprocessor"></span><span class="preprocessor">#define TAG_SECT1               (UCHAR)19</span>
-<a name="l00089"></a>00089 <span class="preprocessor"></span><span class="preprocessor">#define TAG_SECT2               (UCHAR)20</span>
-<a name="l00090"></a>00090 <span class="preprocessor"></span><span class="preprocessor">#define TAG_SECT3               (UCHAR)21</span>
-<a name="l00091"></a>00091 <span class="preprocessor"></span><span class="preprocessor">#define TAG_SECT4               (UCHAR)22</span>
-<a name="l00092"></a>00092 <span class="preprocessor"></span><span class="preprocessor">#define TAG_SECT5               (UCHAR)23</span>
-<a name="l00093"></a>00093 <span class="preprocessor"></span><span class="preprocessor">#define TAG_SUBSCRIPT           (UCHAR)24</span>
-<a name="l00094"></a>00094 <span class="preprocessor"></span><span class="preprocessor">#define TAG_SUBTITLE            (UCHAR)25</span>
-<a name="l00095"></a>00095 <span class="preprocessor"></span><span class="preprocessor">#define TAG_SUPERSCRIPT         (UCHAR)26</span>
-<a name="l00096"></a>00096 <span class="preprocessor"></span><span class="preprocessor">#define TAG_SURNAME             (UCHAR)27</span>
-<a name="l00097"></a>00097 <span class="preprocessor"></span><span class="preprocessor">#define TAG_TBODY               (UCHAR)28</span>
-<a name="l00098"></a>00098 <span class="preprocessor"></span><span class="preprocessor">#define TAG_TGROUP              (UCHAR)29</span>
-<a name="l00099"></a>00099 <span class="preprocessor"></span><span class="preprocessor">#define TAG_TITLE               (UCHAR)30</span>
-<a name="l00100"></a>00100 <span class="preprocessor"></span>
-<a name="l00101"></a>00101 <span class="keyword">typedef</span> <span class="keyword">struct </span>docbooktags_tag {
-<a name="l00102"></a>00102         UCHAR   ucTagnumber;
-<a name="l00103"></a>00103         <span class="keywordtype">char</span>    szTagname[15];
-<a name="l00104"></a>00104         BOOL    bAddNewlineStart;
-<a name="l00105"></a>00105         BOOL    bAddNewlineEnd;
-<a name="l00106"></a>00106 } docbooktags_type;
-<a name="l00107"></a>00107 
-<a name="l00108"></a>00108 <span class="keyword">static</span> <span class="keyword">const</span> docbooktags_type atDocBookTags[] = {
-<a name="l00109"></a>00109         {       TAG_NOTAG,              <span class="stringliteral">&quot;!ERROR!&quot;</span>,      TRUE,   TRUE    },
-<a name="l00110"></a>00110         {       TAG_AUTHOR,             <span class="stringliteral">&quot;author&quot;</span>,       TRUE,   TRUE    },
-<a name="l00111"></a>00111         {       TAG_BEGINPAGE,          <span class="stringliteral">&quot;beginpage&quot;</span>,    TRUE,   TRUE    },
-<a name="l00112"></a>00112         {       TAG_BOOK,               <span class="stringliteral">&quot;book&quot;</span>,         TRUE,   TRUE    },
-<a name="l00113"></a>00113         {       TAG_BOOKINFO,           <span class="stringliteral">&quot;bookinfo&quot;</span>,     TRUE,   TRUE    },
-<a name="l00114"></a>00114         {       TAG_CHAPTER,            <span class="stringliteral">&quot;chapter&quot;</span>,      TRUE,   TRUE    },
-<a name="l00115"></a>00115         {       TAG_COLSPEC,            <span class="stringliteral">&quot;colspec&quot;</span>,      TRUE,   TRUE    },
-<a name="l00116"></a>00116         {       TAG_CORPNAME,           <span class="stringliteral">&quot;corpname&quot;</span>,     FALSE,  FALSE   },
-<a name="l00117"></a>00117         {       TAG_DATE,               <span class="stringliteral">&quot;date&quot;</span>,         FALSE,  FALSE   },
-<a name="l00118"></a>00118         {       TAG_EMPHASIS,           <span class="stringliteral">&quot;emphasis&quot;</span>,     FALSE,  FALSE   },
-<a name="l00119"></a>00119         {       TAG_ENTRY,              <span class="stringliteral">&quot;entry&quot;</span>,        TRUE,   TRUE    },
-<a name="l00120"></a>00120         {       TAG_FILENAME,           <span class="stringliteral">&quot;filename&quot;</span>,     FALSE,  FALSE   },
-<a name="l00121"></a>00121         {       TAG_FOOTNOTE,           <span class="stringliteral">&quot;footnote&quot;</span>,     FALSE,  FALSE   },
-<a name="l00122"></a>00122         {       TAG_INFORMALTABLE,      <span class="stringliteral">&quot;informaltable&quot;</span>,TRUE,   TRUE    },
-<a name="l00123"></a>00123         {       TAG_ITEMIZEDLIST,       <span class="stringliteral">&quot;itemizedlist&quot;</span>, TRUE,   TRUE    },
-<a name="l00124"></a>00124         {       TAG_LISTITEM,           <span class="stringliteral">&quot;listitem&quot;</span>,     TRUE,   TRUE    },
-<a name="l00125"></a>00125         {       TAG_ORDEREDLIST,        <span class="stringliteral">&quot;orderedlist&quot;</span>,  TRUE,   TRUE    },
-<a name="l00126"></a>00126         {       TAG_PARA,               <span class="stringliteral">&quot;para&quot;</span>,         TRUE,   TRUE    },
-<a name="l00127"></a>00127         {       TAG_ROW,                <span class="stringliteral">&quot;row&quot;</span>,          TRUE,   TRUE    },
-<a name="l00128"></a>00128         {       TAG_SECT1,              <span class="stringliteral">&quot;sect1&quot;</span>,        TRUE,   TRUE    },
-<a name="l00129"></a>00129         {       TAG_SECT2,              <span class="stringliteral">&quot;sect2&quot;</span>,        TRUE,   TRUE    },
-<a name="l00130"></a>00130         {       TAG_SECT3,              <span class="stringliteral">&quot;sect3&quot;</span>,        TRUE,   TRUE    },
-<a name="l00131"></a>00131         {       TAG_SECT4,              <span class="stringliteral">&quot;sect4&quot;</span>,        TRUE,   TRUE    },
-<a name="l00132"></a>00132         {       TAG_SECT5,              <span class="stringliteral">&quot;sect5&quot;</span>,        TRUE,   TRUE    },
-<a name="l00133"></a>00133         {       TAG_SUBSCRIPT,          <span class="stringliteral">&quot;subscript&quot;</span>,    FALSE,  FALSE   },
-<a name="l00134"></a>00134         {       TAG_SUBTITLE,           <span class="stringliteral">&quot;subtitle&quot;</span>,     FALSE,  FALSE   },
-<a name="l00135"></a>00135         {       TAG_SUPERSCRIPT,        <span class="stringliteral">&quot;superscript&quot;</span>,  FALSE,  FALSE   },
-<a name="l00136"></a>00136         {       TAG_SURNAME,            <span class="stringliteral">&quot;surname&quot;</span>,      FALSE,  FALSE   },
-<a name="l00137"></a>00137         {       TAG_TBODY,              <span class="stringliteral">&quot;tbody&quot;</span>,        TRUE,   TRUE    },
-<a name="l00138"></a>00138         {       TAG_TGROUP,             <span class="stringliteral">&quot;tgroup&quot;</span>,       TRUE,   TRUE    },
-<a name="l00139"></a>00139         {       TAG_TITLE,              <span class="stringliteral">&quot;title&quot;</span>,        FALSE,  FALSE   },
-<a name="l00140"></a>00140 };
-<a name="l00141"></a>00141 
-<a name="l00142"></a>00142 <span class="keyword">static</span> <span class="keywordtype">void</span>     vAddStartTag(diagram_type *, UCHAR, <span class="keyword">const</span> <span class="keywordtype">char</span> *);
-<a name="l00143"></a>00143 <span class="keyword">static</span> <span class="keywordtype">void</span>     vAddEndTag(diagram_type *, UCHAR);
-<a name="l00144"></a>00144 <span class="keyword">static</span> <span class="keywordtype">void</span>     vAddCombinedTag(diagram_type *, UCHAR, <span class="keyword">const</span> <span class="keywordtype">char</span> *);
-<a name="l00145"></a>00145 <span class="keyword">static</span> <span class="keywordtype">void</span>     vPrintChar(diagram_type *, <span class="keywordtype">char</span>);
-<a name="l00146"></a>00146 
-<a name="l00147"></a>00147 
-<a name="l00148"></a>00148 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00149"></a>00149 <span class="preprocessor"></span><span class="comment">/*</span>
-<a name="l00150"></a>00150 <span class="comment"> * vCheckTagTable - check the tag table</span>
-<a name="l00151"></a>00151 <span class="comment"> */</span>
-<a name="l00152"></a>00152 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00153"></a>00153 vCheckTagTable(<span class="keywordtype">void</span>)
-<a name="l00154"></a>00154 {
-<a name="l00155"></a>00155         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00156"></a>00156 
-<a name="l00157"></a>00157         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; elementsof(atDocBookTags); tIndex++) {
-<a name="l00158"></a>00158                 <span class="keywordflow">if</span> (tIndex != (<span class="keywordtype">size_t</span>)atDocBookTags[tIndex].ucTagnumber) {
-<a name="l00159"></a>00159                         DBG_DEC(tIndex);
-<a name="l00160"></a>00160                         werr(1, <span class="stringliteral">&quot;Array atDocBookTags is broken&quot;</span>);
-<a name="l00161"></a>00161                 }
-<a name="l00162"></a>00162         }
-<a name="l00163"></a>00163 } <span class="comment">/* end of vCheckTagTable */</span>
-<a name="l00164"></a>00164 
-<a name="l00165"></a>00165 <span class="comment">/*</span>
-<a name="l00166"></a>00166 <span class="comment"> * __vStackTrace - show a stack trace</span>
-<a name="l00167"></a>00167 <span class="comment"> */</span>
-<a name="l00168"></a>00168 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00169"></a>00169 __vStackTrace(<span class="keywordtype">int</span> iLine)
-<a name="l00170"></a>00170 {
-<a name="l00171"></a>00171         <span class="keywordtype">int</span>     iIndex;
-<a name="l00172"></a>00172 
-<a name="l00173"></a>00173         fprintf(stderr, <span class="stringliteral">&quot;%s[%3d]:\n&quot;</span>, __FILE__, iLine);
-<a name="l00174"></a>00174 
-<a name="l00175"></a>00175         <span class="keywordflow">if</span> (tStackNextFree == 0) {
-<a name="l00176"></a>00176                 fprintf(stderr, <span class="stringliteral">&quot;The stack is empty\n&quot;</span>);
-<a name="l00177"></a>00177                 <span class="keywordflow">return</span>;
-<a name="l00178"></a>00178         }
-<a name="l00179"></a>00179         <span class="keywordflow">for</span> (iIndex = (<span class="keywordtype">int</span>)tStackNextFree - 1; iIndex &gt;= 0; iIndex--) {
-<a name="l00180"></a>00180                 fprintf(stderr, <span class="stringliteral">&quot;%2d: %2d: &#39;%s&#39;\n&quot;</span>,
-<a name="l00181"></a>00181                         iIndex,
-<a name="l00182"></a>00182                         (<span class="keywordtype">int</span>)atDocBookTags[(UINT)aucStack[iIndex]].ucTagnumber,
-<a name="l00183"></a>00183                         atDocBookTags[(UINT)aucStack[iIndex]].szTagname);
-<a name="l00184"></a>00184         }
-<a name="l00185"></a>00185 } <span class="comment">/* end of __vStackTrace */</span>
-<a name="l00186"></a>00186 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00187"></a>00187 
-<a name="l00188"></a>00188 <span class="comment">/*</span>
-<a name="l00189"></a>00189 <span class="comment"> * vPushStack - push a tag onto the stack</span>
-<a name="l00190"></a>00190 <span class="comment"> */</span>
-<a name="l00191"></a>00191 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00192"></a>00192 vPushStack(UCHAR ucTag)
-<a name="l00193"></a>00193 {
-<a name="l00194"></a>00194         fail(tStackNextFree &gt; tStacksize);
-<a name="l00195"></a>00195 
-<a name="l00196"></a>00196         <span class="keywordflow">if</span> (tStackNextFree == tStacksize) {
-<a name="l00197"></a>00197                 <span class="comment">/* The stack is full; enlarge the stack */</span>
-<a name="l00198"></a>00198                 tStacksize += EXTENSION_STACK_SIZE;
-<a name="l00199"></a>00199                 aucStack = xrealloc(aucStack, tStacksize * <span class="keyword">sizeof</span>(UCHAR));
-<a name="l00200"></a>00200                 DBG_DEC(tStacksize);
-<a name="l00201"></a>00201         }
-<a name="l00202"></a>00202 
-<a name="l00203"></a>00203         fail(tStackNextFree &gt;= tStacksize);
-<a name="l00204"></a>00204 
-<a name="l00205"></a>00205         aucStack[tStackNextFree++] = ucTag;
-<a name="l00206"></a>00206 } <span class="comment">/* end of vPushStack */</span>
-<a name="l00207"></a>00207 
-<a name="l00208"></a>00208 <span class="comment">/*</span>
-<a name="l00209"></a>00209 <span class="comment"> * vPopStack - pop a tag from the stack</span>
-<a name="l00210"></a>00210 <span class="comment"> */</span>
-<a name="l00211"></a>00211 <span class="keyword">static</span> UCHAR
-<a name="l00212"></a>00212 ucPopStack(<span class="keywordtype">void</span>)
-<a name="l00213"></a>00213 {
-<a name="l00214"></a>00214         DBG_DEC_C(tStackNextFree &gt; tStacksize, tStackNextFree);
-<a name="l00215"></a>00215         DBG_DEC_C(tStackNextFree &gt; tStacksize, tStacksize);
-<a name="l00216"></a>00216         fail(tStackNextFree &gt; tStacksize);
-<a name="l00217"></a>00217         fail(tStackNextFree == 0);
-<a name="l00218"></a>00218 
-<a name="l00219"></a>00219         <span class="keywordflow">if</span> (tStackNextFree == 0) {
-<a name="l00220"></a>00220                 werr(1, <span class="stringliteral">&quot;The stack is empty, unable to continue&quot;</span>);
-<a name="l00221"></a>00221                 <span class="keywordflow">return</span> TAG_NOTAG;
-<a name="l00222"></a>00222         }
-<a name="l00223"></a>00223         <span class="keywordflow">return</span> aucStack[--tStackNextFree];
-<a name="l00224"></a>00224 } <span class="comment">/* end of ucPopStack */</span>
-<a name="l00225"></a>00225 
-<a name="l00226"></a>00226 <span class="comment">/*</span>
-<a name="l00227"></a>00227 <span class="comment"> * vReadStack - read a tag from the top of the stack</span>
-<a name="l00228"></a>00228 <span class="comment"> */</span>
-<a name="l00229"></a>00229 <span class="keyword">static</span> UCHAR
-<a name="l00230"></a>00230 ucReadStack(<span class="keywordtype">void</span>)
-<a name="l00231"></a>00231 {
-<a name="l00232"></a>00232         DBG_DEC_C(tStackNextFree &gt; tStacksize, tStackNextFree);
-<a name="l00233"></a>00233         DBG_DEC_C(tStackNextFree &gt; tStacksize, tStacksize);
-<a name="l00234"></a>00234         fail(tStackNextFree &gt; tStacksize);
-<a name="l00235"></a>00235 
-<a name="l00236"></a>00236         <span class="keywordflow">if</span> (tStackNextFree == 0) {
-<a name="l00237"></a>00237                 <span class="comment">/* The stack is empty */</span>
-<a name="l00238"></a>00238                 <span class="keywordflow">return</span> TAG_NOTAG;
-<a name="l00239"></a>00239         }
-<a name="l00240"></a>00240         <span class="keywordflow">return</span> aucStack[tStackNextFree - 1];
-<a name="l00241"></a>00241 } <span class="comment">/* end of ucReadStack */</span>
-<a name="l00242"></a>00242 
-<a name="l00243"></a>00243 <span class="comment">/*</span>
-<a name="l00244"></a>00244 <span class="comment"> * vPrintLevel - print the tag level</span>
-<a name="l00245"></a>00245 <span class="comment"> */</span>
-<a name="l00246"></a>00246 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00247"></a>00247 vPrintLevel(FILE *pOutFile)
-<a name="l00248"></a>00248 {
-<a name="l00249"></a>00249         <span class="keywordtype">size_t</span>  tIndex;
-<a name="l00250"></a>00250 
-<a name="l00251"></a>00251         fail(pOutFile == NULL);
-<a name="l00252"></a>00252 
-<a name="l00253"></a>00253         <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tStackNextFree; tIndex++) {
-<a name="l00254"></a>00254                 (void)putc(<span class="charliteral">&#39; &#39;</span>, pOutFile);
-<a name="l00255"></a>00255         }
-<a name="l00256"></a>00256 } <span class="comment">/* end of vPrintLevel */</span>
-<a name="l00257"></a>00257 
-<a name="l00258"></a>00258 <span class="comment">/*</span>
-<a name="l00259"></a>00259 <span class="comment"> * vPrintFootnote - print a footnote</span>
-<a name="l00260"></a>00260 <span class="comment"> */</span>
-<a name="l00261"></a>00261 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00262"></a>00262 vPrintFootnote(diagram_type *pDiag, UINT uiFootnoteIndex)
-<a name="l00263"></a>00263 {
-<a name="l00264"></a>00264         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szText, *pcTmp;
-<a name="l00265"></a>00265         BOOL    bSuScript;
-<a name="l00266"></a>00266         UCHAR   ucTopTag;
-<a name="l00267"></a>00267 
-<a name="l00268"></a>00268         TRACE_MSG(<span class="stringliteral">&quot;vPrintFootnote&quot;</span>);
-<a name="l00269"></a>00269 
-<a name="l00270"></a>00270         szText = szGetFootnootText(uiFootnoteIndex);
-<a name="l00271"></a>00271 
-<a name="l00272"></a>00272         <span class="keywordflow">if</span> (szText == NULL) {
-<a name="l00273"></a>00273                 szText = <span class="stringliteral">&quot;&quot;</span>;
-<a name="l00274"></a>00274         }
-<a name="l00275"></a>00275 
-<a name="l00276"></a>00276         <span class="comment">/* Remove the subscript/superscript (if any) */</span>
-<a name="l00277"></a>00277         ucTopTag = ucReadStack();
-<a name="l00278"></a>00278         bSuScript = ucTopTag == TAG_SUBSCRIPT || ucTopTag == TAG_SUPERSCRIPT;
-<a name="l00279"></a>00279         <span class="keywordflow">if</span> (bSuScript) {
-<a name="l00280"></a>00280                 vAddEndTag(pDiag, ucTopTag);
-<a name="l00281"></a>00281         }
-<a name="l00282"></a>00282 
-<a name="l00283"></a>00283         <span class="comment">/* Start a footnote */</span>
-<a name="l00284"></a>00284         vAddStartTag(pDiag, TAG_FOOTNOTE, NULL);
-<a name="l00285"></a>00285         vAddStartTag(pDiag, TAG_PARA, NULL);
-<a name="l00286"></a>00286 
-<a name="l00287"></a>00287         <span class="comment">/* Print a footnote */</span>
-<a name="l00288"></a>00288         <span class="keywordflow">for</span> (pcTmp = szText; *pcTmp != <span class="charliteral">&#39;\0&#39;</span>; pcTmp++) {
-<a name="l00289"></a>00289                 <span class="keywordflow">if</span> (*pcTmp == PAR_END) {
-<a name="l00290"></a>00290                         <span class="keywordflow">if</span> (*(pcTmp + 1) != PAR_END &amp;&amp; *(pcTmp + 1) != <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00291"></a>00291                                 <span class="comment">/* PAR_END is not empty and not last */</span>
-<a name="l00292"></a>00292                                 vAddEndTag(pDiag, TAG_PARA);
-<a name="l00293"></a>00293                                 vAddStartTag(pDiag, TAG_PARA, NULL);
-<a name="l00294"></a>00294                         }
-<a name="l00295"></a>00295                 } <span class="keywordflow">else</span> {
-<a name="l00296"></a>00296                         vPrintChar(pDiag, *pcTmp);
-<a name="l00297"></a>00297                 }
-<a name="l00298"></a>00298         }
-<a name="l00299"></a>00299 
-<a name="l00300"></a>00300         <span class="comment">/* End a footnote */</span>
-<a name="l00301"></a>00301         vAddEndTag(pDiag, TAG_PARA);
-<a name="l00302"></a>00302         vAddEndTag(pDiag, TAG_FOOTNOTE);
-<a name="l00303"></a>00303 
-<a name="l00304"></a>00304         <span class="comment">/* Repair the subscript/superscript (if any) */</span>
-<a name="l00305"></a>00305         <span class="keywordflow">if</span> (bSuScript) {
-<a name="l00306"></a>00306                 vAddStartTag(pDiag, ucTopTag, NULL);
-<a name="l00307"></a>00307         }
-<a name="l00308"></a>00308 } <span class="comment">/* end of vPrintFootnote */</span>
-<a name="l00309"></a>00309 
-<a name="l00310"></a>00310 <span class="comment">/*</span>
-<a name="l00311"></a>00311 <span class="comment"> * vPrintChar - print a character with XML encoding</span>
-<a name="l00312"></a>00312 <span class="comment"> */</span>
-<a name="l00313"></a>00313 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00314"></a>00314 vPrintChar(diagram_type *pDiag, <span class="keywordtype">char</span> cChar)
-<a name="l00315"></a>00315 {
-<a name="l00316"></a>00316         fail(pDiag == NULL);
-<a name="l00317"></a>00317         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00318"></a>00318 
-<a name="l00319"></a>00319         <span class="keywordflow">switch</span> (cChar) {
-<a name="l00320"></a>00320         <span class="keywordflow">case</span> FOOTNOTE_OR_ENDNOTE:
-<a name="l00321"></a>00321                 uiFootnoteNumber++;
-<a name="l00322"></a>00322                 vPrintFootnote(pDiag, uiFootnoteNumber - 1);
-<a name="l00323"></a>00323                 <span class="keywordflow">break</span>;
-<a name="l00324"></a>00324         <span class="keywordflow">case</span> <span class="charliteral">&#39;&lt;&#39;</span>:
-<a name="l00325"></a>00325                 fprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;%s&quot;</span>, <span class="stringliteral">&quot;&amp;lt;&quot;</span>);
-<a name="l00326"></a>00326                 <span class="keywordflow">break</span>;
-<a name="l00327"></a>00327         <span class="keywordflow">case</span> <span class="charliteral">&#39;&gt;&#39;</span>:
-<a name="l00328"></a>00328                 fprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;%s&quot;</span>, <span class="stringliteral">&quot;&amp;gt;&quot;</span>);
-<a name="l00329"></a>00329                 <span class="keywordflow">break</span>;
-<a name="l00330"></a>00330         <span class="keywordflow">case</span> <span class="charliteral">&#39;&amp;&#39;</span>:
-<a name="l00331"></a>00331                 fprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;%s&quot;</span>, <span class="stringliteral">&quot;&amp;amp;&quot;</span>);
-<a name="l00332"></a>00332                 <span class="keywordflow">break</span>;
-<a name="l00333"></a>00333         <span class="keywordflow">default</span>:
-<a name="l00334"></a>00334                 (void)putc(cChar, pDiag-&gt;pOutFile);
-<a name="l00335"></a>00335                 <span class="keywordflow">break</span>;
-<a name="l00336"></a>00336         }
-<a name="l00337"></a>00337 } <span class="comment">/* end of vPrintChar */</span>
-<a name="l00338"></a>00338 
-<a name="l00339"></a>00339 <span class="comment">/*</span>
-<a name="l00340"></a>00340 <span class="comment"> * vPrintSpecialChar - convert and print a character</span>
-<a name="l00341"></a>00341 <span class="comment"> */</span>
-<a name="l00342"></a>00342 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00343"></a>00343 vPrintSpecialChar(diagram_type *pDiag, USHORT usChar)
-<a name="l00344"></a>00344 {
-<a name="l00345"></a>00345         ULONG   ulChar;
-<a name="l00346"></a>00346         <span class="keywordtype">size_t</span>  tLen, tIndex;
-<a name="l00347"></a>00347         <span class="keywordtype">char</span>    szResult[4];
-<a name="l00348"></a>00348 
-<a name="l00349"></a>00349         fail(pDiag == NULL);
-<a name="l00350"></a>00350         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00351"></a>00351         fail(iWordVersion &lt; 0);
-<a name="l00352"></a>00352         fail(eEncoding == encoding_neutral);
-<a name="l00353"></a>00353 
-<a name="l00354"></a>00354         ulChar = ulTranslateCharacters(usChar, 0, iWordVersion,
-<a name="l00355"></a>00355                                 conversion_xml, eEncoding, bOldMacFile);
-<a name="l00356"></a>00356         tLen = tUcs2Utf8(ulChar, szResult, <span class="keyword">sizeof</span>(szResult));
-<a name="l00357"></a>00357         <span class="keywordflow">if</span> (tLen == 1) {
-<a name="l00358"></a>00358                 vPrintChar(pDiag, szResult[0]);
-<a name="l00359"></a>00359         } <span class="keywordflow">else</span> {
-<a name="l00360"></a>00360                 <span class="keywordflow">for</span> (tIndex = 0; tIndex &lt; tLen; tIndex++) {
-<a name="l00361"></a>00361                         (void)putc(szResult[tIndex], pDiag-&gt;pOutFile);
-<a name="l00362"></a>00362                 }
-<a name="l00363"></a>00363         }
-<a name="l00364"></a>00364 } <span class="comment">/* end of vPrintSpecialChar */</span>
-<a name="l00365"></a>00365 
-<a name="l00366"></a>00366 <span class="comment">/*</span>
-<a name="l00367"></a>00367 <span class="comment"> * vPrintSpecialString - convert and print a string</span>
-<a name="l00368"></a>00368 <span class="comment"> */</span>
-<a name="l00369"></a>00369 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00370"></a>00370 vPrintSpecialString(diagram_type *pDiag, <span class="keyword">const</span> <span class="keywordtype">char</span> *szString)
-<a name="l00371"></a>00371 {
-<a name="l00372"></a>00372         <span class="keywordtype">int</span>     iIndex;
-<a name="l00373"></a>00373         USHORT  usChar;
-<a name="l00374"></a>00374 
-<a name="l00375"></a>00375         fail(pDiag == NULL);
-<a name="l00376"></a>00376         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00377"></a>00377         fail(szString == NULL);
-<a name="l00378"></a>00378 
-<a name="l00379"></a>00379         <span class="keywordflow">for</span> (iIndex = 0; szString[iIndex] != <span class="charliteral">&#39;\0&#39;</span>; iIndex++) {
-<a name="l00380"></a>00380                 usChar = (USHORT)(UCHAR)szString[iIndex];
-<a name="l00381"></a>00381                 vPrintSpecialChar(pDiag, usChar);
-<a name="l00382"></a>00382         }
-<a name="l00383"></a>00383 } <span class="comment">/* end of vPrintSpecialString */</span>
-<a name="l00384"></a>00384 
-<a name="l00385"></a>00385 <span class="comment">/*</span>
-<a name="l00386"></a>00386 <span class="comment"> * vAddStartTag - add the specified start tag to the file</span>
-<a name="l00387"></a>00387 <span class="comment"> */</span>
-<a name="l00388"></a>00388 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00389"></a>00389 vAddStartTag(diagram_type *pDiag, UCHAR ucTag, <span class="keyword">const</span> <span class="keywordtype">char</span> *szAttribute)
-<a name="l00390"></a>00390 {
-<a name="l00391"></a>00391         fail(pDiag == NULL);
-<a name="l00392"></a>00392         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00393"></a>00393         fail((<span class="keywordtype">size_t</span>)ucTag &gt;= elementsof(atDocBookTags));
-<a name="l00394"></a>00394 
-<a name="l00395"></a>00395         <span class="keywordflow">if</span> (atDocBookTags[(UINT)ucTag].bAddNewlineStart) {
-<a name="l00396"></a>00396                 fprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;\n&quot;</span>);
-<a name="l00397"></a>00397                 vPrintLevel(pDiag-&gt;pOutFile);
-<a name="l00398"></a>00398         }
-<a name="l00399"></a>00399 
-<a name="l00400"></a>00400         <span class="keywordflow">if</span> (szAttribute == NULL || szAttribute[0] == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00401"></a>00401                 fprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;&lt;%s&gt;&quot;</span>,
-<a name="l00402"></a>00402                         atDocBookTags[(UINT)ucTag].szTagname);
-<a name="l00403"></a>00403         } <span class="keywordflow">else</span> {
-<a name="l00404"></a>00404                 fprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;&lt;%s %s&gt;&quot;</span>,
-<a name="l00405"></a>00405                         atDocBookTags[(UINT)ucTag].szTagname, szAttribute);
-<a name="l00406"></a>00406         }
-<a name="l00407"></a>00407 
-<a name="l00408"></a>00408         <span class="keywordflow">if</span> (atDocBookTags[(UINT)ucTag].bAddNewlineEnd) {
-<a name="l00409"></a>00409                 fprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;\n&quot;</span>);
-<a name="l00410"></a>00410                 pDiag-&gt;lXleft = 0;
-<a name="l00411"></a>00411         }
-<a name="l00412"></a>00412 
-<a name="l00413"></a>00413         vPushStack(ucTag);
-<a name="l00414"></a>00414 
-<a name="l00415"></a>00415         <span class="comment">/* Set global variables */</span>
-<a name="l00416"></a>00416         <span class="keywordflow">switch</span> (ucTag) {
-<a name="l00417"></a>00417         <span class="keywordflow">case</span> TAG_CHAPTER:
-<a name="l00418"></a>00418                 usHeaderLevelCurrent = 1;
-<a name="l00419"></a>00419                 bEmptyHeaderLevel = TRUE;
-<a name="l00420"></a>00420                 <span class="keywordflow">break</span>;
-<a name="l00421"></a>00421         <span class="keywordflow">case</span> TAG_SECT1:
-<a name="l00422"></a>00422                 usHeaderLevelCurrent = 2;
-<a name="l00423"></a>00423                 bEmptyHeaderLevel = TRUE;
-<a name="l00424"></a>00424                 <span class="keywordflow">break</span>;
-<a name="l00425"></a>00425         <span class="keywordflow">case</span> TAG_SECT2:
-<a name="l00426"></a>00426                 usHeaderLevelCurrent = 3;
-<a name="l00427"></a>00427                 bEmptyHeaderLevel = TRUE;
-<a name="l00428"></a>00428                 <span class="keywordflow">break</span>;
-<a name="l00429"></a>00429         <span class="keywordflow">case</span> TAG_SECT3:
-<a name="l00430"></a>00430                 usHeaderLevelCurrent = 4;
-<a name="l00431"></a>00431                 bEmptyHeaderLevel = TRUE;
-<a name="l00432"></a>00432                 <span class="keywordflow">break</span>;
-<a name="l00433"></a>00433         <span class="keywordflow">case</span> TAG_SECT4:
-<a name="l00434"></a>00434                 usHeaderLevelCurrent = 5;
-<a name="l00435"></a>00435                 bEmptyHeaderLevel = TRUE;
-<a name="l00436"></a>00436                 <span class="keywordflow">break</span>;
-<a name="l00437"></a>00437         <span class="keywordflow">case</span> TAG_SECT5:
-<a name="l00438"></a>00438                 usHeaderLevelCurrent = 6;
-<a name="l00439"></a>00439                 bEmptyHeaderLevel = TRUE;
-<a name="l00440"></a>00440                 <span class="keywordflow">break</span>;
-<a name="l00441"></a>00441         <span class="keywordflow">case</span> TAG_TITLE:
-<a name="l00442"></a>00442                 fail(uiParagraphLevel != 0);
-<a name="l00443"></a>00443                 bTitleOpen = TRUE;
-<a name="l00444"></a>00444                 <span class="keywordflow">break</span>;
-<a name="l00445"></a>00445         <span class="keywordflow">case</span> TAG_FOOTNOTE:
-<a name="l00446"></a>00446                 bFootnoteOpen = TRUE;
-<a name="l00447"></a>00447                 <span class="keywordflow">break</span>;
-<a name="l00448"></a>00448         <span class="keywordflow">case</span> TAG_PARA:
-<a name="l00449"></a>00449                 fail(bTitleOpen &amp;&amp; !bFootnoteOpen);
-<a name="l00450"></a>00450                 uiParagraphLevel++;
-<a name="l00451"></a>00451                 bEmptyHeaderLevel = FALSE;
-<a name="l00452"></a>00452                 <span class="keywordflow">break</span>;
-<a name="l00453"></a>00453         <span class="keywordflow">case</span> TAG_EMPHASIS:
-<a name="l00454"></a>00454                 bEmphasisOpen = TRUE;
-<a name="l00455"></a>00455                 <span class="keywordflow">break</span>;
-<a name="l00456"></a>00456         <span class="keywordflow">case</span> TAG_ITEMIZEDLIST:
-<a name="l00457"></a>00457         <span class="keywordflow">case</span> TAG_ORDEREDLIST:
-<a name="l00458"></a>00458                 uiListLevel++;
-<a name="l00459"></a>00459                 bEmptyListLevel = TRUE;
-<a name="l00460"></a>00460                 bEmptyHeaderLevel = FALSE;
-<a name="l00461"></a>00461                 <span class="keywordflow">break</span>;
-<a name="l00462"></a>00462         <span class="keywordflow">case</span> TAG_LISTITEM:
-<a name="l00463"></a>00463                 bEmptyListLevel = FALSE;
-<a name="l00464"></a>00464                 <span class="keywordflow">break</span>;
-<a name="l00465"></a>00465         <span class="keywordflow">case</span> TAG_SUPERSCRIPT:
-<a name="l00466"></a>00466                 bSuperscriptOpen = TRUE;
-<a name="l00467"></a>00467                 <span class="keywordflow">break</span>;
-<a name="l00468"></a>00468         <span class="keywordflow">case</span> TAG_SUBSCRIPT:
-<a name="l00469"></a>00469                 bSubscriptOpen = TRUE;
-<a name="l00470"></a>00470                 <span class="keywordflow">break</span>;
-<a name="l00471"></a>00471         <span class="keywordflow">case</span> TAG_INFORMALTABLE:
-<a name="l00472"></a>00472                 bTableOpen = TRUE;
-<a name="l00473"></a>00473                 bEmptyHeaderLevel = FALSE;
-<a name="l00474"></a>00474                 <span class="keywordflow">break</span>;
-<a name="l00475"></a>00475         <span class="keywordflow">default</span>:
-<a name="l00476"></a>00476                 <span class="keywordflow">break</span>;
-<a name="l00477"></a>00477         }
-<a name="l00478"></a>00478 } <span class="comment">/* end of vAddStartTag */</span>
-<a name="l00479"></a>00479 
-<a name="l00480"></a>00480 <span class="comment">/*</span>
-<a name="l00481"></a>00481 <span class="comment"> * vAddEndTag - add the specified end tag to the file</span>
-<a name="l00482"></a>00482 <span class="comment"> */</span>
-<a name="l00483"></a>00483 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00484"></a>00484 vAddEndTag(diagram_type *pDiag, UCHAR ucTag)
-<a name="l00485"></a>00485 {
-<a name="l00486"></a>00486         UCHAR   ucTopTag;
-<a name="l00487"></a>00487 
-<a name="l00488"></a>00488         fail(pDiag == NULL);
-<a name="l00489"></a>00489         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00490"></a>00490         fail((<span class="keywordtype">size_t</span>)ucTag &gt;= elementsof(atDocBookTags));
-<a name="l00491"></a>00491 
-<a name="l00492"></a>00492 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00493"></a>00493 <span class="preprocessor"></span>        ucTopTag = ucReadStack();
-<a name="l00494"></a>00494         <span class="keywordflow">if</span> (ucTag != ucTopTag) {
-<a name="l00495"></a>00495                 DBG_DEC(ucTag);
-<a name="l00496"></a>00496                 DBG_MSG(atDocBookTags[(UINT)ucTag].szTagname);
-<a name="l00497"></a>00497                 vStackTrace();
-<a name="l00498"></a>00498         }
-<a name="l00499"></a>00499 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00500"></a>00500 
-<a name="l00501"></a>00501         ucTopTag = ucPopStack();
-<a name="l00502"></a>00502         fail((<span class="keywordtype">size_t</span>)ucTopTag &gt;= elementsof(atDocBookTags));
-<a name="l00503"></a>00503         <span class="keywordflow">if</span> (ucTag != ucTopTag) {
-<a name="l00504"></a>00504                 DBG_DEC(ucTag);
-<a name="l00505"></a>00505                 DBG_DEC(ucTopTag);
-<a name="l00506"></a>00506                 DBG_FIXME();
-<a name="l00507"></a>00507                 werr(1, <span class="stringliteral">&quot;Impossible tag sequence, unable to continue&quot;</span>);
-<a name="l00508"></a>00508         }
-<a name="l00509"></a>00509 
-<a name="l00510"></a>00510         <span class="keywordflow">if</span> (atDocBookTags[(UINT)ucTag].bAddNewlineEnd) {
-<a name="l00511"></a>00511                 fprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;\n&quot;</span>);
-<a name="l00512"></a>00512                 vPrintLevel(pDiag-&gt;pOutFile);
-<a name="l00513"></a>00513         }
-<a name="l00514"></a>00514 
-<a name="l00515"></a>00515         fprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;&lt;/%s&gt;&quot;</span>, atDocBookTags[(UINT)ucTag].szTagname);
-<a name="l00516"></a>00516 
-<a name="l00517"></a>00517         <span class="keywordflow">if</span> (atDocBookTags[(UINT)ucTag].bAddNewlineStart) {
-<a name="l00518"></a>00518                 fprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;\n&quot;</span>);
-<a name="l00519"></a>00519                 pDiag-&gt;lXleft = 0;
-<a name="l00520"></a>00520         }
-<a name="l00521"></a>00521 
-<a name="l00522"></a>00522         <span class="comment">/* Set global variables */</span>
-<a name="l00523"></a>00523         <span class="keywordflow">switch</span> (ucTag) {
-<a name="l00524"></a>00524         <span class="keywordflow">case</span> TAG_CHAPTER:
-<a name="l00525"></a>00525                 usHeaderLevelCurrent = 0;
-<a name="l00526"></a>00526                 <span class="keywordflow">break</span>;
-<a name="l00527"></a>00527         <span class="keywordflow">case</span> TAG_SECT1:
-<a name="l00528"></a>00528                 usHeaderLevelCurrent = 1;
-<a name="l00529"></a>00529                 <span class="keywordflow">break</span>;
-<a name="l00530"></a>00530         <span class="keywordflow">case</span> TAG_SECT2:
-<a name="l00531"></a>00531                 usHeaderLevelCurrent = 2;
-<a name="l00532"></a>00532                 <span class="keywordflow">break</span>;
-<a name="l00533"></a>00533         <span class="keywordflow">case</span> TAG_SECT3:
-<a name="l00534"></a>00534                 usHeaderLevelCurrent = 3;
-<a name="l00535"></a>00535                 <span class="keywordflow">break</span>;
-<a name="l00536"></a>00536         <span class="keywordflow">case</span> TAG_SECT4:
-<a name="l00537"></a>00537                 usHeaderLevelCurrent = 4;
-<a name="l00538"></a>00538                 <span class="keywordflow">break</span>;
-<a name="l00539"></a>00539         <span class="keywordflow">case</span> TAG_SECT5:
-<a name="l00540"></a>00540                 usHeaderLevelCurrent = 5;
-<a name="l00541"></a>00541                 <span class="keywordflow">break</span>;
-<a name="l00542"></a>00542         <span class="keywordflow">case</span> TAG_TITLE:
-<a name="l00543"></a>00543                 bTitleOpen = FALSE;
-<a name="l00544"></a>00544                 <span class="keywordflow">break</span>;
-<a name="l00545"></a>00545         <span class="keywordflow">case</span> TAG_FOOTNOTE:
-<a name="l00546"></a>00546                 bFootnoteOpen = FALSE;
-<a name="l00547"></a>00547                 <span class="keywordflow">break</span>;
-<a name="l00548"></a>00548         <span class="keywordflow">case</span> TAG_PARA:
-<a name="l00549"></a>00549                 uiParagraphLevel--;
-<a name="l00550"></a>00550                 <span class="keywordflow">break</span>;
-<a name="l00551"></a>00551         <span class="keywordflow">case</span> TAG_EMPHASIS:
-<a name="l00552"></a>00552                 bEmphasisOpen = FALSE;
-<a name="l00553"></a>00553                 <span class="keywordflow">break</span>;
-<a name="l00554"></a>00554         <span class="keywordflow">case</span> TAG_SUPERSCRIPT:
-<a name="l00555"></a>00555                 bSuperscriptOpen = FALSE;
-<a name="l00556"></a>00556                 <span class="keywordflow">break</span>;
-<a name="l00557"></a>00557         <span class="keywordflow">case</span> TAG_ITEMIZEDLIST:
-<a name="l00558"></a>00558         <span class="keywordflow">case</span> TAG_ORDEREDLIST:
-<a name="l00559"></a>00559                 uiListLevel--;
-<a name="l00560"></a>00560                 <span class="keywordflow">break</span>;
-<a name="l00561"></a>00561         <span class="keywordflow">case</span> TAG_SUBSCRIPT:
-<a name="l00562"></a>00562                 bSubscriptOpen = FALSE;
-<a name="l00563"></a>00563                 <span class="keywordflow">break</span>;
-<a name="l00564"></a>00564         <span class="keywordflow">case</span> TAG_INFORMALTABLE:
-<a name="l00565"></a>00565                 bTableOpen = FALSE;
-<a name="l00566"></a>00566                 iTableColumnsCurrent = 0;
-<a name="l00567"></a>00567                 <span class="keywordflow">break</span>;
-<a name="l00568"></a>00568         <span class="keywordflow">default</span>:
-<a name="l00569"></a>00569                 <span class="keywordflow">break</span>;
-<a name="l00570"></a>00570         }
-<a name="l00571"></a>00571 } <span class="comment">/* end of vAddEndTag */</span>
-<a name="l00572"></a>00572 
-<a name="l00573"></a>00573 <span class="comment">/*</span>
-<a name="l00574"></a>00574 <span class="comment"> * vAddEndTagOptional - add the specified end tag to the file if needed</span>
-<a name="l00575"></a>00575 <span class="comment"> */</span>
-<a name="l00576"></a>00576 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00577"></a>00577 vAddEndTagOptional(diagram_type *pDiag, UCHAR ucTag)
-<a name="l00578"></a>00578 {
-<a name="l00579"></a>00579         UCHAR   ucTopTag;
-<a name="l00580"></a>00580 
-<a name="l00581"></a>00581         ucTopTag = ucReadStack();
-<a name="l00582"></a>00582         <span class="keywordflow">if</span> (ucTag == ucTopTag) {
-<a name="l00583"></a>00583                 vAddEndTag(pDiag, ucTag);
-<a name="l00584"></a>00584         }
-<a name="l00585"></a>00585 } <span class="comment">/* end of vAddEndTagOptional */</span>
-<a name="l00586"></a>00586 
-<a name="l00587"></a>00587 <span class="comment">/*</span>
-<a name="l00588"></a>00588 <span class="comment"> * vAddCombinedTag - add the specified start and end tag to the file</span>
-<a name="l00589"></a>00589 <span class="comment"> */</span>
-<a name="l00590"></a>00590 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00591"></a>00591 vAddCombinedTag(diagram_type *pDiag, UCHAR ucTag, <span class="keyword">const</span> <span class="keywordtype">char</span> *szAttribute)
-<a name="l00592"></a>00592 {
-<a name="l00593"></a>00593         fail(pDiag == NULL);
-<a name="l00594"></a>00594         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00595"></a>00595         fail((<span class="keywordtype">size_t</span>)ucTag &gt;= elementsof(atDocBookTags));
-<a name="l00596"></a>00596 
-<a name="l00597"></a>00597         <span class="keywordflow">if</span> (atDocBookTags[(UINT)ucTag].bAddNewlineStart) {
-<a name="l00598"></a>00598                 fprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;\n&quot;</span>);
-<a name="l00599"></a>00599                 vPrintLevel(pDiag-&gt;pOutFile);
-<a name="l00600"></a>00600         }
-<a name="l00601"></a>00601 
-<a name="l00602"></a>00602         <span class="keywordflow">if</span> (szAttribute == NULL || szAttribute[0] == <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00603"></a>00603                 fprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;&lt;%s/&gt;&quot;</span>,
-<a name="l00604"></a>00604                         atDocBookTags[(UINT)ucTag].szTagname);
-<a name="l00605"></a>00605         } <span class="keywordflow">else</span> {
-<a name="l00606"></a>00606                 fprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;&lt;%s %s/&gt;&quot;</span>,
-<a name="l00607"></a>00607                         atDocBookTags[(UINT)ucTag].szTagname, szAttribute);
-<a name="l00608"></a>00608         }
-<a name="l00609"></a>00609 
-<a name="l00610"></a>00610         <span class="keywordflow">if</span> (atDocBookTags[(UINT)ucTag].bAddNewlineStart) {
-<a name="l00611"></a>00611                 fprintf(pDiag-&gt;pOutFile, <span class="stringliteral">&quot;\n&quot;</span>);
-<a name="l00612"></a>00612                 pDiag-&gt;lXleft = 0;
-<a name="l00613"></a>00613         }
-<a name="l00614"></a>00614 } <span class="comment">/* end of vAddCombinedTag */</span>
-<a name="l00615"></a>00615 
-<a name="l00616"></a>00616 <span class="comment">/*</span>
-<a name="l00617"></a>00617 <span class="comment"> * vAddEndTagsUntil2 - add end tags until one the specified tags is seen</span>
-<a name="l00618"></a>00618 <span class="comment"> */</span>
-<a name="l00619"></a>00619 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00620"></a>00620 vAddEndTagsUntil2(diagram_type *pDiag, UCHAR ucTag1, UCHAR ucTag2)
-<a name="l00621"></a>00621 {
-<a name="l00622"></a>00622         UCHAR   ucTopTag;
-<a name="l00623"></a>00623 
-<a name="l00624"></a>00624         <span class="keywordflow">do</span> {
-<a name="l00625"></a>00625                 ucTopTag = ucReadStack();
-<a name="l00626"></a>00626                 <span class="keywordflow">switch</span> (ucTopTag) {
-<a name="l00627"></a>00627                 <span class="keywordflow">case</span> TAG_CHAPTER:
-<a name="l00628"></a>00628                 <span class="keywordflow">case</span> TAG_SECT1:
-<a name="l00629"></a>00629                 <span class="keywordflow">case</span> TAG_SECT2:
-<a name="l00630"></a>00630                 <span class="keywordflow">case</span> TAG_SECT3:
-<a name="l00631"></a>00631                 <span class="keywordflow">case</span> TAG_SECT4:
-<a name="l00632"></a>00632                 <span class="keywordflow">case</span> TAG_SECT5:
-<a name="l00633"></a>00633                         <span class="keywordflow">if</span> (bEmptyHeaderLevel) {
-<a name="l00634"></a>00634                                 <span class="comment">/*</span>
-<a name="l00635"></a>00635 <span class="comment">                                 * An empty chapter is legal in Word,</span>
-<a name="l00636"></a>00636 <span class="comment">                                 * but not in DocBook.</span>
-<a name="l00637"></a>00637 <span class="comment">                                 */</span>
-<a name="l00638"></a>00638                                 vAddCombinedTag(pDiag, TAG_PARA, NULL);
-<a name="l00639"></a>00639                                 bEmptyHeaderLevel = FALSE;
-<a name="l00640"></a>00640                         }
-<a name="l00641"></a>00641                         <span class="keywordflow">break</span>;
-<a name="l00642"></a>00642                 <span class="keywordflow">case</span> TAG_ITEMIZEDLIST:
-<a name="l00643"></a>00643                 <span class="keywordflow">case</span> TAG_ORDEREDLIST:
-<a name="l00644"></a>00644                         <span class="keywordflow">if</span> (bEmptyListLevel) {
-<a name="l00645"></a>00645                                 <span class="comment">/*</span>
-<a name="l00646"></a>00646 <span class="comment">                                 * A list without items is legal in Word,</span>
-<a name="l00647"></a>00647 <span class="comment">                                 * but not in DocBook. (Nor are empty items)</span>
-<a name="l00648"></a>00648 <span class="comment">                                 */</span>
-<a name="l00649"></a>00649                                 vAddStartTag(pDiag, TAG_LISTITEM, NULL);
-<a name="l00650"></a>00650                                 vAddCombinedTag(pDiag, TAG_PARA, NULL);
-<a name="l00651"></a>00651                                 vAddEndTag(pDiag, TAG_LISTITEM);
-<a name="l00652"></a>00652                                 bEmptyListLevel = FALSE;
-<a name="l00653"></a>00653                         }
-<a name="l00654"></a>00654                         <span class="keywordflow">break</span>;
-<a name="l00655"></a>00655                 <span class="keywordflow">default</span>:
-<a name="l00656"></a>00656                         <span class="keywordflow">break</span>;
-<a name="l00657"></a>00657                 }
-<a name="l00658"></a>00658                 vAddEndTag(pDiag, ucTopTag);
-<a name="l00659"></a>00659         } <span class="keywordflow">while</span> (ucTopTag != ucTag1 &amp;&amp; ucTopTag != ucTag2);
-<a name="l00660"></a>00660 } <span class="comment">/* end of vAddEndTagsUntil2 */</span>
-<a name="l00661"></a>00661 
-<a name="l00662"></a>00662 <span class="comment">/*</span>
-<a name="l00663"></a>00663 <span class="comment"> * vCreateBookIntro - create title and bookinfo</span>
-<a name="l00664"></a>00664 <span class="comment"> */</span>
-<a name="l00665"></a>00665 <span class="keywordtype">void</span>
-<a name="l00666"></a>00666 vCreateBookIntro(diagram_type *pDiag, <span class="keywordtype">int</span> iVersion)
-<a name="l00667"></a>00667 {
-<a name="l00668"></a>00668         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szTitle, *szSubject, *szAuthor;
-<a name="l00669"></a>00669         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szLastSaveDtm, *szCompany;
-<a name="l00670"></a>00670         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szLanguage;
-<a name="l00671"></a>00671         <span class="keywordtype">char</span>            szTmp[13];
-<a name="l00672"></a>00672 
-<a name="l00673"></a>00673         fail(pDiag == NULL);
-<a name="l00674"></a>00674         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00675"></a>00675         fail(iVersion &lt; 0);
-<a name="l00676"></a>00676         fail(eEncoding == encoding_neutral);
-<a name="l00677"></a>00677 
-<a name="l00678"></a>00678         iWordVersion = iVersion;
-<a name="l00679"></a>00679         bOldMacFile = bIsOldMacFile();
-<a name="l00680"></a>00680         szTitle = szGetTitle();
-<a name="l00681"></a>00681         szSubject = szGetSubject();
-<a name="l00682"></a>00682         szAuthor = szGetAuthor();
-<a name="l00683"></a>00683         szLastSaveDtm = szGetLastSaveDtm();
-<a name="l00684"></a>00684         szCompany = szGetCompany();
-<a name="l00685"></a>00685 
-<a name="l00686"></a>00686         <span class="comment">/* Start Book */</span>
-<a name="l00687"></a>00687         szLanguage = szGetLanguage();
-<a name="l00688"></a>00688         <span class="keywordflow">if</span> (szLanguage != NULL) {
-<a name="l00689"></a>00689                 DBG_MSG(szLanguage);
-<a name="l00690"></a>00690                 sprintf(szTmp, <span class="stringliteral">&quot;lang=&#39;%.5s&#39;&quot;</span>, szLanguage);
-<a name="l00691"></a>00691                 szLanguage = szTmp;
-<a name="l00692"></a>00692         }
-<a name="l00693"></a>00693         vAddStartTag(pDiag, TAG_BOOK, szLanguage);
-<a name="l00694"></a>00694 
-<a name="l00695"></a>00695         <span class="comment">/* Book title */</span>
-<a name="l00696"></a>00696         <span class="keywordflow">if</span> (szTitle != NULL &amp;&amp; szTitle[0] != <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00697"></a>00697                 vAddStartTag(pDiag, TAG_TITLE, NULL);
-<a name="l00698"></a>00698                 vPrintSpecialString(pDiag, szTitle);
-<a name="l00699"></a>00699                 vAddEndTag(pDiag, TAG_TITLE);
-<a name="l00700"></a>00700         }
-<a name="l00701"></a>00701         <span class="comment">/* Bookinfo */</span>
-<a name="l00702"></a>00702         <span class="keywordflow">if</span> ((szTitle != NULL &amp;&amp; szTitle[0] != <span class="charliteral">&#39;\0&#39;</span>) ||
-<a name="l00703"></a>00703             (szSubject != NULL &amp;&amp; szSubject[0] != <span class="charliteral">&#39;\0&#39;</span>) ||
-<a name="l00704"></a>00704             (szAuthor != NULL &amp;&amp; szAuthor[0] != <span class="charliteral">&#39;\0&#39;</span>) ||
-<a name="l00705"></a>00705             (szLastSaveDtm != NULL &amp;&amp; szLastSaveDtm[0] != <span class="charliteral">&#39;\0&#39;</span>) ||
-<a name="l00706"></a>00706             (szCompany != NULL &amp;&amp; szCompany[0] != <span class="charliteral">&#39;\0&#39;</span>)) {
-<a name="l00707"></a>00707                 vAddStartTag(pDiag, TAG_BOOKINFO, NULL);
-<a name="l00708"></a>00708                 <span class="keywordflow">if</span> (szTitle != NULL &amp;&amp; szTitle[0] != <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00709"></a>00709                         vAddStartTag(pDiag, TAG_TITLE, NULL);
-<a name="l00710"></a>00710                         vPrintSpecialString(pDiag, szTitle);
-<a name="l00711"></a>00711                         vAddEndTag(pDiag, TAG_TITLE);
-<a name="l00712"></a>00712                 }
-<a name="l00713"></a>00713                 <span class="keywordflow">if</span> (szSubject != NULL &amp;&amp; szSubject[0] != <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00714"></a>00714                         vAddStartTag(pDiag, TAG_SUBTITLE, NULL);
-<a name="l00715"></a>00715                         vPrintSpecialString(pDiag, szSubject);
-<a name="l00716"></a>00716                         vAddEndTag(pDiag, TAG_SUBTITLE);
-<a name="l00717"></a>00717                 }
-<a name="l00718"></a>00718                 <span class="keywordflow">if</span> (szAuthor != NULL &amp;&amp; szAuthor[0] != <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00719"></a>00719                         vAddStartTag(pDiag, TAG_AUTHOR, NULL);
-<a name="l00720"></a>00720                         vAddStartTag(pDiag, TAG_SURNAME, NULL);
-<a name="l00721"></a>00721                         vPrintSpecialString(pDiag, szAuthor);
-<a name="l00722"></a>00722                         vAddEndTag(pDiag, TAG_SURNAME);
-<a name="l00723"></a>00723                         vAddEndTag(pDiag, TAG_AUTHOR);
-<a name="l00724"></a>00724                 }
-<a name="l00725"></a>00725                 <span class="keywordflow">if</span> (szLastSaveDtm != NULL &amp;&amp; szLastSaveDtm[0] != <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00726"></a>00726                         vAddStartTag(pDiag, TAG_DATE, NULL);
-<a name="l00727"></a>00727                         vPrintSpecialString(pDiag, szLastSaveDtm);
-<a name="l00728"></a>00728                         vAddEndTag(pDiag, TAG_DATE);
-<a name="l00729"></a>00729                 }
-<a name="l00730"></a>00730                 <span class="keywordflow">if</span> (szCompany != NULL &amp;&amp; szCompany[0] != <span class="charliteral">&#39;\0&#39;</span>) {
-<a name="l00731"></a>00731                         vAddStartTag(pDiag, TAG_CORPNAME, NULL);
-<a name="l00732"></a>00732                         vPrintSpecialString(pDiag, szCompany);
-<a name="l00733"></a>00733                         vAddEndTag(pDiag, TAG_CORPNAME);
-<a name="l00734"></a>00734                 }
-<a name="l00735"></a>00735                 vAddEndTag(pDiag, TAG_BOOKINFO);
-<a name="l00736"></a>00736         }
-<a name="l00737"></a>00737 } <span class="comment">/* end of vCreateBookIntro */</span>
-<a name="l00738"></a>00738 
-<a name="l00739"></a>00739 <span class="comment">/*</span>
-<a name="l00740"></a>00740 <span class="comment"> * vPrologueXML - perform the XML initialization</span>
-<a name="l00741"></a>00741 <span class="comment"> */</span>
-<a name="l00742"></a>00742 <span class="keywordtype">void</span>
-<a name="l00743"></a>00743 vPrologueXML(diagram_type *pDiag, <span class="keyword">const</span> options_type *pOptions)
-<a name="l00744"></a>00744 {
-<a name="l00745"></a>00745 
-<a name="l00746"></a>00746         fail(pDiag == NULL);
-<a name="l00747"></a>00747         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00748"></a>00748         fail(pOptions == NULL);
-<a name="l00749"></a>00749 
-<a name="l00750"></a>00750 <span class="preprocessor">#if defined(DEBUG)</span>
-<a name="l00751"></a>00751 <span class="preprocessor"></span>        vCheckTagTable();
-<a name="l00752"></a>00752 <span class="preprocessor">#endif </span><span class="comment">/* DEBUG */</span>
-<a name="l00753"></a>00753 
-<a name="l00754"></a>00754         <span class="comment">/* Set global variables to their start values */</span>
-<a name="l00755"></a>00755         eEncoding = pOptions-&gt;eEncoding;
-<a name="l00756"></a>00756         bEmphasisOpen = FALSE;
-<a name="l00757"></a>00757         bSuperscriptOpen = FALSE;
-<a name="l00758"></a>00758         bSubscriptOpen = FALSE;
-<a name="l00759"></a>00759         bTitleOpen = FALSE;
-<a name="l00760"></a>00760         bTableOpen = FALSE;
-<a name="l00761"></a>00761         bFootnoteOpen = FALSE;
-<a name="l00762"></a>00762         uiParagraphLevel = 0;
-<a name="l00763"></a>00763         uiListLevel = 0;
-<a name="l00764"></a>00764         bEmptyListLevel = TRUE;
-<a name="l00765"></a>00765         usHeaderLevelCurrent = 0;
-<a name="l00766"></a>00766         bEmptyHeaderLevel = TRUE;
-<a name="l00767"></a>00767         iTableColumnsCurrent = 0;
-<a name="l00768"></a>00768         uiFootnoteNumber = 0;
-<a name="l00769"></a>00769 
-<a name="l00770"></a>00770         pDiag-&gt;lXleft = 0;
-<a name="l00771"></a>00771         pDiag-&gt;lYtop = 0;
-<a name="l00772"></a>00772 
-<a name="l00773"></a>00773         <span class="comment">/* Create an empty stack */</span>
-<a name="l00774"></a>00774         tStacksize = INITIAL_STACK_SIZE;
-<a name="l00775"></a>00775         aucStack = xcalloc(tStacksize, <span class="keyword">sizeof</span>(UCHAR));
-<a name="l00776"></a>00776         tStackNextFree = 0;
-<a name="l00777"></a>00777 } <span class="comment">/* end of vPrologueXML */</span>
-<a name="l00778"></a>00778 
-<a name="l00779"></a>00779 <span class="comment">/*</span>
-<a name="l00780"></a>00780 <span class="comment"> * vEpilogueXML - clean up after everything is done</span>
-<a name="l00781"></a>00781 <span class="comment"> */</span>
-<a name="l00782"></a>00782 <span class="keywordtype">void</span>
-<a name="l00783"></a>00783 vEpilogueXML(diagram_type *pDiag)
-<a name="l00784"></a>00784 {
-<a name="l00785"></a>00785         vStackTrace();
-<a name="l00786"></a>00786 
-<a name="l00787"></a>00787         vAddEndTagsUntil1(pDiag, TAG_BOOK);
-<a name="l00788"></a>00788 
-<a name="l00789"></a>00789         vStackTrace();
-<a name="l00790"></a>00790 
-<a name="l00791"></a>00791         <span class="comment">/* Destroy the stack */</span>
-<a name="l00792"></a>00792         fail(tStackNextFree != 0);
-<a name="l00793"></a>00793         tStacksize = 0;
-<a name="l00794"></a>00794         aucStack = xfree(aucStack);
-<a name="l00795"></a>00795         tStackNextFree = 0;
-<a name="l00796"></a>00796 } <span class="comment">/* end of vEpilogueXML */</span>
-<a name="l00797"></a>00797 
-<a name="l00798"></a>00798 <span class="comment">/*</span>
-<a name="l00799"></a>00799 <span class="comment"> * vPrintXML - print a XML string</span>
-<a name="l00800"></a>00800 <span class="comment"> */</span>
-<a name="l00801"></a>00801 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l00802"></a>00802 vPrintXML(diagram_type *pDiag, <span class="keyword">const</span> <span class="keywordtype">char</span> *szString, <span class="keywordtype">size_t</span> tStringLength,
-<a name="l00803"></a>00803                 USHORT usFontstyle)
-<a name="l00804"></a>00804 {
-<a name="l00805"></a>00805         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szAttr;
-<a name="l00806"></a>00806         <span class="keywordtype">int</span>     iCount;
-<a name="l00807"></a>00807         <span class="keywordtype">size_t</span>  tNextFree;
-<a name="l00808"></a>00808         BOOL    bNotReady, bEmphasisNew, bSuperscriptNew, bSubscriptNew;
-<a name="l00809"></a>00809         UCHAR   ucTopTag, aucStorage[3];
-<a name="l00810"></a>00810 
-<a name="l00811"></a>00811         fail(szString == NULL);
-<a name="l00812"></a>00812 
-<a name="l00813"></a>00813         <span class="keywordflow">if</span> (szString == NULL || szString[0] == <span class="charliteral">&#39;\0&#39;</span> || tStringLength == 0) {
-<a name="l00814"></a>00814                 <span class="keywordflow">return</span>;
-<a name="l00815"></a>00815         }
-<a name="l00816"></a>00816 
-<a name="l00817"></a>00817         <span class="keywordflow">if</span> (tStringLength == 1 &amp;&amp; szString[0] == FOOTNOTE_OR_ENDNOTE) {
-<a name="l00818"></a>00818                 <span class="comment">/* Don&#39;t do anything special for just a single footnote */</span>
-<a name="l00819"></a>00819                 bEmphasisNew = FALSE;
-<a name="l00820"></a>00820                 bSuperscriptNew = FALSE;
-<a name="l00821"></a>00821                 bSubscriptNew = FALSE;
-<a name="l00822"></a>00822         } <span class="keywordflow">else</span> {
-<a name="l00823"></a>00823                 <span class="comment">/* Situation normal */</span>
-<a name="l00824"></a>00824                 bEmphasisNew = bIsBold(usFontstyle) ||
-<a name="l00825"></a>00825                                 bIsItalic(usFontstyle) ||
-<a name="l00826"></a>00826                                 bIsUnderline(usFontstyle) ||
-<a name="l00827"></a>00827                                 bIsStrike(usFontstyle);
-<a name="l00828"></a>00828                 bSuperscriptNew = bIsSuperscript(usFontstyle);
-<a name="l00829"></a>00829                 bSubscriptNew = bIsSubscript(usFontstyle);
-<a name="l00830"></a>00830         }
-<a name="l00831"></a>00831 
-<a name="l00832"></a>00832         <span class="comment">/* End what has to be ended (or more to keep the stack happy) */</span>
-<a name="l00833"></a>00833         tNextFree = 0;
-<a name="l00834"></a>00834         bNotReady = TRUE;
-<a name="l00835"></a>00835         <span class="keywordflow">do</span> {
-<a name="l00836"></a>00836                 ucTopTag = ucReadStack();
-<a name="l00837"></a>00837                 <span class="keywordflow">switch</span> (ucTopTag) {
-<a name="l00838"></a>00838                 <span class="keywordflow">case</span> TAG_EMPHASIS:
-<a name="l00839"></a>00839                         fail(!bEmphasisOpen);
-<a name="l00840"></a>00840                         <span class="keywordflow">if</span> (bEmphasisNew) {
-<a name="l00841"></a>00841                                 aucStorage[tNextFree++] = ucTopTag;
-<a name="l00842"></a>00842                         }
-<a name="l00843"></a>00843                         vAddEndTag(pDiag, ucTopTag);
-<a name="l00844"></a>00844                         <span class="keywordflow">break</span>;
-<a name="l00845"></a>00845                 <span class="keywordflow">case</span> TAG_SUPERSCRIPT:
-<a name="l00846"></a>00846                         fail(!bSuperscriptOpen);
-<a name="l00847"></a>00847                         <span class="keywordflow">if</span> (bSuperscriptNew) {
-<a name="l00848"></a>00848                                 aucStorage[tNextFree++] = ucTopTag;
-<a name="l00849"></a>00849                         }
-<a name="l00850"></a>00850                         vAddEndTag(pDiag, ucTopTag);
-<a name="l00851"></a>00851                         <span class="keywordflow">break</span>;
-<a name="l00852"></a>00852                 <span class="keywordflow">case</span> TAG_SUBSCRIPT:
-<a name="l00853"></a>00853                         fail(!bSubscriptOpen);
-<a name="l00854"></a>00854                         <span class="keywordflow">if</span> (bSubscriptNew) {
-<a name="l00855"></a>00855                                 aucStorage[tNextFree++] = ucTopTag;
-<a name="l00856"></a>00856                         }
-<a name="l00857"></a>00857                         vAddEndTag(pDiag, ucTopTag);
-<a name="l00858"></a>00858                         <span class="keywordflow">break</span>;
-<a name="l00859"></a>00859                 <span class="keywordflow">default</span>:
-<a name="l00860"></a>00860                         bNotReady = FALSE;
-<a name="l00861"></a>00861                         <span class="keywordflow">break</span>;
-<a name="l00862"></a>00862                 }
-<a name="l00863"></a>00863                 fail(tNextFree &gt; elementsof(aucStorage));
-<a name="l00864"></a>00864                 fail(bNotReady &amp;&amp; tNextFree == elementsof(aucStorage));
-<a name="l00865"></a>00865         } <span class="keywordflow">while</span> (bNotReady);
-<a name="l00866"></a>00866 
-<a name="l00867"></a>00867         <span class="comment">/* Just te make sure */</span>
-<a name="l00868"></a>00868         vStartOfParagraphXML(pDiag, 1);
-<a name="l00869"></a>00869 
-<a name="l00870"></a>00870         <span class="comment">/* Restart to keep the stack happy */</span>
-<a name="l00871"></a>00871         <span class="keywordflow">for</span> (iCount = (<span class="keywordtype">int</span>)tNextFree - 1; iCount &gt; 0; iCount--) {
-<a name="l00872"></a>00872                 vAddStartTag(pDiag, aucStorage[iCount], NULL);
-<a name="l00873"></a>00873         }
-<a name="l00874"></a>00874 
-<a name="l00875"></a>00875         <span class="comment">/* Start what has to be started */</span>
-<a name="l00876"></a>00876         <span class="keywordflow">if</span> (bEmphasisNew &amp;&amp; !bEmphasisOpen) {
-<a name="l00877"></a>00877                 <span class="keywordflow">if</span> (bIsBold(usFontstyle)) {
-<a name="l00878"></a>00878                         szAttr = <span class="stringliteral">&quot;role=&#39;bold&#39;&quot;</span>;
-<a name="l00879"></a>00879                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (bIsItalic(usFontstyle)) {
-<a name="l00880"></a>00880                         szAttr = NULL;
-<a name="l00881"></a>00881                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (bIsUnderline(usFontstyle)) {
-<a name="l00882"></a>00882                         szAttr = <span class="stringliteral">&quot;role=&#39;underline&#39;&quot;</span>;
-<a name="l00883"></a>00883                 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (bIsStrike(usFontstyle)) {
-<a name="l00884"></a>00884                         szAttr = <span class="stringliteral">&quot;role=&#39;strikethrough&#39;&quot;</span>;
-<a name="l00885"></a>00885                 } <span class="keywordflow">else</span> {
-<a name="l00886"></a>00886                         szAttr = NULL;
-<a name="l00887"></a>00887                 }
-<a name="l00888"></a>00888                 vAddStartTag(pDiag, TAG_EMPHASIS, szAttr);
-<a name="l00889"></a>00889         }
-<a name="l00890"></a>00890         <span class="keywordflow">if</span> (bSuperscriptNew &amp;&amp; !bSuperscriptOpen) {
-<a name="l00891"></a>00891                 vAddStartTag(pDiag, TAG_SUPERSCRIPT, NULL);
-<a name="l00892"></a>00892         }
-<a name="l00893"></a>00893         <span class="keywordflow">if</span> (bSubscriptNew &amp;&amp; !bSubscriptOpen) {
-<a name="l00894"></a>00894                 vAddStartTag(pDiag, TAG_SUBSCRIPT, NULL);
-<a name="l00895"></a>00895         }
-<a name="l00896"></a>00896 
-<a name="l00897"></a>00897         <span class="comment">/* The print the string */</span>
-<a name="l00898"></a>00898         <span class="keywordflow">for</span> (iCount = 0; iCount &lt; (int)tStringLength; iCount++) {
-<a name="l00899"></a>00899                 vPrintChar(pDiag, szString[iCount]);
-<a name="l00900"></a>00900         }
-<a name="l00901"></a>00901 } <span class="comment">/* end of vPrintXML */</span>
-<a name="l00902"></a>00902 
-<a name="l00903"></a>00903 <span class="comment">/*</span>
-<a name="l00904"></a>00904 <span class="comment"> * vMove2NextLineXML - move to the next line</span>
-<a name="l00905"></a>00905 <span class="comment"> */</span>
-<a name="l00906"></a>00906 <span class="keywordtype">void</span>
-<a name="l00907"></a>00907 vMove2NextLineXML(diagram_type *pDiag)
-<a name="l00908"></a>00908 {
-<a name="l00909"></a>00909         fail(pDiag == NULL);
-<a name="l00910"></a>00910 
-<a name="l00911"></a>00911         <span class="comment">/*</span>
-<a name="l00912"></a>00912 <span class="comment">        if (uiParagraphLevel != 0) {</span>
-<a name="l00913"></a>00913 <span class="comment">                We need something like HTML&#39;s &lt;BR&gt; tag</span>
-<a name="l00914"></a>00914 <span class="comment">        }</span>
-<a name="l00915"></a>00915 <span class="comment">        */</span>
-<a name="l00916"></a>00916 } <span class="comment">/* end of vMove2NextLineXML */</span>
-<a name="l00917"></a>00917 
-<a name="l00918"></a>00918 <span class="comment">/*</span>
-<a name="l00919"></a>00919 <span class="comment"> * vSubstringXML - put a sub string into a diagram</span>
-<a name="l00920"></a>00920 <span class="comment"> */</span>
-<a name="l00921"></a>00921 <span class="keywordtype">void</span>
-<a name="l00922"></a>00922 vSubstringXML(diagram_type *pDiag,
-<a name="l00923"></a>00923         <span class="keyword">const</span> <span class="keywordtype">char</span> *szString, <span class="keywordtype">size_t</span> tStringLength, <span class="keywordtype">long</span> lStringWidth,
-<a name="l00924"></a>00924         USHORT usFontstyle)
-<a name="l00925"></a>00925 {
-<a name="l00926"></a>00926         fail(pDiag == NULL || szString == NULL);
-<a name="l00927"></a>00927         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l00928"></a>00928         fail(pDiag-&gt;lXleft &lt; 0);
-<a name="l00929"></a>00929         fail(tStringLength != strlen(szString));
-<a name="l00930"></a>00930 
-<a name="l00931"></a>00931         <span class="keywordflow">if</span> (szString[0] == <span class="charliteral">&#39;\0&#39;</span> || tStringLength == 0) {
-<a name="l00932"></a>00932                 <span class="keywordflow">return</span>;
-<a name="l00933"></a>00933         }
-<a name="l00934"></a>00934 
-<a name="l00935"></a>00935         vPrintXML(pDiag, szString, tStringLength, usFontstyle);
-<a name="l00936"></a>00936         pDiag-&gt;lXleft += lStringWidth;
-<a name="l00937"></a>00937 } <span class="comment">/* end of vSubstringXML */</span>
-<a name="l00938"></a>00938 
-<a name="l00939"></a>00939 <span class="comment">/*</span>
-<a name="l00940"></a>00940 <span class="comment"> * Create an start of a paragraph</span>
-<a name="l00941"></a>00941 <span class="comment"> * Only works on paragraph level one, because Word doesn&#39;t allow paragraphs</span>
-<a name="l00942"></a>00942 <span class="comment"> * in paragraphs. Other paragraph levels result from DocBooks special needs.</span>
-<a name="l00943"></a>00943 <span class="comment"> */</span>
-<a name="l00944"></a>00944 <span class="keywordtype">void</span>
-<a name="l00945"></a>00945 vStartOfParagraphXML(diagram_type *pDiag, UINT uiMaxLevel)
-<a name="l00946"></a>00946 {
-<a name="l00947"></a>00947         fail(pDiag == NULL);
-<a name="l00948"></a>00948 
-<a name="l00949"></a>00949         <span class="keywordflow">if</span> (uiParagraphLevel &gt;= uiMaxLevel || bTitleOpen) {
-<a name="l00950"></a>00950                 <span class="comment">/* In Word a title is just a paragraph */</span>
-<a name="l00951"></a>00951                 <span class="keywordflow">return</span>;
-<a name="l00952"></a>00952         }
-<a name="l00953"></a>00953         <span class="keywordflow">if</span> (uiListLevel != 0 &amp;&amp; bEmptyListLevel) {
-<a name="l00954"></a>00954                 <span class="comment">/* No paragraphs in a list before the first listitem */</span>
-<a name="l00955"></a>00955                 <span class="keywordflow">return</span>;
-<a name="l00956"></a>00956         }
-<a name="l00957"></a>00957         <span class="keywordflow">if</span> (usHeaderLevelCurrent == 0) {
-<a name="l00958"></a>00958                 <span class="comment">/* No paragraphs without an open header */</span>
-<a name="l00959"></a>00959                 vAddStartTag(pDiag, TAG_CHAPTER, NULL);
-<a name="l00960"></a>00960                 <span class="comment">/* Dummy title */</span>
-<a name="l00961"></a>00961                 vAddCombinedTag(pDiag, TAG_TITLE, NULL);
-<a name="l00962"></a>00962         }
-<a name="l00963"></a>00963         vAddStartTag(pDiag, TAG_PARA, NULL);
-<a name="l00964"></a>00964 } <span class="comment">/* end of vStartOfParagraphXML */</span>
-<a name="l00965"></a>00965 
-<a name="l00966"></a>00966 <span class="comment">/*</span>
-<a name="l00967"></a>00967 <span class="comment"> * Create an end of a paragraph</span>
-<a name="l00968"></a>00968 <span class="comment"> * Only for paragraph level one and for titles</span>
-<a name="l00969"></a>00969 <span class="comment"> */</span>
-<a name="l00970"></a>00970 <span class="keywordtype">void</span>
-<a name="l00971"></a>00971 vEndOfParagraphXML(diagram_type *pDiag, UINT uiMaxLevel)
-<a name="l00972"></a>00972 {
-<a name="l00973"></a>00973         UCHAR   ucTopTag;
-<a name="l00974"></a>00974 
-<a name="l00975"></a>00975         fail(pDiag == NULL);
-<a name="l00976"></a>00976 
-<a name="l00977"></a>00977         <span class="keywordflow">if</span> (uiParagraphLevel &gt; uiMaxLevel) {
-<a name="l00978"></a>00978                 DBG_DEC(uiParagraphLevel);
-<a name="l00979"></a>00979                 <span class="keywordflow">return</span>;
-<a name="l00980"></a>00980         }
-<a name="l00981"></a>00981 
-<a name="l00982"></a>00982         <span class="keywordflow">for</span>(;;) {
-<a name="l00983"></a>00983                 ucTopTag = ucReadStack();
-<a name="l00984"></a>00984                 <span class="keywordflow">switch</span> (ucTopTag) {
-<a name="l00985"></a>00985                 <span class="keywordflow">case</span> TAG_EMPHASIS:
-<a name="l00986"></a>00986                         fail(!bEmphasisOpen);
-<a name="l00987"></a>00987                         vAddEndTag(pDiag, TAG_EMPHASIS);
-<a name="l00988"></a>00988                         <span class="keywordflow">break</span>;
-<a name="l00989"></a>00989                 <span class="keywordflow">case</span> TAG_SUPERSCRIPT:
-<a name="l00990"></a>00990                         fail(!bSuperscriptOpen);
-<a name="l00991"></a>00991                         vAddEndTag(pDiag, TAG_SUPERSCRIPT);
-<a name="l00992"></a>00992                         <span class="keywordflow">break</span>;
-<a name="l00993"></a>00993                 <span class="keywordflow">case</span> TAG_SUBSCRIPT:
-<a name="l00994"></a>00994                         fail(!bSubscriptOpen);
-<a name="l00995"></a>00995                         vAddEndTag(pDiag, TAG_SUBSCRIPT);
-<a name="l00996"></a>00996                         <span class="keywordflow">break</span>;
-<a name="l00997"></a>00997                 <span class="keywordflow">case</span> TAG_TITLE:
-<a name="l00998"></a>00998                         fail(!bTitleOpen);
-<a name="l00999"></a>00999                         vAddEndTag(pDiag, TAG_TITLE);
-<a name="l01000"></a>01000                         <span class="keywordflow">return</span>;
-<a name="l01001"></a>01001                 <span class="keywordflow">case</span> TAG_PARA:
-<a name="l01002"></a>01002                         fail(uiParagraphLevel == 0);
-<a name="l01003"></a>01003                         vAddEndTag(pDiag, TAG_PARA);
-<a name="l01004"></a>01004                         <span class="keywordflow">return</span>;
-<a name="l01005"></a>01005                 <span class="keywordflow">case</span> TAG_TBODY:
-<a name="l01006"></a>01006                 <span class="keywordflow">case</span> TAG_TGROUP:
-<a name="l01007"></a>01007                 <span class="keywordflow">case</span> TAG_INFORMALTABLE:
-<a name="l01008"></a>01008                         fail(!bTableOpen);
-<a name="l01009"></a>01009                         vAddEndTag(pDiag, ucTopTag);
-<a name="l01010"></a>01010                         <span class="keywordflow">break</span>;
-<a name="l01011"></a>01011                 <span class="keywordflow">case</span> TAG_NOTAG:
-<a name="l01012"></a>01012                         DBG_FIXME();
-<a name="l01013"></a>01013                         werr(1, <span class="stringliteral">&quot;Impossible tag sequence, unable to continue&quot;</span>);
-<a name="l01014"></a>01014                         <span class="keywordflow">break</span>;
-<a name="l01015"></a>01015                 <span class="keywordflow">default</span>:
-<a name="l01016"></a>01016                         DBG_DEC(ucTopTag);
-<a name="l01017"></a>01017                         DBG_MSG_C((<span class="keywordtype">size_t</span>)ucTopTag &lt; elementsof(atDocBookTags),
-<a name="l01018"></a>01018                                 atDocBookTags[(UINT)ucTopTag].szTagname);
-<a name="l01019"></a>01019                         <span class="keywordflow">return</span>;
-<a name="l01020"></a>01020                 }
-<a name="l01021"></a>01021         }
-<a name="l01022"></a>01022 } <span class="comment">/* end of vEndOfParagraphXML */</span>
-<a name="l01023"></a>01023 
-<a name="l01024"></a>01024 <span class="comment">/*</span>
-<a name="l01025"></a>01025 <span class="comment"> * Create an end of a page</span>
-<a name="l01026"></a>01026 <span class="comment"> */</span>
-<a name="l01027"></a>01027 <span class="keywordtype">void</span>
-<a name="l01028"></a>01028 vEndOfPageXML(diagram_type *pDiag)
-<a name="l01029"></a>01029 {
-<a name="l01030"></a>01030         <span class="keywordflow">if</span> (bTableOpen || usHeaderLevelCurrent == 0) {
-<a name="l01031"></a>01031                 <span class="comment">/* No beginpage in a table or outside a chapter */</span>
-<a name="l01032"></a>01032                 <span class="keywordflow">return</span>;
-<a name="l01033"></a>01033         }
-<a name="l01034"></a>01034         <span class="keywordflow">if</span> (bTitleOpen) {
-<a name="l01035"></a>01035                 <span class="comment">/* A beginpage is not allowed when in a title */</span>
-<a name="l01036"></a>01036                 <span class="comment">/* So start a new paragraph */</span>
-<a name="l01037"></a>01037                 vEndOfParagraphXML(pDiag, UINT_MAX);
-<a name="l01038"></a>01038                 vStartOfParagraphXML(pDiag, UINT_MAX);
-<a name="l01039"></a>01039                 <span class="keywordflow">return</span>;
-<a name="l01040"></a>01040         }
-<a name="l01041"></a>01041         vAddCombinedTag(pDiag, TAG_BEGINPAGE, NULL);
-<a name="l01042"></a>01042 } <span class="comment">/* end of vEndOfPageXML */</span>
-<a name="l01043"></a>01043 
-<a name="l01044"></a>01044 <span class="comment">/*</span>
-<a name="l01045"></a>01045 <span class="comment"> * vCloseHeaderLevels - close the specified header levels</span>
-<a name="l01046"></a>01046 <span class="comment"> */</span>
-<a name="l01047"></a>01047 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l01048"></a>01048 vCloseHeaderLevels(diagram_type *pDiag, USHORT usIstd)
-<a name="l01049"></a>01049 {
-<a name="l01050"></a>01050         BOOL    bNotReady;
-<a name="l01051"></a>01051         UCHAR   ucTopTag;
-<a name="l01052"></a>01052 
-<a name="l01053"></a>01053         DBG_MSG(<span class="stringliteral">&quot;vCloseHeaderLevels&quot;</span>);
-<a name="l01054"></a>01054         DBG_DEC(usIstd);
-<a name="l01055"></a>01055         DBG_DEC(usHeaderLevelCurrent);
-<a name="l01056"></a>01056 
-<a name="l01057"></a>01057         vStackTrace();
-<a name="l01058"></a>01058 
-<a name="l01059"></a>01059         bNotReady = TRUE;
-<a name="l01060"></a>01060         <span class="keywordflow">do</span> {
-<a name="l01061"></a>01061                 ucTopTag = ucReadStack();
-<a name="l01062"></a>01062                 <span class="keywordflow">switch</span> (ucTopTag) {
-<a name="l01063"></a>01063                 <span class="keywordflow">case</span> TAG_TITLE:
-<a name="l01064"></a>01064                 <span class="keywordflow">case</span> TAG_PARA:
-<a name="l01065"></a>01065                         vAddEndTag(pDiag, ucTopTag);
-<a name="l01066"></a>01066                         <span class="keywordflow">break</span>;
-<a name="l01067"></a>01067                 <span class="keywordflow">default</span>:
-<a name="l01068"></a>01068                         bNotReady = FALSE;
-<a name="l01069"></a>01069                         <span class="keywordflow">break</span>;
-<a name="l01070"></a>01070                 }
-<a name="l01071"></a>01071         } <span class="keywordflow">while</span> (bNotReady);
-<a name="l01072"></a>01072 
-<a name="l01073"></a>01073         vStackTrace();
-<a name="l01074"></a>01074 
-<a name="l01075"></a>01075         <span class="keywordflow">while</span> (usHeaderLevelCurrent &gt;= usIstd) {
-<a name="l01076"></a>01076                 <span class="keywordflow">if</span> (bEmptyHeaderLevel) {
-<a name="l01077"></a>01077                         vAddCombinedTag(pDiag, TAG_PARA, NULL);
-<a name="l01078"></a>01078                         bEmptyHeaderLevel = FALSE;
-<a name="l01079"></a>01079                 }
-<a name="l01080"></a>01080                 <span class="keywordflow">switch</span> (usHeaderLevelCurrent) {
-<a name="l01081"></a>01081                 <span class="keywordflow">case</span> 1: vAddEndTag(pDiag, TAG_CHAPTER); <span class="keywordflow">break</span>;
-<a name="l01082"></a>01082                 <span class="keywordflow">case</span> 2: vAddEndTag(pDiag, TAG_SECT1); <span class="keywordflow">break</span>;
-<a name="l01083"></a>01083                 <span class="keywordflow">case</span> 3: vAddEndTag(pDiag, TAG_SECT2); <span class="keywordflow">break</span>;
-<a name="l01084"></a>01084                 <span class="keywordflow">case</span> 4: vAddEndTag(pDiag, TAG_SECT3); <span class="keywordflow">break</span>;
-<a name="l01085"></a>01085                 <span class="keywordflow">case</span> 5: vAddEndTag(pDiag, TAG_SECT4); <span class="keywordflow">break</span>;
-<a name="l01086"></a>01086                 <span class="keywordflow">case</span> 6: vAddEndTag(pDiag, TAG_SECT5); <span class="keywordflow">break</span>;
-<a name="l01087"></a>01087                 <span class="keywordflow">default</span>:
-<a name="l01088"></a>01088                         DBG_DEC(usHeaderLevelCurrent);
-<a name="l01089"></a>01089                         DBG_FIXME();
-<a name="l01090"></a>01090                         <span class="keywordflow">return</span>;
-<a name="l01091"></a>01091                 }
-<a name="l01092"></a>01092         }
-<a name="l01093"></a>01093 
-<a name="l01094"></a>01094         DBG_DEC(usHeaderLevelCurrent);
-<a name="l01095"></a>01095 
-<a name="l01096"></a>01096         vStackTrace();
-<a name="l01097"></a>01097 } <span class="comment">/* end of vCloseHeaderLevels */</span>
-<a name="l01098"></a>01098 
-<a name="l01099"></a>01099 <span class="comment">/*</span>
-<a name="l01100"></a>01100 <span class="comment"> * vSetHeadersXML - set the headers</span>
-<a name="l01101"></a>01101 <span class="comment"> */</span>
-<a name="l01102"></a>01102 <span class="keywordtype">void</span>
-<a name="l01103"></a>01103 vSetHeadersXML(diagram_type *pDiag, USHORT usIstd)
-<a name="l01104"></a>01104 {
-<a name="l01105"></a>01105         fail(pDiag == NULL);
-<a name="l01106"></a>01106 
-<a name="l01107"></a>01107         <span class="keywordflow">if</span> (usIstd == 0 || usIstd &gt; 6) {
-<a name="l01108"></a>01108                 DBG_DEC_C(usIstd != 0 &amp;&amp; usIstd &lt;= 9, usIstd);
-<a name="l01109"></a>01109                 <span class="keywordflow">return</span>;
-<a name="l01110"></a>01110         }
-<a name="l01111"></a>01111         DBG_DEC(usIstd);
-<a name="l01112"></a>01112 
-<a name="l01113"></a>01113         <span class="keywordflow">if</span> (bTableOpen || uiListLevel != 0) {
-<a name="l01114"></a>01114                 <span class="comment">/* No headers when you&#39;re in a table or in a list */</span>
-<a name="l01115"></a>01115                 <span class="keywordflow">return</span>;
-<a name="l01116"></a>01116         }
-<a name="l01117"></a>01117 
-<a name="l01118"></a>01118         <span class="comment">/* Close levels */</span>
-<a name="l01119"></a>01119         vCloseHeaderLevels(pDiag, usIstd);
-<a name="l01120"></a>01120 
-<a name="l01121"></a>01121         DBG_DEC(usHeaderLevelCurrent);
-<a name="l01122"></a>01122 
-<a name="l01123"></a>01123         <span class="comment">/* Open levels */</span>
-<a name="l01124"></a>01124         <span class="keywordflow">while</span> (usHeaderLevelCurrent &lt; usIstd) {
-<a name="l01125"></a>01125                 <span class="keywordflow">switch</span> (usHeaderLevelCurrent) {
-<a name="l01126"></a>01126                 <span class="keywordflow">case</span> 0: vAddStartTag(pDiag, TAG_CHAPTER, NULL); <span class="keywordflow">break</span>;
-<a name="l01127"></a>01127                 <span class="keywordflow">case</span> 1: vAddStartTag(pDiag, TAG_SECT1, NULL); <span class="keywordflow">break</span>;
-<a name="l01128"></a>01128                 <span class="keywordflow">case</span> 2: vAddStartTag(pDiag, TAG_SECT2, NULL); <span class="keywordflow">break</span>;
-<a name="l01129"></a>01129                 <span class="keywordflow">case</span> 3: vAddStartTag(pDiag, TAG_SECT3, NULL); <span class="keywordflow">break</span>;
-<a name="l01130"></a>01130                 <span class="keywordflow">case</span> 4: vAddStartTag(pDiag, TAG_SECT4, NULL); <span class="keywordflow">break</span>;
-<a name="l01131"></a>01131                 <span class="keywordflow">case</span> 5: vAddStartTag(pDiag, TAG_SECT5, NULL); <span class="keywordflow">break</span>;
-<a name="l01132"></a>01132                 <span class="keywordflow">default</span>:
-<a name="l01133"></a>01133                         DBG_DEC(usHeaderLevelCurrent);
-<a name="l01134"></a>01134                         DBG_FIXME();
-<a name="l01135"></a>01135                         <span class="keywordflow">return</span>;
-<a name="l01136"></a>01136                 }
-<a name="l01137"></a>01137                 fail(usIstd == 0);
-<a name="l01138"></a>01138                 <span class="comment">/* The next paragraph should be a title */</span>
-<a name="l01139"></a>01139                 <span class="keywordflow">if</span> (usHeaderLevelCurrent &lt; usIstd) {
-<a name="l01140"></a>01140                         <span class="comment">/* This chapter level is not in the Word document */</span>
-<a name="l01141"></a>01141                         vAddCombinedTag(pDiag, TAG_TITLE, NULL);
-<a name="l01142"></a>01142                 } <span class="keywordflow">else</span> {
-<a name="l01143"></a>01143                         vAddStartTag(pDiag, TAG_TITLE, NULL);
-<a name="l01144"></a>01144                 }
-<a name="l01145"></a>01145         }
-<a name="l01146"></a>01146 } <span class="comment">/* end of vSetHeadersXML */</span>
-<a name="l01147"></a>01147 
-<a name="l01148"></a>01148 <span class="comment">/*</span>
-<a name="l01149"></a>01149 <span class="comment"> * Create a start of a list</span>
-<a name="l01150"></a>01150 <span class="comment"> */</span>
-<a name="l01151"></a>01151 <span class="keywordtype">void</span>
-<a name="l01152"></a>01152 vStartOfListXML(diagram_type *pDiag, UCHAR ucNFC, BOOL bIsEndOfTable)
-<a name="l01153"></a>01153 {
-<a name="l01154"></a>01154         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szAttr;
-<a name="l01155"></a>01155         UCHAR           ucTag;
-<a name="l01156"></a>01156 
-<a name="l01157"></a>01157         fail(pDiag == NULL);
-<a name="l01158"></a>01158 
-<a name="l01159"></a>01159         <span class="keywordflow">if</span> (bIsEndOfTable) {
-<a name="l01160"></a>01160                 <span class="comment">/* FIXME: until a list in a table is allowed */</span>
-<a name="l01161"></a>01161                 vEndOfTableXML(pDiag);
-<a name="l01162"></a>01162         }
-<a name="l01163"></a>01163 
-<a name="l01164"></a>01164         <span class="keywordflow">if</span> (bTableOpen) {
-<a name="l01165"></a>01165                 <span class="comment">/* FIXME: a list in a table should be allowed */</span>
-<a name="l01166"></a>01166                 <span class="keywordflow">return</span>;
-<a name="l01167"></a>01167         }
-<a name="l01168"></a>01168 
-<a name="l01169"></a>01169         <span class="keywordflow">if</span> (usHeaderLevelCurrent == 0) {
-<a name="l01170"></a>01170                 <span class="comment">/* No list without an open header */</span>
-<a name="l01171"></a>01171                 vAddStartTag(pDiag, TAG_CHAPTER, NULL);
-<a name="l01172"></a>01172                 <span class="comment">/* Dummy title */</span>
-<a name="l01173"></a>01173                 vAddCombinedTag(pDiag, TAG_TITLE, NULL);
-<a name="l01174"></a>01174         }
-<a name="l01175"></a>01175 
-<a name="l01176"></a>01176         <span class="keywordflow">switch</span> (ucNFC) {
-<a name="l01177"></a>01177         <span class="keywordflow">case</span> LIST_ARABIC_NUM:
-<a name="l01178"></a>01178         <span class="keywordflow">case</span> LIST_ORDINAL_NUM:
-<a name="l01179"></a>01179         <span class="keywordflow">case</span> LIST_NUMBER_TXT:
-<a name="l01180"></a>01180         <span class="keywordflow">case</span> LIST_ORDINAL_TXT:
-<a name="l01181"></a>01181         <span class="keywordflow">case</span> LIST_OUTLINE_NUM:
-<a name="l01182"></a>01182                 ucTag = TAG_ORDEREDLIST;
-<a name="l01183"></a>01183                 szAttr = <span class="stringliteral">&quot;numeration=&#39;arabic&#39;&quot;</span>;
-<a name="l01184"></a>01184                 <span class="keywordflow">break</span>;
-<a name="l01185"></a>01185         <span class="keywordflow">case</span> LIST_UPPER_ROMAN:
-<a name="l01186"></a>01186                 ucTag = TAG_ORDEREDLIST;
-<a name="l01187"></a>01187                 szAttr = <span class="stringliteral">&quot;numeration=&#39;upperroman&#39;&quot;</span>;
-<a name="l01188"></a>01188                 <span class="keywordflow">break</span>;
-<a name="l01189"></a>01189         <span class="keywordflow">case</span> LIST_LOWER_ROMAN:
-<a name="l01190"></a>01190                 ucTag = TAG_ORDEREDLIST;
-<a name="l01191"></a>01191                 szAttr = <span class="stringliteral">&quot;numeration=&#39;lowerroman&#39;&quot;</span>;
-<a name="l01192"></a>01192                 <span class="keywordflow">break</span>;
-<a name="l01193"></a>01193         <span class="keywordflow">case</span> LIST_UPPER_ALPHA:
-<a name="l01194"></a>01194                 ucTag = TAG_ORDEREDLIST;
-<a name="l01195"></a>01195                 szAttr = <span class="stringliteral">&quot;numeration=&#39;upperalpha&#39;&quot;</span>;
-<a name="l01196"></a>01196                 <span class="keywordflow">break</span>;
-<a name="l01197"></a>01197         <span class="keywordflow">case</span> LIST_LOWER_ALPHA:
-<a name="l01198"></a>01198                 ucTag = TAG_ORDEREDLIST;
-<a name="l01199"></a>01199                 szAttr = <span class="stringliteral">&quot;numeration=&#39;loweralpha&#39;&quot;</span>;
-<a name="l01200"></a>01200                 <span class="keywordflow">break</span>;
-<a name="l01201"></a>01201         <span class="keywordflow">case</span> LIST_SPECIAL:
-<a name="l01202"></a>01202         <span class="keywordflow">case</span> LIST_SPECIAL2:
-<a name="l01203"></a>01203         <span class="keywordflow">case</span> LIST_BULLETS:
-<a name="l01204"></a>01204                 ucTag = TAG_ITEMIZEDLIST;
-<a name="l01205"></a>01205                 szAttr = <span class="stringliteral">&quot;mark=&#39;bullet&#39;&quot;</span>;
-<a name="l01206"></a>01206                 <span class="keywordflow">break</span>;
-<a name="l01207"></a>01207         <span class="keywordflow">default</span>:
-<a name="l01208"></a>01208                 ucTag = TAG_ORDEREDLIST;
-<a name="l01209"></a>01209                 szAttr = <span class="stringliteral">&quot;numeration=&#39;arabic&#39;&quot;</span>;
-<a name="l01210"></a>01210                 DBG_HEX(ucNFC);
-<a name="l01211"></a>01211                 DBG_FIXME();
-<a name="l01212"></a>01212                 <span class="keywordflow">break</span>;
-<a name="l01213"></a>01213         }
-<a name="l01214"></a>01214         vAddStartTag(pDiag, ucTag, szAttr);
-<a name="l01215"></a>01215 } <span class="comment">/* end of vStartOfListXML */</span>
-<a name="l01216"></a>01216 
-<a name="l01217"></a>01217 <span class="comment">/*</span>
-<a name="l01218"></a>01218 <span class="comment"> * Create an end of a list</span>
-<a name="l01219"></a>01219 <span class="comment"> */</span>
-<a name="l01220"></a>01220 <span class="keywordtype">void</span>
-<a name="l01221"></a>01221 vEndOfListXML(diagram_type *pDiag)
-<a name="l01222"></a>01222 {
-<a name="l01223"></a>01223         fail(pDiag == NULL);
-<a name="l01224"></a>01224 
-<a name="l01225"></a>01225         <span class="keywordflow">if</span> (bTableOpen) {
-<a name="l01226"></a>01226                 <span class="comment">/* FIXME: a list in a table should be allowed */</span>
-<a name="l01227"></a>01227                 <span class="keywordflow">return</span>;
-<a name="l01228"></a>01228         }
-<a name="l01229"></a>01229 
-<a name="l01230"></a>01230         <span class="keywordflow">if</span> (uiListLevel != 0) {
-<a name="l01231"></a>01231                 vStackTrace();
-<a name="l01232"></a>01232                 vAddEndTagsUntil2(pDiag, TAG_ITEMIZEDLIST, TAG_ORDEREDLIST);
-<a name="l01233"></a>01233                 vStackTrace();
-<a name="l01234"></a>01234         }
-<a name="l01235"></a>01235 } <span class="comment">/* end of vEndOfListXML */</span>
-<a name="l01236"></a>01236 
-<a name="l01237"></a>01237 <span class="comment">/*</span>
-<a name="l01238"></a>01238 <span class="comment"> * Create a start of a list item</span>
-<a name="l01239"></a>01239 <span class="comment"> */</span>
-<a name="l01240"></a>01240 <span class="keywordtype">void</span>
-<a name="l01241"></a>01241 vStartOfListItemXML(diagram_type *pDiag, BOOL bNoMarks)
-<a name="l01242"></a>01242 {
-<a name="l01243"></a>01243         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szAttr;
-<a name="l01244"></a>01244         UCHAR   ucTopTag;
-<a name="l01245"></a>01245 
-<a name="l01246"></a>01246         fail(pDiag == NULL);
-<a name="l01247"></a>01247 
-<a name="l01248"></a>01248         <span class="keywordflow">if</span> (bTableOpen) {
-<a name="l01249"></a>01249                 <span class="comment">/* FIXME: a list in a table should be allowed */</span>
-<a name="l01250"></a>01250                 <span class="keywordflow">return</span>;
-<a name="l01251"></a>01251         }
-<a name="l01252"></a>01252 
-<a name="l01253"></a>01253         ucTopTag = ucReadStack();
-<a name="l01254"></a>01254         <span class="keywordflow">if</span> (ucTopTag != TAG_ITEMIZEDLIST &amp;&amp; ucTopTag != TAG_ORDEREDLIST) {
-<a name="l01255"></a>01255                 <span class="comment">/* Must end a previous list item first */</span>
-<a name="l01256"></a>01256                 vAddEndTagsUntil1(pDiag, TAG_LISTITEM);
-<a name="l01257"></a>01257         }
-<a name="l01258"></a>01258 
-<a name="l01259"></a>01259         DBG_DEC_C(ucReadStack() != TAG_ITEMIZEDLIST &amp;&amp;
-<a name="l01260"></a>01260                 ucReadStack() != TAG_ORDEREDLIST, ucReadStack());
-<a name="l01261"></a>01261 
-<a name="l01262"></a>01262         <span class="comment">/* Start a new list item */</span>
-<a name="l01263"></a>01263         szAttr = bNoMarks ? <span class="stringliteral">&quot;override=&#39;none&#39;&quot;</span> : NULL;
-<a name="l01264"></a>01264         vAddStartTag(pDiag, TAG_LISTITEM, szAttr);
-<a name="l01265"></a>01265         <span class="comment">/* Start a new paragraph (independant of level) */</span>
-<a name="l01266"></a>01266         vAddStartTag(pDiag, TAG_PARA, NULL);
-<a name="l01267"></a>01267 } <span class="comment">/* end of vStartOfListItemXML */</span>
-<a name="l01268"></a>01268 
-<a name="l01269"></a>01269 <span class="comment">/*</span>
-<a name="l01270"></a>01270 <span class="comment"> * Create a start of a table</span>
-<a name="l01271"></a>01271 <span class="comment"> */</span>
-<a name="l01272"></a>01272 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l01273"></a>01273 vStartOfTable(diagram_type *pDiag, UCHAR ucBorderInfo)
-<a name="l01274"></a>01274 {
-<a name="l01275"></a>01275         <span class="keyword">const</span> <span class="keywordtype">char</span>      *szFrame;
-<a name="l01276"></a>01276         BOOL    bNotReady;
-<a name="l01277"></a>01277         UCHAR   ucTopTag;
-<a name="l01278"></a>01278         <span class="keywordtype">char</span>    cColSep, cRowSep;
-<a name="l01279"></a>01279         <span class="keywordtype">char</span>    szAttr[40];
-<a name="l01280"></a>01280 
-<a name="l01281"></a>01281         fail(pDiag == NULL);
-<a name="l01282"></a>01282 
-<a name="l01283"></a>01283         <span class="comment">/* Close elements that cannot contain a table */</span>
-<a name="l01284"></a>01284         bNotReady = TRUE;
-<a name="l01285"></a>01285         <span class="keywordflow">do</span> {
-<a name="l01286"></a>01286                 ucTopTag = ucReadStack();
-<a name="l01287"></a>01287                 <span class="keywordflow">switch</span> (ucTopTag) {
-<a name="l01288"></a>01288                 <span class="keywordflow">case</span> TAG_TITLE:
-<a name="l01289"></a>01289                         fail(!bTitleOpen);
-<a name="l01290"></a>01290                         vAddEndTag(pDiag, TAG_TITLE);
-<a name="l01291"></a>01291                         <span class="keywordflow">break</span>;
-<a name="l01292"></a>01292                 <span class="keywordflow">case</span> TAG_EMPHASIS:
-<a name="l01293"></a>01293                         fail(!bEmphasisOpen);
-<a name="l01294"></a>01294                         vAddEndTag(pDiag, TAG_EMPHASIS);
-<a name="l01295"></a>01295                         <span class="keywordflow">break</span>;
-<a name="l01296"></a>01296                 <span class="keywordflow">case</span> TAG_SUPERSCRIPT:
-<a name="l01297"></a>01297                         fail(!bSuperscriptOpen);
-<a name="l01298"></a>01298                         vAddEndTag(pDiag, TAG_SUPERSCRIPT);
-<a name="l01299"></a>01299                         <span class="keywordflow">break</span>;
-<a name="l01300"></a>01300                 <span class="keywordflow">case</span> TAG_SUBSCRIPT:
-<a name="l01301"></a>01301                         fail(!bSubscriptOpen);
-<a name="l01302"></a>01302                         vAddEndTag(pDiag, TAG_SUBSCRIPT);
-<a name="l01303"></a>01303                         <span class="keywordflow">break</span>;
-<a name="l01304"></a>01304                 <span class="keywordflow">default</span>:
-<a name="l01305"></a>01305                         bNotReady = FALSE;
-<a name="l01306"></a>01306                         <span class="keywordflow">break</span>;
-<a name="l01307"></a>01307                 }
-<a name="l01308"></a>01308         } <span class="keywordflow">while</span> (bNotReady);
-<a name="l01309"></a>01309 
-<a name="l01310"></a>01310         <span class="comment">/* Create table attributes */</span>
-<a name="l01311"></a>01311         <span class="keywordflow">switch</span> (ucBorderInfo) {
-<a name="l01312"></a>01312         <span class="keywordflow">case</span> TABLE_BORDER_TOP:
-<a name="l01313"></a>01313                 szFrame = <span class="stringliteral">&quot;top&quot;</span>;
-<a name="l01314"></a>01314                 <span class="keywordflow">break</span>;
-<a name="l01315"></a>01315         <span class="keywordflow">case</span> TABLE_BORDER_LEFT|TABLE_BORDER_RIGHT:
-<a name="l01316"></a>01316                 szFrame = <span class="stringliteral">&quot;sides&quot;</span>;
-<a name="l01317"></a>01317                 <span class="keywordflow">break</span>;
-<a name="l01318"></a>01318         <span class="keywordflow">case</span> TABLE_BORDER_TOP|TABLE_BORDER_BOTTOM:
-<a name="l01319"></a>01319                 szFrame = <span class="stringliteral">&quot;topbot&quot;</span>;
-<a name="l01320"></a>01320                 <span class="keywordflow">break</span>;
-<a name="l01321"></a>01321         <span class="keywordflow">case</span> TABLE_BORDER_BOTTOM:
-<a name="l01322"></a>01322                 szFrame = <span class="stringliteral">&quot;bottom&quot;</span>;
-<a name="l01323"></a>01323                 <span class="keywordflow">break</span>;
-<a name="l01324"></a>01324         <span class="keywordflow">case</span> TABLE_BORDER_TOP|TABLE_BORDER_LEFT|
-<a name="l01325"></a>01325              TABLE_BORDER_BOTTOM|TABLE_BORDER_RIGHT:
-<a name="l01326"></a>01326                 szFrame = <span class="stringliteral">&quot;all&quot;</span>;
-<a name="l01327"></a>01327                 <span class="keywordflow">break</span>;
-<a name="l01328"></a>01328         <span class="keywordflow">default</span>:
-<a name="l01329"></a>01329                 szFrame = <span class="stringliteral">&quot;none&quot;</span>;
-<a name="l01330"></a>01330                 <span class="keywordflow">break</span>;
-<a name="l01331"></a>01331         }
-<a name="l01332"></a>01332         cColSep = bIsTableBorderLeft(ucBorderInfo) ||
-<a name="l01333"></a>01333                   bIsTableBorderRight(ucBorderInfo) ? <span class="charliteral">&#39;1&#39;</span> : <span class="charliteral">&#39;0&#39;</span>;
-<a name="l01334"></a>01334         cRowSep = bIsTableBorderTop(ucBorderInfo) ||
-<a name="l01335"></a>01335                   bIsTableBorderBottom(ucBorderInfo) ? <span class="charliteral">&#39;1&#39;</span> : <span class="charliteral">&#39;0&#39;</span>;
-<a name="l01336"></a>01336 
-<a name="l01337"></a>01337         sprintf(szAttr, <span class="stringliteral">&quot;frame=&#39;%.6s&#39; colsep=&#39;%c&#39; rowsep=&#39;%c&#39;&quot;</span>,
-<a name="l01338"></a>01338                         szFrame, cColSep, cRowSep);
-<a name="l01339"></a>01339 
-<a name="l01340"></a>01340         <span class="keywordflow">if</span> (usHeaderLevelCurrent == 0) {
-<a name="l01341"></a>01341                 <span class="comment">/* No table without an open header */</span>
-<a name="l01342"></a>01342                 vAddStartTag(pDiag, TAG_CHAPTER, NULL);
-<a name="l01343"></a>01343                 <span class="comment">/* Dummy title */</span>
-<a name="l01344"></a>01344                 vAddCombinedTag(pDiag, TAG_TITLE, NULL);
-<a name="l01345"></a>01345         }
-<a name="l01346"></a>01346         vAddStartTag(pDiag, TAG_INFORMALTABLE, szAttr);
-<a name="l01347"></a>01347 } <span class="comment">/* end of vStartOfTable */</span>
-<a name="l01348"></a>01348 
-<a name="l01349"></a>01349 <span class="comment">/*</span>
-<a name="l01350"></a>01350 <span class="comment"> * Create a start of a table group</span>
-<a name="l01351"></a>01351 <span class="comment"> */</span>
-<a name="l01352"></a>01352 <span class="keyword">static</span> <span class="keywordtype">void</span>
-<a name="l01353"></a>01353 vStartOfTableGroup(diagram_type *pDiag,
-<a name="l01354"></a>01354         <span class="keywordtype">int</span> iNbrOfColumns, <span class="keyword">const</span> <span class="keywordtype">short</span> *asColumnWidth)
-<a name="l01355"></a>01355 {
-<a name="l01356"></a>01356         <span class="keywordtype">double</span>  dWidth;
-<a name="l01357"></a>01357         <span class="keywordtype">int</span>     iIndex;
-<a name="l01358"></a>01358         <span class="keywordtype">char</span>    szCols[6 + 3 * <span class="keyword">sizeof</span>(int) + 1 + 1];
-<a name="l01359"></a>01359         <span class="keywordtype">char</span>    szColWidth[10 + 3 * <span class="keyword">sizeof</span>(short) + 3 + 3 + 1];
-<a name="l01360"></a>01360 
-<a name="l01361"></a>01361         fail(iNbrOfColumns &lt; 1);
-<a name="l01362"></a>01362         fail(asColumnWidth == NULL);
-<a name="l01363"></a>01363 
-<a name="l01364"></a>01364         sprintf(szCols, <span class="stringliteral">&quot;cols=&#39;%d&#39;&quot;</span>, iNbrOfColumns);
-<a name="l01365"></a>01365         vAddStartTag(pDiag, TAG_TGROUP, szCols);
-<a name="l01366"></a>01366 
-<a name="l01367"></a>01367         <span class="keywordflow">for</span> (iIndex= 0; iIndex &lt; iNbrOfColumns; iIndex++) {
-<a name="l01368"></a>01368                 fail(asColumnWidth[iIndex] &lt; 0);
-<a name="l01369"></a>01369                 dWidth = dTwips2Points(asColumnWidth[iIndex]);
-<a name="l01370"></a>01370                 <span class="keywordflow">if</span> (dWidth &lt;= 1.0) {
-<a name="l01371"></a>01371                         strcpy(szColWidth, <span class="stringliteral">&quot;colwidth=&#39;1.00pt&#39;&quot;</span>);
-<a name="l01372"></a>01372                 } <span class="keywordflow">else</span> {
-<a name="l01373"></a>01373                         sprintf(szColWidth, <span class="stringliteral">&quot;colwidth=&#39;%.2fpt&#39;&quot;</span>, dWidth);
-<a name="l01374"></a>01374                 }
-<a name="l01375"></a>01375                 vAddCombinedTag(pDiag, TAG_COLSPEC, szColWidth);
-<a name="l01376"></a>01376         }
-<a name="l01377"></a>01377 } <span class="comment">/* end of vStartOfTableGroup */</span>
-<a name="l01378"></a>01378 
-<a name="l01379"></a>01379 <span class="comment">/*</span>
-<a name="l01380"></a>01380 <span class="comment"> * Create an end of a table</span>
-<a name="l01381"></a>01381 <span class="comment"> */</span>
-<a name="l01382"></a>01382 <span class="keywordtype">void</span>
-<a name="l01383"></a>01383 vEndOfTableXML(diagram_type *pDiag)
-<a name="l01384"></a>01384 {
-<a name="l01385"></a>01385         fail(pDiag == NULL);
-<a name="l01386"></a>01386 
-<a name="l01387"></a>01387         <span class="keywordflow">if</span> (bTableOpen) {
-<a name="l01388"></a>01388                 vAddEndTag(pDiag, TAG_TBODY);
-<a name="l01389"></a>01389                 vAddEndTag(pDiag, TAG_TGROUP);
-<a name="l01390"></a>01390                 vAddEndTag(pDiag, TAG_INFORMALTABLE);
-<a name="l01391"></a>01391         }
-<a name="l01392"></a>01392 } <span class="comment">/* end of vEndOfTableXML */</span>
-<a name="l01393"></a>01393 
-<a name="l01394"></a>01394 <span class="comment">/*</span>
-<a name="l01395"></a>01395 <span class="comment"> * Add a table row</span>
-<a name="l01396"></a>01396 <span class="comment"> */</span>
-<a name="l01397"></a>01397 <span class="keywordtype">void</span>
-<a name="l01398"></a>01398 vAddTableRowXML(diagram_type *pDiag, <span class="keywordtype">char</span> **aszColTxt,
-<a name="l01399"></a>01399         <span class="keywordtype">int</span> iNbrOfColumns, <span class="keyword">const</span> <span class="keywordtype">short</span> *asColumnWidth, UCHAR ucBorderInfo)
-<a name="l01400"></a>01400 {
-<a name="l01401"></a>01401         <span class="keywordtype">size_t</span>  tCount, tStringLength;
-<a name="l01402"></a>01402         <span class="keywordtype">int</span>     iIndex;
-<a name="l01403"></a>01403 
-<a name="l01404"></a>01404         fail(pDiag == NULL);
-<a name="l01405"></a>01405         fail(pDiag-&gt;pOutFile == NULL);
-<a name="l01406"></a>01406         fail(aszColTxt == NULL);
-<a name="l01407"></a>01407         fail(iNbrOfColumns &lt; 1);
-<a name="l01408"></a>01408         fail(asColumnWidth == NULL);
-<a name="l01409"></a>01409 
-<a name="l01410"></a>01410         <span class="keywordflow">if</span> (iNbrOfColumns != iTableColumnsCurrent) {
-<a name="l01411"></a>01411                 <span class="comment">/* A new number of columns */</span>
-<a name="l01412"></a>01412                 <span class="comment">/* End the old table body and table group (if they exist) */</span>
-<a name="l01413"></a>01413                 vAddEndTagOptional(pDiag, TAG_TBODY);
-<a name="l01414"></a>01414                 vAddEndTagOptional(pDiag, TAG_TGROUP);
-<a name="l01415"></a>01415                 <span class="keywordflow">if</span> (!bTableOpen) {
-<a name="l01416"></a>01416                         <span class="comment">/* No table yet. Start a new table */</span>
-<a name="l01417"></a>01417                         vStartOfTable(pDiag, ucBorderInfo);
-<a name="l01418"></a>01418                 }
-<a name="l01419"></a>01419                 <span class="comment">/* Start a new table group and a new table body */</span>
-<a name="l01420"></a>01420                 vStartOfTableGroup(pDiag, iNbrOfColumns, asColumnWidth);
-<a name="l01421"></a>01421                 vAddStartTag(pDiag, TAG_TBODY, NULL);
-<a name="l01422"></a>01422                 iTableColumnsCurrent = iNbrOfColumns;
-<a name="l01423"></a>01423         }
-<a name="l01424"></a>01424 
-<a name="l01425"></a>01425         <span class="comment">/* Add the table row */</span>
-<a name="l01426"></a>01426         vAddStartTag(pDiag, TAG_ROW, NULL);
-<a name="l01427"></a>01427         <span class="keywordflow">for</span> (iIndex = 0; iIndex &lt; iNbrOfColumns; iIndex++) {
-<a name="l01428"></a>01428                 <span class="comment">/* Add a table cell */</span>
-<a name="l01429"></a>01429                 fail(aszColTxt[iIndex] == NULL);
-<a name="l01430"></a>01430                 vAddStartTag(pDiag, TAG_ENTRY, NULL);
-<a name="l01431"></a>01431                 tStringLength = strlen(aszColTxt[iIndex]);
-<a name="l01432"></a>01432                 <span class="keywordflow">for</span> (tCount = 0; tCount &lt; tStringLength; tCount++) {
-<a name="l01433"></a>01433                         vPrintChar(pDiag, aszColTxt[iIndex][tCount]);
-<a name="l01434"></a>01434                 }
-<a name="l01435"></a>01435                 vAddEndTag(pDiag, TAG_ENTRY);
-<a name="l01436"></a>01436         }
-<a name="l01437"></a>01437         vAddEndTag(pDiag, TAG_ROW);
-<a name="l01438"></a>01438 } <span class="comment">/* end of vAddTableRowXML */</span>
-</pre></div></div>
-<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
-<a href="http://www.doxygen.org/index.html">
-<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
-</body>
-</html>
Binary file Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-72f72df3-653c-414c-a357-7613ad8bc169.zip has changed