From 6d6973e035aac5ec1676efccd5b8ada70c40b639 Mon Sep 17 00:00:00 2001 From: danglassey Date: Wed, 14 Aug 2002 09:55:38 +0000 Subject: Initial import for syncing from crosswire CVS --- .../html/_greek2_greek_8cpp-source.html | 915 ------ .../html/_greek2_greek_8h-source.html | 128 - .../html/_greek_chars_8h-source.html | 163 - doc/api-documentation/html/annotated.html | 79 - .../html/cipherfil_8cpp-source.html | 52 - .../html/cipherfil_8h-source.html | 53 - .../html/class_encoding_filter_mgr-members.html | 32 - .../html/class_encoding_filter_mgr.html | 338 -- .../class_encoding_filter_mgr__inherit__graph.png | Bin 769 -> 0 bytes .../html/class_g_b_f_footnotes-members.html | 31 - .../html/class_g_b_f_footnotes.html | 59 - .../html/class_g_b_f_h_t_m_l-members.html | 24 - .../html/class_g_b_f_h_t_m_l.html | 33 - .../html/class_g_b_f_h_t_m_l_h_r_e_f-members.html | 47 - .../html/class_g_b_f_h_t_m_l_h_r_e_f.html | 204 -- .../class_g_b_f_h_t_m_l_h_r_e_f__coll__graph.png | Bin 5974 -> 0 bytes ...class_g_b_f_h_t_m_l_h_r_e_f__inherit__graph.png | Bin 685 -> 0 bytes .../html/class_g_b_f_headings-members.html | 31 - .../html/class_g_b_f_headings.html | 59 - .../html/class_g_b_f_morph-members.html | 31 - doc/api-documentation/html/class_g_b_f_morph.html | 59 - .../html/class_g_b_f_o_s_i_s-members.html | 27 - .../html/class_g_b_f_o_s_i_s.html | 40 - .../html/class_g_b_f_plain-members.html | 24 - doc/api-documentation/html/class_g_b_f_plain.html | 33 - .../html/class_g_b_f_r_t_f-members.html | 24 - doc/api-documentation/html/class_g_b_f_r_t_f.html | 33 - .../html/class_g_b_f_strongs-members.html | 31 - .../html/class_g_b_f_strongs.html | 59 - .../html/class_g_b_f_th_m_l-members.html | 24 - doc/api-documentation/html/class_g_b_f_th_m_l.html | 33 - .../html/class_greek_lex_attribs-members.html | 24 - .../html/class_greek_lex_attribs.html | 33 - .../html/class_latin1_u_t_f16-members.html | 24 - .../html/class_latin1_u_t_f16.html | 33 - .../html/class_latin1_u_t_f8-members.html | 24 - .../html/class_latin1_u_t_f8.html | 33 - .../html/class_list_key-members.html | 58 - doc/api-documentation/html/class_list_key.html | 658 ---- .../html/class_list_key__coll__graph.png | Bin 2670 -> 0 bytes .../html/class_list_key__inherit__graph.png | Bin 741 -> 0 bytes .../html/class_locale_mgr-members.html | 27 - doc/api-documentation/html/class_locale_mgr.html | 347 -- .../html/class_locale_mgr__coll__graph.png | Bin 720 -> 0 bytes .../html/class_markup_filter_mgr-members.html | 41 - .../html/class_markup_filter_mgr.html | 330 -- .../html/class_markup_filter_mgr__coll__graph.png | Bin 773 -> 0 bytes .../class_markup_filter_mgr__inherit__graph.png | Bin 773 -> 0 bytes .../html/class_p_l_a_i_n_footnotes-members.html | 31 - .../html/class_p_l_a_i_n_footnotes.html | 63 - .../html/class_p_l_a_i_n_h_t_m_l-members.html | 24 - .../html/class_p_l_a_i_n_h_t_m_l.html | 33 - .../html/class_r_t_f_h_t_m_l-members.html | 24 - .../html/class_r_t_f_h_t_m_l.html | 33 - .../html/class_r_w_p_h_t_m_l-members.html | 24 - .../html/class_r_w_p_h_t_m_l.html | 33 - .../html/class_r_w_p_r_t_f-members.html | 24 - doc/api-documentation/html/class_r_w_p_r_t_f.html | 33 - .../html/class_s_c_s_u_u_t_f8-members.html | 27 - .../html/class_s_c_s_u_u_t_f8.html | 41 - .../html/class_s_w_basic_filter-members.html | 54 - .../html/class_s_w_basic_filter.html | 331 -- .../html/class_s_w_basic_filter__coll__graph.png | Bin 5381 -> 0 bytes .../class_s_w_basic_filter__inherit__graph.png | Bin 1594 -> 0 bytes .../html/class_s_w_class-members.html | 18 - doc/api-documentation/html/class_s_w_class.html | 36 - .../html/class_s_w_com-members.html | 115 - doc/api-documentation/html/class_s_w_com.html | 186 -- .../html/class_s_w_com__coll__graph.png | Bin 4939 -> 0 bytes .../html/class_s_w_com__inherit__graph.png | Bin 589 -> 0 bytes .../html/class_s_w_config-members.html | 24 - doc/api-documentation/html/class_s_w_config.html | 216 -- .../html/class_s_w_display-members.html | 20 - doc/api-documentation/html/class_s_w_display.html | 97 - .../html/class_s_w_display__coll__graph.png | Bin 1638 -> 0 bytes .../html/class_s_w_display__inherit__graph.png | Bin 676 -> 0 bytes .../html/class_s_w_gen_book-members.html | 116 - doc/api-documentation/html/class_s_w_gen_book.html | 175 - .../html/class_s_w_gen_book__coll__graph.png | Bin 5022 -> 0 bytes .../html/class_s_w_gen_book__inherit__graph.png | Bin 670 -> 0 bytes .../html/class_s_w_input_method-members.html | 22 - .../html/class_s_w_input_method.html | 93 - .../html/class_s_w_key-members.html | 43 - doc/api-documentation/html/class_s_w_key.html | 732 ----- .../html/class_s_w_key__coll__graph.png | Bin 1583 -> 0 bytes .../html/class_s_w_key__inherit__graph.png | Bin 2085 -> 0 bytes .../html/class_s_w_l_d-members.html | 116 - doc/api-documentation/html/class_s_w_l_d.html | 247 -- .../html/class_s_w_l_d__coll__graph.png | Bin 4897 -> 0 bytes .../html/class_s_w_l_d__inherit__graph.png | Bin 555 -> 0 bytes .../html/class_s_w_locale-members.html | 30 - doc/api-documentation/html/class_s_w_locale.html | 146 - .../html/class_s_w_locale__coll__graph.png | Bin 881 -> 0 bytes .../html/class_s_w_mgr-members.html | 59 - doc/api-documentation/html/class_s_w_mgr.html | 1296 -------- .../html/class_s_w_mgr__coll__graph.png | Bin 1246 -> 0 bytes .../html/class_s_w_module-members.html | 113 - doc/api-documentation/html/class_s_w_module.html | 3339 -------------------- .../html/class_s_w_module__coll__graph.png | Bin 4494 -> 0 bytes .../html/class_s_w_module__inherit__graph.png | Bin 1591 -> 0 bytes .../html/class_s_w_object-members.html | 17 - doc/api-documentation/html/class_s_w_object.html | 90 - .../html/class_s_w_object__coll__graph.png | Bin 761 -> 0 bytes .../html/class_s_w_object__inherit__graph.png | Bin 2361 -> 0 bytes .../html/class_s_w_text-members.html | 115 - doc/api-documentation/html/class_s_w_text.html | 141 - .../html/class_s_w_text__coll__graph.png | Bin 4934 -> 0 bytes .../html/class_s_w_text__inherit__graph.png | Bin 580 -> 0 bytes .../html/class_str_key-members.html | 44 - doc/api-documentation/html/class_str_key.html | 99 - .../html/class_str_key__coll__graph.png | Bin 2376 -> 0 bytes .../html/class_str_key__inherit__graph.png | Bin 752 -> 0 bytes .../html/class_th_m_l_footnotes-members.html | 31 - .../html/class_th_m_l_footnotes.html | 59 - .../html/class_th_m_l_g_b_f-members.html | 24 - doc/api-documentation/html/class_th_m_l_g_b_f.html | 33 - .../html/class_th_m_l_h_t_m_l-members.html | 47 - .../html/class_th_m_l_h_t_m_l.html | 189 -- .../html/class_th_m_l_h_t_m_l__coll__graph.png | Bin 5910 -> 0 bytes .../html/class_th_m_l_h_t_m_l__inherit__graph.png | Bin 620 -> 0 bytes .../html/class_th_m_l_h_t_m_l_h_r_e_f-members.html | 47 - .../html/class_th_m_l_h_t_m_l_h_r_e_f.html | 247 -- .../class_th_m_l_h_t_m_l_h_r_e_f__coll__graph.png | Bin 5963 -> 0 bytes ...lass_th_m_l_h_t_m_l_h_r_e_f__inherit__graph.png | Bin 683 -> 0 bytes .../html/class_th_m_l_headings-members.html | 31 - .../html/class_th_m_l_headings.html | 59 - .../html/class_th_m_l_lemma-members.html | 31 - doc/api-documentation/html/class_th_m_l_lemma.html | 59 - .../html/class_th_m_l_morph-members.html | 31 - doc/api-documentation/html/class_th_m_l_morph.html | 59 - .../html/class_th_m_l_o_l_b-members.html | 24 - doc/api-documentation/html/class_th_m_l_o_l_b.html | 33 - .../html/class_th_m_l_o_s_i_s-members.html | 27 - .../html/class_th_m_l_o_s_i_s.html | 40 - .../html/class_th_m_l_plain-members.html | 24 - doc/api-documentation/html/class_th_m_l_plain.html | 33 - .../html/class_th_m_l_r_t_f-members.html | 47 - doc/api-documentation/html/class_th_m_l_r_t_f.html | 186 -- .../html/class_th_m_l_r_t_f__coll__graph.png | Bin 5903 -> 0 bytes .../html/class_th_m_l_r_t_f__inherit__graph.png | Bin 609 -> 0 bytes .../html/class_th_m_l_scripref-members.html | 31 - .../html/class_th_m_l_scripref.html | 59 - .../html/class_th_m_l_strongs-members.html | 31 - .../html/class_th_m_l_strongs.html | 59 - .../html/class_th_m_l_variants-members.html | 32 - .../html/class_th_m_l_variants.html | 61 - .../html/class_tree_key-members.html | 61 - doc/api-documentation/html/class_tree_key.html | 326 -- .../html/class_tree_key__coll__graph.png | Bin 2363 -> 0 bytes .../html/class_tree_key__inherit__graph.png | Bin 969 -> 0 bytes .../html/class_tree_key_idx-members.html | 77 - doc/api-documentation/html/class_tree_key_idx.html | 419 --- .../html/class_tree_key_idx__coll__graph.png | Bin 3380 -> 0 bytes .../html/class_tree_key_idx__inherit__graph.png | Bin 980 -> 0 bytes .../html/class_u_t_f16_u_t_f8-members.html | 24 - .../html/class_u_t_f16_u_t_f8.html | 33 - .../html/class_u_t_f8_cantillation-members.html | 31 - .../html/class_u_t_f8_cantillation.html | 59 - .../html/class_u_t_f8_greek_accents-members.html | 31 - .../html/class_u_t_f8_greek_accents.html | 59 - .../html/class_u_t_f8_h_t_m_l-members.html | 24 - .../html/class_u_t_f8_h_t_m_l.html | 33 - .../html/class_u_t_f8_hebrew_points-members.html | 31 - .../html/class_u_t_f8_hebrew_points.html | 59 - .../html/class_u_t_f8_latin1-members.html | 25 - .../html/class_u_t_f8_latin1.html | 36 - .../html/class_u_t_f8_u_t_f16-members.html | 24 - .../html/class_u_t_f8_u_t_f16.html | 33 - .../html/class_unicode_r_t_f-members.html | 24 - .../html/class_unicode_r_t_f.html | 33 - .../html/class_verse_key-members.html | 109 - doc/api-documentation/html/class_verse_key.html | 1909 ----------- .../html/class_verse_key__coll__graph.png | Bin 4252 -> 0 bytes .../html/class_verse_key__inherit__graph.png | Bin 773 -> 0 bytes doc/api-documentation/html/classes.html | 31 - .../html/comments_2rawcom_2rtfidx_8cpp-source.html | 306 -- .../html/comments_2zcom_2rawtxt2z_8cpp-source.html | 97 - .../html/compress_8cpp-source.html | 781 ----- doc/api-documentation/html/deflate_8h-source.html | 332 -- doc/api-documentation/html/defs_8h-source.html | 88 - doc/api-documentation/html/dirent_8cpp-source.html | 145 - doc/api-documentation/html/dirent_8h-source.html | 46 - doc/api-documentation/html/doxygen.css | 49 - doc/api-documentation/html/doxygen.png | Bin 2352 -> 0 bytes .../html/echomod_8cpp-source.html | 35 - doc/api-documentation/html/echomod_8h-source.html | 52 - .../html/encfiltmgr_8cpp-source.html | 162 - .../html/encfiltmgr_8h-source.html | 69 - .../html/entriesblk_8cpp-source.html | 180 -- .../html/entriesblk_8h-source.html | 44 - doc/api-documentation/html/femain_8cpp-source.html | 26 - doc/api-documentation/html/femain_8h-source.html | 46 - .../html/filemgr_8cpp-source.html | 278 -- doc/api-documentation/html/filemgr_8h-source.html | 96 - doc/api-documentation/html/files.html | 268 -- doc/api-documentation/html/flatapi_8h-source.html | 92 - doc/api-documentation/html/functions.html | 241 -- doc/api-documentation/html/gbf_8cpp-source.html | 749 ----- doc/api-documentation/html/gbf_8h-source.html | 81 - .../html/gbffootnotes_8cpp-source.html | 132 - .../html/gbffootnotes_8h-source.html | 70 - .../html/gbfheadings_8cpp-source.html | 121 - .../html/gbfheadings_8h-source.html | 70 - .../html/gbfhtml_8cpp-source.html | 550 ---- doc/api-documentation/html/gbfhtml_8h-source.html | 50 - .../html/gbfhtmlhref_8cpp-source.html | 162 - .../html/gbfhtmlhref_8h-source.html | 45 - .../html/gbfmorph_8cpp-source.html | 112 - doc/api-documentation/html/gbfmorph_8h-source.html | 69 - .../html/gbfosis_8cpp-source.html | 325 -- doc/api-documentation/html/gbfosis_8h-source.html | 47 - .../html/gbfplain_8cpp-source.html | 120 - doc/api-documentation/html/gbfplain_8h-source.html | 49 - doc/api-documentation/html/gbfrtf_8cpp-source.html | 304 -- doc/api-documentation/html/gbfrtf_8h-source.html | 49 - .../html/gbfstrongs_8cpp-source.html | 144 - .../html/gbfstrongs_8h-source.html | 70 - .../html/gbfthml_8cpp-source.html | 477 --- doc/api-documentation/html/gbfthml_8h-source.html | 46 - doc/api-documentation/html/graph_legend.dot | 20 - doc/api-documentation/html/graph_legend.html | 60 - doc/api-documentation/html/graph_legend.png | Bin 3678 -> 0 bytes .../html/greeklexattribs_8cpp-source.html | 109 - .../html/greeklexattribs_8h-source.html | 48 - .../html/hebrewmcim_8cpp-source.html | 658 ---- .../html/hebrewmcim_8h-source.html | 34 - doc/api-documentation/html/hierarchy.html | 93 - .../html/hrefcom_8cpp-source.html | 111 - doc/api-documentation/html/hrefcom_8h-source.html | 60 - doc/api-documentation/html/index.html | 26 - doc/api-documentation/html/infblock_8h-source.html | 53 - doc/api-documentation/html/infcodes_8h-source.html | 41 - doc/api-documentation/html/inffast_8h-source.html | 31 - doc/api-documentation/html/inffixed_8h-source.html | 165 - doc/api-documentation/html/inftrees_8h-source.html | 72 - doc/api-documentation/html/infutil_8h-source.html | 112 - doc/api-documentation/html/inherit__graph__0.png | Bin 723 -> 0 bytes doc/api-documentation/html/inherit__graph__1.png | Bin 374 -> 0 bytes doc/api-documentation/html/inherit__graph__10.png | Bin 444 -> 0 bytes doc/api-documentation/html/inherit__graph__11.png | Bin 327 -> 0 bytes doc/api-documentation/html/inherit__graph__12.png | Bin 307 -> 0 bytes doc/api-documentation/html/inherit__graph__13.png | Bin 354 -> 0 bytes doc/api-documentation/html/inherit__graph__14.png | Bin 399 -> 0 bytes doc/api-documentation/html/inherit__graph__15.png | Bin 328 -> 0 bytes doc/api-documentation/html/inherit__graph__16.png | Bin 282 -> 0 bytes doc/api-documentation/html/inherit__graph__17.png | Bin 333 -> 0 bytes doc/api-documentation/html/inherit__graph__18.png | Bin 314 -> 0 bytes doc/api-documentation/html/inherit__graph__19.png | Bin 349 -> 0 bytes doc/api-documentation/html/inherit__graph__2.png | Bin 401 -> 0 bytes doc/api-documentation/html/inherit__graph__20.png | Bin 1561 -> 0 bytes doc/api-documentation/html/inherit__graph__21.png | Bin 344 -> 0 bytes doc/api-documentation/html/inherit__graph__22.png | Bin 367 -> 0 bytes doc/api-documentation/html/inherit__graph__23.png | Bin 445 -> 0 bytes doc/api-documentation/html/inherit__graph__24.png | Bin 365 -> 0 bytes doc/api-documentation/html/inherit__graph__25.png | Bin 338 -> 0 bytes doc/api-documentation/html/inherit__graph__26.png | Bin 1500 -> 0 bytes doc/api-documentation/html/inherit__graph__27.png | Bin 2198 -> 0 bytes doc/api-documentation/html/inherit__graph__28.png | Bin 373 -> 0 bytes doc/api-documentation/html/inherit__graph__29.png | Bin 317 -> 0 bytes doc/api-documentation/html/inherit__graph__3.png | Bin 304 -> 0 bytes doc/api-documentation/html/inherit__graph__30.png | Bin 395 -> 0 bytes doc/api-documentation/html/inherit__graph__31.png | Bin 334 -> 0 bytes doc/api-documentation/html/inherit__graph__32.png | Bin 328 -> 0 bytes doc/api-documentation/html/inherit__graph__33.png | Bin 315 -> 0 bytes doc/api-documentation/html/inherit__graph__34.png | Bin 333 -> 0 bytes doc/api-documentation/html/inherit__graph__35.png | Bin 306 -> 0 bytes doc/api-documentation/html/inherit__graph__36.png | Bin 385 -> 0 bytes doc/api-documentation/html/inherit__graph__37.png | Bin 388 -> 0 bytes doc/api-documentation/html/inherit__graph__38.png | Bin 386 -> 0 bytes doc/api-documentation/html/inherit__graph__39.png | Bin 331 -> 0 bytes doc/api-documentation/html/inherit__graph__4.png | Bin 349 -> 0 bytes doc/api-documentation/html/inherit__graph__40.png | Bin 293 -> 0 bytes doc/api-documentation/html/inherit__graph__41.png | Bin 391 -> 0 bytes doc/api-documentation/html/inherit__graph__42.png | Bin 458 -> 0 bytes doc/api-documentation/html/inherit__graph__43.png | Bin 425 -> 0 bytes doc/api-documentation/html/inherit__graph__44.png | Bin 301 -> 0 bytes doc/api-documentation/html/inherit__graph__45.png | Bin 305 -> 0 bytes doc/api-documentation/html/inherit__graph__46.png | Bin 319 -> 0 bytes doc/api-documentation/html/inherit__graph__5.png | Bin 325 -> 0 bytes doc/api-documentation/html/inherit__graph__6.png | Bin 312 -> 0 bytes doc/api-documentation/html/inherit__graph__7.png | Bin 281 -> 0 bytes doc/api-documentation/html/inherit__graph__8.png | Bin 393 -> 0 bytes doc/api-documentation/html/inherit__graph__9.png | Bin 308 -> 0 bytes doc/api-documentation/html/inherits.html | 222 -- doc/api-documentation/html/jfbgen_8cpp-source.html | 256 -- doc/api-documentation/html/kjvidx_8cpp-source.html | 183 -- .../html/latin1utf16_8cpp-source.html | 134 - .../html/latin1utf16_8h-source.html | 47 - .../html/latin1utf8_8cpp-source.html | 193 -- .../html/latin1utf8_8h-source.html | 47 - .../html/listkey_8cpp-source.html | 270 -- doc/api-documentation/html/listkey_8h-source.html | 86 - .../html/localemgr_8cpp-source.html | 198 -- .../html/localemgr_8h-source.html | 82 - .../html/lzsscomprs_8cpp-source.html | 679 ---- .../html/lzsscomprs_8h-source.html | 93 - .../html/markupfiltmgr_8cpp-source.html | 250 -- .../html/markupfiltmgr_8h-source.html | 64 - doc/api-documentation/html/mhcidx_8cpp-source.html | 306 -- .../html/multimapwdef_8h-source.html | 45 - doc/api-documentation/html/namespaces.html | 17 - doc/api-documentation/html/namespacestd.html | 28 - doc/api-documentation/html/nasb_8cpp-source.html | 121 - doc/api-documentation/html/nuidx_8cpp-source.html | 252 -- doc/api-documentation/html/nullim_8cpp-source.html | 25 - doc/api-documentation/html/nullim_8h-source.html | 28 - .../html/plainfootnotes_8cpp-source.html | 116 - .../html/plainfootnotes_8h-source.html | 73 - .../html/plainhtml_8cpp-source.html | 148 - .../html/plainhtml_8h-source.html | 50 - doc/api-documentation/html/rawcom_8cpp-source.html | 289 -- doc/api-documentation/html/rawcom_8h-source.html | 69 - .../html/rawfiles_8cpp-source.html | 305 -- doc/api-documentation/html/rawfiles_8h-source.html | 74 - .../html/rawfilesgen_8cpp-source.html | 250 -- .../html/rawgbf_2gbfidx_8cpp-source.html | 308 -- doc/api-documentation/html/rawgbf_8cpp-source.html | 98 - doc/api-documentation/html/rawgbf_8h-source.html | 59 - .../html/rawgenbook_8cpp-source.html | 256 -- .../html/rawgenbook_8h-source.html | 73 - doc/api-documentation/html/rawld4_8cpp-source.html | 218 -- doc/api-documentation/html/rawld4_8h-source.html | 78 - doc/api-documentation/html/rawld_8cpp-source.html | 218 -- doc/api-documentation/html/rawld_8h-source.html | 80 - .../html/rawstr4_8cpp-source.html | 576 ---- doc/api-documentation/html/rawstr4_8h-source.html | 70 - doc/api-documentation/html/rawstr_8cpp-source.html | 579 ---- doc/api-documentation/html/rawstr_8h-source.html | 68 - .../html/rawtext_8cpp-source.html | 644 ---- doc/api-documentation/html/rawtext_8h-source.html | 78 - .../html/rawverse_8cpp-source.html | 361 --- doc/api-documentation/html/rawverse_8h-source.html | 52 - doc/api-documentation/html/regex_8h-source.html | 559 ---- doc/api-documentation/html/roman_8h-source.html | 39 - .../html/rtfhtml_8cpp-source.html | 113 - doc/api-documentation/html/rtfhtml_8h-source.html | 49 - .../html/rwphtml_8cpp-source.html | 201 -- doc/api-documentation/html/rwphtml_8h-source.html | 50 - doc/api-documentation/html/rwpidx_8cpp-source.html | 280 -- doc/api-documentation/html/rwprtf_8cpp-source.html | 121 - doc/api-documentation/html/rwprtf_8h-source.html | 52 - .../html/sapphire_8cpp-source.html | 242 -- doc/api-documentation/html/sapphire_8h-source.html | 67 - .../html/scsuutf8_8cpp-source.html | 234 -- doc/api-documentation/html/scsuutf8_8h-source.html | 53 - doc/api-documentation/html/strkey_8cpp-source.html | 55 - doc/api-documentation/html/strkey_8h-source.html | 58 - .../html/swbasicfilter_8cpp-source.html | 314 -- .../html/swbasicfilter_8h-source.html | 99 - .../html/swcacher_8cpp-source.html | 57 - doc/api-documentation/html/swcacher_8h-source.html | 51 - .../html/swcipher_8cpp-source.html | 137 - doc/api-documentation/html/swcipher_8h-source.html | 63 - doc/api-documentation/html/swcom_8cpp-source.html | 44 - doc/api-documentation/html/swcom_8h-source.html | 57 - .../html/swcomprs_8cpp-source.html | 204 -- doc/api-documentation/html/swcomprs_8h-source.html | 59 - .../html/swconfig_8cpp-source.html | 179 -- doc/api-documentation/html/swconfig_8h-source.html | 75 - doc/api-documentation/html/swdisp_8cpp-source.html | 41 - doc/api-documentation/html/swdisp_8h-source.html | 51 - .../html/swdisprtf_8h-source.html | 116 - .../html/swdisprtfchap_8h-source.html | 80 - doc/api-documentation/html/swfilter_8h-source.html | 84 - .../html/swfiltermgr_8cpp-source.html | 80 - .../html/swfiltermgr_8h-source.html | 76 - .../html/swgenbook_8cpp-source.html | 41 - .../html/swgenbook_8h-source.html | 56 - .../html/swinputmeth_8cpp-source.html | 32 - .../html/swinputmeth_8h-source.html | 36 - doc/api-documentation/html/swkey_8cpp-source.html | 210 -- doc/api-documentation/html/swkey_8h-source.html | 142 - doc/api-documentation/html/swld_8cpp-source.html | 69 - doc/api-documentation/html/swld_8h-source.html | 60 - .../html/swlocale_8cpp-source.html | 155 - doc/api-documentation/html/swlocale_8h-source.html | 74 - doc/api-documentation/html/swlog_8cpp-source.html | 109 - doc/api-documentation/html/swlog_8h-source.html | 60 - doc/api-documentation/html/swmacs_8h-source.html | 44 - doc/api-documentation/html/swmgr_8cpp-source.html | 1069 ------- doc/api-documentation/html/swmgr_8h-source.html | 117 - .../html/swmodule_8cpp-source.html | 689 ---- doc/api-documentation/html/swmodule_8h-source.html | 283 -- doc/api-documentation/html/swobject_8h-source.html | 57 - doc/api-documentation/html/swtext_8cpp-source.html | 53 - doc/api-documentation/html/swtext_8h-source.html | 55 - .../html/swunicod_8cpp-source.html | 149 - doc/api-documentation/html/swunicod_8h-source.html | 42 - .../html/swversion_8cpp-source.html | 92 - .../html/swversion_8h-source.html | 59 - doc/api-documentation/html/swwinlog_8h-source.html | 56 - doc/api-documentation/html/sysdata_8h-source.html | 90 - doc/api-documentation/html/tbdisp_8h-source.html | 53 - .../html/texts_2rawtext_2rtfidx_8cpp-source.html | 178 -- .../html/texts_2ztext_2rawtxt2z_8cpp-source.html | 471 --- .../html/thmlfootnotes_8cpp-source.html | 117 - .../html/thmlfootnotes_8h-source.html | 70 - .../html/thmlgbf_8cpp-source.html | 344 -- doc/api-documentation/html/thmlgbf_8h-source.html | 49 - .../html/thmlheadings_8cpp-source.html | 121 - .../html/thmlheadings_8h-source.html | 70 - .../html/thmlhtml_8cpp-source.html | 225 -- doc/api-documentation/html/thmlhtml_8h-source.html | 47 - .../html/thmlhtmlhref_8cpp-source.html | 283 -- .../html/thmlhtmlhref_8h-source.html | 45 - .../html/thmllemma_8cpp-source.html | 111 - .../html/thmllemma_8h-source.html | 70 - .../html/thmlmorph_8cpp-source.html | 112 - .../html/thmlmorph_8h-source.html | 69 - .../html/thmlolb_8cpp-source.html | 257 -- doc/api-documentation/html/thmlolb_8h-source.html | 49 - .../html/thmlosis_8cpp-source.html | 344 -- doc/api-documentation/html/thmlosis_8h-source.html | 47 - .../html/thmlplain_8cpp-source.html | 215 -- .../html/thmlplain_8h-source.html | 49 - .../html/thmlrtf_8cpp-source.html | 236 -- doc/api-documentation/html/thmlrtf_8h-source.html | 50 - .../html/thmlscripref_8cpp-source.html | 117 - .../html/thmlscripref_8h-source.html | 70 - .../html/thmlstrongs_8cpp-source.html | 170 - .../html/thmlstrongs_8h-source.html | 70 - .../html/thmlvariants_8cpp-source.html | 199 -- .../html/thmlvariants_8h-source.html | 73 - .../html/treekey_8cpp-source.html | 44 - doc/api-documentation/html/treekey_8h-source.html | 99 - .../html/treekeyidx_8cpp-source.html | 604 ---- .../html/treekeyidx_8h-source.html | 126 - doc/api-documentation/html/trees_8h-source.html | 142 - .../html/unicodertf_8cpp-source.html | 89 - .../html/unicodertf_8h-source.html | 48 - .../html/unixstr_8cpp-source.html | 21 - doc/api-documentation/html/unixstr_8h-source.html | 42 - doc/api-documentation/html/untgz_8h-source.html | 23 - .../html/utf16utf8_8cpp-source.html | 109 - .../html/utf16utf8_8h-source.html | 47 - .../html/utf8arshaping_8cpp-source.html | 62 - .../html/utf8arshaping_8h-source.html | 60 - .../html/utf8bidireorder_8cpp-source.html | 69 - .../html/utf8bidireorder_8h-source.html | 60 - .../html/utf8cantillation_8cpp-source.html | 78 - .../html/utf8cantillation_8h-source.html | 69 - .../html/utf8greekaccents_8cpp-source.html | 266 -- .../html/utf8greekaccents_8h-source.html | 69 - .../html/utf8hebrewpoints_8cpp-source.html | 69 - .../html/utf8hebrewpoints_8h-source.html | 69 - .../html/utf8html_8cpp-source.html | 80 - doc/api-documentation/html/utf8html_8h-source.html | 47 - .../html/utf8latin1_8cpp-source.html | 88 - .../html/utf8latin1_8h-source.html | 48 - .../html/utf8nfc_8cpp-source.html | 60 - doc/api-documentation/html/utf8nfc_8h-source.html | 60 - .../html/utf8nfkd_8cpp-source.html | 60 - doc/api-documentation/html/utf8nfkd_8h-source.html | 60 - .../html/utf8transliterator_8cpp-source.html | 493 --- .../html/utf8transliterator_8h-source.html | 85 - .../html/utf8utf16_8cpp-source.html | 93 - .../html/utf8utf16_8h-source.html | 47 - .../html/utilconf_8cpp-source.html | 33 - doc/api-documentation/html/utilconf_8h-source.html | 22 - doc/api-documentation/html/utilfuns_8h-source.html | 43 - .../html/utilstr_8cpp-source.html | 166 - doc/api-documentation/html/utilstr_8h-source.html | 95 - .../html/versekey_8cpp-source.html | 1464 --------- doc/api-documentation/html/versekey_8h-source.html | 220 -- doc/api-documentation/html/vntidx_8cpp-source.html | 199 -- doc/api-documentation/html/zcom_8cpp-source.html | 304 -- doc/api-documentation/html/zcom_8h-source.html | 83 - doc/api-documentation/html/zconf_8h-source.html | 293 -- .../html/zipcomprs_8cpp-source.html | 172 - .../html/zipcomprs_8h-source.html | 53 - doc/api-documentation/html/zld_8cpp-source.html | 219 -- doc/api-documentation/html/zld_8h-source.html | 81 - doc/api-documentation/html/zlib_8h-source.html | 907 ------ doc/api-documentation/html/zstr_8cpp-source.html | 719 ----- doc/api-documentation/html/zstr_8h-source.html | 86 - .../html/ztext_2gbfidx_8cpp-source.html | 675 ---- doc/api-documentation/html/ztext_8cpp-source.html | 361 --- doc/api-documentation/html/ztext_8h-source.html | 84 - doc/api-documentation/html/zutil_8h-source.html | 234 -- doc/api-documentation/html/zverse_8cpp-source.html | 529 ---- doc/api-documentation/html/zverse_8h-source.html | 70 - 481 files changed, 58645 deletions(-) delete mode 100644 doc/api-documentation/html/_greek2_greek_8cpp-source.html delete mode 100644 doc/api-documentation/html/_greek2_greek_8h-source.html delete mode 100644 doc/api-documentation/html/_greek_chars_8h-source.html delete mode 100644 doc/api-documentation/html/annotated.html delete mode 100644 doc/api-documentation/html/cipherfil_8cpp-source.html delete mode 100644 doc/api-documentation/html/cipherfil_8h-source.html delete mode 100644 doc/api-documentation/html/class_encoding_filter_mgr-members.html delete mode 100644 doc/api-documentation/html/class_encoding_filter_mgr.html delete mode 100644 doc/api-documentation/html/class_encoding_filter_mgr__inherit__graph.png delete mode 100644 doc/api-documentation/html/class_g_b_f_footnotes-members.html delete mode 100644 doc/api-documentation/html/class_g_b_f_footnotes.html delete mode 100644 doc/api-documentation/html/class_g_b_f_h_t_m_l-members.html delete mode 100644 doc/api-documentation/html/class_g_b_f_h_t_m_l.html delete mode 100644 doc/api-documentation/html/class_g_b_f_h_t_m_l_h_r_e_f-members.html delete mode 100644 doc/api-documentation/html/class_g_b_f_h_t_m_l_h_r_e_f.html delete mode 100644 doc/api-documentation/html/class_g_b_f_h_t_m_l_h_r_e_f__coll__graph.png delete mode 100644 doc/api-documentation/html/class_g_b_f_h_t_m_l_h_r_e_f__inherit__graph.png delete mode 100644 doc/api-documentation/html/class_g_b_f_headings-members.html delete mode 100644 doc/api-documentation/html/class_g_b_f_headings.html delete mode 100644 doc/api-documentation/html/class_g_b_f_morph-members.html delete mode 100644 doc/api-documentation/html/class_g_b_f_morph.html delete mode 100644 doc/api-documentation/html/class_g_b_f_o_s_i_s-members.html delete mode 100644 doc/api-documentation/html/class_g_b_f_o_s_i_s.html delete mode 100644 doc/api-documentation/html/class_g_b_f_plain-members.html delete mode 100644 doc/api-documentation/html/class_g_b_f_plain.html delete mode 100644 doc/api-documentation/html/class_g_b_f_r_t_f-members.html delete mode 100644 doc/api-documentation/html/class_g_b_f_r_t_f.html delete mode 100644 doc/api-documentation/html/class_g_b_f_strongs-members.html delete mode 100644 doc/api-documentation/html/class_g_b_f_strongs.html delete mode 100644 doc/api-documentation/html/class_g_b_f_th_m_l-members.html delete mode 100644 doc/api-documentation/html/class_g_b_f_th_m_l.html delete mode 100644 doc/api-documentation/html/class_greek_lex_attribs-members.html delete mode 100644 doc/api-documentation/html/class_greek_lex_attribs.html delete mode 100644 doc/api-documentation/html/class_latin1_u_t_f16-members.html delete mode 100644 doc/api-documentation/html/class_latin1_u_t_f16.html delete mode 100644 doc/api-documentation/html/class_latin1_u_t_f8-members.html delete mode 100644 doc/api-documentation/html/class_latin1_u_t_f8.html delete mode 100644 doc/api-documentation/html/class_list_key-members.html delete mode 100644 doc/api-documentation/html/class_list_key.html delete mode 100644 doc/api-documentation/html/class_list_key__coll__graph.png delete mode 100644 doc/api-documentation/html/class_list_key__inherit__graph.png delete mode 100644 doc/api-documentation/html/class_locale_mgr-members.html delete mode 100644 doc/api-documentation/html/class_locale_mgr.html delete mode 100644 doc/api-documentation/html/class_locale_mgr__coll__graph.png delete mode 100644 doc/api-documentation/html/class_markup_filter_mgr-members.html delete mode 100644 doc/api-documentation/html/class_markup_filter_mgr.html delete mode 100644 doc/api-documentation/html/class_markup_filter_mgr__coll__graph.png delete mode 100644 doc/api-documentation/html/class_markup_filter_mgr__inherit__graph.png delete mode 100644 doc/api-documentation/html/class_p_l_a_i_n_footnotes-members.html delete mode 100644 doc/api-documentation/html/class_p_l_a_i_n_footnotes.html delete mode 100644 doc/api-documentation/html/class_p_l_a_i_n_h_t_m_l-members.html delete mode 100644 doc/api-documentation/html/class_p_l_a_i_n_h_t_m_l.html delete mode 100644 doc/api-documentation/html/class_r_t_f_h_t_m_l-members.html delete mode 100644 doc/api-documentation/html/class_r_t_f_h_t_m_l.html delete mode 100644 doc/api-documentation/html/class_r_w_p_h_t_m_l-members.html delete mode 100644 doc/api-documentation/html/class_r_w_p_h_t_m_l.html delete mode 100644 doc/api-documentation/html/class_r_w_p_r_t_f-members.html delete mode 100644 doc/api-documentation/html/class_r_w_p_r_t_f.html delete mode 100644 doc/api-documentation/html/class_s_c_s_u_u_t_f8-members.html delete mode 100644 doc/api-documentation/html/class_s_c_s_u_u_t_f8.html delete mode 100644 doc/api-documentation/html/class_s_w_basic_filter-members.html delete mode 100644 doc/api-documentation/html/class_s_w_basic_filter.html delete mode 100644 doc/api-documentation/html/class_s_w_basic_filter__coll__graph.png delete mode 100644 doc/api-documentation/html/class_s_w_basic_filter__inherit__graph.png delete mode 100644 doc/api-documentation/html/class_s_w_class-members.html delete mode 100644 doc/api-documentation/html/class_s_w_class.html delete mode 100644 doc/api-documentation/html/class_s_w_com-members.html delete mode 100644 doc/api-documentation/html/class_s_w_com.html delete mode 100644 doc/api-documentation/html/class_s_w_com__coll__graph.png delete mode 100644 doc/api-documentation/html/class_s_w_com__inherit__graph.png delete mode 100644 doc/api-documentation/html/class_s_w_config-members.html delete mode 100644 doc/api-documentation/html/class_s_w_config.html delete mode 100644 doc/api-documentation/html/class_s_w_display-members.html delete mode 100644 doc/api-documentation/html/class_s_w_display.html delete mode 100644 doc/api-documentation/html/class_s_w_display__coll__graph.png delete mode 100644 doc/api-documentation/html/class_s_w_display__inherit__graph.png delete mode 100644 doc/api-documentation/html/class_s_w_gen_book-members.html delete mode 100644 doc/api-documentation/html/class_s_w_gen_book.html delete mode 100644 doc/api-documentation/html/class_s_w_gen_book__coll__graph.png delete mode 100644 doc/api-documentation/html/class_s_w_gen_book__inherit__graph.png delete mode 100644 doc/api-documentation/html/class_s_w_input_method-members.html delete mode 100644 doc/api-documentation/html/class_s_w_input_method.html delete mode 100644 doc/api-documentation/html/class_s_w_key-members.html delete mode 100644 doc/api-documentation/html/class_s_w_key.html delete mode 100644 doc/api-documentation/html/class_s_w_key__coll__graph.png delete mode 100644 doc/api-documentation/html/class_s_w_key__inherit__graph.png delete mode 100644 doc/api-documentation/html/class_s_w_l_d-members.html delete mode 100644 doc/api-documentation/html/class_s_w_l_d.html delete mode 100644 doc/api-documentation/html/class_s_w_l_d__coll__graph.png delete mode 100644 doc/api-documentation/html/class_s_w_l_d__inherit__graph.png delete mode 100644 doc/api-documentation/html/class_s_w_locale-members.html delete mode 100644 doc/api-documentation/html/class_s_w_locale.html delete mode 100644 doc/api-documentation/html/class_s_w_locale__coll__graph.png delete mode 100644 doc/api-documentation/html/class_s_w_mgr-members.html delete mode 100644 doc/api-documentation/html/class_s_w_mgr.html delete mode 100644 doc/api-documentation/html/class_s_w_mgr__coll__graph.png delete mode 100644 doc/api-documentation/html/class_s_w_module-members.html delete mode 100644 doc/api-documentation/html/class_s_w_module.html delete mode 100644 doc/api-documentation/html/class_s_w_module__coll__graph.png delete mode 100644 doc/api-documentation/html/class_s_w_module__inherit__graph.png delete mode 100644 doc/api-documentation/html/class_s_w_object-members.html delete mode 100644 doc/api-documentation/html/class_s_w_object.html delete mode 100644 doc/api-documentation/html/class_s_w_object__coll__graph.png delete mode 100644 doc/api-documentation/html/class_s_w_object__inherit__graph.png delete mode 100644 doc/api-documentation/html/class_s_w_text-members.html delete mode 100644 doc/api-documentation/html/class_s_w_text.html delete mode 100644 doc/api-documentation/html/class_s_w_text__coll__graph.png delete mode 100644 doc/api-documentation/html/class_s_w_text__inherit__graph.png delete mode 100644 doc/api-documentation/html/class_str_key-members.html delete mode 100644 doc/api-documentation/html/class_str_key.html delete mode 100644 doc/api-documentation/html/class_str_key__coll__graph.png delete mode 100644 doc/api-documentation/html/class_str_key__inherit__graph.png delete mode 100644 doc/api-documentation/html/class_th_m_l_footnotes-members.html delete mode 100644 doc/api-documentation/html/class_th_m_l_footnotes.html delete mode 100644 doc/api-documentation/html/class_th_m_l_g_b_f-members.html delete mode 100644 doc/api-documentation/html/class_th_m_l_g_b_f.html delete mode 100644 doc/api-documentation/html/class_th_m_l_h_t_m_l-members.html delete mode 100644 doc/api-documentation/html/class_th_m_l_h_t_m_l.html delete mode 100644 doc/api-documentation/html/class_th_m_l_h_t_m_l__coll__graph.png delete mode 100644 doc/api-documentation/html/class_th_m_l_h_t_m_l__inherit__graph.png delete mode 100644 doc/api-documentation/html/class_th_m_l_h_t_m_l_h_r_e_f-members.html delete mode 100644 doc/api-documentation/html/class_th_m_l_h_t_m_l_h_r_e_f.html delete mode 100644 doc/api-documentation/html/class_th_m_l_h_t_m_l_h_r_e_f__coll__graph.png delete mode 100644 doc/api-documentation/html/class_th_m_l_h_t_m_l_h_r_e_f__inherit__graph.png delete mode 100644 doc/api-documentation/html/class_th_m_l_headings-members.html delete mode 100644 doc/api-documentation/html/class_th_m_l_headings.html delete mode 100644 doc/api-documentation/html/class_th_m_l_lemma-members.html delete mode 100644 doc/api-documentation/html/class_th_m_l_lemma.html delete mode 100644 doc/api-documentation/html/class_th_m_l_morph-members.html delete mode 100644 doc/api-documentation/html/class_th_m_l_morph.html delete mode 100644 doc/api-documentation/html/class_th_m_l_o_l_b-members.html delete mode 100644 doc/api-documentation/html/class_th_m_l_o_l_b.html delete mode 100644 doc/api-documentation/html/class_th_m_l_o_s_i_s-members.html delete mode 100644 doc/api-documentation/html/class_th_m_l_o_s_i_s.html delete mode 100644 doc/api-documentation/html/class_th_m_l_plain-members.html delete mode 100644 doc/api-documentation/html/class_th_m_l_plain.html delete mode 100644 doc/api-documentation/html/class_th_m_l_r_t_f-members.html delete mode 100644 doc/api-documentation/html/class_th_m_l_r_t_f.html delete mode 100644 doc/api-documentation/html/class_th_m_l_r_t_f__coll__graph.png delete mode 100644 doc/api-documentation/html/class_th_m_l_r_t_f__inherit__graph.png delete mode 100644 doc/api-documentation/html/class_th_m_l_scripref-members.html delete mode 100644 doc/api-documentation/html/class_th_m_l_scripref.html delete mode 100644 doc/api-documentation/html/class_th_m_l_strongs-members.html delete mode 100644 doc/api-documentation/html/class_th_m_l_strongs.html delete mode 100644 doc/api-documentation/html/class_th_m_l_variants-members.html delete mode 100644 doc/api-documentation/html/class_th_m_l_variants.html delete mode 100644 doc/api-documentation/html/class_tree_key-members.html delete mode 100644 doc/api-documentation/html/class_tree_key.html delete mode 100644 doc/api-documentation/html/class_tree_key__coll__graph.png delete mode 100644 doc/api-documentation/html/class_tree_key__inherit__graph.png delete mode 100644 doc/api-documentation/html/class_tree_key_idx-members.html delete mode 100644 doc/api-documentation/html/class_tree_key_idx.html delete mode 100644 doc/api-documentation/html/class_tree_key_idx__coll__graph.png delete mode 100644 doc/api-documentation/html/class_tree_key_idx__inherit__graph.png delete mode 100644 doc/api-documentation/html/class_u_t_f16_u_t_f8-members.html delete mode 100644 doc/api-documentation/html/class_u_t_f16_u_t_f8.html delete mode 100644 doc/api-documentation/html/class_u_t_f8_cantillation-members.html delete mode 100644 doc/api-documentation/html/class_u_t_f8_cantillation.html delete mode 100644 doc/api-documentation/html/class_u_t_f8_greek_accents-members.html delete mode 100644 doc/api-documentation/html/class_u_t_f8_greek_accents.html delete mode 100644 doc/api-documentation/html/class_u_t_f8_h_t_m_l-members.html delete mode 100644 doc/api-documentation/html/class_u_t_f8_h_t_m_l.html delete mode 100644 doc/api-documentation/html/class_u_t_f8_hebrew_points-members.html delete mode 100644 doc/api-documentation/html/class_u_t_f8_hebrew_points.html delete mode 100644 doc/api-documentation/html/class_u_t_f8_latin1-members.html delete mode 100644 doc/api-documentation/html/class_u_t_f8_latin1.html delete mode 100644 doc/api-documentation/html/class_u_t_f8_u_t_f16-members.html delete mode 100644 doc/api-documentation/html/class_u_t_f8_u_t_f16.html delete mode 100644 doc/api-documentation/html/class_unicode_r_t_f-members.html delete mode 100644 doc/api-documentation/html/class_unicode_r_t_f.html delete mode 100644 doc/api-documentation/html/class_verse_key-members.html delete mode 100644 doc/api-documentation/html/class_verse_key.html delete mode 100644 doc/api-documentation/html/class_verse_key__coll__graph.png delete mode 100644 doc/api-documentation/html/class_verse_key__inherit__graph.png delete mode 100644 doc/api-documentation/html/classes.html delete mode 100644 doc/api-documentation/html/comments_2rawcom_2rtfidx_8cpp-source.html delete mode 100644 doc/api-documentation/html/comments_2zcom_2rawtxt2z_8cpp-source.html delete mode 100644 doc/api-documentation/html/compress_8cpp-source.html delete mode 100644 doc/api-documentation/html/deflate_8h-source.html delete mode 100644 doc/api-documentation/html/defs_8h-source.html delete mode 100644 doc/api-documentation/html/dirent_8cpp-source.html delete mode 100644 doc/api-documentation/html/dirent_8h-source.html delete mode 100644 doc/api-documentation/html/doxygen.css delete mode 100644 doc/api-documentation/html/doxygen.png delete mode 100644 doc/api-documentation/html/echomod_8cpp-source.html delete mode 100644 doc/api-documentation/html/echomod_8h-source.html delete mode 100644 doc/api-documentation/html/encfiltmgr_8cpp-source.html delete mode 100644 doc/api-documentation/html/encfiltmgr_8h-source.html delete mode 100644 doc/api-documentation/html/entriesblk_8cpp-source.html delete mode 100644 doc/api-documentation/html/entriesblk_8h-source.html delete mode 100644 doc/api-documentation/html/femain_8cpp-source.html delete mode 100644 doc/api-documentation/html/femain_8h-source.html delete mode 100644 doc/api-documentation/html/filemgr_8cpp-source.html delete mode 100644 doc/api-documentation/html/filemgr_8h-source.html delete mode 100644 doc/api-documentation/html/files.html delete mode 100644 doc/api-documentation/html/flatapi_8h-source.html delete mode 100644 doc/api-documentation/html/functions.html delete mode 100644 doc/api-documentation/html/gbf_8cpp-source.html delete mode 100644 doc/api-documentation/html/gbf_8h-source.html delete mode 100644 doc/api-documentation/html/gbffootnotes_8cpp-source.html delete mode 100644 doc/api-documentation/html/gbffootnotes_8h-source.html delete mode 100644 doc/api-documentation/html/gbfheadings_8cpp-source.html delete mode 100644 doc/api-documentation/html/gbfheadings_8h-source.html delete mode 100644 doc/api-documentation/html/gbfhtml_8cpp-source.html delete mode 100644 doc/api-documentation/html/gbfhtml_8h-source.html delete mode 100644 doc/api-documentation/html/gbfhtmlhref_8cpp-source.html delete mode 100644 doc/api-documentation/html/gbfhtmlhref_8h-source.html delete mode 100644 doc/api-documentation/html/gbfmorph_8cpp-source.html delete mode 100644 doc/api-documentation/html/gbfmorph_8h-source.html delete mode 100644 doc/api-documentation/html/gbfosis_8cpp-source.html delete mode 100644 doc/api-documentation/html/gbfosis_8h-source.html delete mode 100644 doc/api-documentation/html/gbfplain_8cpp-source.html delete mode 100644 doc/api-documentation/html/gbfplain_8h-source.html delete mode 100644 doc/api-documentation/html/gbfrtf_8cpp-source.html delete mode 100644 doc/api-documentation/html/gbfrtf_8h-source.html delete mode 100644 doc/api-documentation/html/gbfstrongs_8cpp-source.html delete mode 100644 doc/api-documentation/html/gbfstrongs_8h-source.html delete mode 100644 doc/api-documentation/html/gbfthml_8cpp-source.html delete mode 100644 doc/api-documentation/html/gbfthml_8h-source.html delete mode 100644 doc/api-documentation/html/graph_legend.dot delete mode 100644 doc/api-documentation/html/graph_legend.html delete mode 100644 doc/api-documentation/html/graph_legend.png delete mode 100644 doc/api-documentation/html/greeklexattribs_8cpp-source.html delete mode 100644 doc/api-documentation/html/greeklexattribs_8h-source.html delete mode 100644 doc/api-documentation/html/hebrewmcim_8cpp-source.html delete mode 100644 doc/api-documentation/html/hebrewmcim_8h-source.html delete mode 100644 doc/api-documentation/html/hierarchy.html delete mode 100644 doc/api-documentation/html/hrefcom_8cpp-source.html delete mode 100644 doc/api-documentation/html/hrefcom_8h-source.html delete mode 100644 doc/api-documentation/html/index.html delete mode 100644 doc/api-documentation/html/infblock_8h-source.html delete mode 100644 doc/api-documentation/html/infcodes_8h-source.html delete mode 100644 doc/api-documentation/html/inffast_8h-source.html delete mode 100644 doc/api-documentation/html/inffixed_8h-source.html delete mode 100644 doc/api-documentation/html/inftrees_8h-source.html delete mode 100644 doc/api-documentation/html/infutil_8h-source.html delete mode 100644 doc/api-documentation/html/inherit__graph__0.png delete mode 100644 doc/api-documentation/html/inherit__graph__1.png delete mode 100644 doc/api-documentation/html/inherit__graph__10.png delete mode 100644 doc/api-documentation/html/inherit__graph__11.png delete mode 100644 doc/api-documentation/html/inherit__graph__12.png delete mode 100644 doc/api-documentation/html/inherit__graph__13.png delete mode 100644 doc/api-documentation/html/inherit__graph__14.png delete mode 100644 doc/api-documentation/html/inherit__graph__15.png delete mode 100644 doc/api-documentation/html/inherit__graph__16.png delete mode 100644 doc/api-documentation/html/inherit__graph__17.png delete mode 100644 doc/api-documentation/html/inherit__graph__18.png delete mode 100644 doc/api-documentation/html/inherit__graph__19.png delete mode 100644 doc/api-documentation/html/inherit__graph__2.png delete mode 100644 doc/api-documentation/html/inherit__graph__20.png delete mode 100644 doc/api-documentation/html/inherit__graph__21.png delete mode 100644 doc/api-documentation/html/inherit__graph__22.png delete mode 100644 doc/api-documentation/html/inherit__graph__23.png delete mode 100644 doc/api-documentation/html/inherit__graph__24.png delete mode 100644 doc/api-documentation/html/inherit__graph__25.png delete mode 100644 doc/api-documentation/html/inherit__graph__26.png delete mode 100644 doc/api-documentation/html/inherit__graph__27.png delete mode 100644 doc/api-documentation/html/inherit__graph__28.png delete mode 100644 doc/api-documentation/html/inherit__graph__29.png delete mode 100644 doc/api-documentation/html/inherit__graph__3.png delete mode 100644 doc/api-documentation/html/inherit__graph__30.png delete mode 100644 doc/api-documentation/html/inherit__graph__31.png delete mode 100644 doc/api-documentation/html/inherit__graph__32.png delete mode 100644 doc/api-documentation/html/inherit__graph__33.png delete mode 100644 doc/api-documentation/html/inherit__graph__34.png delete mode 100644 doc/api-documentation/html/inherit__graph__35.png delete mode 100644 doc/api-documentation/html/inherit__graph__36.png delete mode 100644 doc/api-documentation/html/inherit__graph__37.png delete mode 100644 doc/api-documentation/html/inherit__graph__38.png delete mode 100644 doc/api-documentation/html/inherit__graph__39.png delete mode 100644 doc/api-documentation/html/inherit__graph__4.png delete mode 100644 doc/api-documentation/html/inherit__graph__40.png delete mode 100644 doc/api-documentation/html/inherit__graph__41.png delete mode 100644 doc/api-documentation/html/inherit__graph__42.png delete mode 100644 doc/api-documentation/html/inherit__graph__43.png delete mode 100644 doc/api-documentation/html/inherit__graph__44.png delete mode 100644 doc/api-documentation/html/inherit__graph__45.png delete mode 100644 doc/api-documentation/html/inherit__graph__46.png delete mode 100644 doc/api-documentation/html/inherit__graph__5.png delete mode 100644 doc/api-documentation/html/inherit__graph__6.png delete mode 100644 doc/api-documentation/html/inherit__graph__7.png delete mode 100644 doc/api-documentation/html/inherit__graph__8.png delete mode 100644 doc/api-documentation/html/inherit__graph__9.png delete mode 100644 doc/api-documentation/html/inherits.html delete mode 100644 doc/api-documentation/html/jfbgen_8cpp-source.html delete mode 100644 doc/api-documentation/html/kjvidx_8cpp-source.html delete mode 100644 doc/api-documentation/html/latin1utf16_8cpp-source.html delete mode 100644 doc/api-documentation/html/latin1utf16_8h-source.html delete mode 100644 doc/api-documentation/html/latin1utf8_8cpp-source.html delete mode 100644 doc/api-documentation/html/latin1utf8_8h-source.html delete mode 100644 doc/api-documentation/html/listkey_8cpp-source.html delete mode 100644 doc/api-documentation/html/listkey_8h-source.html delete mode 100644 doc/api-documentation/html/localemgr_8cpp-source.html delete mode 100644 doc/api-documentation/html/localemgr_8h-source.html delete mode 100644 doc/api-documentation/html/lzsscomprs_8cpp-source.html delete mode 100644 doc/api-documentation/html/lzsscomprs_8h-source.html delete mode 100644 doc/api-documentation/html/markupfiltmgr_8cpp-source.html delete mode 100644 doc/api-documentation/html/markupfiltmgr_8h-source.html delete mode 100644 doc/api-documentation/html/mhcidx_8cpp-source.html delete mode 100644 doc/api-documentation/html/multimapwdef_8h-source.html delete mode 100644 doc/api-documentation/html/namespaces.html delete mode 100644 doc/api-documentation/html/namespacestd.html delete mode 100644 doc/api-documentation/html/nasb_8cpp-source.html delete mode 100644 doc/api-documentation/html/nuidx_8cpp-source.html delete mode 100644 doc/api-documentation/html/nullim_8cpp-source.html delete mode 100644 doc/api-documentation/html/nullim_8h-source.html delete mode 100644 doc/api-documentation/html/plainfootnotes_8cpp-source.html delete mode 100644 doc/api-documentation/html/plainfootnotes_8h-source.html delete mode 100644 doc/api-documentation/html/plainhtml_8cpp-source.html delete mode 100644 doc/api-documentation/html/plainhtml_8h-source.html delete mode 100644 doc/api-documentation/html/rawcom_8cpp-source.html delete mode 100644 doc/api-documentation/html/rawcom_8h-source.html delete mode 100644 doc/api-documentation/html/rawfiles_8cpp-source.html delete mode 100644 doc/api-documentation/html/rawfiles_8h-source.html delete mode 100644 doc/api-documentation/html/rawfilesgen_8cpp-source.html delete mode 100644 doc/api-documentation/html/rawgbf_2gbfidx_8cpp-source.html delete mode 100644 doc/api-documentation/html/rawgbf_8cpp-source.html delete mode 100644 doc/api-documentation/html/rawgbf_8h-source.html delete mode 100644 doc/api-documentation/html/rawgenbook_8cpp-source.html delete mode 100644 doc/api-documentation/html/rawgenbook_8h-source.html delete mode 100644 doc/api-documentation/html/rawld4_8cpp-source.html delete mode 100644 doc/api-documentation/html/rawld4_8h-source.html delete mode 100644 doc/api-documentation/html/rawld_8cpp-source.html delete mode 100644 doc/api-documentation/html/rawld_8h-source.html delete mode 100644 doc/api-documentation/html/rawstr4_8cpp-source.html delete mode 100644 doc/api-documentation/html/rawstr4_8h-source.html delete mode 100644 doc/api-documentation/html/rawstr_8cpp-source.html delete mode 100644 doc/api-documentation/html/rawstr_8h-source.html delete mode 100644 doc/api-documentation/html/rawtext_8cpp-source.html delete mode 100644 doc/api-documentation/html/rawtext_8h-source.html delete mode 100644 doc/api-documentation/html/rawverse_8cpp-source.html delete mode 100644 doc/api-documentation/html/rawverse_8h-source.html delete mode 100644 doc/api-documentation/html/regex_8h-source.html delete mode 100644 doc/api-documentation/html/roman_8h-source.html delete mode 100644 doc/api-documentation/html/rtfhtml_8cpp-source.html delete mode 100644 doc/api-documentation/html/rtfhtml_8h-source.html delete mode 100644 doc/api-documentation/html/rwphtml_8cpp-source.html delete mode 100644 doc/api-documentation/html/rwphtml_8h-source.html delete mode 100644 doc/api-documentation/html/rwpidx_8cpp-source.html delete mode 100644 doc/api-documentation/html/rwprtf_8cpp-source.html delete mode 100644 doc/api-documentation/html/rwprtf_8h-source.html delete mode 100644 doc/api-documentation/html/sapphire_8cpp-source.html delete mode 100644 doc/api-documentation/html/sapphire_8h-source.html delete mode 100644 doc/api-documentation/html/scsuutf8_8cpp-source.html delete mode 100644 doc/api-documentation/html/scsuutf8_8h-source.html delete mode 100644 doc/api-documentation/html/strkey_8cpp-source.html delete mode 100644 doc/api-documentation/html/strkey_8h-source.html delete mode 100644 doc/api-documentation/html/swbasicfilter_8cpp-source.html delete mode 100644 doc/api-documentation/html/swbasicfilter_8h-source.html delete mode 100644 doc/api-documentation/html/swcacher_8cpp-source.html delete mode 100644 doc/api-documentation/html/swcacher_8h-source.html delete mode 100644 doc/api-documentation/html/swcipher_8cpp-source.html delete mode 100644 doc/api-documentation/html/swcipher_8h-source.html delete mode 100644 doc/api-documentation/html/swcom_8cpp-source.html delete mode 100644 doc/api-documentation/html/swcom_8h-source.html delete mode 100644 doc/api-documentation/html/swcomprs_8cpp-source.html delete mode 100644 doc/api-documentation/html/swcomprs_8h-source.html delete mode 100644 doc/api-documentation/html/swconfig_8cpp-source.html delete mode 100644 doc/api-documentation/html/swconfig_8h-source.html delete mode 100644 doc/api-documentation/html/swdisp_8cpp-source.html delete mode 100644 doc/api-documentation/html/swdisp_8h-source.html delete mode 100644 doc/api-documentation/html/swdisprtf_8h-source.html delete mode 100644 doc/api-documentation/html/swdisprtfchap_8h-source.html delete mode 100644 doc/api-documentation/html/swfilter_8h-source.html delete mode 100644 doc/api-documentation/html/swfiltermgr_8cpp-source.html delete mode 100644 doc/api-documentation/html/swfiltermgr_8h-source.html delete mode 100644 doc/api-documentation/html/swgenbook_8cpp-source.html delete mode 100644 doc/api-documentation/html/swgenbook_8h-source.html delete mode 100644 doc/api-documentation/html/swinputmeth_8cpp-source.html delete mode 100644 doc/api-documentation/html/swinputmeth_8h-source.html delete mode 100644 doc/api-documentation/html/swkey_8cpp-source.html delete mode 100644 doc/api-documentation/html/swkey_8h-source.html delete mode 100644 doc/api-documentation/html/swld_8cpp-source.html delete mode 100644 doc/api-documentation/html/swld_8h-source.html delete mode 100644 doc/api-documentation/html/swlocale_8cpp-source.html delete mode 100644 doc/api-documentation/html/swlocale_8h-source.html delete mode 100644 doc/api-documentation/html/swlog_8cpp-source.html delete mode 100644 doc/api-documentation/html/swlog_8h-source.html delete mode 100644 doc/api-documentation/html/swmacs_8h-source.html delete mode 100644 doc/api-documentation/html/swmgr_8cpp-source.html delete mode 100644 doc/api-documentation/html/swmgr_8h-source.html delete mode 100644 doc/api-documentation/html/swmodule_8cpp-source.html delete mode 100644 doc/api-documentation/html/swmodule_8h-source.html delete mode 100644 doc/api-documentation/html/swobject_8h-source.html delete mode 100644 doc/api-documentation/html/swtext_8cpp-source.html delete mode 100644 doc/api-documentation/html/swtext_8h-source.html delete mode 100644 doc/api-documentation/html/swunicod_8cpp-source.html delete mode 100644 doc/api-documentation/html/swunicod_8h-source.html delete mode 100644 doc/api-documentation/html/swversion_8cpp-source.html delete mode 100644 doc/api-documentation/html/swversion_8h-source.html delete mode 100644 doc/api-documentation/html/swwinlog_8h-source.html delete mode 100644 doc/api-documentation/html/sysdata_8h-source.html delete mode 100644 doc/api-documentation/html/tbdisp_8h-source.html delete mode 100644 doc/api-documentation/html/texts_2rawtext_2rtfidx_8cpp-source.html delete mode 100644 doc/api-documentation/html/texts_2ztext_2rawtxt2z_8cpp-source.html delete mode 100644 doc/api-documentation/html/thmlfootnotes_8cpp-source.html delete mode 100644 doc/api-documentation/html/thmlfootnotes_8h-source.html delete mode 100644 doc/api-documentation/html/thmlgbf_8cpp-source.html delete mode 100644 doc/api-documentation/html/thmlgbf_8h-source.html delete mode 100644 doc/api-documentation/html/thmlheadings_8cpp-source.html delete mode 100644 doc/api-documentation/html/thmlheadings_8h-source.html delete mode 100644 doc/api-documentation/html/thmlhtml_8cpp-source.html delete mode 100644 doc/api-documentation/html/thmlhtml_8h-source.html delete mode 100644 doc/api-documentation/html/thmlhtmlhref_8cpp-source.html delete mode 100644 doc/api-documentation/html/thmlhtmlhref_8h-source.html delete mode 100644 doc/api-documentation/html/thmllemma_8cpp-source.html delete mode 100644 doc/api-documentation/html/thmllemma_8h-source.html delete mode 100644 doc/api-documentation/html/thmlmorph_8cpp-source.html delete mode 100644 doc/api-documentation/html/thmlmorph_8h-source.html delete mode 100644 doc/api-documentation/html/thmlolb_8cpp-source.html delete mode 100644 doc/api-documentation/html/thmlolb_8h-source.html delete mode 100644 doc/api-documentation/html/thmlosis_8cpp-source.html delete mode 100644 doc/api-documentation/html/thmlosis_8h-source.html delete mode 100644 doc/api-documentation/html/thmlplain_8cpp-source.html delete mode 100644 doc/api-documentation/html/thmlplain_8h-source.html delete mode 100644 doc/api-documentation/html/thmlrtf_8cpp-source.html delete mode 100644 doc/api-documentation/html/thmlrtf_8h-source.html delete mode 100644 doc/api-documentation/html/thmlscripref_8cpp-source.html delete mode 100644 doc/api-documentation/html/thmlscripref_8h-source.html delete mode 100644 doc/api-documentation/html/thmlstrongs_8cpp-source.html delete mode 100644 doc/api-documentation/html/thmlstrongs_8h-source.html delete mode 100644 doc/api-documentation/html/thmlvariants_8cpp-source.html delete mode 100644 doc/api-documentation/html/thmlvariants_8h-source.html delete mode 100644 doc/api-documentation/html/treekey_8cpp-source.html delete mode 100644 doc/api-documentation/html/treekey_8h-source.html delete mode 100644 doc/api-documentation/html/treekeyidx_8cpp-source.html delete mode 100644 doc/api-documentation/html/treekeyidx_8h-source.html delete mode 100644 doc/api-documentation/html/trees_8h-source.html delete mode 100644 doc/api-documentation/html/unicodertf_8cpp-source.html delete mode 100644 doc/api-documentation/html/unicodertf_8h-source.html delete mode 100644 doc/api-documentation/html/unixstr_8cpp-source.html delete mode 100644 doc/api-documentation/html/unixstr_8h-source.html delete mode 100644 doc/api-documentation/html/untgz_8h-source.html delete mode 100644 doc/api-documentation/html/utf16utf8_8cpp-source.html delete mode 100644 doc/api-documentation/html/utf16utf8_8h-source.html delete mode 100644 doc/api-documentation/html/utf8arshaping_8cpp-source.html delete mode 100644 doc/api-documentation/html/utf8arshaping_8h-source.html delete mode 100644 doc/api-documentation/html/utf8bidireorder_8cpp-source.html delete mode 100644 doc/api-documentation/html/utf8bidireorder_8h-source.html delete mode 100644 doc/api-documentation/html/utf8cantillation_8cpp-source.html delete mode 100644 doc/api-documentation/html/utf8cantillation_8h-source.html delete mode 100644 doc/api-documentation/html/utf8greekaccents_8cpp-source.html delete mode 100644 doc/api-documentation/html/utf8greekaccents_8h-source.html delete mode 100644 doc/api-documentation/html/utf8hebrewpoints_8cpp-source.html delete mode 100644 doc/api-documentation/html/utf8hebrewpoints_8h-source.html delete mode 100644 doc/api-documentation/html/utf8html_8cpp-source.html delete mode 100644 doc/api-documentation/html/utf8html_8h-source.html delete mode 100644 doc/api-documentation/html/utf8latin1_8cpp-source.html delete mode 100644 doc/api-documentation/html/utf8latin1_8h-source.html delete mode 100644 doc/api-documentation/html/utf8nfc_8cpp-source.html delete mode 100644 doc/api-documentation/html/utf8nfc_8h-source.html delete mode 100644 doc/api-documentation/html/utf8nfkd_8cpp-source.html delete mode 100644 doc/api-documentation/html/utf8nfkd_8h-source.html delete mode 100644 doc/api-documentation/html/utf8transliterator_8cpp-source.html delete mode 100644 doc/api-documentation/html/utf8transliterator_8h-source.html delete mode 100644 doc/api-documentation/html/utf8utf16_8cpp-source.html delete mode 100644 doc/api-documentation/html/utf8utf16_8h-source.html delete mode 100644 doc/api-documentation/html/utilconf_8cpp-source.html delete mode 100644 doc/api-documentation/html/utilconf_8h-source.html delete mode 100644 doc/api-documentation/html/utilfuns_8h-source.html delete mode 100644 doc/api-documentation/html/utilstr_8cpp-source.html delete mode 100644 doc/api-documentation/html/utilstr_8h-source.html delete mode 100644 doc/api-documentation/html/versekey_8cpp-source.html delete mode 100644 doc/api-documentation/html/versekey_8h-source.html delete mode 100644 doc/api-documentation/html/vntidx_8cpp-source.html delete mode 100644 doc/api-documentation/html/zcom_8cpp-source.html delete mode 100644 doc/api-documentation/html/zcom_8h-source.html delete mode 100644 doc/api-documentation/html/zconf_8h-source.html delete mode 100644 doc/api-documentation/html/zipcomprs_8cpp-source.html delete mode 100644 doc/api-documentation/html/zipcomprs_8h-source.html delete mode 100644 doc/api-documentation/html/zld_8cpp-source.html delete mode 100644 doc/api-documentation/html/zld_8h-source.html delete mode 100644 doc/api-documentation/html/zlib_8h-source.html delete mode 100644 doc/api-documentation/html/zstr_8cpp-source.html delete mode 100644 doc/api-documentation/html/zstr_8h-source.html delete mode 100644 doc/api-documentation/html/ztext_2gbfidx_8cpp-source.html delete mode 100644 doc/api-documentation/html/ztext_8cpp-source.html delete mode 100644 doc/api-documentation/html/ztext_8h-source.html delete mode 100644 doc/api-documentation/html/zutil_8h-source.html delete mode 100644 doc/api-documentation/html/zverse_8cpp-source.html delete mode 100644 doc/api-documentation/html/zverse_8h-source.html (limited to 'doc/api-documentation/html') diff --git a/doc/api-documentation/html/_greek2_greek_8cpp-source.html b/doc/api-documentation/html/_greek2_greek_8cpp-source.html deleted file mode 100644 index 25e677f..0000000 --- a/doc/api-documentation/html/_greek2_greek_8cpp-source.html +++ /dev/null @@ -1,915 +0,0 @@ - - -Greek2Greek.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

Greek2Greek.cpp

00001 //*****************************************************************************
-00002 // Author      : William Dicks                                              ***
-00003 // Date Created: 10 February 1998                                           ***
-00004 // Purpose     : Implementation for Greek to b-Greek conversion and vice    ***
-00005 //             : versa.                                                     ***
-00006 // File Name   : Greek2Greek.cpp                                            ***
-00007 //                                                                          ***
-00008 // Author info : ---------------------------------------------------------- ***
-00009 //     Address : 23 Tieroogpark                                             ***
-00010 //             : Hoewe Str                                                  ***
-00011 //             : Elarduspark X3                                             ***
-00012 //             : 0181                                                       ***
-00013 //             : South Africa                                               ***
-00014 //     Home Tel: +27 (0)12 345 3166                                         ***
-00015 //     Cell No : +27 (0)82 577 4424                                         ***
-00016 //     e-mail  : wd@isis.co.za                                              ***
-00017 // Church WWW  : http://www.hatfield.co.za                                  ***
-00018 //                                                                          ***
-00019 // Bugfix info : ---------------------------------------------------------- ***
-00020 // Bug #1      : Greek Font character 197 converted to b-Greek "6"          ***
-00021 // Date Fixed  : 23 February 1998                                           ***
-00022 //*****************************************************************************
-00023 
-00024 #include <stdio.h>
-00025 #include <string.h>
-00026 #include <ctype.h>
-00027 
-00028 #include "Greek2Greek.h"
-00029 #include "GreekChars.h"
-00030 
-00031 //*****************************************************************************
-00032 // Used to convert a string created by using the Greek font supplied with the
-00033 // Sword Project to a string that conforms to the b-Greek discussion list 
-00034 // method of transliteration.
-00035 //*****************************************************************************
-00036 
-00037 unsigned char Greek2bGreek(
-00038          unsigned char *sResult, 
-00039          unsigned char *sGreekText, 
-00040          int nMaxResultBuflen)
-00041 {
-00042    char error;
-00043 
-00044    unsigned int NoOfChars = ParseGreek(sResult, sGreekText, nMaxResultBuflen);
-00045 
-00046    if (NoOfChars < strlen((char *)sGreekText))
-00047       error = 1;
-00048    else
-00049       error = 0;
-00050 
-00051    return error;
-00052 }
-00053 
-00054 //*****************************************************************************
-00055 // Used to convert a string created by using the b-Greek method of 
-00056 // transliteration to a string that can be converted to a Greek-font readable 
-00057 // string.
-00058 //*****************************************************************************
-00059 
-00060 unsigned char bGreek2Greek(
-00061          unsigned char *sResult, 
-00062          unsigned char *sGreekText, 
-00063          int nMaxResultBuflen)
-00064 {
-00065    unsigned char error;
-00066 
-00067    unsigned int NoOfChars = ParsebGreek(sResult, sGreekText, nMaxResultBuflen);
-00068 
-00069    if (NoOfChars < strlen((char *)sGreekText))
-00070       error = 1;
-00071    else
-00072       error = 0;
-00073 
-00074    return error;
-00075 }
-00076 
-00077 //*****************************************************************************
-00078 // Parse a Greek font created string and return the b-Greek equivalent
-00079 //*****************************************************************************
-00080 
-00081 int ParseGreek(
-00082          unsigned char *sResult, 
-00083          unsigned char *sGreekText, 
-00084          int nMaxResultBuflen)
-00085 {
-00086    int characters = 0;
-00087    int index = 0;
-00088    unsigned char tmp;
-00089    bool iota;        // true = IOTA subscript; false = No IOTA
-00090    bool breathing;   // true = add breathing; false = no breathing
-00091    bool rough;       // true = rough breathing; false = smooth
-00092 
-00093    // While text is not equal to NULL pointer
-00094 
-00095    while (sGreekText[index] && characters < nMaxResultBuflen)
-00096    {
-00097       iota = breathing = rough = false;
-00098       tmp = Font2char(sGreekText[index++], iota, breathing, rough);
-00099 
-00100       if (breathing)
-00101       {
-00102          if (rough)  // Rough breathing
-00103          {
-00104             sResult[characters++] = ROUGH;      // Add rough breathing "h"
-00105             sResult[characters++] = tmp;        // Insert char
-00106          }
-00107          else
-00108             sResult[characters++] = tmp;           // Insert char
-00109       }
-00110       else
-00111       {
-00112          if (iota)   // IOTA subscript
-00113          {
-00114             sResult[characters++] = tmp;        // Insert char
-00115             sResult[characters++] = IOTA_SUB;   // Add Iota subscript
-00116          }
-00117          else
-00118             sResult[characters++] = tmp;           // Insert char
-00119       }
-00120    }
-00121    sResult[characters] = 0;                                     // Terminate the string
-00122 
-00123    return index;
-00124 }
-00125 
-00126 //*****************************************************************************
-00127 // Parse a b-Greek string and return the Greek font equivalent
-00128 //*****************************************************************************
-00129 int ParsebGreek(
-00130          unsigned char *sResult, 
-00131          unsigned char *sGreekText, 
-00132          int nMaxResultBuflen)
-00133 {
-00134    int characters = 0;
-00135    int index = 0;
-00136    bool iota = false;        // true = IOTA subscript; false = No IOTA
-00137    bool breathing = false;   // true = add breathing; false = no breathing
-00138    bool rough = false;       // true = rough breathing; false = smooth
-00139    bool fSigma = false;      // Final sigma flag
-00140    bool nChar = true;        // New char flag
-00141 
-00142    // While text is not equal to NULL pointer
-00143 
-00144    while (*sGreekText || characters < nMaxResultBuflen)
-00145    {
-00146       if (nChar)
-00147       {
-00148          if (*sGreekText == (unsigned char)ROUGH)
-00149          {
-00150             rough = true;
-00151             breathing = true;
-00152          }
-00153          else
-00154          {
-00155             rough = false;
-00156             breathing = true;
-00157          }
-00158          
-00159          nChar = false;
-00160       }
-00161       else if (isPunctSpace(*(sGreekText + 1)))
-00162       {
-00163          fSigma = true;
-00164       }
-00165       else if (*(sGreekText + 1) == (unsigned char)IOTA_SUB)
-00166       {
-00167          iota = true;
-00168       }
-00169       
-00170       if (*sGreekText != (unsigned char)IOTA_SUB)
-00171       {
-00172          if (*sGreekText == (unsigned char)' ')
-00173          {
-00174             nChar = true;
-00175          }
-00176 
-00177          if (breathing)
-00178          {
-00179             if (rough)
-00180             {
-00181                // When we read a rough breather we want to increment the pointer 
-00182                // to the right character before char2Font is called.
-00183 
-00184                sResult[index++] = 
-00185                   char2Font(*++sGreekText, fSigma, iota, breathing, rough);
-00186 
-00187                sGreekText++;
-00188                characters++;
-00189             }
-00190             else
-00191             {
-00192                sResult[index++] = 
-00193                   char2Font(*sGreekText++, fSigma, iota, breathing, rough);
-00194                characters++;
-00195             }
-00196          }
-00197          else
-00198          {
-00199             sResult[index++] = 
-00200                char2Font(*sGreekText++, fSigma, iota, breathing, rough);
-00201             characters++;
-00202          }
-00203       }
-00204       else
-00205       {
-00206          sGreekText++;
-00207          characters++;
-00208       }
-00209 
-00210       fSigma = iota = breathing = rough = false;
-00211    }
-00212 
-00213    sResult[index] = 0;                                  // Terminate the string
-00214 
-00215    return characters;
-00216 }
-00217 
-00218 
-00219 //*****************************************************************************
-00220 // Convert a character to a GREEK font character
-00221 //*****************************************************************************
-00222 unsigned char char2Font(
-00223                unsigned char letter,      // bGreek letter to convert to Font letter
-00224                bool finalSigma,  // Is it a final SIGMA
-00225                bool iota,        // true = IOTA subscript; false = No IOTA
-00226                bool breathing,   // true = add breathing; false = no breathing
-00227                bool rough)       // true = rough breathing; false = smooth
-00228 {
-00229    unsigned char charFont = 0;
-00230 
-00231    switch (letter)
-00232    {
-00233       case ALPHA:            // A
-00234          if (breathing)
-00235          {
-00236             if (rough)
-00237             {
-00238                charFont = (unsigned char)gROUGH_ALPHA;
-00239             }
-00240             else
-00241                charFont = (unsigned char)gNON_ROUGH_ALPHA;
-00242          }
-00243          else
-00244          {
-00245             if (iota)
-00246             {
-00247                charFont = (unsigned char)gIOTA_ALPHA;
-00248             }
-00249             else
-00250                charFont = (unsigned char)gALPHA;
-00251          }
-00252 
-00253       break;
-00254 
-00255       case BETA:             // B
-00256          charFont = (unsigned char)gBETA;
-00257 
-00258       break;
-00259 
-00260       case CHI:              // C
-00261          charFont = (unsigned char)gCHI;
-00262 
-00263       break;
-00264 
-00265       case DELTA:            // D
-00266          charFont = (unsigned char)gDELTA;
-00267 
-00268       break;
-00269 
-00270       case EPSILON:          // E
-00271          if (breathing)
-00272          {
-00273             if (rough)
-00274             {
-00275                charFont = (unsigned char)gROUGH_EPSILON;
-00276             }
-00277             else
-00278                charFont = (unsigned char)gNON_ROUGH_EPSILON;
-00279          }
-00280          else
-00281          {
-00282             charFont = (unsigned char)gEPSILON;
-00283          }
-00284 
-00285       break;
-00286 
-00287       case PHI:              // F
-00288          charFont = (unsigned char)gPHI;
-00289 
-00290       break;
-00291 
-00292       case GAMMA:            // G
-00293          charFont = (unsigned char)gGAMMA;
-00294 
-00295       break;
-00296 
-00297       case ETA:              // H
-00298          if (breathing)
-00299          {
-00300             if (rough)
-00301             {
-00302                charFont = (unsigned char)gROUGH_ETA;
-00303             }
-00304             else
-00305                charFont = (unsigned char)gNON_ROUGH_ETA;
-00306          }
-00307          else
-00308          {
-00309             if (iota)
-00310             {
-00311                charFont = (unsigned char)gIOTA_ETA;
-00312             }
-00313             else
-00314                charFont = (unsigned char)gETA;
-00315          }
-00316 
-00317       break;
-00318 
-00319       case IOTA:             // I
-00320          if (breathing)
-00321          {
-00322             if (rough)
-00323             {
-00324                charFont = (unsigned char)gROUGH_IOTA;
-00325             }
-00326             else
-00327                charFont = (unsigned char)gNON_ROUGH_IOTA;
-00328          }
-00329          else
-00330          {
-00331             charFont = (unsigned char)gIOTA;
-00332          }
-00333 
-00334       break;
-00335 
-00336       case KAPPA:            // K
-00337          charFont = (unsigned char)gKAPPA;
-00338 
-00339       break;
-00340 
-00341       case LAMBDA:           // L
-00342          charFont = (unsigned char)gLAMBDA;
-00343 
-00344       break;
-00345 
-00346       case MU:               // M
-00347          charFont = (unsigned char)gMU;
-00348 
-00349       break;
-00350 
-00351       case NU:               // N
-00352          charFont = (unsigned char)gNU;
-00353 
-00354       break;
-00355 
-00356       case OMICRON:          // O
-00357          if (breathing)
-00358          {
-00359             if (rough)
-00360             {
-00361                charFont = (unsigned char)gROUGH_OMICRON;
-00362             }
-00363             else
-00364                charFont = (unsigned char)gNON_ROUGH_OMICRON;
-00365          }
-00366          else
-00367          {
-00368             charFont = (unsigned char)gOMICRON;
-00369          }
-00370 
-00371       break;
-00372 
-00373       case PI:               // P
-00374          charFont = (unsigned char)gPI;
-00375 
-00376       break;
-00377 
-00378       case THETA:            // Q
-00379          charFont = (unsigned char)gTHETA;
-00380 
-00381       break;
-00382 
-00383       case RHO:              // R
-00384          if (breathing)
-00385          {
-00386             if (rough)
-00387             {
-00388                charFont = (unsigned char)gROUGH_RHO;
-00389             }
-00390             else
-00391                charFont = (unsigned char)gNON_ROUGH_RHO;
-00392          }
-00393          else
-00394          {
-00395             charFont = (unsigned char)gRHO;
-00396          }
-00397 
-00398       break;
-00399 
-00400       case SIGMA:            // S
-00401          if (finalSigma)
-00402             charFont = (unsigned char)gSIGMA_END;
-00403          else
-00404             charFont = (unsigned char)gSIGMA;
-00405 
-00406       break;
-00407 
-00408       case TAU:              // T
-00409          charFont = (unsigned char)gTAU;
-00410 
-00411       break;
-00412 
-00413       case UPSILON:          // U
-00414          if (breathing)
-00415          {
-00416             if (rough)
-00417             {
-00418                charFont = (unsigned char)gROUGH_UPSILON;
-00419             }
-00420             else
-00421                charFont = (unsigned char)gNON_ROUGH_UPSILON;
-00422          }
-00423          else
-00424          {
-00425             charFont = (unsigned char)gUPSILON;
-00426          }
-00427 
-00428       break;
-00429 
-00430       case OMEGA:            // W
-00431          if (breathing)
-00432          {
-00433             if (rough)
-00434             {
-00435                charFont = (unsigned char)gROUGH_OMEGA;
-00436             }
-00437             else
-00438                charFont = (unsigned char)gNON_ROUGH_OMEGA;
-00439          }
-00440          else
-00441          {
-00442             if (iota)
-00443             {
-00444                charFont = (unsigned char)gIOTA_OMEGA;
-00445             }
-00446             else
-00447                charFont = (unsigned char)gOMEGA;
-00448          }
-00449 
-00450       break;
-00451 
-00452       case XI:               // X
-00453          charFont = (unsigned char)gXI;
-00454 
-00455       break;
-00456 
-00457       case PSI:              // Y
-00458          charFont = (unsigned char)gPSI;
-00459 
-00460       break;
-00461 
-00462       case ZETA:             // Z
-00463          charFont = (unsigned char)gZETA;
-00464 
-00465       break;
-00466 
-00467       default:
-00468          if (ispunct(letter) || isspace(letter))
-00469          {
-00470             charFont = getGreekPunct(letter);
-00471          }
-00472 
-00473          if (isdigit(letter))
-00474             charFont = letter;
-00475 
-00476       break;
-00477    }
-00478 
-00479    return charFont;
-00480 }
-00481 
-00482 
-00483 //*****************************************************************************
-00484 // Convert a GREEK font character to a character
-00485 //*****************************************************************************
-00486 unsigned char Font2char(
-00487                unsigned char letter,       // bGreek letter to convert to Font letter
-00488                bool &iota,        // true = IOTA subscript; false = No IOTA
-00489                bool &breathing,   // true = add breathing; false = no breathing
-00490                bool &rough)       // true = rough breathing; false = smooth
-00491 {
-00492    unsigned char character = 0;
-00493 
-00494    if (getSpecialChar(letter, letter))
-00495    {
-00496       switch (letter)
-00497       {
-00498          case gROUGH_ALPHA:         // hA
-00499          case gIOTA_ALPHA:          // Ai
-00500          case gNON_ROUGH_ALPHA:     // hA
-00501             character = ALPHA;
-00502 
-00503             if (letter == gIOTA_ALPHA)
-00504                iota = true;
-00505             else
-00506                iota = false;
-00507 
-00508             if (letter == gROUGH_ALPHA)
-00509             {
-00510                breathing = true;
-00511                rough = true;
-00512             }
-00513             else
-00514             {
-00515                breathing = false;
-00516                rough = false;
-00517             }
-00518 
-00519             break;
-00520 
-00521          case gROUGH_EPSILON:       // hE
-00522          case gNON_ROUGH_EPSILON:   // hE
-00523             character = EPSILON;
-00524             iota = false;
-00525 
-00526             if (letter == gROUGH_EPSILON)
-00527             {
-00528                breathing = true;
-00529                rough = true;
-00530             }
-00531             else
-00532             {
-00533                breathing = false;
-00534                rough = false;
-00535             }
-00536 
-00537             break;
-00538 
-00539          case gROUGH_ETA:           // hH
-00540          case gIOTA_ETA:            // Ei
-00541          case gNON_ROUGH_ETA:       // hH
-00542             character = ETA;
-00543 
-00544             if (letter == gIOTA_ETA)
-00545                iota = true;
-00546             else
-00547                iota = false;
-00548 
-00549             if (letter == gROUGH_ETA)
-00550             {
-00551                breathing = true;
-00552                rough = true;
-00553             }
-00554             else
-00555             {
-00556                breathing = false;
-00557                rough = false;
-00558             }
-00559 
-00560             break;
-00561 
-00562          case gROUGH_IOTA:          // hH
-00563          case gNON_ROUGH_IOTA:      // hH
-00564             character = IOTA;
-00565             iota = false;
-00566 
-00567             if (letter == gROUGH_IOTA)
-00568             {
-00569                breathing = true;
-00570                rough = true;
-00571             }
-00572             else
-00573             {
-00574                breathing = false;
-00575                rough = false;
-00576             }
-00577 
-00578             break;
-00579 
-00580          case gROUGH_OMICRON:       // hH
-00581          case gNON_ROUGH_OMICRON:   // hH
-00582             character = OMICRON;
-00583             iota = false;
-00584 
-00585             if (letter == gROUGH_OMICRON)
-00586             {
-00587                breathing = true;
-00588                rough = true;
-00589             }
-00590             else
-00591             {
-00592                breathing = false;
-00593                rough = false;
-00594             }
-00595 
-00596             break;
-00597 
-00598          case gROUGH_RHO:           // hR
-00599          case gNON_ROUGH_RHO:       // hR
-00600             character = RHO;
-00601             iota = false;
-00602 
-00603             if (letter == gROUGH_RHO)
-00604             {
-00605                breathing = true;
-00606                rough = true;
-00607             }
-00608             else
-00609             {
-00610                breathing = false;
-00611                rough = false;
-00612             }
-00613 
-00614             break;
-00615 
-00616          case gROUGH_UPSILON:       // hU
-00617          case gNON_ROUGH_UPSILON:   // hU
-00618             character = UPSILON;
-00619             iota = false;
-00620 
-00621             if (letter == gROUGH_UPSILON)
-00622             {
-00623                breathing = true;
-00624                rough = true;
-00625             }
-00626             else
-00627             {
-00628                breathing = false;
-00629                rough = false;
-00630             }
-00631 
-00632             break;
-00633 
-00634          case gROUGH_OMEGA:         // hW
-00635          case gIOTA_OMEGA:          // Wi
-00636          case gNON_ROUGH_OMEGA:     // hW
-00637             character = OMEGA;
-00638 
-00639             if (letter == gIOTA_OMEGA)
-00640                iota = true;
-00641             else
-00642                iota = false;
-00643 
-00644             if (letter == gROUGH_OMEGA)
-00645             {
-00646                breathing = true;
-00647                rough = true;
-00648             }
-00649             else
-00650             {
-00651                breathing = false;
-00652                rough = false;
-00653             }
-00654 
-00655             break;
-00656       }
-00657    }  // if (letter > SPECIAL_GREEK)
-00658    else
-00659    {
-00660       if (letter == gSIGMA_END)
-00661       {
-00662          character = SIGMA;
-00663       }
-00664       else if (ispunct(letter) || isspace(letter))
-00665       {
-00666          character = getbGreekPunct(letter);
-00667       }
-00668       else if (isdigit(letter))
-00669       {
-00670          character = letter;
-00671       }
-00672       else
-00673       {
-00674          character = letter - 32;
-00675       }
-00676    }
-00677 
-00678    return character;
-00679 }
-00680 
-00681 //*****************************************************************************
-00682 // Identify and return a bGreek letter from a special font char
-00683 //*****************************************************************************
-00684 bool getSpecialChar(unsigned char Font, unsigned char &letter)
-00685 {
-00686    bool Yes = false;
-00687    letter = Font;
-00688 
-00689    if (Font >= 133 && Font <= 144)
-00690    {
-00691       letter = gIOTA;
-00692       Font = gIOTA;
-00693    }
-00694 
-00695    if (Font >= 154 && Font <= 159)
-00696    {
-00697       letter = gEPSILON;
-00698       Font = gEPSILON;
-00699    }
-00700 
-00701    if (Font >= 163 && Font <= 171)
-00702    {
-00703       letter = gALPHA;
-00704       Font = gALPHA;
-00705    }
-00706 
-00707    if (Font >= 172 && Font <= 182)
-00708    {
-00709       letter = gIOTA_ALPHA;
-00710       Font = gIOTA_ALPHA;
-00711       Yes = true;
-00712    }
-00713 
-00714    if (Font >= 187 && Font <= 195)
-00715    {
-00716       letter = gETA;
-00717       Font = gETA;
-00718    }
-00719  
-00720    if (Font >= 197 && Font <= 207)
-00721    {
-00722       letter = gIOTA_ETA;
-00723       Font = gIOTA_ETA;
-00724       Yes = true;
-00725    }
-00726 
-00727    if ((Font >= 210 && Font <= 215) || Font == 253)
-00728    {
-00729       letter = gOMICRON;
-00730       Font = gOMICRON;
-00731    }
-00732 
-00733    if (Font >= 218 && Font <= 229)
-00734    {
-00735       letter = gUPSILON;
-00736       Font = gUPSILON;
-00737    }
-00738 
-00739    if (Font >= 232 && Font <= 240)
-00740    {
-00741       letter = gOMEGA;
-00742       Font = gOMEGA;
-00743    }
-00744 
-00745    if (Font >= 241 && Font <= 251)
-00746    {
-00747       letter = gIOTA_OMEGA;
-00748       Font = gIOTA_OMEGA;
-00749       Yes = true;
-00750    }
-00751 
-00752    Yes = SpecialGreek(Font);
-00753 
-00754    return Yes;
-00755 }
-00756 
-00757 
-00758 //*****************************************************************************
-00759 // true if the font character is a special character; false it isn't
-00760 //*****************************************************************************
-00761 
-00762 bool SpecialGreek(unsigned char Font)
-00763 {
-00764    bool res = false;
-00765 
-00766    switch (Font)
-00767    {
-00768       case gROUGH_ALPHA:
-00769       case gROUGH_EPSILON:
-00770       case gROUGH_ETA:
-00771       case gROUGH_IOTA:
-00772       case gROUGH_OMICRON:
-00773       case gROUGH_RHO:
-00774       case gROUGH_UPSILON:
-00775       case gROUGH_OMEGA:
-00776       case gIOTA_ALPHA:
-00777       case gIOTA_ETA:
-00778       case gIOTA_OMEGA:
-00779       case gNON_ROUGH_ALPHA:
-00780       case gNON_ROUGH_EPSILON:
-00781       case gNON_ROUGH_ETA:
-00782       case gNON_ROUGH_IOTA:
-00783       case gNON_ROUGH_OMICRON:
-00784       case gNON_ROUGH_RHO:
-00785       case gNON_ROUGH_UPSILON:
-00786       case gNON_ROUGH_OMEGA:
-00787          res = true;
-00788 
-00789          break;
-00790    }
-00791 
-00792    return res;
-00793 }
-00794 
-00795 
-00796 //*****************************************************************************
-00797 // Return Greek font puntuation from bGreek punstuation
-00798 //*****************************************************************************
-00799 
-00800 unsigned char getGreekPunct(unsigned char bGreek)
-00801 {
-00802    unsigned char Font;
-00803 
-00804    switch (bGreek)
-00805    {
-00806       case COMMA:
-00807          Font = gCOMMA;
-00808       break;
-00809 
-00810       case STOP:
-00811          Font = gSTOP;
-00812       break;
-00813 
-00814       case SEMI_COLON:
-00815          Font = gSEMI_COLON;
-00816       break;
-00817 
-00818       case QUESTION:
-00819          Font = gQUESTION;
-00820       break;
-00821 
-00822       default:
-00823          Font = ' ';
-00824       break;
-00825    }
-00826 
-00827    return Font;
-00828 }
-00829 
-00830 
-00831 //*****************************************************************************
-00832 // Return bGreek puntuation from Greek font punstuation
-00833 //*****************************************************************************
-00834 
-00835 unsigned char getbGreekPunct(unsigned char Greek)
-00836 {
-00837    unsigned char character;
-00838 
-00839    switch (Greek)
-00840    {
-00841       case gCOMMA:
-00842          character = COMMA;
-00843       break;
-00844 
-00845       case gSTOP:
-00846          character = STOP;
-00847       break;
-00848 
-00849       case gSEMI_COLON:
-00850          character = SEMI_COLON;
-00851       break;
-00852 
-00853       case gQUESTION:
-00854          character = QUESTION;
-00855       break;
-00856 
-00857       default:
-00858          character = ' ';
-00859       break;   
-00860    }
-00861 
-00862    return character;
-00863 }
-00864 
-00865 
-00866 //*****************************************************************************
-00867 // Is the character punctuation or a space: true it is, false it isn't
-00868 //*****************************************************************************
-00869 
-00870 bool isPunctSpace(unsigned char c)
-00871 {
-00872    return (ispunct(c) || isspace(c) || c == 0) ? true : false;
-00873 }
-00874 
-00875 #ifdef __TEST
-00876 
-00877 int main()
-00878 {
-00879    unsigned char *sGreekText = (unsigned char *)
-00880       "1„£kwboj qeoà kaˆ kur…ou „hsoà cristoà doàloj ta‹j dèdeka fula‹j ta‹j ™n tÍ diaspor´ ca…rein.";
-00881    unsigned char *sResult = new unsigned char[100];
-00882 
-00883    char result = Greek2bGreek(
-00884                   sResult, 
-00885                   sGreekText, 
-00886                   100);
-00887 
-00888    strset((char *)sResult, 0);
-00889    strset((char *)sGreekText, 0);
-00890 
-00891    sGreekText = (unsigned char *)"18 EIS AFESIN TWN hAMARTWN hUMWN?";
-00892    result = bGreek2Greek(
-00893                   sResult, 
-00894                   sGreekText, 
-00895                   33);
-00896 
-00897    //delete[] sGreekText;
-00898    delete[] sResult;
-00899 }
-00900 
-00901 #endif // __TEST
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/_greek2_greek_8h-source.html b/doc/api-documentation/html/_greek2_greek_8h-source.html deleted file mode 100644 index 2284aa1..0000000 --- a/doc/api-documentation/html/_greek2_greek_8h-source.html +++ /dev/null @@ -1,128 +0,0 @@ - - -Greek2Greek.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

Greek2Greek.h

00001 //*****************************************************************************
-00002 // Author      : William Dicks                                              ***
-00003 // Date Created: 10 February 1998                                           ***
-00004 // Purpose     : Interface for Greek to b-Greek conversion and vice versa   ***
-00005 // File Name   : Greek2Greek.h                                              ***
-00006 //                                                                          ***
-00007 // Author info : ---------------------------------------------------------- ***
-00008 //     Address : 23 Tieroogpark                                             ***
-00009 //             : Hoewe Str                                                  ***
-00010 //             : Elarduspark X3                                             ***
-00011 //             : 0181                                                       ***
-00012 //             : South Africa                                               ***
-00013 //     Home Tel: +27 (0)12 345 3166                                         ***
-00014 //     Cell No : +27 (0)82 577 4424                                         ***
-00015 //     e-mail  : wd@isis.co.za                                              ***
-00016 // Church WWW  : http://www.hatfield.co.za                                  ***
-00017 //*****************************************************************************
-00018 /*
-00019  *
-00020  * $Id: _greek2_greek_8h-source.html,v 1.7 2002/06/20 20:23:07 mgruner Exp $
-00021  *
-00022  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00023  *      CrossWire Bible Society
-00024  *      P. O. Box 2528
-00025  *      Tempe, AZ  85280-2528
-00026  *
-00027  * This program is free software; you can redistribute it and/or modify it
-00028  * under the terms of the GNU General Public License as published by the
-00029  * Free Software Foundation version 2.
-00030  *
-00031  * This program is distributed in the hope that it will be useful, but
-00032  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00033  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00034  * General Public License for more details.
-00035  *
-00036  */
-00037 
-00038 #ifndef __GREEK2GREEK
-00039 #define __GREEK2GREEK
-00040 
-00041 //*****************************************************************************
-00042 // Used to convert a string created by using the Greek font supplied with the
-00043 // Sword Project to a string that conforms to the b-Greek discussion list 
-00044 // method of transliteration.
-00045 //*****************************************************************************
-00046 unsigned char Greek2bGreek (unsigned char *sResult, unsigned char *sGreekText,
-00047                             int nMaxResultBuflen);
-00048 
-00049 //*****************************************************************************
-00050 // Used to convert a string created by using the b-Greek method of 
-00051 // transliteration to a string that can be converted to a Greek-font readable 
-00052 // string.
-00053 //*****************************************************************************
-00054 unsigned char bGreek2Greek (unsigned char *sResult,
-00055                             unsigned char *sGreekText, int nMaxResultBuflen);
-00056 
-00057 //*****************************************************************************
-00058 // Parse a Greek font created string and return the b-Greek equivalent
-00059 //*****************************************************************************
-00060 int ParseGreek (unsigned char *sResult,
-00061                 unsigned char *sGreekText, int nMaxResultBuflen);
-00062 
-00063 //*****************************************************************************
-00064 // Parse a b-Greek string and return the Greek font equivalent
-00065 //*****************************************************************************
-00066 int ParsebGreek (unsigned char *sResult,
-00067                  unsigned char *sGreekText, int nMaxResultBuflen);
-00068 
-00069 //*****************************************************************************
-00070 // Convert a unsigned character to a GREEK font unsigned character
-00071 //*****************************************************************************
-00072 unsigned char char2Font (unsigned char letter,  // bGreek letter to convert to Font letter
-00073                          bool finalSigma,       // Is it a final SIGMA
-00074                          bool iota,     // TRUE = IOTA subscript; FALSE = No IOTA
-00075                          bool breathing,        // TRUE = add breathing; FALSE = no breathing
-00076                          bool rough);   // TRUE = rough breathing; False = smooth
-00077 
-00078 //*****************************************************************************
-00079 // Convert a GREEK font unsigned character to a unsigned character
-00080 //*****************************************************************************
-00081 unsigned char Font2char (unsigned char letter,  // bGreek letter to convert to Font letter
-00082                          bool & iota,   // TRUE = IOTA subscript; FALSE = No IOTA
-00083                          bool & breathing,      // TRUE = add breathing; FALSE = no breathing
-00084                          bool & rough); // TRUE = rough breathing; False = smooth
-00085 
-00086 
-00087 //*****************************************************************************
-00088 // Identify and return a bGreek letter from a special font char
-00089 //*****************************************************************************
-00090 bool getSpecialChar (unsigned char Font, unsigned char &letter);
-00091 
-00092 //*****************************************************************************
-00093 // true if the font character is a special character; false it isn't
-00094 //*****************************************************************************
-00095 bool SpecialGreek (unsigned char Font);
-00096 
-00097 //*****************************************************************************
-00098 // Return Greek font puntuation from bGreek punstuation
-00099 //*****************************************************************************
-00100 unsigned char getGreekPunct (unsigned char bGreek);
-00101 
-00102 //*****************************************************************************
-00103 // Return bGreek puntuation from Greek font punstuation
-00104 //*****************************************************************************
-00105 unsigned char getbGreekPunct (unsigned char Greek);
-00106 
-00107 //*****************************************************************************
-00108 // Is the character punctuation or a space: true it is, false it isn't
-00109 //*****************************************************************************
-00110 bool isPunctSpace (unsigned char c);
-00111 
-00112 
-00113 
-00114 #endif // __GREEK2GREEK
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/_greek_chars_8h-source.html b/doc/api-documentation/html/_greek_chars_8h-source.html deleted file mode 100644 index 8bf35f7..0000000 --- a/doc/api-documentation/html/_greek_chars_8h-source.html +++ /dev/null @@ -1,163 +0,0 @@ - - -GreekChars.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

GreekChars.h

00001 //*****************************************************************************
-00002 // Author      : William Dicks                                              ***
-00003 // Date Created: 10 February 1998                                           ***
-00004 // Purpose     : Enumeration for Greek to b-Greek conversion and vice       ***
-00005 //             : versa.                                                     ***
-00006 // File Name   : GreekChars.h                                               ***
-00007 //                                                                          ***
-00008 // Author info : ---------------------------------------------------------- ***
-00009 //     Address : 23 Tieroogpark                                             ***
-00010 //             : Hoewe Str                                                  ***
-00011 //             : Elarduspark X3                                             ***
-00012 //             : 0181                                                       ***
-00013 //             : South Africa                                               ***
-00014 //     Home Tel: +27 (0)12 345 3166                                         ***
-00015 //     Cell No : +27 (0)82 577 4424                                         ***
-00016 //     e-mail  : wd@isis.co.za                                              ***
-00017 // Church WWW  : http://www.hatfield.co.za                                  ***
-00018 //*****************************************************************************
-00019 /*
-00020  *
-00021  * $Id: _greek_chars_8h-source.html,v 1.7 2002/06/20 20:23:07 mgruner Exp $
-00022  *
-00023  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00024  *      CrossWire Bible Society
-00025  *      P. O. Box 2528
-00026  *      Tempe, AZ  85280-2528
-00027  *
-00028  * This program is free software; you can redistribute it and/or modify it
-00029  * under the terms of the GNU General Public License as published by the
-00030  * Free Software Foundation version 2.
-00031  *
-00032  * This program is distributed in the hope that it will be useful, but
-00033  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00034  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00035  * General Public License for more details.
-00036  *
-00037  */
-00038 
-00039 #ifndef __GREEKCHARS_H
-00040 #define __GREEKCHARS_H
-00041 
-00042 // This enum represents the values of the characters used for the 
-00043 // transliteration as used on the b-greek discussion list.
-00044 
-00045 enum bGreekChars
-00046 {
-00047   ALPHA = 65,                   // A
-00048   BETA,                         // B
-00049   CHI,                          // C
-00050   DELTA,                        // D
-00051   EPSILON,                      // E
-00052   PHI,                          // F
-00053   GAMMA,                        // G
-00054   ETA,                          // H
-00055   IOTA,                         // I
-00056   // No J
-00057   KAPPA = 75,                   // K
-00058   LAMBDA,                       // L
-00059   MU,                           // M
-00060   NU,                           // N
-00061   OMICRON,                      // O
-00062   PI,                           // P
-00063   THETA,                        // Q
-00064   RHO,                          // R
-00065   SIGMA,                        // S
-00066   TAU,                          // T
-00067   UPSILON,                      // U
-00068   // No V
-00069   OMEGA = 'W',                  // W
-00070   XI,                           // X
-00071   PSI,                          // Y
-00072   ZETA,                         // Z
-00073   ROUGH = 104,                  // h
-00074   IOTA_SUB                      // i
-00075 };
-00076 
-00077 // This enum represents the values of the characters ib the Greek.ttf font,
-00078 // and the comments on the right are the corresponding bGreek equivalents.
-00079 
-00080 enum GreekFontChars
-00081 {
-00082   gALPHA = 'a',                 // A
-00083   gBETA,                        // B
-00084   gCHI,                         // C
-00085   gDELTA,                       // D
-00086   gEPSILON,                     // E
-00087   gPHI,                         // F
-00088   gGAMMA,                       // G
-00089   gETA,                         // H
-00090   gIOTA,                        // I
-00091   gSIGMA_END,                   // j
-00092   gKAPPA,                       // K
-00093   gLAMBDA,                      // L
-00094   gMU,                          // M
-00095   gNU,                          // N
-00096   gOMICRON,                     // O
-00097   gPI,                          // P
-00098   gTHETA,                       // Q
-00099   gRHO,                         // R
-00100   gSIGMA,                       // S
-00101   gTAU,                         // T
-00102   gUPSILON,                     // U
-00103   // No V
-00104   gOMEGA = 'w',                 // W
-00105   gXI,                          // X
-00106   gPSI,                         // Y
-00107   gZETA,                        // Z
-00108   gROUGH_ALPHA = 161,           // hA
-00109   gROUGH_EPSILON = 152,         // hE
-00110   gROUGH_ETA = 185,             // hH
-00111   gROUGH_IOTA = 131,            // hH
-00112   gROUGH_OMICRON = 208,         // hH
-00113   gROUGH_RHO = 183,             // hR
-00114   gROUGH_UPSILON = 216,         // hU
-00115   gROUGH_OMEGA = 230,           // hW
-00116   gIOTA_ALPHA = 'v',            // Ai
-00117   gIOTA_ETA = 'V',              // Ei
-00118   gIOTA_OMEGA = 'J',            // Wi
-00119   gNON_ROUGH_ALPHA = 162,       // hA
-00120   gNON_ROUGH_EPSILON = 153,     // hE
-00121   gNON_ROUGH_ETA = 186,         // hH
-00122   gNON_ROUGH_IOTA = 132,        // hH
-00123   gNON_ROUGH_OMICRON = 209,     // hH
-00124   gNON_ROUGH_RHO = 184,         // hR
-00125   gNON_ROUGH_UPSILON = 217,     // hU
-00126   gNON_ROUGH_OMEGA = 231        // hW
-00127 };
-00128 
-00129 // English puntuation as used on bGreek
-00130 
-00131 enum bGreekPunct
-00132 {
-00133   COMMA = ',',
-00134   STOP = '.',
-00135   SEMI_COLON = ';',
-00136   QUESTION = '?'
-00137 };
-00138 
-00139 // English puntuation as used in the Greek font
-00140 
-00141 enum GreekPunct
-00142 {
-00143   gCOMMA = ',',
-00144   gSTOP = '.',
-00145   gSEMI_COLON = ':',
-00146   gQUESTION = ';'
-00147 };
-00148 
-00149 #endif // __GREEKCHARS_H
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/annotated.html b/doc/api-documentation/html/annotated.html deleted file mode 100644 index 9616ef2..0000000 --- a/doc/api-documentation/html/annotated.html +++ /dev/null @@ -1,79 +0,0 @@ - - -Annotated Index - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

The Sword Project Compound List

Here are the classes, structs, unions and interfaces with brief descriptions: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
EncodingFilterMgrThis class is like a normal SWMgr, but you can additonally specify which encoding you want to use
GBFFootnotesThis Filter shows/hides footnotes in a GBF text
GBFHeadingsThis Filter shows/hides headings in a GBF text
GBFHTMLThis filter converts GBF Text into HTML
GBFHTMLHREFThis filter converts GBF text to HTML text with hrefs
GBFMorphThis Filter shows/hides morph tags in a GBF text
GBFOSISThis filter converts GBF text to HTML text with hrefs
GBFPlainThis filter converts GBF text into plain text
GBFRTFThis filter converts GBF text into RTF text
GBFStrongsThis Filter shows/hides strong's numbers in a GBF text
GBFThMLThis filter converts GBF text into ThML text
GreekLexAttribsThis filter converts ThML text to plain text
Latin1UTF16This filter converts Latin-1 encoded text to UTF-8
Latin1UTF8This filter converts Latin-1 encoded text to UTF-8
ListKeyListKey is the basis for all types of keys that have lists of specified indexes (e.g
LocaleMgrHandles all the different locales of Sword
MarkupFilterMgrThis class is like a normal SWEncodingMgr, but you can additonally specify which markup you want to use
PLAINFootnotesShows or hides footnotes in plain text
PLAINHTMLThis filter converts plain text to HTML text
RTFHTMLThis filter converts RTF text into HTML text
RWPHTMLThis filter converts RWP text to HTML text
RWPRTFThis filter converts RWP text to RTF text
SCSUUTF8This filter converts SCSU compressed (encoded) text to UTF-8
StrKeyA standard string key class (used for modules that index on single strings (eg
SWBasicFilterA filter providing commonly used functionality
SWClassClass used for SWDYNAMIC_CAST to save the inheritance order
SWComThe basis for all commentary modules
SWConfigThe class to read and save settings using a file on disk
SWDisplaySwdisp is the basis for all types of displays (e.g
SWGenBookThe basis for all types of Lexicon and Dictionary modules (hence the 'LD')
SWInputMethodTitle: Description: Copyright: Copyright (c) 2001 CrossWire Bible Society under the terms of the GNU GPL Company:
SWKeySWKey is the basis for all types of keys for indexing into modules (e.g
SWLDThe basis for all types of Lexicon and Dictionary modules (hence the 'LD')
SWLocaleSWLocale is used for the localisation of the booknames The SWLocale is a class which holds the information of one language
SWMgrSWMgr is the main class of the Sword library
SWModuleThe class SWModule is the base class for all modules used in Sword
SWObjectBase class for major Sword classes
SWTextThe basis for all text modules
ThMLFootnotesThis Filter shows/hides footnotes in a ThML text
ThMLGBFThis filter converts ThML text to GBF text
ThMLHeadingsThis Filter shows/hides headings in a ThML text
ThMLHTMLThis filter converts ThML text to HTML text
ThMLHTMLHREFThis filter converts ThML text to HTML text with hrefs
ThMLLemmaThis Filter shows/hides lemmas in a ThML text
ThMLMorphThis Filter shows/hides morph tags in a ThML text
ThMLOLBThis filter converts ThML text to OLB text
ThMLOSISThis filter converts ThML text to HTML text with hrefs
ThMLPlainThis filter converts ThML text to plain text
ThMLRTFThis filter converts ThML text to RTF text
ThMLScriprefThis Filter shows/hides scripture references in a ThML text
ThMLStrongsThis Filter shows/hides strong's numbers in a ThML text
ThMLVariantsThis Filter shows/hides textual variants
TreeKeyClass VerseKey The SWKey implementation used for verse based modules like Bibles or commentaries
TreeKeyIdxClass VerseKey The SWKey implementation used for verse based modules like Bibles or commentaries
UnicodeRTFThis filter converts UTF-8 text into RTF Unicode tags
UTF16UTF8This filter converts UTF-16 encoded text to UTF-8
UTF8CantillationThis Filter shows/hides Hebrew cantillation marks in UTF8 text
UTF8GreekAccentsThis Filter shows/hides Greek Accents marks in UTF8 text
UTF8HebrewPointsThis Filter shows/hides Hebrew vowel points in UTF8 text
UTF8HTMLThis filter converts UTF-8 text into HTML escape sequences
UTF8Latin1This filter converts UTF-8 encoded text to Latin-1
UTF8UTF16This filter converts UTF-8 encoded text to UTF-16
VerseKeyClass VerseKey The SWKey implementation used for verse based modules like Bibles or commentaries
-
Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/cipherfil_8cpp-source.html b/doc/api-documentation/html/cipherfil_8cpp-source.html deleted file mode 100644 index a487514..0000000 --- a/doc/api-documentation/html/cipherfil_8cpp-source.html +++ /dev/null @@ -1,52 +0,0 @@ - - -cipherfil.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

cipherfil.cpp

00001 /******************************************************************************
-00002  *
-00003  * cipherfil -  SWFilter decendant to decipher a module
-00004  */
-00005 
-00006 
-00007 #include <stdlib.h>
-00008 #include <string.h>
-00009 #include <cipherfil.h>
-00010 
-00011 
-00012 CipherFilter::CipherFilter(const char *key) {
-00013         cipher = new SWCipher((unsigned char *)key);
-00014 }
-00015 
-00016 
-00017 CipherFilter::~CipherFilter() {
-00018         delete cipher;
-00019 }
-00020 
-00021 
-00022 SWCipher *CipherFilter::getCipher() {
-00023         return cipher;
-00024 }
-00025 
-00026 
-00027 char CipherFilter::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module) {
-00028         unsigned int len;
-00029 //      len = strlen(text);
-00030         len = maxlen;
-00031      if (len > 0) {
-00032                 cipher->cipherBuf(&len, text);
-00033                 strncpy(text, cipher->Buf(), (len < (unsigned int)maxlen) ? len : maxlen);
-00034      }
-00035         text[maxlen] = 0;
-00036         text[maxlen+1] = 0;
-00037         return 0;
-00038 }
-

Generated on Thu Jun 20 22:12:58 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/cipherfil_8h-source.html b/doc/api-documentation/html/cipherfil_8h-source.html deleted file mode 100644 index ecaf1d3..0000000 --- a/doc/api-documentation/html/cipherfil_8h-source.html +++ /dev/null @@ -1,53 +0,0 @@ - - -cipherfil.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

cipherfil.h

00001 /*
-00002  *
-00003  * $Id: cipherfil_8h-source.html,v 1.7 2002/06/20 20:23:07 mgruner Exp $
-00004  *
-00005  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00006  *      CrossWire Bible Society
-00007  *      P. O. Box 2528
-00008  *      Tempe, AZ  85280-2528
-00009  *
-00010  * This program is free software; you can redistribute it and/or modify it
-00011  * under the terms of the GNU General Public License as published by the
-00012  * Free Software Foundation version 2.
-00013  *
-00014  * This program is distributed in the hope that it will be useful, but
-00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00017  * General Public License for more details.
-00018  *
-00019  */
-00020 
-00021 #ifndef CIPHERFIL_H
-00022 #define CIPHERFIL_H
-00023 
-00024 #include <swfilter.h>
-00025 #include <swcipher.h>
-00026 
-00027 #include <defs.h>
-00028 
-00029 class SWDLLEXPORT CipherFilter:public SWFilter
-00030 {
-00031   SWCipher *cipher;
-00032 public:
-00033     CipherFilter (const char *key);
-00034     virtual ~ CipherFilter ();
-00035   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00036   virtual SWCipher *getCipher ();
-00037 };
-00038 
-00039 #endif
-

Generated on Thu Jun 20 22:12:58 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_encoding_filter_mgr-members.html b/doc/api-documentation/html/class_encoding_filter_mgr-members.html deleted file mode 100644 index 2c709a0..0000000 --- a/doc/api-documentation/html/class_encoding_filter_mgr-members.html +++ /dev/null @@ -1,32 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

EncodingFilterMgr Member List

This is the complete list of members for EncodingFilterMgr, including all inherited members. - - - - - - - - - - - - - - - - - -
AddEncodingFilters(SWModule *module, ConfigEntMap &section)EncodingFilterMgr [virtual]
AddGlobalOptions(SWModule *module, ConfigEntMap &section, ConfigEntMap::iterator start, ConfigEntMap::iterator end) (defined in SWFilterMgr)SWFilterMgr [virtual]
AddLocalOptions(SWModule *module, ConfigEntMap &section, ConfigEntMap::iterator start, ConfigEntMap::iterator end) (defined in SWFilterMgr)SWFilterMgr [virtual]
AddRawFilters(SWModule *module, ConfigEntMap &section)EncodingFilterMgr [virtual]
AddRenderFilters(SWModule *module, ConfigEntMap &section) (defined in SWFilterMgr)SWFilterMgr [virtual]
AddStripFilters(SWModule *module, ConfigEntMap &section) (defined in SWFilterMgr)SWFilterMgr [virtual]
encoding (defined in EncodingFilterMgr)EncodingFilterMgr [protected]
Encoding(char enc)EncodingFilterMgr
EncodingFilterMgr(char encoding=ENC_UTF8)EncodingFilterMgr
getParentMgr() (defined in SWFilterMgr)SWFilterMgr [virtual]
latin1utf8 (defined in EncodingFilterMgr)EncodingFilterMgr [protected]
scsuutf8 (defined in EncodingFilterMgr)EncodingFilterMgr [protected]
setParentMgr(SWMgr *parentMgr) (defined in SWFilterMgr)SWFilterMgr [virtual]
SWFilterMgr() (defined in SWFilterMgr)SWFilterMgr
targetenc (defined in EncodingFilterMgr)EncodingFilterMgr [protected]
~EncodingFilterMgr()EncodingFilterMgr
~SWFilterMgr() (defined in SWFilterMgr)SWFilterMgr [virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_encoding_filter_mgr.html b/doc/api-documentation/html/class_encoding_filter_mgr.html deleted file mode 100644 index ff67b7f..0000000 --- a/doc/api-documentation/html/class_encoding_filter_mgr.html +++ /dev/null @@ -1,338 +0,0 @@ - - -EncodingFilterMgr class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

EncodingFilterMgr Class Reference

This class is like a normal SWMgr, but you can additonally specify which encoding you want to use. -More... -

-#include <encfiltmgr.h> -

-Inheritance diagram for EncodingFilterMgr:

Inheritance graph
- - - -
[legend]
List of all members. - - - - - - - - - - - - - - - - -

Public Methods

 EncodingFilterMgr (char encoding=ENC_UTF8)
 Constructor of SWEncodingMgr. More...

~EncodingFilterMgr ()
 The destructor of SWEncodingMgr.

char Encoding (char enc)
 Markup sets/gets the encoding after initialization. More...

virtual void AddRawFilters (SWModule *module, ConfigEntMap &section)
 Adds the raw filters which are defined in "section" to the SWModule object "module". More...

virtual void AddEncodingFilters (SWModule *module, ConfigEntMap &section)
 Adds the encoding filters which are defined in "section" to the SWModule object "module". More...


Protected Attributes

-SWFilter * latin1utf8
-SWFilter * scsuutf8
-SWFilter * targetenc
-char encoding
-

Detailed Description

-This class is like a normal SWMgr, but you can additonally specify which encoding you want to use. -

- -

-Definition at line 33 of file encfiltmgr.h.


Constructor & Destructor Documentation

-

- - - - -
- - - - - - - - - - -
EncodingFilterMgr::EncodingFilterMgr char   encoding = ENC_UTF8
-
- - - - - -
-   - - -

-Constructor of SWEncodingMgr. -

-

-Parameters:
- - - - - -
iconfig  -
isysconfig  -
autoload  -If this bool is true the constructor starts loading the installed modules. If you reimplemented SWMgr you can set autoload=false to load the modules with your own reimplemented function.
encoding  -The desired encoding.
-
-

-Definition at line 41 of file encfiltmgr.cpp. -

-

00042                    : SWFilterMgr() {
-00043 
-00044         scsuutf8 = new SCSUUTF8();
-00045         latin1utf8 = new Latin1UTF8();
-00046 
-00047         encoding = enc;
-00048 
-00049         switch (encoding) {
-00050         case ENC_LATIN1:
-00051                 targetenc = new UTF8Latin1();
-00052                 break;
-00053         case ENC_UTF16:
-00054                 targetenc = new UTF8UTF16();
-00055                 break;
-00056         case ENC_RTF:
-00057                 targetenc = new UnicodeRTF();
-00058                 break;
-00059         case ENC_HTML:
-00060                 targetenc = new UTF8HTML();
-00061                 break;
-00062         default: // i.e. case ENC_UTF8
-00063                 targetenc = NULL;
-00064         }
-00065 }
-
-


Member Function Documentation

-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void EncodingFilterMgr::AddEncodingFilters SWModule  module,
ConfigEntMap &   section
[virtual]
-
- - - - - -
-   - - -

-Adds the encoding filters which are defined in "section" to the SWModule object "module". -

-

-Parameters:
- - - -
module  -To this module the encoding filter(s) are added
section  -We use this section to get a list of filters we should apply to the module
-
-

-Definition at line 92 of file encfiltmgr.cpp. -

-References SWModule::AddEncodingFilter(). -

-

00092                                                                                   {
-00093         if (targetenc)
-00094                 module->AddEncodingFilter(targetenc);
-00095 }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void EncodingFilterMgr::AddRawFilters SWModule  module,
ConfigEntMap &   section
[virtual]
-
- - - - - -
-   - - -

-Adds the raw filters which are defined in "section" to the SWModule object "module". -

-

-Parameters:
- - - -
module  -To this module the raw filter(s) are added
section  -We use this section to get a list of filters we should apply to the module
-
-

-Definition at line 79 of file encfiltmgr.cpp. -

-References SWModule::AddRawFilter(). -

-

00079                                                                              {
-00080 
-00081         ConfigEntMap::iterator entry;
-00082 
-00083         string encoding = ((entry = section.find("Encoding")) != section.end()) ? (*entry).second : (string)"";
-00084         if (encoding.empty() || !stricmp(encoding.c_str(), "Latin-1")) {
-00085                 module->AddRawFilter(latin1utf8);
-00086         }
-00087         else if (!stricmp(encoding.c_str(), "SCSU")) {
-00088                 module->AddRawFilter(scsuutf8);
-00089         }
-00090 }
-
-

- - - - -
- - - - - - - - - - -
char EncodingFilterMgr::Encoding char   enc
-
- - - - - -
-   - - -

-Markup sets/gets the encoding after initialization. -

-

-Parameters:
- - -
m  -The new encoding or ENC_UNKNOWN if you just want to get the current markup.
-
-Returns:
-The current (possibly changed) encoding format.
-

-Definition at line 104 of file encfiltmgr.cpp. -

-

00104                                          {
-00105         if (enc && enc != encoding) {
-00106                 encoding = enc;
-00107                 SWFilter * oldfilter = targetenc;
-00108                 
-00109                 switch (encoding) {
-00110                 case ENC_LATIN1:
-00111                         targetenc = new UTF8Latin1();
-00112                         break;
-00113                 case ENC_UTF16:
-00114                         targetenc = new UTF8UTF16();
-00115                         break;
-00116                 case ENC_RTF:
-00117                         targetenc = new UnicodeRTF();
-00118                         break;
-00119                 case ENC_HTML:
-00120                         targetenc = new UTF8HTML();
-00121                         break;
-00122                 default: // i.e. case ENC_UTF8
-00123                         targetenc = NULL;
-00124                 }
-00125 
-00126                 ModMap::const_iterator module;
-00127 
-00128                 if (oldfilter != targetenc) {
-00129                         if (oldfilter) {
-00130                                 if (!targetenc) {
-00131                                         for (module = getParentMgr()->Modules.begin(); module != getParentMgr()->Modules.end(); module++)
-00132                                                 module->second->RemoveRenderFilter(oldfilter);
-00133                                 }
-00134                                 else {
-00135                                         for (module = getParentMgr()->Modules.begin(); module != getParentMgr()->Modules.end(); module++)
-00136                                                 module->second->ReplaceRenderFilter(oldfilter, targetenc);
-00137                                 }
-00138                                 delete oldfilter;
-00139                         }
-00140                         else if (targetenc) {
-00141                                 for (module = getParentMgr()->Modules.begin(); module != getParentMgr()->Modules.end(); module++)
-00142                                         module->second->AddRenderFilter(targetenc);
-00143                         }
-00144                 }
-00145 
-00146         }
-00147         return encoding;
-00148 }
-
-


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_encoding_filter_mgr__inherit__graph.png b/doc/api-documentation/html/class_encoding_filter_mgr__inherit__graph.png deleted file mode 100644 index e498f15..0000000 Binary files a/doc/api-documentation/html/class_encoding_filter_mgr__inherit__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_g_b_f_footnotes-members.html b/doc/api-documentation/html/class_g_b_f_footnotes-members.html deleted file mode 100644 index dacecbd..0000000 --- a/doc/api-documentation/html/class_g_b_f_footnotes-members.html +++ /dev/null @@ -1,31 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

GBFFootnotes Member List

This is the complete list of members for GBFFootnotes, including all inherited members. - - - - - - - - - - - - - - - - -
GBFFootnotes() (defined in GBFFootnotes)GBFFootnotes
getOptionName() (defined in GBFFootnotes)GBFFootnotes [inline, virtual]
getOptionTip() (defined in GBFFootnotes)GBFFootnotes [inline, virtual]
getOptionValue() (defined in GBFFootnotes)GBFFootnotes [virtual]
getOptionValues() (defined in GBFFootnotes)GBFFootnotes [inline, virtual]
off (defined in GBFFootnotes)GBFFootnotes [private, static]
on (defined in GBFFootnotes)GBFFootnotes [private, static]
option (defined in GBFFootnotes)GBFFootnotes [private]
options (defined in GBFFootnotes)GBFFootnotes [private]
optName (defined in GBFFootnotes)GBFFootnotes [private, static]
optTip (defined in GBFFootnotes)GBFFootnotes [private, static]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in GBFFootnotes)GBFFootnotes [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *ival) (defined in GBFFootnotes)GBFFootnotes [virtual]
~GBFFootnotes() (defined in GBFFootnotes)GBFFootnotes [virtual]
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_g_b_f_footnotes.html b/doc/api-documentation/html/class_g_b_f_footnotes.html deleted file mode 100644 index c42dcbf..0000000 --- a/doc/api-documentation/html/class_g_b_f_footnotes.html +++ /dev/null @@ -1,59 +0,0 @@ - - -GBFFootnotes class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

GBFFootnotes Class Reference

This Filter shows/hides footnotes in a GBF text. -More... -

-#include <gbffootnotes.h> -

-List of all members. - - - - - - - - - - - - - - - - - -

Public Methods

GBFFootnotes ()
-virtual ~GBFFootnotes ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-virtual const char * getOptionName ()
-virtual const char * getOptionTip ()
-virtual void setOptionValue (const char *ival)
-virtual const char * getOptionValue ()
-virtual OptionsList getOptionValues ()

Private Attributes

-bool option
-OptionsList options

Static Private Attributes

-const char on [] = "On"
-const char off [] = "Off"
-const char optName [] = "Footnotes"
-const char optTip [] = "Toggles Footnotes On and Off if they exist"
-


Detailed Description

-This Filter shows/hides footnotes in a GBF text. -

- -

-Definition at line 30 of file gbffootnotes.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_g_b_f_h_t_m_l-members.html b/doc/api-documentation/html/class_g_b_f_h_t_m_l-members.html deleted file mode 100644 index f5e7109..0000000 --- a/doc/api-documentation/html/class_g_b_f_h_t_m_l-members.html +++ /dev/null @@ -1,24 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

GBFHTML Member List

This is the complete list of members for GBFHTML, including all inherited members. - - - - - - - - - -
GBFHTML() (defined in GBFHTML)GBFHTML
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in GBFHTML)GBFHTML [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_g_b_f_h_t_m_l.html b/doc/api-documentation/html/class_g_b_f_h_t_m_l.html deleted file mode 100644 index 9676d97..0000000 --- a/doc/api-documentation/html/class_g_b_f_h_t_m_l.html +++ /dev/null @@ -1,33 +0,0 @@ - - -GBFHTML class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

GBFHTML Class Reference

This filter converts GBF Text into HTML. -More... -

-#include <gbfhtml.h> -

-List of all members. - - - -

Public Methods

GBFHTML ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-


Detailed Description

-This filter converts GBF Text into HTML. -

- -

-Definition at line 31 of file gbfhtml.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_g_b_f_h_t_m_l_h_r_e_f-members.html b/doc/api-documentation/html/class_g_b_f_h_t_m_l_h_r_e_f-members.html deleted file mode 100644 index 7f00011..0000000 --- a/doc/api-documentation/html/class_g_b_f_h_t_m_l_h_r_e_f-members.html +++ /dev/null @@ -1,47 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

GBFHTMLHREF Member List

This is the complete list of members for GBFHTMLHREF, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
addEscapeStringSubstitute(const char *findString, const char *replaceString) (defined in SWBasicFilter)SWBasicFilter [protected]
addTokenSubstitute(const char *findString, const char *replaceString) (defined in SWBasicFilter)SWBasicFilter [protected]
DualStringMap typedef (defined in SWBasicFilter)SWBasicFilter [protected]
escSubMap (defined in SWBasicFilter)SWBasicFilter [protected]
GBFHTMLHREF() (defined in GBFHTMLHREF)GBFHTMLHREF
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
handleEscapeString(char **buf, const char *escString, DualStringMap &userData)SWBasicFilter [protected, virtual]
handleToken(char **buf, const char *token, DualStringMap &userData)GBFHTMLHREF [protected, virtual]
key (defined in SWBasicFilter)SWBasicFilter [protected]
module (defined in SWBasicFilter)SWBasicFilter [protected]
ProcessText(char *text, int maxlen, const SWKey *, const SWModule *=0) (defined in SWBasicFilter)SWBasicFilter [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
pushString(char **buf, const char *format,...)SWBasicFilter [protected]
resultBuffer (defined in SWBasicFilter)SWBasicFilter [protected]
setEscapeEnd(const char *escEnd)SWBasicFilter [protected]
setEscapeStart(const char *escStart)SWBasicFilter [protected]
setEscapeStringCaseSensitive(bool val) (defined in SWBasicFilter)SWBasicFilter [protected]
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
setPassThruUnknownEscapeString(bool val)SWBasicFilter [protected]
setPassThruUnknownToken(bool val)SWBasicFilter [protected]
setTokenCaseSensitive(bool val) (defined in SWBasicFilter)SWBasicFilter [protected]
setTokenEnd(const char *tokenEnd)SWBasicFilter [protected]
setTokenStart(const char *tokenStart)SWBasicFilter [protected]
substituteEscapeString(char **buf, const char *escString) (defined in SWBasicFilter)SWBasicFilter [protected]
substituteToken(char **buf, const char *token) (defined in SWBasicFilter)SWBasicFilter [protected]
SWBasicFilter() (defined in SWBasicFilter)SWBasicFilter
tokenSubMap (defined in SWBasicFilter)SWBasicFilter [protected]
~SWBasicFilter() (defined in SWBasicFilter)SWBasicFilter [virtual]
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_g_b_f_h_t_m_l_h_r_e_f.html b/doc/api-documentation/html/class_g_b_f_h_t_m_l_h_r_e_f.html deleted file mode 100644 index f6b0d71..0000000 --- a/doc/api-documentation/html/class_g_b_f_h_t_m_l_h_r_e_f.html +++ /dev/null @@ -1,204 +0,0 @@ - - -GBFHTMLHREF class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

GBFHTMLHREF Class Reference

this filter converts GBF text to HTML text with hrefs. -More... -

-#include <gbfhtmlhref.h> -

-Inheritance diagram for GBFHTMLHREF:

Inheritance graph
- - - -
[legend]
Collaboration diagram for GBFHTMLHREF:

Collaboration graph
- - - - - - - - - -
[legend]
List of all members. - - - - - -

Public Methods

GBFHTMLHREF ()

Protected Methods

virtual bool handleToken (char **buf, const char *token, DualStringMap &userData)
 This function is called for every token encountered in the input text. More...

-

Detailed Description

-this filter converts GBF text to HTML text with hrefs. -

- -

-Definition at line 26 of file gbfhtmlhref.h.


Member Function Documentation

-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
bool GBFHTMLHREF::handleToken char **   buf,
const char *   token,
DualStringMap &   userData
[protected, virtual]
-
- - - - - -
-   - - -

-This function is called for every token encountered in the input text. -

-

-Parameters:
- - - - -
buf  -the output buffer (FIXME: what is its size?)
token  -the token (e.g. "p align='left'"
userData  -FIXME: document this
-
-Returns:
-false if was not handled and should be handled in the default way (by just substituting).
-

-Reimplemented from SWBasicFilter. -

-Definition at line 60 of file gbfhtmlhref.cpp. -

-References SWBasicFilter::pushString(). -

-

00060                                                                                     {
-00061         const char *tok;
-00062 
-00063         if (!substituteToken(buf, token)) {
-00064                 if (!strncmp(token, "WG", 2) || !strncmp(token, "WH", 2)) { // strong's numbers
-00065                         pushString(buf, " <small><em>&lt;<a href=\"#");
-00066                         for (tok = token+1; *tok; tok++)
-00067                                 //if(token[i] != '\"')
-00068                                         *(*buf)++ = *tok;
-00069                         *(*buf)++ = '\"';
-00070                         *(*buf)++ = '>';
-00071                         for (tok = token + 2; *tok; tok++)
-00072                                 //if(token[i] != '\"')
-00073                                         *(*buf)++ = *tok;
-00074                         pushString(buf, "</a>&gt;</em></small>");
-00075                 }
-00076 
-00077                 else if (!strncmp(token, "WTG", 3) || !strncmp(token, "WTH", 3)) { // strong's numbers tense
-00078                         pushString(buf, " <small><em>(<A HREF=\"#");
-00079                         for (tok = token + 2; *tok; tok++)
-00080                                 if(*tok != '\"')
-00081                                         *(*buf)++ = *tok;
-00082                         *(*buf)++ = '\"';
-00083                         *(*buf)++ = '>';
-00084                         for (tok = token + 3; *tok; tok++)
-00085                                 if(*tok != '\"')
-00086                                         *(*buf)++ = *tok;
-00087                         pushString(buf, "</a>)</em></small>");
-00088                 }
-00089 
-00090                 else if (!strncmp(token, "WT", 2) && strncmp(token, "WTH", 3) && strncmp(token, "WTG", 3)) { // morph tags
-00091                         pushString(buf, " <small><em>(<a href=\"M");
-00092                         for (tok = token + 2; *tok; tok++)
-00093                                 if(*tok != '\"')
-00094                                         *(*buf)++ = *tok;
-00095                         *(*buf)++ = '\"';
-00096                         *(*buf)++ = '>';
-00097                         for (tok = token + 2; *tok; tok++)                              
-00098                                 if(*tok != '\"')                        
-00099                                         *(*buf)++ = *tok;               
-00100                         pushString(buf, "</a>)</em></small>");
-00101                 }
-00102 
-00103                 else if (!strncmp(token, "RX", 2)) {
-00104                         pushString(buf, "<a href=\"");
-00105                         for (tok = token + 3; *tok; tok++) {
-00106                           if(*tok != '<' && *tok+1 != 'R' && *tok+2 != 'x') {
-00107                             *(*buf)++ = *tok;
-00108                           }
-00109                           else {
-00110                             break;
-00111                           }
-00112                         }
-00113                         *(*buf)++ = '\"';
-00114                         *(*buf)++ = '>';
-00115                 }
-00116 
-00117                 else if (!strncmp(token, "RB", 2)) {
-00118                         pushString(buf, "<i>");
-00119                         userData["hasFootnotePreTag"] = "true";
-00120                 }
-00121 
-00122                 else if (!strncmp(token, "RF", 2)) {
-00123                         if(userData["hasFootnotePreTag"] == "true") {
-00124                                 userData["hasFootnotePreTag"] = "false";
-00125                                 pushString(buf, "</i> ");
-00126                         }
-00127                         pushString(buf, "<font color=\"#800000\"><small> (");
-00128                 }
-00129 
-00130                 else if (!strncmp(token, "FN", 2)) {
-00131                         pushString(buf, "<font face=\"");
-00132                         for (tok = token + 2; *tok; tok++)                              
-00133                                 if(*tok != '\"')                        
-00134                                         *(*buf)++ = *tok;
-00135                         *(*buf)++ = '\"';
-00136                         *(*buf)++ = '>';
-00137                 }
-00138 
-00139                 else if (!strncmp(token, "CA", 2)) {    // ASCII value
-00140                         *(*buf)++ = (char)atoi(&token[2]);
-00141                 }
-00142                 
-00143                 else {
-00144                         return false;
-00145                 }
-00146         }
-00147         return true;
-00148 }
-
-


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_g_b_f_h_t_m_l_h_r_e_f__coll__graph.png b/doc/api-documentation/html/class_g_b_f_h_t_m_l_h_r_e_f__coll__graph.png deleted file mode 100644 index aae3e25..0000000 Binary files a/doc/api-documentation/html/class_g_b_f_h_t_m_l_h_r_e_f__coll__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_g_b_f_h_t_m_l_h_r_e_f__inherit__graph.png b/doc/api-documentation/html/class_g_b_f_h_t_m_l_h_r_e_f__inherit__graph.png deleted file mode 100644 index e90f642..0000000 Binary files a/doc/api-documentation/html/class_g_b_f_h_t_m_l_h_r_e_f__inherit__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_g_b_f_headings-members.html b/doc/api-documentation/html/class_g_b_f_headings-members.html deleted file mode 100644 index 3e1f831..0000000 --- a/doc/api-documentation/html/class_g_b_f_headings-members.html +++ /dev/null @@ -1,31 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

GBFHeadings Member List

This is the complete list of members for GBFHeadings, including all inherited members. - - - - - - - - - - - - - - - - -
GBFHeadings() (defined in GBFHeadings)GBFHeadings
getOptionName() (defined in GBFHeadings)GBFHeadings [inline, virtual]
getOptionTip() (defined in GBFHeadings)GBFHeadings [inline, virtual]
getOptionValue() (defined in GBFHeadings)GBFHeadings [virtual]
getOptionValues() (defined in GBFHeadings)GBFHeadings [inline, virtual]
off (defined in GBFHeadings)GBFHeadings [private, static]
on (defined in GBFHeadings)GBFHeadings [private, static]
option (defined in GBFHeadings)GBFHeadings [private]
options (defined in GBFHeadings)GBFHeadings [private]
optName (defined in GBFHeadings)GBFHeadings [private, static]
optTip (defined in GBFHeadings)GBFHeadings [private, static]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in GBFHeadings)GBFHeadings [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *ival) (defined in GBFHeadings)GBFHeadings [virtual]
~GBFHeadings() (defined in GBFHeadings)GBFHeadings [virtual]
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_g_b_f_headings.html b/doc/api-documentation/html/class_g_b_f_headings.html deleted file mode 100644 index c13d0a8..0000000 --- a/doc/api-documentation/html/class_g_b_f_headings.html +++ /dev/null @@ -1,59 +0,0 @@ - - -GBFHeadings class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

GBFHeadings Class Reference

This Filter shows/hides headings in a GBF text. -More... -

-#include <gbfheadings.h> -

-List of all members. - - - - - - - - - - - - - - - - - -

Public Methods

GBFHeadings ()
-virtual ~GBFHeadings ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-virtual const char * getOptionName ()
-virtual const char * getOptionTip ()
-virtual void setOptionValue (const char *ival)
-virtual const char * getOptionValue ()
-virtual OptionsList getOptionValues ()

Private Attributes

-bool option
-OptionsList options

Static Private Attributes

-const char on [] = "On"
-const char off [] = "Off"
-const char optName [] = "Headings"
-const char optTip [] = "Toggles Headings On and Off if they exist"
-


Detailed Description

-This Filter shows/hides headings in a GBF text. -

- -

-Definition at line 30 of file gbfheadings.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_g_b_f_morph-members.html b/doc/api-documentation/html/class_g_b_f_morph-members.html deleted file mode 100644 index fef8e22..0000000 --- a/doc/api-documentation/html/class_g_b_f_morph-members.html +++ /dev/null @@ -1,31 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

GBFMorph Member List

This is the complete list of members for GBFMorph, including all inherited members. - - - - - - - - - - - - - - - - -
GBFMorph() (defined in GBFMorph)GBFMorph
getOptionName() (defined in GBFMorph)GBFMorph [inline, virtual]
getOptionTip() (defined in GBFMorph)GBFMorph [inline, virtual]
getOptionValue() (defined in GBFMorph)GBFMorph [virtual]
getOptionValues() (defined in GBFMorph)GBFMorph [inline, virtual]
off (defined in GBFMorph)GBFMorph [private, static]
on (defined in GBFMorph)GBFMorph [private, static]
option (defined in GBFMorph)GBFMorph [private]
options (defined in GBFMorph)GBFMorph [private]
optName (defined in GBFMorph)GBFMorph [private, static]
optTip (defined in GBFMorph)GBFMorph [private, static]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in GBFMorph)GBFMorph [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *ival) (defined in GBFMorph)GBFMorph [virtual]
~GBFMorph() (defined in GBFMorph)GBFMorph [virtual]
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_g_b_f_morph.html b/doc/api-documentation/html/class_g_b_f_morph.html deleted file mode 100644 index 5bca481..0000000 --- a/doc/api-documentation/html/class_g_b_f_morph.html +++ /dev/null @@ -1,59 +0,0 @@ - - -GBFMorph class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

GBFMorph Class Reference

This Filter shows/hides morph tags in a GBF text. -More... -

-#include <gbfmorph.h> -

-List of all members. - - - - - - - - - - - - - - - - - -

Public Methods

GBFMorph ()
-virtual ~GBFMorph ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-virtual const char * getOptionName ()
-virtual const char * getOptionTip ()
-virtual void setOptionValue (const char *ival)
-virtual const char * getOptionValue ()
-virtual OptionsList getOptionValues ()

Private Attributes

-bool option
-OptionsList options

Static Private Attributes

-const char on [] = "On"
-const char off [] = "Off"
-const char optName [] = "Morphological Tags"
-const char optTip [] = "Toggles Morphological Tags On and Off if they exist"
-


Detailed Description

-This Filter shows/hides morph tags in a GBF text. -

- -

-Definition at line 29 of file gbfmorph.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_g_b_f_o_s_i_s-members.html b/doc/api-documentation/html/class_g_b_f_o_s_i_s-members.html deleted file mode 100644 index ed16723..0000000 --- a/doc/api-documentation/html/class_g_b_f_o_s_i_s-members.html +++ /dev/null @@ -1,27 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

GBFOSIS Member List

This is the complete list of members for GBFOSIS, including all inherited members. - - - - - - - - - - - - -
convertToOSIS(const char *, const SWKey *key) (defined in GBFOSIS)GBFOSIS [protected, virtual]
GBFOSIS() (defined in GBFOSIS)GBFOSIS
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
ProcessText(char *text, int maxlen, const SWKey *, const SWModule *=0) (defined in GBFOSIS)GBFOSIS
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
pushString(char **buf, const char *format,...) (defined in GBFOSIS)GBFOSIS [protected]
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
~GBFOSIS() (defined in GBFOSIS)GBFOSIS [virtual]
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_g_b_f_o_s_i_s.html b/doc/api-documentation/html/class_g_b_f_o_s_i_s.html deleted file mode 100644 index cda9647..0000000 --- a/doc/api-documentation/html/class_g_b_f_o_s_i_s.html +++ /dev/null @@ -1,40 +0,0 @@ - - -GBFOSIS class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

GBFOSIS Class Reference

this filter converts GBF text to HTML text with hrefs. -More... -

-#include <gbfosis.h> -

-List of all members. - - - - - - - -

Public Methods

GBFOSIS ()
-virtual ~GBFOSIS ()
-char ProcessText (char *text, int maxlen, const SWKey *, const SWModule *=0)

Protected Methods

-virtual const char * convertToOSIS (const char *, const SWKey *key)
-void pushString (char **buf, const char *format,...)
-


Detailed Description

-this filter converts GBF text to HTML text with hrefs. -

- -

-Definition at line 25 of file gbfosis.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_g_b_f_plain-members.html b/doc/api-documentation/html/class_g_b_f_plain-members.html deleted file mode 100644 index 99f8b9e..0000000 --- a/doc/api-documentation/html/class_g_b_f_plain-members.html +++ /dev/null @@ -1,24 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

GBFPlain Member List

This is the complete list of members for GBFPlain, including all inherited members. - - - - - - - - - -
GBFPlain() (defined in GBFPlain)GBFPlain
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in GBFPlain)GBFPlain [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_g_b_f_plain.html b/doc/api-documentation/html/class_g_b_f_plain.html deleted file mode 100644 index 57980ea..0000000 --- a/doc/api-documentation/html/class_g_b_f_plain.html +++ /dev/null @@ -1,33 +0,0 @@ - - -GBFPlain class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

GBFPlain Class Reference

This filter converts GBF text into plain text. -More... -

-#include <gbfplain.h> -

-List of all members. - - - -

Public Methods

GBFPlain ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-


Detailed Description

-This filter converts GBF text into plain text. -

- -

-Definition at line 30 of file gbfplain.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_g_b_f_r_t_f-members.html b/doc/api-documentation/html/class_g_b_f_r_t_f-members.html deleted file mode 100644 index 2766aa8..0000000 --- a/doc/api-documentation/html/class_g_b_f_r_t_f-members.html +++ /dev/null @@ -1,24 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

GBFRTF Member List

This is the complete list of members for GBFRTF, including all inherited members. - - - - - - - - - -
GBFRTF() (defined in GBFRTF)GBFRTF
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in GBFRTF)GBFRTF [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_g_b_f_r_t_f.html b/doc/api-documentation/html/class_g_b_f_r_t_f.html deleted file mode 100644 index 7941a32..0000000 --- a/doc/api-documentation/html/class_g_b_f_r_t_f.html +++ /dev/null @@ -1,33 +0,0 @@ - - -GBFRTF class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

GBFRTF Class Reference

This filter converts GBF text into RTF text. -More... -

-#include <gbfrtf.h> -

-List of all members. - - - -

Public Methods

GBFRTF ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-


Detailed Description

-This filter converts GBF text into RTF text. -

- -

-Definition at line 30 of file gbfrtf.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_g_b_f_strongs-members.html b/doc/api-documentation/html/class_g_b_f_strongs-members.html deleted file mode 100644 index 04e81d9..0000000 --- a/doc/api-documentation/html/class_g_b_f_strongs-members.html +++ /dev/null @@ -1,31 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

GBFStrongs Member List

This is the complete list of members for GBFStrongs, including all inherited members. - - - - - - - - - - - - - - - - -
GBFStrongs() (defined in GBFStrongs)GBFStrongs
getOptionName() (defined in GBFStrongs)GBFStrongs [inline, virtual]
getOptionTip() (defined in GBFStrongs)GBFStrongs [inline, virtual]
getOptionValue() (defined in GBFStrongs)GBFStrongs [virtual]
getOptionValues() (defined in GBFStrongs)GBFStrongs [inline, virtual]
off (defined in GBFStrongs)GBFStrongs [private, static]
on (defined in GBFStrongs)GBFStrongs [private, static]
option (defined in GBFStrongs)GBFStrongs [private]
options (defined in GBFStrongs)GBFStrongs [private]
optName (defined in GBFStrongs)GBFStrongs [private, static]
optTip (defined in GBFStrongs)GBFStrongs [private, static]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in GBFStrongs)GBFStrongs [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *ival) (defined in GBFStrongs)GBFStrongs [virtual]
~GBFStrongs() (defined in GBFStrongs)GBFStrongs [virtual]
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_g_b_f_strongs.html b/doc/api-documentation/html/class_g_b_f_strongs.html deleted file mode 100644 index de7e820..0000000 --- a/doc/api-documentation/html/class_g_b_f_strongs.html +++ /dev/null @@ -1,59 +0,0 @@ - - -GBFStrongs class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

GBFStrongs Class Reference

This Filter shows/hides strong's numbers in a GBF text. -More... -

-#include <gbfstrongs.h> -

-List of all members. - - - - - - - - - - - - - - - - - -

Public Methods

GBFStrongs ()
-virtual ~GBFStrongs ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-virtual const char * getOptionName ()
-virtual const char * getOptionTip ()
-virtual void setOptionValue (const char *ival)
-virtual const char * getOptionValue ()
-virtual OptionsList getOptionValues ()

Private Attributes

-bool option
-OptionsList options

Static Private Attributes

-const char on [] = "On"
-const char off [] = "Off"
-const char optName [] = "Strong's Numbers"
-const char optTip [] = "Toggles Strong's Numbers On and Off if they exist"
-


Detailed Description

-This Filter shows/hides strong's numbers in a GBF text. -

- -

-Definition at line 30 of file gbfstrongs.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_g_b_f_th_m_l-members.html b/doc/api-documentation/html/class_g_b_f_th_m_l-members.html deleted file mode 100644 index 8ae884a..0000000 --- a/doc/api-documentation/html/class_g_b_f_th_m_l-members.html +++ /dev/null @@ -1,24 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

GBFThML Member List

This is the complete list of members for GBFThML, including all inherited members. - - - - - - - - - -
GBFThML() (defined in GBFThML)GBFThML
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
ProcessText(char *text, int maxlen=-1) (defined in GBFThML)GBFThML [virtual]
ProcessText(char *text, int maxlen, const SWKey *, const SWModule *=0) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_g_b_f_th_m_l.html b/doc/api-documentation/html/class_g_b_f_th_m_l.html deleted file mode 100644 index 3f49c21..0000000 --- a/doc/api-documentation/html/class_g_b_f_th_m_l.html +++ /dev/null @@ -1,33 +0,0 @@ - - -GBFThML class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

GBFThML Class Reference

this filter converts GBF text into ThML text. -More... -

-#include <gbfthml.h> -

-List of all members. - - - -

Public Methods

GBFThML ()
-virtual char ProcessText (char *text, int maxlen=-1)
-


Detailed Description

-this filter converts GBF text into ThML text. -

- -

-Definition at line 27 of file gbfthml.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_greek_lex_attribs-members.html b/doc/api-documentation/html/class_greek_lex_attribs-members.html deleted file mode 100644 index adcb19e..0000000 --- a/doc/api-documentation/html/class_greek_lex_attribs-members.html +++ /dev/null @@ -1,24 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

GreekLexAttribs Member List

This is the complete list of members for GreekLexAttribs, including all inherited members. - - - - - - - - - -
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
GreekLexAttribs() (defined in GreekLexAttribs)GreekLexAttribs
ProcessText(char *text, int maxlen, const SWKey *, const SWModule *=0) (defined in GreekLexAttribs)GreekLexAttribs [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_greek_lex_attribs.html b/doc/api-documentation/html/class_greek_lex_attribs.html deleted file mode 100644 index 1919cb6..0000000 --- a/doc/api-documentation/html/class_greek_lex_attribs.html +++ /dev/null @@ -1,33 +0,0 @@ - - -GreekLexAttribs class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

GreekLexAttribs Class Reference

this filter converts ThML text to plain text. -More... -

-#include <greeklexattribs.h> -

-List of all members. - - - -

Public Methods

GreekLexAttribs ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *, const SWModule *=0)
-


Detailed Description

-this filter converts ThML text to plain text. -

- -

-Definition at line 30 of file greeklexattribs.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_latin1_u_t_f16-members.html b/doc/api-documentation/html/class_latin1_u_t_f16-members.html deleted file mode 100644 index 0157a14..0000000 --- a/doc/api-documentation/html/class_latin1_u_t_f16-members.html +++ /dev/null @@ -1,24 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

Latin1UTF16 Member List

This is the complete list of members for Latin1UTF16, including all inherited members. - - - - - - - - - -
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
Latin1UTF16() (defined in Latin1UTF16)Latin1UTF16
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in Latin1UTF16)Latin1UTF16 [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_latin1_u_t_f16.html b/doc/api-documentation/html/class_latin1_u_t_f16.html deleted file mode 100644 index 4b89791..0000000 --- a/doc/api-documentation/html/class_latin1_u_t_f16.html +++ /dev/null @@ -1,33 +0,0 @@ - - -Latin1UTF16 class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

Latin1UTF16 Class Reference

This filter converts Latin-1 encoded text to UTF-8. -More... -

-#include <latin1utf16.h> -

-List of all members. - - - -

Public Methods

Latin1UTF16 ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-


Detailed Description

-This filter converts Latin-1 encoded text to UTF-8. -

- -

-Definition at line 29 of file latin1utf16.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_latin1_u_t_f8-members.html b/doc/api-documentation/html/class_latin1_u_t_f8-members.html deleted file mode 100644 index 9a4e138..0000000 --- a/doc/api-documentation/html/class_latin1_u_t_f8-members.html +++ /dev/null @@ -1,24 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

Latin1UTF8 Member List

This is the complete list of members for Latin1UTF8, including all inherited members. - - - - - - - - - -
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
Latin1UTF8() (defined in Latin1UTF8)Latin1UTF8
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in Latin1UTF8)Latin1UTF8 [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_latin1_u_t_f8.html b/doc/api-documentation/html/class_latin1_u_t_f8.html deleted file mode 100644 index aab64ae..0000000 --- a/doc/api-documentation/html/class_latin1_u_t_f8.html +++ /dev/null @@ -1,33 +0,0 @@ - - -Latin1UTF8 class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

Latin1UTF8 Class Reference

This filter converts Latin-1 encoded text to UTF-8. -More... -

-#include <latin1utf8.h> -

-List of all members. - - - -

Public Methods

Latin1UTF8 ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-


Detailed Description

-This filter converts Latin-1 encoded text to UTF-8. -

- -

-Definition at line 29 of file latin1utf8.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_list_key-members.html b/doc/api-documentation/html/class_list_key-members.html deleted file mode 100644 index 0a6d0d7..0000000 --- a/doc/api-documentation/html/class_list_key-members.html +++ /dev/null @@ -1,58 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ListKey Member List

This is the complete list of members for ListKey, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
add(const SWKey &ikey) (defined in ListKey)ListKey [virtual]
array (defined in ListKey)ListKey [protected]
arraycnt (defined in ListKey)ListKey [protected]
arraymax (defined in ListKey)ListKey [protected]
arraypos (defined in ListKey)ListKey [protected]
classdef (defined in ListKey)ListKey [private, static]
ClearList()ListKey [virtual]
clone() constListKey [virtual]
compare(const SWKey &ikey)SWKey [virtual]
copyFrom(const ListKey &ikey)ListKey [virtual]
copyFrom(const SWKey &ikey)ListKey [inline, virtual]
Count()ListKey [virtual]
decrement(int step)ListKey [virtual]
equals(const SWKey &ikey)SWKey [inline, virtual]
Error()SWKey [virtual]
error (defined in SWKey)SWKey [protected]
getClass() constSWObject [inline]
GetElement(int pos=-1)ListKey [virtual]
getShortText() const (defined in SWKey)SWKey [inline, virtual]
getText() constSWKey [virtual]
increment(int step)ListKey [virtual]
Index() constListKey [inline, virtual]
Index(long index)ListKey [inline, virtual]
init() (defined in ListKey)ListKey [private]
keytext (defined in SWKey)SWKey [protected]
ListKey(const char *ikey=0)ListKey
ListKey(ListKey const &k) (defined in ListKey)ListKey
myclass (defined in SWObject)SWObject [protected]
operator<<(const SWKey &ikey)ListKey [inline]
operator=(const ListKey &key) (defined in ListKey)ListKey [inline]
Persist() constSWKey
Persist(signed char ikey)SWKey
persist (defined in SWKey)SWKey [protected]
Remove()ListKey [virtual]
setPosition(SW_POSITION)ListKey [virtual]
setText(const char *ikey)SWKey [virtual]
SetToElement(int ielement, SW_POSITION=TOP)ListKey [virtual]
SWKey(const char *ikey=0)SWKey
SWKey(SWKey const &k)SWKey
Traversable() (defined in ListKey)ListKey [inline, virtual]
userData (defined in SWKey)SWKey
~ListKey()ListKey [virtual]
~SWKey()SWKey [virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_list_key.html b/doc/api-documentation/html/class_list_key.html deleted file mode 100644 index 375ff10..0000000 --- a/doc/api-documentation/html/class_list_key.html +++ /dev/null @@ -1,658 +0,0 @@ - - -ListKey class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ListKey Class Reference

ListKey is the basis for all types of keys that have lists of specified indexes (e.g. -More... -

-#include <listkey.h> -

-Inheritance diagram for ListKey:

Inheritance graph
- - - - -
[legend]
Collaboration diagram for ListKey:

Collaboration graph
- - - - - -
[legend]
List of all members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Methods

 ListKey (const char *ikey=0)
 initializes instance of ListKey. More...

ListKey (ListKey const &k)
-virtual ~ListKey ()
 cleans up instance of ListKey.

virtual SWKeyclone () const
 Returns a copy of this SWKey object. More...

-virtual void ClearList ()
 Clears out elements of list.

virtual int Count ()
 Returns number of elements in list. More...

-virtual void Remove ()
 Removes current element from list.

virtual char SetToElement (int ielement, SW_POSITION=TOP)
 Sets key to element number. More...

virtual SWKeyGetElement (int pos=-1)
 Gets a key element number. More...

ListKey & operator<< (const SWKey &ikey)
 Adds an element to the list. More...

-virtual void add (const SWKey &ikey)
virtual void copyFrom (const ListKey &ikey)
 Equates this ListKey to another ListKey object. More...

virtual void copyFrom (const SWKey &ikey)
 Equates this SWKey to another SWKey object. More...

virtual void setPosition (SW_POSITION)
 Positions this key. More...

-virtual void decrement (int step)
 Decrements a number of elements.

-virtual void increment (int step)
 Increments a number of elements.

-virtual char Traversable ()
virtual long Index () const
 Use this function to get te current position withing a module. More...

virtual long Index (long index)
 Returns the index for the new one given as as parameter. More...

-SWKEY_OPERATORS ListKey & operator= (const ListKey &key)

Protected Attributes

-int arraypos
-int arraymax
-int arraycnt
-SWKey ** array

Private Methods

-void init ()

Static Private Attributes

-SWClass classdef
-

Detailed Description

-ListKey is the basis for all types of keys that have lists of specified indexes (e.g. -

-a list of verses, place, etc.) -

- -

-Definition at line 36 of file listkey.h.


Constructor & Destructor Documentation

-

- - - - -
- - - - - - - - - - -
ListKey::ListKey const char *   ikey = 0
-
- - - - - -
-   - - -

-initializes instance of ListKey. -

-

-Parameters:
- - -
ikey  -text key
-
-

-Definition at line 22 of file listkey.cpp. -

-References ClearList(). -

-Referenced by clone(). -

-

00022                                 : SWKey(ikey) {
-00023         arraymax = 0;
-00024         ClearList();
-00025         init();
-00026 }
-
-


Member Function Documentation

-

- - - - -
- - - - - - - - - -
SWKey * ListKey::clone   const [virtual]
-
- - - - - -
-   - - -

-Returns a copy of this SWKey object. -

-This is useful to get a 1:1 copy of an SWKey based object.

-Returns:
-SWKey
-

-Reimplemented from SWKey. -

-Definition at line 45 of file listkey.cpp. -

-References ListKey(). -

-

00046 {
-00047         return new ListKey(*this);
-00048 }
-
-

- - - - -
- - - - - - - - - - -
virtual void ListKey::copyFrom const SWKey  ikey [inline, virtual]
-
- - - - - -
-   - - -

-Equates this SWKey to another SWKey object. -

-

-Parameters:
- - -
ikey  -other swkey object
-
-

-Reimplemented from SWKey. -

-Definition at line 90 of file listkey.h. -

-References SWKey::copyFrom(). -

-

00090 { SWKey::copyFrom(ikey); }
-
-

- - - - -
- - - - - - - - - - -
void ListKey::copyFrom const ListKey &   ikey [virtual]
-
- - - - - -
-   - - -

-Equates this ListKey to another ListKey object. -

-

-Parameters:
- - -
ikey  -other ListKey object
-
-

-Definition at line 87 of file listkey.cpp. -

-References array, arraycnt, arraymax, arraypos, ClearList(), SWKey::clone(), and SetToElement(). -

-

00087                                           {
-00088         ClearList();
-00089 
-00090         arraymax = ikey.arraymax;
-00091         arraypos = ikey.arraypos;
-00092         arraycnt = ikey.arraycnt;
-00093         array = (arraymax)?(SWKey **)malloc(ikey.arraymax * sizeof(SWKey *)):0;
-00094         for (int i = 0; i < arraycnt; i++)
-00095                 array[i] = ikey.array[i]->clone();
-00096 
-00097         SetToElement(0);
-00098 }
-
-

- - - - -
- - - - - - - - - -
int ListKey::Count   [virtual]
-
- - - - - -
-   - - -

-Returns number of elements in list. -

-

-Returns:
-number of elements in list
-

-Definition at line 186 of file listkey.cpp. -

-Referenced by VerseKey::parse(). -

-

00186                    {
-00187         return arraycnt;
-00188 }
-
-

- - - - -
- - - - - - - - - - -
SWKey * ListKey::GetElement int   pos = -1 [virtual]
-
- - - - - -
-   - - -

-Gets a key element number. -

-

-Parameters:
- - -
pos  -element number to get (or default current)
-
-Returns:
-Key or null on error
-

-Definition at line 233 of file listkey.cpp. -

-

00233                                   {
-00234         if (pos >=0) {
-00235                 if (pos >=arraycnt)
-00236                         error = KEYERR_OUTOFBOUNDS;
-00237         }
-00238         else pos = arraypos;
-00239         return (error) ? 0:array[pos];
-00240 }
-
-

- - - - -
- - - - - - - - - - -
virtual long ListKey::Index long   index [inline, virtual]
-
- - - - - -
-   - - -

-Returns the index for the new one given as as parameter. -

-The first parameter is the new index. -

-Reimplemented from SWKey. -

-Definition at line 112 of file listkey.h. -

-References SWKey::Index(). -

-

00112 { SetToElement (index); return Index (); }
-
-

- - - - -
- - - - - - - - - -
virtual long ListKey::Index   const [inline, virtual]
-
- - - - - -
-   - - -

-Use this function to get te current position withing a module. -

-Here's a small example how to use this function and Index(long). This function uses the GerLut module and chooses a random verse from the Bible and returns it.

 const char* randomVerse() {
-   VerseKey vk;
-   SWMgr mgr;
-   LocaleMgr::systemLocaleMgr.setDefaultLocaleName("de");
-
-   SWModule* module = mgr->Modules("GerLut");
-   srand( time(0) );
-   const double newIndex = (double(rand())/RAND_MAX)*(24108+8224);
-   vk.Index(newIndex);
-   module->SetKey(vk);
-
-   char* text;
-   sprintf(text, "%s: %s",(const char*)vk ,module->StripText(&vk));
-   return text;
-
-

-Reimplemented from SWKey. -

-Definition at line 106 of file listkey.h. -

-

00106 { return arraypos; }
-
-

- - - - -
- - - - - - - - - - -
ListKey& ListKey::operator<< const SWKey  ikey [inline]
-
- - - - - -
-   - - -

-Adds an element to the list. -

-

-Parameters:
- - -
ikey  -the element to add
-
-

-Definition at line 82 of file listkey.h. -

-

00082 { add(ikey); return *this; }
-
-

- - - - -
- - - - - - - - - - -
void ListKey::setPosition SW_POSITION   [virtual]
-
- - - - - -
-   - - -

-Positions this key. -

-

-Parameters:
- - -
p  -position
-
-Returns:
-*this
-

-Reimplemented from SWKey. -

-Definition at line 124 of file listkey.cpp. -

-References SetToElement(). -

-

00124                                        {
-00125         switch (p) {
-00126         case 1: // GCC won't compile P_TOP
-00127                 SetToElement(0);
-00128                 break;
-00129         case 2: // GCC won't compile P_BOTTOM
-00130                 SetToElement(arraycnt-1);
-00131                 break;
-00132         }
-00133 }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
char ListKey::SetToElement int   ielement,
SW_POSITION   = TOP
[virtual]
-
- - - - - -
-   - - -

-Sets key to element number. -

-

-Parameters:
- - -
ielement  -element number to set to
-
-Returns:
-error status
-

-Definition at line 199 of file listkey.cpp. -

-Referenced by copyFrom(), decrement(), increment(), Remove(), and setPosition(). -

-

00199                                                         {
-00200         arraypos = ielement;
-00201         if (arraypos >= arraycnt) {
-00202                 arraypos = (arraycnt>0)?arraycnt - 1:0;
-00203                 error = KEYERR_OUTOFBOUNDS;
-00204         }
-00205         else {
-00206                 if (arraypos < 0) {
-00207                         arraypos = 0;
-00208                         error = KEYERR_OUTOFBOUNDS;
-00209                 }
-00210                 else {
-00211                         error = 0;
-00212                 }
-00213         }
-00214         
-00215         if (arraycnt) {
-00216                 (*array[arraypos]) = pos;
-00217                 *this = (const char *)(*array[arraypos]);
-00218         }
-00219         else *this = "";
-00220         
-00221         return error;
-00222 }
-
-


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_list_key__coll__graph.png b/doc/api-documentation/html/class_list_key__coll__graph.png deleted file mode 100644 index 2dac237..0000000 Binary files a/doc/api-documentation/html/class_list_key__coll__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_list_key__inherit__graph.png b/doc/api-documentation/html/class_list_key__inherit__graph.png deleted file mode 100644 index 1f7a41f..0000000 Binary files a/doc/api-documentation/html/class_list_key__inherit__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_locale_mgr-members.html b/doc/api-documentation/html/class_locale_mgr-members.html deleted file mode 100644 index e09373d..0000000 --- a/doc/api-documentation/html/class_locale_mgr-members.html +++ /dev/null @@ -1,27 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

LocaleMgr Member List

This is the complete list of members for LocaleMgr, including all inherited members. - - - - - - - - - - - - -
defaultLocaleName (defined in LocaleMgr)LocaleMgr [private]
deleteLocales() (defined in LocaleMgr)LocaleMgr [private]
getAvailableLocales()LocaleMgr [virtual]
getDefaultLocaleName()LocaleMgr [virtual]
getLocale(const char *name)LocaleMgr [virtual]
loadConfigDir(const char *ipath)LocaleMgr [virtual]
LocaleMgr(const char *iConfigPath=0)LocaleMgr
locales (defined in LocaleMgr)LocaleMgr [protected]
setDefaultLocaleName(const char *name)LocaleMgr [virtual]
systemLocaleMgrLocaleMgr [static]
translate(const char *text, const char *localeName=0)LocaleMgr [virtual]
~LocaleMgr()LocaleMgr [virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_locale_mgr.html b/doc/api-documentation/html/class_locale_mgr.html deleted file mode 100644 index 01d4d32..0000000 --- a/doc/api-documentation/html/class_locale_mgr.html +++ /dev/null @@ -1,347 +0,0 @@ - - -LocaleMgr class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

LocaleMgr Class Reference

The LocaleMgr class handles all the different locales of Sword. -More... -

-#include <localemgr.h> -

-Collaboration diagram for LocaleMgr:

Collaboration graph
- - -
[legend]
List of all members. - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Methods

LocaleMgr (const char *iConfigPath=0)
 Default constructor of LocaleMgr You do normally not need this constructor, use LocaleMgr::systemLocaleMgr instead.

-virtual ~LocaleMgr ()
 Default destructor of LocaleMgr.

virtual SWLocalegetLocale (const char *name)
 Get the locale connected with the name "name". More...

virtual list< string > getAvailableLocales ()
 Get the list of available locales. More...

virtual const char * translate (const char *text, const char *localeName=0)
 Returns translated text. More...

virtual const char * getDefaultLocaleName ()
 Get the default locale name. More...

virtual void setDefaultLocaleName (const char *name)
 Set the new standard locale of Sword. More...

-virtual void loadConfigDir (const char *ipath)
 Augment this localmgr with all locale.conf files in a directory.


Static Public Attributes

LocaleMgr systemLocaleMgr
 The LocaleMgr object used globally in the Sword world. More...


Protected Attributes

-LocaleMap locales

Private Methods

-void deleteLocales ()

Private Attributes

-char * defaultLocaleName
-

Detailed Description

-The LocaleMgr class handles all the different locales of Sword. -

-It provides functions to get a list of all available locales, to get the default locale name and to get it. The other functions are not interesting for frontend programmers. -

-To get the default locale name use

-See also:
-getDefaultLocaleName To set the default locale name use , setDefaultLocaleName To get the locale for a language name use , getLocale To get a list of availble locales use , getAvailableLocales
-

- -

-Definition at line 49 of file localemgr.h.


Member Function Documentation

-

- - - - -
- - - - - - - - - -
list< string > LocaleMgr::getAvailableLocales   [virtual]
-
- - - - - -
-   - - -

-Get the list of available locales. -

-@ret Returns a list of strings, which contains the names of the available locales. -

-Definition at line 156 of file localemgr.cpp. -

-

00156                                              {
-00157         list <string> retVal;
-00158         for (LocaleMap::iterator it = locales.begin(); it != locales.end(); it++) 
-00159                 retVal.push_back((*it).second->getName());
-00160 
-00161         return retVal;
-00162 }
-
-

- - - - -
- - - - - - - - - -
const char * LocaleMgr::getDefaultLocaleName   [virtual]
-
- - - - - -
-   - - -

-Get the default locale name. -

-To set it use

-See also:
-setDefaultLocaleName
@ret Returns the default locale name -

-Definition at line 177 of file localemgr.cpp. -

-Referenced by translate(). -

-

00177                                             {
-00178         return defaultLocaleName;
-00179 }
-
-

- - - - -
- - - - - - - - - - -
SWLocale * LocaleMgr::getLocale const char *   name [virtual]
-
- - - - - -
-   - - -

-Get the locale connected with the name "name". -

-

-Parameters:
- - -
name  -The name of the locale you want to have. For example use getLocale("de") to get the locale for the German language.
-
-Returns:
-Returns the locale object if the locale with the name given as parameter was found. If it wasn't found return NULL.
-

-Definition at line 145 of file localemgr.cpp. -

-Referenced by translate(). -

-

00145                                                {
-00146         LocaleMap::iterator it;
-00147 
-00148         it = locales.find(name);
-00149         if (it != locales.end())
-00150                 return (*it).second;
-00151 
-00152         return 0;
-00153 }
-
-

- - - - -
- - - - - - - - - - -
void LocaleMgr::setDefaultLocaleName const char *   name [virtual]
-
- - - - - -
-   - - -

-Set the new standard locale of Sword. -

-

-Parameters:
- - -
name  -The name of the new default locale
-
-

-Definition at line 182 of file localemgr.cpp. -

-Referenced by LocaleMgr(). -

-

00182                                                      {
-00183         stdstr(&defaultLocaleName, name);
-00184 }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
const char * LocaleMgr::translate const char *   text,
const char *   localeName = 0
[virtual]
-
- - - - - -
-   - - -

-Returns translated text. -

-This function uses both parameters to return the translated version of the given text.

-Parameters:
- - - -
The  -text to translate into the language given by the first parameter.
localeName  -The name of the locale Sword should use
-
-Returns:
-Returns the translated text.
-

-Definition at line 165 of file localemgr.cpp. -

-References getDefaultLocaleName(), getLocale(), and SWLocale::translate(). -

-

00165                                                                          {
-00166         SWLocale *target;
-00167         if (!localeName) {
-00168                 localeName = getDefaultLocaleName();
-00169         }
-00170         target = getLocale(localeName);
-00171         if (target)
-00172                 return target->translate(text);
-00173         return text;
-00174 }
-
-


Member Data Documentation

-

- - - - -
- - -
LocaleMgr LocaleMgr::systemLocaleMgr [static] -
-
- - - - - -
-   - - -

-The LocaleMgr object used globally in the Sword world. -

-Do not create your own LocaleMgr, use this static object instead. -

-Definition at line 43 of file localemgr.cpp. -

-Referenced by VerseKey::init().

-


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_locale_mgr__coll__graph.png b/doc/api-documentation/html/class_locale_mgr__coll__graph.png deleted file mode 100644 index 21d9f3c..0000000 Binary files a/doc/api-documentation/html/class_locale_mgr__coll__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_markup_filter_mgr-members.html b/doc/api-documentation/html/class_markup_filter_mgr-members.html deleted file mode 100644 index 7f5280d..0000000 --- a/doc/api-documentation/html/class_markup_filter_mgr-members.html +++ /dev/null @@ -1,41 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

MarkupFilterMgr Member List

This is the complete list of members for MarkupFilterMgr, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - -
AddEncodingFilters(SWModule *module, ConfigEntMap &section)EncodingFilterMgr [virtual]
AddGlobalOptions(SWModule *module, ConfigEntMap &section, ConfigEntMap::iterator start, ConfigEntMap::iterator end) (defined in SWFilterMgr)SWFilterMgr [virtual]
AddLocalOptions(SWModule *module, ConfigEntMap &section, ConfigEntMap::iterator start, ConfigEntMap::iterator end) (defined in SWFilterMgr)SWFilterMgr [virtual]
AddRawFilters(SWModule *module, ConfigEntMap &section)EncodingFilterMgr [virtual]
AddRenderFilters(SWModule *module, ConfigEntMap &section)MarkupFilterMgr [virtual]
AddStripFilters(SWModule *module, ConfigEntMap &section) (defined in SWFilterMgr)SWFilterMgr [virtual]
CreateFilters(char markup) (defined in MarkupFilterMgr)MarkupFilterMgr [protected]
Encoding(char enc)EncodingFilterMgr
encoding (defined in EncodingFilterMgr)EncodingFilterMgr [protected]
EncodingFilterMgr(char encoding=ENC_UTF8)EncodingFilterMgr
fromgbf (defined in MarkupFilterMgr)MarkupFilterMgr [protected]
fromosis (defined in MarkupFilterMgr)MarkupFilterMgr [protected]
fromplain (defined in MarkupFilterMgr)MarkupFilterMgr [protected]
fromthml (defined in MarkupFilterMgr)MarkupFilterMgr [protected]
getParentMgr() (defined in SWFilterMgr)SWFilterMgr [virtual]
latin1utf8 (defined in EncodingFilterMgr)EncodingFilterMgr [protected]
markup (defined in MarkupFilterMgr)MarkupFilterMgr [protected]
Markup(char m=FMT_UNKNOWN)MarkupFilterMgr
MarkupFilterMgr(char markup=FMT_THML, char encoding=ENC_UTF8)MarkupFilterMgr
scsuutf8 (defined in EncodingFilterMgr)EncodingFilterMgr [protected]
setParentMgr(SWMgr *parentMgr) (defined in SWFilterMgr)SWFilterMgr [virtual]
SWFilterMgr() (defined in SWFilterMgr)SWFilterMgr
targetenc (defined in EncodingFilterMgr)EncodingFilterMgr [protected]
~EncodingFilterMgr()EncodingFilterMgr
~MarkupFilterMgr()MarkupFilterMgr
~SWFilterMgr() (defined in SWFilterMgr)SWFilterMgr [virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_markup_filter_mgr.html b/doc/api-documentation/html/class_markup_filter_mgr.html deleted file mode 100644 index c375cd2..0000000 --- a/doc/api-documentation/html/class_markup_filter_mgr.html +++ /dev/null @@ -1,330 +0,0 @@ - - -MarkupFilterMgr class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

MarkupFilterMgr Class Reference

This class is like a normal SWEncodingMgr, but you can additonally specify which markup you want to use. -More... -

-#include <markupfiltmgr.h> -

-Inheritance diagram for MarkupFilterMgr:

Inheritance graph
- - - -
[legend]
Collaboration diagram for MarkupFilterMgr:

Collaboration graph
- - - -
[legend]
List of all members. - - - - - - - - - - - - - - - - - -

Public Methods

 MarkupFilterMgr (char markup=FMT_THML, char encoding=ENC_UTF8)
 Constructor of SWMarkupMgr. More...

~MarkupFilterMgr ()
 The destructor of SWMarkupMgr.

char Markup (char m=FMT_UNKNOWN)
 Markup sets/gets the markup after initialization. More...

virtual void AddRenderFilters (SWModule *module, ConfigEntMap &section)
 Adds the render filters which are defined in "section" to the SWModule object "module". More...


Protected Methods

-void CreateFilters (char markup)

Protected Attributes

-SWFilter * fromthml
-SWFilter * fromgbf
-SWFilter * fromplain
-SWFilter * fromosis
-char markup
-

Detailed Description

-This class is like a normal SWEncodingMgr, but you can additonally specify which markup you want to use. -

- -

-Definition at line 31 of file markupfiltmgr.h.


Constructor & Destructor Documentation

-

- - - - -
- - - - - - - - - - - - - - - - - - - -
MarkupFilterMgr::MarkupFilterMgr char   markup = FMT_THML,
char   encoding = ENC_UTF8
-
- - - - - -
-   - - -

-Constructor of SWMarkupMgr. -

-

-Parameters:
- - - - - - -
iconfig  -
isysconfig  -
autoload  -If this bool is true the constructor starts loading the installed modules. If you reimplemented SWMgr you can set autoload=false to load the modules with your own reimplemented function.
encoding  -The desired encoding.
markup  -The desired markup format.
-
-

-Definition at line 49 of file markupfiltmgr.cpp. -

-

00050                    : EncodingFilterMgr(enc) {
-00051 
-00052         markup = mark;
-00053 
-00054         CreateFilters(markup);
-00055 }
-
-


Member Function Documentation

-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void MarkupFilterMgr::AddRenderFilters SWModule  module,
ConfigEntMap &   section
[virtual]
-
- - - - - -
-   - - -

-Adds the render filters which are defined in "section" to the SWModule object "module". -

-

-Parameters:
- - - -
module  -To this module the render filter(s) are added
section  -We use this section to get a list of filters we should apply to the module
-
-

-Definition at line 168 of file markupfiltmgr.cpp. -

-References SWModule::AddRenderFilter(), and SWModule::Markup(). -

-

00168                                                                               {
-00169         switch (module->Markup()) {
-00170         case FMT_THML:
-00171                 if (fromthml)
-00172                         module->AddRenderFilter(fromthml);
-00173                 break;
-00174         case FMT_GBF:
-00175                 if (fromgbf)
-00176                         module->AddRenderFilter(fromgbf);
-00177                 break;
-00178         case FMT_PLAIN:
-00179                 if (fromplain)
-00180                         module->AddRenderFilter(fromplain);
-00181                 break;
-00182         case FMT_OSIS:
-00183                 if (fromosis)
-00184                         module->AddRenderFilter(fromosis);
-00185                 break;
-00186         }
-00187 }
-
-

- - - - -
- - - - - - - - - - -
char MarkupFilterMgr::Markup char   m = FMT_UNKNOWN
-
- - - - - -
-   - - -

-Markup sets/gets the markup after initialization. -

-

-Parameters:
- - -
m  -The new markup or FMT_UNKNOWN if you just want to get the current markup.
-
-Returns:
-The current (possibly changed) markup format.
-

-Definition at line 80 of file markupfiltmgr.cpp. -

-

00080                                       {
-00081         if (mark && mark != markup) {
-00082                 markup = mark;
-00083                 ModMap::const_iterator module;
-00084 
-00085                 SWFilter * oldplain = fromplain;
-00086                 SWFilter * oldthml = fromthml;
-00087                 SWFilter * oldgbf = fromgbf;
-00088                 SWFilter * oldosis = fromosis;
-00089 
-00090                 CreateFilters(markup);
-00091 
-00092                 for (module = getParentMgr()->Modules.begin(); module != getParentMgr()->Modules.end(); module++)
-00093                         switch (module->second->Markup()) {
-00094                         case FMT_THML:
-00095                                 if (oldthml != fromthml) {
-00096                                         if (oldthml) {
-00097                                                 if (!fromthml) {
-00098                                                         module->second->RemoveRenderFilter(oldthml);
-00099                                                 }
-00100                                                 else {
-00101                                                         module->second->ReplaceRenderFilter(oldthml, fromthml);
-00102                                                 }
-00103                                         }
-00104                                         else if (fromthml) {
-00105                                                 module->second->AddRenderFilter(fromthml);
-00106                                         }
-00107                                 }
-00108                                 break;
-00109                         case FMT_GBF:
-00110                                 if (oldgbf != fromgbf) {
-00111                                         if (oldgbf) {
-00112                                                 if (!fromgbf) {
-00113                                                         module->second->RemoveRenderFilter(oldgbf);
-00114                                                 }
-00115                                                 else {
-00116                                                         module->second->ReplaceRenderFilter(oldgbf, fromgbf);
-00117                                                 }
-00118                                         }
-00119                                         else if (fromgbf) {
-00120                                                 module->second->AddRenderFilter(fromgbf);
-00121                                         }
-00122                                         break;
-00123                                 }
-00124                         case FMT_PLAIN:
-00125                                 if (oldplain != fromplain) {
-00126                                         if (oldplain) {
-00127                                                 if (!fromplain) {
-00128                                                         module->second->RemoveRenderFilter(oldplain);
-00129                                                 }
-00130                                                 else {
-00131                                                         module->second->ReplaceRenderFilter(oldplain, fromplain);
-00132                                                 }
-00133                                         }
-00134                                         else if (fromplain) {
-00135                                                 module->second->AddRenderFilter(fromplain);
-00136                                         }
-00137                                         break;
-00138                                 }
-00139                         case FMT_OSIS:
-00140                                 if (oldosis != fromosis) {
-00141                                         if (oldosis) {
-00142                                                 if (!fromosis) {
-00143                                                         module->second->RemoveRenderFilter(oldosis);
-00144                                                 }
-00145                                                 else {
-00146                                                         module->second->ReplaceRenderFilter(oldosis, fromosis);
-00147                                                 }
-00148                                         }
-00149                                         else if (fromosis) {
-00150                                                 module->second->AddRenderFilter(fromosis);
-00151                                         }
-00152                                         break;
-00153                                 }
-00154                         }
-00155 
-00156                 if (oldthml)
-00157                         delete oldthml;
-00158                 if (oldgbf)
-00159                         delete oldgbf;
-00160                 if (oldplain)
-00161                         delete oldplain;
-00162                 if (oldosis)
-00163                         delete oldosis;
-00164         }
-00165         return markup;
-00166 }
-
-


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_markup_filter_mgr__coll__graph.png b/doc/api-documentation/html/class_markup_filter_mgr__coll__graph.png deleted file mode 100644 index ddc7564..0000000 Binary files a/doc/api-documentation/html/class_markup_filter_mgr__coll__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_markup_filter_mgr__inherit__graph.png b/doc/api-documentation/html/class_markup_filter_mgr__inherit__graph.png deleted file mode 100644 index ddc7564..0000000 Binary files a/doc/api-documentation/html/class_markup_filter_mgr__inherit__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_p_l_a_i_n_footnotes-members.html b/doc/api-documentation/html/class_p_l_a_i_n_footnotes-members.html deleted file mode 100644 index e11c666..0000000 --- a/doc/api-documentation/html/class_p_l_a_i_n_footnotes-members.html +++ /dev/null @@ -1,31 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

PLAINFootnotes Member List

This is the complete list of members for PLAINFootnotes, including all inherited members. - - - - - - - - - - - - - - - - -
getOptionName() (defined in PLAINFootnotes)PLAINFootnotes [inline, virtual]
getOptionTip() (defined in PLAINFootnotes)PLAINFootnotes [inline, virtual]
getOptionValue() (defined in PLAINFootnotes)PLAINFootnotes [virtual]
getOptionValues() (defined in PLAINFootnotes)PLAINFootnotes [inline, virtual]
off (defined in PLAINFootnotes)PLAINFootnotes [private, static]
on (defined in PLAINFootnotes)PLAINFootnotes [private, static]
option (defined in PLAINFootnotes)PLAINFootnotes [private]
options (defined in PLAINFootnotes)PLAINFootnotes [private]
optName (defined in PLAINFootnotes)PLAINFootnotes [private, static]
optTip (defined in PLAINFootnotes)PLAINFootnotes [private, static]
PLAINFootnotes() (defined in PLAINFootnotes)PLAINFootnotes
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in PLAINFootnotes)PLAINFootnotes [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *ival) (defined in PLAINFootnotes)PLAINFootnotes [virtual]
~PLAINFootnotes() (defined in PLAINFootnotes)PLAINFootnotes [virtual]
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_p_l_a_i_n_footnotes.html b/doc/api-documentation/html/class_p_l_a_i_n_footnotes.html deleted file mode 100644 index 383ccae..0000000 --- a/doc/api-documentation/html/class_p_l_a_i_n_footnotes.html +++ /dev/null @@ -1,63 +0,0 @@ - - -PLAINFootnotes class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

PLAINFootnotes Class Reference

Shows or hides footnotes in plain text. -More... -

-#include <plainfootnotes.h> -

-List of all members. - - - - - - - - - - - - - - - - - -

Public Methods

PLAINFootnotes ()
-virtual ~PLAINFootnotes ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-virtual const char * getOptionName ()
-virtual const char * getOptionTip ()
-virtual void setOptionValue (const char *ival)
-virtual const char * getOptionValue ()
-virtual OptionsList getOptionValues ()

Private Attributes

-bool option
-OptionsList options

Static Private Attributes

-const char on [] = "On"
-const char off [] = "Off"
-const char optName [] = "Footnotes"
-const char optTip [] = "Toggles Footnotes On and Off In Bible Texts If They Exist"
-


Detailed Description

-Shows or hides footnotes in plain text. -

-

-Author:
-The team of BibleTime
-

- -

-Definition at line 33 of file plainfootnotes.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_p_l_a_i_n_h_t_m_l-members.html b/doc/api-documentation/html/class_p_l_a_i_n_h_t_m_l-members.html deleted file mode 100644 index 14083d7..0000000 --- a/doc/api-documentation/html/class_p_l_a_i_n_h_t_m_l-members.html +++ /dev/null @@ -1,24 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

PLAINHTML Member List

This is the complete list of members for PLAINHTML, including all inherited members. - - - - - - - - - -
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
PLAINHTML() (defined in PLAINHTML)PLAINHTML
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in PLAINHTML)PLAINHTML [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_p_l_a_i_n_h_t_m_l.html b/doc/api-documentation/html/class_p_l_a_i_n_h_t_m_l.html deleted file mode 100644 index 09e0e9c..0000000 --- a/doc/api-documentation/html/class_p_l_a_i_n_h_t_m_l.html +++ /dev/null @@ -1,33 +0,0 @@ - - -PLAINHTML class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

PLAINHTML Class Reference

this filter converts plain text to HTML text. -More... -

-#include <plainhtml.h> -

-List of all members. - - - -

Public Methods

PLAINHTML ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-


Detailed Description

-this filter converts plain text to HTML text. -

- -

-Definition at line 31 of file plainhtml.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_r_t_f_h_t_m_l-members.html b/doc/api-documentation/html/class_r_t_f_h_t_m_l-members.html deleted file mode 100644 index 98d3c94..0000000 --- a/doc/api-documentation/html/class_r_t_f_h_t_m_l-members.html +++ /dev/null @@ -1,24 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

RTFHTML Member List

This is the complete list of members for RTFHTML, including all inherited members. - - - - - - - - - -
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in RTFHTML)RTFHTML [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
RTFHTML() (defined in RTFHTML)RTFHTML
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_r_t_f_h_t_m_l.html b/doc/api-documentation/html/class_r_t_f_h_t_m_l.html deleted file mode 100644 index bd2226d..0000000 --- a/doc/api-documentation/html/class_r_t_f_h_t_m_l.html +++ /dev/null @@ -1,33 +0,0 @@ - - -RTFHTML class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

RTFHTML Class Reference

this filter converts RTF text into HTML text. -More... -

-#include <rtfhtml.h> -

-List of all members. - - - -

Public Methods

RTFHTML ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-


Detailed Description

-this filter converts RTF text into HTML text. -

- -

-Definition at line 30 of file rtfhtml.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_r_w_p_h_t_m_l-members.html b/doc/api-documentation/html/class_r_w_p_h_t_m_l-members.html deleted file mode 100644 index 4c4ea35..0000000 --- a/doc/api-documentation/html/class_r_w_p_h_t_m_l-members.html +++ /dev/null @@ -1,24 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

RWPHTML Member List

This is the complete list of members for RWPHTML, including all inherited members. - - - - - - - - - -
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in RWPHTML)RWPHTML [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
RWPHTML() (defined in RWPHTML)RWPHTML
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_r_w_p_h_t_m_l.html b/doc/api-documentation/html/class_r_w_p_h_t_m_l.html deleted file mode 100644 index 44d36e6..0000000 --- a/doc/api-documentation/html/class_r_w_p_h_t_m_l.html +++ /dev/null @@ -1,33 +0,0 @@ - - -RWPHTML class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

RWPHTML Class Reference

this filter converts RWP text to HTML text. -More... -

-#include <rwphtml.h> -

-List of all members. - - - -

Public Methods

RWPHTML ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-


Detailed Description

-this filter converts RWP text to HTML text. -

- -

-Definition at line 31 of file rwphtml.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_r_w_p_r_t_f-members.html b/doc/api-documentation/html/class_r_w_p_r_t_f-members.html deleted file mode 100644 index bd6112a..0000000 --- a/doc/api-documentation/html/class_r_w_p_r_t_f-members.html +++ /dev/null @@ -1,24 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

RWPRTF Member List

This is the complete list of members for RWPRTF, including all inherited members. - - - - - - - - - -
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in RWPRTF)RWPRTF [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
RWPRTF() (defined in RWPRTF)RWPRTF
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_r_w_p_r_t_f.html b/doc/api-documentation/html/class_r_w_p_r_t_f.html deleted file mode 100644 index ecad05a..0000000 --- a/doc/api-documentation/html/class_r_w_p_r_t_f.html +++ /dev/null @@ -1,33 +0,0 @@ - - -RWPRTF class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

RWPRTF Class Reference

this filter converts RWP text to RTF text. -More... -

-#include <rwprtf.h> -

-List of all members. - - - -

Public Methods

RWPRTF ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-


Detailed Description

-this filter converts RWP text to RTF text. -

- -

-Definition at line 33 of file rwprtf.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_c_s_u_u_t_f8-members.html b/doc/api-documentation/html/class_s_c_s_u_u_t_f8-members.html deleted file mode 100644 index f32cad9..0000000 --- a/doc/api-documentation/html/class_s_c_s_u_u_t_f8-members.html +++ /dev/null @@ -1,27 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SCSUUTF8 Member List

This is the complete list of members for SCSUUTF8, including all inherited members. - - - - - - - - - - - - -
c (defined in SCSUUTF8)SCSUUTF8 [private]
d (defined in SCSUUTF8)SCSUUTF8 [private]
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in SCSUUTF8)SCSUUTF8 [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
SCSUUTF8() (defined in SCSUUTF8)SCSUUTF8
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
UTF8Output(unsigned long, unsigned char *text) (defined in SCSUUTF8)SCSUUTF8 [private]
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_c_s_u_u_t_f8.html b/doc/api-documentation/html/class_s_c_s_u_u_t_f8.html deleted file mode 100644 index b3b4e4a..0000000 --- a/doc/api-documentation/html/class_s_c_s_u_u_t_f8.html +++ /dev/null @@ -1,41 +0,0 @@ - - -SCSUUTF8 class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SCSUUTF8 Class Reference

This filter converts SCSU compressed (encoded) text to UTF-8. -More... -

-#include <scsuutf8.h> -

-List of all members. - - - - - - - - -

Public Methods

SCSUUTF8 ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)

Private Methods

-unsigned char * UTF8Output (unsigned long, unsigned char *text)

Private Attributes

-unsigned long c
-unsigned long d
-


Detailed Description

-This filter converts SCSU compressed (encoded) text to UTF-8. -

- -

-Definition at line 29 of file scsuutf8.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_basic_filter-members.html b/doc/api-documentation/html/class_s_w_basic_filter-members.html deleted file mode 100644 index 9ac26f3..0000000 --- a/doc/api-documentation/html/class_s_w_basic_filter-members.html +++ /dev/null @@ -1,54 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWBasicFilter Member List

This is the complete list of members for SWBasicFilter, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
addEscapeStringSubstitute(const char *findString, const char *replaceString) (defined in SWBasicFilter)SWBasicFilter [protected]
addTokenSubstitute(const char *findString, const char *replaceString) (defined in SWBasicFilter)SWBasicFilter [protected]
DualStringMap typedef (defined in SWBasicFilter)SWBasicFilter [protected]
escEnd (defined in SWBasicFilter)SWBasicFilter [private]
escStart (defined in SWBasicFilter)SWBasicFilter [private]
escStringCaseSensitive (defined in SWBasicFilter)SWBasicFilter [private]
escSubMap (defined in SWBasicFilter)SWBasicFilter [protected]
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
handleEscapeString(char **buf, const char *escString, DualStringMap &userData)SWBasicFilter [protected, virtual]
handleToken(char **buf, const char *token, DualStringMap &userData)SWBasicFilter [protected, virtual]
key (defined in SWBasicFilter)SWBasicFilter [protected]
module (defined in SWBasicFilter)SWBasicFilter [protected]
passThruUnknownEsc (defined in SWBasicFilter)SWBasicFilter [private]
passThruUnknownToken (defined in SWBasicFilter)SWBasicFilter [private]
ProcessText(char *text, int maxlen, const SWKey *, const SWModule *=0) (defined in SWBasicFilter)SWBasicFilter [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
pushString(char **buf, const char *format,...)SWBasicFilter [protected]
resultBuffer (defined in SWBasicFilter)SWBasicFilter [protected]
setEscapeEnd(const char *escEnd)SWBasicFilter [protected]
setEscapeStart(const char *escStart)SWBasicFilter [protected]
setEscapeStringCaseSensitive(bool val) (defined in SWBasicFilter)SWBasicFilter [protected]
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
setPassThruUnknownEscapeString(bool val)SWBasicFilter [protected]
setPassThruUnknownToken(bool val)SWBasicFilter [protected]
setTokenCaseSensitive(bool val) (defined in SWBasicFilter)SWBasicFilter [protected]
setTokenEnd(const char *tokenEnd)SWBasicFilter [protected]
setTokenStart(const char *tokenStart)SWBasicFilter [protected]
substituteEscapeString(char **buf, const char *escString) (defined in SWBasicFilter)SWBasicFilter [protected]
substituteToken(char **buf, const char *token) (defined in SWBasicFilter)SWBasicFilter [protected]
SWBasicFilter() (defined in SWBasicFilter)SWBasicFilter
tokenCaseSensitive (defined in SWBasicFilter)SWBasicFilter [private]
tokenEnd (defined in SWBasicFilter)SWBasicFilter [private]
tokenStart (defined in SWBasicFilter)SWBasicFilter [private]
tokenSubMap (defined in SWBasicFilter)SWBasicFilter [protected]
~SWBasicFilter() (defined in SWBasicFilter)SWBasicFilter [virtual]
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_basic_filter.html b/doc/api-documentation/html/class_s_w_basic_filter.html deleted file mode 100644 index 4862f3c..0000000 --- a/doc/api-documentation/html/class_s_w_basic_filter.html +++ /dev/null @@ -1,331 +0,0 @@ - - -SWBasicFilter class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWBasicFilter Class Reference

A filter providing commonly used functionality. -More... -

-#include <swbasicfilter.h> -

-Inheritance diagram for SWBasicFilter:

Inheritance graph
- - - - - - -
[legend]
Collaboration diagram for SWBasicFilter:

Collaboration graph
- - - - - - - - -
[legend]
List of all members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Methods

SWBasicFilter ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *, const SWModule *=0)
-virtual ~SWBasicFilter ()

Protected Types

-typedef map< string, string > DualStringMap

Protected Methods

-void setEscapeStart (const char *escStart)
 Sets the beginning of escape sequence (by default "&").

-void setEscapeEnd (const char *escEnd)
 Sets the end of escape sequence (by default ";").

-void setTokenStart (const char *tokenStart)
 Sets the beginning of token start sequence (by default "<").

-void setTokenEnd (const char *tokenEnd)
 Sets the end of token start sequence (by default ">").

void setPassThruUnknownToken (bool val)
 Sets whether pass thru unknown tokens unchanged or just ignore (remove) them. More...

void setPassThruUnknownEscapeString (bool val)
 Sets whether pass thru unknown escape sequences unchanged or just ignore (remove) them. More...

-void setTokenCaseSensitive (bool val)
-void setEscapeStringCaseSensitive (bool val)
-void addTokenSubstitute (const char *findString, const char *replaceString)
-void addEscapeStringSubstitute (const char *findString, const char *replaceString)
-bool substituteToken (char **buf, const char *token)
-bool substituteEscapeString (char **buf, const char *escString)
-void pushString (char **buf, const char *format,...)
 Like sprintf.

virtual bool handleToken (char **buf, const char *token, DualStringMap &userData)
 This function is called for every token encountered in the input text. More...

virtual bool handleEscapeString (char **buf, const char *escString, DualStringMap &userData)
 This function is called for every escape sequence encountered in the input text. More...


Protected Attributes

-const SWModulemodule
-const SWKeykey
-char * resultBuffer
-DualStringMap tokenSubMap
-DualStringMap escSubMap

Private Attributes

-char * tokenStart
-char * tokenEnd
-char * escStart
-char * escEnd
-bool escStringCaseSensitive
-bool tokenCaseSensitive
-bool passThruUnknownToken
-bool passThruUnknownEsc
-

Detailed Description

-A filter providing commonly used functionality. -

-This filter has facilities for handling SGML/HTML/XML like tokens and escape strings (like SGML entities). It has the facility for just substituting the given tokens and escape strings to other strings and for "manual" custom token handling. -

-In this class the functions with arguments looking as char **buf write a character sequnce at address specified by *buf address and change *buf to point past the last char of the written sequence. -

- -

-Definition at line 45 of file swbasicfilter.h.


Member Function Documentation

-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
bool SWBasicFilter::handleEscapeString char **   buf,
const char *   escString,
DualStringMap &   userData
[protected, virtual]
-
- - - - - -
-   - - -

-This function is called for every escape sequence encountered in the input text. -

-

-Parameters:
- - - - -
buf  -the output buffer (FIXME: what is its size?)
escString  -the escape sequence (e.g. "amp" for &amp;)
userData  -FIXME: document this
-
-Returns:
-false if was not handled and should be handled in the default way (by just substituting).
-

-Definition at line 166 of file swbasicfilter.cpp. -

-

00166                                                                                                  {
-00167         return substituteEscapeString(buf, escString);
-00168 }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
bool SWBasicFilter::handleToken char **   buf,
const char *   token,
DualStringMap &   userData
[protected, virtual]
-
- - - - - -
-   - - -

-This function is called for every token encountered in the input text. -

-

-Parameters:
- - - - -
buf  -the output buffer (FIXME: what is its size?)
token  -the token (e.g. "p align='left'"
userData  -FIXME: document this
-
-Returns:
-false if was not handled and should be handled in the default way (by just substituting).
-

-Reimplemented in GBFHTMLHREF, ThMLHTML, ThMLHTMLHREF, and ThMLRTF. -

-Definition at line 161 of file swbasicfilter.cpp. -

-

00161                                                                                       {
-00162         return substituteToken(buf, token);
-00163 }
-
-

- - - - -
- - - - - - - - - - -
void SWBasicFilter::setPassThruUnknownEscapeString bool   val [protected]
-
- - - - - -
-   - - -

-Sets whether pass thru unknown escape sequences unchanged or just ignore (remove) them. -

-Default is false. -

-Definition at line 54 of file swbasicfilter.cpp. -

-

00054                                                            {
-00055         passThruUnknownEsc = val;
-00056 }
-
-

- - - - -
- - - - - - - - - - -
void SWBasicFilter::setPassThruUnknownToken bool   val [protected]
-
- - - - - -
-   - - -

-Sets whether pass thru unknown tokens unchanged or just ignore (remove) them. -

-Default is false. -

-Definition at line 49 of file swbasicfilter.cpp. -

-

00049                                                     {
-00050         passThruUnknownToken = val;
-00051 }
-
-


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_basic_filter__coll__graph.png b/doc/api-documentation/html/class_s_w_basic_filter__coll__graph.png deleted file mode 100644 index 2d0ae69..0000000 Binary files a/doc/api-documentation/html/class_s_w_basic_filter__coll__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_s_w_basic_filter__inherit__graph.png b/doc/api-documentation/html/class_s_w_basic_filter__inherit__graph.png deleted file mode 100644 index 5925e01..0000000 Binary files a/doc/api-documentation/html/class_s_w_basic_filter__inherit__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_s_w_class-members.html b/doc/api-documentation/html/class_s_w_class-members.html deleted file mode 100644 index e64ffd3..0000000 --- a/doc/api-documentation/html/class_s_w_class-members.html +++ /dev/null @@ -1,18 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWClass Member List

This is the complete list of members for SWClass, including all inherited members. - - - -
descends (defined in SWClass)SWClass [private]
isAssignableFrom(const char *className) const (defined in SWClass)SWClass [inline]
SWClass(const char **descends) (defined in SWClass)SWClass [inline]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_class.html b/doc/api-documentation/html/class_s_w_class.html deleted file mode 100644 index db17cf3..0000000 --- a/doc/api-documentation/html/class_s_w_class.html +++ /dev/null @@ -1,36 +0,0 @@ - - -SWClass class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWClass Class Reference

Class used for SWDYNAMIC_CAST to save the inheritance order. -More... -

-#include <swobject.h> -

-List of all members. - - - - - -

Public Methods

SWClass (const char **descends)
-bool isAssignableFrom (const char *className) const

Private Attributes

-const char ** descends
-


Detailed Description

-Class used for SWDYNAMIC_CAST to save the inheritance order. -

- -

-Definition at line 18 of file swobject.h.


The documentation for this class was generated from the following file: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_com-members.html b/doc/api-documentation/html/class_s_w_com-members.html deleted file mode 100644 index 22da413..0000000 --- a/doc/api-documentation/html/class_s_w_com-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWCom Member List

This is the complete list of members for SWCom, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AddEncodingFilter(SWFilter *newfilter)SWModule [inline, virtual]
AddOptionFilter(SWFilter *newfilter)SWModule [inline, virtual]
AddRawFilter(SWFilter *newfilter)SWModule [inline, virtual]
AddRenderFilter(SWFilter *newfilter)SWModule [inline, virtual]
AddStripFilter(SWFilter *newfilter)SWModule [inline, virtual]
config (defined in SWModule)SWModule [protected]
CreateKey()SWCom [inline, virtual]
createModule(const char *)SWModule [inline, static]
createSearchFramework() (defined in SWModule)SWModule [inline, virtual]
deleteEntry()SWModule [inline, virtual]
Description(const char *imoddesc=0)SWModule [virtual]
direction (defined in SWModule)SWModule [protected]
Direction(signed char newdir=-1)SWModule [virtual]
dispSWModule [protected]
Disp(SWDisplay *idisp=0)SWModule [virtual]
Display()SWModule [virtual]
encoding (defined in SWModule)SWModule [protected]
Encoding(signed char enc=-1)SWModule [virtual]
encodingFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
encodingFiltersSWModule [protected]
entryAttributes (defined in SWModule)SWModule [protected]
entrybuf (defined in SWModule)SWModule [protected]
entrybufallocsize (defined in SWModule)SWModule [protected]
entrySize (defined in SWModule)SWModule [protected]
Error()SWModule [virtual]
error (defined in SWModule)SWModule [protected]
filterBuffer(FilterList *filters, char *buf, long size, SWKey *key)SWModule [inline, virtual]
flush() (defined in SWCacher)SWCacher [virtual]
getConfig() const (defined in SWModule)SWModule [inline, virtual]
getConfigEntry(const char *key) const (defined in SWModule)SWModule [virtual]
getEntryAttributes() const (defined in SWModule)SWModule [inline, virtual]
getEntrySize() constSWModule [inline, virtual]
getRawEntry()=0SWModule [pure virtual]
getSkipConsecutiveLinks() (defined in SWModule)SWModule [inline, virtual]
hasSearchFramework() (defined in SWModule)SWModule [inline, virtual]
isProcessEntryAttributes() const (defined in SWModule)SWModule [inline, virtual]
isSearchOptimallySupported(const char *istr, int searchType, int flags, SWKey *scope)SWModule [inline, virtual]
isUnicode() constSWModule [inline, virtual]
isWritable()SWModule [inline, virtual]
Key() constSWModule [inline, virtual]
Key(const SWKey &ikey)SWModule [inline, virtual]
keySWModule [protected]
KeyText(const char *imodtype=0)SWModule [virtual]
Lang(const char *imodlang=0)SWModule [virtual]
lastAccess() (defined in SWCacher)SWCacher [virtual]
listkey (defined in SWModule)SWModule [protected]
markup (defined in SWModule)SWModule [protected]
Markup(signed char enc=-1)SWModule [virtual]
moddesc (defined in SWModule)SWModule [protected]
modlang (defined in SWModule)SWModule [protected]
modname (defined in SWModule)SWModule [protected]
modtype (defined in SWModule)SWModule [protected]
Name(const char *imodname=0)SWModule [virtual]
nullPercent(char percent, void *userData)SWModule [static]
operator const char *()SWModule [virtual]
operator SWKey &()SWModule [inline, virtual]
operator SWKey *()SWModule [inline, virtual]
operator++(int)SWModule [inline, virtual]
operator+=(int increment)SWModule [virtual]
operator--(int)SWModule [inline, virtual]
operator-=(int decrement)SWModule [virtual]
operator<<(const char *)SWModule [inline, virtual]
operator<<(const SWKey *)SWModule [inline, virtual]
operator=(SW_POSITION p)SWModule [virtual]
optionFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
optionFiltersSWModule [protected]
ownConfig (defined in SWModule)SWModule [protected]
procEntAttr (defined in SWModule)SWModule [protected]
processEntryAttributes(bool val) const (defined in SWModule)SWModule [inline, virtual]
rawdisp (defined in SWModule)SWModule [protected, static]
rawFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
rawFiltersSWModule [protected]
RemoveEncodingFilter(SWFilter *oldfilter)SWModule [inline, virtual]
RemoveRenderFilter(SWFilter *oldfilter)SWModule [inline, virtual]
renderFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
renderFiltersSWModule [protected]
RenderText(char *buf=0, int len=-1, bool render=true)SWModule [virtual]
RenderText(SWKey *tmpKey)SWModule [virtual]
ReplaceEncodingFilter(SWFilter *oldfilter, SWFilter *newfilter)SWModule [inline, virtual]
ReplaceRenderFilter(SWFilter *oldfilter, SWFilter *newfilter)SWModule [inline, virtual]
resourceConsumption() (defined in SWCacher)SWCacher [virtual]
Search(const char *istr, int searchType=0, int flags=0, SWKey *scope=0, bool *justCheckIfSupported=0, void(*percent)(char, void *)=&nullPercent, void *percentUserData=0)SWModule [virtual]
setConfig(ConfigEntMap *config) (defined in SWModule)SWModule [virtual]
setentry(const char *inbuf, long len)SWModule [inline, virtual]
SetKey(const SWKey *ikey)SWModule [virtual]
SetKey(const SWKey &ikey)SWModule [virtual]
setSkipConsecutiveLinks(bool val)SWModule [inline, virtual]
skipConsecutiveLinks (defined in SWModule)SWModule [protected]
stripFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
stripFiltersSWModule [protected]
StripText(char *buf=0, int len=-1)SWModule [virtual]
StripText(SWKey *tmpKey)SWModule [virtual]
SWCacher() (defined in SWCacher)SWCacher
SWCom(const char *imodname=0, const char *imoddesc=0, SWDisplay *idisp=0, SWTextEncoding enc=ENC_UNKNOWN, SWTextDirection dir=DIRECTION_LTR, SWTextMarkup mark=FMT_UNKNOWN, const char *ilang=0)SWCom
SWModule(const char *imodname=0, const char *imoddesc=0, SWDisplay *idisp=0, char *imodtype=0, SWTextEncoding encoding=ENC_UNKNOWN, SWTextDirection dir=DIRECTION_LTR, SWTextMarkup markup=FMT_UNKNOWN, const char *modlang=0)SWModule
terminateSearchSWModule
Type(const char *imodtype=0)SWModule [virtual]
~SWCacher() (defined in SWCacher)SWCacher [virtual]
~SWCom() (defined in SWCom)SWCom [virtual]
~SWModule()SWModule [virtual]

Generated on Thu Jun 20 22:13:03 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_com.html b/doc/api-documentation/html/class_s_w_com.html deleted file mode 100644 index 21c6f8c..0000000 --- a/doc/api-documentation/html/class_s_w_com.html +++ /dev/null @@ -1,186 +0,0 @@ - - -SWCom class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWCom Class Reference

The basis for all commentary modules. -More... -

-#include <swcom.h> -

-Inheritance diagram for SWCom:

Inheritance graph
- - - -
[legend]
Collaboration diagram for SWCom:

Collaboration graph
- - - - - - - - -
[legend]
List of all members. - - - - - - -

Public Methods

 SWCom (const char *imodname=0, const char *imoddesc=0, SWDisplay *idisp=0, SWTextEncoding enc=ENC_UNKNOWN, SWTextDirection dir=DIRECTION_LTR, SWTextMarkup mark=FMT_UNKNOWN, const char *ilang=0)
 Initializes data for instance of SWCom. More...

-virtual ~SWCom ()
virtual SWKeyCreateKey ()
 Allocates a key of specific type for module The different reimplementatiosn of SWModule (e.g. More...

-

Detailed Description

-The basis for all commentary modules. -

- -

-Definition at line 33 of file swcom.h.


Constructor & Destructor Documentation

-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SWCom::SWCom const char *   imodname = 0,
const char *   imoddesc = 0,
SWDisplay  idisp = 0,
SWTextEncoding   enc = ENC_UNKNOWN,
SWTextDirection   dir = DIRECTION_LTR,
SWTextMarkup   mark = FMT_UNKNOWN,
const char *   ilang = 0
-
- - - - - -
-   - - -

-Initializes data for instance of SWCom. -

-

-Parameters:
- - - - -
imodname  -Internal name for module
imoddesc  -Name to display to user for module
idisp  -Display object to use for displaying
-
-

-Definition at line 17 of file swcom.cpp. -

-References CreateKey(), and SWModule::key. -

-

00017                                                                                                                                                        : SWModule(imodname, imoddesc, idisp, "Commentaries", enc, dir, mark, ilang)
-00018 {
-00019         delete key;
-00020         key = CreateKey();
-00021 }
-
-


Member Function Documentation

-

- - - - -
- - - - - - - - - -
virtual SWKey* SWCom::CreateKey   [inline, virtual]
-
- - - - - -
-   - - -

-Allocates a key of specific type for module The different reimplementatiosn of SWModule (e.g. -

-SWText) support SWKey implementations, which support special. This functions returns a SWKey object which works with the current implementation of SWModule. For example for the SWText class it returns a VerseKey object.

-See also:
-VerseKey, ListKey, SWText, SWLD, SWCom
-Returns:
-pointer to allocated key
-

-Reimplemented from SWModule. -

-Definition at line 44 of file swcom.h. -

-Referenced by SWCom(). -

-

00045   {
-00046     return new VerseKey();
-00047   }
-
-


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_com__coll__graph.png b/doc/api-documentation/html/class_s_w_com__coll__graph.png deleted file mode 100644 index 4de2e8f..0000000 Binary files a/doc/api-documentation/html/class_s_w_com__coll__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_s_w_com__inherit__graph.png b/doc/api-documentation/html/class_s_w_com__inherit__graph.png deleted file mode 100644 index 5d3aca0..0000000 Binary files a/doc/api-documentation/html/class_s_w_com__inherit__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_s_w_config-members.html b/doc/api-documentation/html/class_s_w_config-members.html deleted file mode 100644 index a040b64..0000000 --- a/doc/api-documentation/html/class_s_w_config-members.html +++ /dev/null @@ -1,24 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWConfig Member List

This is the complete list of members for SWConfig, including all inherited members. - - - - - - - - - -
filenameSWConfig
getline(FILE *fp, string &line) (defined in SWConfig)SWConfig [private]
Load()SWConfig [virtual]
operator+=(SWConfig &addFrom)SWConfig [virtual]
operator[](const char *section)SWConfig [virtual]
Save()SWConfig [virtual]
SectionsSWConfig
SWConfig(const char *ifilename)SWConfig
~SWConfig() (defined in SWConfig)SWConfig [virtual]

Generated on Thu Jun 20 22:13:03 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_config.html b/doc/api-documentation/html/class_s_w_config.html deleted file mode 100644 index 2e0bfaa..0000000 --- a/doc/api-documentation/html/class_s_w_config.html +++ /dev/null @@ -1,216 +0,0 @@ - - -SWConfig class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWConfig Class Reference

The class to read and save settings using a file on disk. -More... -

-#include <swconfig.h> -

-List of all members. - - - - - - - - - - - - - - - - - - - -

Public Methods

 SWConfig (const char *ifilename)
 Constructor of SWConfig. More...

-virtual ~SWConfig ()
-virtual void Load ()
 Load from disk Load the contzent from disk.

-virtual void Save ()
 Save to disk Save the content of this config object to disk.

virtual SWConfig & operator+= (SWConfig &addFrom)
 Merges the values of addFrom. More...

virtual ConfigEntMap & operator[] (const char *section)
 Get a section This is an easy way to get and store config values. More...


Public Attributes

-string filename
 The filename used by this SWConfig object.

-SectionMap Sections
 Map of available sections The map of available sections.


Private Methods

-char getline (FILE *fp, string &line)
-


Detailed Description

-The class to read and save settings using a file on disk. -

- -

-Definition at line 44 of file swconfig.h.


Constructor & Destructor Documentation

-

- - - - -
- - - - - - - - - - -
SWConfig::SWConfig const char *   ifilename
-
- - - - - -
-   - - -

-Constructor of SWConfig. -

-

-Parameters:
- - -
ifilename  -The file, which should be used for this config.
-
-

-Definition at line 27 of file swconfig.cpp. -

-References filename, and Load(). -

-

00027                                          {
-00028         filename = ifilename;
-00029         Load();
-00030 }
-
-


Member Function Documentation

-

- - - - -
- - - - - - - - - - -
SWConfig & SWConfig::operator+= SWConfig &   addFrom [virtual]
-
- - - - - -
-   - - -

-Merges the values of addFrom. -

-

-Parameters:
- - -
The  -config which values should be merged to this config object. Already existing values will be overwritten.
-
-

-Definition at line 134 of file swconfig.cpp. -

-References Sections. -

-

00135 {
-00136 
-00137         SectionMap::iterator section;
-00138         ConfigEntMap::iterator entry, start, end;
-00139 
-00140         for (section = addFrom.Sections.begin(); section != addFrom.Sections.end(); section++) {
-00141                 for (entry = (*section).second.begin(); entry != (*section).second.end(); entry++) {
-00142                         start = Sections[section->first].lower_bound(entry->first);
-00143                         end   = Sections[section->first].upper_bound(entry->first);
-00144                         if (start != end) {
-00145                                 if (((++start) != end)
-00146                                                 || ((++(addFrom.Sections[section->first].lower_bound(entry->first))) != addFrom.Sections[section->first].upper_bound(entry->first))) {
-00147                                         for (--start; start != end; start++) {
-00148                                                 if (!strcmp(start->second.c_str(), entry->second.c_str()))
-00149                                                         break;
-00150                                         }
-00151                                         if (start == end)
-00152                                                 Sections[(*section).first].insert(ConfigEntMap::value_type((*entry).first, (*entry).second));
-00153                                 }
-00154                                 else    Sections[section->first][entry->first.c_str()] = entry->second.c_str();
-00155                         }               
-00156                         else    Sections[section->first][entry->first.c_str()] = entry->second.c_str();
-00157                 }
-00158         }
-00159         return *this;
-00160 }
-
-

- - - - -
- - - - - - - - - - -
ConfigEntMap & SWConfig::operator[] const char *   section [virtual]
-
- - - - - -
-   - - -

-Get a section This is an easy way to get and store config values. -

-The following will work:
- -

-

 SWConfig config("/home/user/.setttings");
- config["Colors"]["Background"] = "red";
-
-

-Definition at line 163 of file swconfig.cpp. -

-References Sections. -

-

00163                                                          {
-00164     return Sections[section];
-00165 }
-
-


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:03 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_display-members.html b/doc/api-documentation/html/class_s_w_display-members.html deleted file mode 100644 index bb51b02..0000000 --- a/doc/api-documentation/html/class_s_w_display-members.html +++ /dev/null @@ -1,20 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWDisplay Member List

This is the complete list of members for SWDisplay, including all inherited members. - - - - - -
classdef (defined in SWDisplay)SWDisplay [private, static]
Display(SWModule &imodule)SWDisplay [virtual]
getClass() constSWObject [inline]
myclass (defined in SWObject)SWObject [protected]
SWDisplay() (defined in SWDisplay)SWDisplay [inline]

Generated on Thu Jun 20 22:13:03 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_display.html b/doc/api-documentation/html/class_s_w_display.html deleted file mode 100644 index 55ba4b2..0000000 --- a/doc/api-documentation/html/class_s_w_display.html +++ /dev/null @@ -1,97 +0,0 @@ - - -SWDisplay class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWDisplay Class Reference

swdisp is the basis for all types of displays (e.g. -More... -

-#include <swdisp.h> -

-Inheritance diagram for SWDisplay:

Inheritance graph
- - - -
[legend]
Collaboration diagram for SWDisplay:

Collaboration graph
- - - - -
[legend]
List of all members. - - - - - - -

Public Methods

SWDisplay ()
virtual char Display (SWModule &imodule)
 casts a module to a character pointer and displays it to raw output (overriden for different display types and module types if necessary). More...


Static Private Attributes

-SWClass classdef
-

Detailed Description

-swdisp is the basis for all types of displays (e.g. -

-raw textout, curses, xwindow, etc.) -

- -

-Definition at line 34 of file swdisp.h.


Member Function Documentation

-

- - - - -
- - - - - - - - - - -
char SWDisplay::Display SWModule  imodule [virtual]
-
- - - - - -
-   - - -

-casts a module to a character pointer and displays it to raw output (overriden for different display types and module types if necessary). -

-

-Parameters:
- - -
imodule  -module to display
-
-Returns:
-error status
-

-Definition at line 23 of file swdisp.cpp. -

-Referenced by SWModule::Display(). -

-

00024 {
-00025         cout << (const char *)imodule;
-00026         return 0;
-00027 }
-
-


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:03 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_display__coll__graph.png b/doc/api-documentation/html/class_s_w_display__coll__graph.png deleted file mode 100644 index 5e41e8c..0000000 Binary files a/doc/api-documentation/html/class_s_w_display__coll__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_s_w_display__inherit__graph.png b/doc/api-documentation/html/class_s_w_display__inherit__graph.png deleted file mode 100644 index adb5d9e..0000000 Binary files a/doc/api-documentation/html/class_s_w_display__inherit__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_s_w_gen_book-members.html b/doc/api-documentation/html/class_s_w_gen_book-members.html deleted file mode 100644 index 4151580..0000000 --- a/doc/api-documentation/html/class_s_w_gen_book-members.html +++ /dev/null @@ -1,116 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWGenBook Member List

This is the complete list of members for SWGenBook, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AddEncodingFilter(SWFilter *newfilter)SWModule [inline, virtual]
AddOptionFilter(SWFilter *newfilter)SWModule [inline, virtual]
AddRawFilter(SWFilter *newfilter)SWModule [inline, virtual]
AddRenderFilter(SWFilter *newfilter)SWModule [inline, virtual]
AddStripFilter(SWFilter *newfilter)SWModule [inline, virtual]
config (defined in SWModule)SWModule [protected]
CreateKey()=0SWGenBook [pure virtual]
createModule(const char *)SWModule [inline, static]
createSearchFramework() (defined in SWModule)SWModule [inline, virtual]
deleteEntry()SWModule [inline, virtual]
Description(const char *imoddesc=0)SWModule [virtual]
direction (defined in SWModule)SWModule [protected]
Direction(signed char newdir=-1)SWModule [virtual]
dispSWModule [protected]
Disp(SWDisplay *idisp=0)SWModule [virtual]
Display()SWModule [virtual]
encoding (defined in SWModule)SWModule [protected]
Encoding(signed char enc=-1)SWModule [virtual]
encodingFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
encodingFiltersSWModule [protected]
entkeytxt (defined in SWGenBook)SWGenBook [protected]
entryAttributes (defined in SWModule)SWModule [protected]
entrybuf (defined in SWModule)SWModule [protected]
entrybufallocsize (defined in SWModule)SWModule [protected]
entrySize (defined in SWModule)SWModule [protected]
error (defined in SWModule)SWModule [protected]
Error()SWModule [virtual]
filterBuffer(FilterList *filters, char *buf, long size, SWKey *key)SWModule [inline, virtual]
flush() (defined in SWCacher)SWCacher [virtual]
getConfig() const (defined in SWModule)SWModule [inline, virtual]
getConfigEntry(const char *key) const (defined in SWModule)SWModule [virtual]
getEntryAttributes() const (defined in SWModule)SWModule [inline, virtual]
getEntrySize() constSWModule [inline, virtual]
getRawEntry()=0SWModule [pure virtual]
getSkipConsecutiveLinks() (defined in SWModule)SWModule [inline, virtual]
hasSearchFramework() (defined in SWModule)SWModule [inline, virtual]
isProcessEntryAttributes() const (defined in SWModule)SWModule [inline, virtual]
isSearchOptimallySupported(const char *istr, int searchType, int flags, SWKey *scope)SWModule [inline, virtual]
isUnicode() constSWModule [inline, virtual]
isWritable()SWModule [inline, virtual]
Key() constSWModule [inline, virtual]
Key(const SWKey &ikey)SWModule [inline, virtual]
keySWModule [protected]
KeyText(const char *imodtype=0)SWModule [virtual]
Lang(const char *imodlang=0)SWModule [virtual]
lastAccess() (defined in SWCacher)SWCacher [virtual]
listkey (defined in SWModule)SWModule [protected]
markup (defined in SWModule)SWModule [protected]
Markup(signed char enc=-1)SWModule [virtual]
moddesc (defined in SWModule)SWModule [protected]
modlang (defined in SWModule)SWModule [protected]
modname (defined in SWModule)SWModule [protected]
modtype (defined in SWModule)SWModule [protected]
Name(const char *imodname=0)SWModule [virtual]
nullPercent(char percent, void *userData)SWModule [static]
operator const char *()SWModule [virtual]
operator SWKey &()SWModule [inline, virtual]
operator SWKey *()SWModule [inline, virtual]
operator++(int)SWModule [inline, virtual]
operator+=(int increment)SWModule [virtual]
operator--(int)SWModule [inline, virtual]
operator-=(int decrement)SWModule [virtual]
operator<<(const char *)SWModule [inline, virtual]
operator<<(const SWKey *)SWModule [inline, virtual]
operator=(SW_POSITION p)SWModule [virtual]
optionFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
optionFiltersSWModule [protected]
ownConfig (defined in SWModule)SWModule [protected]
procEntAttr (defined in SWModule)SWModule [protected]
processEntryAttributes(bool val) const (defined in SWModule)SWModule [inline, virtual]
rawdisp (defined in SWModule)SWModule [protected, static]
rawFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
rawFiltersSWModule [protected]
RemoveEncodingFilter(SWFilter *oldfilter)SWModule [inline, virtual]
RemoveRenderFilter(SWFilter *oldfilter)SWModule [inline, virtual]
renderFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
renderFiltersSWModule [protected]
RenderText(char *buf=0, int len=-1, bool render=true)SWModule [virtual]
RenderText(SWKey *tmpKey)SWModule [virtual]
ReplaceEncodingFilter(SWFilter *oldfilter, SWFilter *newfilter)SWModule [inline, virtual]
ReplaceRenderFilter(SWFilter *oldfilter, SWFilter *newfilter)SWModule [inline, virtual]
resourceConsumption() (defined in SWCacher)SWCacher [virtual]
Search(const char *istr, int searchType=0, int flags=0, SWKey *scope=0, bool *justCheckIfSupported=0, void(*percent)(char, void *)=&nullPercent, void *percentUserData=0)SWModule [virtual]
setConfig(ConfigEntMap *config) (defined in SWModule)SWModule [virtual]
setentry(const char *inbuf, long len)SWModule [inline, virtual]
SetKey(const SWKey *ikey)SWModule [virtual]
SetKey(const SWKey &ikey)SWModule [virtual]
setSkipConsecutiveLinks(bool val)SWModule [inline, virtual]
skipConsecutiveLinks (defined in SWModule)SWModule [protected]
stripFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
stripFiltersSWModule [protected]
StripText(char *buf=0, int len=-1)SWModule [virtual]
StripText(SWKey *tmpKey)SWModule [virtual]
SWCacher() (defined in SWCacher)SWCacher
SWGenBook(const char *imodname=0, const char *imoddesc=0, SWDisplay *idisp=0, SWTextEncoding encoding=ENC_UNKNOWN, SWTextDirection dir=DIRECTION_LTR, SWTextMarkup markup=FMT_UNKNOWN, const char *ilang=0)SWGenBook
SWModule(const char *imodname=0, const char *imoddesc=0, SWDisplay *idisp=0, char *imodtype=0, SWTextEncoding encoding=ENC_UNKNOWN, SWTextDirection dir=DIRECTION_LTR, SWTextMarkup markup=FMT_UNKNOWN, const char *modlang=0)SWModule
terminateSearchSWModule
Type(const char *imodtype=0)SWModule [virtual]
~SWCacher() (defined in SWCacher)SWCacher [virtual]
~SWGenBook() (defined in SWGenBook)SWGenBook [virtual]
~SWModule()SWModule [virtual]

Generated on Thu Jun 20 22:13:03 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_gen_book.html b/doc/api-documentation/html/class_s_w_gen_book.html deleted file mode 100644 index 9756a61..0000000 --- a/doc/api-documentation/html/class_s_w_gen_book.html +++ /dev/null @@ -1,175 +0,0 @@ - - -SWGenBook class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWGenBook Class Reference

the basis for all types of Lexicon and Dictionary modules (hence the 'LD'). -More... -

-#include <swgenbook.h> -

-Inheritance diagram for SWGenBook:

Inheritance graph
- - - -
[legend]
Collaboration diagram for SWGenBook:

Collaboration graph
- - - - - - - - -
[legend]
List of all members. - - - - - - - - -

Public Methods

 SWGenBook (const char *imodname=0, const char *imoddesc=0, SWDisplay *idisp=0, SWTextEncoding encoding=ENC_UNKNOWN, SWTextDirection dir=DIRECTION_LTR, SWTextMarkup markup=FMT_UNKNOWN, const char *ilang=0)
 Initializes data for instance of SWLD. More...

-virtual ~SWGenBook ()
virtual SWKeyCreateKey ()=0
 Allocates a key of specific type for module The different reimplementatiosn of SWModule (e.g. More...


Protected Attributes

-char * entkeytxt
-

Detailed Description

-the basis for all types of Lexicon and Dictionary modules (hence the 'LD'). -

- -

-Definition at line 34 of file swgenbook.h.


Constructor & Destructor Documentation

-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SWGenBook::SWGenBook const char *   imodname = 0,
const char *   imoddesc = 0,
SWDisplay  idisp = 0,
SWTextEncoding   encoding = ENC_UNKNOWN,
SWTextDirection   dir = DIRECTION_LTR,
SWTextMarkup   markup = FMT_UNKNOWN,
const char *   ilang = 0
-
- - - - - -
-   - - -

-Initializes data for instance of SWLD. -

-

-Parameters:
- - - - -
imodname  -Internal name for module
imoddesc  -Name to display to user for module
idisp  -Display object to use for displaying
-
-

-Definition at line 17 of file swgenbook.cpp. -

-

00017                                                                                                                                                                 : SWModule(imodname, imoddesc, idisp, "Generic Books", enc, dir, mark, ilang) {
-00018 }
-
-


Member Function Documentation

-

- - - - -
- - - - - - - - - -
virtual SWKey* SWGenBook::CreateKey   [pure virtual]
-
- - - - - -
-   - - -

-Allocates a key of specific type for module The different reimplementatiosn of SWModule (e.g. -

-SWText) support SWKey implementations, which support special. This functions returns a SWKey object which works with the current implementation of SWModule. For example for the SWText class it returns a VerseKey object.

-See also:
-VerseKey, ListKey, SWText, SWLD, SWCom
-Returns:
-pointer to allocated key
-

-Reimplemented from SWModule.

-


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:03 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_gen_book__coll__graph.png b/doc/api-documentation/html/class_s_w_gen_book__coll__graph.png deleted file mode 100644 index a2703a1..0000000 Binary files a/doc/api-documentation/html/class_s_w_gen_book__coll__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_s_w_gen_book__inherit__graph.png b/doc/api-documentation/html/class_s_w_gen_book__inherit__graph.png deleted file mode 100644 index 7c3aa48..0000000 Binary files a/doc/api-documentation/html/class_s_w_gen_book__inherit__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_s_w_input_method-members.html b/doc/api-documentation/html/class_s_w_input_method-members.html deleted file mode 100644 index 76860a5..0000000 --- a/doc/api-documentation/html/class_s_w_input_method-members.html +++ /dev/null @@ -1,22 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWInputMethod Member List

This is the complete list of members for SWInputMethod, including all inherited members. - - - - - - - -
clearState() (defined in SWInputMethod)SWInputMethod [virtual]
getState() (defined in SWInputMethod)SWInputMethod [virtual]
setState(int state) (defined in SWInputMethod)SWInputMethod [protected, virtual]
state (defined in SWInputMethod)SWInputMethod [private]
SWInputMethod()SWInputMethod
translate(char in)=0 (defined in SWInputMethod)SWInputMethod [pure virtual]
~SWInputMethod() (defined in SWInputMethod)SWInputMethod [inline, virtual]

Generated on Thu Jun 20 22:13:03 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_input_method.html b/doc/api-documentation/html/class_s_w_input_method.html deleted file mode 100644 index 8f3b0d3..0000000 --- a/doc/api-documentation/html/class_s_w_input_method.html +++ /dev/null @@ -1,93 +0,0 @@ - - -SWInputMethod class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWInputMethod Class Reference

Title: Description: Copyright: Copyright (c) 2001 CrossWire Bible Society under the terms of the GNU GPL Company:. -More... -

-#include <swinputmeth.h> -

-List of all members. - - - - - - - - - - - -

Public Methods

 SWInputMethod ()
 Title: Description: Copyright: Copyright (c) 2001 CrossWire Bible Society under the terms of the GNU GPL Company:. More...

-virtual ~SWInputMethod ()
-virtual int * translate (char in)=0
-virtual int getState ()
-virtual void clearState ()

Protected Methods

-virtual void setState (int state)

Private Attributes

-int state
-


Detailed Description

-Title: Description: Copyright: Copyright (c) 2001 CrossWire Bible Society under the terms of the GNU GPL Company:. -

-

-Author:
-Troy A. Griffitts
-Version:
-1.0
-

- -

-Definition at line 13 of file swinputmeth.h.


Constructor & Destructor Documentation

-

- - - - -
- - - - - - - - - -
SWInputMethod::SWInputMethod  
-
- - - - - -
-   - - -

-Title: Description: Copyright: Copyright (c) 2001 CrossWire Bible Society under the terms of the GNU GPL Company:. -

-

-Author:
-Troy A. Griffitts
-Version:
-1.0
-

-Definition at line 12 of file swinputmeth.cpp. -

-

00012                              {
-00013    state = 0;
-00014 }
-
-


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:03 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_key-members.html b/doc/api-documentation/html/class_s_w_key-members.html deleted file mode 100644 index 61f2564..0000000 --- a/doc/api-documentation/html/class_s_w_key-members.html +++ /dev/null @@ -1,43 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWKey Member List

This is the complete list of members for SWKey, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
classdef (defined in SWKey)SWKey [private, static]
clone() constSWKey [virtual]
compare(const SWKey &ikey)SWKey [virtual]
copyFrom(const SWKey &ikey)SWKey [virtual]
decrement(int steps=1)SWKey [virtual]
equals(const SWKey &ikey)SWKey [inline, virtual]
error (defined in SWKey)SWKey [protected]
Error()SWKey [virtual]
getClass() constSWObject [inline]
getShortText() const (defined in SWKey)SWKey [inline, virtual]
getText() constSWKey [virtual]
increment(int steps=1)SWKey [virtual]
index (defined in SWKey)SWKey [private]
Index() constSWKey [inline, virtual]
Index(long iindex) (defined in SWKey)SWKey [inline, virtual]
init() (defined in SWKey)SWKey [private]
keytext (defined in SWKey)SWKey [protected]
myclass (defined in SWObject)SWObject [protected]
persist (defined in SWKey)SWKey [protected]
Persist() constSWKey
Persist(signed char ikey)SWKey
setPosition(SW_POSITION) (defined in SWKey)SWKey [virtual]
setText(const char *ikey)SWKey [virtual]
SWKey(const char *ikey=0)SWKey
SWKey(SWKey const &k)SWKey
Traversable() (defined in SWKey)SWKey [inline, virtual]
userData (defined in SWKey)SWKey
~SWKey()SWKey [virtual]

Generated on Thu Jun 20 22:13:03 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_key.html b/doc/api-documentation/html/class_s_w_key.html deleted file mode 100644 index 3287bff..0000000 --- a/doc/api-documentation/html/class_s_w_key.html +++ /dev/null @@ -1,732 +0,0 @@ - - -SWKey class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWKey Class Reference

SWKey is the basis for all types of keys for indexing into modules (e.g. -More... -

-#include <swkey.h> -

-Inheritance diagram for SWKey:

Inheritance graph
- - - - - - - - -
[legend]
Collaboration diagram for SWKey:

Collaboration graph
- - - - -
[legend]
List of all members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Methods

 SWKey (const char *ikey=0)
 initializes instance of SWKey. More...

 SWKey (SWKey const &k)
 Copy Constructor. More...

-virtual ~SWKey ()
 Destructor, cleans up this instance of SWKey.

virtual SWKey * clone () const
 Returns a copy of this SWKey object. More...

char Persist () const
 Gets whether this object itself persists within a module that it was used to SetKey or just a copy. More...

char Persist (signed char ikey)
 Set/gets whether this object itself persists within a module that it was used to SetKey or just a copy. More...

virtual char Error ()
 Gets and clears error status. More...

virtual void setText (const char *ikey)
 Equates this SWKey to a character string. More...

virtual void copyFrom (const SWKey &ikey)
 Equates this SWKey to another SWKey object. More...

-virtual const char * getText () const
 returns text key if (char *) cast is requested.

-virtual const char * getShortText () const
virtual int compare (const SWKey &ikey)
 Compares another VerseKey object. More...

virtual bool equals (const SWKey &ikey)
 Compares another VerseKey object. More...

-virtual void setPosition (SW_POSITION)
virtual void decrement (int steps=1)
 Decrements key a number of entries. More...

virtual void increment (int steps=1)
 Increments key a number of entries. More...

-virtual char Traversable ()
virtual long Index () const
 Use this function to get te current position withing a module. More...

-virtual long Index (long iindex)

Public Attributes

-void * userData

Protected Attributes

-char * keytext
-char persist
-char error

Private Methods

-void init ()

Private Attributes

-long index

Static Private Attributes

-SWClass classdef
-

Detailed Description

-SWKey is the basis for all types of keys for indexing into modules (e.g. -

-verse, word, place, etc.) -

- -

-Definition at line 76 of file swkey.h.


Constructor & Destructor Documentation

-

- - - - -
- - - - - - - - - - -
SWKey::SWKey const char *   ikey = 0
-
- - - - - -
-   - - -

-initializes instance of SWKey. -

-

-Parameters:
- - -
ikey  -text key
-
-

-Definition at line 20 of file swkey.cpp. -

-Referenced by clone(). -

-

00021 {
-00022         index   = 0;
-00023         persist = 0;
-00024         keytext = 0;
-00025         error   = 0;
-00026         stdstr(&keytext, ikey);
-00027         init();
-00028 }
-
-

- - - - -
- - - - - - - - - - -
SWKey::SWKey SWKey const &   k
-
- - - - - -
-   - - -

-Copy Constructor. -

-

-Parameters:
- - -
The  -SWKey object to copy.
-
-

-Definition at line 30 of file swkey.cpp. -

-References error, index, keytext, persist, and userData. -

-

00031 {
-00032         index    = k.index;
-00033         persist  = k.persist;
-00034         userData = k.userData;
-00035         keytext  = 0;
-00036         error    = k.error;
-00037         stdstr(&keytext, k.keytext);
-00038         init();
-00039 }
-
-


Member Function Documentation

-

- - - - -
- - - - - - - - - -
SWKey * SWKey::clone   const [virtual]
-
- - - - - -
-   - - -

-Returns a copy of this SWKey object. -

-This is useful to get a 1:1 copy of an SWKey based object.

-Returns:
-SWKey
-

-Reimplemented in ListKey, and VerseKey. -

-Definition at line 45 of file swkey.cpp. -

-References SWKey(). -

-Referenced by ListKey::copyFrom(), and SWModule::Search(). -

-

00046 {
-00047         return new SWKey(*this);
-00048 }
-
-

- - - - -
- - - - - - - - - - -
int SWKey::compare const SWKey &   ikey [virtual]
-
- - - - - -
-   - - -

-Compares another VerseKey object. -

-

-Parameters:
- - -
ikey  -key to compare with this one
-
-Returns:
->0 if this key is greater than compare key; <0 if this key is smaller than compare key; 0 if the keys are the same
-

-Reimplemented in TreeKey, TreeKeyIdx, and VerseKey. -

-Definition at line 151 of file swkey.cpp. -

-Referenced by TreeKeyIdx::compare(). -

-

00152 {
-00153         return strcmp((const char *)*this, (const char *)ikey);
-00154 }
-
-

- - - - -
- - - - - - - - - - -
void SWKey::copyFrom const SWKey &   ikey [virtual]
-
- - - - - -
-   - - -

-Equates this SWKey to another SWKey object. -

-

-Parameters:
- - -
ikey  -other swkey object
-
-

-Reimplemented in ListKey, TreeKeyIdx, and VerseKey. -

-Definition at line 126 of file swkey.cpp. -

-References setText(). -

-Referenced by VerseKey::copyFrom(), TreeKeyIdx::copyFrom(), and ListKey::copyFrom(). -

-

00126                                       {
-00127 // not desirable        Persist(ikey.Persist());
-00128         setText((const char *)ikey);
-00129 }
-
-

- - - - -
- - - - - - - - - - -
void SWKey::decrement int   steps = 1 [virtual]
-
- - - - - -
-   - - -

-Decrements key a number of entries. -

-

-Parameters:
- - -
steps  -Number of entries to jump backward
-
-Returns:
-*this
-

-Reimplemented in ListKey, TreeKey, TreeKeyIdx, and VerseKey. -

-Definition at line 194 of file swkey.cpp. -

-

00194                          {
-00195         error = KEYERR_OUTOFBOUNDS;
-00196 }
-
-

- - - - -
- - - - - - - - - - -
virtual bool SWKey::equals const SWKey &   ikey [inline, virtual]
-
- - - - - -
-   - - -

-Compares another VerseKey object. -

-

-Parameters:
- - -
ikey  -key to compare with this one
-
-Returns:
-true if the keys are the same
-

-Definition at line 167 of file swkey.h. -

-

00167 { return !compare(ikey); }
-
-

- - - - -
- - - - - - - - - -
char SWKey::Error   [virtual]
-
- - - - - -
-   - - -

-Gets and clears error status. -

-

-Returns:
-error status
-

-Definition at line 100 of file swkey.cpp. -

-Referenced by VerseKey::decrement(), ListKey::decrement(), VerseKey::increment(), ListKey::increment(), SWModule::operator+=(), SWModule::operator-=(), SWModule::operator=(), VerseKey::setPosition(), and TreeKeyIdx::setText(). -

-

00101 {
-00102         char retval = error;
-00103 
-00104         error = 0;
-00105         return retval;
-00106 }
-
-

- - - - -
- - - - - - - - - - -
void SWKey::increment int   steps = 1 [virtual]
-
- - - - - -
-   - - -

-Increments key a number of entries. -

-

-Parameters:
- - -
increment  -Number of entries to jump forward
-
-Returns:
-*this
-

-Reimplemented in ListKey, TreeKey, TreeKeyIdx, and VerseKey. -

-Definition at line 181 of file swkey.cpp. -

-

00181                          {
-00182         error = KEYERR_OUTOFBOUNDS;
-00183 }
-
-

- - - - -
- - - - - - - - - -
virtual long SWKey::Index   const [inline, virtual]
-
- - - - - -
-   - - -

-Use this function to get te current position withing a module. -

-Here's a small example how to use this function and Index(long). This function uses the GerLut module and chooses a random verse from the Bible and returns it.

 const char* randomVerse() {
-   VerseKey vk;
-   SWMgr mgr;
-   LocaleMgr::systemLocaleMgr.setDefaultLocaleName("de");
-
-   SWModule* module = mgr->Modules("GerLut");
-   srand( time(0) );
-   const double newIndex = (double(rand())/RAND_MAX)*(24108+8224);
-   vk.Index(newIndex);
-   module->SetKey(vk);
-
-   char* text;
-   sprintf(text, "%s: %s",(const char*)vk ,module->StripText(&vk));
-   return text;
-
-

-Reimplemented in ListKey, TreeKey, and VerseKey. -

-Definition at line 208 of file swkey.h. -

-Referenced by ListKey::Index(), and SWModule::Search(). -

-

00208 { return index; }
-
-

- - - - -
- - - - - - - - - - -
char SWKey::Persist signed char   ikey
-
- - - - - -
-   - - -

-Set/gets whether this object itself persists within a module that it was used to SetKey or just a copy. -

-(1 - persists in module; 0 - a copy is attempted

-Parameters:
- - -
ipersist  -value which to set persist; [-1] - only get
-
-Returns:
-value of persist
-

-Definition at line 85 of file swkey.cpp. -

-

00086 {
-00087         if (ipersist != -1)
-00088                 persist = ipersist;
-00089 
-00090         return persist;
-00091 }
-
-

- - - - -
- - - - - - - - - -
char SWKey::Persist   const
-
- - - - - -
-   - - -

-Gets whether this object itself persists within a module that it was used to SetKey or just a copy. -

-(1 - persists in module; 0 - a copy is attempted -

-

-Returns:
-value of persist
-

-Definition at line 68 of file swkey.cpp. -

-Referenced by SWLD::KeyText(), SWModule::RenderText(), SWModule::Search(), SWModule::SetKey(), SWModule::StripText(), and SWModule::~SWModule(). -

-

00069 {
-00070         return persist;
-00071 }
-
-

- - - - -
- - - - - - - - - - -
void SWKey::setText const char *   ikey [virtual]
-
- - - - - -
-   - - -

-Equates this SWKey to a character string. -

-

-Parameters:
- - -
ikey  -string to set this key to
-
-

-Reimplemented in TreeKey, TreeKeyIdx, and VerseKey. -

-Definition at line 115 of file swkey.cpp. -

-Referenced by copyFrom(), VerseKey::parse(), and VerseKey::setText(). -

-

00115                                     {
-00116         stdstr(&keytext, ikey);
-00117 }
-
-


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:03 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_key__coll__graph.png b/doc/api-documentation/html/class_s_w_key__coll__graph.png deleted file mode 100644 index aefa33c..0000000 Binary files a/doc/api-documentation/html/class_s_w_key__coll__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_s_w_key__inherit__graph.png b/doc/api-documentation/html/class_s_w_key__inherit__graph.png deleted file mode 100644 index c2b2eee..0000000 Binary files a/doc/api-documentation/html/class_s_w_key__inherit__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_s_w_l_d-members.html b/doc/api-documentation/html/class_s_w_l_d-members.html deleted file mode 100644 index 1313e44..0000000 --- a/doc/api-documentation/html/class_s_w_l_d-members.html +++ /dev/null @@ -1,116 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWLD Member List

This is the complete list of members for SWLD, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AddEncodingFilter(SWFilter *newfilter)SWModule [inline, virtual]
AddOptionFilter(SWFilter *newfilter)SWModule [inline, virtual]
AddRawFilter(SWFilter *newfilter)SWModule [inline, virtual]
AddRenderFilter(SWFilter *newfilter)SWModule [inline, virtual]
AddStripFilter(SWFilter *newfilter)SWModule [inline, virtual]
config (defined in SWModule)SWModule [protected]
CreateKey()SWLD [inline, virtual]
createModule(const char *)SWModule [inline, static]
createSearchFramework() (defined in SWModule)SWModule [inline, virtual]
deleteEntry()SWModule [inline, virtual]
Description(const char *imoddesc=0)SWModule [virtual]
direction (defined in SWModule)SWModule [protected]
Direction(signed char newdir=-1)SWModule [virtual]
dispSWModule [protected]
Disp(SWDisplay *idisp=0)SWModule [virtual]
Display()SWModule [virtual]
encoding (defined in SWModule)SWModule [protected]
Encoding(signed char enc=-1)SWModule [virtual]
encodingFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
encodingFiltersSWModule [protected]
entkeytxt (defined in SWLD)SWLD [protected]
entryAttributes (defined in SWModule)SWModule [protected]
entrybuf (defined in SWModule)SWModule [protected]
entrybufallocsize (defined in SWModule)SWModule [protected]
entrySize (defined in SWModule)SWModule [protected]
Error()SWModule [virtual]
error (defined in SWModule)SWModule [protected]
filterBuffer(FilterList *filters, char *buf, long size, SWKey *key)SWModule [inline, virtual]
flush() (defined in SWCacher)SWCacher [virtual]
getConfig() const (defined in SWModule)SWModule [inline, virtual]
getConfigEntry(const char *key) const (defined in SWModule)SWModule [virtual]
getEntryAttributes() const (defined in SWModule)SWModule [inline, virtual]
getEntrySize() constSWModule [inline, virtual]
getRawEntry()=0SWModule [pure virtual]
getSkipConsecutiveLinks() (defined in SWModule)SWModule [inline, virtual]
hasSearchFramework() (defined in SWModule)SWModule [inline, virtual]
isProcessEntryAttributes() const (defined in SWModule)SWModule [inline, virtual]
isSearchOptimallySupported(const char *istr, int searchType, int flags, SWKey *scope)SWModule [inline, virtual]
isUnicode() constSWModule [inline, virtual]
isWritable()SWModule [inline, virtual]
Key() constSWModule [inline, virtual]
Key(const SWKey &ikey)SWModule [inline, virtual]
keySWModule [protected]
KeyText(const char *ikeytext)SWLD [virtual]
Lang(const char *imodlang=0)SWModule [virtual]
lastAccess() (defined in SWCacher)SWCacher [virtual]
listkey (defined in SWModule)SWModule [protected]
markup (defined in SWModule)SWModule [protected]
Markup(signed char enc=-1)SWModule [virtual]
moddesc (defined in SWModule)SWModule [protected]
modlang (defined in SWModule)SWModule [protected]
modname (defined in SWModule)SWModule [protected]
modtype (defined in SWModule)SWModule [protected]
Name(const char *imodname=0)SWModule [virtual]
nullPercent(char percent, void *userData)SWModule [static]
operator const char *()SWModule [virtual]
operator SWKey &()SWModule [inline, virtual]
operator SWKey *()SWModule [inline, virtual]
operator++(int)SWModule [inline, virtual]
operator+=(int increment)SWModule [virtual]
operator--(int)SWModule [inline, virtual]
operator-=(int decrement)SWModule [virtual]
operator<<(const char *)SWModule [inline, virtual]
operator<<(const SWKey *)SWModule [inline, virtual]
operator=(SW_POSITION p)SWModule [virtual]
optionFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
optionFiltersSWModule [protected]
ownConfig (defined in SWModule)SWModule [protected]
procEntAttr (defined in SWModule)SWModule [protected]
processEntryAttributes(bool val) const (defined in SWModule)SWModule [inline, virtual]
rawdisp (defined in SWModule)SWModule [protected, static]
rawFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
rawFiltersSWModule [protected]
RemoveEncodingFilter(SWFilter *oldfilter)SWModule [inline, virtual]
RemoveRenderFilter(SWFilter *oldfilter)SWModule [inline, virtual]
renderFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
renderFiltersSWModule [protected]
RenderText(char *buf=0, int len=-1, bool render=true)SWModule [virtual]
RenderText(SWKey *tmpKey)SWModule [virtual]
ReplaceEncodingFilter(SWFilter *oldfilter, SWFilter *newfilter)SWModule [inline, virtual]
ReplaceRenderFilter(SWFilter *oldfilter, SWFilter *newfilter)SWModule [inline, virtual]
resourceConsumption() (defined in SWCacher)SWCacher [virtual]
Search(const char *istr, int searchType=0, int flags=0, SWKey *scope=0, bool *justCheckIfSupported=0, void(*percent)(char, void *)=&nullPercent, void *percentUserData=0)SWModule [virtual]
setConfig(ConfigEntMap *config) (defined in SWModule)SWModule [virtual]
setentry(const char *inbuf, long len)SWModule [inline, virtual]
SetKey(const SWKey *ikey)SWModule [virtual]
SetKey(const SWKey &ikey)SWModule [virtual]
setSkipConsecutiveLinks(bool val)SWModule [inline, virtual]
skipConsecutiveLinks (defined in SWModule)SWModule [protected]
stripFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
stripFiltersSWModule [protected]
StripText(char *buf=0, int len=-1)SWModule [virtual]
StripText(SWKey *tmpKey)SWModule [virtual]
SWCacher() (defined in SWCacher)SWCacher
SWLD(const char *imodname=0, const char *imoddesc=0, SWDisplay *idisp=0, SWTextEncoding encoding=ENC_UNKNOWN, SWTextDirection dir=DIRECTION_LTR, SWTextMarkup markup=FMT_UNKNOWN, const char *ilang=0)SWLD
SWModule(const char *imodname=0, const char *imoddesc=0, SWDisplay *idisp=0, char *imodtype=0, SWTextEncoding encoding=ENC_UNKNOWN, SWTextDirection dir=DIRECTION_LTR, SWTextMarkup markup=FMT_UNKNOWN, const char *modlang=0)SWModule
terminateSearchSWModule
Type(const char *imodtype=0)SWModule [virtual]
~SWCacher() (defined in SWCacher)SWCacher [virtual]
~SWLD() (defined in SWLD)SWLD [virtual]
~SWModule()SWModule [virtual]

Generated on Thu Jun 20 22:13:03 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_l_d.html b/doc/api-documentation/html/class_s_w_l_d.html deleted file mode 100644 index b08fb27..0000000 --- a/doc/api-documentation/html/class_s_w_l_d.html +++ /dev/null @@ -1,247 +0,0 @@ - - -SWLD class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWLD Class Reference

the basis for all types of Lexicon and Dictionary modules (hence the 'LD'). -More... -

-#include <swld.h> -

-Inheritance diagram for SWLD:

Inheritance graph
- - - -
[legend]
Collaboration diagram for SWLD:

Collaboration graph
- - - - - - - - -
[legend]
List of all members. - - - - - - - - - - -

Public Methods

 SWLD (const char *imodname=0, const char *imoddesc=0, SWDisplay *idisp=0, SWTextEncoding encoding=ENC_UNKNOWN, SWTextDirection dir=DIRECTION_LTR, SWTextMarkup markup=FMT_UNKNOWN, const char *ilang=0)
 Initializes data for instance of SWLD. More...

-virtual ~SWLD ()
virtual SWKeyCreateKey ()
 Allocates a key of specific type for module The different reimplementatiosn of SWModule (e.g. More...

virtual const char * KeyText (const char *ikeytext)
 Sets/gets module KeyText, getting from saved text if key is persistent. More...


Protected Attributes

-char * entkeytxt
-

Detailed Description

-the basis for all types of Lexicon and Dictionary modules (hence the 'LD'). -

- -

-Definition at line 34 of file swld.h.


Constructor & Destructor Documentation

-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SWLD::SWLD const char *   imodname = 0,
const char *   imoddesc = 0,
SWDisplay  idisp = 0,
SWTextEncoding   encoding = ENC_UNKNOWN,
SWTextDirection   dir = DIRECTION_LTR,
SWTextMarkup   markup = FMT_UNKNOWN,
const char *   ilang = 0
-
- - - - - -
-   - - -

-Initializes data for instance of SWLD. -

-

-Parameters:
- - - - -
imodname  -Internal name for module
imoddesc  -Name to display to user for module
idisp  -Display object to use for displaying
-
-

-Definition at line 17 of file swld.cpp. -

-References CreateKey(), and SWModule::key. -

-

00017                                                                                                                                                       : SWModule(imodname, imoddesc, idisp, "Lexicons / Dictionaries", enc, dir, mark, ilang)
-00018 {
-00019         delete key;
-00020         key = CreateKey();
-00021         entkeytxt = new char [1];
-00022         *entkeytxt = 0;
-00023 }
-
-


Member Function Documentation

-

- - - - -
- - - - - - - - - -
virtual SWKey* SWLD::CreateKey   [inline, virtual]
-
- - - - - -
-   - - -

-Allocates a key of specific type for module The different reimplementatiosn of SWModule (e.g. -

-SWText) support SWKey implementations, which support special. This functions returns a SWKey object which works with the current implementation of SWModule. For example for the SWText class it returns a VerseKey object.

-See also:
-VerseKey, ListKey, SWText, SWLD, SWCom
-Returns:
-pointer to allocated key
-

-Reimplemented from SWModule. -

-Definition at line 47 of file swld.h. -

-Referenced by SWLD(). -

-

00048   {
-00049     return new StrKey ();
-00050   }
-
-

- - - - -
- - - - - - - - - - -
const char * SWLD::KeyText const char *   ikeytext [virtual]
-
- - - - - -
-   - - -

-Sets/gets module KeyText, getting from saved text if key is persistent. -

-

-Parameters:
- - -
ikeytext  -value which to set keytext; [0] - only get
-
-Returns:
-pointer to keytext
-

-Reimplemented from SWModule. -

-Definition at line 47 of file swld.cpp. -

-References SWModule::getRawEntry(), SWModule::key, SWModule::KeyText(), and SWKey::Persist(). -

-

00048 {
-00049         if (key->Persist() && !ikeytext) {
-00050                 getRawEntry();  // force module key to snap to entry
-00051                 return entkeytxt;
-00052         }
-00053         else return SWModule::KeyText(ikeytext);
-00054 }
-
-


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:03 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_l_d__coll__graph.png b/doc/api-documentation/html/class_s_w_l_d__coll__graph.png deleted file mode 100644 index 5ddae86..0000000 Binary files a/doc/api-documentation/html/class_s_w_l_d__coll__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_s_w_l_d__inherit__graph.png b/doc/api-documentation/html/class_s_w_l_d__inherit__graph.png deleted file mode 100644 index a10a1e1..0000000 Binary files a/doc/api-documentation/html/class_s_w_l_d__inherit__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_s_w_locale-members.html b/doc/api-documentation/html/class_s_w_locale-members.html deleted file mode 100644 index a50ae3f..0000000 --- a/doc/api-documentation/html/class_s_w_locale-members.html +++ /dev/null @@ -1,30 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWLocale Member List

This is the complete list of members for SWLocale, including all inherited members. - - - - - - - - - - - - - - - -
BMAX (defined in SWLocale)SWLocale [private]
bookAbbrevs (defined in SWLocale)SWLocale [private]
books (defined in SWLocale)SWLocale [private]
description (defined in SWLocale)SWLocale [private]
getBookAbbrevs() (defined in SWLocale)SWLocale [virtual]
getBooks(char **iBMAX, struct sbook ***ibooks) (defined in SWLocale)SWLocale [virtual]
getDescription()SWLocale [virtual]
getName()SWLocale [virtual]
localeSource (defined in SWLocale)SWLocale [private]
lookupTable (defined in SWLocale)SWLocale [private]
name (defined in SWLocale)SWLocale [private]
operator+=(SWLocale &addFrom) (defined in SWLocale)SWLocale [virtual]
SWLocale(const char *ifilename) (defined in SWLocale)SWLocale
translate(const char *text) (defined in SWLocale)SWLocale [virtual]
~SWLocale() (defined in SWLocale)SWLocale [virtual]

Generated on Thu Jun 20 22:13:03 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_locale.html b/doc/api-documentation/html/class_s_w_locale.html deleted file mode 100644 index 2051f26..0000000 --- a/doc/api-documentation/html/class_s_w_locale.html +++ /dev/null @@ -1,146 +0,0 @@ - - -SWLocale class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWLocale Class Reference

SWLocale is used for the localisation of the booknames The SWLocale is a class which holds the information of one language. -More... -

-#include <swlocale.h> -

-Collaboration diagram for SWLocale:

Collaboration graph
- - - -
[legend]
List of all members. - - - - - - - - - - - - - - - - - - -

Public Methods

SWLocale (const char *ifilename)
-virtual ~SWLocale ()
virtual const char * getName ()
 This function is used to get the name of the languages which this object is handling. More...

virtual const char * getDescription ()
-virtual const char * translate (const char *text)
-virtual SWLocale & operator+= (SWLocale &addFrom)
-virtual const struct abbrev * getBookAbbrevs ()
-virtual void getBooks (char **iBMAX, struct sbook ***ibooks)

Private Attributes

-LookupMap lookupTable
-SWConfiglocaleSource
-char * name
-char * description
-abbrev * bookAbbrevs
-char * BMAX
-sbook ** books
-

Detailed Description

-SWLocale is used for the localisation of the booknames The SWLocale is a class which holds the information of one language. -

-Every language supported by Sword has one SWLocale object, get the name of the Language using

-See also:
-getname of this class. Another functions useful for frontend developers is , getDescription.
-

- -

-Definition at line 44 of file swlocale.h.


Member Function Documentation

-

- - - - -
- - - - - - - - - -
const char * SWLocale::getDescription   [virtual]
-
- - - - - -
-   - - -

-

-Returns:
-The description. A possible example is "German".
-

-Definition at line 91 of file swlocale.cpp. -

-

00091                                      {
-00092         return description;
-00093 }
-
-

- - - - -
- - - - - - - - - -
const char * SWLocale::getName   [virtual]
-
- - - - - -
-   - - -

-This function is used to get the name of the languages which this object is handling. -

-

-Returns:
-The name of the managed language. A possible example is "de".
-

-Definition at line 86 of file swlocale.cpp. -

-Referenced by LocaleMgr::loadConfigDir(). -

-

00086                               {
-00087         return name;
-00088 }
-
-


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:03 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_locale__coll__graph.png b/doc/api-documentation/html/class_s_w_locale__coll__graph.png deleted file mode 100644 index 5036b1d..0000000 Binary files a/doc/api-documentation/html/class_s_w_locale__coll__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_s_w_mgr-members.html b/doc/api-documentation/html/class_s_w_mgr-members.html deleted file mode 100644 index fd93103..0000000 --- a/doc/api-documentation/html/class_s_w_mgr-members.html +++ /dev/null @@ -1,59 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWMgr Member List

This is the complete list of members for SWMgr, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AddEncodingFilters(SWModule *module, ConfigEntMap &section)SWMgr [protected, virtual]
AddGlobalOptions(SWModule *module, ConfigEntMap &section, ConfigEntMap::iterator start, ConfigEntMap::iterator end) (defined in SWMgr)SWMgr [protected, virtual]
AddLocalOptions(SWModule *module, ConfigEntMap &section, ConfigEntMap::iterator start, ConfigEntMap::iterator end) (defined in SWMgr)SWMgr [protected, virtual]
AddModToConfig(int conffd, const char *fname) (defined in SWMgr)SWMgr [protected, virtual]
AddRawFilters(SWModule *module, ConfigEntMap &section)SWMgr [protected, virtual]
AddRenderFilters(SWModule *module, ConfigEntMap &section)SWMgr [protected, virtual]
AddStripFilters(SWModule *module, ConfigEntMap &section)SWMgr [protected, virtual]
cipherFilters (defined in SWMgr)SWMgr [protected]
cleanupFilters (defined in SWMgr)SWMgr [protected]
commonInit(SWConfig *iconfig, SWConfig *isysconfig, bool autoload, SWFilterMgr *filterMgr) (defined in SWMgr)SWMgr [private]
configSWMgr
configPath (defined in SWMgr)SWMgr
configType (defined in SWMgr)SWMgr [protected]
CreateMod(string name, string driver, ConfigEntMap &section) (defined in SWMgr)SWMgr [protected]
CreateMods() (defined in SWMgr)SWMgr [protected]
debugSWMgr [static]
DeleteMods() (defined in SWMgr)SWMgr [protected]
filterMgr (defined in SWMgr)SWMgr [protected]
findConfig(char *configType, char **prefixPath, char **configPath) (defined in SWMgr)SWMgr [static]
gbfplain (defined in SWMgr)SWMgr [protected]
getGlobalOption(const char *option)SWMgr [virtual]
getGlobalOptions()SWMgr [virtual]
getGlobalOptionTip(const char *option)SWMgr [virtual]
getGlobalOptionValues(const char *option) (defined in SWMgr)SWMgr [virtual]
globalConfPath (defined in SWMgr)SWMgr [static]
homeConfig (defined in SWMgr)SWMgr [protected]
init() (defined in SWMgr)SWMgr [protected, virtual]
InstallScan(const char *dir)SWMgr [virtual]
Load()SWMgr [virtual]
loadConfigDir(const char *ipath) (defined in SWMgr)SWMgr [protected, virtual]
ModulesSWMgr
myconfig (defined in SWMgr)SWMgr [protected]
mysysconfig (defined in SWMgr)SWMgr [protected]
optionFilters (defined in SWMgr)SWMgr [protected]
options (defined in SWMgr)SWMgr [protected]
prefixPathSWMgr
setCipherKey(const char *modName, const char *key)SWMgr [virtual]
setGlobalOption(const char *option, const char *value)SWMgr [virtual]
SWMgr(SWConfig *iconfig=0, SWConfig *isysconfig=0, bool autoload=true, SWFilterMgr *filterMgr=0)SWMgr
SWMgr(SWFilterMgr *filterMgr)SWMgr
SWMgr(const char *iConfigPath, bool autoload=true, SWFilterMgr *filterMgr=0)SWMgr
sysconfig (defined in SWMgr)SWMgr
thmlplain (defined in SWMgr)SWMgr [protected]
~SWMgr()SWMgr [virtual]

Generated on Thu Jun 20 22:13:03 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_mgr.html b/doc/api-documentation/html/class_s_w_mgr.html deleted file mode 100644 index 3740004..0000000 --- a/doc/api-documentation/html/class_s_w_mgr.html +++ /dev/null @@ -1,1296 +0,0 @@ - - -SWMgr class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWMgr Class Reference

SWMgr is the main class of the Sword library. -More... -

-#include <swmgr.h> -

-Collaboration diagram for SWMgr:

Collaboration graph
- - - -
[legend]
List of all members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Methods

 SWMgr (SWConfig *iconfig=0, SWConfig *isysconfig=0, bool autoload=true, SWFilterMgr *filterMgr=0)
 Constructor of SWMgr. More...

 SWMgr (SWFilterMgr *filterMgr)
 SWMgr (const char *iConfigPath, bool autoload=true, SWFilterMgr *filterMgr=0)
virtual ~SWMgr ()
 The destructor of SWMgr. More...

virtual void InstallScan (const char *dir)
 Installs a scan for modules in the directory givan as parameter. More...

virtual signed char Load ()
 Load the modules. More...

virtual void setGlobalOption (const char *option, const char *value)
 Set a global option Set a global option using the parameters. More...

virtual const char * getGlobalOption (const char *option)
 Gives the value of the given option. More...

virtual const char * getGlobalOptionTip (const char *option)
 Gives a description for the given option. More...

virtual OptionsList getGlobalOptions ()
 A list of all availble options with the currently set values. More...

-virtual OptionsList getGlobalOptionValues (const char *option)
virtual signed char setCipherKey (const char *modName, const char *key)
 Sets the cipher key for the given module. More...


Static Public Methods

-void findConfig (char *configType, char **prefixPath, char **configPath)

Public Attributes

SWConfigconfig
 The global config object. More...

-SWConfigsysconfig
ModMap Modules
 The map of available modules. More...

-char * prefixPath
 The path to your Sword directory.

-char * configPath

Static Public Attributes

bool debug = false
 Enable / Disable debug output on runtime Set this to true to get more verbose output of SWMgr at runtime. More...

-const char * globalConfPath = "/etc/sword.conf:/usr/local/etc/sword.conf"

Protected Methods

-void CreateMods ()
-SWModuleCreateMod (string name, string driver, ConfigEntMap &section)
-void DeleteMods ()
-virtual void init ()
-virtual char AddModToConfig (int conffd, const char *fname)
-virtual void loadConfigDir (const char *ipath)
-virtual void AddGlobalOptions (SWModule *module, ConfigEntMap &section, ConfigEntMap::iterator start, ConfigEntMap::iterator end)
-virtual void AddLocalOptions (SWModule *module, ConfigEntMap &section, ConfigEntMap::iterator start, ConfigEntMap::iterator end)
virtual void AddEncodingFilters (SWModule *module, ConfigEntMap &section)
 Adds the encoding filters which are defined in "section" to the SWModule object "module". More...

virtual void AddRenderFilters (SWModule *module, ConfigEntMap &section)
 Adds the render filters which are defined in "section" to the SWModule object "module". More...

virtual void AddStripFilters (SWModule *module, ConfigEntMap &section)
 Adds the strip filters which are defined in "section" to the SWModule object "module". More...

virtual void AddRawFilters (SWModule *module, ConfigEntMap &section)
 Adds the raw filters which are defined in "section" to the SWModule object "module". More...


Protected Attributes

-SWFilterMgr * filterMgr
-SWConfigmyconfig
-SWConfigmysysconfig
-SWConfighomeConfig
-char configType
-FilterMap optionFilters
-FilterMap cipherFilters
-SWFilter * gbfplain
-SWFilter * thmlplain
-FilterList cleanupFilters
-OptionsList options

Private Methods

-void commonInit (SWConfig *iconfig, SWConfig *isysconfig, bool autoload, SWFilterMgr *filterMgr)
-

Detailed Description

-SWMgr is the main class of the Sword library. -

-SWmgr manages the installed modules, the filters and global options like footnotes or strong numbers. The class SWMgr is the most important class of Sword. It is used to manage the installed modules. It also manages the filters (Render-, Strip- and Rawfilters). -

-To get the SWModule objects of the instalelled modules use Modules for this.

-See also:
-AddRawFilters(), AddRenderFilters(), AddStripFilters()
-Version:
-
-Id:
- swmgr.h,v 1.42 2002/03/22 05:26:34 scribe Exp
-

- -

-Definition at line 69 of file swmgr.h.


Constructor & Destructor Documentation

-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SWMgr::SWMgr SWConfig  iconfig = 0,
SWConfig  isysconfig = 0,
bool   autoload = true,
SWFilterMgr *   filterMgr = 0
-
- - - - - -
-   - - -

-Constructor of SWMgr. -

-

-Parameters:
- - - - - -
iconfig  -
isysconfig  -
autoload  -If this bool is true the constructor starts loading the installed modules. If you reimplemented SWMgr you can set autoload=false to load the modules with your own reimplemented function.
filterMgr  -an SWFilterMgr subclass to use to manager filters on modules THIS WILL BE DELETED BY SWMgr
-
-

-Definition at line 179 of file swmgr.cpp. -

-

00179                                                                                            {
-00180         commonInit(iconfig, isysconfig, autoload, filterMgr);
-00181 }
-
-

- - - - -
- - - - - - - - - - -
SWMgr::SWMgr SWFilterMgr *   filterMgr
-
- - - - - -
-   - - -

-

-Parameters:
- - -
filterMgr  -an SWFilterMgr subclass to use to manager filters on modules THIS WILL BE DELETED BY SWMgr
-
-

-Definition at line 174 of file swmgr.cpp. -

-

00174                                    {
-00175         commonInit(0, 0, true, filterMgr);
-00176 }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
SWMgr::SWMgr const char *   iConfigPath,
bool   autoload = true,
SWFilterMgr *   filterMgr = 0
-
- - - - - -
-   - - -

-

-Parameters:
- - - -
autoload  -If this bool is true the constructor starts loading the installed modules. If you reimplemented SWMgr you can set autoload=false to load the modules with your own reimplemented function.
filterMgr  -an SWFilterMgr subclass to use to manager filters on modules THIS WILL BE DELETED BY SWMgr
-
-

-Definition at line 207 of file swmgr.cpp. -

-References config, Load(), and prefixPath. -

-

00207                                                                            {
-00208 
-00209         string path;
-00210         
-00211         this->filterMgr = filterMgr;
-00212         if (filterMgr)
-00213                 filterMgr->setParentMgr(this);
-00214 
-00215         init();
-00216         
-00217         path = iConfigPath;
-00218         if ((iConfigPath[strlen(iConfigPath)-1] != '\\') && (iConfigPath[strlen(iConfigPath)-1] != '/'))
-00219                 path += "/";
-00220         if (FileMgr::existsFile(path.c_str(), "mods.conf")) {
-00221                 stdstr(&prefixPath, path.c_str());
-00222                 path += "mods.conf";
-00223                 stdstr(&configPath, path.c_str());
-00224         }
-00225         else {
-00226                 if (FileMgr::existsDir(path.c_str(), "mods.d")) {
-00227                         stdstr(&prefixPath, path.c_str());
-00228                         path += "mods.d";
-00229                         stdstr(&configPath, path.c_str());
-00230                         configType = 1;
-00231                 }
-00232         }
-00233 
-00234         config = 0;
-00235         sysconfig = 0;
-00236 
-00237         if (autoload && configPath)
-00238                 Load();
-00239 }
-
-

- - - - -
- - - - - - - - - -
SWMgr::~SWMgr   [virtual]
-
- - - - - -
-   - - -

-The destructor of SWMgr. -

-This function cleans up the modules and deletes the created object. Destroy the SWMgr at last object in your application, because otherwise you may experience crashes because the SWModule objects become invalid. -

-Definition at line 242 of file swmgr.cpp. -

-References prefixPath. -

-

00242               {
-00243 
-00244         DeleteMods();
-00245 
-00246         for (FilterList::iterator it = cleanupFilters.begin(); it != cleanupFilters.end(); it++)
-00247                 delete (*it);
-00248                         
-00249         if (homeConfig)
-00250                 delete homeConfig;
-00251 
-00252         if (myconfig)
-00253                 delete myconfig;
-00254 
-00255         if (prefixPath)
-00256                 delete [] prefixPath;
-00257 
-00258         if (configPath)
-00259                 delete [] configPath;
-00260 
-00261         if (filterMgr)
-00262                 delete filterMgr;
-00263 }
-
-


Member Function Documentation

-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void SWMgr::AddEncodingFilters SWModule  module,
ConfigEntMap &   section
[protected, virtual]
-
- - - - - -
-   - - -

-Adds the encoding filters which are defined in "section" to the SWModule object "module". -

-

-Parameters:
- - - -
module  -To this module the encoding filter(s) are added
section  -We use this section to get a list of filters we should apply to the module
-
-

-Definition at line 808 of file swmgr.cpp. -

-

00808                                                                       {
-00809 
-00810         if (filterMgr)
-00811                 filterMgr->AddEncodingFilters(module, section);
-00812 }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void SWMgr::AddRawFilters SWModule  module,
ConfigEntMap &   section
[protected, virtual]
-
- - - - - -
-   - - -

-Adds the raw filters which are defined in "section" to the SWModule object "module". -

-

-Parameters:
- - - -
module  -To this module the raw filter(s) are added
section  -We use this section to get a list of filters we should apply to the module
-
-

-Definition at line 791 of file swmgr.cpp. -

-References SWModule::AddRawFilter(), and SWModule::Name(). -

-

00791                                                                  {
-00792         string sourceformat, cipherKey;
-00793         ConfigEntMap::iterator entry;
-00794 
-00795         cipherKey = ((entry = section.find("CipherKey")) != section.end()) ? (*entry).second : (string)"";
-00796         if (!cipherKey.empty()) {
-00797                 SWFilter *cipherFilter = new CipherFilter(cipherKey.c_str());
-00798                 cipherFilters.insert(FilterMap::value_type(module->Name(), cipherFilter));
-00799                 cleanupFilters.push_back(cipherFilter);
-00800                 module->AddRawFilter(cipherFilter);
-00801         }
-00802 
-00803         if (filterMgr)
-00804                 filterMgr->AddRawFilters(module, section);
-00805 }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void SWMgr::AddRenderFilters SWModule  module,
ConfigEntMap &   section
[protected, virtual]
-
- - - - - -
-   - - -

-Adds the render filters which are defined in "section" to the SWModule object "module". -

-

-Parameters:
- - - -
module  -To this module the render filter(s) are added
section  -We use this section to get a list of filters we should apply to the module
-
-

-Definition at line 815 of file swmgr.cpp. -

-

00815                                                                     {
-00816         string sourceformat;
-00817         ConfigEntMap::iterator entry;
-00818 
-00819         sourceformat = ((entry = section.find("SourceType")) != section.end()) ? (*entry).second : (string)"";
-00820 
-00821         // Temporary: To support old module types
-00822         // TODO: Remove at 1.6.0 release?
-00823         if (sourceformat.empty()) {
-00824                 sourceformat = ((entry = section.find("ModDrv")) != section.end()) ? (*entry).second : (string)"";
-00825                 if (!stricmp(sourceformat.c_str(), "RawGBF"))
-00826                         sourceformat = "GBF";
-00827                 else sourceformat = "";
-00828         }
-00829 
-00830 // process module       - eg. follows
-00831 //      if (!stricmp(sourceformat.c_str(), "GBF")) {
-00832 //              module->AddRenderFilter(gbftortf);
-00833 //      }
-00834 
-00835         if (filterMgr)
-00836                 filterMgr->AddRenderFilters(module, section);
-00837 
-00838 }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void SWMgr::AddStripFilters SWModule  module,
ConfigEntMap &   section
[protected, virtual]
-
- - - - - -
-   - - -

-Adds the strip filters which are defined in "section" to the SWModule object "module". -

-

-Parameters:
- - - -
module  -To this module the strip filter(s) are added
section  -We use this section to get a list of filters we should apply to the module
-
-

-Definition at line 841 of file swmgr.cpp. -

-References SWModule::AddStripFilter(). -

-

00842 {
-00843         string sourceformat;
-00844         ConfigEntMap::iterator entry;
-00845 
-00846         sourceformat = ((entry = section.find("SourceType")) != section.end()) ? (*entry).second : (string)"";
-00847         // Temporary: To support old module types
-00848         if (sourceformat.empty()) {
-00849                 sourceformat = ((entry = section.find("ModDrv")) != section.end()) ? (*entry).second : (string)"";
-00850                 if (!stricmp(sourceformat.c_str(), "RawGBF"))
-00851                         sourceformat = "GBF";
-00852                 else sourceformat = "";
-00853         }
-00854         
-00855         if (!stricmp(sourceformat.c_str(), "GBF")) {
-00856                 module->AddStripFilter(gbfplain);
-00857         }
-00858         else if (!stricmp(sourceformat.c_str(), "ThML")) {
-00859                 module->AddStripFilter(thmlplain);
-00860         }
-00861 
-00862         if (filterMgr)
-00863                 filterMgr->AddStripFilters(module, section);
-00864 
-00865 }
-
-

- - - - -
- - - - - - - - - - -
const char * SWMgr::getGlobalOption const char *   option [virtual]
-
- - - - - -
-   - - -

-Gives the value of the given option. -

-

-Parameters:
- - -
The  -option, which should be used to return the value of it
-
-Returns:
-The value of the given option
-

-Definition at line 988 of file swmgr.cpp. -

-

00989 {
-00990         for (FilterMap::iterator it = optionFilters.begin(); it != optionFilters.end(); it++) {
-00991                 if ((*it).second->getOptionName()) {
-00992                         if (!stricmp(option, (*it).second->getOptionName()))
-00993                                 return (*it).second->getOptionValue();
-00994                 }
-00995         }
-00996         return 0;
-00997 }
-
-

- - - - -
- - - - - - - - - -
OptionsList SWMgr::getGlobalOptions   [virtual]
-
- - - - - -
-   - - -

-A list of all availble options with the currently set values. -

-

-Returns:
-This function returns a list of global options.
-

-Definition at line 1012 of file swmgr.cpp. -

-

01013 {
-01014         return options;
-01015 }
-
-

- - - - -
- - - - - - - - - - -
const char * SWMgr::getGlobalOptionTip const char *   option [virtual]
-
- - - - - -
-   - - -

-Gives a description for the given option. -

-

-Parameters:
- - -
option  -The option, which should be used
-
-Returns:
-A description of the given option
-See also:
-setGlobalOption, getGlobalOption, getGlobalOptions
-

-Definition at line 1000 of file swmgr.cpp. -

-

01001 {
-01002         for (FilterMap::iterator it = optionFilters.begin(); it != optionFilters.end(); it++) {
-01003                 if ((*it).second->getOptionName()) {
-01004                         if (!stricmp(option, (*it).second->getOptionName()))
-01005                                 return (*it).second->getOptionTip();
-01006                 }
-01007         }
-01008         return 0;
-01009 }
-
-

- - - - -
- - - - - - - - - - -
void SWMgr::InstallScan const char *   dir [virtual]
-
- - - - - -
-   - - -

-Installs a scan for modules in the directory givan as parameter. -

-

-Parameters:
- - -
dir  -The directory where new modules should be searched.
-
-

-Definition at line 914 of file swmgr.cpp. -

-References config, and SWConfig::filename. -

-Referenced by Load(). -

-

00915 {
-00916    DIR *dir;
-00917    struct dirent *ent;
-00918    int conffd = 0;
-00919    string newmodfile;
-00920    string targetName;
-00921  
-00922         if (!access(dirname, 04)) {
-00923           if ((dir = opendir(dirname))) {
-00924                rewinddir(dir);
-00925                while ((ent = readdir(dir))) {
-00926                     if ((strcmp(ent->d_name, ".")) && (strcmp(ent->d_name, ".."))) {
-00927                          newmodfile = dirname;
-00928                          if ((dirname[strlen(dirname)-1] != '\\') && (dirname[strlen(dirname)-1] != '/'))
-00929                               newmodfile += "/";
-00930                          newmodfile += ent->d_name;
-00931                          if (configType) {
-00932                               if (config > 0)
-00933                                    close(conffd);
-00934                               targetName = configPath;
-00935                               if ((configPath[strlen(configPath)-1] != '\\') && (configPath[strlen(configPath)-1] != '/'))
-00936                                    targetName += "/";
-00937                               targetName += ent->d_name;
-00938                               conffd = open(targetName.c_str(), O_WRONLY|O_CREAT, S_IREAD|S_IWRITE);
-00939                          }
-00940                          else {
-00941                               if (conffd < 1) {
-00942                                    conffd = open(config->filename.c_str(), O_WRONLY|O_APPEND);
-00943                                    if (conffd > 0)
-00944                                         lseek(conffd, 0L, SEEK_END);
-00945                               }
-00946                          }
-00947                          AddModToConfig(conffd, newmodfile.c_str());
-00948                          unlink(newmodfile.c_str());
-00949                     }
-00950                }
-00951                if (conffd > 0)
-00952                     close(conffd);
-00953                closedir(dir);
-00954           }
-00955      }
-00956 }
-
-

- - - - -
- - - - - - - - - -
signed char SWMgr::Load   [virtual]
-
- - - - - -
-   - - -

-Load the modules. -

-Reimplement this function to use your own Load function, for example to use your own filters. -

-Definition at line 536 of file swmgr.cpp. -

-References config, InstallScan(), SWConfig::Load(), Modules, prefixPath, and SWConfig::Sections. -

-Referenced by SWMgr(). -

-

00536                         {
-00537         signed char ret = 0;
-00538 
-00539         if (!config) {  // If we weren't passed a config object at construction, find a config file
-00540                 if (!configPath)        // If we weren't passed a config path at construction...
-00541                         findConfig(&configType, &prefixPath, &configPath);
-00542                 if (configPath) {
-00543                         if (configType)
-00544                                 loadConfigDir(configPath);
-00545                         else    config = myconfig = new SWConfig(configPath);
-00546                 }
-00547         }
-00548 
-00549         if (config) {
-00550                 SectionMap::iterator Sectloop, Sectend;
-00551                 ConfigEntMap::iterator Entryloop, Entryend;
-00552 
-00553                 DeleteMods();
-00554 
-00555                 for (Sectloop = config->Sections.lower_bound("Globals"), Sectend = config->Sections.upper_bound("Globals"); Sectloop != Sectend; Sectloop++) {          // scan thru all 'Globals' sections
-00556                         for (Entryloop = (*Sectloop).second.lower_bound("AutoInstall"), Entryend = (*Sectloop).second.upper_bound("AutoInstall"); Entryloop != Entryend; Entryloop++)   // scan thru all AutoInstall entries
-00557                                 InstallScan((*Entryloop).second.c_str());               // Scan AutoInstall entry directory for new modules and install
-00558                 }               
-00559                 if (configType) {       // force reload on config object because we may have installed new modules
-00560                         delete myconfig;
-00561                         config = myconfig = 0;
-00562                         loadConfigDir(configPath);
-00563                 }
-00564                 else    config->Load();
-00565 
-00566                 CreateMods();
-00567 
-00568 //      augment config with ~/.sword/mods.d if it exists ---------------------
-00569                         char *envhomedir  = getenv ("HOME");
-00570                         if (envhomedir != NULL && configType != 2) { // 2 = user only
-00571                                 string path = envhomedir;
-00572                                 if ((envhomedir[strlen(envhomedir)-1] != '\\') && (envhomedir[strlen(envhomedir)-1] != '/'))
-00573                                         path += "/";
-00574                                 path += ".sword/";
-00575                                 if (FileMgr::existsDir(path.c_str(), "mods.d")) {
-00576                                         char *savePrefixPath = 0;
-00577                                         char *saveConfigPath = 0;
-00578                                         SWConfig *saveConfig = 0;
-00579                                         stdstr(&savePrefixPath, prefixPath);
-00580                                         stdstr(&prefixPath, path.c_str());
-00581                                         path += "mods.d";
-00582                                         stdstr(&saveConfigPath, configPath);
-00583                                         stdstr(&configPath, path.c_str());
-00584                                         saveConfig = config;
-00585                                         config = myconfig = 0;
-00586                                         loadConfigDir(configPath);
-00587 
-00588                                         CreateMods();
-00589 
-00590                                         stdstr(&prefixPath, savePrefixPath);
-00591                                         delete []savePrefixPath;
-00592                                         stdstr(&configPath, saveConfigPath);
-00593                                         delete []saveConfigPath;
-00594                                         (*saveConfig) += *config;
-00595                                         homeConfig = myconfig;
-00596                                         config = myconfig = saveConfig;
-00597                                 }
-00598                         }
-00599 // -------------------------------------------------------------------------
-00600                 if ( !Modules.size() ) // config exists, but no modules
-00601                         ret = 1;
-00602 
-00603         }
-00604         else {
-00605                 SWLog::systemlog->LogError("SWMgr: Can't find 'mods.conf' or 'mods.d'.  Try setting:\n\tSWORD_PATH=<directory containing mods.conf>\n\tOr see the README file for a full description of setup options (%s)", (configPath) ? configPath : "<configPath is null>");
-00606                 ret = -1;
-00607         }
-00608 
-00609         return ret;
-00610 }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
signed char SWMgr::setCipherKey const char *   modName,
const char *   key
[virtual]
-
- - - - - -
-   - - -

-Sets the cipher key for the given module. -

-This function updates the key at runtime, but it does not write to the config file. To write the new unlock key to the config file use code like this: -

-

 SectionMap::iterator section;
- ConfigEntMap::iterator entry;
- DIR *dir = opendir(configPath);
- struct dirent *ent;
- char* modFile;
- if (dir) {    // find and update .conf file
-   rewinddir(dir);
-   while ((ent = readdir(dir)))
-   {
-     if ((strcmp(ent->d_name, ".")) && (strcmp(ent->d_name, "..")))
-     {
-       modFile = m_backend->configPath;
-       modFile += "/";
-       modFile += ent->d_name;
-       SWConfig *myConfig = new SWConfig( modFile );
-       section = myConfig->Sections.find( m_module->Name() );
-       if ( section != myConfig->Sections.end() )
-       {
-         entry = section->second.find("CipherKey");
-         if (entry != section->second.end())
-         {
-           entry->second = unlockKey;//set cipher key
-           myConfig->Save();//save config file
-         }
-       }
-       delete myConfig;
-     }
-   }
- }
- closedir(dir);
-
-Parameters:
- - -
modName  -For this module we change the unlockKey
-
-an key This is the new unlck key we use for te module.
-
-

-Definition at line 1033 of file swmgr.cpp. -

-References Modules. -

-

01033                                                                     {
-01034         FilterMap::iterator it;
-01035         ModMap::iterator it2;
-01036 
-01037         // check for filter that already exists
-01038         it = cipherFilters.find(modName);
-01039         if (it != cipherFilters.end()) {
-01040                 ((CipherFilter *)(*it).second)->getCipher()->setCipherKey(key);
-01041                 return 0;
-01042         }
-01043         // check if module exists
-01044         else {
-01045                 it2 = Modules.find(modName);
-01046                 if (it2 != Modules.end()) {
-01047                         SWFilter *cipherFilter = new CipherFilter(key);
-01048                         cipherFilters.insert(FilterMap::value_type(modName, cipherFilter));
-01049                         cleanupFilters.push_back(cipherFilter);
-01050                         (*it2).second->AddRawFilter(cipherFilter);
-01051                         return 0;
-01052                 }
-01053         }
-01054         return -1;
-01055 }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void SWMgr::setGlobalOption const char *   option,
const char *   value
[virtual]
-
- - - - - -
-   - - -

-Set a global option Set a global option using the parameters. -

-A global option could be for example footnotes.

-Parameters:
- - - -
option  -The name of the option, for which you want to change the value. Well known and often used values are "Footnotes" or "Strongs"
value  -The value. Common values are "On" and "Off"
-
-

-Definition at line 977 of file swmgr.cpp. -

-

00978 {
-00979         for (FilterMap::iterator it = optionFilters.begin(); it != optionFilters.end(); it++) {
-00980                 if ((*it).second->getOptionName()) {
-00981                         if (!stricmp(option, (*it).second->getOptionName()))
-00982                                 (*it).second->setOptionValue(value);
-00983                 }
-00984         }
-00985 }
-
-


Member Data Documentation

-

- - - - -
- - -
SWConfig* SWMgr::config -
-
- - - - - -
-   - - -

-The global config object. -

-This is the global config object. It contains all items of all modules, so lookups of entries should use this config object. If you want to save a cipher key or other things to the module config file, DO NOT USE this object, because it would corrupt your config files after config->Save(). -

-If you want to write to the modules config file read the informtaion of setCipherKey() for an example of this. -

-Definition at line 145 of file swmgr.h. -

-Referenced by InstallScan(), Load(), and SWMgr().

-

- - - - -
- - -
bool SWMgr::debug = false [static] -
-
- - - - - -
-   - - -

-Enable / Disable debug output on runtime Set this to true to get more verbose output of SWMgr at runtime. -

-Set it to false to get no debug output. The default is "false". -

-Definition at line 81 of file swmgr.cpp.

-

- - - - -
- - -
ModMap SWMgr::Modules -
-
- - - - - -
-   - - -

-The map of available modules. -

-This map contains thew list of available modules in Sword. Here's an example how to got through the map and how toc ehck for the module type. -

-

 ModMap::iterator it;
- SWModule*      curMod = 0;
-
- for (it = Modules.begin(); it != Modules.end(); it++) {
-     curMod = (*it).second;
-     if (!strcmp(curMod->Type(), "Biblical Texts")) {
-       //do something with curMod
-     }
-     else if (!strcmp(curMod->Type(), "Commentaries")) {
-       //do something with curMod
-     }
-     else if (!strcmp(curMod->Type(), "Lexicons / Dictionaries")) {
-       //do something with curMod
-     }
- }
-
-

-Definition at line 172 of file swmgr.h. -

-Referenced by Load(), and setCipherKey().

-


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:03 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_mgr__coll__graph.png b/doc/api-documentation/html/class_s_w_mgr__coll__graph.png deleted file mode 100644 index a2eeafc..0000000 Binary files a/doc/api-documentation/html/class_s_w_mgr__coll__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_s_w_module-members.html b/doc/api-documentation/html/class_s_w_module-members.html deleted file mode 100644 index 4c789c7..0000000 --- a/doc/api-documentation/html/class_s_w_module-members.html +++ /dev/null @@ -1,113 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWModule Member List

This is the complete list of members for SWModule, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AddEncodingFilter(SWFilter *newfilter)SWModule [inline, virtual]
AddOptionFilter(SWFilter *newfilter)SWModule [inline, virtual]
AddRawFilter(SWFilter *newfilter)SWModule [inline, virtual]
AddRenderFilter(SWFilter *newfilter)SWModule [inline, virtual]
AddStripFilter(SWFilter *newfilter)SWModule [inline, virtual]
config (defined in SWModule)SWModule [protected]
CreateKey()SWModule [virtual]
createModule(const char *)SWModule [inline, static]
createSearchFramework() (defined in SWModule)SWModule [inline, virtual]
deleteEntry()SWModule [inline, virtual]
Description(const char *imoddesc=0)SWModule [virtual]
Direction(signed char newdir=-1)SWModule [virtual]
direction (defined in SWModule)SWModule [protected]
Disp(SWDisplay *idisp=0)SWModule [virtual]
dispSWModule [protected]
Display()SWModule [virtual]
Encoding(signed char enc=-1)SWModule [virtual]
encoding (defined in SWModule)SWModule [protected]
encodingFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
encodingFiltersSWModule [protected]
entryAttributes (defined in SWModule)SWModule [protected]
entrybuf (defined in SWModule)SWModule [protected]
entrybufallocsize (defined in SWModule)SWModule [protected]
entrySize (defined in SWModule)SWModule [protected]
error (defined in SWModule)SWModule [protected]
Error()SWModule [virtual]
filterBuffer(FilterList *filters, char *buf, long size, SWKey *key)SWModule [inline, virtual]
flush() (defined in SWCacher)SWCacher [virtual]
getConfig() const (defined in SWModule)SWModule [inline, virtual]
getConfigEntry(const char *key) const (defined in SWModule)SWModule [virtual]
getEntryAttributes() const (defined in SWModule)SWModule [inline, virtual]
getEntrySize() constSWModule [inline, virtual]
getRawEntry()=0SWModule [pure virtual]
getSkipConsecutiveLinks() (defined in SWModule)SWModule [inline, virtual]
hasSearchFramework() (defined in SWModule)SWModule [inline, virtual]
isProcessEntryAttributes() const (defined in SWModule)SWModule [inline, virtual]
isSearchOptimallySupported(const char *istr, int searchType, int flags, SWKey *scope)SWModule [inline, virtual]
isUnicode() constSWModule [inline, virtual]
isWritable()SWModule [inline, virtual]
Key() constSWModule [inline, virtual]
Key(const SWKey &ikey)SWModule [inline, virtual]
keySWModule [protected]
KeyText(const char *imodtype=0)SWModule [virtual]
Lang(const char *imodlang=0)SWModule [virtual]
lastAccess() (defined in SWCacher)SWCacher [virtual]
listkey (defined in SWModule)SWModule [protected]
Markup(signed char enc=-1)SWModule [virtual]
markup (defined in SWModule)SWModule [protected]
moddesc (defined in SWModule)SWModule [protected]
modlang (defined in SWModule)SWModule [protected]
modname (defined in SWModule)SWModule [protected]
modtype (defined in SWModule)SWModule [protected]
Name(const char *imodname=0)SWModule [virtual]
nullPercent(char percent, void *userData)SWModule [static]
operator const char *()SWModule [virtual]
operator SWKey &()SWModule [inline, virtual]
operator SWKey *()SWModule [inline, virtual]
operator++(int)SWModule [inline, virtual]
operator+=(int increment)SWModule [virtual]
operator--(int)SWModule [inline, virtual]
operator-=(int decrement)SWModule [virtual]
operator<<(const char *)SWModule [inline, virtual]
operator<<(const SWKey *)SWModule [inline, virtual]
operator=(SW_POSITION p)SWModule [virtual]
optionFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
optionFiltersSWModule [protected]
ownConfig (defined in SWModule)SWModule [protected]
procEntAttr (defined in SWModule)SWModule [protected]
processEntryAttributes(bool val) const (defined in SWModule)SWModule [inline, virtual]
rawdisp (defined in SWModule)SWModule [protected, static]
rawFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
rawFiltersSWModule [protected]
RemoveEncodingFilter(SWFilter *oldfilter)SWModule [inline, virtual]
RemoveRenderFilter(SWFilter *oldfilter)SWModule [inline, virtual]
renderFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
renderFiltersSWModule [protected]
RenderText(char *buf=0, int len=-1, bool render=true)SWModule [virtual]
RenderText(SWKey *tmpKey)SWModule [virtual]
ReplaceEncodingFilter(SWFilter *oldfilter, SWFilter *newfilter)SWModule [inline, virtual]
ReplaceRenderFilter(SWFilter *oldfilter, SWFilter *newfilter)SWModule [inline, virtual]
resourceConsumption() (defined in SWCacher)SWCacher [virtual]
Search(const char *istr, int searchType=0, int flags=0, SWKey *scope=0, bool *justCheckIfSupported=0, void(*percent)(char, void *)=&nullPercent, void *percentUserData=0)SWModule [virtual]
setConfig(ConfigEntMap *config) (defined in SWModule)SWModule [virtual]
setentry(const char *inbuf, long len)SWModule [inline, virtual]
SetKey(const SWKey *ikey)SWModule [virtual]
SetKey(const SWKey &ikey)SWModule [virtual]
setSkipConsecutiveLinks(bool val)SWModule [inline, virtual]
skipConsecutiveLinks (defined in SWModule)SWModule [protected]
stripFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
stripFiltersSWModule [protected]
StripText(char *buf=0, int len=-1)SWModule [virtual]
StripText(SWKey *tmpKey)SWModule [virtual]
SWCacher() (defined in SWCacher)SWCacher
SWModule(const char *imodname=0, const char *imoddesc=0, SWDisplay *idisp=0, char *imodtype=0, SWTextEncoding encoding=ENC_UNKNOWN, SWTextDirection dir=DIRECTION_LTR, SWTextMarkup markup=FMT_UNKNOWN, const char *modlang=0)SWModule
terminateSearchSWModule
Type(const char *imodtype=0)SWModule [virtual]
~SWCacher() (defined in SWCacher)SWCacher [virtual]
~SWModule()SWModule [virtual]

Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_module.html b/doc/api-documentation/html/class_s_w_module.html deleted file mode 100644 index c292be8..0000000 --- a/doc/api-documentation/html/class_s_w_module.html +++ /dev/null @@ -1,3339 +0,0 @@ - - -SWModule class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWModule Class Reference

The class SWModule is the base class for all modules used in Sword. -More... -

-#include <swmodule.h> -

-Inheritance diagram for SWModule:

Inheritance graph
- - - - - - -
[legend]
Collaboration diagram for SWModule:

Collaboration graph
- - - - - - - -
[legend]
List of all members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Methods

 SWModule (const char *imodname=0, const char *imoddesc=0, SWDisplay *idisp=0, char *imodtype=0, SWTextEncoding encoding=ENC_UNKNOWN, SWTextDirection dir=DIRECTION_LTR, SWTextMarkup markup=FMT_UNKNOWN, const char *modlang=0)
 Initializes data for instance of SWModule. More...

-virtual ~SWModule ()
 Cleans up instance of SWModule.

virtual char Error ()
 Gets and clears error status. More...

virtual const bool isUnicode () const
-virtual const ConfigEntMap & getConfig () const
-virtual void setConfig (ConfigEntMap *config)
-virtual const char * getConfigEntry (const char *key) const
virtual const int getEntrySize () const
virtual char SetKey (const SWKey *ikey)
 Sets a key to this module for position to a particular record or set of records. More...

virtual char SetKey (const SWKey &ikey)
 Sets the key of this module. More...

virtual SWKeyKey () const
 Gets the current module key. More...

virtual char Key (const SWKey &ikey)
 Sets the current key of the module to ikey, and returns the keytext. More...

virtual const char * KeyText (const char *imodtype=0)
 Sets/gets module KeyText. More...

virtual char Display ()
 Calls this modules display object and passes itself. More...

virtual SWDisplayDisp (SWDisplay *idisp=0)
 Sets/gets display driver. More...

virtual char * Name (const char *imodname=0)
 Sets/gets module name. More...

virtual char * Description (const char *imoddesc=0)
 Sets/gets module description. More...

virtual char * Type (const char *imodtype=0)
 Sets/gets module type. More...

virtual char Direction (signed char newdir=-1)
 Sets/gets module direction. More...

virtual char Encoding (signed char enc=-1)
 Sets/gets module encoding. More...

virtual char Markup (signed char enc=-1)
 Sets/gets module markup. More...

virtual char * Lang (const char *imodlang=0)
 Sets/gets module language. More...

virtual ListKeySearch (const char *istr, int searchType=0, int flags=0, SWKey *scope=0, bool *justCheckIfSupported=0, void(*percent)(char, void *)=&nullPercent, void *percentUserData=0)
 Searches a module for a string. More...

-virtual signed char createSearchFramework ()
-virtual bool hasSearchFramework ()
virtual bool isSearchOptimallySupported (const char *istr, int searchType, int flags, SWKey *scope)
 Check if the search is optimally supported (e.g. More...

virtual SWKeyCreateKey ()
 Allocates a key of specific type for module The different reimplementatiosn of SWModule (e.g. More...

virtual operator const char * ()
 Renders and returns the current module text. More...

virtual char * getRawEntry ()=0
 This function is reimplemented by the different kinds of module objects. More...

virtual operator SWKey & ()
 Cast operator to cast to a SWKey reference. More...

virtual operator SWKey * ()
 Operator to cast to an SWKey pointer. More...

virtual bool isWritable ()
 Is the module writable? :). More...

virtual SWModule & setentry (const char *inbuf, long len)
 Modify the current module entry text only if module isWritable. More...

virtual SWModule & operator<< (const char *)
 Modify the current module entry text only if module isWritable. More...

virtual SWModule & operator<< (const SWKey *)
 Link the current module entry to another module entry only if module isWritable. More...

-virtual void deleteEntry ()
 Delete current module entry - only if module isWritable.

virtual SWModule & operator-= (int decrement)
 Decrements module key a number of entries. More...

virtual SWModule & operator+= (int increment)
 Increments module key a number of entries. More...

-virtual SWModule & operator++ (int)
 Increments module key by 1 entry.

-virtual SWModule & operator-- (int)
 Decrements module key by 1 entry.

virtual SWModule & operator= (SW_POSITION p)
 Positions this modules to an entry. More...

virtual SWModule & AddRenderFilter (SWFilter *newfilter)
 Adds a RenderFilter to this module's. More...

virtual SWModule & RemoveRenderFilter (SWFilter *oldfilter)
 Removes a RenderFilter from this module's. More...

virtual SWModule & ReplaceRenderFilter (SWFilter *oldfilter, SWFilter *newfilter)
 Replaces a RenderFilter in this module's. More...

virtual void renderFilter (char *buf, long size, SWKey *key)
 RenderFilter a text buffer. More...

virtual SWModule & AddEncodingFilter (SWFilter *newfilter)
 Adds an EncodingFilter to this module's. More...

virtual SWModule & RemoveEncodingFilter (SWFilter *oldfilter)
 Removes an EncodingFilter from this module's. More...

virtual SWModule & ReplaceEncodingFilter (SWFilter *oldfilter, SWFilter *newfilter)
 Replaces an EncodingFilter in this module's. More...

virtual void encodingFilter (char *buf, long size, SWKey *key)
 encodingFilter a text buffer. More...

virtual SWModule & AddStripFilter (SWFilter *newfilter)
 Adds a StripFilter to this module's stripfilters queue. More...

virtual void stripFilter (char *buf, long size, SWKey *key)
 StripFilter a text buffer. More...

virtual SWModule & AddRawFilter (SWFilter *newfilter)
 Adds a RawFilter to this module's rawfilters queue. More...

virtual void filterBuffer (FilterList *filters, char *buf, long size, SWKey *key)
 FilterBuffer a text buffer. More...

virtual void rawFilter (char *buf, long size, SWKey *key)
 RawFilter a text buffer. More...

virtual SWModule & AddOptionFilter (SWFilter *newfilter)
 Adds an OptionFilter to this module's optionfilters queue. More...

virtual void optionFilter (char *buf, long size, SWKey *key)
 OptionFilter a text buffer. More...

virtual const char * StripText (char *buf=0, int len=-1)
 calls all StripFilters on buffer or current text. More...

virtual const char * RenderText (char *buf=0, int len=-1, bool render=true)
 calls all RenderFilters on buffer or current text. More...

virtual const char * StripText (SWKey *tmpKey)
 calls all StripFilters on current text. More...

virtual const char * RenderText (SWKey *tmpKey)
 calls all RenderFilters on current text. More...

virtual void setSkipConsecutiveLinks (bool val)
 option to specify behaviour when iterating over consecutive entried linked to same text. More...

-virtual bool getSkipConsecutiveLinks ()
-virtual AttributeTypeList & getEntryAttributes () const
-virtual void processEntryAttributes (bool val) const
-virtual bool isProcessEntryAttributes () const

Static Public Methods

void nullPercent (char percent, void *userData)
 This is the default callback function for searching. More...

signed char createModule (const char *)
 Creates a new module. More...


Public Attributes

bool terminateSearch
 Set this bool to false to terminate the search which is executed by this module (Search). More...


Protected Attributes

-ConfigEntMap ownConfig
-ConfigEntMap * config
-AttributeTypeList entryAttributes
-bool procEntAttr
-char error
-bool skipConsecutiveLinks
-SWKeykey
 the current key.

-ListKey listkey
-char * modname
-char * moddesc
-char * modtype
-char * modlang
-char direction
-char markup
-char encoding
-SWDisplaydisp
 this module's display object.

-char * entrybuf
-unsigned long entrybufallocsize
-FilterList * stripFilters
 executed to remove all markup (for searches).

-FilterList * rawFilters
 executed immediately upon fileread.

-FilterList * renderFilters
 executed to format for display.

-FilterList * optionFilters
 executed to change markup to user prefs.

-FilterList * encodingFilters
 executed to decode text for display.

-int entrySize

Static Protected Attributes

-SWDisplay rawdisp
-

Detailed Description

-The class SWModule is the base class for all modules used in Sword. -

-It provides functions to look up a text passage, to search in the module, to switch on/off the state of optional things like Strong's numbers or footnotes. -

-SWModule has also functions to write to the data files. This might be useful in future for frontend authors to support user-created modules. -

- -

-Definition at line 64 of file swmodule.h.


Constructor & Destructor Documentation

-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SWModule::SWModule const char *   imodname = 0,
const char *   imoddesc = 0,
SWDisplay  idisp = 0,
char *   imodtype = 0,
SWTextEncoding   encoding = ENC_UNKNOWN,
SWTextDirection   dir = DIRECTION_LTR,
SWTextMarkup   markup = FMT_UNKNOWN,
const char *   modlang = 0
-
- - - - - -
-   - - -

-Initializes data for instance of SWModule. -

-

-Parameters:
- - - - - -
imodname  -Internal name for module; see also Name
imoddesc  -Name to display to user for module; see also Description
idisp  -Display object to use for displaying see also Disp
imodtype  -Type of Module (All modules will be displayed with others of same type under their modtype heading) see also Type
-
-

-Definition at line 31 of file swmodule.cpp. -

-References CreateKey(), disp, encodingFilters, key, optionFilters, rawFilters, renderFilters, and stripFilters. -

-

00032 {
-00033         key       = CreateKey();
-00034         entrybuf  = new char [1];
-00035         *entrybuf = 0;
-00036         config    = &ownConfig;
-00037         entrybufallocsize = 0;
-00038         modname   = 0;
-00039         error     = 0;
-00040         moddesc   = 0;
-00041         modtype   = 0;
-00042         modlang   = 0;
-00043         this->encoding = encoding;
-00044         this->direction = direction;
-00045         this->markup  = markup;
-00046         entrySize= -1;
-00047         disp     = (idisp) ? idisp : &rawdisp;
-00048         stdstr(&modname, imodname);
-00049         stdstr(&moddesc, imoddesc);
-00050         stdstr(&modtype, imodtype);
-00051         stdstr(&modlang, imodlang);
-00052         stripFilters = new FilterList();
-00053         rawFilters = new FilterList();
-00054         renderFilters = new FilterList();
-00055         optionFilters = new FilterList();
-00056         encodingFilters = new FilterList();
-00057         skipConsecutiveLinks = true;
-00058         procEntAttr = true;
-00059 }
-
-


Member Function Documentation

-

- - - - -
- - - - - - - - - - -
virtual SWModule& SWModule::AddEncodingFilter SWFilter *   newfilter [inline, virtual]
-
- - - - - -
-   - - -

-Adds an EncodingFilter to this module's. -

-

-See also:
-encodingfilters queue
-Parameters:
- - -
newfilter  -the filter to add
-
-Returns:
-*this
-

-Definition at line 451 of file swmodule.h. -

-Referenced by EncodingFilterMgr::AddEncodingFilters(). -

-

00451                                                               {
-00452     encodingFilters->push_back (newfilter);
-00453     return *this;
-00454   }
-
-

- - - - -
- - - - - - - - - - -
virtual SWModule& SWModule::AddOptionFilter SWFilter *   newfilter [inline, virtual]
-
- - - - - -
-   - - -

-Adds an OptionFilter to this module's optionfilters queue. -

-

-Parameters:
- - -
newfilter  -the filter to add
-
-Returns:
-*this
-

-Definition at line 536 of file swmodule.h. -

-

00536                                                             {
-00537     optionFilters->push_back (newfilter);
-00538     return *this;
-00539   }
-
-

- - - - -
- - - - - - - - - - -
virtual SWModule& SWModule::AddRawFilter SWFilter *   newfilter [inline, virtual]
-
- - - - - -
-   - - -

-Adds a RawFilter to this module's rawfilters queue. -

-

-Parameters:
- - -
newfilter  -the filter to add
-
-Returns:
-*this
-

-Definition at line 505 of file swmodule.h. -

-Referenced by SWMgr::AddRawFilters(), and EncodingFilterMgr::AddRawFilters(). -

-

00505                                                          {
-00506     rawFilters->push_back (newfilter);
-00507     return *this;
-00508   }
-
-

- - - - -
- - - - - - - - - - -
virtual SWModule& SWModule::AddRenderFilter SWFilter *   newfilter [inline, virtual]
-
- - - - - -
-   - - -

-Adds a RenderFilter to this module's. -

-

-See also:
-renderfilters queue
-Parameters:
- - -
newfilter  -the filter to add
-
-Returns:
-*this
-

-Definition at line 414 of file swmodule.h. -

-Referenced by MarkupFilterMgr::AddRenderFilters(). -

-

00414                                                             {
-00415     renderFilters->push_back (newfilter);
-00416     return *this;
-00417   }
-
-

- - - - -
- - - - - - - - - - -
virtual SWModule& SWModule::AddStripFilter SWFilter *   newfilter [inline, virtual]
-
- - - - - -
-   - - -

-Adds a StripFilter to this module's stripfilters queue. -

-

-Parameters:
- - -
newfilter  -the filter to add
-
-Returns:
-*this
-

-Definition at line 488 of file swmodule.h. -

-Referenced by SWMgr::AddStripFilters(). -

-

00488                                                            {
-00489     stripFilters->push_back (newfilter);
-00490     return *this;
-00491   }
-
-

- - - - -
- - - - - - - - - -
SWKey * SWModule::CreateKey   [virtual]
-
- - - - - -
-   - - -

-Allocates a key of specific type for module The different reimplementatiosn of SWModule (e.g. -

-SWText) support SWKey implementations, which support special. This functions returns a SWKey object which works with the current implementation of SWModule. For example for the SWText class it returns a VerseKey object.

-See also:
-VerseKey, ListKey, SWText, SWLD, SWCom
-Returns:
-pointer to allocated key
-

-Reimplemented in SWCom, SWGenBook, SWLD, and SWText. -

-Definition at line 105 of file swmodule.cpp. -

-Referenced by RenderText(), Search(), SetKey(), StripText(), and SWModule(). -

-

00106 {
-00107         return new SWKey();
-00108 }
-
-

- - - - -
- - - - - - - - - - -
signed char SWModule::createModule const char *   [inline, static]
-
- - - - - -
-   - - -

-Creates a new module. -

-

-Parameters:
- - -
path  -The first parameter is path of the new module
-
-Returns:
-error
-

-Definition at line 349 of file swmodule.h. -

-

00349                                                  {
-00350     return -1;
-00351   }
-
-

- - - - -
- - - - - - - - - - -
char * SWModule::Description const char *   imoddesc = 0 [virtual]
-
- - - - - -
-   - - -

-Sets/gets module description. -

-

-Parameters:
- - -
imoddesc  -value which to set moddesc; [0] - only get
-
-Returns:
-pointer to moddesc
-

-Definition at line 150 of file swmodule.cpp. -

-

00151 {
-00152         return stdstr(&moddesc, imoddesc);
-00153 }
-
-

- - - - -
- - - - - - - - - - -
char SWModule::Direction signed char   newdir = -1 [virtual]
-
- - - - - -
-   - - -

-Sets/gets module direction. -

-

-Parameters:
- - -
newdir  -value which to set direction; [-1] - only get
-
-Returns:
-char direction
-

-Definition at line 178 of file swmodule.cpp. -

-

00178                                            {
-00179         if (newdir != -1)
-00180                 direction = newdir;
-00181         return direction;
-00182 }
-
-

- - - - -
- - - - - - - - - - -
SWDisplay * SWModule::Disp SWDisplay  idisp = 0 [virtual]
-
- - - - - -
-   - - -

-Sets/gets display driver. -

-

-Parameters:
- - -
idisp  -value which to set disp; [0] - only get
-
-Returns:
-pointer to disp
-

-Definition at line 237 of file swmodule.cpp. -

-References disp. -

-

00238 {
-00239         if (idisp)
-00240                 disp = idisp;
-00241 
-00242         return disp;
-00243 }
-
-

- - - - -
- - - - - - - - - -
char SWModule::Display   [virtual]
-
- - - - - -
-   - - -

-Calls this modules display object and passes itself. -

-

-Returns:
-error status
-

-Definition at line 252 of file swmodule.cpp. -

-References disp, and SWDisplay::Display(). -

-

00253 {
-00254         disp->Display(*this);
-00255         return 0;
-00256 }
-
-

- - - - -
- - - - - - - - - - -
char SWModule::Encoding signed char   enc = -1 [virtual]
-
- - - - - -
-   - - -

-Sets/gets module encoding. -

-

-Parameters:
- - -
newdir  -value which to set encoding; [-1] - only get
-
-Returns:
-char encoding
-

-Definition at line 192 of file swmodule.cpp. -

-

00192                                           {
-00193         if (newenc != -1)
-00194                 encoding = newenc;
-00195         return encoding;
-00196 }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
virtual void SWModule::encodingFilter char *   buf,
long   size,
SWKey  key
[inline, virtual]
-
- - - - - -
-   - - -

-encodingFilter a text buffer. -

-

-Parameters:
- - - - -
buf  -the buffer to filter
size  -the allocated size of the buffer
key  -key location from where this buffer was extracted
-
-Returns:
-*this
-

-Definition at line 481 of file swmodule.h. -

-Referenced by RenderText(). -

-

00481                                                                  {
-00482         filterBuffer(encodingFilters, buf, size, key);
-00483   }
-
-

- - - - -
- - - - - - - - - -
char SWModule::Error   [virtual]
-
- - - - - -
-   - - -

-Gets and clears error status. -

-

-Returns:
-error status
-

-Definition at line 117 of file swmodule.cpp. -

-Referenced by Search(). -

-

00118 {
-00119         char retval = error;
-00120 
-00121         error = 0;
-00122         return retval;
-00123 }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
virtual void SWModule::filterBuffer FilterList *   filters,
char *   buf,
long   size,
SWKey  key
[inline, virtual]
-
- - - - - -
-   - - -

-FilterBuffer a text buffer. -

-

-Parameters:
- - - - - -
filters  -the FilterList of filters to iterate
buf  -the buffer to filter
size  -the allocated size of the buffer
key  -key location from where this buffer was extracted
-
-Returns:
-*this
-

-Definition at line 516 of file swmodule.h. -

-

00516                                                                                     {
-00517         FilterList::iterator it;
-00518         for (it = filters->begin(); it != filters->end(); it++) {
-00519                 (*it)->ProcessText(buf, size, key, this);
-00520         }
-00521   }
-
-

- - - - -
- - - - - - - - - -
virtual const int SWModule::getEntrySize   const [inline, virtual]
-
- - - - - -
-   - - -

-

-Returns:
-The size of the current entry.
-

-Definition at line 162 of file swmodule.h. -

-Referenced by RenderText(). -

-

00162 {return entrySize;}
-
-

- - - - -
- - - - - - - - - -
virtual char* SWModule::getRawEntry   [pure virtual]
-
- - - - - -
-   - - -

-This function is reimplemented by the different kinds of module objects. -

-

-Returns:
-the raw module text of the current entry
-

-Referenced by SWLD::KeyText(), and RenderText().

-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
virtual bool SWModule::isSearchOptimallySupported const char *   istr,
int   searchType,
int   flags,
SWKey  scope
[inline, virtual]
-
- - - - - -
-   - - -

-Check if the search is optimally supported (e.g. -

-if index files are presnt and working) This function checks whether the search framework may work in the best way.

-Returns:
-True if the the search is optimally supported, false if it's not working in the best way.
-

-Definition at line 295 of file swmodule.h. -

-

00296                                                                      {
-00297       bool retVal = false;
-00298       Search (istr, searchType, flags, scope, &retVal);
-00299       return retVal;
-00300   }
-
-

- - - - -
- - - - - - - - - -
virtual const bool SWModule::isUnicode   const [inline, virtual]
-
- - - - - -
-   - - -

-

-Returns:
-True if this module is encoded in Unicode, otherwise return false.
-

-Definition at line 150 of file swmodule.h. -

-

00150 {return (encoding == (char)ENC_UTF8 || encoding == (char)ENC_SCSU);}
-
-

- - - - -
- - - - - - - - - -
virtual bool SWModule::isWritable   [inline, virtual]
-
- - - - - -
-   - - -

-Is the module writable? :). -

-

-Returns:
-yes or no
-

-Definition at line 342 of file swmodule.h. -

-

00342                              {
-00343     return false;
-00344   }
-
-

- - - - -
- - - - - - - - - - -
virtual char SWModule::Key const SWKey  ikey [inline, virtual]
-
- - - - - -
-   - - -

-Sets the current key of the module to ikey, and returns the keytext. -

-

-Parameters:
- - -
ikey  -new current key for the module
-
-Returns:
-the keytext of the current module key
-

-Definition at line 189 of file swmodule.h. -

-

00189                                         {
-00190     return SetKey (ikey);
-00191   }
-
-

- - - - -
- - - - - - - - - -
virtual SWKey& SWModule::Key   const [inline, virtual]
-
- - - - - -
-   - - -

-Gets the current module key. -

-

-Returns:
-the current key of this module
-

-Definition at line 180 of file swmodule.h. -

-

00180                                {
-00181     return *key;
-00182   }
-
-

- - - - -
- - - - - - - - - - -
const char * SWModule::KeyText const char *   imodtype = 0 [virtual]
-
- - - - - -
-   - - -

-Sets/gets module KeyText. -

-

-Parameters:
- - -
ikeytext  -value which to set keytext; [0] - only get
-
-Returns:
-pointer to keytext
-

-Reimplemented in SWLD. -

-Definition at line 303 of file swmodule.cpp. -

-References key, and SetKey(). -

-Referenced by SWLD::KeyText(), and Search(). -

-

00304 {
-00305         if (ikeytext)
-00306                 SetKey(ikeytext);
-00307 
-00308         return *key;
-00309 }
-
-

- - - - -
- - - - - - - - - - -
char * SWModule::Lang const char *   imodlang = 0 [virtual]
-
- - - - - -
-   - - -

-Sets/gets module language. -

-

-Parameters:
- - -
imodlang  -value which to set modlang; [0] - only get
-
-Returns:
-pointer to modlang
-

-Definition at line 222 of file swmodule.cpp. -

-

00223 {
-00224         return stdstr(&modlang, imodlang);
-00225 }
-
-

- - - - -
- - - - - - - - - - -
char SWModule::Markup signed char   enc = -1 [virtual]
-
- - - - - -
-   - - -

-Sets/gets module markup. -

-

-Parameters:
- - -
newdir  -value which to set markup; [-1] - only get
-
-Returns:
-char markup
-

-Definition at line 206 of file swmodule.cpp. -

-Referenced by MarkupFilterMgr::AddRenderFilters(). -

-

00206                                          {
-00207         if (newmark != -1)
-00208                 markup = newmark;
-00209         return markup;
-00210 }
-
-

- - - - -
- - - - - - - - - - -
char * SWModule::Name const char *   imodname = 0 [virtual]
-
- - - - - -
-   - - -

-Sets/gets module name. -

-

-Parameters:
- - -
imodname  -value which to set modname; [0] - only get
-
-Returns:
-pointer to modname
-

-Definition at line 135 of file swmodule.cpp. -

-Referenced by SWMgr::AddRawFilters(). -

-

00136 {
-00137         return stdstr(&modname, imodname);
-00138 }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
void SWModule::nullPercent char   percent,
void *   userData
[static]
-
- - - - - -
-   - - -

-This is the default callback function for searching. -

-This function is a placeholder and does nothing. You can define your own function for search progress evaluation, and pass it over to Search. -

-Definition at line 18 of file swmodule.cpp. -

-

00018 {}
-
-

- - - - -
- - - - - - - - - -
SWModule::operator const char *   [virtual]
-
- - - - - -
-   - - -

-Renders and returns the current module text. -

-

-Returns:
-the rendered current module text
-

-Definition at line 662 of file swmodule.cpp. -

-References RenderText(). -

-

00662                                {
-00663         return RenderText();
-00664 }
-
-

- - - - -
- - - - - - - - - -
virtual SWModule::operator SWKey &   [inline, virtual]
-
- - - - - -
-   - - -

-Cast operator to cast to a SWKey reference. -

-This operator may be used to cast this module to a SWKey object.

-See also:
-SWKey*()
-

-Definition at line 322 of file swmodule.h. -

-

00322                               {
-00323     return *key;
-00324   }
-
-

- - - - -
- - - - - - - - - -
virtual SWModule::operator SWKey *   [inline, virtual]
-
- - - - - -
-   - - -

-Operator to cast to an SWKey pointer. -

-This function may be used to cast this object to an SWKey pointer.

 //we assume here that SWModule* module is already defined and valid.
- SWKey* currentKey = (SWKey*)module;
- // do something with currentKey (e.g. print out on screen)
-
-

-Definition at line 333 of file swmodule.h. -

-

00333                              {
-00334     return key;
-00335   }
-
-

- - - - -
- - - - - - - - - - -
SWModule & SWModule::operator+= int   increment [virtual]
-
- - - - - -
-   - - -

-Increments module key a number of entries. -

-

-Parameters:
- - -
increment  -Number of entries to jump forward
-
-Returns:
-*this
-

-Definition at line 350 of file swmodule.cpp. -

-References SWKey::Error(), and key. -

-

00351 {
-00352         (*key) += increment;
-00353         error = key->Error();
-00354 
-00355         return *this;
-00356 }
-
-

- - - - -
- - - - - - - - - - -
SWModule & SWModule::operator-= int   decrement [virtual]
-
- - - - - -
-   - - -

-Decrements module key a number of entries. -

-

-Parameters:
- - -
decrement  -Number of entries to jump backward
-
-Returns:
-*this
-

-Definition at line 367 of file swmodule.cpp. -

-References SWKey::Error(), and key. -

-

00368 {
-00369         (*key) -= increment;
-00370         error = key->Error();
-00371 
-00372         return *this;
-00373 }
-
-

- - - - -
- - - - - - - - - - -
virtual SWModule& SWModule::operator<< const SWKey  [inline, virtual]
-
- - - - - -
-   - - -

-Link the current module entry to another module entry only if module isWritable. -

-

    -
-
-Returns:
-*this
-

-Definition at line 370 of file swmodule.h. -

-

00370                                                  {
-00371     return *this;
-00372   }
-
-

- - - - -
- - - - - - - - - - -
virtual SWModule& SWModule::operator<< const char *   [inline, virtual]
-
- - - - - -
-   - - -

-Modify the current module entry text only if module isWritable. -

-

    -
-
-Returns:
-*this
-

-Definition at line 363 of file swmodule.h. -

-

00363                                                 {
-00364     return *this;
-00365   }
-
-

- - - - -
- - - - - - - - - - -
SWModule & SWModule::operator= SW_POSITION   p [virtual]
-
- - - - - -
-   - - -

-Positions this modules to an entry. -

-

-Parameters:
- - -
p  -position (e.g. TOP, BOTTOM)
-
-Returns:
-*this
-

-Definition at line 320 of file swmodule.cpp. -

-References SWKey::Error(), and key. -

-

00321 {
-00322         *key = p;
-00323         char saveError = key->Error();
-00324 
-00325         switch (p) {
-00326         case POS_TOP:
-00327                 (*this)++;
-00328                 (*this)--;
-00329                 break;
-00330 
-00331         case POS_BOTTOM:
-00332                 (*this)--;
-00333                 (*this)++;
-00334                 break;
-00335         }
-00336 
-00337         error = saveError;
-00338         return *this;
-00339 }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
virtual void SWModule::optionFilter char *   buf,
long   size,
SWKey  key
[inline, virtual]
-
- - - - - -
-   - - -

-OptionFilter a text buffer. -

-

-Parameters:
- - - - -
buf  -the buffer to filter
size  -the allocated size of the buffer
key  -key location from where this buffer was extracted
-
-Returns:
-*this
-

-Definition at line 546 of file swmodule.h. -

-Referenced by RenderText(). -

-

00546                                                                {
-00547         filterBuffer(optionFilters, buf, size, key);
-00548   }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
virtual void SWModule::rawFilter char *   buf,
long   size,
SWKey  key
[inline, virtual]
-
- - - - - -
-   - - -

-RawFilter a text buffer. -

-

-Parameters:
- - - - -
buf  -the buffer to filter
size  -the allocated size of the buffer
key  -key location from where this buffer was extracted
-
-Returns:
-*this
-

-Definition at line 528 of file swmodule.h. -

-

00528                                                             {
-00529         buf[size] = 0;
-00530         filterBuffer(rawFilters, buf, size, key);
-00531   }
-
-

- - - - -
- - - - - - - - - - -
virtual SWModule& SWModule::RemoveEncodingFilter SWFilter *   oldfilter [inline, virtual]
-
- - - - - -
-   - - -

-Removes an EncodingFilter from this module's. -

-

-See also:
-encodingfilters queue
-Parameters:
- - -
oldfilter  -the filter to remove
-
-Returns:
-*this
-

-Definition at line 459 of file swmodule.h. -

-

00459                                                                  {
-00460     encodingFilters->remove (oldfilter);
-00461     return *this;
-00462   }
-
-

- - - - -
- - - - - - - - - - -
virtual SWModule& SWModule::RemoveRenderFilter SWFilter *   oldfilter [inline, virtual]
-
- - - - - -
-   - - -

-Removes a RenderFilter from this module's. -

-

-See also:
-renderfilters queue
-Parameters:
- - -
oldfilter  -the filter to remove
-
-Returns:
-*this
-

-Definition at line 422 of file swmodule.h. -

-

00422                                                                {
-00423     renderFilters->remove (oldfilter);
-00424     return *this;
-00425   }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
virtual void SWModule::renderFilter char *   buf,
long   size,
SWKey  key
[inline, virtual]
-
- - - - - -
-   - - -

-RenderFilter a text buffer. -

-

-Parameters:
- - - - -
buf  -the buffer to filter
size  -the allocated size of the buffer
key  -key location from where this buffer was extracted
-
-Returns:
-*this
-

-Definition at line 444 of file swmodule.h. -

-Referenced by RenderText(). -

-

00444                                                                {
-00445         filterBuffer(renderFilters, buf, size, key);
-00446   }
-
-

- - - - -
- - - - - - - - - - -
const char * SWModule::RenderText SWKey  tmpKey [virtual]
-
- - - - - -
-   - - -

-calls all RenderFilters on current text. -

-

-Parameters:
- - -
tmpKey  -key to use to grab text
-
-Returns:
-this module's text at specified key location massaged by Render filters
-

-Definition at line 606 of file swmodule.cpp. -

-References CreateKey(), key, SWKey::Persist(), RenderText(), and SetKey(). -

-

00607 {
-00608         SWKey *savekey;
-00609         const char *retVal;
-00610 
-00611         if (!key->Persist()) {
-00612                 savekey = CreateKey();
-00613                 *savekey = *key;
-00614         }
-00615         else    savekey = key;
-00616 
-00617         SetKey(*tmpKey);
-00618 
-00619         retVal = RenderText();
-00620 
-00621         SetKey(*savekey);
-00622 
-00623         if (!savekey->Persist())
-00624                 delete savekey;
-00625 
-00626         return retVal;
-00627 }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
const char * SWModule::RenderText char *   buf = 0,
int   len = -1,
bool   render = true
[virtual]
-
- - - - - -
-   - - -

-calls all RenderFilters on buffer or current text. -

-

-Parameters:
- - - -
buf  -buffer to Render instead of current module position; if buf is NULL, the current text will be used
len  -max len of buf OR current text -- will be applied anyway
-
-Returns:
-this module's text at specified key location massaged by Render filters
-

-Definition at line 570 of file swmodule.cpp. -

-References encodingFilter(), getEntrySize(), getRawEntry(), key, optionFilter(), renderFilter(), and stripFilter(). -

-Referenced by operator const char *(), RenderText(), and StripText(). -

-

00570                                                                  {
-00571         entryAttributes.clear();
-00572         char *tmpbuf = (buf) ? buf : getRawEntry();
-00573         SWKey *key = 0;
-00574         static char *null = "";
-00575 
-00576         if (tmpbuf) {
-00577                 unsigned long size = (len < 0) ? ((getEntrySize()<0) ? strlen(tmpbuf) : getEntrySize()) * FILTERPAD : len;
-00578                 if (size > 0) {
-00579                         key = (SWKey *)*this;
-00580 
-00581                         optionFilter(tmpbuf, size, key);
-00582         
-00583                         if (render) {
-00584                                 renderFilter(tmpbuf, size, key);
-00585                                 encodingFilter(tmpbuf, size, key);
-00586                         }
-00587                         else    stripFilter(tmpbuf, size, key);
-00588                 }
-00589         }
-00590         else {
-00591                 tmpbuf = null;
-00592         }
-00593 
-00594         return tmpbuf;
-00595 }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
virtual SWModule& SWModule::ReplaceEncodingFilter SWFilter *   oldfilter,
SWFilter *   newfilter
[inline, virtual]
-
- - - - - -
-   - - -

-Replaces an EncodingFilter in this module's. -

-

-See also:
-encodingfilters queue
-Parameters:
- - - -
oldfilter  -the filter to remove
newfilter  -the filter to add in its place
-
-Returns:
-*this
-

-Definition at line 468 of file swmodule.h. -

-

00468                                                                                         {
-00469     FilterList::iterator iter;
-00470     for (iter = encodingFilters->begin(); iter != encodingFilters->end(); iter++)
-00471         if (*iter == oldfilter)
-00472                 *iter = newfilter;
-00473     return *this;
-00474   }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
virtual SWModule& SWModule::ReplaceRenderFilter SWFilter *   oldfilter,
SWFilter *   newfilter
[inline, virtual]
-
- - - - - -
-   - - -

-Replaces a RenderFilter in this module's. -

-

-See also:
-renderfilters queue
-Parameters:
- - - -
oldfilter  -the filter to remove
newfilter  -the filter to add in its place
-
-Returns:
-*this
-

-Definition at line 431 of file swmodule.h. -

-

00431                                                                                       {
-00432     FilterList::iterator iter;
-00433     for (iter = renderFilters->begin(); iter != renderFilters->end(); iter++)
-00434         if (*iter == oldfilter)
-00435                 *iter = newfilter;
-00436     return *this;
-00437   }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ListKey & SWModule::Search const char *   istr,
int   searchType = 0,
int   flags = 0,
SWKey  scope = 0,
bool *   justCheckIfSupported = 0,
void(*   percent)(char, void *) = &nullPercent,
void *   percentUserData = 0
[virtual]
-
- - - - - -
-   - - -

-Searches a module for a string. -

-

-Parameters:
- - - - - -
istr  -string for which to search
searchType  -type of search to perform <=0 ->regex; 1->phrase; 2->multiword;
flags  -options flags for search
justCheckIfSupported  -if set, don't search, only tell if this function supports requested search.
-
-Returns:
-listkey set to verses that contain istr
-

-Definition at line 391 of file swmodule.cpp. -

-References ListKey::ClearList(), SWKey::clone(), CreateKey(), Error(), SWKey::Index(), key, KeyText(), VerseKey::NewIndex(), SWKey::Persist(), SetKey(), StripText(), and terminateSearch. -

-

00392 {
-00393         SWKey *savekey = 0;
-00394         SWKey *searchkey = 0;
-00395         regex_t preg;
-00396         SWKey textkey;
-00397         char **words = 0;
-00398         char *wordBuf = 0;
-00399         int wordCount = 0;
-00400         const char *sres;
-00401         terminateSearch = false;
-00402         char perc = 1;
-00403         bool savePEA = isProcessEntryAttributes();
-00404 
-00405         processEntryAttributes(false);
-00406         listkey.ClearList();
-00407 
-00408         if (!key->Persist()) {
-00409                 savekey = CreateKey();
-00410                 *savekey = *key;
-00411         }
-00412         else    savekey = key;
-00413 
-00414         searchkey = (scope)?scope->clone():(key->Persist())?key->clone():0;
-00415         if (searchkey) {
-00416                 searchkey->Persist(1);
-00417                 SetKey(*searchkey);
-00418         }
-00419 
-00420         (*percent)(perc, percentUserData);
-00421         // MAJOR KLUDGE: VerseKey::Index still return index within testament.
-00422         //      VerseKey::NewIndex should be moved to Index and Index should be some
-00423         //      VerseKey specific name
-00424         VerseKey *vkcheck = 0;
-00425 #ifndef _WIN32_WCE
-00426         try {
-00427 #endif
-00428                 vkcheck = SWDYNAMIC_CAST(VerseKey, key);
-00429 #ifndef _WIN32_WCE
-00430         }
-00431         catch (...) {}
-00432 #endif
-00433         // end MAJOR KLUDGE
-00434 
-00435         *this = BOTTOM;
-00436         // fix below when we find out the bug
-00437         long highIndex = (vkcheck)?32300/*vkcheck->NewIndex()*/:key->Index();
-00438         if (!highIndex)
-00439                 highIndex = 1;          // avoid division by zero errors.
-00440         *this = TOP;
-00441         if (searchType >= 0) {
-00442                 flags |=searchType|REG_NOSUB|REG_EXTENDED;
-00443                 regcomp(&preg, istr, flags);
-00444         }
-00445 
-00446         (*percent)(++perc, percentUserData);
-00447         if (searchType == -2) {
-00448                 wordBuf = (char *)calloc(sizeof(char), strlen(istr) + 1);
-00449                 strcpy(wordBuf, istr);
-00450                 words = (char **)calloc(sizeof(char *), 10);
-00451                 int allocWords = 10;
-00452                 words[wordCount] = strtok(wordBuf, " ");
-00453                 while (words[wordCount]) {
-00454                         wordCount++;
-00455                         if (wordCount == allocWords) {
-00456                                 allocWords+=10;
-00457                                 words = (char **)realloc(words, sizeof(char *)*allocWords);
-00458                         }
-00459                         words[wordCount] = strtok(NULL, " ");
-00460                 }
-00461         }
-00462 
-00463         perc = 5;
-00464         (*percent)(perc, percentUserData);
-00465 
-00466         while (!Error() && !terminateSearch) {
-00467 
-00468         
-00469                 long mindex = 0;
-00470                 if (vkcheck)
-00471                         mindex = vkcheck->NewIndex();
-00472                 else mindex = key->Index();
-00473                 float per = (float)mindex / highIndex;
-00474                 per *= 93;
-00475                 per += 5;
-00476                 char newperc = (char)per;
-00477 //              char newperc = (char)(5+(93*(((float)((vkcheck)?vkcheck->NewIndex():key->Index()))/highIndex)));
-00478                 if (newperc > perc) {
-00479                         perc = newperc;
-00480                         (*percent)(perc, percentUserData);
-00481                 }
-00482                 else if (newperc < perc) {
-00483 #ifndef _MSC_VER
-00484                         cerr << "Serious error: new percentage complete is less than previous value\n";
-00485                         cerr << "using vk? " << ((vkcheck)?"yes":"no") << "\n";
-00486                         cerr << "index: " << ((vkcheck)?vkcheck->NewIndex():key->Index()) << "\n";
-00487                         cerr << "highIndex: " << highIndex << "\n";
-00488                         cerr << "newperc ==" << (int)newperc << "%" << "is smaller than\n";
-00489                         cerr << "perc == "  << (int )perc << "% \n";
-00490 #endif
-00491                 }
-00492                 if (searchType >= 0) {
-00493                         if (!regexec(&preg,  StripText(), 0, 0, 0)) {
-00494                                 textkey = KeyText();
-00495                                 listkey << textkey;
-00496                         }
-00497                 }
-00498                 else {
-00499                         if (searchType == -1) {
-00500                                 sres = ((flags & REG_ICASE) == REG_ICASE) ? stristr(StripText(), istr) : strstr(StripText(), istr);
-00501                                 if (sres) {
-00502                                                 textkey = KeyText();
-00503                                                 listkey << textkey;
-00504                                 }
-00505                         }
-00506                         if (searchType == -2) {
-00507                                 int i;
-00508                                 const char *stripBuf = StripText();
-00509                                 for (i = 0; i < wordCount; i++) {
-00510                                         sres = ((flags & REG_ICASE) == REG_ICASE) ? stristr(stripBuf, words[i]) : strstr(stripBuf, words[i]);
-00511                                         if (!sres)
-00512                                                 break;
-00513                                 }
-00514                                 if (i == wordCount) {
-00515                                         textkey = KeyText();
-00516                                         listkey << textkey;
-00517                                 }
-00518 
-00519                         }
-00520                 }
-00521                 (*this)++;
-00522         }
-00523         if (searchType >= 0)
-00524                 regfree(&preg);
-00525 
-00526         if (searchType == -2) {
-00527                 free(words);
-00528                 free(wordBuf);
-00529         }
-00530 
-00531         SetKey(*savekey);
-00532 
-00533         if (!savekey->Persist())
-00534                 delete savekey;
-00535 
-00536         if (searchkey)
-00537                 delete searchkey;
-00538 
-00539         listkey = TOP;
-00540         processEntryAttributes(savePEA);
-00541         (*percent)(100, percentUserData);
-00542 
-00543         return listkey;
-00544 }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
virtual SWModule& SWModule::setentry const char *   inbuf,
long   len
[inline, virtual]
-
- - - - - -
-   - - -

-Modify the current module entry text only if module isWritable. -

-

    -
-
-Returns:
-*this
-

-Definition at line 356 of file swmodule.h. -

-

00356                                                             {
-00357     return *this;
-00358   }
-
-

- - - - -
- - - - - - - - - - -
char SWModule::SetKey const SWKey  ikey [virtual]
-
- - - - - -
-   - - -

-Sets the key of this module. -

-Similair to

-See also:
-SetKey(const SWKey*) .
-Parameters:
- - -
ikey  -The SWKey which should be used as new key.
-
-Returns:
-Error status
-

-Definition at line 268 of file swmodule.cpp. -

-References SetKey(). -

-

00268                                        {
-00269         return SetKey(&ikey);
-00270 }
-
-

- - - - -
- - - - - - - - - - -
char SWModule::SetKey const SWKey  ikey [virtual]
-
- - - - - -
-   - - -

-Sets a key to this module for position to a particular record or set of records. -

-

-Parameters:
- - -
ikey  -key with which to set this module
-
-Returns:
-error status
-

-Definition at line 272 of file swmodule.cpp. -

-References CreateKey(), key, and SWKey::Persist(). -

-Referenced by KeyText(), RenderText(), Search(), SetKey(), and StripText(). -

-

00273 {
-00274         SWKey *oldKey = 0;
-00275 
-00276         if (key) {
-00277                 if (!key->Persist())    // if we have our own copy
-00278                         oldKey = key;
-00279         }
-00280 
-00281         if (!ikey->Persist()) {         // if we are to keep our own copy
-00282                  key = CreateKey();
-00283                 *key = *ikey;
-00284         }
-00285         else     key = (SWKey *)ikey;           // if we are to just point to an external key
-00286 
-00287         if (oldKey)
-00288                 delete oldKey;
-00289 
-00290         return 0;
-00291 }
-
-

- - - - -
- - - - - - - - - - -
virtual void SWModule::setSkipConsecutiveLinks bool   val [inline, virtual]
-
- - - - - -
-   - - -

-option to specify behaviour when iterating over consecutive entried linked to same text. -

-

-Parameters:
- - -
val  -= true means only include entry once in iteration
-
-

-Definition at line 584 of file swmodule.h. -

-

00584 { skipConsecutiveLinks = val; }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
virtual void SWModule::stripFilter char *   buf,
long   size,
SWKey  key
[inline, virtual]
-
- - - - - -
-   - - -

-StripFilter a text buffer. -

-

-Parameters:
- - - - -
buf  -the buffer to filter
size  -the allocated size of the buffer
key  -key location from where this buffer was extracted
-
-Returns:
-*this
-

-Definition at line 498 of file swmodule.h. -

-Referenced by RenderText(). -

-

00498                                                               {
-00499         filterBuffer(stripFilters, buf, size, key);
-00500   }
-
-

- - - - -
- - - - - - - - - - -
const char * SWModule::StripText SWKey  tmpKey [virtual]
-
- - - - - -
-   - - -

-calls all StripFilters on current text. -

-

-Parameters:
- - -
tmpKey  -key to use to grab text
-
-Returns:
-this module's text at specified key location massaged by Strip filters
-

-Definition at line 638 of file swmodule.cpp. -

-References CreateKey(), key, SWKey::Persist(), SetKey(), and StripText(). -

-

00639 {
-00640         SWKey *savekey;
-00641         const char *retVal;
-00642 
-00643         if (!key->Persist()) {
-00644                 savekey = CreateKey();
-00645                 *savekey = *key;
-00646         }
-00647         else    savekey = key;
-00648 
-00649         SetKey(*tmpKey);
-00650 
-00651         retVal = StripText();
-00652 
-00653         SetKey(*savekey);
-00654 
-00655         if (!savekey->Persist())
-00656                 delete savekey;
-00657 
-00658         return retVal;
-00659 }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
const char * SWModule::StripText char *   buf = 0,
int   len = -1
[virtual]
-
- - - - - -
-   - - -

-calls all StripFilters on buffer or current text. -

-

-Parameters:
- - - -
buf  -buf to massage instead of current module position; if buf is NULL, the current text will be used
len  -max len of buf OR current text -- will be applied anyway
-
-Returns:
-this module's text at specified key location massaged by Strip filters
-

-Definition at line 556 of file swmodule.cpp. -

-References RenderText(). -

-Referenced by Search(), and StripText(). -

-

00557 {
-00558         return RenderText(buf, len, false);
-00559 }
-
-

- - - - -
- - - - - - - - - - -
char * SWModule::Type const char *   imodtype = 0 [virtual]
-
- - - - - -
-   - - -

-Sets/gets module type. -

-

-Parameters:
- - -
imodtype  -value which to set modtype; [0] - only get
-
-Returns:
-pointer to modtype
-

-Definition at line 165 of file swmodule.cpp. -

-

00166 {
-00167         return stdstr(&modtype, imodtype);
-00168 }
-
-


Member Data Documentation

-

- - - - -
- - -
bool SWModule::terminateSearch -
-
- - - - - -
-   - - -

-Set this bool to false to terminate the search which is executed by this module (Search). -

-This is useful for threaded applications to terminate the search in another thread. -

-Definition at line 125 of file swmodule.h. -

-Referenced by Search().

-


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_module__coll__graph.png b/doc/api-documentation/html/class_s_w_module__coll__graph.png deleted file mode 100644 index cca0c79..0000000 Binary files a/doc/api-documentation/html/class_s_w_module__coll__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_s_w_module__inherit__graph.png b/doc/api-documentation/html/class_s_w_module__inherit__graph.png deleted file mode 100644 index d2567c2..0000000 Binary files a/doc/api-documentation/html/class_s_w_module__inherit__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_s_w_object-members.html b/doc/api-documentation/html/class_s_w_object-members.html deleted file mode 100644 index f803bc7..0000000 --- a/doc/api-documentation/html/class_s_w_object-members.html +++ /dev/null @@ -1,17 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWObject Member List

This is the complete list of members for SWObject, including all inherited members. - - -
getClass() constSWObject [inline]
myclass (defined in SWObject)SWObject [protected]

Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_object.html b/doc/api-documentation/html/class_s_w_object.html deleted file mode 100644 index 87e0321..0000000 --- a/doc/api-documentation/html/class_s_w_object.html +++ /dev/null @@ -1,90 +0,0 @@ - - -SWObject class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWObject Class Reference

Base class for major Sword classes. -More... -

-#include <swobject.h> -

-Inheritance diagram for SWObject:

Inheritance graph
- - - - - - - - - -
[legend]
Collaboration diagram for SWObject:

Collaboration graph
- - - -
[legend]
List of all members. - - - - - -

Public Methods

const SWClassgetClass () const
 Use this to get the class definition and inheritance order. More...


Protected Attributes

-SWClassmyclass
-

Detailed Description

-Base class for major Sword classes. -

-SWObject is the base class for major Sword classes like SWKey. It is used because dynamic_cast is not available on all plattforms supported by Sword. Use SWDYNAMIC_CAST(classname, object) instead of dynamic_cast<classname>(object). -

- -

-Definition at line 41 of file swobject.h.


Member Function Documentation

-

- - - - -
- - - - - - - - - -
const SWClass* SWObject::getClass   const [inline]
-
- - - - - -
-   - - -

-Use this to get the class definition and inheritance order. -

-

-Returns:
-The class definition of this object
-

-Definition at line 49 of file swobject.h. -

-

00049                                          {
-00050                 return myclass;
-00051         }
-
-


The documentation for this class was generated from the following file: -
Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_object__coll__graph.png b/doc/api-documentation/html/class_s_w_object__coll__graph.png deleted file mode 100644 index 5c459bb..0000000 Binary files a/doc/api-documentation/html/class_s_w_object__coll__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_s_w_object__inherit__graph.png b/doc/api-documentation/html/class_s_w_object__inherit__graph.png deleted file mode 100644 index 4e1441f..0000000 Binary files a/doc/api-documentation/html/class_s_w_object__inherit__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_s_w_text-members.html b/doc/api-documentation/html/class_s_w_text-members.html deleted file mode 100644 index 34e99eb..0000000 --- a/doc/api-documentation/html/class_s_w_text-members.html +++ /dev/null @@ -1,115 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWText Member List

This is the complete list of members for SWText, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AddEncodingFilter(SWFilter *newfilter)SWModule [inline, virtual]
AddOptionFilter(SWFilter *newfilter)SWModule [inline, virtual]
AddRawFilter(SWFilter *newfilter)SWModule [inline, virtual]
AddRenderFilter(SWFilter *newfilter)SWModule [inline, virtual]
AddStripFilter(SWFilter *newfilter)SWModule [inline, virtual]
config (defined in SWModule)SWModule [protected]
CreateKey()SWText [virtual]
createModule(const char *)SWModule [inline, static]
createSearchFramework() (defined in SWModule)SWModule [inline, virtual]
deleteEntry()SWModule [inline, virtual]
Description(const char *imoddesc=0)SWModule [virtual]
direction (defined in SWModule)SWModule [protected]
Direction(signed char newdir=-1)SWModule [virtual]
dispSWModule [protected]
Disp(SWDisplay *idisp=0)SWModule [virtual]
Display()SWModule [virtual]
encoding (defined in SWModule)SWModule [protected]
Encoding(signed char enc=-1)SWModule [virtual]
encodingFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
encodingFiltersSWModule [protected]
entryAttributes (defined in SWModule)SWModule [protected]
entrybuf (defined in SWModule)SWModule [protected]
entrybufallocsize (defined in SWModule)SWModule [protected]
entrySize (defined in SWModule)SWModule [protected]
Error()SWModule [virtual]
error (defined in SWModule)SWModule [protected]
filterBuffer(FilterList *filters, char *buf, long size, SWKey *key)SWModule [inline, virtual]
flush() (defined in SWCacher)SWCacher [virtual]
getConfig() const (defined in SWModule)SWModule [inline, virtual]
getConfigEntry(const char *key) const (defined in SWModule)SWModule [virtual]
getEntryAttributes() const (defined in SWModule)SWModule [inline, virtual]
getEntrySize() constSWModule [inline, virtual]
getRawEntry()=0SWModule [pure virtual]
getSkipConsecutiveLinks() (defined in SWModule)SWModule [inline, virtual]
hasSearchFramework() (defined in SWModule)SWModule [inline, virtual]
isProcessEntryAttributes() const (defined in SWModule)SWModule [inline, virtual]
isSearchOptimallySupported(const char *istr, int searchType, int flags, SWKey *scope)SWModule [inline, virtual]
isUnicode() constSWModule [inline, virtual]
isWritable()SWModule [inline, virtual]
Key() constSWModule [inline, virtual]
Key(const SWKey &ikey)SWModule [inline, virtual]
keySWModule [protected]
KeyText(const char *imodtype=0)SWModule [virtual]
Lang(const char *imodlang=0)SWModule [virtual]
lastAccess() (defined in SWCacher)SWCacher [virtual]
listkey (defined in SWModule)SWModule [protected]
markup (defined in SWModule)SWModule [protected]
Markup(signed char enc=-1)SWModule [virtual]
moddesc (defined in SWModule)SWModule [protected]
modlang (defined in SWModule)SWModule [protected]
modname (defined in SWModule)SWModule [protected]
modtype (defined in SWModule)SWModule [protected]
Name(const char *imodname=0)SWModule [virtual]
nullPercent(char percent, void *userData)SWModule [static]
operator const char *()SWModule [virtual]
operator SWKey &()SWModule [inline, virtual]
operator SWKey *()SWModule [inline, virtual]
operator++(int)SWModule [inline, virtual]
operator+=(int increment)SWModule [virtual]
operator--(int)SWModule [inline, virtual]
operator-=(int decrement)SWModule [virtual]
operator<<(const char *)SWModule [inline, virtual]
operator<<(const SWKey *)SWModule [inline, virtual]
operator=(SW_POSITION p)SWModule [virtual]
optionFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
optionFiltersSWModule [protected]
ownConfig (defined in SWModule)SWModule [protected]
procEntAttr (defined in SWModule)SWModule [protected]
processEntryAttributes(bool val) const (defined in SWModule)SWModule [inline, virtual]
rawdisp (defined in SWModule)SWModule [protected, static]
rawFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
rawFiltersSWModule [protected]
RemoveEncodingFilter(SWFilter *oldfilter)SWModule [inline, virtual]
RemoveRenderFilter(SWFilter *oldfilter)SWModule [inline, virtual]
renderFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
renderFiltersSWModule [protected]
RenderText(char *buf=0, int len=-1, bool render=true)SWModule [virtual]
RenderText(SWKey *tmpKey)SWModule [virtual]
ReplaceEncodingFilter(SWFilter *oldfilter, SWFilter *newfilter)SWModule [inline, virtual]
ReplaceRenderFilter(SWFilter *oldfilter, SWFilter *newfilter)SWModule [inline, virtual]
resourceConsumption() (defined in SWCacher)SWCacher [virtual]
Search(const char *istr, int searchType=0, int flags=0, SWKey *scope=0, bool *justCheckIfSupported=0, void(*percent)(char, void *)=&nullPercent, void *percentUserData=0)SWModule [virtual]
setConfig(ConfigEntMap *config) (defined in SWModule)SWModule [virtual]
setentry(const char *inbuf, long len)SWModule [inline, virtual]
SetKey(const SWKey *ikey)SWModule [virtual]
SetKey(const SWKey &ikey)SWModule [virtual]
setSkipConsecutiveLinks(bool val)SWModule [inline, virtual]
skipConsecutiveLinks (defined in SWModule)SWModule [protected]
stripFilter(char *buf, long size, SWKey *key)SWModule [inline, virtual]
stripFiltersSWModule [protected]
StripText(char *buf=0, int len=-1)SWModule [virtual]
StripText(SWKey *tmpKey)SWModule [virtual]
SWCacher() (defined in SWCacher)SWCacher
SWModule(const char *imodname=0, const char *imoddesc=0, SWDisplay *idisp=0, char *imodtype=0, SWTextEncoding encoding=ENC_UNKNOWN, SWTextDirection dir=DIRECTION_LTR, SWTextMarkup markup=FMT_UNKNOWN, const char *modlang=0)SWModule
SWText(const char *imodname=0, const char *imoddesc=0, SWDisplay *idisp=0, SWTextEncoding encoding=ENC_UNKNOWN, SWTextDirection dir=DIRECTION_LTR, SWTextMarkup markup=FMT_UNKNOWN, const char *ilang=0)SWText
terminateSearchSWModule
Type(const char *imodtype=0)SWModule [virtual]
~SWCacher() (defined in SWCacher)SWCacher [virtual]
~SWModule()SWModule [virtual]
~SWText() (defined in SWText)SWText [virtual]

Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_text.html b/doc/api-documentation/html/class_s_w_text.html deleted file mode 100644 index 1efe8ff..0000000 --- a/doc/api-documentation/html/class_s_w_text.html +++ /dev/null @@ -1,141 +0,0 @@ - - -SWText class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

SWText Class Reference

The basis for all text modules. -More... -

-#include <swtext.h> -

-Inheritance diagram for SWText:

Inheritance graph
- - - -
[legend]
Collaboration diagram for SWText:

Collaboration graph
- - - - - - - - -
[legend]
List of all members. - - - - - - -

Public Methods

 SWText (const char *imodname=0, const char *imoddesc=0, SWDisplay *idisp=0, SWTextEncoding encoding=ENC_UNKNOWN, SWTextDirection dir=DIRECTION_LTR, SWTextMarkup markup=FMT_UNKNOWN, const char *ilang=0)
 Initializes data for instance of SWText. More...

-virtual ~SWText ()
-virtual SWKeyCreateKey ()
 Create the correct key (VerseKey) for use with SWText.

-

Detailed Description

-The basis for all text modules. -

- -

-Definition at line 34 of file swtext.h.


Constructor & Destructor Documentation

-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SWText::SWText const char *   imodname = 0,
const char *   imoddesc = 0,
SWDisplay  idisp = 0,
SWTextEncoding   encoding = ENC_UNKNOWN,
SWTextDirection   dir = DIRECTION_LTR,
SWTextMarkup   markup = FMT_UNKNOWN,
const char *   ilang = 0
-
- - - - - -
-   - - -

-Initializes data for instance of SWText. -

-

-Parameters:
- - - - -
imodname  -Internal name for module
imoddesc  -Name to display to user for module
idisp  -Display object to use for displaying
-
-

-Definition at line 17 of file swtext.cpp. -

-References CreateKey(), and SWModule::key. -

-

00017                                                                                                                                                          : SWModule(imodname, imoddesc, idisp, "Biblical Texts", enc, dir, mark, ilang)
-00018 {
-00019         delete key;
-00020         key = CreateKey();
-00021 }
-
-


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_s_w_text__coll__graph.png b/doc/api-documentation/html/class_s_w_text__coll__graph.png deleted file mode 100644 index 338dd42..0000000 Binary files a/doc/api-documentation/html/class_s_w_text__coll__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_s_w_text__inherit__graph.png b/doc/api-documentation/html/class_s_w_text__inherit__graph.png deleted file mode 100644 index d92778d..0000000 Binary files a/doc/api-documentation/html/class_s_w_text__inherit__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_str_key-members.html b/doc/api-documentation/html/class_str_key-members.html deleted file mode 100644 index e8afa39..0000000 --- a/doc/api-documentation/html/class_str_key-members.html +++ /dev/null @@ -1,44 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

StrKey Member List

This is the complete list of members for StrKey, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
classdef (defined in StrKey)StrKey [private, static]
clone() constSWKey [virtual]
compare(const SWKey &ikey)SWKey [virtual]
copyFrom(const SWKey &ikey)SWKey [virtual]
decrement(int steps=1)SWKey [virtual]
equals(const SWKey &ikey)SWKey [inline, virtual]
error (defined in SWKey)SWKey [protected]
Error()SWKey [virtual]
getClass() constSWObject [inline]
getShortText() const (defined in SWKey)SWKey [inline, virtual]
getText() constSWKey [virtual]
increment(int steps=1)SWKey [virtual]
Index() constSWKey [inline, virtual]
Index(long iindex) (defined in SWKey)SWKey [inline, virtual]
init() (defined in StrKey)StrKey [private]
keytext (defined in SWKey)SWKey [protected]
myclass (defined in SWObject)SWObject [protected]
persist (defined in SWKey)SWKey [protected]
Persist() constSWKey
Persist(signed char ikey)SWKey
setPosition(SW_POSITION) (defined in SWKey)SWKey [virtual]
setText(const char *ikey)SWKey [virtual]
StrKey(const char *ikey=0)StrKey
SWKey(const char *ikey=0)SWKey
SWKey(SWKey const &k)SWKey
Traversable() (defined in SWKey)SWKey [inline, virtual]
userData (defined in SWKey)SWKey
~StrKey()StrKey [virtual]
~SWKey()SWKey [virtual]

Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_str_key.html b/doc/api-documentation/html/class_str_key.html deleted file mode 100644 index 8f5f499..0000000 --- a/doc/api-documentation/html/class_str_key.html +++ /dev/null @@ -1,99 +0,0 @@ - - -StrKey class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

StrKey Class Reference

a standard string key class (used for modules that index on single strings (eg. -More... -

-#include <strkey.h> -

-Inheritance diagram for StrKey:

Inheritance graph
- - - - -
[legend]
Collaboration diagram for StrKey:

Collaboration graph
- - - - - -
[legend]
List of all members. - - - - - - - - - -

Public Methods

 StrKey (const char *ikey=0)
 initializes instance of StrKey. More...

-virtual ~StrKey ()
 cleans up instance of StrKey.


Private Methods

-void init ()

Static Private Attributes

-SWClass classdef
-

Detailed Description

-a standard string key class (used for modules that index on single strings (eg. -

-cities, names, words, etc.) -

- -

-Definition at line 35 of file strkey.h.


Constructor & Destructor Documentation

-

- - - - -
- - - - - - - - - - -
StrKey::StrKey const char *   ikey = 0
-
- - - - - -
-   - - -

-initializes instance of StrKey. -

-

-Parameters:
- - -
ikey  -text key (word, city, name, etc.)
-
-

-Definition at line 23 of file strkey.cpp. -

-

00023                                : SWKey(ikey)
-00024 {
-00025         init();
-00026 }
-
-


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:02 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_str_key__coll__graph.png b/doc/api-documentation/html/class_str_key__coll__graph.png deleted file mode 100644 index aa42765..0000000 Binary files a/doc/api-documentation/html/class_str_key__coll__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_str_key__inherit__graph.png b/doc/api-documentation/html/class_str_key__inherit__graph.png deleted file mode 100644 index 7368fa6..0000000 Binary files a/doc/api-documentation/html/class_str_key__inherit__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_th_m_l_footnotes-members.html b/doc/api-documentation/html/class_th_m_l_footnotes-members.html deleted file mode 100644 index a722e82..0000000 --- a/doc/api-documentation/html/class_th_m_l_footnotes-members.html +++ /dev/null @@ -1,31 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLFootnotes Member List

This is the complete list of members for ThMLFootnotes, including all inherited members. - - - - - - - - - - - - - - - - -
getOptionName() (defined in ThMLFootnotes)ThMLFootnotes [inline, virtual]
getOptionTip() (defined in ThMLFootnotes)ThMLFootnotes [inline, virtual]
getOptionValue() (defined in ThMLFootnotes)ThMLFootnotes [virtual]
getOptionValues() (defined in ThMLFootnotes)ThMLFootnotes [inline, virtual]
off (defined in ThMLFootnotes)ThMLFootnotes [private, static]
on (defined in ThMLFootnotes)ThMLFootnotes [private, static]
option (defined in ThMLFootnotes)ThMLFootnotes [private]
options (defined in ThMLFootnotes)ThMLFootnotes [private]
optName (defined in ThMLFootnotes)ThMLFootnotes [private, static]
optTip (defined in ThMLFootnotes)ThMLFootnotes [private, static]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in ThMLFootnotes)ThMLFootnotes [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *ival) (defined in ThMLFootnotes)ThMLFootnotes [virtual]
ThMLFootnotes() (defined in ThMLFootnotes)ThMLFootnotes
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]
~ThMLFootnotes() (defined in ThMLFootnotes)ThMLFootnotes [virtual]

Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_footnotes.html b/doc/api-documentation/html/class_th_m_l_footnotes.html deleted file mode 100644 index 91f1942..0000000 --- a/doc/api-documentation/html/class_th_m_l_footnotes.html +++ /dev/null @@ -1,59 +0,0 @@ - - -ThMLFootnotes class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLFootnotes Class Reference

This Filter shows/hides footnotes in a ThML text. -More... -

-#include <thmlfootnotes.h> -

-List of all members. - - - - - - - - - - - - - - - - - -

Public Methods

ThMLFootnotes ()
-virtual ~ThMLFootnotes ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-virtual const char * getOptionName ()
-virtual const char * getOptionTip ()
-virtual void setOptionValue (const char *ival)
-virtual const char * getOptionValue ()
-virtual OptionsList getOptionValues ()

Private Attributes

-bool option
-OptionsList options

Static Private Attributes

-const char on [] = "On"
-const char off [] = "Off"
-const char optName [] = "Footnotes"
-const char optTip [] = "Toggles Footnotes On and Off if they exist"
-


Detailed Description

-This Filter shows/hides footnotes in a ThML text. -

- -

-Definition at line 30 of file thmlfootnotes.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_g_b_f-members.html b/doc/api-documentation/html/class_th_m_l_g_b_f-members.html deleted file mode 100644 index 79dc2f3..0000000 --- a/doc/api-documentation/html/class_th_m_l_g_b_f-members.html +++ /dev/null @@ -1,24 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLGBF Member List

This is the complete list of members for ThMLGBF, including all inherited members. - - - - - - - - - -
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
ProcessText(char *text, int maxlen=-1) (defined in ThMLGBF)ThMLGBF [virtual]
ProcessText(char *text, int maxlen, const SWKey *, const SWModule *=0) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
ThMLGBF() (defined in ThMLGBF)ThMLGBF
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_g_b_f.html b/doc/api-documentation/html/class_th_m_l_g_b_f.html deleted file mode 100644 index b6c97b8..0000000 --- a/doc/api-documentation/html/class_th_m_l_g_b_f.html +++ /dev/null @@ -1,33 +0,0 @@ - - -ThMLGBF class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLGBF Class Reference

this filter converts ThML text to GBF text. -More... -

-#include <thmlgbf.h> -

-List of all members. - - - -

Public Methods

ThMLGBF ()
-virtual char ProcessText (char *text, int maxlen=-1)
-


Detailed Description

-this filter converts ThML text to GBF text. -

- -

-Definition at line 30 of file thmlgbf.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_h_t_m_l-members.html b/doc/api-documentation/html/class_th_m_l_h_t_m_l-members.html deleted file mode 100644 index 22d19fb..0000000 --- a/doc/api-documentation/html/class_th_m_l_h_t_m_l-members.html +++ /dev/null @@ -1,47 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLHTML Member List

This is the complete list of members for ThMLHTML, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
addEscapeStringSubstitute(const char *findString, const char *replaceString) (defined in SWBasicFilter)SWBasicFilter [protected]
addTokenSubstitute(const char *findString, const char *replaceString) (defined in SWBasicFilter)SWBasicFilter [protected]
DualStringMap typedef (defined in SWBasicFilter)SWBasicFilter [protected]
escSubMap (defined in SWBasicFilter)SWBasicFilter [protected]
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
handleEscapeString(char **buf, const char *escString, DualStringMap &userData)SWBasicFilter [protected, virtual]
handleToken(char **buf, const char *token, DualStringMap &userData)ThMLHTML [protected, virtual]
key (defined in SWBasicFilter)SWBasicFilter [protected]
module (defined in SWBasicFilter)SWBasicFilter [protected]
ProcessText(char *text, int maxlen, const SWKey *, const SWModule *=0) (defined in SWBasicFilter)SWBasicFilter [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
pushString(char **buf, const char *format,...)SWBasicFilter [protected]
resultBuffer (defined in SWBasicFilter)SWBasicFilter [protected]
setEscapeEnd(const char *escEnd)SWBasicFilter [protected]
setEscapeStart(const char *escStart)SWBasicFilter [protected]
setEscapeStringCaseSensitive(bool val) (defined in SWBasicFilter)SWBasicFilter [protected]
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
setPassThruUnknownEscapeString(bool val)SWBasicFilter [protected]
setPassThruUnknownToken(bool val)SWBasicFilter [protected]
setTokenCaseSensitive(bool val) (defined in SWBasicFilter)SWBasicFilter [protected]
setTokenEnd(const char *tokenEnd)SWBasicFilter [protected]
setTokenStart(const char *tokenStart)SWBasicFilter [protected]
substituteEscapeString(char **buf, const char *escString) (defined in SWBasicFilter)SWBasicFilter [protected]
substituteToken(char **buf, const char *token) (defined in SWBasicFilter)SWBasicFilter [protected]
SWBasicFilter() (defined in SWBasicFilter)SWBasicFilter
ThMLHTML() (defined in ThMLHTML)ThMLHTML
tokenSubMap (defined in SWBasicFilter)SWBasicFilter [protected]
~SWBasicFilter() (defined in SWBasicFilter)SWBasicFilter [virtual]
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_h_t_m_l.html b/doc/api-documentation/html/class_th_m_l_h_t_m_l.html deleted file mode 100644 index 2c0266f..0000000 --- a/doc/api-documentation/html/class_th_m_l_h_t_m_l.html +++ /dev/null @@ -1,189 +0,0 @@ - - -ThMLHTML class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLHTML Class Reference

this filter converts ThML text to HTML text. -More... -

-#include <thmlhtml.h> -

-Inheritance diagram for ThMLHTML:

Inheritance graph
- - - -
[legend]
Collaboration diagram for ThMLHTML:

Collaboration graph
- - - - - - - - - -
[legend]
List of all members. - - - - - -

Public Methods

ThMLHTML ()

Protected Methods

virtual bool handleToken (char **buf, const char *token, DualStringMap &userData)
 This function is called for every token encountered in the input text. More...

-

Detailed Description

-this filter converts ThML text to HTML text. -

- -

-Definition at line 28 of file thmlhtml.h.


Member Function Documentation

-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
bool ThMLHTML::handleToken char **   buf,
const char *   token,
DualStringMap &   userData
[protected, virtual]
-
- - - - - -
-   - - -

-This function is called for every token encountered in the input text. -

-

-Parameters:
- - - - -
buf  -the output buffer (FIXME: what is its size?)
token  -the token (e.g. "p align='left'"
userData  -FIXME: document this
-
-Returns:
-false if was not handled and should be handled in the default way (by just substituting).
-

-Reimplemented from SWBasicFilter. -

-Definition at line 137 of file thmlhtml.cpp. -

-References SWModule::getConfigEntry(), and SWBasicFilter::pushString(). -

-

00137                                                                                  {
-00138         if (!substituteToken(buf, token)) {
-00139         // manually process if it wasn't a simple substitution
-00140                 if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
-00141                         if (token[27] == 'H' || token[27] == 'G' || token[27] == 'A') {
-00142                                 pushString(buf, "<small><em>");
-00143                                 for (const char *tok = token + 5; *tok; tok++)
-00144                                         if(*tok != '\"')
-00145                                                 *(*buf)++ = *tok;
-00146                                 pushString(buf, "</em></small>");
-00147                         }
-00148                         else if (token[27] == 'T') {
-00149                                 pushString(buf, "<small><i>");
-00150                                 for (unsigned int i = 29; token[i] != '\"'; i++)
-00151                                         *(*buf)++ = token[i];
-00152                                 pushString(buf, "</i></small>");
-00153                         }
-00154                 }
-00155                 else if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
-00156                         pushString(buf, "<small><em>");
-00157                         for (unsigned int i = 25; token[i] != '\"'; i++)
-00158                                 *(*buf)++ = token[i];
-00159                         pushString(buf, "</em></small>");
-00160                 }
-00161                 else if (!strncmp(token, "sync type=\"lemma\" value=\"", 25)) {
-00162                         pushString(buf, "<small><em>(");
-00163                         for (unsigned int i = 25; token[i] != '\"'; i++)
-00164                                 *(*buf)++ = token[i];
-00165                         pushString(buf, ")</em></small>");
-00166                 }
-00167                 else if (!strncmp(token, "scripRef", 8)) {
-00168                         pushString(buf, "<a href=\"");
-00169                         for (const char *tok = token + 9; *tok; tok++)
-00170                                 if(*tok != '\"')
-00171                                         *(*buf)++ = *tok;
-00172                         *(*buf)++ = '\"';
-00173                         *(*buf)++ = '>';
-00174                 }
-00175                 else if (!strncmp(token, "img ", 4)) {
-00176                         const char *src = strstr(token, "src");
-00177                         if (!src)               // assert we have a src attribute
-00178                                 return false;
-00179 
-00180                         *(*buf)++ = '<';
-00181                         for (const char *c = token; *c; c++) {
-00182                                 if (c == src) {
-00183                                         for (;((*c) && (*c != '"')); c++)
-00184                                                 *(*buf)++ = *c;
-00185 
-00186                                         if (!*c) { c--; continue; }
-00187 
-00188                                         *(*buf)++ = '"';
-00189                                         if (*(c+1) == '/') {
-00190                                                 pushString(buf, "file:");
-00191                                                 pushString(buf, module->getConfigEntry("AbsoluteDataPath"));
-00192                                                 if (*((*buf)-1) == '/')
-00193                                                         c++;            // skip '/'
-00194                                         }
-00195                                         continue;
-00196                                 }
-00197                                 *(*buf)++ = *c;
-00198                         }
-00199                         *(*buf)++ = '>';
-00200                 }
-00201                 else if(!strncmp(token, "note", 4)) {
-00202                         pushString(buf, " <font color=\"#800000\"><small>(");
-00203                 }
-00204 
-00205                 else {
-00206                         return false;  // we still didn't handle token
-00207                 }
-00208         }
-00209         return true;
-00210 }
-
-


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_h_t_m_l__coll__graph.png b/doc/api-documentation/html/class_th_m_l_h_t_m_l__coll__graph.png deleted file mode 100644 index 8107edf..0000000 Binary files a/doc/api-documentation/html/class_th_m_l_h_t_m_l__coll__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_th_m_l_h_t_m_l__inherit__graph.png b/doc/api-documentation/html/class_th_m_l_h_t_m_l__inherit__graph.png deleted file mode 100644 index 7945db5..0000000 Binary files a/doc/api-documentation/html/class_th_m_l_h_t_m_l__inherit__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_th_m_l_h_t_m_l_h_r_e_f-members.html b/doc/api-documentation/html/class_th_m_l_h_t_m_l_h_r_e_f-members.html deleted file mode 100644 index 3c420b7..0000000 --- a/doc/api-documentation/html/class_th_m_l_h_t_m_l_h_r_e_f-members.html +++ /dev/null @@ -1,47 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLHTMLHREF Member List

This is the complete list of members for ThMLHTMLHREF, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
addEscapeStringSubstitute(const char *findString, const char *replaceString) (defined in SWBasicFilter)SWBasicFilter [protected]
addTokenSubstitute(const char *findString, const char *replaceString) (defined in SWBasicFilter)SWBasicFilter [protected]
DualStringMap typedef (defined in SWBasicFilter)SWBasicFilter [protected]
escSubMap (defined in SWBasicFilter)SWBasicFilter [protected]
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
handleEscapeString(char **buf, const char *escString, DualStringMap &userData)SWBasicFilter [protected, virtual]
handleToken(char **buf, const char *token, DualStringMap &userData)ThMLHTMLHREF [protected, virtual]
key (defined in SWBasicFilter)SWBasicFilter [protected]
module (defined in SWBasicFilter)SWBasicFilter [protected]
ProcessText(char *text, int maxlen, const SWKey *, const SWModule *=0) (defined in SWBasicFilter)SWBasicFilter [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
pushString(char **buf, const char *format,...)SWBasicFilter [protected]
resultBuffer (defined in SWBasicFilter)SWBasicFilter [protected]
setEscapeEnd(const char *escEnd)SWBasicFilter [protected]
setEscapeStart(const char *escStart)SWBasicFilter [protected]
setEscapeStringCaseSensitive(bool val) (defined in SWBasicFilter)SWBasicFilter [protected]
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
setPassThruUnknownEscapeString(bool val)SWBasicFilter [protected]
setPassThruUnknownToken(bool val)SWBasicFilter [protected]
setTokenCaseSensitive(bool val) (defined in SWBasicFilter)SWBasicFilter [protected]
setTokenEnd(const char *tokenEnd)SWBasicFilter [protected]
setTokenStart(const char *tokenStart)SWBasicFilter [protected]
substituteEscapeString(char **buf, const char *escString) (defined in SWBasicFilter)SWBasicFilter [protected]
substituteToken(char **buf, const char *token) (defined in SWBasicFilter)SWBasicFilter [protected]
SWBasicFilter() (defined in SWBasicFilter)SWBasicFilter
ThMLHTMLHREF() (defined in ThMLHTMLHREF)ThMLHTMLHREF
tokenSubMap (defined in SWBasicFilter)SWBasicFilter [protected]
~SWBasicFilter() (defined in SWBasicFilter)SWBasicFilter [virtual]
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_h_t_m_l_h_r_e_f.html b/doc/api-documentation/html/class_th_m_l_h_t_m_l_h_r_e_f.html deleted file mode 100644 index 0eafeea..0000000 --- a/doc/api-documentation/html/class_th_m_l_h_t_m_l_h_r_e_f.html +++ /dev/null @@ -1,247 +0,0 @@ - - -ThMLHTMLHREF class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLHTMLHREF Class Reference

this filter converts ThML text to HTML text with hrefs. -More... -

-#include <thmlhtmlhref.h> -

-Inheritance diagram for ThMLHTMLHREF:

Inheritance graph
- - - -
[legend]
Collaboration diagram for ThMLHTMLHREF:

Collaboration graph
- - - - - - - - - -
[legend]
List of all members. - - - - - -

Public Methods

ThMLHTMLHREF ()

Protected Methods

virtual bool handleToken (char **buf, const char *token, DualStringMap &userData)
 This function is called for every token encountered in the input text. More...

-

Detailed Description

-this filter converts ThML text to HTML text with hrefs. -

- -

-Definition at line 26 of file thmlhtmlhref.h.


Member Function Documentation

-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
bool ThMLHTMLHREF::handleToken char **   buf,
const char *   token,
DualStringMap &   userData
[protected, virtual]
-
- - - - - -
-   - - -

-This function is called for every token encountered in the input text. -

-

-Parameters:
- - - - -
buf  -the output buffer (FIXME: what is its size?)
token  -the token (e.g. "p align='left'"
userData  -FIXME: document this
-
-Returns:
-false if was not handled and should be handled in the default way (by just substituting).
-

-Reimplemented from SWBasicFilter. -

-Definition at line 137 of file thmlhtmlhref.cpp. -

-References SWModule::getConfigEntry(), and SWBasicFilter::pushString(). -

-

00137                                                                                      {
-00138         const char *tok;
-00139         if (!substituteToken(buf, token)) {
-00140         // manually process if it wasn't a simple substitution
-00141                 if (!strncmp(token, "sync ", 5)) {
-00142                         pushString(buf, "<a href=\"");
-00143                         for (tok = token + 5; *(tok+1); tok++)
-00144                                 if(*tok != '\"')
-00145                                         *(*buf)++ = *tok;
-00146                         *(*buf)++ = '\"';
-00147                         *(*buf)++ = '>';
-00148 
-00149                         //scan for value and add it to the buffer
-00150                         for (tok = token + 5; *tok; tok++) {
-00151                                 if (!strncmp(tok, "value=\"", 7)) {
-00152                                         tok += 7;
-00153                                         for (;*tok != '\"'; tok++)
-00154                                                 *(*buf)++ = *tok;
-00155                                         break;
-00156                                 }
-00157                         }
-00158                         pushString(buf, "</a>");
-00159                 }
-00160                 
-00161                 else if (!strncmp(token, "scripture ", 10)) {
-00162                         userData["inscriptRef"] = "true";
-00163                         pushString(buf, "<i>");
-00164                 } 
-00165 
-00166                 else if (!strncmp(token, "scripRef p", 10) || !strncmp(token, "scripRef v", 10)) {
-00167                         userData["inscriptRef"] = "true";
-00168                         pushString(buf, "<a href=\"");
-00169                         for (const char *tok = token + 9; *(tok+1); tok++)                              
-00170                                 if(*tok != '\"')                        
-00171                                         *(*buf)++ = *tok;
-00172                         *(*buf)++ = '\"';
-00173                         *(*buf)++ = '>';
-00174                 } 
-00175 
-00176                 // we're starting a scripRef like "<scripRef>John 3:16</scripRef>"
-00177                 else if (!strcmp(token, "scripRef")) {
-00178                         userData["inscriptRef"] = "false";
-00179                         // let's stop text from going to output
-00180                         userData["suspendTextPassThru"] = "true";
-00181                 }
-00182 
-00183                 // we've ended a scripRef 
-00184                 else if (!strcmp(token, "/scripRef")) {
-00185                         if (userData["inscriptRef"] == "true") { // like  "<scripRef passage="John 3:16">John 3:16</scripRef>"
-00186                                 userData["inscriptRef"] = "false";
-00187                                 pushString(buf, "</a>");
-00188                         }
-00189                         
-00190                         else { // like "<scripRef>John 3:16</scripRef>"
-00191                                 pushString(buf, "<a href=\"passage=");
-00192                                 //char *strbuf = (char *)userData["lastTextNode"].c_str();
-00193                                 pushString(buf, userData["lastTextNode"].c_str());
-00194                                 *(*buf)++ = '\"';
-00195                                 *(*buf)++ = '>';
-00196                                 pushString(buf, userData["lastTextNode"].c_str());
-00197                                 // let's let text resume to output again
-00198                                 userData["suspendTextPassThru"] = "false";      
-00199                                 pushString(buf, "</a>");
-00200                         }
-00201                 }
-00202                         
-00203                 else if (!strncmp(token, "div class=\"sechead\"", 19)) {
-00204                         userData["SecHead"] = "true";
-00205                         pushString(buf, "<br /><b><i>");
-00206                 }
-00207                 else if (!strncmp(token, "div class=\"title\"", 19)) {
-00208                         userData["SecHead"] = "true";
-00209                         pushString(buf, "<br /><b><i>");
-00210                 }
-00211                 else if (!strncmp(token, "/div", 4)) {
-00212                         if (userData["SecHead"] == "true") {
-00213                                 pushString(buf, "</i></b><br />");
-00214                                 userData["SecHead"] = "false";
-00215                         }
-00216                 }
-00217 
-00218                 else if (!strncmp(token, "sync type=\"Strongs\" value=\"T", 28)) {
-00219                         pushString(buf, "<a href=\"");
-00220                         for (tok = token + 5; *(tok+1); tok++)                          
-00221                                 if(*tok != '\"')                        
-00222                                         *(*buf)++ = *tok;
-00223                         *(*buf)++ = '\"';
-00224                         *(*buf)++ = '>';
-00225                         for (tok = token + 29; *(tok+2); tok++)                         
-00226                                 if(*tok != '\"')                        
-00227                                         *(*buf)++ = *tok;               
-00228                         pushString(buf, "</a>");
-00229                 }
-00230                 else if (!strncmp(token, "img ", 4)) {
-00231                         const char *src = strstr(token, "src");
-00232                         if (!src)               // assert we have a src attribute
-00233                                 return false;
-00234 
-00235                         *(*buf)++ = '<';
-00236                         for (const char *c = token; *c; c++) {
-00237                                 if (c == src) {
-00238                                         for (;((*c) && (*c != '"')); c++)
-00239                                                 *(*buf)++ = *c;
-00240 
-00241                                         if (!*c) { c--; continue; }
-00242 
-00243                                         *(*buf)++ = '"';
-00244                                         if (*(c+1) == '/') {
-00245                                                 pushString(buf, "file:");
-00246                                                 pushString(buf, module->getConfigEntry("AbsoluteDataPath"));
-00247                                                 if (*((*buf)-1) == '/')
-00248                                                         c++;            // skip '/'
-00249                                         }
-00250                                         continue;
-00251                                 }
-00252                                 *(*buf)++ = *c;
-00253                         }
-00254                         *(*buf)++ = '>';
-00255                 }
-00256                 else if (!strncmp(token, "note", 4)) {
-00257                         pushString(buf, " <small><font color=\"#800000\">(");
-00258                 }                
-00259                 else {
-00260                         *(*buf)++ = '<';
-00261                         for (const char *tok = token; *tok; tok++)
-00262                                 *(*buf)++ = *tok;
-00263                         *(*buf)++ = '>';
-00264                         //return false;  // we still didn't handle token
-00265                 }
-00266         }
-00267         return true;
-00268 }
-
-


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_h_t_m_l_h_r_e_f__coll__graph.png b/doc/api-documentation/html/class_th_m_l_h_t_m_l_h_r_e_f__coll__graph.png deleted file mode 100644 index f779aea..0000000 Binary files a/doc/api-documentation/html/class_th_m_l_h_t_m_l_h_r_e_f__coll__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_th_m_l_h_t_m_l_h_r_e_f__inherit__graph.png b/doc/api-documentation/html/class_th_m_l_h_t_m_l_h_r_e_f__inherit__graph.png deleted file mode 100644 index 8c0cb93..0000000 Binary files a/doc/api-documentation/html/class_th_m_l_h_t_m_l_h_r_e_f__inherit__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_th_m_l_headings-members.html b/doc/api-documentation/html/class_th_m_l_headings-members.html deleted file mode 100644 index 43212f6..0000000 --- a/doc/api-documentation/html/class_th_m_l_headings-members.html +++ /dev/null @@ -1,31 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLHeadings Member List

This is the complete list of members for ThMLHeadings, including all inherited members. - - - - - - - - - - - - - - - - -
getOptionName() (defined in ThMLHeadings)ThMLHeadings [inline, virtual]
getOptionTip() (defined in ThMLHeadings)ThMLHeadings [inline, virtual]
getOptionValue() (defined in ThMLHeadings)ThMLHeadings [virtual]
getOptionValues() (defined in ThMLHeadings)ThMLHeadings [inline, virtual]
off (defined in ThMLHeadings)ThMLHeadings [private, static]
on (defined in ThMLHeadings)ThMLHeadings [private, static]
option (defined in ThMLHeadings)ThMLHeadings [private]
options (defined in ThMLHeadings)ThMLHeadings [private]
optName (defined in ThMLHeadings)ThMLHeadings [private, static]
optTip (defined in ThMLHeadings)ThMLHeadings [private, static]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in ThMLHeadings)ThMLHeadings [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *ival) (defined in ThMLHeadings)ThMLHeadings [virtual]
ThMLHeadings() (defined in ThMLHeadings)ThMLHeadings
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]
~ThMLHeadings() (defined in ThMLHeadings)ThMLHeadings [virtual]

Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_headings.html b/doc/api-documentation/html/class_th_m_l_headings.html deleted file mode 100644 index 51cc6d9..0000000 --- a/doc/api-documentation/html/class_th_m_l_headings.html +++ /dev/null @@ -1,59 +0,0 @@ - - -ThMLHeadings class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLHeadings Class Reference

This Filter shows/hides headings in a ThML text. -More... -

-#include <thmlheadings.h> -

-List of all members. - - - - - - - - - - - - - - - - - -

Public Methods

ThMLHeadings ()
-virtual ~ThMLHeadings ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-virtual const char * getOptionName ()
-virtual const char * getOptionTip ()
-virtual void setOptionValue (const char *ival)
-virtual const char * getOptionValue ()
-virtual OptionsList getOptionValues ()

Private Attributes

-bool option
-OptionsList options

Static Private Attributes

-const char on [] = "On"
-const char off [] = "Off"
-const char optName [] = "Headings"
-const char optTip [] = "Toggles Headings On and Off if they exist"
-


Detailed Description

-This Filter shows/hides headings in a ThML text. -

- -

-Definition at line 30 of file thmlheadings.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_lemma-members.html b/doc/api-documentation/html/class_th_m_l_lemma-members.html deleted file mode 100644 index 191096e..0000000 --- a/doc/api-documentation/html/class_th_m_l_lemma-members.html +++ /dev/null @@ -1,31 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLLemma Member List

This is the complete list of members for ThMLLemma, including all inherited members. - - - - - - - - - - - - - - - - -
getOptionName() (defined in ThMLLemma)ThMLLemma [inline, virtual]
getOptionTip() (defined in ThMLLemma)ThMLLemma [inline, virtual]
getOptionValue() (defined in ThMLLemma)ThMLLemma [virtual]
getOptionValues() (defined in ThMLLemma)ThMLLemma [inline, virtual]
off (defined in ThMLLemma)ThMLLemma [private, static]
on (defined in ThMLLemma)ThMLLemma [private, static]
option (defined in ThMLLemma)ThMLLemma [private]
options (defined in ThMLLemma)ThMLLemma [private]
optName (defined in ThMLLemma)ThMLLemma [private, static]
optTip (defined in ThMLLemma)ThMLLemma [private, static]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in ThMLLemma)ThMLLemma [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *ival) (defined in ThMLLemma)ThMLLemma [virtual]
ThMLLemma() (defined in ThMLLemma)ThMLLemma
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]
~ThMLLemma() (defined in ThMLLemma)ThMLLemma [virtual]

Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_lemma.html b/doc/api-documentation/html/class_th_m_l_lemma.html deleted file mode 100644 index d1d8cb9..0000000 --- a/doc/api-documentation/html/class_th_m_l_lemma.html +++ /dev/null @@ -1,59 +0,0 @@ - - -ThMLLemma class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLLemma Class Reference

This Filter shows/hides lemmas in a ThML text. -More... -

-#include <thmllemma.h> -

-List of all members. - - - - - - - - - - - - - - - - - -

Public Methods

ThMLLemma ()
-virtual ~ThMLLemma ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-virtual const char * getOptionName ()
-virtual const char * getOptionTip ()
-virtual void setOptionValue (const char *ival)
-virtual const char * getOptionValue ()
-virtual OptionsList getOptionValues ()

Private Attributes

-bool option
-OptionsList options

Static Private Attributes

-const char on [] = "On"
-const char off [] = "Off"
-const char optName [] = "Lemmas"
-const char optTip [] = "Toggles Lemmas On and Off if they exist"
-


Detailed Description

-This Filter shows/hides lemmas in a ThML text. -

- -

-Definition at line 30 of file thmllemma.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_morph-members.html b/doc/api-documentation/html/class_th_m_l_morph-members.html deleted file mode 100644 index f2093df..0000000 --- a/doc/api-documentation/html/class_th_m_l_morph-members.html +++ /dev/null @@ -1,31 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLMorph Member List

This is the complete list of members for ThMLMorph, including all inherited members. - - - - - - - - - - - - - - - - -
getOptionName() (defined in ThMLMorph)ThMLMorph [inline, virtual]
getOptionTip() (defined in ThMLMorph)ThMLMorph [inline, virtual]
getOptionValue() (defined in ThMLMorph)ThMLMorph [virtual]
getOptionValues() (defined in ThMLMorph)ThMLMorph [inline, virtual]
off (defined in ThMLMorph)ThMLMorph [private, static]
on (defined in ThMLMorph)ThMLMorph [private, static]
option (defined in ThMLMorph)ThMLMorph [private]
options (defined in ThMLMorph)ThMLMorph [private]
optName (defined in ThMLMorph)ThMLMorph [private, static]
optTip (defined in ThMLMorph)ThMLMorph [private, static]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in ThMLMorph)ThMLMorph [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *ival) (defined in ThMLMorph)ThMLMorph [virtual]
ThMLMorph() (defined in ThMLMorph)ThMLMorph
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]
~ThMLMorph() (defined in ThMLMorph)ThMLMorph [virtual]

Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_morph.html b/doc/api-documentation/html/class_th_m_l_morph.html deleted file mode 100644 index 2916801..0000000 --- a/doc/api-documentation/html/class_th_m_l_morph.html +++ /dev/null @@ -1,59 +0,0 @@ - - -ThMLMorph class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLMorph Class Reference

This Filter shows/hides morph tags in a ThML text. -More... -

-#include <thmlmorph.h> -

-List of all members. - - - - - - - - - - - - - - - - - -

Public Methods

ThMLMorph ()
-virtual ~ThMLMorph ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-virtual const char * getOptionName ()
-virtual const char * getOptionTip ()
-virtual void setOptionValue (const char *ival)
-virtual const char * getOptionValue ()
-virtual OptionsList getOptionValues ()

Private Attributes

-bool option
-OptionsList options

Static Private Attributes

-const char on [] = "On"
-const char off [] = "Off"
-const char optName [] = "Morphological Tags"
-const char optTip [] = "Toggles Morphological Tags On and Off if they exist"
-


Detailed Description

-This Filter shows/hides morph tags in a ThML text. -

- -

-Definition at line 29 of file thmlmorph.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_o_l_b-members.html b/doc/api-documentation/html/class_th_m_l_o_l_b-members.html deleted file mode 100644 index 03237a2..0000000 --- a/doc/api-documentation/html/class_th_m_l_o_l_b-members.html +++ /dev/null @@ -1,24 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLOLB Member List

This is the complete list of members for ThMLOLB, including all inherited members. - - - - - - - - - -
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
ProcessText(char *text, int maxlen=-1) (defined in ThMLOLB)ThMLOLB [virtual]
ProcessText(char *text, int maxlen, const SWKey *, const SWModule *=0) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
ThMLOLB() (defined in ThMLOLB)ThMLOLB
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_o_l_b.html b/doc/api-documentation/html/class_th_m_l_o_l_b.html deleted file mode 100644 index aaac04a..0000000 --- a/doc/api-documentation/html/class_th_m_l_o_l_b.html +++ /dev/null @@ -1,33 +0,0 @@ - - -ThMLOLB class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLOLB Class Reference

this filter converts ThML text to OLB text. -More... -

-#include <thmlolb.h> -

-List of all members. - - - -

Public Methods

ThMLOLB ()
-virtual char ProcessText (char *text, int maxlen=-1)
-


Detailed Description

-this filter converts ThML text to OLB text. -

- -

-Definition at line 30 of file thmlolb.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_o_s_i_s-members.html b/doc/api-documentation/html/class_th_m_l_o_s_i_s-members.html deleted file mode 100644 index 200403c..0000000 --- a/doc/api-documentation/html/class_th_m_l_o_s_i_s-members.html +++ /dev/null @@ -1,27 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLOSIS Member List

This is the complete list of members for ThMLOSIS, including all inherited members. - - - - - - - - - - - - -
convertToOSIS(const char *, const SWKey *key) (defined in ThMLOSIS)ThMLOSIS [protected, virtual]
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
ProcessText(char *text, int maxlen, const SWKey *, const SWModule *=0) (defined in ThMLOSIS)ThMLOSIS
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
pushString(char **buf, const char *format,...) (defined in ThMLOSIS)ThMLOSIS [protected]
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
ThMLOSIS() (defined in ThMLOSIS)ThMLOSIS
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]
~ThMLOSIS() (defined in ThMLOSIS)ThMLOSIS [virtual]

Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_o_s_i_s.html b/doc/api-documentation/html/class_th_m_l_o_s_i_s.html deleted file mode 100644 index 031aa04..0000000 --- a/doc/api-documentation/html/class_th_m_l_o_s_i_s.html +++ /dev/null @@ -1,40 +0,0 @@ - - -ThMLOSIS class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLOSIS Class Reference

this filter converts ThML text to HTML text with hrefs. -More... -

-#include <thmlosis.h> -

-List of all members. - - - - - - - -

Public Methods

ThMLOSIS ()
-virtual ~ThMLOSIS ()
-char ProcessText (char *text, int maxlen, const SWKey *, const SWModule *=0)

Protected Methods

-virtual const char * convertToOSIS (const char *, const SWKey *key)
-void pushString (char **buf, const char *format,...)
-


Detailed Description

-this filter converts ThML text to HTML text with hrefs. -

- -

-Definition at line 25 of file thmlosis.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_plain-members.html b/doc/api-documentation/html/class_th_m_l_plain-members.html deleted file mode 100644 index b813192..0000000 --- a/doc/api-documentation/html/class_th_m_l_plain-members.html +++ /dev/null @@ -1,24 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLPlain Member List

This is the complete list of members for ThMLPlain, including all inherited members. - - - - - - - - - -
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
ProcessText(char *text, int maxlen=-1) (defined in ThMLPlain)ThMLPlain [virtual]
ProcessText(char *text, int maxlen, const SWKey *, const SWModule *=0) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
ThMLPlain() (defined in ThMLPlain)ThMLPlain
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_plain.html b/doc/api-documentation/html/class_th_m_l_plain.html deleted file mode 100644 index 5243c4c..0000000 --- a/doc/api-documentation/html/class_th_m_l_plain.html +++ /dev/null @@ -1,33 +0,0 @@ - - -ThMLPlain class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLPlain Class Reference

this filter converts ThML text to plain text. -More... -

-#include <thmlplain.h> -

-List of all members. - - - -

Public Methods

ThMLPlain ()
-virtual char ProcessText (char *text, int maxlen=-1)
-


Detailed Description

-this filter converts ThML text to plain text. -

- -

-Definition at line 30 of file thmlplain.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_r_t_f-members.html b/doc/api-documentation/html/class_th_m_l_r_t_f-members.html deleted file mode 100644 index 974393e..0000000 --- a/doc/api-documentation/html/class_th_m_l_r_t_f-members.html +++ /dev/null @@ -1,47 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLRTF Member List

This is the complete list of members for ThMLRTF, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
addEscapeStringSubstitute(const char *findString, const char *replaceString) (defined in SWBasicFilter)SWBasicFilter [protected]
addTokenSubstitute(const char *findString, const char *replaceString) (defined in SWBasicFilter)SWBasicFilter [protected]
DualStringMap typedef (defined in SWBasicFilter)SWBasicFilter [protected]
escSubMap (defined in SWBasicFilter)SWBasicFilter [protected]
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
handleEscapeString(char **buf, const char *escString, DualStringMap &userData)SWBasicFilter [protected, virtual]
handleToken(char **buf, const char *token, DualStringMap &userData)ThMLRTF [protected, virtual]
key (defined in SWBasicFilter)SWBasicFilter [protected]
module (defined in SWBasicFilter)SWBasicFilter [protected]
ProcessText(char *text, int maxlen, const SWKey *, const SWModule *=0) (defined in SWBasicFilter)SWBasicFilter [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
pushString(char **buf, const char *format,...)SWBasicFilter [protected]
resultBuffer (defined in SWBasicFilter)SWBasicFilter [protected]
setEscapeEnd(const char *escEnd)SWBasicFilter [protected]
setEscapeStart(const char *escStart)SWBasicFilter [protected]
setEscapeStringCaseSensitive(bool val) (defined in SWBasicFilter)SWBasicFilter [protected]
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
setPassThruUnknownEscapeString(bool val)SWBasicFilter [protected]
setPassThruUnknownToken(bool val)SWBasicFilter [protected]
setTokenCaseSensitive(bool val) (defined in SWBasicFilter)SWBasicFilter [protected]
setTokenEnd(const char *tokenEnd)SWBasicFilter [protected]
setTokenStart(const char *tokenStart)SWBasicFilter [protected]
substituteEscapeString(char **buf, const char *escString) (defined in SWBasicFilter)SWBasicFilter [protected]
substituteToken(char **buf, const char *token) (defined in SWBasicFilter)SWBasicFilter [protected]
SWBasicFilter() (defined in SWBasicFilter)SWBasicFilter
ThMLRTF() (defined in ThMLRTF)ThMLRTF
tokenSubMap (defined in SWBasicFilter)SWBasicFilter [protected]
~SWBasicFilter() (defined in SWBasicFilter)SWBasicFilter [virtual]
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_r_t_f.html b/doc/api-documentation/html/class_th_m_l_r_t_f.html deleted file mode 100644 index fc88569..0000000 --- a/doc/api-documentation/html/class_th_m_l_r_t_f.html +++ /dev/null @@ -1,186 +0,0 @@ - - -ThMLRTF class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLRTF Class Reference

this filter converts ThML text to RTF text. -More... -

-#include <thmlrtf.h> -

-Inheritance diagram for ThMLRTF:

Inheritance graph
- - - -
[legend]
Collaboration diagram for ThMLRTF:

Collaboration graph
- - - - - - - - - -
[legend]
List of all members. - - - - - -

Public Methods

ThMLRTF ()

Protected Methods

virtual bool handleToken (char **buf, const char *token, DualStringMap &userData)
 This function is called for every token encountered in the input text. More...

-

Detailed Description

-this filter converts ThML text to RTF text. -

- -

-Definition at line 30 of file thmlrtf.h.


Member Function Documentation

-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
bool ThMLRTF::handleToken char **   buf,
const char *   token,
DualStringMap &   userData
[protected, virtual]
-
- - - - - -
-   - - -

-This function is called for every token encountered in the input text. -

-

-Parameters:
- - - - -
buf  -the output buffer (FIXME: what is its size?)
token  -the token (e.g. "p align='left'"
userData  -FIXME: document this
-
-Returns:
-false if was not handled and should be handled in the default way (by just substituting).
-

-Reimplemented from SWBasicFilter. -

-Definition at line 150 of file thmlrtf.cpp. -

-References SWBasicFilter::pushString(). -

-

00150                                                                                 {
-00151         if (!substituteToken(buf, token)) {
-00152         // manually process if it wasn't a simple substitution
-00153                 if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
-00154                         if (token[27] == 'H' || token[27] == 'G' || token[27] == 'A') {
-00155                                 pushString(buf, " {\\fs15 <");
-00156                                 for (unsigned int i = 28; token[i] != '\"'; i++)
-00157                                         *(*buf)++ = token[i];
-00158                                 pushString(buf, ">}");
-00159                                     }
-00160                                     else if (token[27] == 'T') {
-00161                                                   pushString(buf, " {\\fs15 (");
-00162                                 for (unsigned int i = 28; token[i] != '\"'; i++)
-00163                                         *(*buf)++ = token[i];
-00164                                 pushString(buf, ")}");
-00165                                     }
-00166                 }
-00167                 else if (!strncmp(token, "sync type=\"morph\" ", 18)) {
-00168                         pushString(buf, " {\\fs15 (");
-00169                         for (const char *tok = token + 5; *tok; tok++) {
-00170                                 if (!strncmp(tok, "value=\"", 7)) {
-00171                                         tok += 7;
-00172                                         for (;*tok != '\"'; tok++)
-00173                                                 *(*buf)++ = *tok;
-00174                                         break;
-00175                                 }
-00176                         }
-00177 
-00178                         pushString(buf, ")}");
-00179                 }
-00180                 else if (!strncmp(token, "sync type=\"lemma\" value=\"", 25)) {
-00181                         pushString(buf, "{\\fs15 (");
-00182                         for (unsigned int i = 25; token[i] != '\"'; i++)
-00183                                 *(*buf)++ = token[i];
-00184                         pushString(buf, ")}");
-00185                 }
-00186                 else if (!strncmp(token, "scripRef", 8)) {
-00187 //                      pushString(buf, "{\\cf2 #");
-00188                         pushString(buf, "<a href=\"\">");
-00189                 }
-00190                 else if (!strncmp(token, "/scripRef", 9)) {
-00191                         pushString(buf, "</a>");
-00192                 }
-00193                 else if (!strncmp(token, "div", 3)) {
-00194                         *(*buf)++ = '{';
-00195                         if (!strncmp(token, "div class=\"title\"", 17)) {
-00196                                 pushString(buf, "\\par\\i1\\b1 ");
-00197                                 userData["sechead"] = "true";
-00198                         }
-00199                         else if (!strncmp(token, "div class=\"sechead\"", 19)) {
-00200                                 pushString(buf, "\\par\\i1\\b1 ");
-00201                                 userData["sechead"] = "true";
-00202                         }
-00203                 }
-00204                 else if (!strncmp(token, "/div", 4)) {
-00205                         *(*buf)++ = '}';
-00206                         if (userData["sechead"] == "true") {
-00207                                 pushString(buf, "\\par ");
-00208                                 userData["sechead"] == "false";
-00209                         }
-00210                 }
-00211                 else if (!strncmp(token, "note", 4)) {
-00212                         pushString(buf, " {\\i1\\fs15 (");
-00213                 }
-00214 
-00215                 else {
-00216                         return false;  // we still didn't handle token
-00217                 }
-00218         }
-00219         return true;
-00220 }
-
-


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_r_t_f__coll__graph.png b/doc/api-documentation/html/class_th_m_l_r_t_f__coll__graph.png deleted file mode 100644 index b048dda..0000000 Binary files a/doc/api-documentation/html/class_th_m_l_r_t_f__coll__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_th_m_l_r_t_f__inherit__graph.png b/doc/api-documentation/html/class_th_m_l_r_t_f__inherit__graph.png deleted file mode 100644 index 660c493..0000000 Binary files a/doc/api-documentation/html/class_th_m_l_r_t_f__inherit__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_th_m_l_scripref-members.html b/doc/api-documentation/html/class_th_m_l_scripref-members.html deleted file mode 100644 index e1f83d8..0000000 --- a/doc/api-documentation/html/class_th_m_l_scripref-members.html +++ /dev/null @@ -1,31 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLScripref Member List

This is the complete list of members for ThMLScripref, including all inherited members. - - - - - - - - - - - - - - - - -
getOptionName() (defined in ThMLScripref)ThMLScripref [inline, virtual]
getOptionTip() (defined in ThMLScripref)ThMLScripref [inline, virtual]
getOptionValue() (defined in ThMLScripref)ThMLScripref [virtual]
getOptionValues() (defined in ThMLScripref)ThMLScripref [inline, virtual]
off (defined in ThMLScripref)ThMLScripref [private, static]
on (defined in ThMLScripref)ThMLScripref [private, static]
option (defined in ThMLScripref)ThMLScripref [private]
options (defined in ThMLScripref)ThMLScripref [private]
optName (defined in ThMLScripref)ThMLScripref [private, static]
optTip (defined in ThMLScripref)ThMLScripref [private, static]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in ThMLScripref)ThMLScripref [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *ival) (defined in ThMLScripref)ThMLScripref [virtual]
ThMLScripref() (defined in ThMLScripref)ThMLScripref
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]
~ThMLScripref() (defined in ThMLScripref)ThMLScripref [virtual]

Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_scripref.html b/doc/api-documentation/html/class_th_m_l_scripref.html deleted file mode 100644 index 3f9d3f1..0000000 --- a/doc/api-documentation/html/class_th_m_l_scripref.html +++ /dev/null @@ -1,59 +0,0 @@ - - -ThMLScripref class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLScripref Class Reference

This Filter shows/hides scripture references in a ThML text. -More... -

-#include <thmlscripref.h> -

-List of all members. - - - - - - - - - - - - - - - - - -

Public Methods

ThMLScripref ()
-virtual ~ThMLScripref ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-virtual const char * getOptionName ()
-virtual const char * getOptionTip ()
-virtual void setOptionValue (const char *ival)
-virtual const char * getOptionValue ()
-virtual OptionsList getOptionValues ()

Private Attributes

-bool option
-OptionsList options

Static Private Attributes

-const char on [] = "On"
-const char off [] = "Off"
-const char optName [] = "Scripture Cross-references"
-const char optTip [] = "Toggles Scripture Cross-references On and Off if they exist"
-


Detailed Description

-This Filter shows/hides scripture references in a ThML text. -

- -

-Definition at line 30 of file thmlscripref.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_strongs-members.html b/doc/api-documentation/html/class_th_m_l_strongs-members.html deleted file mode 100644 index 2684ecb..0000000 --- a/doc/api-documentation/html/class_th_m_l_strongs-members.html +++ /dev/null @@ -1,31 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLStrongs Member List

This is the complete list of members for ThMLStrongs, including all inherited members. - - - - - - - - - - - - - - - - -
getOptionName() (defined in ThMLStrongs)ThMLStrongs [inline, virtual]
getOptionTip() (defined in ThMLStrongs)ThMLStrongs [inline, virtual]
getOptionValue() (defined in ThMLStrongs)ThMLStrongs [virtual]
getOptionValues() (defined in ThMLStrongs)ThMLStrongs [inline, virtual]
off (defined in ThMLStrongs)ThMLStrongs [private, static]
on (defined in ThMLStrongs)ThMLStrongs [private, static]
option (defined in ThMLStrongs)ThMLStrongs [private]
options (defined in ThMLStrongs)ThMLStrongs [private]
optName (defined in ThMLStrongs)ThMLStrongs [private, static]
optTip (defined in ThMLStrongs)ThMLStrongs [private, static]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in ThMLStrongs)ThMLStrongs [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *ival) (defined in ThMLStrongs)ThMLStrongs [virtual]
ThMLStrongs() (defined in ThMLStrongs)ThMLStrongs
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]
~ThMLStrongs() (defined in ThMLStrongs)ThMLStrongs [virtual]

Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_strongs.html b/doc/api-documentation/html/class_th_m_l_strongs.html deleted file mode 100644 index d31b790..0000000 --- a/doc/api-documentation/html/class_th_m_l_strongs.html +++ /dev/null @@ -1,59 +0,0 @@ - - -ThMLStrongs class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLStrongs Class Reference

This Filter shows/hides strong's numbers in a ThML text. -More... -

-#include <thmlstrongs.h> -

-List of all members. - - - - - - - - - - - - - - - - - -

Public Methods

ThMLStrongs ()
-virtual ~ThMLStrongs ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-virtual const char * getOptionName ()
-virtual const char * getOptionTip ()
-virtual void setOptionValue (const char *ival)
-virtual const char * getOptionValue ()
-virtual OptionsList getOptionValues ()

Private Attributes

-bool option
-OptionsList options

Static Private Attributes

-const char on [] = "On"
-const char off [] = "Off"
-const char optName [] = "Strong's Numbers"
-const char optTip [] = "Toggles Strong's Numbers On and Off if they exist"
-


Detailed Description

-This Filter shows/hides strong's numbers in a ThML text. -

- -

-Definition at line 30 of file thmlstrongs.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_variants-members.html b/doc/api-documentation/html/class_th_m_l_variants-members.html deleted file mode 100644 index 23b0230..0000000 --- a/doc/api-documentation/html/class_th_m_l_variants-members.html +++ /dev/null @@ -1,32 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLVariants Member List

This is the complete list of members for ThMLVariants, including all inherited members. - - - - - - - - - - - - - - - - - -
all (defined in ThMLVariants)ThMLVariants [private, static]
getOptionName() (defined in ThMLVariants)ThMLVariants [inline, virtual]
getOptionTip() (defined in ThMLVariants)ThMLVariants [inline, virtual]
getOptionValue() (defined in ThMLVariants)ThMLVariants [virtual]
getOptionValues() (defined in ThMLVariants)ThMLVariants [inline, virtual]
option (defined in ThMLVariants)ThMLVariants [private]
options (defined in ThMLVariants)ThMLVariants [private]
optName (defined in ThMLVariants)ThMLVariants [private, static]
optTip (defined in ThMLVariants)ThMLVariants [private, static]
primary (defined in ThMLVariants)ThMLVariants [private, static]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in ThMLVariants)ThMLVariants [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
secondary (defined in ThMLVariants)ThMLVariants [private, static]
setOptionValue(const char *ival) (defined in ThMLVariants)ThMLVariants [virtual]
ThMLVariants() (defined in ThMLVariants)ThMLVariants
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]
~ThMLVariants() (defined in ThMLVariants)ThMLVariants [virtual]

Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_th_m_l_variants.html b/doc/api-documentation/html/class_th_m_l_variants.html deleted file mode 100644 index 46b01ef..0000000 --- a/doc/api-documentation/html/class_th_m_l_variants.html +++ /dev/null @@ -1,61 +0,0 @@ - - -ThMLVariants class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ThMLVariants Class Reference

This Filter shows/hides textual variants. -More... -

-#include <thmlvariants.h> -

-List of all members. - - - - - - - - - - - - - - - - - - -

Public Methods

ThMLVariants ()
-virtual ~ThMLVariants ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-virtual const char * getOptionName ()
-virtual const char * getOptionTip ()
-virtual void setOptionValue (const char *ival)
-virtual const char * getOptionValue ()
-virtual OptionsList getOptionValues ()

Private Attributes

-char option
-OptionsList options

Static Private Attributes

-const char primary [] = "Primary Reading"
-const char secondary [] = "Secondary Reading"
-const char all [] = "All Readings"
-const char optName [] = "Textual Variants"
-const char optTip [] = "Switch between Textual Variants modes"
-


Detailed Description

-This Filter shows/hides textual variants. -

- -

-Definition at line 29 of file thmlvariants.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_tree_key-members.html b/doc/api-documentation/html/class_tree_key-members.html deleted file mode 100644 index 5a3eb3e..0000000 --- a/doc/api-documentation/html/class_tree_key-members.html +++ /dev/null @@ -1,61 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

TreeKey Member List

This is the complete list of members for TreeKey, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
append()=0 (defined in TreeKey)TreeKey [pure virtual]
appendChild()=0 (defined in TreeKey)TreeKey [pure virtual]
classdef (defined in TreeKey)TreeKey [private, static]
clone() constSWKey [virtual]
compare(const SWKey &ikey)=0TreeKey [pure virtual]
copyFrom(const SWKey &ikey)SWKey [virtual]
decrement(int steps=1)=0TreeKey [pure virtual]
equals(const SWKey &ikey)SWKey [inline, virtual]
error (defined in SWKey)SWKey [protected]
Error()SWKey [virtual]
firstChild()=0 (defined in TreeKey)TreeKey [pure virtual]
getClass() constSWObject [inline]
getFullName() const=0 (defined in TreeKey)TreeKey [pure virtual]
getLocalName()=0 (defined in TreeKey)TreeKey [pure virtual]
getOffset() const=0 (defined in TreeKey)TreeKey [pure virtual]
getShortText() const (defined in SWKey)SWKey [inline, virtual]
getText() const=0TreeKey [pure virtual]
getUserData(int *size=0)=0 (defined in TreeKey)TreeKey [pure virtual]
hasChildren()=0 (defined in TreeKey)TreeKey [pure virtual]
increment(int steps=1)=0TreeKey [pure virtual]
Index() constTreeKey [inline, virtual]
Index(long iindex) (defined in TreeKey)TreeKey [inline, virtual]
init() (defined in TreeKey)TreeKey [private]
insertBefore()=0 (defined in TreeKey)TreeKey [pure virtual]
keytext (defined in SWKey)SWKey [protected]
myclass (defined in SWObject)SWObject [protected]
nextSibling()=0 (defined in TreeKey)TreeKey [pure virtual]
parent()=0 (defined in TreeKey)TreeKey [pure virtual]
persist (defined in SWKey)SWKey [protected]
Persist() constSWKey
Persist(signed char ikey)SWKey
previousSibling()=0 (defined in TreeKey)TreeKey [pure virtual]
remove()=0 (defined in TreeKey)TreeKey [pure virtual]
root()=0 (defined in TreeKey)TreeKey [pure virtual]
setLocalName(const char *)=0 (defined in TreeKey)TreeKey [pure virtual]
setOffset(unsigned long offset)=0 (defined in TreeKey)TreeKey [pure virtual]
setPosition(SW_POSITION p)=0 (defined in TreeKey)TreeKey [pure virtual]
setText(const char *ikey)=0TreeKey [pure virtual]
setUserData(const char *userData, int size=0)=0 (defined in TreeKey)TreeKey [pure virtual]
SWKey(const char *ikey=0)SWKey
SWKey(SWKey const &k)SWKey
Traversable() (defined in TreeKey)TreeKey [inline, virtual]
TreeKey() (defined in TreeKey)TreeKey [inline]
userData (defined in SWKey)SWKey
~SWKey()SWKey [virtual]
~TreeKey() (defined in TreeKey)TreeKey [inline]

Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_tree_key.html b/doc/api-documentation/html/class_tree_key.html deleted file mode 100644 index 5bf1416..0000000 --- a/doc/api-documentation/html/class_tree_key.html +++ /dev/null @@ -1,326 +0,0 @@ - - -TreeKey class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

TreeKey Class Reference

Class VerseKey The SWKey implementation used for verse based modules like Bibles or commentaries. -More... -

-#include <treekey.h> -

-Inheritance diagram for TreeKey:

Inheritance graph
- - - - - -
[legend]
Collaboration diagram for TreeKey:

Collaboration graph
- - - - - -
[legend]
List of all members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Methods

TreeKey ()
~TreeKey ()
-virtual const char * getLocalName ()=0
-virtual const char * setLocalName (const char *)=0
-virtual const char * getUserData (int *size=0)=0
-virtual void setUserData (const char *userData, int size=0)=0
-virtual const char * getFullName () const=0
-virtual void root ()=0
-virtual bool parent ()=0
-virtual bool firstChild ()=0
-virtual bool nextSibling ()=0
-virtual bool previousSibling ()=0
-virtual bool hasChildren ()=0
-virtual void append ()=0
-virtual void appendChild ()=0
-virtual void insertBefore ()=0
-virtual void remove ()=0
-virtual void setOffset (unsigned long offset)=0
-virtual unsigned long getOffset () const=0
virtual void setText (const char *ikey)=0
 Equates this SWKey to a character string. More...

-virtual void setPosition (SW_POSITION p)=0
-virtual const char * getText () const=0
 returns text key if (char *) cast is requested.

virtual int compare (const SWKey &ikey)=0
 Compares another VerseKey object. More...

virtual void decrement (int steps=1)=0
 Decrements key a number of entries. More...

virtual void increment (int steps=1)=0
 Increments key a number of entries. More...

-virtual char Traversable ()
virtual long Index () const
 Use this function to get te current position withing a module. More...

-virtual long Index (long iindex)

Private Methods

-void init ()

Static Private Attributes

-SWClass classdef
-

Detailed Description

-Class VerseKey The SWKey implementation used for verse based modules like Bibles or commentaries. -

- -

-Definition at line 36 of file treekey.h.


Member Function Documentation

-

- - - - -
- - - - - - - - - - -
virtual int TreeKey::compare const SWKey  ikey [pure virtual]
-
- - - - - -
-   - - -

-Compares another VerseKey object. -

-

-Parameters:
- - -
ikey  -key to compare with this one
-
-Returns:
->0 if this key is greater than compare key; <0 if this key is smaller than compare key; 0 if the keys are the same
-

-Reimplemented from SWKey. -

-Implemented in TreeKeyIdx.

-

- - - - -
- - - - - - - - - - -
virtual void TreeKey::decrement int   steps = 1 [pure virtual]
-
- - - - - -
-   - - -

-Decrements key a number of entries. -

-

-Parameters:
- - -
steps  -Number of entries to jump backward
-
-Returns:
-*this
-

-Reimplemented from SWKey. -

-Implemented in TreeKeyIdx.

-

- - - - -
- - - - - - - - - - -
virtual void TreeKey::increment int   steps = 1 [pure virtual]
-
- - - - - -
-   - - -

-Increments key a number of entries. -

-

-Parameters:
- - -
increment  -Number of entries to jump forward
-
-Returns:
-*this
-

-Reimplemented from SWKey. -

-Implemented in TreeKeyIdx.

-

- - - - -
- - - - - - - - - -
virtual long TreeKey::Index   const [inline, virtual]
-
- - - - - -
-   - - -

-Use this function to get te current position withing a module. -

-Here's a small example how to use this function and Index(long). This function uses the GerLut module and chooses a random verse from the Bible and returns it.

 const char* randomVerse() {
-   VerseKey vk;
-   SWMgr mgr;
-   LocaleMgr::systemLocaleMgr.setDefaultLocaleName("de");
-
-   SWModule* module = mgr->Modules("GerLut");
-   srand( time(0) );
-   const double newIndex = (double(rand())/RAND_MAX)*(24108+8224);
-   vk.Index(newIndex);
-   module->SetKey(vk);
-
-   char* text;
-   sprintf(text, "%s: %s",(const char*)vk ,module->StripText(&vk));
-   return text;
-
-

-Reimplemented from SWKey. -

-Definition at line 81 of file treekey.h. -

-

00081 { return getOffset(); }
-
-

- - - - -
- - - - - - - - - - -
virtual void TreeKey::setText const char *   ikey [pure virtual]
-
- - - - - -
-   - - -

-Equates this SWKey to a character string. -

-

-Parameters:
- - -
ikey  -string to set this key to
-
-

-Reimplemented from SWKey. -

-Implemented in TreeKeyIdx.

-


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:04 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_tree_key__coll__graph.png b/doc/api-documentation/html/class_tree_key__coll__graph.png deleted file mode 100644 index 68ef49c..0000000 Binary files a/doc/api-documentation/html/class_tree_key__coll__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_tree_key__inherit__graph.png b/doc/api-documentation/html/class_tree_key__inherit__graph.png deleted file mode 100644 index f67d373..0000000 Binary files a/doc/api-documentation/html/class_tree_key__inherit__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_tree_key_idx-members.html b/doc/api-documentation/html/class_tree_key_idx-members.html deleted file mode 100644 index 725a0bb..0000000 --- a/doc/api-documentation/html/class_tree_key_idx-members.html +++ /dev/null @@ -1,77 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

TreeKeyIdx Member List

This is the complete list of members for TreeKeyIdx, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_compare(const TreeKeyIdx &ikey) (defined in TreeKeyIdx)TreeKeyIdx [virtual]
append() (defined in TreeKeyIdx)TreeKeyIdx [virtual]
appendChild() (defined in TreeKeyIdx)TreeKeyIdx [virtual]
classdef (defined in TreeKeyIdx)TreeKeyIdx [private, static]
clone() constSWKey [virtual]
compare(const SWKey &ikey)TreeKeyIdx [virtual]
copyFrom(const TreeKeyIdx &ikey) (defined in TreeKeyIdx)TreeKeyIdx [virtual]
copyFrom(const SWKey &ikey)TreeKeyIdx [virtual]
create(const char *path) (defined in TreeKeyIdx)TreeKeyIdx [static]
currentNode (defined in TreeKeyIdx)TreeKeyIdx [private]
datfd (defined in TreeKeyIdx)TreeKeyIdx [private]
decrement(int steps=1)TreeKeyIdx [virtual]
equals(const SWKey &ikey)SWKey [inline, virtual]
error (defined in SWKey)SWKey [protected]
Error()SWKey [virtual]
firstChild() (defined in TreeKeyIdx)TreeKeyIdx [virtual]
getClass() constSWObject [inline]
getFullName() const (defined in TreeKeyIdx)TreeKeyIdx [virtual]
getLocalName() (defined in TreeKeyIdx)TreeKeyIdx [virtual]
getOffset() const (defined in TreeKeyIdx)TreeKeyIdx [virtual]
getShortText() const (defined in SWKey)SWKey [inline, virtual]
getText() constTreeKeyIdx [virtual]
getTreeNodeFromDatOffset(long ioffset, TreeNode *buf) const (defined in TreeKeyIdx)TreeKeyIdx [private]
getTreeNodeFromIdxOffset(long ioffset, TreeNode *node) const (defined in TreeKeyIdx)TreeKeyIdx [private]
getUserData(int *size=0) (defined in TreeKeyIdx)TreeKeyIdx [virtual]
hasChildren() (defined in TreeKeyIdx)TreeKeyIdx [virtual]
idxfd (defined in TreeKeyIdx)TreeKeyIdx [private]
increment(int steps=1)TreeKeyIdx [virtual]
Index() constTreeKey [inline, virtual]
Index(long iindex) (defined in TreeKey)TreeKey [inline, virtual]
init() (defined in TreeKeyIdx)TreeKeyIdx [private]
insertBefore() (defined in TreeKeyIdx)TreeKeyIdx [virtual]
keytext (defined in SWKey)SWKey [protected]
myclass (defined in SWObject)SWObject [protected]
nextSibling() (defined in TreeKeyIdx)TreeKeyIdx [virtual]
operator=(const TreeKeyIdx &ikey) (defined in TreeKeyIdx)TreeKeyIdx [inline, virtual]
parent() (defined in TreeKeyIdx)TreeKeyIdx [virtual]
path (defined in TreeKeyIdx)TreeKeyIdx [private]
Persist() constSWKey
Persist(signed char ikey)SWKey
persist (defined in SWKey)SWKey [protected]
previousSibling() (defined in TreeKeyIdx)TreeKeyIdx [virtual]
remove() (defined in TreeKeyIdx)TreeKeyIdx [virtual]
root() (defined in TreeKeyIdx)TreeKeyIdx [virtual]
save() (defined in TreeKeyIdx)TreeKeyIdx [virtual]
saveTreeNode(TreeNode *node) (defined in TreeKeyIdx)TreeKeyIdx [private]
saveTreeNodeOffsets(TreeNode *node) (defined in TreeKeyIdx)TreeKeyIdx [private]
setLocalName(const char *) (defined in TreeKeyIdx)TreeKeyIdx [virtual]
setOffset(unsigned long offset) (defined in TreeKeyIdx)TreeKeyIdx [virtual]
setPosition(SW_POSITION p) (defined in TreeKeyIdx)TreeKeyIdx [virtual]
setText(const char *ikey)TreeKeyIdx [virtual]
setUserData(const char *userData, int size=0) (defined in TreeKeyIdx)TreeKeyIdx [virtual]
SWKey(const char *ikey=0)SWKey
SWKey(SWKey const &k)SWKey
Traversable() (defined in TreeKeyIdx)TreeKeyIdx [inline, virtual]
TreeKey() (defined in TreeKey)TreeKey [inline]
TreeKeyIdx(const TreeKeyIdx &ikey) (defined in TreeKeyIdx)TreeKeyIdx
TreeKeyIdx(const char *idxPath, int fileMode=-1) (defined in TreeKeyIdx)TreeKeyIdx
userData (defined in SWKey)SWKey
~SWKey()SWKey [virtual]
~TreeKey() (defined in TreeKey)TreeKey [inline]
~TreeKeyIdx() (defined in TreeKeyIdx)TreeKeyIdx

Generated on Thu Jun 20 22:13:05 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_tree_key_idx.html b/doc/api-documentation/html/class_tree_key_idx.html deleted file mode 100644 index 23dbf7b..0000000 --- a/doc/api-documentation/html/class_tree_key_idx.html +++ /dev/null @@ -1,419 +0,0 @@ - - -TreeKeyIdx class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

TreeKeyIdx Class Reference

Class VerseKey The SWKey implementation used for verse based modules like Bibles or commentaries. -More... -

-#include <treekeyidx.h> -

-Inheritance diagram for TreeKeyIdx:

Inheritance graph
- - - - - -
[legend]
Collaboration diagram for TreeKeyIdx:

Collaboration graph
- - - - - - -
[legend]
List of all members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Methods

TreeKeyIdx (const TreeKeyIdx &ikey)
TreeKeyIdx (const char *idxPath, int fileMode=-1)
~TreeKeyIdx ()
-virtual const char * getLocalName ()
-virtual const char * setLocalName (const char *)
-virtual const char * getUserData (int *size=0)
-virtual void setUserData (const char *userData, int size=0)
-virtual const char * getFullName () const
-virtual void root ()
-virtual bool parent ()
-virtual bool firstChild ()
-virtual bool nextSibling ()
-virtual bool previousSibling ()
-virtual bool hasChildren ()
-virtual void append ()
-virtual void appendChild ()
-virtual void insertBefore ()
-virtual void remove ()
-virtual void save ()
-virtual void copyFrom (const TreeKeyIdx &ikey)
virtual void copyFrom (const SWKey &ikey)
 Equates this SWKey to another SWKey object. More...

-virtual SWKeyoperator= (const TreeKeyIdx &ikey)
-void setOffset (unsigned long offset)
-unsigned long getOffset () const
virtual SWKEY_OPERATORS void setText (const char *ikey)
 Equates this SWKey to a character string. More...

-virtual void setPosition (SW_POSITION p)
-virtual const char * getText () const
 returns text key if (char *) cast is requested.

-virtual int _compare (const TreeKeyIdx &ikey)
virtual int compare (const SWKey &ikey)
 Compares another VerseKey object. More...

virtual void decrement (int steps=1)
 Decrements key a number of entries. More...

virtual void increment (int steps=1)
 Increments key a number of entries. More...

-virtual char Traversable ()

Static Public Methods

-signed char create (const char *path)

Private Methods

-void getTreeNodeFromDatOffset (long ioffset, TreeNode *buf) const
-char getTreeNodeFromIdxOffset (long ioffset, TreeNode *node) const
-void saveTreeNode (TreeNode *node)
-void saveTreeNodeOffsets (TreeNode *node)
-void init ()

Private Attributes

-TreeKeyIdx::TreeNode currentNode
-char * path
-FileDesc * idxfd
-FileDesc * datfd

Static Private Attributes

-SWClass classdef
-

Detailed Description

-Class VerseKey The SWKey implementation used for verse based modules like Bibles or commentaries. -

- -

-Definition at line 35 of file treekeyidx.h.


Member Function Documentation

-

- - - - -
- - - - - - - - - - -
int TreeKeyIdx::compare const SWKey  ikey [virtual]
-
- - - - - -
-   - - -

-Compares another VerseKey object. -

-

-Parameters:
- - -
ikey  -key to compare with this one
-
-Returns:
->0 if this key is greater than compare key; <0 if this key is smaller than compare key; 0 if the keys are the same
-

-Implements TreeKey. -

-Definition at line 520 of file treekeyidx.cpp. -

-References SWKey::compare(). -

-

00520                                          {
-00521         TreeKeyIdx *treeKey = SWDYNAMIC_CAST(TreeKeyIdx, (&ikey));
-00522         if (treeKey)
-00523                 return _compare(*treeKey);
-00524         return SWKey::compare(ikey);
-00525 }
-
-

- - - - -
- - - - - - - - - - -
void TreeKeyIdx::copyFrom const SWKey  ikey [virtual]
-
- - - - - -
-   - - -

-Equates this SWKey to another SWKey object. -

-

-Parameters:
- - -
ikey  -other swkey object
-
-

-Reimplemented from SWKey. -

-Definition at line 494 of file treekeyidx.cpp. -

-References SWKey::copyFrom(). -

-

00494                                            {
-00495         SWKey::copyFrom(ikey);
-00496 }
-
-

- - - - -
- - - - - - - - - - -
void TreeKeyIdx::decrement int   steps = 1 [virtual]
-
- - - - - -
-   - - -

-Decrements key a number of entries. -

-

-Parameters:
- - -
steps  -Number of entries to jump backward
-
-Returns:
-*this
-

-Implements TreeKey. -

-Definition at line 528 of file treekeyidx.cpp. -

-

00528                                     {
-00529         error = getTreeNodeFromIdxOffset(currentNode.offset - (4*steps), &currentNode);
-00530 }
-
-

- - - - -
- - - - - - - - - - -
void TreeKeyIdx::increment int   steps = 1 [virtual]
-
- - - - - -
-   - - -

-Increments key a number of entries. -

-

-Parameters:
- - -
increment  -Number of entries to jump forward
-
-Returns:
-*this
-

-Implements TreeKey. -

-Definition at line 532 of file treekeyidx.cpp. -

-

00532                                     {
-00533         error = getTreeNodeFromIdxOffset(currentNode.offset + (4*steps), &currentNode);
-00534 
-00535 /*
-00536         // assert positive
-00537         if (steps < 0) {
-00538                 decrement(steps * -1);
-00539                 return;
-00540         }
-00541 
-00542         while (steps > 0) {
-00543                 if (!firstChild()) {
-00544                         if (!nextSibbling() {
-00545                                 error = KEYERR_OUTOFBOUNDS;
-00546                                 return;
-00547                         }
-00548                 }
-00549                 steps--;
-00550         }
-00551 */
-00552 }
-
-

- - - - -
- - - - - - - - - - -
void TreeKeyIdx::setText const char *   ikey [virtual]
-
- - - - - -
-   - - -

-Equates this SWKey to a character string. -

-

-Parameters:
- - -
ikey  -string to set this key to
-
-

-Implements TreeKey. -

-Definition at line 466 of file treekeyidx.cpp. -

-References SWKey::Error(). -

-

00466                                          {
-00467         char *buf = 0;
-00468         stdstr(&buf, ikey);
-00469         char *leaf = strtok(buf, "/");
-00470         root();
-00471         while ((leaf) && (!Error())) {
-00472                 bool ok, inChild = false;
-00473                 for (ok = firstChild(); ok; ok = nextSibling()) {
-00474                         inChild = true;
-00475                         if (!stricmp(leaf, getLocalName()))
-00476                                 break;
-00477                 }
-00478                 leaf = strtok(0, "/");
-00479                 if (!ok) {
-00480                         if (inChild) {  // if we didn't find a matching child node, default to first child
-00481                                 parent();
-00482                                 firstChild();
-00483                         }
-00484                         if (leaf)
-00485                                 error = KEYERR_OUTOFBOUNDS;
-00486                         break;
-00487                 }
-00488         }
-00489         delete [] buf;
-00490 }
-
-


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:05 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_tree_key_idx__coll__graph.png b/doc/api-documentation/html/class_tree_key_idx__coll__graph.png deleted file mode 100644 index df72316..0000000 Binary files a/doc/api-documentation/html/class_tree_key_idx__coll__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_tree_key_idx__inherit__graph.png b/doc/api-documentation/html/class_tree_key_idx__inherit__graph.png deleted file mode 100644 index 61bb3c2..0000000 Binary files a/doc/api-documentation/html/class_tree_key_idx__inherit__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_u_t_f16_u_t_f8-members.html b/doc/api-documentation/html/class_u_t_f16_u_t_f8-members.html deleted file mode 100644 index c55034b..0000000 --- a/doc/api-documentation/html/class_u_t_f16_u_t_f8-members.html +++ /dev/null @@ -1,24 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

UTF16UTF8 Member List

This is the complete list of members for UTF16UTF8, including all inherited members. - - - - - - - - - -
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in UTF16UTF8)UTF16UTF8 [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
UTF16UTF8() (defined in UTF16UTF8)UTF16UTF8
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:05 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_u_t_f16_u_t_f8.html b/doc/api-documentation/html/class_u_t_f16_u_t_f8.html deleted file mode 100644 index 8197608..0000000 --- a/doc/api-documentation/html/class_u_t_f16_u_t_f8.html +++ /dev/null @@ -1,33 +0,0 @@ - - -UTF16UTF8 class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

UTF16UTF8 Class Reference

This filter converts UTF-16 encoded text to UTF-8. -More... -

-#include <utf16utf8.h> -

-List of all members. - - - -

Public Methods

UTF16UTF8 ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-


Detailed Description

-This filter converts UTF-16 encoded text to UTF-8. -

- -

-Definition at line 29 of file utf16utf8.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:05 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_u_t_f8_cantillation-members.html b/doc/api-documentation/html/class_u_t_f8_cantillation-members.html deleted file mode 100644 index 205b82c..0000000 --- a/doc/api-documentation/html/class_u_t_f8_cantillation-members.html +++ /dev/null @@ -1,31 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

UTF8Cantillation Member List

This is the complete list of members for UTF8Cantillation, including all inherited members. - - - - - - - - - - - - - - - - -
getOptionName() (defined in UTF8Cantillation)UTF8Cantillation [inline, virtual]
getOptionTip() (defined in UTF8Cantillation)UTF8Cantillation [inline, virtual]
getOptionValue() (defined in UTF8Cantillation)UTF8Cantillation [virtual]
getOptionValues() (defined in UTF8Cantillation)UTF8Cantillation [inline, virtual]
off (defined in UTF8Cantillation)UTF8Cantillation [private, static]
on (defined in UTF8Cantillation)UTF8Cantillation [private, static]
option (defined in UTF8Cantillation)UTF8Cantillation [private]
options (defined in UTF8Cantillation)UTF8Cantillation [private]
optName (defined in UTF8Cantillation)UTF8Cantillation [private, static]
optTip (defined in UTF8Cantillation)UTF8Cantillation [private, static]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in UTF8Cantillation)UTF8Cantillation [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *ival) (defined in UTF8Cantillation)UTF8Cantillation [virtual]
UTF8Cantillation() (defined in UTF8Cantillation)UTF8Cantillation
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]
~UTF8Cantillation() (defined in UTF8Cantillation)UTF8Cantillation [virtual]

Generated on Thu Jun 20 22:13:05 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_u_t_f8_cantillation.html b/doc/api-documentation/html/class_u_t_f8_cantillation.html deleted file mode 100644 index f358c18..0000000 --- a/doc/api-documentation/html/class_u_t_f8_cantillation.html +++ /dev/null @@ -1,59 +0,0 @@ - - -UTF8Cantillation class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

UTF8Cantillation Class Reference

This Filter shows/hides Hebrew cantillation marks in UTF8 text. -More... -

-#include <utf8cantillation.h> -

-List of all members. - - - - - - - - - - - - - - - - - -

Public Methods

UTF8Cantillation ()
-virtual ~UTF8Cantillation ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-virtual const char * getOptionName ()
-virtual const char * getOptionTip ()
-virtual void setOptionValue (const char *ival)
-virtual const char * getOptionValue ()
-virtual OptionsList getOptionValues ()

Private Attributes

-bool option
-OptionsList options

Static Private Attributes

-const char on [] = "On"
-const char off [] = "Off"
-const char optName [] = "Hebrew Cantillation"
-const char optTip [] = "Toggles Hebrew Cantillation Marks"
-


Detailed Description

-This Filter shows/hides Hebrew cantillation marks in UTF8 text. -

- -

-Definition at line 29 of file utf8cantillation.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:05 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_u_t_f8_greek_accents-members.html b/doc/api-documentation/html/class_u_t_f8_greek_accents-members.html deleted file mode 100644 index 35a3361..0000000 --- a/doc/api-documentation/html/class_u_t_f8_greek_accents-members.html +++ /dev/null @@ -1,31 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

UTF8GreekAccents Member List

This is the complete list of members for UTF8GreekAccents, including all inherited members. - - - - - - - - - - - - - - - - -
getOptionName() (defined in UTF8GreekAccents)UTF8GreekAccents [inline, virtual]
getOptionTip() (defined in UTF8GreekAccents)UTF8GreekAccents [inline, virtual]
getOptionValue() (defined in UTF8GreekAccents)UTF8GreekAccents [virtual]
getOptionValues() (defined in UTF8GreekAccents)UTF8GreekAccents [inline, virtual]
off (defined in UTF8GreekAccents)UTF8GreekAccents [private, static]
on (defined in UTF8GreekAccents)UTF8GreekAccents [private, static]
option (defined in UTF8GreekAccents)UTF8GreekAccents [private]
options (defined in UTF8GreekAccents)UTF8GreekAccents [private]
optName (defined in UTF8GreekAccents)UTF8GreekAccents [private, static]
optTip (defined in UTF8GreekAccents)UTF8GreekAccents [private, static]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in UTF8GreekAccents)UTF8GreekAccents [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *ival) (defined in UTF8GreekAccents)UTF8GreekAccents [virtual]
UTF8GreekAccents() (defined in UTF8GreekAccents)UTF8GreekAccents
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]
~UTF8GreekAccents() (defined in UTF8GreekAccents)UTF8GreekAccents [virtual]

Generated on Thu Jun 20 22:13:05 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_u_t_f8_greek_accents.html b/doc/api-documentation/html/class_u_t_f8_greek_accents.html deleted file mode 100644 index 77d8147..0000000 --- a/doc/api-documentation/html/class_u_t_f8_greek_accents.html +++ /dev/null @@ -1,59 +0,0 @@ - - -UTF8GreekAccents class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

UTF8GreekAccents Class Reference

This Filter shows/hides Greek Accents marks in UTF8 text. -More... -

-#include <utf8greekaccents.h> -

-List of all members. - - - - - - - - - - - - - - - - - -

Public Methods

UTF8GreekAccents ()
-virtual ~UTF8GreekAccents ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-virtual const char * getOptionName ()
-virtual const char * getOptionTip ()
-virtual void setOptionValue (const char *ival)
-virtual const char * getOptionValue ()
-virtual OptionsList getOptionValues ()

Private Attributes

-bool option
-OptionsList options

Static Private Attributes

-const char on [] = "On"
-const char off [] = "Off"
-const char optName [] = "Greek Accents"
-const char optTip [] = "Toggles Greek Accents"
-


Detailed Description

-This Filter shows/hides Greek Accents marks in UTF8 text. -

- -

-Definition at line 29 of file utf8greekaccents.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:05 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_u_t_f8_h_t_m_l-members.html b/doc/api-documentation/html/class_u_t_f8_h_t_m_l-members.html deleted file mode 100644 index 8ffea2a..0000000 --- a/doc/api-documentation/html/class_u_t_f8_h_t_m_l-members.html +++ /dev/null @@ -1,24 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

UTF8HTML Member List

This is the complete list of members for UTF8HTML, including all inherited members. - - - - - - - - - -
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in UTF8HTML)UTF8HTML [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
UTF8HTML() (defined in UTF8HTML)UTF8HTML
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:05 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_u_t_f8_h_t_m_l.html b/doc/api-documentation/html/class_u_t_f8_h_t_m_l.html deleted file mode 100644 index 226561c..0000000 --- a/doc/api-documentation/html/class_u_t_f8_h_t_m_l.html +++ /dev/null @@ -1,33 +0,0 @@ - - -UTF8HTML class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

UTF8HTML Class Reference

This filter converts UTF-8 text into HTML escape sequences. -More... -

-#include <utf8html.h> -

-List of all members. - - - -

Public Methods

UTF8HTML ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-


Detailed Description

-This filter converts UTF-8 text into HTML escape sequences. -

- -

-Definition at line 29 of file utf8html.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:05 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_u_t_f8_hebrew_points-members.html b/doc/api-documentation/html/class_u_t_f8_hebrew_points-members.html deleted file mode 100644 index e2fb532..0000000 --- a/doc/api-documentation/html/class_u_t_f8_hebrew_points-members.html +++ /dev/null @@ -1,31 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

UTF8HebrewPoints Member List

This is the complete list of members for UTF8HebrewPoints, including all inherited members. - - - - - - - - - - - - - - - - -
getOptionName() (defined in UTF8HebrewPoints)UTF8HebrewPoints [inline, virtual]
getOptionTip() (defined in UTF8HebrewPoints)UTF8HebrewPoints [inline, virtual]
getOptionValue() (defined in UTF8HebrewPoints)UTF8HebrewPoints [virtual]
getOptionValues() (defined in UTF8HebrewPoints)UTF8HebrewPoints [inline, virtual]
off (defined in UTF8HebrewPoints)UTF8HebrewPoints [private, static]
on (defined in UTF8HebrewPoints)UTF8HebrewPoints [private, static]
option (defined in UTF8HebrewPoints)UTF8HebrewPoints [private]
options (defined in UTF8HebrewPoints)UTF8HebrewPoints [private]
optName (defined in UTF8HebrewPoints)UTF8HebrewPoints [private, static]
optTip (defined in UTF8HebrewPoints)UTF8HebrewPoints [private, static]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in UTF8HebrewPoints)UTF8HebrewPoints [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *ival) (defined in UTF8HebrewPoints)UTF8HebrewPoints [virtual]
UTF8HebrewPoints() (defined in UTF8HebrewPoints)UTF8HebrewPoints
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]
~UTF8HebrewPoints() (defined in UTF8HebrewPoints)UTF8HebrewPoints [virtual]

Generated on Thu Jun 20 22:13:05 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_u_t_f8_hebrew_points.html b/doc/api-documentation/html/class_u_t_f8_hebrew_points.html deleted file mode 100644 index ca310ea..0000000 --- a/doc/api-documentation/html/class_u_t_f8_hebrew_points.html +++ /dev/null @@ -1,59 +0,0 @@ - - -UTF8HebrewPoints class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

UTF8HebrewPoints Class Reference

This Filter shows/hides Hebrew vowel points in UTF8 text. -More... -

-#include <utf8hebrewpoints.h> -

-List of all members. - - - - - - - - - - - - - - - - - -

Public Methods

UTF8HebrewPoints ()
-virtual ~UTF8HebrewPoints ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-virtual const char * getOptionName ()
-virtual const char * getOptionTip ()
-virtual void setOptionValue (const char *ival)
-virtual const char * getOptionValue ()
-virtual OptionsList getOptionValues ()

Private Attributes

-bool option
-OptionsList options

Static Private Attributes

-const char on [] = "On"
-const char off [] = "Off"
-const char optName [] = "Hebrew Vowel Points"
-const char optTip [] = "Toggles Hebrew Vowel Points"
-


Detailed Description

-This Filter shows/hides Hebrew vowel points in UTF8 text. -

- -

-Definition at line 29 of file utf8hebrewpoints.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:05 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_u_t_f8_latin1-members.html b/doc/api-documentation/html/class_u_t_f8_latin1-members.html deleted file mode 100644 index 7f8cf60..0000000 --- a/doc/api-documentation/html/class_u_t_f8_latin1-members.html +++ /dev/null @@ -1,25 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

UTF8Latin1 Member List

This is the complete list of members for UTF8Latin1, including all inherited members. - - - - - - - - - - -
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in UTF8Latin1)UTF8Latin1 [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
replacementChar (defined in UTF8Latin1)UTF8Latin1 [private]
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
UTF8Latin1(char rchar='?') (defined in UTF8Latin1)UTF8Latin1
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:05 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_u_t_f8_latin1.html b/doc/api-documentation/html/class_u_t_f8_latin1.html deleted file mode 100644 index 1be602c..0000000 --- a/doc/api-documentation/html/class_u_t_f8_latin1.html +++ /dev/null @@ -1,36 +0,0 @@ - - -UTF8Latin1 class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

UTF8Latin1 Class Reference

This filter converts UTF-8 encoded text to Latin-1. -More... -

-#include <utf8latin1.h> -

-List of all members. - - - - - -

Public Methods

UTF8Latin1 (char rchar='?')
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)

Private Attributes

-char replacementChar
-


Detailed Description

-This filter converts UTF-8 encoded text to Latin-1. -

- -

-Definition at line 29 of file utf8latin1.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:05 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_u_t_f8_u_t_f16-members.html b/doc/api-documentation/html/class_u_t_f8_u_t_f16-members.html deleted file mode 100644 index 44aa5a7..0000000 --- a/doc/api-documentation/html/class_u_t_f8_u_t_f16-members.html +++ /dev/null @@ -1,24 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

UTF8UTF16 Member List

This is the complete list of members for UTF8UTF16, including all inherited members. - - - - - - - - - -
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in UTF8UTF16)UTF8UTF16 [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
UTF8UTF16() (defined in UTF8UTF16)UTF8UTF16
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:05 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_u_t_f8_u_t_f16.html b/doc/api-documentation/html/class_u_t_f8_u_t_f16.html deleted file mode 100644 index 6644d8e..0000000 --- a/doc/api-documentation/html/class_u_t_f8_u_t_f16.html +++ /dev/null @@ -1,33 +0,0 @@ - - -UTF8UTF16 class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

UTF8UTF16 Class Reference

This filter converts UTF-8 encoded text to UTF-16. -More... -

-#include <utf8utf16.h> -

-List of all members. - - - -

Public Methods

UTF8UTF16 ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-


Detailed Description

-This filter converts UTF-8 encoded text to UTF-16. -

- -

-Definition at line 29 of file utf8utf16.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:05 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_unicode_r_t_f-members.html b/doc/api-documentation/html/class_unicode_r_t_f-members.html deleted file mode 100644 index 2ccd09d..0000000 --- a/doc/api-documentation/html/class_unicode_r_t_f-members.html +++ /dev/null @@ -1,24 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

UnicodeRTF Member List

This is the complete list of members for UnicodeRTF, including all inherited members. - - - - - - - - - -
getOptionName() (defined in SWFilter)SWFilter [inline, virtual]
getOptionTip() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValue() (defined in SWFilter)SWFilter [inline, virtual]
getOptionValues() (defined in SWFilter)SWFilter [inline, virtual]
ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *=0) (defined in UnicodeRTF)UnicodeRTF [virtual]
ProcessText(char *text, int maxlen=-1) (defined in SWFilter)SWFilter [inline, virtual]
setOptionValue(const char *) (defined in SWFilter)SWFilter [inline, virtual]
UnicodeRTF() (defined in UnicodeRTF)UnicodeRTF
~SWFilter() (defined in SWFilter)SWFilter [inline, virtual]

Generated on Thu Jun 20 22:13:05 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_unicode_r_t_f.html b/doc/api-documentation/html/class_unicode_r_t_f.html deleted file mode 100644 index 6c06e0f..0000000 --- a/doc/api-documentation/html/class_unicode_r_t_f.html +++ /dev/null @@ -1,33 +0,0 @@ - - -UnicodeRTF class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

UnicodeRTF Class Reference

This filter converts UTF-8 text into RTF Unicode tags. -More... -

-#include <unicodertf.h> -

-List of all members. - - - -

Public Methods

UnicodeRTF ()
-virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule *=0)
-


Detailed Description

-This filter converts UTF-8 text into RTF Unicode tags. -

- -

-Definition at line 30 of file unicodertf.h.


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:05 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_verse_key-members.html b/doc/api-documentation/html/class_verse_key-members.html deleted file mode 100644 index aba6831..0000000 --- a/doc/api-documentation/html/class_verse_key-members.html +++ /dev/null @@ -1,109 +0,0 @@ - - -Member List - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

VerseKey Member List

This is the complete list of members for VerseKey, including all inherited members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
_compare(const VerseKey &ikey)VerseKey [virtual]
abbrevs (defined in VerseKey)VerseKey [private]
abbrevsCnt (defined in VerseKey)VerseKey [private]
autonormVerseKey [private]
AutoNormalize(char iautonorm=MAXPOS(char))VerseKey [virtual]
BMAX (defined in VerseKey)VerseKey
book (defined in VerseKey)VerseKey [private]
Book() constVerseKey [virtual]
Book(char ibook)VerseKey [virtual]
books (defined in VerseKey)VerseKey
builtin_abbrevs (defined in VerseKey)VerseKey [static]
builtin_BMAX (defined in VerseKey)VerseKey [static]
builtin_books (defined in VerseKey)VerseKey [static]
chapter (defined in VerseKey)VerseKey [private]
Chapter() constVerseKey [virtual]
Chapter(int ichapter)VerseKey [virtual]
classdef (defined in VerseKey)VerseKey [private, static]
ClearBounds()VerseKey
clone() constVerseKey [virtual]
compare(const SWKey &ikey)VerseKey [virtual]
copyFrom(const SWKey &ikey)VerseKey [virtual]
copyFrom(const VerseKey &ikey)VerseKey [virtual]
decrement(int step)VerseKey [virtual]
equals(const SWKey &ikey)SWKey [inline, virtual]
error (defined in SWKey)SWKey [protected]
Error()SWKey [virtual]
findindex(long *array, int size, long value)VerseKey [private]
freshtext() constVerseKey [private]
getBookAbbrev(const char *abbr) (defined in VerseKey)VerseKey [private]
getBookAbbrev() const (defined in VerseKey)VerseKey [virtual]
getBookName() const (defined in VerseKey)VerseKey [virtual]
getClass() constSWObject [inline]
getLocale() const (defined in VerseKey)VerseKey [inline, virtual]
getOSISRef() const (defined in VerseKey)VerseKey [virtual]
getShortText() const (defined in VerseKey)VerseKey [virtual]
getText() constVerseKey [virtual]
headingsVerseKey [private]
Headings(char iheadings=MAXPOS(char))VerseKey [virtual]
increment(int step)VerseKey [virtual]
Index() constVerseKey [virtual]
Index(long iindex)VerseKey [virtual]
init()VerseKey [private]
initBounds() const (defined in VerseKey)VerseKey [private]
initstatics()VerseKey [private]
instanceVerseKey [private, static]
internalListKey (defined in VerseKey)VerseKey [private]
keytext (defined in SWKey)SWKey [protected]
locale (defined in VerseKey)VerseKey [private]
localeCache (defined in VerseKey)VerseKey [private, static]
lowerBound (defined in VerseKey)VerseKey [private]
LowerBound(const char *lb)VerseKey
LowerBound() constVerseKey
myclass (defined in SWObject)SWObject [protected]
NewIndex() const (defined in VerseKey)VerseKey [virtual]
Normalize(char autocheck=0)VerseKey [virtual]
ntbks (defined in VerseKey)VerseKey [private, static]
ntbooks (defined in VerseKey)VerseKey [private, static]
ntcps (defined in VerseKey)VerseKey [private, static]
offsets (defined in VerseKey)VerseKey [private, static]
offsize (defined in VerseKey)VerseKey [private, static]
operator=(const VerseKey &ikey) (defined in VerseKey)VerseKey [inline, virtual]
otbks (defined in VerseKey)VerseKey [private, static]
otbooks (defined in VerseKey)VerseKey [private, static]
otcps (defined in VerseKey)VerseKey [private, static]
parse()VerseKey [private, virtual]
ParseVerseList(const char *buf, const char *defaultKey="Genesis 1:1", bool expandRange=false) (defined in VerseKey)VerseKey [virtual]
persist (defined in SWKey)SWKey [protected]
Persist() constSWKey
Persist(signed char ikey)SWKey
setBookAbbrevs(const struct abbrev *bookAbbrevs, unsigned int size=0) (defined in VerseKey)VerseKey [virtual]
setBooks(const char *iBMAX, struct sbook **ibooks) (defined in VerseKey)VerseKey [virtual]
setLocale(const char *name) (defined in VerseKey)VerseKey [virtual]
setPosition(SW_POSITION)VerseKey [virtual]
setText(const char *ikey)VerseKey [inline, virtual]
SWKey(const char *ikey=0)SWKey
SWKey(SWKey const &k)SWKey
testamentVerseKey [private]
Testament() constVerseKey [virtual]
Testament(char itestament)VerseKey [virtual]
Traversable() (defined in VerseKey)VerseKey [inline, virtual]
upperBound (defined in VerseKey)VerseKey [private]
UpperBound(const char *ub)VerseKey
UpperBound() constVerseKey
userData (defined in SWKey)SWKey
verse (defined in VerseKey)VerseKey [private]
Verse() constVerseKey [virtual]
Verse(int iverse)VerseKey [virtual]
VerseKey(const char *ikey=0)VerseKey
VerseKey(const SWKey *ikey)VerseKey
VerseKey(const char *min, const char *max)VerseKey
VerseKey(const VerseKey &k)VerseKey
vm (defined in VerseKey)VerseKey [private, static]
~SWKey()SWKey [virtual]
~VerseKey()VerseKey [virtual]

Generated on Thu Jun 20 22:13:05 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_verse_key.html b/doc/api-documentation/html/class_verse_key.html deleted file mode 100644 index 3daed2c..0000000 --- a/doc/api-documentation/html/class_verse_key.html +++ /dev/null @@ -1,1909 +0,0 @@ - - -VerseKey class Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

VerseKey Class Reference

Class VerseKey The SWKey implementation used for verse based modules like Bibles or commentaries. -More... -

-#include <versekey.h> -

-Inheritance diagram for VerseKey:

Inheritance graph
- - - - -
[legend]
Collaboration diagram for VerseKey:

Collaboration graph
- - - - - - -
[legend]
List of all members. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Public Methods

 VerseKey (const char *ikey=0)
 VerseKey Constructor - initializes Instance of VerseKey. More...

 VerseKey (const SWKey *ikey)
 VerseKey Constructor - initializes instance of VerseKey. More...

 VerseKey (const char *min, const char *max)
 VerseKey Constructor - initializes instance of VerseKey with boundariess - see also LowerBound and UpperBound. More...

 VerseKey (const VerseKey &k)
 VerseKey Copy Constructor - will create a new VerseKey based on an existing one. More...

-virtual ~VerseKey ()
 VerseKey Destructor Cleans up an instance of VerseKey.

VerseKey & LowerBound (const char *lb)
 sets the lower boundary for this VerseKey and returns the new boundary. More...

VerseKey & UpperBound (const char *ub)
 sets the upper boundary for this VerseKey and returns the new boundary. More...

VerseKey & LowerBound () const
 gets the lower boundary of this VerseKey. More...

VerseKey & UpperBound () const
 gets the upper boundary of this VerseKey. More...

-void ClearBounds ()
 clears the boundaries of this VerseKey.

-virtual SWKeyclone () const
 Creates a new SWKey based on the current VerseKey see also the Copy Constructor.

-virtual const char * getText () const
 refreshes keytext before returning if cast to a (char *) is requested.

-virtual const char * getShortText () const
virtual void setText (const char *ikey)
 Equates this SWKey to a character string. More...

virtual void copyFrom (const SWKey &ikey)
 Equates this SWKey to another SWKey object. More...

-virtual void copyFrom (const VerseKey &ikey)
 Equates this VerseKey to another VerseKey.

virtual void setPosition (SW_POSITION)
 Positions this key. More...

virtual void decrement (int step)
 Decrements key a number of verses. More...

virtual void increment (int step)
 Increments key a number of verses. More...

-virtual char Traversable ()
-virtual const char * getBookName () const
-virtual const char * getBookAbbrev () const
virtual char Testament () const
 Gets testament. More...

virtual char Book () const
 Gets book. More...

virtual int Chapter () const
 Gets chapter. More...

virtual int Verse () const
 Gets verse. More...

virtual char Testament (char itestament)
 Sets/gets testament. More...

virtual char Book (char ibook)
 Sets/gets book. More...

virtual int Chapter (int ichapter)
 Sets/gets chapter. More...

virtual int Verse (int iverse)
 Sets/gets verse. More...

virtual void Normalize (char autocheck=0)
 checks limits and normalizes if necessary (e.g. More...

virtual char AutoNormalize (char iautonorm=MAXPOS(char))
 Sets/gets flag that tells VerseKey to automatically normalize itself when modified. More...

virtual char Headings (char iheadings=MAXPOS(char))
 Sets/gets flag that tells VerseKey to include chapter/book/testament/module headings. More...

-virtual long NewIndex () const
virtual long Index () const
 Gets index based upon current verse. More...

virtual long Index (long iindex)
 Sets index based upon current verse. More...

-virtual const char * getOSISRef () const
-virtual ListKey ParseVerseList (const char *buf, const char *defaultKey="Genesis 1:1", bool expandRange=false)
virtual int compare (const SWKey &ikey)
 Compares another SWKey object. More...

virtual int _compare (const VerseKey &ikey)
 Compares another VerseKey object. More...

-virtual void setBookAbbrevs (const struct abbrev *bookAbbrevs, unsigned int size=0)
-virtual void setBooks (const char *iBMAX, struct sbook **ibooks)
-virtual void setLocale (const char *name)
-virtual const char * getLocale () const
-virtual SWKEY_OPERATORS SWKeyoperator= (const VerseKey &ikey)

Public Attributes

-const char * BMAX
-sbook ** books

Static Public Attributes

-const char builtin_BMAX [2] = {39, 27}
-sbook * builtin_books [2] = {0,0}
-const struct abbrev builtin_abbrevs []

Private Methods

-int getBookAbbrev (const char *abbr)
-void initBounds () const
-void initstatics ()
 initialize and allocate books array.

-void init ()
 initializes this VerseKey().

-void freshtext () const
 Refresh keytext based on testament|book|chapter|verse default auto normalization to true default display headings option is false.

-virtual char parse ()
 Parse a character array into testament|book|chapter|verse.

int findindex (long *array, int size, long value)
 Binary search to find the index closest, but less than the given value. More...


Private Attributes

-ListKey internalListKey
-const struct abbrev * abbrevs
-char * locale
-int abbrevsCnt
-signed char testament
 The Testament: 0 - Old; 1 - New.

-signed char book
-signed int chapter
-signed int verse
-char autonorm
 flag for auto normalization.

-char headings
 flag for headings on/off.

-VerseKey * lowerBound
-VerseKey * upperBound

Static Private Attributes

-SWClass classdef
-long * offsets [2][2] = {{VerseKey::otbks, VerseKey::otcps}, {VerseKey::ntbks, VerseKey::ntcps}}
-int offsize [2][2]
-int instance = 0
 number of instantiated VerseKey objects or derivitives.

-sbook otbooks []
-sbook ntbooks []
-long otbks []
-long otcps []
-long ntbks []
-long ntcps []
-int vm []
-LocaleCache localeCache
-

Detailed Description

-Class VerseKey The SWKey implementation used for verse based modules like Bibles or commentaries. -

- -

-Definition at line 72 of file versekey.h.


Constructor & Destructor Documentation

-

- - - - -
- - - - - - - - - - -
VerseKey::VerseKey const char *   ikey = 0
-
- - - - - -
-   - - -

-VerseKey Constructor - initializes Instance of VerseKey. -

-

-Parameters:
- - -
ikey  -text key (will take various forms of 'BOOK CH:VS'. See parse for more detailed information)
-
-

-Definition at line 89 of file versekey.cpp. -

-References init(), and parse(). -

-Referenced by clone(). -

-

00089                                    : SWKey(ikey)
-00090 {
-00091         init();
-00092         if (ikey)
-00093                 parse();
-00094 }
-
-

- - - - -
- - - - - - - - - - -
VerseKey::VerseKey const SWKey  ikey
-
- - - - - -
-   - - -

-VerseKey Constructor - initializes instance of VerseKey. -

-

-Parameters:
- - -
ikey  -base key (will take various forms of 'BOOK CH:VS'. See parse for more detailed information)
-
-

-Definition at line 74 of file versekey.cpp. -

-References init(), and parse(). -

-

00074                                     : SWKey(*ikey)
-00075 {
-00076         init();
-00077         if (ikey)
-00078                 parse();
-00079 }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - -
VerseKey::VerseKey const char *   min,
const char *   max
-
- - - - - -
-   - - -

-VerseKey Constructor - initializes instance of VerseKey with boundariess - see also LowerBound and UpperBound. -

-

-Parameters:
- - - -
min  -the lower boundary of the new VerseKey
max  -the upper boundary of the new VerseKey
-
-

-Definition at line 111 of file versekey.cpp. -

-References init(), LowerBound(), setPosition(), and UpperBound(). -

-

00111                                                    : SWKey()
-00112 {
-00113         init();
-00114         LowerBound(min);
-00115         UpperBound(max);
-00116         setPosition(TOP);
-00117 }
-
-

- - - - -
- - - - - - - - - - -
VerseKey::VerseKey const VerseKey &   k
-
- - - - - -
-   - - -

-VerseKey Copy Constructor - will create a new VerseKey based on an existing one. -

-

-Parameters:
- - -
k  -the VerseKey to copy from
-
-


Member Function Documentation

-

- - - - -
- - - - - - - - - - -
int VerseKey::_compare const VerseKey &   ikey [virtual]
-
- - - - - -
-   - - -

-Compares another VerseKey object. -

-

-Parameters:
- - -
ikey  -key to compare with this one
-
-Returns:
->0 if this VerseKey is greater than compare VerseKey, <0 if this VerseKey is smaller than compare VerseKey, 0 if the keys are the same
-

-Definition at line 1402 of file versekey.cpp. -

-References Book(), Chapter(), Testament(), and Verse(). -

-Referenced by compare(), Index(), and Normalize(). -

-

01403 {
-01404         long keyval1 = 0;
-01405         long keyval2 = 0;
-01406 
-01407         keyval1 += Testament() * 1000000000;
-01408         keyval2 += ivkey.Testament() * 1000000000;
-01409         keyval1 += Book() * 1000000;
-01410         keyval2 += ivkey.Book() * 1000000;
-01411         keyval1 += Chapter() * 1000;
-01412         keyval2 += ivkey.Chapter() * 1000;
-01413         keyval1 += Verse();
-01414         keyval2 += ivkey.Verse();
-01415         keyval1 -= keyval2;
-01416         keyval1 = (keyval1) ? ((keyval1 > 0) ? 1 : -1) /*keyval1/labs(keyval1)*/:0; // -1 | 0 | 1
-01417         return keyval1;
-01418 }
-
-

- - - - -
- - - - - - - - - - -
char VerseKey::AutoNormalize char   iautonorm = MAXPOS(char) [virtual]
-
- - - - - -
-   - - -

-Sets/gets flag that tells VerseKey to automatically normalize itself when modified. -

-

-Parameters:
- - -
iautonorm  -value which to set autonorm [MAXPOS(char)] - only get
-
-Returns:
-if unchanged -> value of autonorm, if changed -> previous value of autonorm
-

-Definition at line 1203 of file versekey.cpp. -

-References autonorm, and Normalize(). -

-

01204 {
-01205         char retval = autonorm;
-01206 
-01207         if (iautonorm != MAXPOS(char)) {
-01208                 autonorm = iautonorm;
-01209                 Normalize(1);
-01210         }
-01211         return retval;
-01212 }
-
-

- - - - -
- - - - - - - - - - -
char VerseKey::Book char   ibook [virtual]
-
- - - - - -
-   - - -

-Sets/gets book. -

-

-Parameters:
- - -
ibook  -value which to set book [MAXPOS(char)] - only get
-
-Returns:
-if unchanged -> value of book, if changed -> previous value of book
-

-Definition at line 1137 of file versekey.cpp. -

-References Chapter(), and Normalize(). -

-

01138 {
-01139         char retval = book;
-01140 
-01141         Chapter(1);
-01142         book = ibook;
-01143         Normalize(1);
-01144 
-01145         return retval;
-01146 }
-
-

- - - - -
- - - - - - - - - -
char VerseKey::Book   const [virtual]
-
- - - - - -
-   - - -

-Gets book. -

-

-Returns:
-value of book
-

-Definition at line 1075 of file versekey.cpp. -

-Referenced by _compare(), and setPosition(). -

-

01076 {
-01077         return book;
-01078 }
-
-

- - - - -
- - - - - - - - - - -
int VerseKey::Chapter int   ichapter [virtual]
-
- - - - - -
-   - - -

-Sets/gets chapter. -

-

-Parameters:
- - -
ichapter  -value which to set chapter [MAXPOS(int)] - only get
-
-Returns:
-if unchanged -> value of chapter, if changed -> previous value of chapter
-

-Definition at line 1159 of file versekey.cpp. -

-References Normalize(), and Verse(). -

-

01160 {
-01161         int retval = chapter;
-01162 
-01163         Verse(1);
-01164         chapter = ichapter;
-01165         Normalize(1);
-01166 
-01167         return retval;
-01168 }
-
-

- - - - -
- - - - - - - - - -
int VerseKey::Chapter   const [virtual]
-
- - - - - -
-   - - -

-Gets chapter. -

-

-Returns:
-value of chapter
-

-Definition at line 1087 of file versekey.cpp. -

-Referenced by _compare(), Book(), and setPosition(). -

-

01088 {
-01089         return chapter;
-01090 }
-
-

- - - - -
- - - - - - - - - - -
int VerseKey::compare const SWKey  ikey [virtual]
-
- - - - - -
-   - - -

-Compares another SWKey object. -

-

-Parameters:
- - -
ikey  -key to compare with this one
-
-Returns:
->0 if this VerseKey is greater than compare SWKey, <0 if this VerseKey is smaller than compare SWKey, 0 if the keys are the same
-

-Reimplemented from SWKey. -

-Definition at line 1385 of file versekey.cpp. -

-References _compare(). -

-

01386 {
-01387         VerseKey ivkey = (const char *)ikey;
-01388         return _compare(ivkey);
-01389 }
-
-

- - - - -
- - - - - - - - - - -
void VerseKey::copyFrom const SWKey  ikey [virtual]
-
- - - - - -
-   - - -

-Equates this SWKey to another SWKey object. -

-

-Parameters:
- - -
ikey  -other swkey object
-
-

-Reimplemented from SWKey. -

-Definition at line 833 of file versekey.cpp. -

-References SWKey::copyFrom(), and parse(). -

-

00833                                          {
-00834         SWKey::copyFrom(ikey);
-00835 
-00836         parse();
-00837 }
-
-

- - - - -
- - - - - - - - - - -
void VerseKey::decrement int   step [virtual]
-
- - - - - -
-   - - -

-Decrements key a number of verses. -

-

-Parameters:
- - -
decrement  -Number of verses to jump backward
-
-Returns:
-*this
-

-Reimplemented from SWKey. -

-Definition at line 941 of file versekey.cpp. -

-References SWKey::Error(), headings, and Index(). -

-

00941                                  {
-00942         char ierror = 0;
-00943 
-00944         Index(Index() - step);
-00945         while ((!verse) && (!headings) && (!ierror)) {
-00946                 Index(Index() - 1);
-00947                 ierror = Error();
-00948         }
-00949         if ((ierror) && (!headings))
-00950                 (*this)++;
-00951 
-00952         error = (ierror) ? ierror : error;
-00953 }
-
-

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
int VerseKey::findindex long *   array,
int   size,
long   value
[private]
-
- - - - - -
-   - - -

-Binary search to find the index closest, but less than the given value. -

-

-Parameters:
- - - - -
array  -long * to array to search
size  -number of elements in the array
value  -value to find
-
-Returns:
-the index into the array that is less than but closest to value
-

-Definition at line 1249 of file versekey.cpp. -

-Referenced by Index(). -

-

01250 {
-01251         int lbound, ubound, tval;
-01252 
-01253         lbound = 0;
-01254         ubound = size - 1;
-01255         while ((ubound - lbound) > 1) {
-01256                 tval = lbound + (ubound-lbound)/2;
-01257                 if (array[tval] <= value)
-01258                         lbound = tval;
-01259                 else ubound = tval;
-01260         }
-01261         return (array[ubound] <= value) ? ubound : lbound;
-01262 }
-
-

- - - - -
- - - - - - - - - - -
char VerseKey::Headings char   iheadings = MAXPOS(char) [virtual]
-
- - - - - -
-   - - -

-Sets/gets flag that tells VerseKey to include chapter/book/testament/module headings. -

-

-Parameters:
- - -
iheadings  -value which to set headings [MAXPOS(char)] - only get
-
-Returns:
-if unchanged -> value of headings, if changed -> previous value of headings
-

-Definition at line 1226 of file versekey.cpp. -

-References headings, and Normalize(). -

-

01227 {
-01228         char retval = headings;
-01229 
-01230         if (iheadings != MAXPOS(char)) {
-01231                 headings = iheadings;
-01232                 Normalize(1);
-01233         }
-01234         return retval;
-01235 }
-
-

- - - - -
- - - - - - - - - - -
void VerseKey::increment int   step [virtual]
-
- - - - - -
-   - - -

-Increments key a number of verses. -

-

-Parameters:
- - -
increment  -Number of verses to jump forward
-
-Returns:
-*this
-

-Reimplemented from SWKey. -

-Definition at line 921 of file versekey.cpp. -

-References SWKey::Error(), headings, and Index(). -

-

00921                                  {
-00922         char ierror = 0;
-00923         Index(Index() + step);
-00924         while ((!verse) && (!headings) && (!ierror)) {
-00925                 Index(Index() + 1);
-00926                 ierror = Error();
-00927         }
-00928 
-00929         error = (ierror) ? ierror : error;
-00930 }
-
-

- - - - -
- - - - - - - - - - -
long VerseKey::Index long   iindex [virtual]
-
- - - - - -
-   - - -

-Sets index based upon current verse. -

-

-Parameters:
- - -
iindex  -value to set index to
-
-Returns:
-offset
-

-Reimplemented from SWKey. -

-Definition at line 1316 of file versekey.cpp. -

-References _compare(), findindex(), Index(), LowerBound(), testament, and UpperBound(). -

-

01317 {
-01318         long  offset;
-01319 
-01320 // This is the dirty stuff --------------------------------------------
-01321 
-01322         if (!testament)
-01323                 testament = 1;
-01324 
-01325         if (iindex < 1) {                               // if (-) or module heading
-01326                 if (testament < 2) {
-01327                         if (iindex < 0) {
-01328                                 testament = 0;  // previously we changed 0 -> 1
-01329                                 error     = KEYERR_OUTOFBOUNDS;
-01330                         }
-01331                         else testament = 0;             // we want module heading
-01332                 }
-01333                 else {
-01334                         testament--;
-01335                         iindex = (offsets[testament-1][1][offsize[testament-1][1]-1] + books[testament-1][BMAX[testament-1]-1].versemax[books[testament-1][BMAX[testament-1]-1].chapmax-1]) + iindex; // What a doozy! ((offset of last chapter + number of verses in the last chapter) + iindex)
-01336                 }
-01337         }
-01338 
-01339 // --------------------------------------------------------------------
-01340 
-01341 
-01342         if (testament) {
-01343                 if ((!error) && (iindex)) {
-01344                         offset  = findindex(offsets[testament-1][1], offsize[testament-1][1], iindex);
-01345                         verse   = iindex - offsets[testament-1][1][offset];
-01346                         book    = findindex(offsets[testament-1][0], offsize[testament-1][0], offset);
-01347                         chapter = offset - offsets[testament-1][0][VerseKey::book];
-01348                         verse   = (chapter) ? verse : 0;  // funny check. if we are index=1 (testmt header) all gets set to 0 exept verse.  Don't know why.  Fix if you figure out.  Think its in the offsets table.
-01349                         if (verse) {            // only check if -1 won't give negative
-01350                                 if (verse > books[testament-1][book-1].versemax[chapter-1]) {
-01351                                         if (testament > 1) {
-01352                                                 verse = books[testament-1][book-1].versemax[chapter-1];
-01353                                                 error = KEYERR_OUTOFBOUNDS;
-01354                                         }
-01355                                         else {
-01356                                                 testament++;
-01357                                                 Index(verse - books[testament-2][book-1].versemax[chapter-1]);
-01358                                         }
-01359                                 }
-01360                         }
-01361                 }
-01362         }
-01363         if (_compare(UpperBound()) > 0) {
-01364                 *this = UpperBound();
-01365                 error = KEYERR_OUTOFBOUNDS;
-01366         }
-01367         if (_compare(LowerBound()) < 0) {
-01368                 *this = LowerBound();
-01369                 error = KEYERR_OUTOFBOUNDS;
-01370         }
-01371         return Index();
-01372 }
-
-

- - - - -
- - - - - - - - - -
long VerseKey::Index   const [virtual]
-
- - - - - -
-   - - -

-Gets index based upon current verse. -

-

-Returns:
-offset
-

-Reimplemented from SWKey. -

-Definition at line 1271 of file versekey.cpp. -

-References testament. -

-Referenced by decrement(), increment(), and Index(). -

-

01272 {
-01273         long  offset;
-01274 
-01275         if (!testament) { // if we want module heading
-01276                 offset = 0;
-01277                 verse  = 0;
-01278         }
-01279         else {
-01280                 if (!book)
-01281                         chapter = 0;
-01282                 if (!chapter)
-01283                         verse   = 0;
-01284 
-01285                 offset = offsets[testament-1][0][book];
-01286                 offset = offsets[testament-1][1][(int)offset + chapter];
-01287                 if (!(offset|verse)) // if we have a testament but nothing else.
-01288                         offset = 1;
-01289         }
-01290         return (offset + verse);
-01291 }
-
-

- - - - -
- - - - - - - - - -
VerseKey & VerseKey::LowerBound   const
-
- - - - - -
-   - - -

-gets the lower boundary of this VerseKey. -

-

-Returns:
-the lower boundary of this VerseKey
-

-Definition at line 761 of file versekey.cpp. -

-Referenced by Index(), Normalize(), setPosition(), and VerseKey(). -

-

00762 {
-00763         if (!lowerBound) 
-00764                 initBounds();
-00765 
-00766         return (*lowerBound);
-00767 }
-
-

- - - - -
- - - - - - - - - - -
VerseKey & VerseKey::LowerBound const char *   lb
-
- - - - - -
-   - - -

-sets the lower boundary for this VerseKey and returns the new boundary. -

-

-Parameters:
- - -
lb  -the new lower boundary for this VerseKey
-
-Returns:
-the lower boundary the key was set to
-

-Definition at line 705 of file versekey.cpp. -

-References Normalize(). -

-

00706 {
-00707         if (!lowerBound) 
-00708                 initBounds();
-00709 
-00710         (*lowerBound) = lb;
-00711         lowerBound->Normalize();
-00712 
-00713         return (*lowerBound);
-00714 }
-
-

- - - - -
- - - - - - - - - - -
void VerseKey::Normalize char   autocheck = 0 [virtual]
-
- - - - - -
-   - - -

-checks limits and normalizes if necessary (e.g. -

-Matthew 29:47 = Mark 2:2). If last verse is exceeded, key is set to last Book CH:VS -

-

-Returns:
-*this
-

-Definition at line 963 of file versekey.cpp. -

-References _compare(), autonorm, headings, LowerBound(), testament, and UpperBound(). -

-Referenced by AutoNormalize(), Book(), Chapter(), Headings(), LowerBound(), parse(), setPosition(), Testament(), UpperBound(), and Verse(). -

-

00964 {
-00965         error = 0;
-00966 
-00967         if ((autocheck) && (!autonorm)) // only normalize if we were explicitely called or if autonorm is turned on
-00968                 return;
-00969 
-00970         if ((headings) && (!verse))             // this is cheeze and temporary until deciding what actions should be taken.
-00971                 return;                                 // so headings should only be turned on when positioning with Index() or incrementors
-00972 
-00973         while ((testament < 3) && (testament > 0)) {
-00974 
-00975                 if (book > BMAX[testament-1]) {
-00976                         book -= BMAX[testament-1];
-00977                         testament++;
-00978                         continue;
-00979                 }
-00980 
-00981                 if (book < 1) {
-00982                         if (--testament > 0) {
-00983                                 book += BMAX[testament-1];
-00984                         }
-00985                         continue;
-00986                 }
-00987 
-00988                 if (chapter > books[testament-1][book-1].chapmax) {
-00989                         chapter -= books[testament-1][book-1].chapmax;
-00990                         book++;
-00991                         continue;
-00992                 }
-00993 
-00994                 if (chapter < 1) {
-00995                         if (--book > 0) {
-00996                                 chapter += books[testament-1][book-1].chapmax;
-00997                         }
-00998                         else    {
-00999                                 if (testament > 1) {
-01000                                         chapter += books[0][BMAX[0]-1].chapmax;
-01001                                 }
-01002                         }
-01003                         continue;
-01004                 }
-01005 
-01006                 if (verse > books[testament-1][book-1].versemax[chapter-1]) { // -1 because e.g chapter 1 of Matthew is books[1][0].versemax[0]
-01007                         verse -= books[testament-1][book-1].versemax[chapter++ - 1];
-01008                         continue;
-01009                 }
-01010 
-01011                 if (verse < 1) {
-01012                         if (--chapter > 0) {
-01013                                 verse += books[testament-1][book-1].versemax[chapter-1];
-01014                         }
-01015                         else    {
-01016                                 if (book > 1) {
-01017                                         verse += books[testament-1][book-2].versemax[books[testament-1][book-2].chapmax-1];
-01018                                 }
-01019                                 else    {
-01020                                         if (testament > 1) {
-01021                                                 verse += books[0][BMAX[0]-1].versemax[books[0][BMAX[0]-1].chapmax-1];
-01022                                         }
-01023                                 }
-01024                         }
-01025                         continue;
-01026                 }
-01027 
-01028                 break;  // If we've made it this far (all failure checks continue) we're ok
-01029         }
-01030 
-01031         if (testament > 2) {
-01032                 testament = 2;
-01033                 book      = BMAX[testament-1];
-01034                 chapter   = books[testament-1][book-1].chapmax;
-01035                 verse     = books[testament-1][book-1].versemax[chapter-1];
-01036                 error     = KEYERR_OUTOFBOUNDS;
-01037         }
-01038 
-01039         if (testament < 1) {
-01040                 error     = ((!headings) || (testament < 0) || (book < 0)) ? KEYERR_OUTOFBOUNDS : 0;
-01041                 testament = ((headings) ? 0 : 1);
-01042                 book      = ((headings) ? 0 : 1);
-01043                 chapter   = ((headings) ? 0 : 1);
-01044                 verse     = ((headings) ? 0 : 1);
-01045         }
-01046         if (_compare(UpperBound()) > 0) {
-01047                 *this = UpperBound();
-01048                 error = KEYERR_OUTOFBOUNDS;
-01049         }
-01050         if (_compare(LowerBound()) < 0) {
-01051                 *this = LowerBound();
-01052                 error = KEYERR_OUTOFBOUNDS;
-01053         }
-01054 }
-
-

- - - - -
- - - - - - - - - - -
void VerseKey::setPosition SW_POSITION   [virtual]
-
- - - - - -
-   - - -

-Positions this key. -

-

-Parameters:
- - -
p  -position
-
-Returns:
-*this
-

-Reimplemented from SWKey. -

-Definition at line 884 of file versekey.cpp. -

-References Book(), Chapter(), SWKey::Error(), LowerBound(), Normalize(), Testament(), testament, UpperBound(), and Verse(). -

-Referenced by VerseKey(). -

-

00884                                         {
-00885         switch (p) {
-00886         case POS_TOP:
-00887                 testament = LowerBound().Testament();
-00888                 book      = LowerBound().Book();
-00889                 chapter   = LowerBound().Chapter();
-00890                 verse     = LowerBound().Verse();
-00891                 break;
-00892         case POS_BOTTOM:
-00893                 testament = UpperBound().Testament();
-00894                 book      = UpperBound().Book();
-00895                 chapter   = UpperBound().Chapter();
-00896                 verse     = UpperBound().Verse();
-00897                 break;
-00898         case POS_MAXVERSE:
-00899                 Normalize();
-00900                 verse     = books[testament-1][book-1].versemax[chapter-1];
-00901                 break;
-00902         case POS_MAXCHAPTER:
-00903                 verse     = 1;
-00904                 Normalize();
-00905                 chapter   = books[testament-1][book-1].chapmax;
-00906                 break;
-00907         } 
-00908         Normalize(1);
-00909         Error();        // clear error from normalize
-00910 }
-
-

- - - - -
- - - - - - - - - - -
virtual void VerseKey::setText const char *   ikey [inline, virtual]
-
- - - - - -
-   - - -

-Equates this SWKey to a character string. -

-

-Parameters:
- - -
ikey  -string to set this key to
-
-

-Reimplemented from SWKey. -

-Definition at line 236 of file versekey.h. -

-References SWKey::setText(). -

-

00236 { SWKey::setText(ikey); parse (); }
-
-

- - - - -
- - - - - - - - - - -
char VerseKey::Testament char   itestament [virtual]
-
- - - - - -
-   - - -

-Sets/gets testament. -

-

-Parameters:
- - -
itestament  -value which to set testament [MAXPOS(char)] - only get
-
-Returns:
-if unchanged -> value of testament, if changed -> previous value of testament
-

-Definition at line 1115 of file versekey.cpp. -

-References Normalize(), and testament. -

-

01116 {
-01117         char retval = testament;
-01118 
-01119         if (itestament != MAXPOS(char)) {
-01120                 testament = itestament;
-01121                 Normalize(1);
-01122         }
-01123         return retval;
-01124 }
-
-

- - - - -
- - - - - - - - - -
char VerseKey::Testament   const [virtual]
-
- - - - - -
-   - - -

-Gets testament. -

-

-Returns:
-value of testament
-

-Definition at line 1063 of file versekey.cpp. -

-References testament. -

-Referenced by _compare(), and setPosition(). -

-

01064 {
-01065         return testament;
-01066 }
-
-

- - - - -
- - - - - - - - - -
VerseKey & VerseKey::UpperBound   const
-
- - - - - -
-   - - -

-gets the upper boundary of this VerseKey. -

-

-Returns:
-the upper boundary of this VerseKey
-

-Definition at line 774 of file versekey.cpp. -

-Referenced by Index(), Normalize(), setPosition(), and VerseKey(). -

-

00775 {
-00776         if (!upperBound) 
-00777                 initBounds();
-00778 
-00779         return (*upperBound);
-00780 }
-
-

- - - - -
- - - - - - - - - - -
VerseKey & VerseKey::UpperBound const char *   ub
-
- - - - - -
-   - - -

-sets the upper boundary for this VerseKey and returns the new boundary. -

-

-Parameters:
- - -
lb  -the new upper boundary for this VerseKey
-
-Returns:
-the upper boundary the key was set to
-

-Definition at line 721 of file versekey.cpp. -

-References Normalize(). -

-

00722 {
-00723         if (!upperBound) 
-00724                 initBounds();
-00725 
-00726 // need to set upperbound parsing to resolve to max verse/chap if not specified
-00727            (*upperBound) = ub;
-00728         if (*upperBound < *lowerBound)
-00729                 *upperBound = *lowerBound;
-00730         upperBound->Normalize();
-00731 
-00732 // until we have a proper method to resolve max verse/chap use this kludge
-00733         int len = strlen(ub);
-00734         bool alpha = false;
-00735         bool versespec = false;
-00736         bool chapspec = false;
-00737         for (int i = 0; i < len; i++) {
-00738                 if (isalpha(ub[i]))
-00739                         alpha = true;
-00740                 if (ub[i] == ':')       // if we have a : we assume verse spec
-00741                         versespec = true;
-00742                 if ((isdigit(ub[i])) && (alpha))        // if digit after alpha assume chap spec
-00743                         chapspec = true;
-00744         }
-00745         if (!chapspec)
-00746                 *upperBound = MAXCHAPTER;
-00747         if (!versespec)
-00748                 *upperBound = MAXVERSE;
-00749         
-00750 
-00751 // -- end kludge
-00752 
-00753         return (*upperBound);
-00754 }
-
-

- - - - -
- - - - - - - - - - -
int VerseKey::Verse int   iverse [virtual]
-
- - - - - -
-   - - -

-Sets/gets verse. -

-

-Parameters:
- - -
iverse  -value which to set verse [MAXPOS(int)] - only get
-
-Returns:
-if unchanged -> value of verse, if changed -> previous value of verse
-

-Definition at line 1181 of file versekey.cpp. -

-References Normalize(). -

-

01182 {
-01183         int retval = verse;
-01184 
-01185         verse = iverse;
-01186         Normalize(1);
-01187 
-01188         return retval;
-01189 }
-
-

- - - - -
- - - - - - - - - -
int VerseKey::Verse   const [virtual]
-
- - - - - -
-   - - -

-Gets verse. -

-

-Returns:
-value of verse
-

-Definition at line 1099 of file versekey.cpp. -

-Referenced by _compare(), Chapter(), and setPosition(). -

-

01100 {
-01101         return verse;
-01102 }
-
-


The documentation for this class was generated from the following files: -
Generated on Thu Jun 20 22:13:05 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/class_verse_key__coll__graph.png b/doc/api-documentation/html/class_verse_key__coll__graph.png deleted file mode 100644 index 67bab40..0000000 Binary files a/doc/api-documentation/html/class_verse_key__coll__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/class_verse_key__inherit__graph.png b/doc/api-documentation/html/class_verse_key__inherit__graph.png deleted file mode 100644 index be782c6..0000000 Binary files a/doc/api-documentation/html/class_verse_key__inherit__graph.png and /dev/null differ diff --git a/doc/api-documentation/html/classes.html b/doc/api-documentation/html/classes.html deleted file mode 100644 index 38b32af..0000000 --- a/doc/api-documentation/html/classes.html +++ /dev/null @@ -1,31 +0,0 @@ - - -Alphabetical index - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

The Sword Project Compound Index

- - - - - - - - - - - - - - - -
  E  
Latin1UTF16   StrKey   
  T  
ThMLVariants   
EncodingFilterMgr   Latin1UTF8   SWBasicFilter   ThMLFootnotes   TreeKey   
  G  
ListKey   SWClass   ThMLGBF   TreeKeyIdx   
GBFFootnotes   LocaleMgr   SWCom   ThMLHeadings   
  U  
GBFHeadings   
  M  
SWConfig   ThMLHTML   UnicodeRTF   
GBFHTML   MarkupFilterMgr   SWDisplay   ThMLHTMLHREF   UTF16UTF8   
GBFHTMLHREF   
  P  
SWGenBook   ThMLLemma   UTF8Cantillation   
GBFMorph   PLAINFootnotes   SWInputMethod   ThMLMorph   UTF8GreekAccents   
GBFOSIS   PLAINHTML   SWKey   ThMLOLB   UTF8HebrewPoints   
GBFPlain   
  R  
SWLD   ThMLOSIS   UTF8HTML   
GBFRTF   RTFHTML   SWLocale   ThMLPlain   UTF8Latin1   
GBFStrongs   RWPHTML   SWMgr   ThMLRTF   UTF8UTF16   
GBFThML   RWPRTF   SWModule   ThMLScripref   
  V  
GreekLexAttribs   
  S  
SWObject   ThMLStrongs   VerseKey   
  L  
SCSUUTF8   SWText   
-
Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/comments_2rawcom_2rtfidx_8cpp-source.html b/doc/api-documentation/html/comments_2rawcom_2rtfidx_8cpp-source.html deleted file mode 100644 index beafd01..0000000 --- a/doc/api-documentation/html/comments_2rawcom_2rtfidx_8cpp-source.html +++ /dev/null @@ -1,306 +0,0 @@ - - -rtfidx.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rtfidx.cpp

00001 /*****************************************************************************
-00002  *
-00003  *      This code wreaks but works (at least for MHC).  Good luck!
-00004  */
-00005 
-00006 #include <stdio.h>
-00007 #include <stdlib.h>
-00008 #include <string.h>
-00009 #include <ctype.h>
-00010 
-00011 #ifndef __GNUC__
-00012 #include <io.h>
-00013 #else
-00014 #include <unistd.h>
-00015 #endif
-00016 
-00017 #include <fcntl.h>
-00018 #include <versekey.h>
-00019 
-00020 
-00021 void writeidx(VerseKey &key1, VerseKey &key2, VerseKey &key3, long offset, short size);
-00022 char findbreak(int fp, long *offset, int *num1, int *num2, int *rangemax, short *size);
-00023 void openfiles(char *fname);
-00024 void checkparams(int argc, char **argv);
-00025 
-00026 
-00027 VerseKey key1, key2, key3;
-00028 int fp, vfp, cfp, bfp;
-00029 long chapoffset;
-00030 short chapsize;
-00031 char testmnt;
-00032 
-00033 
-00034 main(int argc, char **argv)
-00035 {
-00036         long pos, offset;
-00037         int num1, num2, rangemax, curbook = 0, curchap = 0, curverse = 0;
-00038         char buf[127], startflag = 0;
-00039         short size, tmp;
-00040 
-00041         checkparams(argc, argv);
-00042 
-00043         openfiles(argv[1]);
-00044 
-00045         testmnt = key1.Testament();
-00046         pos  = 0;
-00047         write(bfp, &pos, 4);  /* Book    offset for testament intros */
-00048         pos = 4;
-00049         write(cfp, &pos, 4);  /* Chapter offset for testament intro */
-00050 
-00051 
-00052 /*      Right now just zero out intros until parsing correctly */
-00053         pos = 0;
-00054         size = 0;
-00055         write(vfp, &pos, 4);  /* Module intro */
-00056         write(vfp, &size, 2);
-00057         write(vfp, &pos, 4);  /* Testament intro */
-00058         write(vfp, &size, 2);
-00059 
-00060         while(!findbreak(fp, &offset, &num1, &num2, &rangemax, &size)) {
-00061                 if (num2) {                             
-00062                         key2.Verse(1);
-00063                         key2.Chapter(num1);
-00064                         key2.Verse(num2);
-00065                 }
-00066                 else {
-00067                         key2.Verse(1);
-00068                         if (!startflag) {
-00069                                 startflag = 1;
-00070                         }
-00071                         else {
-00072                                 if (num1 <= key2.Chapter()) { // new book
-00073                                         key2.Chapter(1);
-00074                                         key2.Book(key2.Book()+1);
-00075                                 }
-00076                         }
-00077                         key2.Chapter(num1);
-00078                         printf("Found Chapter Break: %d ('%s')\n", num1, (char *)key2);
-00079                         chapoffset = offset;
-00080                         chapsize = size;
-00081                         continue;
-00082                 }
-00083 
-00084                 key3 = key2;
-00085                 key3 += (rangemax - key3.Verse());
-00086 
-00087                 writeidx(key1, key2, key3, offset, size);
-00088         }
-00089         close(vfp);
-00090         close(cfp);
-00091         close(bfp);
-00092         close(fp);
-00093 }
-00094 
-00095 
-00096 /**************************************************************************
-00097  * ENT: key1    - current location of index
-00098  *      key2    - minimum keyval for which this offset is valid
-00099  *      key3    - maximum keyval for which this offset is valid
-00100  */
-00101 
-00102 void writeidx(VerseKey &key1, VerseKey &key2, VerseKey &key3, long offset, short size)
-00103 {
-00104         long pos;
-00105         short tmp;
-00106 
-00107         for (; ((key1 <= key3) && (key1.Error() != KEYERR_OUTOFBOUNDS) && (key1.Testament() == testmnt)); key1+=1) {
-00108                 if (key1.Verse() == 1) {        // new chapter
-00109                         if (key1.Chapter() == 1) {      // new book
-00110                                 pos = lseek(cfp, 0, SEEK_CUR);
-00111                                 write(bfp, &pos, 4);
-00112                                 pos = lseek(vfp, 0, SEEK_CUR); /* Book intro (cps) */
-00113                                 write(cfp, &pos, 4);
-00114                                 write(vfp, &chapoffset, 4);  /* Book intro (vss)  set to same as chap for now(it should be chap 1 which usually contains the book into anyway)*/
-00115                                 write(vfp, &chapsize, 2);
-00116                         }
-00117                         pos = lseek(vfp, 0, SEEK_CUR);
-00118                         write(cfp, &pos, 4);
-00119                         write(vfp, &chapoffset, 4);  /* Chapter intro */
-00120                         write(vfp, &chapsize, 2);
-00121                 }
-00122                 if (key1 >= key2) {
-00123                         write(vfp, &offset, 4);
-00124                         write(vfp, &size, 2);
-00125                 }
-00126                 else    {
-00127                         pos = 0;
-00128                         tmp = 0;
-00129                         write(vfp, &pos, 4);
-00130                         write(vfp, &tmp, 2);
-00131                 }
-00132         }
-00133 }
-00134 
-00135 
-00136 char startentry(char *buf)
-00137 {
-00138         char loop;
-00139 
-00140         if (buf[0] != 10)
-00141                 return 0;
-00142         if (buf[1] != '#')
-00143                 return 0;
-00144         if (!isdigit(buf[2]))
-00145                 return 0;
-00146         for (loop = 3; loop < 7; loop++) {
-00147                 if (buf[loop] == ' ')
-00148                         break;
-00149                 if ((!isdigit(buf[loop])) && (buf[loop] != ',') && (buf[loop] != '-'))
-00150                         return 0;
-00151         }
-00152         return 1;
-00153 }
-00154 
-00155 
-00156 char findbreak(int fp, long *offset, int *num1, int *num2, int *rangemax, short *size)
-00157 {
-00158         char buf[7];
-00159         char buf2[20];
-00160         char ch;
-00161         char loop;
-00162         long offset2;
-00163         int ch2, vs2, rm2;
-00164         
-00165         memset(buf, ' ', 7);
-00166 
-00167         while (1) {
-00168                 if (startentry(buf)) {
-00169                         memset(buf, ' ', 2);
-00170                         for (loop = 2; loop < 7; loop++) {
-00171                                 if ((buf[loop] == '-') || (buf[loop] == ',') || (buf[loop] == ' ')) {
-00172                                         buf[loop] = 0;
-00173                                         *num2 = atoi(buf);
-00174                                         break;
-00175                                 }
-00176                         }
-00177                         for (ch = loop + 1; ch < 7; ch++) {
-00178                                 if (buf[ch] == ' ') {
-00179                                         break;
-00180                                 }
-00181                         }
-00182                         buf[ch] = 0;
-00183                         *rangemax = atoi(&buf[loop+1]);
-00184                         if (!*rangemax)
-00185                                 *rangemax = *num2;
-00186                         *offset = lseek(fp, 0, SEEK_CUR) - 5;
-00187                         if (size) {
-00188                                 if (findbreak(fp, &offset2, &ch2, &vs2, &rm2, 0)) {
-00189                                         *size = (short) (lseek(fp, 0, SEEK_END) - (*offset));
-00190                                 }
-00191                                 else {
-00192                                         if (vs2) {
-00193                                                 *size = (offset2 - (*offset)) - 3;
-00194                                         }
-00195                                         else {
-00196                                                 sprintf(buf2, "$-$-$- XX:%d", ch2);
-00197                                                 *size = (offset2 - (*offset)) - ((strlen(buf2) + 4));
-00198                                         }
-00199                                 }
-00200                                 lseek(fp, *offset, SEEK_SET);
-00201                         }
-00202                         return 0;
-00203                 }
-00204                                         
-00205                 if (!strncmp(buf, "$-$-$-", 6)) {
-00206                         memset(buf2, 0, 7);
-00207                         loop = 0;
-00208                         while ((read(fp, &buf2[loop], 1) == 1) && (loop < 7)) {
-00209                                 if ((buf2[loop] == 10) || (buf2[loop] == 13)) {
-00210                                         buf2[loop] = 0;
-00211                                         break;
-00212                                 }
-00213                                 loop++;
-00214                         }
-00215                         while (read(fp, &ch, 1) == 1) {
-00216                                 if (ch == '*')
-00217                                         break;
-00218                         }
-00219                         
-00220                         *offset = lseek(fp, 0, SEEK_CUR) - 1;
-00221                         *num2 = 0;
-00222                         for (loop = strlen(buf2) - 1; loop; loop--) {
-00223                                 if (buf2[loop] == ':')
-00224                                         break;
-00225                         }
-00226                         *num1 = atoi(&buf2[loop+1]);
-00227                         printf("Chapter marker: %s\n", buf2);
-00228                         if (size) {
-00229                                 if (findbreak(fp, &offset2, &ch2, &vs2, &rm2, 0)) {
-00230                                         *size = (short) (lseek(fp, 0, SEEK_END) - (*offset));
-00231                                 }
-00232                                 else {
-00233                                         if (vs2) {
-00234                                                 *size = (offset2 - (*offset)) - 3;
-00235                                         }
-00236                                         else {
-00237                                                 sprintf(buf2, "$-$-$- XX:%d", ch2);
-00238                                                 *size = (offset2 - (*offset)) - ((strlen(buf2) + 4));
-00239                                         }
-00240                                 }
-00241                                 lseek(fp, *offset, SEEK_SET);
-00242                         }
-00243                         return 0;
-00244                 }
-00245                                  
-00246                                 
-00247                 memmove(buf, &buf[1], 6);
-00248                 if (read(fp, &buf[6], 1) != 1)
-00249                         return 1;
-00250         }
-00251 }
-00252 
-00253 
-00254 void openfiles(char *fname)
-00255 {
-00256         char buf[255];
-00257 
-00258         if ((fp = open(fname, O_RDONLY)) == -1) {
-00259                 fprintf(stderr, "Couldn't open file: %s\n", fname);
-00260                 exit(1);
-00261         }
-00262 
-00263         sprintf(buf, "%s.vss", fname);
-00264         if ((vfp = open(buf, O_CREAT|O_WRONLY)) == -1) {
-00265                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00266                 exit(1);
-00267         }
-00268 
-00269         sprintf(buf, "%s.cps", fname);
-00270         if ((cfp = open(buf, O_CREAT|O_WRONLY)) == -1) {
-00271                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00272                 exit(1);
-00273         }
-00274 
-00275         sprintf(buf, "%s.bks", fname);
-00276         if ((bfp = open(buf, O_CREAT|O_WRONLY)) == -1) {
-00277                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00278                 exit(1);
-00279         }
-00280 }
-00281 
-00282 
-00283 void checkparams(int argc, char **argv)
-00284 {
-00285         if (argc < 2) {
-00286                 fprintf(stderr, "usage: %s <file to process> [nt - for new testmt file]\n", argv[0]);
-00287                 exit(1);
-00288         }
-00289         if (argc == 3)
-00290                 key1 = key2 = key3 = "Matthew 1:1";
-00291         else    key1 = key2 = key3 = "Genesis 1:1";
-00292 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/comments_2zcom_2rawtxt2z_8cpp-source.html b/doc/api-documentation/html/comments_2zcom_2rawtxt2z_8cpp-source.html deleted file mode 100644 index 00c50fe..0000000 --- a/doc/api-documentation/html/comments_2zcom_2rawtxt2z_8cpp-source.html +++ /dev/null @@ -1,97 +0,0 @@ - - -rawtxt2z.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rawtxt2z.cpp

00001 #include <ctype.h>
-00002 #include <stdio.h>
-00003 #include <fcntl.h>
-00004 #include <errno.h>
-00005 #include <stdlib.h>
-00006 
-00007 #ifndef __GNUC__
-00008 #include <io.h>
-00009 #else
-00010 #include <unistd.h>
-00011 #endif
-00012 
-00013 #include <swcomprs.h>
-00014 
-00015 
-00016 main(int argc, char **argv)
-00017 {
-00018         SWCompress *zobj;
-00019         int ifd, ofd, ixfd, oxfd;
-00020         long offset, loffset, lzoffset;
-00021         short size, lsize, lzsize;
-00022         char *tmpbuf;
-00023         
-00024         if (argc != 2) {
-00025                 fprintf(stderr, "usage: %s <datafilename>\n", argv[0]);
-00026                 exit(1);
-00027         }
-00028 
-00029         zobj = new SWCompress();
-00030 
-00031 #ifndef O_BINARY
-00032 #define O_BINARY 0
-00033 #endif
-00034 
-00035         tmpbuf = new char [ strlen(argv[1]) + 9 ];
-00036         ifd = open(argv[1], O_RDONLY|O_BINARY);
-00037         sprintf(tmpbuf, "%s.vss", argv[1]);
-00038         ixfd = open(tmpbuf, O_RDONLY|O_BINARY);
-00039         sprintf(tmpbuf, "%s.zzz", argv[1]);
-00040         ofd = open(tmpbuf, O_WRONLY|O_BINARY|O_CREAT);
-00041         sprintf(tmpbuf, "%s.zzz.vss", argv[1]);
-00042         oxfd = open(tmpbuf, O_WRONLY|O_BINARY|O_CREAT);
-00043 
-00044         delete [] tmpbuf;
-00045 
-00046         printf("\n");
-00047 
-00048         while (1) {
-00049                 if (read(ixfd, &offset, 4) != 4)
-00050                         break;
-00051                 if (read(ixfd, &size, 2) != 2)
-00052                         break;
-00053 
-00054                 if ((offset == loffset) && (size == lsize)) {
-00055                         printf("using previous offset,size\n", size);
-00056                         write(oxfd, &lzoffset, 4);
-00057                         write(oxfd, &lzsize, 2);
-00058                 }
-00059                 else {
-00060                         printf("%d -> ", size);
-00061                         lsize   = size;
-00062                         loffset = offset;
-00063 
-00064                         if (size) {
-00065                                 tmpbuf = (char *) calloc(size + 1, 1);
-00066                                 lseek(ifd, offset, SEEK_SET);
-00067                                 read(ifd, tmpbuf, size);
-00068                                 zobj->Buf(tmpbuf);
-00069                                 zobj->zBuf(&size);
-00070                                 free(tmpbuf);
-00071                         }
-00072                         offset = lseek(ofd, 0, SEEK_END);
-00073                         write(oxfd, &offset, 4);
-00074                         if (size) 
-00075                                 write(ofd, zobj->zBuf(&size), size);
-00076                         lzoffset = offset;
-00077                         write(oxfd, &size, 2);
-00078                         lzsize = size;
-00079                         printf("%d \n", size);
-00080                 }
-00081         }
-00082         delete zobj;
-00083 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/compress_8cpp-source.html b/doc/api-documentation/html/compress_8cpp-source.html deleted file mode 100644 index bd80d69..0000000 --- a/doc/api-documentation/html/compress_8cpp-source.html +++ /dev/null @@ -1,781 +0,0 @@ - - -compress.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

compress.cpp

00001 Compression Info, 10-11-95
-00002 Jeff Wheeler
-00003 
-00004 Source of Algorithm
-00005 -------------------
-00006 
-00007 The compression algorithms used here are based upon the algorithms developed and published by Haruhiko Okumura in a paper entitled "Data Compression Algorithms of LARC and LHarc."  This paper discusses three compression algorithms, LSZZ, LZARI, and LZHUF.  LZSS is described as the "first" of these, and is described as providing moderate compression with good speed.  LZARI is described as an improved LZSS, a combination of the LZSS algorithm with adaptive arithmetic compression.  It is described as being slower than LZSS but with better compression.  LZHUF (the basis of the common LHA compression program) was included in the paper, however, a free usage license was not included. 
-00008 
-00009 The following are copies of the statements included at the beginning of each source code listing that was supplied in the working paper.
-00010 
-00011         LZSS, dated 4/6/89, marked as "Use, distribute and
-00012         modify this program freely."
-00013 
-00014         LZARI, dated 4/7/89, marked as "Use, distribute and
-00015         modify this program freely."
-00016 
-00017         LZHUF, dated 11/20/88, written by Haruyasu Yoshizaki,
-00018         translated by Haruhiko Okumura on 4/7/89.  Not
-00019         expressly marked as redistributable or modifiable.
-00020 
-00021 Since both LZSS and LZARI are marked as "use, distribute and modify freely" we have felt at liberty basing our compression algorithm on either of these.
-00022 
-00023 Selection of Algorithm
-00024 ----------------------
-00025 
-00026 Working samples of three possible compression algorithms are supplied in Okumura's paper.  Which should be used?
-00027 
-00028 LZSS is the fastest at decompression, but does not generated as small a compressed file as the other methods. The other two methods provided, perhaps, a 15% improvement in compression.  Or, put another way, on a 100K file, LZSS might compress it to 50K while the others might approach 40-45K.  For STEP purposes, it was decided that decoding speed was of more importance than tighter compression. For these reasons, the first compression algorithm implemented is the LZSS algorithm.
-00029 
-00030 About LZSS Encoding
-00031 -------------------
-00032 
-00033 (adapted from Haruhiko Okumura's paper)
-00034 
-00035 This scheme was proposed by Ziv and Lempel [1].  A slightly modified version is described by Storer and Szymanski [2]. An implementation using a binary tree has been proposed by Bell [3].
-00036 
-00037 The algorithm is quite simple.
-00038 1. Keep a ring buffer which initially contains all space characters.
-00039 2. Read several letters from the file to the buffer.
-00040 3. Search the buffer for the longest string that matches the letters just read, and send its length and position into the buffer.
-00041 
-00042 If the ring buffer is 4096 bytes, the position can be stored in 12 bits.  If the length is represented in 4 bits, the <position, length> pair is two bytes long.  If the longest match is no more than two characters, then just one character is sent without encoding.  The process starts again with the next character.  An extra bit is sent each time to tell the decoder whether the next item is a character of a <position, length> pair.
-00043 
-00044 [1] J. Ziv and A. Lempel, IEEE Transactions IT-23, 337-343 (1977).
-00045 [2] J. A. Storer and T. G. Szymanski, J. ACM, 29, 928-951 (1982).
-00046 [3] T.C. Gell, IEEE Transactions COM-34, 1176-1182 (1986).
-00047 
-00048 void InitTree(                      // no return value
-00049     void);                          // no parameters
-00050 
-00051 void InsertNode(                    // no return value
-00052     short int Pos);                 // position in the buffer
-00053 
-00054 void DeleteNode(                    // no return value
-00055     short int Node);                // node to be removed
-00056 
-00057 void Encode(                        // no return value
-00058     void);                          // no parameters
-00059 
-00060 void Decode(                        // no return value
-00061     void);                          // no parameters
-00062 
-00063 // The following are constant sizes used by the compression algorithm.
-00064 //
-00065 //  N         - This is the size of the ring buffer.  It is set
-00066 //              to 4K.  It is important to note that a position
-00067 //              within the ring buffer requires 12 bits.  
-00068 //
-00069 //  F         - This is the maximum length of a character sequence
-00070 //              that can be taken from the ring buffer.  It is set
-00071 //              to 18.  Note that a length must be 3 before it is
-00072 //              worthwhile to store a position/length pair, so the
-00073 //              length can be encoded in only 4 bits.  Or, put yet
-00074 //              another way, it is not necessary to encode a length
-00075 //              of 0-18, it is necessary to encode a length of
-00076 //              3-18, which requires 4 bits.
-00077 //              
-00078 //  THRESHOLD - It takes 2 bytes to store an offset and
-00079 //              a length.  If a character sequence only
-00080 //              requires 1 or 2 characters to store 
-00081 //              uncompressed, then it is better to store
-00082 //              it uncompressed than as an offset into
-00083 //              the ring buffer.
-00084 //
-00085 // Note that the 12 bits used to store the position and the 4 bits
-00086 // used to store the length equal a total of 16 bits, or 2 bytes.
-00087 
-00088 #define N               4096
-00089 #define F               18
-00090 #define THRESHOLD       3
-00091 #define NOT_USED        N
-00092 
-00093 // m_ring_buffer is a text buffer.  It contains "nodes" of
-00094 // uncompressed text that can be indexed by position.  That is,
-00095 // a substring of the ring buffer can be indexed by a position
-00096 // and a length.  When decoding, the compressed text may contain
-00097 // a position in the ring buffer and a count of the number of
-00098 // bytes from the ring buffer that are to be moved into the
-00099 // uncompressed buffer.  
-00100 //
-00101 // This ring buffer is not maintained as part of the compressed
-00102 // text.  Instead, it is reconstructed dynamically.  That is,
-00103 // it starts out empty and gets built as the text is decompressed.
-00104 //
-00105 // The ring buffer contain N bytes, with an additional F - 1 bytes
-00106 // to facilitate string comparison.
-00107 
-00108 unsigned char m_ring_buffer[N + F - 1];
-00109 
-00110 // m_match_position and m_match_length are set by InsertNode().
-00111 //
-00112 // These variables indicate the position in the ring buffer 
-00113 // and the number of characters at that position that match
-00114 // a given string.
-00115 
-00116 short int m_match_position;
-00117 short int m_match_length;
-00118 
-00119 // m_lson, m_rson, and m_dad are the Japanese way of referring to
-00120 // a tree structure.  The dad is the parent and it has a right and
-00121 // left son (child).
-00122 //
-00123 // For i = 0 to N-1, m_rson[i] and m_lson[i] will be the right 
-00124 // and left children of node i.  
-00125 //
-00126 // For i = 0 to N-1, m_dad[i] is the parent of node i.
-00127 //
-00128 // For i = 0 to 255, rson[N + i + 1] is the root of the tree for 
-00129 // strings that begin with the character i.  Note that this requires 
-00130 // one byte characters.
-00131 //
-00132 // These nodes store values of 0...(N-1).  Memory requirements
-00133 // can be reduces by using 2-byte integers instead of full 4-byte
-00134 // integers (for 32-bit applications).  Therefore, these are 
-00135 // defined as "short ints."
-00136 
-00137 short int m_lson[N + 1];
-00138 short int m_rson[N + 257];
-00139 short int m_dad[N + 1];
-00140 
-00141 /*
-00142  -------------------------------------------------------------------------
-00143     cLZSS::InitTree
-00144     
-00145     This function initializes the tree nodes to "empty" states. 
-00146  -------------------------------------------------------------------------
-00147 */
-00148 
-00149 void cLZSS::InitTree(               // no return value
-00150     void)                           // no parameters
-00151     throw()                         // exception list
-00152 
-00153     {
-00154     int  i;
-00155 
-00156     // For i = 0 to N - 1, m_rson[i] and m_lson[i] will be the right
-00157     // and left children of node i.  These nodes need not be
-00158     // initialized.  However, for debugging purposes, it is nice to
-00159     // have them initialized.  Since this is only used for compression
-00160     // (not decompression), I don't mind spending the time to do it.
-00161     //
-00162     // For the same range of i, m_dad[i] is the parent of node i.
-00163     // These are initialized to a known value that can represent
-00164     // a "not used" state.
-00165     
-00166     for (i = 0; i < N; i++)
-00167         {
-00168         m_lson[i] = NOT_USED;
-00169         m_rson[i] = NOT_USED;
-00170         m_dad[i] = NOT_USED;
-00171         }
-00172 
-00173     // For i = 0 to 255, m_rson[N + i + 1] is the root of the tree
-00174     // for strings that begin with the character i.  This is why
-00175     // the right child array is larger than the left child array.
-00176     // These are also initialzied to a "not used" state.
-00177     //
-00178     // Note that there are 256 of these, one for each of the possible
-00179     // 256 characters.
-00180 
-00181     for (i = N + 1; i <= (N + 256); i++)
-00182         {
-00183         m_rson[i] = NOT_USED;
-00184         }
-00185 
-00186     // Done.
-00187     }
-00188 
-00189 /*
-00190  -------------------------------------------------------------------------
-00191     cLZSS::InsertNode
-00192     
-00193     This function inserts a string from the ring buffer into one of
-00194     the trees.  It loads the match position and length member variables
-00195     for the longest match.
-00196     
-00197     The string to be inserted is identified by the parameter Pos,
-00198     A full F bytes are inserted.  So, m_ring_buffer[Pos ... Pos+F-1]
-00199     are inserted.
-00200 
-00201     If the matched length is exactly F, then an old node is removed
-00202     in favor of the new one (because the old one will be deleted
-00203     sooner).
-00204 
-00205     Note that Pos plays a dual role.  It is used as both a position
-00206     in the ring buffer and also as a tree node.  m_ring_buffer[Pos]
-00207     defines a character that is used to identify a tree node.
-00208  -------------------------------------------------------------------------
-00209 */
-00210 
-00211 void cLZSS::InsertNode(                 // no return value
-00212     short int Pos)                      // position in the buffer
-00213     throw()                             // exception list
-00214 
-00215     {
-00216     short int i;
-00217     short int p;
-00218     int cmp;
-00219     unsigned char * key;
-00220 
-00221     ASSERT(Pos >= 0);
-00222     ASSERT(Pos < N);
-00223 
-00224     cmp = 1;
-00225     key = &(m_ring_buffer[Pos]);
-00226 
-00227     // The last 256 entries in m_rson contain the root nodes for
-00228     // strings that begin with a letter.  Get an index for the
-00229     // first letter in this string.
-00230 
-00231     p = (short int) (N + 1 + key[0]);
-00232 
-00233     // Set the left and right tree nodes for this position to "not
-00234     // used."
-00235 
-00236     m_lson[Pos] = NOT_USED;
-00237     m_rson[Pos] = NOT_USED;
-00238 
-00239     // Haven't matched anything yet.
-00240 
-00241     m_match_length = 0;
-00242 
-00243     for ( ; ; )
-00244         {
-00245         if (cmp >= 0)
-00246             {
-00247             if (m_rson[p] != NOT_USED)
-00248                 {
-00249                 p = m_rson[p];
-00250                 }
-00251             else
-00252                 {
-00253                 m_rson[p] = Pos;
-00254                 m_dad[Pos] = p;
-00255                 return;
-00256                 }
-00257             }
-00258         else
-00259             {
-00260             if (m_lson[p] != NOT_USED)
-00261                 {
-00262                 p = m_lson[p];
-00263                 }
-00264             else
-00265                 {
-00266                 m_lson[p] = Pos;
-00267                 m_dad[Pos] = p;
-00268                 return;
-00269                 }
-00270             }
-00271 
-00272         // Should we go to the right or the left to look for the
-00273         // next match?
-00274 
-00275         for (i = 1; i < F; i++)
-00276             {
-00277             cmp = key[i] - m_ring_buffer[p + i];
-00278             if (cmp != 0)
-00279                 break;
-00280             }
-00281 
-00282         if (i > m_match_length)
-00283             {
-00284             m_match_position = p;
-00285             m_match_length = i;
-00286 
-00287             if (i >= F)
-00288                 break;
-00289             }
-00290         }
-00291 
-00292     m_dad[Pos] = m_dad[p];
-00293     m_lson[Pos] = m_lson[p];
-00294     m_rson[Pos] = m_rson[p];
-00295 
-00296     m_dad[ m_lson[p] ] = Pos;
-00297     m_dad[ m_rson[p] ] = Pos;
-00298 
-00299     if (m_rson[ m_dad[p] ] == p)
-00300         {
-00301         m_rson[ m_dad[p] ] = Pos;
-00302         }
-00303     else
-00304         {
-00305         m_lson[ m_dad[p] ] = Pos;
-00306         }
-00307 
-00308     // Remove "p"
-00309 
-00310     m_dad[p] = NOT_USED;
-00311     }
-00312 
-00313 /*
-00314  -------------------------------------------------------------------------
-00315     cLZSS::DeleteNode   
-00316 
-00317     This function removes the node "Node" from the tree.
-00318  -------------------------------------------------------------------------
-00319 */
-00320 
-00321 void cLZSS::DeleteNode(                 // no return value
-00322     short int Node)                     // node to be removed
-00323     throw()                             // exception list
-00324 
-00325     {
-00326     short int  q;
-00327 
-00328     ASSERT(Node >= 0);
-00329     ASSERT(Node < (N+1));
-00330 
-00331     if (m_dad[Node] == NOT_USED)
-00332         {
-00333         // not in tree, nothing to do
-00334         return;
-00335         }
-00336 
-00337     if (m_rson[Node] == NOT_USED)
-00338         {
-00339         q = m_lson[Node];
-00340         }
-00341     else if (m_lson[Node] == NOT_USED)
-00342         {
-00343         q = m_rson[Node];
-00344         }
-00345     else
-00346         {
-00347         q = m_lson[Node];
-00348         if (m_rson[q] != NOT_USED)
-00349             {
-00350             do
-00351                 {
-00352                 q = m_rson[q];
-00353                 }
-00354             while (m_rson[q] != NOT_USED);
-00355 
-00356             m_rson[ m_dad[q] ] = m_lson[q];
-00357             m_dad[ m_lson[q] ] = m_dad[q];
-00358             m_lson[q] = m_lson[Node];
-00359             m_dad[ m_lson[Node] ] = q;
-00360             }
-00361 
-00362         m_rson[q] = m_rson[Node];
-00363         m_dad[ m_rson[Node] ] = q;
-00364         }
-00365 
-00366     m_dad[q] = m_dad[Node];
-00367 
-00368     if (m_rson[ m_dad[Node] ] == Node)
-00369         {
-00370         m_rson[ m_dad[Node] ] = q;
-00371         }
-00372     else
-00373         {
-00374         m_lson[ m_dad[Node] ] = q;
-00375         }
-00376 
-00377     m_dad[Node] = NOT_USED;
-00378     }
-00379 
-00380 /*
-00381  -------------------------------------------------------------------------
-00382     cLZSS::Encode
-00383 
-00384     This function "encodes" the input stream into the output stream.
-00385     The GetChars() and SendChars() functions are used to separate
-00386     this method from the actual i/o.
-00387  -------------------------------------------------------------------------
-00388 */
-00389 
-00390 void cLZSS::Encode(                     // no return value
-00391     void)                               // no parameters
-00392 
-00393     {
-00394     short int i;                        // an iterator
-00395     short int r;                        // node number in the binary tree
-00396     short int s;                        // position in the ring buffer
-00397     unsigned short int len;             // len of initial string
-00398     short int last_match_length;        // length of last match
-00399     short int code_buf_pos;             // position in the output buffer
-00400     unsigned char code_buf[17];         // the output buffer
-00401     unsigned char mask;                 // bit mask for byte 0 of out buf
-00402     unsigned char c;                    // character read from string
-00403 
-00404     // Start with a clean tree.
-00405 
-00406     InitTree();
-00407 
-00408     // code_buf[0] works as eight flags.  A "1" represents that the
-00409     // unit is an unencoded letter (1 byte), and a "0" represents
-00410     // that the next unit is a <position,length> pair (2 bytes).
-00411     //
-00412     // code_buf[1..16] stores eight units of code.  Since the best
-00413     // we can do is store eight <position,length> pairs, at most 16 
-00414     // bytes are needed to store this.
-00415     //
-00416     // This is why the maximum size of the code buffer is 17 bytes.
-00417 
-00418     code_buf[0] = 0;
-00419     code_buf_pos = 1;
-00420 
-00421     // Mask iterates over the 8 bits in the code buffer.  The first
-00422     // character ends up being stored in the low bit.
-00423     //
-00424     //  bit   8   7   6   5   4   3   2   1
-00425     //        |                           |
-00426     //        |             first sequence in code buffer
-00427     //        |
-00428     //      last sequence in code buffer        
-00429 
-00430     mask = 1;
-00431 
-00432     s = 0;
-00433     r = (short int) N - (short int) F;
-00434 
-00435     // Initialize the ring buffer with spaces...
-00436 
-00437     // Note that the last F bytes of the ring buffer are not filled.
-00438     // This is because those F bytes will be filled in immediately
-00439     // with bytes from the input stream.
-00440 
-00441     memset(m_ring_buffer, ' ', N - F);
-00442     
-00443     // Read F bytes into the last F bytes of the ring buffer.
-00444     //
-00445     // This function loads the buffer with X characters and returns
-00446     // the actual amount loaded.
-00447 
-00448     len = GetChars(&(m_ring_buffer[r]), F);
-00449 
-00450     // Make sure there is something to be compressed.
-00451 
-00452     if (len == 0)
-00453         return;
-00454 
-00455     // Insert the F strings, each of which begins with one or more
-00456     // 'space' characters.  Note the order in which these strings
-00457     // are inserted.  This way, degenerate trees will be less likely
-00458     // to occur.
-00459 
-00460     for (i = 1; i <= F; i++)
-00461         {
-00462         InsertNode((short int) (r - i));
-00463         }
-00464 
-00465     // Finally, insert the whole string just read.  The
-00466     // member variables match_length and match_position are set.
-00467 
-00468     InsertNode(r);
-00469 
-00470     // Now that we're preloaded, continue till done.
-00471 
-00472     do
-00473         {
-00474 
-00475         // m_match_length may be spuriously long near the end of
-00476         // text.
-00477 
-00478         if (m_match_length > len)
-00479             {
-00480             m_match_length = len;
-00481             }
-00482 
-00483         // Is it cheaper to store this as a single character?  If so,
-00484         // make it so.
-00485 
-00486         if (m_match_length < THRESHOLD)
-00487             {
-00488             // Send one character.  Remember that code_buf[0] is the
-00489             // set of flags for the next eight items.
-00490 
-00491             m_match_length = 1;     
-00492             code_buf[0] |= mask;  
-00493             code_buf[code_buf_pos++] = m_ring_buffer[r];
-00494             }
-00495 
-00496         // Otherwise, we do indeed have a string that can be stored
-00497         // compressed to save space.
-00498 
-00499         else
-00500             {
-00501             // The next 16 bits need to contain the position (12 bits)
-00502             // and the length (4 bits).
-00503 
-00504             code_buf[code_buf_pos++] = (unsigned char) m_match_position;
-00505             code_buf[code_buf_pos++] = (unsigned char) (
-00506                 ((m_match_position >> 4) & 0xf0) | 
-00507                 (m_match_length - THRESHOLD) );
-00508             }
-00509 
-00510         // Shift the mask one bit to the left so that it will be ready
-00511         // to store the new bit.
-00512 
-00513         mask = (unsigned char) (mask << 1);
-00514 
-00515         // If the mask is now 0, then we know that we have a full set
-00516         // of flags and items in the code buffer.  These need to be
-00517         // output.
-00518 
-00519         if (mask == 0)
-00520             {
-00521             // code_buf is the buffer of characters to be output.
-00522             // code_buf_pos is the number of characters it contains.
-00523 
-00524             SendChars(code_buf, code_buf_pos);
-00525 
-00526             // Reset for next buffer...
-00527 
-00528             code_buf[0] = 0;
-00529             code_buf_pos = 1;
-00530             mask = 1;
-00531             }
-00532 
-00533         last_match_length = m_match_length;
-00534 
-00535         // Delete old strings and read new bytes...
-00536 
-00537         for (i = 0; i < last_match_length; i++)
-00538             {
-00539 
-00540             // Get next character...
-00541 
-00542             if (GetChars(&c, 1) != 1)
-00543                 break;
-00544 
-00545             // Delete "old strings"
-00546 
-00547             DeleteNode(s);
-00548 
-00549             // Put this character into the ring buffer.
-00550             //          
-00551             // The original comment here says "If the position is near
-00552             // the end of the buffer, extend the buffer to make
-00553             // string comparison easier."
-00554             //
-00555             // That's a little misleading, because the "end" of the 
-00556             // buffer is really what we consider to be the "beginning"
-00557             // of the buffer, that is, positions 0 through F.
-00558             //
-00559             // The idea is that the front end of the buffer is duplicated
-00560             // into the back end so that when you're looking at characters
-00561             // at the back end of the buffer, you can index ahead (beyond
-00562             // the normal end of the buffer) and see the characters
-00563             // that are at the front end of the buffer wihtout having
-00564             // to adjust the index.
-00565             //
-00566             // That is...
-00567             //
-00568             //      1234xxxxxxxxxxxxxxxxxxxxxxxxxxxxx1234
-00569             //      |                               |  |
-00570             //      position 0          end of buffer  |
-00571             //                                         |
-00572             //                  duplicate of front of buffer
-00573 
-00574             m_ring_buffer[s] = c;
-00575 
-00576             if (s < F - 1)
-00577                 {
-00578                 m_ring_buffer[s + N] = c;
-00579                 }
-00580 
-00581             // Increment the position, and wrap around when we're at
-00582             // the end.  Note that this relies on N being a power of 2.
-00583 
-00584             s = (short int) ( (s + 1) & (N - 1) );
-00585             r = (short int) ( (r + 1) & (N - 1) );
-00586 
-00587             // Register the string that is found in 
-00588             // m_ring_buffer[r..r+F-1].
-00589 
-00590             InsertNode(r);
-00591             }
-00592 
-00593         // If we didn't quit because we hit the last_match_length,
-00594         // then we must have quit because we ran out of characters
-00595         // to process.
-00596 
-00597         while (i++ < last_match_length)
-00598             {                              
-00599             DeleteNode(s);
-00600 
-00601             s = (short int) ( (s + 1) & (N - 1) );
-00602             r = (short int) ( (r + 1) & (N - 1) );
-00603 
-00604             // Note that len hitting 0 is the key that causes the
-00605             // do...while() to terminate.  This is the only place
-00606             // within the loop that len is modified.
-00607             //
-00608             // Its original value is F (or a number less than F for
-00609             // short strings).
-00610 
-00611             if (--len)
-00612                 {
-00613                 InsertNode(r);       /* buffer may not be empty. */
-00614                 }
-00615             }
-00616 
-00617         // End of do...while() loop.  Continue processing until there
-00618         // are no more characters to be compressed.  The variable
-00619         // "len" is used to signal this condition.
-00620         }
-00621     while (len > 0);
-00622 
-00623     // There could still be something in the output buffer.  Send it
-00624     // now.
-00625 
-00626     if (code_buf_pos > 1)
-00627         {
-00628         // code_buf is the encoded string to send.
-00629         // code_buf_ptr is the number of characters.
-00630 
-00631         SendChars(code_buf, code_buf_pos);
-00632         }
-00633 
-00634     // Done!
-00635     }
-00636 
-00637 /*
-00638  -------------------------------------------------------------------------
-00639     cLZSS::Decode   
-00640 
-00641     This function "decodes" the input stream into the output stream.
-00642     The GetChars() and SendChars() functions are used to separate
-00643     this method from the actual i/o.
-00644  -------------------------------------------------------------------------
-00645 */
-00646 
-00647 void cLZSS::Decode(                     // no return value
-00648     void)                               // no parameters
-00649 
-00650     {
-00651     int k;
-00652     int r;                              // node number
-00653     unsigned char c[F];                 // an array of chars
-00654     unsigned char flags;                // 8 bits of flags
-00655     int flag_count;                     // which flag we're on
-00656     short int pos;                      // position in the ring buffer
-00657     short int len;                      // number of chars in ring buffer
-00658 
-00659     // Initialize the ring buffer with a common string.
-00660     //
-00661     // Note that the last F bytes of the ring buffer are not filled.
-00662 
-00663     memset(m_ring_buffer, ' ', N - F);
-00664     
-00665     r = N - F;
-00666 
-00667     flags = (char) 0;
-00668     flag_count = 0;
-00669 
-00670     for ( ; ; )
-00671         {
-00672 
-00673         // If there are more bits of interest in this flag, then
-00674         // shift that next interesting bit into the 1's position.
-00675         //
-00676         // If this flag has been exhausted, the next byte must 
-00677         // be a flag.
-00678 
-00679         if (flag_count > 0)
-00680             {
-00681             flags = (unsigned char) (flags >> 1);
-00682             flag_count--;
-00683             }
-00684         else
-00685             {
-00686             // Next byte must be a flag.
-00687 
-00688             if (GetChars(&flags, 1) != 1)
-00689                 break;
-00690 
-00691             // Set the flag counter.  While at first it might appear
-00692             // that this should be an 8 since there are 8 bits in the
-00693             // flag, it should really be a 7 because the shift must
-00694             // be performed 7 times in order to see all 8 bits.
-00695 
-00696             flag_count = 7;
-00697             }
-00698 
-00699         // If the low order bit of the flag is now set, then we know
-00700         // that the next byte is a single, unencoded character.
-00701 
-00702         if (flags & 1)
-00703             {
-00704             if (GetChars(c, 1) != 1)
-00705                 break;
-00706 
-00707             if (SendChars(c, 1) != 1)
-00708                 break;
-00709 
-00710             // Add to buffer, and increment to next spot. Wrap at end.
-00711 
-00712             m_ring_buffer[r] = c[0];
-00713             r = (short int) ( (r + 1) & (N - 1) );
-00714             }
-00715 
-00716         // Otherwise, we know that the next two bytes are a
-00717         // <position,length> pair.  The position is in 12 bits and
-00718         // the length is in 4 bits.
-00719 
-00720         else
-00721             {
-00722             // Original code:
-00723             //  if ((i = getc(infile)) == EOF)
-00724             //      break;
-00725             //  if ((j = getc(infile)) == EOF)
-00726             //      break;
-00727             //  i |= ((j & 0xf0) << 4);    
-00728             //  j = (j & 0x0f) + THRESHOLD;
-00729             //
-00730             // I've modified this to only make one input call, and
-00731             // have changed the variable names to something more
-00732             // obvious.
-00733 
-00734             if (GetChars(c, 2) != 2)
-00735                 break;
-00736 
-00737             // Convert these two characters into the position and
-00738             // length.  Note that the length is always at least
-00739             // THRESHOLD, which is why we're able to get a length
-00740             // of 18 out of only 4 bits.
-00741 
-00742             pos = (short int) ( c[0] | ((c[1] & 0xf0) << 4) );
-00743 
-00744             len = (short int) ( (c[1] & 0x0f) + THRESHOLD );
-00745 
-00746             // There are now "len" characters at position "pos" in
-00747             // the ring buffer that can be pulled out.  Note that
-00748             // len is never more than F.
-00749 
-00750             for (k = 0; k < len; k++)
-00751                 {
-00752                 c[k] = m_ring_buffer[(pos + k) & (N - 1)];
-00753 
-00754                 // Add to buffer, and increment to next spot. Wrap at end.
-00755 
-00756                 m_ring_buffer[r] = c[k];
-00757                 r = (short int) ( (r + 1) & (N - 1) );
-00758                 }
-00759 
-00760             // Add the "len" characters to the output stream.
-00761 
-00762             if (SendChars(c, len) != len)
-00763                 break;
-00764             }
-00765         }
-00766     }
-00767 
-

Generated on Thu Jun 20 22:12:58 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/deflate_8h-source.html b/doc/api-documentation/html/deflate_8h-source.html deleted file mode 100644 index 9b1889f..0000000 --- a/doc/api-documentation/html/deflate_8h-source.html +++ /dev/null @@ -1,332 +0,0 @@ - - -deflate.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

deflate.h

00001 /* deflate.h -- internal compression state
-00002  * Copyright (C) 1995-1998 Jean-loup Gailly
-00003  * For conditions of distribution and use, see copyright notice in zlib.h 
-00004  */
-00005 
-00006 /* WARNING: this file should *not* be used by applications. It is
-00007    part of the implementation of the compression library and is
-00008    subject to change. Applications should only use zlib.h.
-00009  */
-00010 
-00011 /* @(#) $Id: deflate_8h-source.html,v 1.3 2002/06/20 20:23:08 mgruner Exp $ */
-00012 
-00013 #ifndef _DEFLATE_H
-00014 #define _DEFLATE_H
-00015 
-00016 #include "zutil.h"
-00017 
-00018 /* ===========================================================================
-00019  * Internal compression state.
-00020  */
-00021 
-00022 #define LENGTH_CODES 29
-00023 /* number of length codes, not counting the special END_BLOCK code */
-00024 
-00025 #define LITERALS  256
-00026 /* number of literal bytes 0..255 */
-00027 
-00028 #define L_CODES (LITERALS+1+LENGTH_CODES)
-00029 /* number of Literal or Length codes, including the END_BLOCK code */
-00030 
-00031 #define D_CODES   30
-00032 /* number of distance codes */
-00033 
-00034 #define BL_CODES  19
-00035 /* number of codes used to transfer the bit lengths */
-00036 
-00037 #define HEAP_SIZE (2*L_CODES+1)
-00038 /* maximum heap size */
-00039 
-00040 #define MAX_BITS 15
-00041 /* All codes must not exceed MAX_BITS bits */
-00042 
-00043 #define INIT_STATE    42
-00044 #define BUSY_STATE   113
-00045 #define FINISH_STATE 666
-00046 /* Stream status */
-00047 
-00048 
-00049 /* Data structure describing a single value and its code string. */
-00050 typedef struct ct_data_s {
-00051     union {
-00052         ush  freq;       /* frequency count */
-00053         ush  code;       /* bit string */
-00054     } fc;
-00055     union {
-00056         ush  dad;        /* father node in Huffman tree */
-00057         ush  len;        /* length of bit string */
-00058     } dl;
-00059 } FAR ct_data;
-00060 
-00061 #define Freq fc.freq
-00062 #define Code fc.code
-00063 #define Dad  dl.dad
-00064 #define Len  dl.len
-00065 
-00066 typedef struct static_tree_desc_s  static_tree_desc;
-00067 
-00068 typedef struct tree_desc_s {
-00069     ct_data *dyn_tree;           /* the dynamic tree */
-00070     int     max_code;            /* largest code with non zero frequency */
-00071     static_tree_desc *stat_desc; /* the corresponding static tree */
-00072 } FAR tree_desc;
-00073 
-00074 typedef ush Pos;
-00075 typedef Pos FAR Posf;
-00076 typedef unsigned IPos;
-00077 
-00078 /* A Pos is an index in the character window. We use short instead of int to
-00079  * save space in the various tables. IPos is used only for parameter passing.
-00080  */
-00081 
-00082 typedef struct internal_state {
-00083     z_streamp strm;      /* pointer back to this zlib stream */
-00084     int   status;        /* as the name implies */
-00085     Bytef *pending_buf;  /* output still pending */
-00086     ulg   pending_buf_size; /* size of pending_buf */
-00087     Bytef *pending_out;  /* next pending byte to output to the stream */
-00088     int   pending;       /* nb of bytes in the pending buffer */
-00089     int   noheader;      /* suppress zlib header and adler32 */
-00090     Byte  data_type;     /* UNKNOWN, BINARY or ASCII */
-00091     Byte  method;        /* STORED (for zip only) or DEFLATED */
-00092     int   last_flush;    /* value of flush param for previous deflate call */
-00093 
-00094                 /* used by deflate.c: */
-00095 
-00096     uInt  w_size;        /* LZ77 window size (32K by default) */
-00097     uInt  w_bits;        /* log2(w_size)  (8..16) */
-00098     uInt  w_mask;        /* w_size - 1 */
-00099 
-00100     Bytef *window;
-00101     /* Sliding window. Input bytes are read into the second half of the window,
-00102      * and move to the first half later to keep a dictionary of at least wSize
-00103      * bytes. With this organization, matches are limited to a distance of
-00104      * wSize-MAX_MATCH bytes, but this ensures that IO is always
-00105      * performed with a length multiple of the block size. Also, it limits
-00106      * the window size to 64K, which is quite useful on MSDOS.
-00107      * To do: use the user input buffer as sliding window.
-00108      */
-00109 
-00110     ulg window_size;
-00111     /* Actual size of window: 2*wSize, except when the user input buffer
-00112      * is directly used as sliding window.
-00113      */
-00114 
-00115     Posf *prev;
-00116     /* Link to older string with same hash index. To limit the size of this
-00117      * array to 64K, this link is maintained only for the last 32K strings.
-00118      * An index in this array is thus a window index modulo 32K.
-00119      */
-00120 
-00121     Posf *head; /* Heads of the hash chains or NIL. */
-00122 
-00123     uInt  ins_h;          /* hash index of string to be inserted */
-00124     uInt  hash_size;      /* number of elements in hash table */
-00125     uInt  hash_bits;      /* log2(hash_size) */
-00126     uInt  hash_mask;      /* hash_size-1 */
-00127 
-00128     uInt  hash_shift;
-00129     /* Number of bits by which ins_h must be shifted at each input
-00130      * step. It must be such that after MIN_MATCH steps, the oldest
-00131      * byte no longer takes part in the hash key, that is:
-00132      *   hash_shift * MIN_MATCH >= hash_bits
-00133      */
-00134 
-00135     long block_start;
-00136     /* Window position at the beginning of the current output block. Gets
-00137      * negative when the window is moved backwards.
-00138      */
-00139 
-00140     uInt match_length;           /* length of best match */
-00141     IPos prev_match;             /* previous match */
-00142     int match_available;         /* set if previous match exists */
-00143     uInt strstart;               /* start of string to insert */
-00144     uInt match_start;            /* start of matching string */
-00145     uInt lookahead;              /* number of valid bytes ahead in window */
-00146 
-00147     uInt prev_length;
-00148     /* Length of the best match at previous step. Matches not greater than this
-00149      * are discarded. This is used in the lazy match evaluation.
-00150      */
-00151 
-00152     uInt max_chain_length;
-00153     /* To speed up deflation, hash chains are never searched beyond this
-00154      * length.  A higher limit improves compression ratio but degrades the
-00155      * speed.
-00156      */
-00157 
-00158     uInt max_lazy_match;
-00159     /* Attempt to find a better match only when the current match is strictly
-00160      * smaller than this value. This mechanism is used only for compression
-00161      * levels >= 4.
-00162      */
-00163 #   define max_insert_length  max_lazy_match
-00164     /* Insert new strings in the hash table only if the match length is not
-00165      * greater than this length. This saves time but degrades compression.
-00166      * max_insert_length is used only for compression levels <= 3.
-00167      */
-00168 
-00169     int level;    /* compression level (1..9) */
-00170     int strategy; /* favor or force Huffman coding*/
-00171 
-00172     uInt good_match;
-00173     /* Use a faster search when the previous match is longer than this */
-00174 
-00175     int nice_match; /* Stop searching when current match exceeds this */
-00176 
-00177                 /* used by trees.c: */
-00178     /* Didn't use ct_data typedef below to supress compiler warning */
-00179     struct ct_data_s dyn_ltree[HEAP_SIZE];   /* literal and length tree */
-00180     struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
-00181     struct ct_data_s bl_tree[2*BL_CODES+1];  /* Huffman tree for bit lengths */
-00182 
-00183     struct tree_desc_s l_desc;               /* desc. for literal tree */
-00184     struct tree_desc_s d_desc;               /* desc. for distance tree */
-00185     struct tree_desc_s bl_desc;              /* desc. for bit length tree */
-00186 
-00187     ush bl_count[MAX_BITS+1];
-00188     /* number of codes at each bit length for an optimal tree */
-00189 
-00190     int heap[2*L_CODES+1];      /* heap used to build the Huffman trees */
-00191     int heap_len;               /* number of elements in the heap */
-00192     int heap_max;               /* element of largest frequency */
-00193     /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.
-00194      * The same heap array is used to build all trees.
-00195      */
-00196 
-00197     uch depth[2*L_CODES+1];
-00198     /* Depth of each subtree used as tie breaker for trees of equal frequency
-00199      */
-00200 
-00201     uchf *l_buf;          /* buffer for literals or lengths */
-00202 
-00203     uInt  lit_bufsize;
-00204     /* Size of match buffer for literals/lengths.  There are 4 reasons for
-00205      * limiting lit_bufsize to 64K:
-00206      *   - frequencies can be kept in 16 bit counters
-00207      *   - if compression is not successful for the first block, all input
-00208      *     data is still in the window so we can still emit a stored block even
-00209      *     when input comes from standard input.  (This can also be done for
-00210      *     all blocks if lit_bufsize is not greater than 32K.)
-00211      *   - if compression is not successful for a file smaller than 64K, we can
-00212      *     even emit a stored file instead of a stored block (saving 5 bytes).
-00213      *     This is applicable only for zip (not gzip or zlib).
-00214      *   - creating new Huffman trees less frequently may not provide fast
-00215      *     adaptation to changes in the input data statistics. (Take for
-00216      *     example a binary file with poorly compressible code followed by
-00217      *     a highly compressible string table.) Smaller buffer sizes give
-00218      *     fast adaptation but have of course the overhead of transmitting
-00219      *     trees more frequently.
-00220      *   - I can't count above 4
-00221      */
-00222 
-00223     uInt last_lit;      /* running index in l_buf */
-00224 
-00225     ushf *d_buf;
-00226     /* Buffer for distances. To simplify the code, d_buf and l_buf have
-00227      * the same number of elements. To use different lengths, an extra flag
-00228      * array would be necessary.
-00229      */
-00230 
-00231     ulg opt_len;        /* bit length of current block with optimal trees */
-00232     ulg static_len;     /* bit length of current block with static trees */
-00233     uInt matches;       /* number of string matches in current block */
-00234     int last_eob_len;   /* bit length of EOB code for last block */
-00235 
-00236 #ifdef DEBUG
-00237     ulg compressed_len; /* total bit length of compressed file mod 2^32 */
-00238     ulg bits_sent;      /* bit length of compressed data sent mod 2^32 */
-00239 #endif
-00240 
-00241     ush bi_buf;
-00242     /* Output buffer. bits are inserted starting at the bottom (least
-00243      * significant bits).
-00244      */
-00245     int bi_valid;
-00246     /* Number of valid bits in bi_buf.  All bits above the last valid bit
-00247      * are always zero.
-00248      */
-00249 
-00250 } FAR deflate_state;
-00251 
-00252 /* Output a byte on the stream.
-00253  * IN assertion: there is enough room in pending_buf.
-00254  */
-00255 #define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
-00256 
-00257 
-00258 #define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
-00259 /* Minimum amount of lookahead, except at the end of the input file.
-00260  * See deflate.c for comments about the MIN_MATCH+1.
-00261  */
-00262 
-00263 #define MAX_DIST(s)  ((s)->w_size-MIN_LOOKAHEAD)
-00264 /* In order to simplify the code, particularly on 16 bit machines, match
-00265  * distances are limited to MAX_DIST instead of WSIZE.
-00266  */
-00267 
-00268         /* in trees.c */
-00269 void _tr_init         OF((deflate_state *s));
-00270 int  _tr_tally        OF((deflate_state *s, unsigned dist, unsigned lc));
-00271 void _tr_flush_block  OF((deflate_state *s, charf *buf, ulg stored_len,
-00272                           int eof));
-00273 void _tr_align        OF((deflate_state *s));
-00274 void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
-00275                           int eof));
-00276 
-00277 #define d_code(dist) \
-00278    ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
-00279 /* Mapping from a distance to a distance code. dist is the distance - 1 and
-00280  * must not have side effects. _dist_code[256] and _dist_code[257] are never
-00281  * used.
-00282  */
-00283 
-00284 #ifndef DEBUG
-00285 /* Inline versions of _tr_tally for speed: */
-00286 
-00287 #if defined(GEN_TREES_H) || !defined(STDC)
-00288   extern uch _length_code[];
-00289   extern uch _dist_code[];
-00290 #else
-00291   extern const uch _length_code[];
-00292   extern const uch _dist_code[];
-00293 #endif
-00294 
-00295 # define _tr_tally_lit(s, c, flush) \
-00296   { uch cc = (c); \
-00297     s->d_buf[s->last_lit] = 0; \
-00298     s->l_buf[s->last_lit++] = cc; \
-00299     s->dyn_ltree[cc].Freq++; \
-00300     flush = (s->last_lit == s->lit_bufsize-1); \
-00301    }
-00302 # define _tr_tally_dist(s, distance, length, flush) \
-00303   { uch len = (length); \
-00304     ush dist = (distance); \
-00305     s->d_buf[s->last_lit] = dist; \
-00306     s->l_buf[s->last_lit++] = len; \
-00307     dist--; \
-00308     s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
-00309     s->dyn_dtree[d_code(dist)].Freq++; \
-00310     flush = (s->last_lit == s->lit_bufsize-1); \
-00311   }
-00312 #else
-00313 # define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
-00314 # define _tr_tally_dist(s, distance, length, flush) \
-00315               flush = _tr_tally(s, distance, length) 
-00316 #endif
-00317 
-00318 #endif
-

Generated on Thu Jun 20 22:12:58 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/defs_8h-source.html b/doc/api-documentation/html/defs_8h-source.html deleted file mode 100644 index 5cd9a9b..0000000 --- a/doc/api-documentation/html/defs_8h-source.html +++ /dev/null @@ -1,88 +0,0 @@ - - -defs.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

defs.h

00001 // ----------------------------------------------------------------------------
-00002 // Making or using sword as a Windows DLL
-00003 // ----------------------------------------------------------------------------
-00004 
-00005 #if defined(__SWMSW__)
-00006 
-00007 // _declspec works in BC++ 5 and later, as well as VC++
-00008 #if defined(_MSC_VER)
-00009 
-00010 #  ifdef SWMAKINGDLL
-00011 #    define SWDLLEXPORT _declspec( dllexport )
-00012 #    define SWDLLEXPORT_DATA(type) _declspec( dllexport ) type
-00013 #    define SWDLLEXPORT_CTORFN
-00014 #  elif defined(SWUSINGDLL)
-00015 #    define SWDLLEXPORT _declspec( dllimport )
-00016 #    define SWDLLEXPORT_DATA(type) _declspec( dllimport ) type
-00017 #    define SWDLLEXPORT_CTORFN
-00018 #  else
-00019 #    define SWDLLEXPORT
-00020 #    define SWDLLEXPORT_DATA(type) type
-00021 #    define SWDLLEXPORT_CTORFN
-00022 #  endif
-00023 
-00024 #elif defined(__SWPM__)
-00025 
-00026 #  ifdef SWMAKINGDLL
-00027 #    define SWDLLEXPORT _Export
-00028 #    define SWDLLEXPORT_DATA(type) _Export type
-00029 #    define SWDLLEXPORT_CTORFN
-00030 #  elif defined(SWUSINGDLL)
-00031 #    define SWDLLEXPORT _Export
-00032 #    define SWDLLEXPORT_DATA(type) _Export type
-00033 #    define SWDLLEXPORT_CTORFN
-00034 #  else
-00035 #    define SWDLLEXPORT
-00036 #    define SWDLLEXPORT_DATA(type) type
-00037 #    define SWDLLEXPORT_CTORFN
-00038 #  endif
-00039 
-00040 #elif defined(__GNUWIN32__) || defined(__BORLANDC__)
-00041 
-00042 #  ifdef SWMAKINGDLL
-00043 #    define SWDLLEXPORT __declspec( dllexport )
-00044 #    define SWDLLEXPORT_DATA(type) __declspec( dllexport ) type
-00045 #    define SWDLLEXPORT_CTORFN
-00046 #  elif defined(SWUSINGDLL)
-00047 #    define SWDLLEXPORT __declspec( dllimport )
-00048 #    define SWDLLEXPORT_DATA(type) __declspec( dllimport ) type
-00049 #    define SWDLLEXPORT_CTORFN
-00050 #  else
-00051 #    define SWDLLEXPORT
-00052 #    define SWDLLEXPORT_DATA(type) type
-00053 #    define SWDLLEXPORT_CTORFN
-00054 #  endif
-00055 
-00056 
-00057 #else
-00058 #  define SWDLLEXPORT
-00059 #  define SWDLLEXPORT_DATA(type) type
-00060 #  define SWDLLEXPORT_CTORFN
-00061 #endif
-00062 
-00063 #else // !Windows
-00064 #  define SWDLLEXPORT
-00065 #  define SWDLLEXPORT_DATA(type) type
-00066 #  define SWDLLEXPORT_CTORFN
-00067 #endif // Win/!Win
-00068 
-00069 // For ostream, istream ofstream
-00070 #if defined(__BORLANDC__) && defined( _RTLDLL )
-00071 #  define SWDLLIMPORT __import
-00072 #else
-00073 #  define SWDLLIMPORT
-00074 #endif
-

Generated on Thu Jun 20 22:12:58 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/dirent_8cpp-source.html b/doc/api-documentation/html/dirent_8cpp-source.html deleted file mode 100644 index 415026e..0000000 --- a/doc/api-documentation/html/dirent_8cpp-source.html +++ /dev/null @@ -1,145 +0,0 @@ - - -dirent.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

dirent.cpp

00001 /*
-00002 
-00003     Implementation of POSIX directory browsing functions and types for Win32.
-00004 
-00005     Kevlin Henney (mailto:kevlin@acm.org), March 1997.
-00006 
-00007     Copyright Kevlin Henney, 1997. All rights reserved.
-00008 
-00009     Permission to use, copy, modify, and distribute this software and its
-00010     documentation for any purpose is hereby granted without fee, provided
-00011     that this copyright and permissions notice appear in all copies and
-00012     derivatives, and that no charge may be made for the software and its
-00013     documentation except to cover cost of distribution.
-00014     
-00015     This software is supplied "as is" without express or implied warranty.
-00016 
-00017     But that said, if there are any problems please get in touch.
-00018 
-00019 */
-00020 
-00021 #include <dirent.h>
-00022 #include <errno.h>
-00023 #include <io.h>
-00024 #include <stdlib.h>
-00025 #include <string.h>
-00026 
-00027 struct DIR
-00028 {
-00029     long                handle; /* -1 for failed rewind */
-00030     struct _finddata_t  info;
-00031     struct dirent       result; /* d_name null iff first time */
-00032     char                *name;  /* NTBS */
-00033 };
-00034 
-00035 DIR *opendir(const char *name)
-00036 {
-00037     DIR *dir = 0;
-00038 
-00039     if(name && name[0])
-00040     {
-00041         size_t base_length = strlen(name);
-00042         const char *all = /* the root directory is a special case... */
-00043             strchr("/\\", name[base_length - 1]) ? "*" : "/*";
-00044 
-00045         if((dir = (DIR *) malloc(sizeof *dir)) != 0 &&
-00046            (dir->name = (char *) malloc(base_length + strlen(all) + 1)) != 0)
-00047         {
-00048             strcat(strcpy(dir->name, name), all);
-00049 
-00050             if((dir->handle = _findfirst(dir->name, &dir->info)) != -1)
-00051             {
-00052                 dir->result.d_name = 0;
-00053             }
-00054             else /* rollback */
-00055             {
-00056                 free(dir->name);
-00057                 free(dir);
-00058                 dir = 0;
-00059             }
-00060         }
-00061         else /* rollback */
-00062         {
-00063             free(dir);
-00064             dir   = 0;
-00065             errno = ENOMEM;
-00066         }
-00067     }
-00068     else
-00069     {
-00070         errno = EINVAL;
-00071     }
-00072 
-00073     return dir;
-00074 }
-00075 
-00076 int closedir(DIR *dir)
-00077 {
-00078     int result = -1;
-00079 
-00080     if(dir)
-00081     {
-00082         if(dir->handle != -1)
-00083         {
-00084             result = _findclose(dir->handle);
-00085         }
-00086 
-00087         free(dir->name);
-00088         free(dir);
-00089     }
-00090 
-00091     if(result == -1) /* map all errors to EBADF */
-00092     {
-00093         errno = EBADF;
-00094     }
-00095 
-00096     return result;
-00097 }
-00098 
-00099 struct dirent *readdir(DIR *dir)
-00100 {
-00101     struct dirent *result = 0;
-00102 
-00103     if(dir && dir->handle != -1)
-00104     {
-00105         if(!dir->result.d_name || _findnext(dir->handle, &dir->info) != -1)
-00106         {
-00107             result         = &dir->result;
-00108             result->d_name = dir->info.name;
-00109         }
-00110     }
-00111     else
-00112     {
-00113         errno = EBADF;
-00114     }
-00115 
-00116     return result;
-00117 }
-00118 
-00119 void rewinddir(DIR *dir)
-00120 {
-00121     if(dir && dir->handle != -1)
-00122     {
-00123         _findclose(dir->handle);
-00124         dir->handle = _findfirst(dir->name, &dir->info);
-00125         dir->result.d_name = 0;
-00126     }
-00127     else
-00128     {
-00129         errno = EBADF;
-00130     }
-00131 }
-

Generated on Thu Jun 20 22:12:58 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/dirent_8h-source.html b/doc/api-documentation/html/dirent_8h-source.html deleted file mode 100644 index d65109d..0000000 --- a/doc/api-documentation/html/dirent_8h-source.html +++ /dev/null @@ -1,46 +0,0 @@ - - -dirent.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

dirent.h

00001 /*
-00002 
-00003     Declaration of POSIX directory browsing functions and types for Win32.
-00004 
-00005     Kevlin Henney (mailto:kevlin@acm.org), March 1997.
-00006 
-00007     Copyright Kevlin Henney, 1997. All rights reserved.
-00008 
-00009     Permission to use, copy, modify, and distribute this software and its
-00010     documentation for any purpose is hereby granted without fee, provided
-00011     that this copyright and permissions notice appear in all copies and
-00012     derivatives, and that no charge may be made for the software and its
-00013     documentation except to cover cost of distribution.
-00014     
-00015 */
-00016 
-00017 #ifndef DIRENT_INCLUDED
-00018 #define DIRENT_INCLUDED
-00019 
-00020 typedef struct DIR DIR;
-00021 
-00022 struct dirent
-00023 {
-00024     char *d_name;
-00025 };
-00026 
-00027 DIR           *opendir(const char *);
-00028 int           closedir(DIR *);
-00029 struct dirent *readdir(DIR *);
-00030 void          rewinddir(DIR *);
-00031 
-00032 #endif
-

Generated on Thu Jun 20 22:12:58 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/doxygen.css b/doc/api-documentation/html/doxygen.css deleted file mode 100644 index 841f709..0000000 --- a/doc/api-documentation/html/doxygen.css +++ /dev/null @@ -1,49 +0,0 @@ -H1 { text-align: center; } -CAPTION { font-weight: bold } -A.qindex {} -A.qindexRef {} -A.el { text-decoration: none; font-weight: bold } -A.elRef { font-weight: bold } -A.code { text-decoration: none; font-weight: normal; color: #4444ee } -A.codeRef { font-weight: normal; color: #4444ee } -A:hover { text-decoration: none; background-color: #f2f2ff } -DL.el { margin-left: -1cm } -DIV.fragment { width: 100%; border: none; background-color: #eeeeee } -DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } -TD.md { background-color: #f2f2ff; font-weight: bold; } -TD.mdname1 { background-color: #f2f2ff; font-weight: bold; color: #602020; } -TD.mdname { background-color: #f2f2ff; font-weight: bold; color: #602020; width: 600px; } -DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold } -DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller } -BODY { background: white } -TD.indexkey { - background-color: #eeeeff; - font-weight: bold; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px -} -TD.indexvalue { - background-color: #eeeeff; - font-style: italic; - padding-right : 10px; - padding-top : 2px; - padding-left : 10px; - padding-bottom : 2px; - margin-left : 0px; - margin-right : 0px; - margin-top : 2px; - margin-bottom : 2px -} -FONT.keyword { color: #008000 } -FONT.keywordtype { color: #604020 } -FONT.keywordflow { color: #e08000 } -FONT.comment { color: #800000 } -FONT.preprocessor { color: #806020 } -FONT.stringliteral { color: #002080 } -FONT.charliteral { color: #008080 } diff --git a/doc/api-documentation/html/doxygen.png b/doc/api-documentation/html/doxygen.png deleted file mode 100644 index 96ae72c..0000000 Binary files a/doc/api-documentation/html/doxygen.png and /dev/null differ diff --git a/doc/api-documentation/html/echomod_8cpp-source.html b/doc/api-documentation/html/echomod_8cpp-source.html deleted file mode 100644 index b844308..0000000 --- a/doc/api-documentation/html/echomod_8cpp-source.html +++ /dev/null @@ -1,35 +0,0 @@ - - -echomod.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

echomod.cpp

00001 /******************************************************************************
-00002  *  echomod.cpp - code for class 'echomod'- a dummy test text module that just
-00003  *                echos back the key
-00004  */
-00005 
-00006 #include <echomod.h>
-00007 
-00008 
-00009 EchoMod::EchoMod() : SWText("echomod", "Echos back key")
-00010 {
-00011 }
-00012 
-00013 
-00014 EchoMod::~EchoMod() {
-00015 }
-00016 
-00017 
-00018 EchoMod::operator const char*()
-00019 {
-00020         return *key;
-00021 }
-

Generated on Thu Jun 20 22:12:58 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/echomod_8h-source.html b/doc/api-documentation/html/echomod_8h-source.html deleted file mode 100644 index 25c1475..0000000 --- a/doc/api-documentation/html/echomod_8h-source.html +++ /dev/null @@ -1,52 +0,0 @@ - - -echomod.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

echomod.h

00001 /******************************************************************************
-00002  *  echomod.h  - code for class 'EchoMod' - a test module that just echo back
-00003  *               text of key.
-00004  *
-00005  * $Id: echomod_8h-source.html,v 1.7 2002/06/20 20:23:08 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #ifndef ECHOMOD_H
-00024 #define ECHOMOD_H
-00025 
-00026 #include <swtext.h>
-00027 #include <versekey.h>
-00028 
-00029 class EchoMod:public SWText
-00030 {
-00031 public:
-00032   EchoMod ();
-00033   virtual ~ EchoMod ();
-00034   virtual operator const char *();
-00035 };
-00036 
-00037 
-00038 #endif
-

Generated on Thu Jun 20 22:12:58 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/encfiltmgr_8cpp-source.html b/doc/api-documentation/html/encfiltmgr_8cpp-source.html deleted file mode 100644 index caa1466..0000000 --- a/doc/api-documentation/html/encfiltmgr_8cpp-source.html +++ /dev/null @@ -1,162 +0,0 @@ - - -encfiltmgr.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

encfiltmgr.cpp

00001 /******************************************************************************
-00002  *  swencodingmgr.cpp   - implementaion of class EncodingFilterMgr, subclass of
-00003  *                        used to transcode all module text to a requested
-00004  *                        encoding.
-00005  *
-00006  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00007  *      CrossWire Bible Society
-00008  *      P. O. Box 2528
-00009  *      Tempe, AZ  85280-2528
-00010  *
-00011  * This program is free software; you can redistribute it and/or modify it
-00012  * under the terms of the GNU General Public License as published by the
-00013  * Free Software Foundation version 2.
-00014  *
-00015  * This program is distributed in the hope that it will be useful, but
-00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00018  * General Public License for more details.
-00019  *
-00020  */
-00021 
-00022 #include <encfiltmgr.h>
-00023 
-00024 #include <scsuutf8.h>
-00025 #include <latin1utf8.h>
-00026 
-00027 #include <unicodertf.h>
-00028 #include <utf8latin1.h>
-00029 #include <utf8utf16.h>
-00030 #include <utf8html.h>
-00031 
-00032 #include <swmgr.h>
-00033 
-00034 /******************************************************************************
-00035  * EncodingFilterMgr Constructor - initializes instance of EncodingFilterMgr
-00036  *
-00037  * ENT:
-00038  *      enc - Encoding format to emit
-00039  */
-00040 
-00041 EncodingFilterMgr::EncodingFilterMgr (char enc)
-00042                    : SWFilterMgr() {
-00043 
-00044         scsuutf8 = new SCSUUTF8();
-00045         latin1utf8 = new Latin1UTF8();
-00046 
-00047         encoding = enc;
-00048 
-00049         switch (encoding) {
-00050         case ENC_LATIN1:
-00051                 targetenc = new UTF8Latin1();
-00052                 break;
-00053         case ENC_UTF16:
-00054                 targetenc = new UTF8UTF16();
-00055                 break;
-00056         case ENC_RTF:
-00057                 targetenc = new UnicodeRTF();
-00058                 break;
-00059         case ENC_HTML:
-00060                 targetenc = new UTF8HTML();
-00061                 break;
-00062         default: // i.e. case ENC_UTF8
-00063                 targetenc = NULL;
-00064         }
-00065 }
-00066 
-00067 /******************************************************************************
-00068  * EncodingFilterMgr Destructor - Cleans up instance of EncodingFilterMgr
-00069  */
-00070 EncodingFilterMgr::~EncodingFilterMgr() {
-00071         if (scsuutf8)
-00072                 delete scsuutf8;
-00073         if (latin1utf8)
-00074                 delete latin1utf8;
-00075         if (targetenc)
-00076                 delete targetenc;
-00077 }
-00078 
-00079 void EncodingFilterMgr::AddRawFilters(SWModule *module, ConfigEntMap &section) {
-00080 
-00081         ConfigEntMap::iterator entry;
-00082 
-00083         string encoding = ((entry = section.find("Encoding")) != section.end()) ? (*entry).second : (string)"";
-00084         if (encoding.empty() || !stricmp(encoding.c_str(), "Latin-1")) {
-00085                 module->AddRawFilter(latin1utf8);
-00086         }
-00087         else if (!stricmp(encoding.c_str(), "SCSU")) {
-00088                 module->AddRawFilter(scsuutf8);
-00089         }
-00090 }
-00091 
-00092 void EncodingFilterMgr::AddEncodingFilters(SWModule *module, ConfigEntMap &section) {
-00093         if (targetenc)
-00094                 module->AddEncodingFilter(targetenc);
-00095 }
-00096 
-00097 /******************************************************************************
-00098  * EncodingFilterMgr::Encoding  - sets/gets encoding
-00099  *
-00100  * ENT: enc     - new encoding or 0 to simply get the current encoding
-00101  *
-00102  * RET: encoding
-00103  */
-00104 char EncodingFilterMgr::Encoding(char enc) {
-00105         if (enc && enc != encoding) {
-00106                 encoding = enc;
-00107                 SWFilter * oldfilter = targetenc;
-00108                 
-00109                 switch (encoding) {
-00110                 case ENC_LATIN1:
-00111                         targetenc = new UTF8Latin1();
-00112                         break;
-00113                 case ENC_UTF16:
-00114                         targetenc = new UTF8UTF16();
-00115                         break;
-00116                 case ENC_RTF:
-00117                         targetenc = new UnicodeRTF();
-00118                         break;
-00119                 case ENC_HTML:
-00120                         targetenc = new UTF8HTML();
-00121                         break;
-00122                 default: // i.e. case ENC_UTF8
-00123                         targetenc = NULL;
-00124                 }
-00125 
-00126                 ModMap::const_iterator module;
-00127 
-00128                 if (oldfilter != targetenc) {
-00129                         if (oldfilter) {
-00130                                 if (!targetenc) {
-00131                                         for (module = getParentMgr()->Modules.begin(); module != getParentMgr()->Modules.end(); module++)
-00132                                                 module->second->RemoveRenderFilter(oldfilter);
-00133                                 }
-00134                                 else {
-00135                                         for (module = getParentMgr()->Modules.begin(); module != getParentMgr()->Modules.end(); module++)
-00136                                                 module->second->ReplaceRenderFilter(oldfilter, targetenc);
-00137                                 }
-00138                                 delete oldfilter;
-00139                         }
-00140                         else if (targetenc) {
-00141                                 for (module = getParentMgr()->Modules.begin(); module != getParentMgr()->Modules.end(); module++)
-00142                                         module->second->AddRenderFilter(targetenc);
-00143                         }
-00144                 }
-00145 
-00146         }
-00147         return encoding;
-00148 }
-

Generated on Thu Jun 20 22:12:58 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/encfiltmgr_8h-source.html b/doc/api-documentation/html/encfiltmgr_8h-source.html deleted file mode 100644 index 38e7ee3..0000000 --- a/doc/api-documentation/html/encfiltmgr_8h-source.html +++ /dev/null @@ -1,69 +0,0 @@ - - -encfiltmgr.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

encfiltmgr.h

00001 /******************************************************************************
-00002  *  swencodingmgr.h   - definition of class SWEncodingMgr, subclass of
-00003  *                        used to transcode all module text to a requested
-00004  *                        markup.
-00005  *
-00006  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00007  *      CrossWire Bible Society
-00008  *      P. O. Box 2528
-00009  *      Tempe, AZ  85280-2528
-00010  *
-00011  * This program is free software; you can redistribute it and/or modify it
-00012  * under the terms of the GNU General Public License as published by the
-00013  * Free Software Foundation version 2.
-00014  *
-00015  * This program is distributed in the hope that it will be useful, but
-00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00018  * General Public License for more details.
-00019  *
-00020  */
-00021 
-00022 #ifndef ENCFILTERMGR_H
-00023 #define ENCFILTERMGR_H
-00024 
-00025 #include <swfiltermgr.h>
-00026 
-00027 
-00033 class SWDLLEXPORT EncodingFilterMgr : public SWFilterMgr {
-00034 
-00035 protected:
-00036         SWFilter *latin1utf8;
-00037         SWFilter *scsuutf8;
-00038         SWFilter *targetenc;
-00039 
-00040 
-00041         /*
-00042          * current encoding value
-00043          */        
-00044         char encoding;
-00045 
-00046 public:
-00047 
-00048 
-00056         EncodingFilterMgr (char encoding = ENC_UTF8);
-00057 
-00061         ~EncodingFilterMgr();
-00062 
-00068         char Encoding(char enc);
-00069 
-00075         virtual void AddRawFilters(SWModule *module, ConfigEntMap &section);
-00076 
-00082         virtual void AddEncodingFilters(SWModule *module, ConfigEntMap &section);
-00083 };
-00084 
-00085 #endif
-

Generated on Thu Jun 20 22:12:58 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/entriesblk_8cpp-source.html b/doc/api-documentation/html/entriesblk_8cpp-source.html deleted file mode 100644 index 61cc452..0000000 --- a/doc/api-documentation/html/entriesblk_8cpp-source.html +++ /dev/null @@ -1,180 +0,0 @@ - - -entriesblk.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

entriesblk.cpp

00001 #include <entriesblk.h>
-00002 #include <stdlib.h>
-00003 #include <string.h>
-00004 
-00005 const int EntriesBlock::METAHEADERSIZE = 4;
-00006         // count(4);
-00007 const int EntriesBlock::METAENTRYSIZE = 8;
-00008         // offset(4); size(4);
-00009 
-00010 EntriesBlock::EntriesBlock(const char *iBlock, unsigned long size) {
-00011         block = (char *)calloc(1, size);
-00012         memcpy(block, iBlock, size);
-00013 }
-00014 
-00015 
-00016 EntriesBlock::EntriesBlock() {
-00017         block = (char *)calloc(1, sizeof(__u32));
-00018 }
-00019 
-00020 
-00021 EntriesBlock::~EntriesBlock() {
-00022         free(block);
-00023 }
-00024 
-00025 
-00026 void EntriesBlock::setCount(int count) {
-00027         __u32 rawCount = archtosword32(count);
-00028         memcpy(block, &rawCount, sizeof(__u32));
-00029 }
-00030 
-00031 
-00032 int EntriesBlock::getCount() {
-00033         __u32 count = 0;
-00034         memcpy(&count, block, sizeof(__u32));
-00035         count = swordtoarch32(count);
-00036         return count;
-00037 }
-00038 
-00039 
-00040 void EntriesBlock::getMetaEntry(int index, unsigned long *offset, unsigned long *size) {
-00041         __u32 rawOffset = 0;
-00042         __u32 rawSize = 0;
-00043         *offset = 0;
-00044         *size = 0;
-00045         if (index >= getCount())        // assert index < count
-00046                 return;
-00047 
-00048         // first 4 bytes is count, each 6 bytes after is each meta entry
-00049         memcpy(&rawOffset, block + METAHEADERSIZE + (index * METAENTRYSIZE), sizeof(rawOffset));
-00050         memcpy(&rawSize, block + METAHEADERSIZE + (index * METAENTRYSIZE) + sizeof(rawOffset), sizeof(rawSize));
-00051 
-00052         *offset = (unsigned long)swordtoarch32(rawOffset);
-00053         *size   = (unsigned long)swordtoarch32(rawSize);
-00054 }
-00055 
-00056 
-00057 void EntriesBlock::setMetaEntry(int index, unsigned long offset, unsigned long size) {
-00058         __u32 rawOffset = archtosword32(offset);
-00059         __u32 rawSize = archtosword32(size);
-00060 
-00061         if (index >= getCount())        // assert index < count
-00062                 return;
-00063 
-00064         // first 4 bytes is count, each 6 bytes after is each meta entry
-00065         memcpy(block + METAHEADERSIZE + (index * METAENTRYSIZE), &rawOffset, sizeof(rawOffset));
-00066         memcpy(block + METAHEADERSIZE + (index * METAENTRYSIZE) + sizeof(rawOffset), &rawSize, sizeof(rawSize));
-00067 }
-00068 
-00069 
-00070 const char *EntriesBlock::getRawData(unsigned long *retSize) {
-00071         unsigned long max = 4;
-00072         int loop;
-00073         unsigned long offset;
-00074         unsigned long size;
-00075         for (loop = 0; loop < getCount(); loop++) {
-00076                 getMetaEntry(loop, &offset, &size);
-00077                 max = ((offset + size) > max) ? (offset + size) : max;
-00078         }
-00079         *retSize = max;
-00080         return block;
-00081 }
-00082 
-00083 
-00084 int EntriesBlock::addEntry(const char *entry) {
-00085         unsigned long dataSize;
-00086         getRawData(&dataSize);
-00087         unsigned long  len = strlen(entry);
-00088         unsigned long offset;
-00089         unsigned long size;
-00090         int count = getCount();
-00091         unsigned long dataStart = METAHEADERSIZE + (count * METAENTRYSIZE);
-00092         // new meta entry + new data size + 1 because null 
-00093         block = (char *)realloc(block, dataSize + METAENTRYSIZE + len + 1);
-00094         // shift right to make room for new meta entry
-00095         memmove(block + dataStart + METAENTRYSIZE, block + dataStart, dataSize - dataStart);
-00096 
-00097         for (int loop = 0; loop < count; loop++) {
-00098                 getMetaEntry(loop, &offset, &size);
-00099                 if (offset) {   // if not a deleted entry
-00100                         offset += METAENTRYSIZE;
-00101                         setMetaEntry(loop, offset, size);
-00102                 }
-00103         }
-00104 
-00105         offset = dataSize;      // original dataSize before realloc
-00106         size = len + 1;
-00107         // add our text to the end
-00108         memcpy(block + offset + METAENTRYSIZE, entry, size);
-00109         // increment count
-00110         setCount(count + 1);
-00111         // add our meta entry
-00112         setMetaEntry(count, offset + METAENTRYSIZE, size);
-00113         // return index of our new entry
-00114         return count;
-00115 }
-00116 
-00117 
-00118 const char *EntriesBlock::getEntry(int entryIndex) {
-00119         unsigned long offset;
-00120         unsigned long size;
-00121         static char *empty = "";
-00122 
-00123         getMetaEntry(entryIndex, &offset, &size);
-00124         return (offset) ? block+offset : empty;
-00125 }
-00126 
-00127 
-00128 unsigned long EntriesBlock::getEntrySize(int entryIndex) {
-00129         unsigned long offset;
-00130         unsigned long size;
-00131 
-00132         getMetaEntry(entryIndex, &offset, &size);
-00133         return (offset) ? size : 0;
-00134 }
-00135 
-00136 
-00137 void EntriesBlock::removeEntry(int entryIndex) {
-00138         unsigned long offset;
-00139         unsigned long size, size2;
-00140         unsigned long dataSize;
-00141         getRawData(&dataSize);
-00142         getMetaEntry(entryIndex, &offset, &size);
-00143         unsigned long len = size - 1;
-00144         int count = getCount();
-00145         unsigned long dataStart = METAHEADERSIZE + (count * METAENTRYSIZE);
-00146 
-00147         if (!offset)    // already deleted
-00148                 return;
-00149 
-00150         // shift left to retrieve space used for old entry
-00151         memmove(block + offset, block + offset + size, dataSize - (offset + size));
-00152 
-00153         // fix offset for all entries after our entry that were shifted left
-00154         for (int loop = entryIndex + 1; loop < count; loop++) {
-00155                 getMetaEntry(loop, &offset, &size2);
-00156                 if (offset) {   // if not a deleted entry
-00157                         offset -= size;
-00158                         setMetaEntry(loop, offset, size2);
-00159                 }
-00160         }
-00161 
-00162         // zero out our meta entry
-00163         setMetaEntry(entryIndex, 0L, 0);
-00164 }
-00165 
-00166 
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/entriesblk_8h-source.html b/doc/api-documentation/html/entriesblk_8h-source.html deleted file mode 100644 index 59b0a5d..0000000 --- a/doc/api-documentation/html/entriesblk_8h-source.html +++ /dev/null @@ -1,44 +0,0 @@ - - -entriesblk.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

entriesblk.h

00001 #ifndef ENTRIESBLK_H
-00002 #define ENTRIESBLK_H
-00003 
-00004 #include <sysdata.h>
-00005 
-00006 class EntriesBlock {
-00007         static const int METAHEADERSIZE;
-00008         static const int METAENTRYSIZE;
-00009 
-00010 private:
-00011         char *block;
-00012         void setCount(int count);
-00013         void getMetaEntry(int index, unsigned long *offset, unsigned long *size);
-00014         void setMetaEntry(int index, unsigned long offset, unsigned long size);
-00015 
-00016 public:
-00017         EntriesBlock(const char *iBlock, unsigned long size);
-00018         EntriesBlock();
-00019         ~EntriesBlock();
-00020 
-00021         int getCount();
-00022         int addEntry(const char *entry);
-00023         const char *getEntry(int entryIndex);
-00024         unsigned long getEntrySize(int entryIndex);
-00025         void removeEntry(int entryIndex);
-00026         const char *getRawData(unsigned long *size);
-00027 };
-00028 
-00029 
-00030 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/femain_8cpp-source.html b/doc/api-documentation/html/femain_8cpp-source.html deleted file mode 100644 index d58a831..0000000 --- a/doc/api-documentation/html/femain_8cpp-source.html +++ /dev/null @@ -1,26 +0,0 @@ - - -femain.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

femain.cpp

00001 #include <femain.h>
-00002 
-00003 FEMain::FEMain() {
-00004 }
-00005 
-00006 FEMain::~FEMain() {
-00007         list <SWDisplay *>::iterator it;
-00008 
-00009         for (it = displays.begin(); it != displays.end(); it++)
-00010                 delete *it;
-00011 
-00012 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/femain_8h-source.html b/doc/api-documentation/html/femain_8h-source.html deleted file mode 100644 index ec1cadf..0000000 --- a/doc/api-documentation/html/femain_8h-source.html +++ /dev/null @@ -1,46 +0,0 @@ - - -femain.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

femain.h

00001 /*
-00002  *
-00003  * $Id: femain_8h-source.html,v 1.7 2002/06/20 20:23:08 mgruner Exp $
-00004  *
-00005  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00006  *      CrossWire Bible Society
-00007  *      P. O. Box 2528
-00008  *      Tempe, AZ  85280-2528
-00009  *
-00010  * This program is free software; you can redistribute it and/or modify it
-00011  * under the terms of the GNU General Public License as published by the
-00012  * Free Software Foundation version 2.
-00013  *
-00014  * This program is distributed in the hope that it will be useful, but
-00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00017  * General Public License for more details.
-00018  *
-00019  */
-00020 
-00021 #ifndef FEMAIN_H
-00022 #define FEMAIN_H
-00023 
-00024 class FEMain
-00025 {
-00026 public:
-00027   FEMain ();
-00028   virtual ~FEMain ();
-00029   list < SWDisplay * >displays; // so we can delete each display we create
-00030 };
-00031 
-00032 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/filemgr_8cpp-source.html b/doc/api-documentation/html/filemgr_8cpp-source.html deleted file mode 100644 index b807e94..0000000 --- a/doc/api-documentation/html/filemgr_8cpp-source.html +++ /dev/null @@ -1,278 +0,0 @@ - - -filemgr.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

filemgr.cpp

00001 /******************************************************************************
-00002  *  filemgr.cpp - implementation of class FileMgr used for pooling file
-00003  *                                      handles
-00004  *
-00005  * $Id: filemgr_8cpp-source.html,v 1.3 2002/06/20 20:23:08 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #include <filemgr.h>
-00024 #include <utilstr.h>
-00025 
-00026 #include <dirent.h>
-00027 #include <fcntl.h>
-00028 #include <sys/stat.h>
-00029 #include <sys/types.h>
-00030 #include <stdio.h>
-00031 #include <string.h>
-00032 #ifndef __GNUC__
-00033 #include <io.h>
-00034 #else
-00035 #include <unistd.h>
-00036 #endif
-00037 
-00038 // ---------------- statics -----------------
-00039 FileMgr FileMgr::systemFileMgr;
-00040 
-00041 // --------------- end statics --------------
-00042 
-00043 
-00044 FileDesc::FileDesc(FileMgr *parent, char *path, int mode, int perms, bool tryDowngrade) {
-00045         this->parent = parent;
-00046         this->path = 0;
-00047         stdstr(&this->path, path);
-00048         this->mode = mode;
-00049         this->perms = perms;
-00050         this->tryDowngrade = tryDowngrade;
-00051         offset = 0;
-00052         fd = -77;
-00053 }
-00054 
-00055 
-00056 FileDesc::~FileDesc() {
-00057         if (fd > 0)
-00058                 close(fd);
-00059                 
-00060         if (path)
-00061                 delete [] path;
-00062 }
-00063 
-00064 
-00065 int FileDesc::getFd() {
-00066         if (fd == -77)
-00067                 fd = parent->sysOpen(this);
-00068         return fd;
-00069 }
-00070 
-00071 
-00072 FileMgr::FileMgr(int maxFiles) {
-00073         this->maxFiles = maxFiles;              // must be at least 2
-00074         files = 0;
-00075 }
-00076 
-00077 
-00078 FileMgr::~FileMgr() {
-00079         FileDesc *tmp;
-00080         
-00081         while(files) {
-00082                 tmp = files->next;
-00083                 delete files;
-00084                 files = tmp;
-00085         }
-00086 }
-00087 
-00088 
-00089 FileDesc *FileMgr::open(char *path, int mode, bool tryDowngrade) {
-00090         return open(path, mode, S_IREAD | S_IWRITE, tryDowngrade);
-00091 }
-00092 
-00093 FileDesc *FileMgr::open(char *path, int mode, int perms, bool tryDowngrade) {
-00094         FileDesc **tmp, *tmp2;
-00095         
-00096         for (tmp = &files; *tmp; tmp = &((*tmp)->next)) {
-00097                 if ((*tmp)->fd < 0)             // insert as first non-system_open file
-00098                         break;
-00099         }
-00100 
-00101         tmp2 = new FileDesc(this, path, mode, perms, tryDowngrade);
-00102         tmp2->next = *tmp;
-00103         *tmp = tmp2;
-00104         
-00105         return tmp2;
-00106 }
-00107 
-00108 
-00109 void FileMgr::close(FileDesc *file) {
-00110         FileDesc **loop;
-00111         
-00112         for (loop = &files; *loop; loop = &((*loop)->next)) {
-00113                 if (*loop == file) {
-00114                         *loop = (*loop)->next;
-00115                         delete file;
-00116                         break;
-00117                 }
-00118         }
-00119 }
-00120 
-00121 
-00122 // to truncate a file at its current position
-00123 // leaving byte at current possition intact
-00124 // deleting everything afterward.
-00125 signed char FileMgr::trunc(FileDesc *file) {
-00126 
-00127         static const char *writeTest = "x";
-00128         long size = lseek(file->getFd(), 1, SEEK_CUR);
-00129         char nibble [ 32767 ];
-00130         bool writable = write(file->getFd(), writeTest, 1);
-00131         int bytes = 0;
-00132 
-00133         if (writable) {
-00134                 // get tmpfilename
-00135                 char *buf = new char [ strlen(file->path) + 10 ];
-00136                 int i;
-00137                 for (i = 0; i < 9999; i++) {
-00138                         sprintf(buf, "%stmp%.4d", file->path, i);
-00139                         if (!existsFile(buf))
-00140                                 break;
-00141                 }
-00142                 if (i == 9999)
-00143                         return -2;
-00144 
-00145                 int fd = ::open(buf, O_CREAT|O_RDWR, S_IREAD|S_IWRITE);
-00146                 if (fd < 0)
-00147                         return -3;
-00148         
-00149                 lseek(file->getFd(), 0, SEEK_SET);
-00150                 while (size > 0) {
-00151                         bytes = read(file->getFd(), nibble, 32767);
-00152                         write(fd, nibble, (bytes < size)?bytes:size);
-00153                         size -= bytes;
-00154                 }
-00155                 // zero out the file
-00156                 ::close(file->fd);
-00157                 file->fd = ::open(file->path, O_TRUNC, S_IREAD|S_IWRITE);
-00158                 ::close(file->fd);
-00159                 file->fd = -77; // force file open by filemgr
-00160                 // copy tmp file back (dumb, but must preserve file permissions)
-00161                 lseek(fd, 0, SEEK_SET);
-00162                 do {
-00163                         bytes = read(fd, nibble, 32767);
-00164                         write(file->getFd(), nibble, bytes);
-00165                 } while (bytes == 32767);
-00166                 
-00167                 ::close(fd);
-00168                 ::close(file->fd);
-00169                 unlink(buf);            // remove our tmp file
-00170                 file->fd = -77; // causes file to be swapped out forcing open on next call to getFd()
-00171         }
-00172         else { // put offset back and return failure
-00173                 lseek(file->getFd(), -1, SEEK_CUR);
-00174                 return -1;
-00175         }
-00176         return 0;
-00177 }
-00178 
-00179 
-00180 int FileMgr::sysOpen(FileDesc *file) {
-00181         FileDesc **loop;
-00182         int openCount = 1;              // because we are presently opening 1 file, and we need to be sure to close files to accomodate, if necessary
-00183         
-00184         for (loop = &files; *loop; loop = &((*loop)->next)) {
-00185 
-00186                 if ((*loop)->fd > 0) {
-00187                         if (++openCount > maxFiles) {
-00188                                 (*loop)->offset = lseek((*loop)->fd, 0, SEEK_CUR);
-00189                                 ::close((*loop)->fd);
-00190                                 (*loop)->fd = -77;
-00191                         }
-00192                 }
-00193 
-00194                 if (*loop == file) {
-00195                         if (*loop != files) {
-00196                                 *loop = (*loop)->next;
-00197                                 file->next = files;
-00198                                 files = file;
-00199                         }
-00200                         if ((!access(file->path, 04)) || ((file->mode & O_CREAT) == O_CREAT)) { // check for at least file exists / read access before we try to open
-00201                                 char tries = (((file->mode & O_RDWR) == O_RDWR) && (file->tryDowngrade)) ? 2 : 1;  // try read/write if possible
-00202                                 for (int i = 0; i < tries; i++) {
-00203                                         if (i > 0) {
-00204                                                 file->mode = (file->mode & ~O_RDWR);    // remove write access
-00205                                                 file->mode = (file->mode | O_RDONLY);// add read access
-00206                                         }
-00207                                         file->fd = ::open(file->path, file->mode, file->perms);
-00208 
-00209                                         if (file->fd >= 0)
-00210                                                 break;
-00211                                 }
-00212 
-00213                                 if (file->fd >= 0)
-00214                                         lseek(file->fd, file->offset, SEEK_SET);
-00215                         }
-00216                         else file->fd = -1;
-00217                         if (!*loop)
-00218                                 break;
-00219                 }
-00220         }
-00221         return file->fd;
-00222 }
-00223 
-00224 
-00225 signed char FileMgr::existsFile(const char *ipath, const char *ifileName)
-00226 {
-00227         int len = strlen(ipath) + ((ifileName)?strlen(ifileName):0) + 3;
-00228         char *ch;
-00229         char *path = new char [ len ];
-00230         strcpy(path, ipath);
-00231         
-00232         if ((path[strlen(path)-1] == '\\') || (path[strlen(path)-1] == '/'))
-00233                 path[strlen(path)-1] = 0;
-00234         
-00235         if (ifileName) {
-00236                 ch = path + strlen(path);
-00237                 sprintf(ch, "/%s", ifileName);
-00238         }
-00239         signed char retVal = !access(path, 04);
-00240         delete [] path;
-00241         return retVal;
-00242 }
-00243 
-00244 
-00245 signed char FileMgr::existsDir(const char *ipath, const char *idirName)
-00246 {
-00247         char *ch;
-00248         int len = strlen(ipath) + ((idirName)?strlen(idirName):0) + 1;
-00249         if (idirName)
-00250                 len +=  strlen(idirName);
-00251         char *path = new char [ len ];
-00252         strcpy(path, ipath);
-00253         
-00254         if ((path[strlen(path)-1] == '\\') || (path[strlen(path)-1] == '/'))
-00255                 path[strlen(path)-1] = 0;
-00256         
-00257         if (idirName) {
-00258                 ch = path + strlen(path);
-00259                 sprintf(ch, "/%s", idirName);
-00260         }
-00261         signed char retVal = !access(path, 04);
-00262      delete [] path;
-00263      return retVal;
-00264 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/filemgr_8h-source.html b/doc/api-documentation/html/filemgr_8h-source.html deleted file mode 100644 index e611129..0000000 --- a/doc/api-documentation/html/filemgr_8h-source.html +++ /dev/null @@ -1,96 +0,0 @@ - - -filemgr.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

filemgr.h

00001 /******************************************************************************
-00002  *  filemgr.h   - definition of class FileMgr used for pooling file handles
-00003  *
-00004  * $Id: filemgr_8h-source.html,v 1.7 2002/06/20 20:23:08 mgruner Exp $
-00005  *
-00006  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00007  *      CrossWire Bible Society
-00008  *      P. O. Box 2528
-00009  *      Tempe, AZ  85280-2528
-00010  *
-00011  * This program is free software; you can redistribute it and/or modify it
-00012  * under the terms of the GNU General Public License as published by the
-00013  * Free Software Foundation version 2.
-00014  *
-00015  * This program is distributed in the hope that it will be useful, but
-00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00018  * General Public License for more details.
-00019  *
-00020  */
-00021 
-00022 #ifndef FILEMGR_H
-00023 #define FILEMGR_H
-00024 
-00025 #include <sys/stat.h>
-00026 #include <fcntl.h>
-00027 
-00028 #include <defs.h>
-00029 
-00030 class SWDLLEXPORT FileMgr;
-00031 
-00032 class SWDLLEXPORT FileDesc
-00033 {
-00034 
-00035   friend class FileMgr;
-00036 
-00037   long offset;
-00038   int fd;                       // -77 closed;
-00039   FileMgr *parent;
-00040   FileDesc *next;
-00041 
-00042 public:
-00043    FileDesc (FileMgr * parent, char *path, int mode, int perms, bool tryDowngrade);
-00044    virtual ~FileDesc ();
-00045   int getFd ();
-00046   char *path;
-00047   int mode;
-00048   int perms;
-00049   bool tryDowngrade;
-00050 };
-00051 
-00052 
-00053 class FileMgr
-00054 {
-00055 
-00056   friend class FileDesc;
-00057 
-00058   FileDesc *files;
-00059   int sysOpen (FileDesc * file);
-00060 public:
-00061 
-00062     FileMgr (int maxFiles = 35);
-00063    ~FileMgr ();
-00064   FileDesc *open (char *path, int mode, bool tryDowngrade);
-00065   FileDesc *open (char *path, int mode, int perms = S_IREAD | S_IWRITE, bool tryDowngrade = false);
-00066   void close (FileDesc *);
-00067 
-00068   static signed char existsFile (const char *ipath, const char *ifileName = 0);
-00069   static signed char existsDir (const char *ipath, const char *idirName = 0);
-00070   // to truncate a file at its current position
-00071   // leaving byte at current possition intact
-00072   // deleting everything afterward.
-00073   signed char trunc (FileDesc *);
-00074 
-00075   int maxFiles;
-00076   static FileMgr systemFileMgr;
-00077 };
-00078 
-00079 
-00080 
-00081 
-00082 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/files.html b/doc/api-documentation/html/files.html deleted file mode 100644 index fbd2cc9..0000000 --- a/doc/api-documentation/html/files.html +++ /dev/null @@ -1,268 +0,0 @@ - - -File Index - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

The Sword Project File List

Here is a list of all documented files with brief descriptions: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cipherfil.cpp [code]
cipherfil.h [code]
compress.cpp [code]
deflate.h [code]
defs.h [code]
dirent.cpp [code]
dirent.h [code]
echomod.cpp [code]
echomod.h [code]
encfiltmgr.cpp [code]
encfiltmgr.h [code]
entriesblk.cpp [code]
entriesblk.h [code]
femain.cpp [code]
femain.h [code]
filemgr.cpp [code]
filemgr.h [code]
flatapi.h [code]
gbf.cpp [code]
gbf.h [code]
gbffootnotes.cpp [code]
gbffootnotes.h [code]
gbfheadings.cpp [code]
gbfheadings.h [code]
gbfhtml.cpp [code]
gbfhtml.h [code]
gbfhtmlhref.cpp [code]
gbfhtmlhref.h [code]
rawgbf/gbfidx.cpp [code]
ztext/gbfidx.cpp [code]
gbfmorph.cpp [code]
gbfmorph.h [code]
gbfosis.cpp [code]
gbfosis.h [code]
gbfplain.cpp [code]
gbfplain.h [code]
gbfrtf.cpp [code]
gbfrtf.h [code]
gbfstrongs.cpp [code]
gbfstrongs.h [code]
gbfthml.cpp [code]
gbfthml.h [code]
Greek2Greek.cpp [code]
Greek2Greek.h [code]
GreekChars.h [code]
greeklexattribs.cpp [code]
greeklexattribs.h [code]
hebrewmcim.cpp [code]
hebrewmcim.h [code]
hrefcom.cpp [code]
hrefcom.h [code]
infblock.h [code]
infcodes.h [code]
inffast.h [code]
inffixed.h [code]
inftrees.h [code]
infutil.h [code]
jfbgen.cpp [code]
kjvidx.cpp [code]
latin1utf16.cpp [code]
latin1utf16.h [code]
latin1utf8.cpp [code]
latin1utf8.h [code]
listkey.cpp [code]
listkey.h [code]
localemgr.cpp [code]
localemgr.h [code]
lzsscomprs.cpp [code]
lzsscomprs.h [code]
markupfiltmgr.cpp [code]
markupfiltmgr.h [code]
mhcidx.cpp [code]
multimapwdef.h [code]
nasb.cpp [code]
nuidx.cpp [code]
nullim.cpp [code]
nullim.h [code]
plainfootnotes.cpp [code]
plainfootnotes.h [code]
plainhtml.cpp [code]
plainhtml.h [code]
rawcom.cpp [code]
rawcom.h [code]
rawfiles.cpp [code]
rawfiles.h [code]
rawfilesgen.cpp [code]
rawgbf.cpp [code]
rawgbf.h [code]
rawgenbook.cpp [code]
rawgenbook.h [code]
rawld.cpp [code]
rawld.h [code]
rawld4.cpp [code]
rawld4.h [code]
rawstr.cpp [code]
rawstr.h [code]
rawstr4.cpp [code]
rawstr4.h [code]
rawtext.cpp [code]
rawtext.h [code]
comments/zcom/rawtxt2z.cpp [code]
texts/ztext/rawtxt2z.cpp [code]
rawverse.cpp [code]
rawverse.h [code]
regex.h [code]
roman.h [code]
rtfhtml.cpp [code]
rtfhtml.h [code]
comments/rawcom/rtfidx.cpp [code]
texts/rawtext/rtfidx.cpp [code]
rwphtml.cpp [code]
rwphtml.h [code]
rwpidx.cpp [code]
rwprtf.cpp [code]
rwprtf.h [code]
sapphire.cpp [code]
sapphire.h [code]
scsuutf8.cpp [code]
scsuutf8.h [code]
strkey.cpp [code]
strkey.h [code]
swbasicfilter.cpp [code]
swbasicfilter.h [code]
swcacher.cpp [code]
swcacher.h [code]
swcipher.cpp [code]
swcipher.h [code]
swcom.cpp [code]
swcom.h [code]
swcomprs.cpp [code]
swcomprs.h [code]
swconfig.cpp [code]
swconfig.h [code]
swdisp.cpp [code]
swdisp.h [code]
swdisprtf.h [code]
swdisprtfchap.h [code]
swfilter.h [code]
swfiltermgr.cpp [code]
swfiltermgr.h [code]
swgenbook.cpp [code]
swgenbook.h [code]
swinputmeth.cpp [code]
swinputmeth.h [code]
swkey.cpp [code]
swkey.h [code]
swld.cpp [code]
swld.h [code]
swlocale.cpp [code]
swlocale.h [code]
swlog.cpp [code]
swlog.h [code]
swmacs.h [code]
swmgr.cpp [code]
swmgr.h [code]
swmodule.cpp [code]
swmodule.h [code]
swobject.h [code]
swtext.cpp [code]
swtext.h [code]
swunicod.cpp [code]
swunicod.h [code]
swversion.cpp [code]
swversion.h [code]
swwinlog.h [code]
sysdata.h [code]
tbdisp.h [code]
thmlfootnotes.cpp [code]
thmlfootnotes.h [code]
thmlgbf.cpp [code]
thmlgbf.h [code]
thmlheadings.cpp [code]
thmlheadings.h [code]
thmlhtml.cpp [code]
thmlhtml.h [code]
thmlhtmlhref.cpp [code]
thmlhtmlhref.h [code]
thmllemma.cpp [code]
thmllemma.h [code]
thmlmorph.cpp [code]
thmlmorph.h [code]
thmlolb.cpp [code]
thmlolb.h [code]
thmlosis.cpp [code]
thmlosis.h [code]
thmlplain.cpp [code]
thmlplain.h [code]
thmlrtf.cpp [code]
thmlrtf.h [code]
thmlscripref.cpp [code]
thmlscripref.h [code]
thmlstrongs.cpp [code]
thmlstrongs.h [code]
thmlvariants.cpp [code]
thmlvariants.h [code]
treekey.cpp [code]
treekey.h [code]
treekeyidx.cpp [code]
treekeyidx.h [code]
trees.h [code]
unicodertf.cpp [code]
unicodertf.h [code]
unixstr.cpp [code]
unixstr.h [code]
untgz.h [code]
utf16utf8.cpp [code]
utf16utf8.h [code]
utf8arshaping.cpp [code]
utf8arshaping.h [code]
utf8bidireorder.cpp [code]
utf8bidireorder.h [code]
utf8cantillation.cpp [code]
utf8cantillation.h [code]
utf8greekaccents.cpp [code]
utf8greekaccents.h [code]
utf8hebrewpoints.cpp [code]
utf8hebrewpoints.h [code]
utf8html.cpp [code]
utf8html.h [code]
utf8latin1.cpp [code]
utf8latin1.h [code]
utf8nfc.cpp [code]
utf8nfc.h [code]
utf8nfkd.cpp [code]
utf8nfkd.h [code]
utf8transliterator.cpp [code]
utf8transliterator.h [code]
utf8utf16.cpp [code]
utf8utf16.h [code]
utilconf.cpp [code]
utilconf.h [code]
utilfuns.h [code]
utilstr.cpp [code]
utilstr.h [code]
versekey.cpp [code]
versekey.h [code]
vntidx.cpp [code]
zcom.cpp [code]
zcom.h [code]
zconf.h [code]
zipcomprs.cpp [code]
zipcomprs.h [code]
zld.cpp [code]
zld.h [code]
zlib.h [code]
zstr.cpp [code]
zstr.h [code]
ztext.cpp [code]
ztext.h [code]
zutil.h [code]
zverse.cpp [code]
zverse.h [code]
-
Generated on Thu Jun 20 22:12:58 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/flatapi_8h-source.html b/doc/api-documentation/html/flatapi_8h-source.html deleted file mode 100644 index ef66468..0000000 --- a/doc/api-documentation/html/flatapi_8h-source.html +++ /dev/null @@ -1,92 +0,0 @@ - - -flatapi.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

flatapi.h

00001 #ifndef SWORDAPI_H
-00002 #define SWORDAPI_H
-00003 
-00004 #include <swmodule.h>
-00005 #include <swkey.h>
-00006 #include <versekey.h>
-00007 #include <swmgr.h>
-00008 
-00009 #ifdef __cplusplus
-00010 #endif
-00011 
-00012 extern "C" {
-00013 
-00014 #define SWHANDLE int
-00015 
-00016 typedef struct {
-00017         ModMap::iterator it;
-00018         ModMap::iterator end;
-00019 } ModItType;
-00020 
-00021 //-----------------------------------------------------------------
-00022 // stringlist_iterator methods
-00023 
-00024 void stringlist_iterator_next(SWHANDLE hsli);
-00025 const char *stringlist_iterator_val(SWHANDLE hsli);
-00026 
-00027 
-00028 //-----------------------------------------------------------------
-00029 // modmap methods
-00030 //
-00031 void ModList_iterator_next(SWHANDLE hmmi);
-00032 SWHANDLE ModList_iterator_val(SWHANDLE hmmi);
-00033 
-00034 
-00035 //-----------------------------------------------------------------
-00036 // SWMgr methods
-00037 //
-00038 SWHANDLE SWMgr_new();
-00039 // SWConfig *, SWConfig *, bool, SWFilterMgr *
-00040 SWHANDLE SWMgr_newEx(SWHANDLE hiconfig, SWHANDLE hisysconfig, char autoload, SWHANDLE hfilterMgr);
-00041 void     SWMgr_delete(SWHANDLE hmgr);
-00042 SWHANDLE SWMgr_getConfig(SWHANDLE hmgr);
-00043 SWHANDLE SWMgr_getModulesIterator(SWHANDLE hmgr);
-00044 SWHANDLE SWMgr_getModuleByName(SWHANDLE hmgr, const char *name);
-00045 const char *   SWMgr_getPrefixPath(SWHANDLE hmgr);
-00046 const char *   SWMgr_getConfigPath(SWHANDLE hmgr);
-00047 void     SWMgr_setGlobalOption(SWHANDLE hmgr, const char *option, const char *value);
-00048 const char *   SWMgr_getGlobalOption(SWHANDLE hmgr, const char *option);
-00049 const char *   SWMgr_getGlobalOptionTip(SWHANDLE hmgr, const char *option);
-00050 // ret: forward_iterator
-00051 SWHANDLE SWMgr_getGlobalOptionsIterator(SWHANDLE hmgr);
-00052 // ret: forward_iterator
-00053 SWHANDLE SWMgr_getGlobalOptionValuesIterator(SWHANDLE hmgr, const char *option);
-00054 void     SWMgr_setCipherKey(SWHANDLE hmgr, const char *modName, const char *key);
-00055 
-00056 
-00057 //-----------------------------------------------------------------
-00058 // SWModule methods
-00059 
-00060 void  SWModule_terminateSearch(SWHANDLE hmodule);
-00061 char  SWModule_error(SWHANDLE hmodule);
-00062 int   SWModule_getEntrySize(SWHANDLE hmodule);
-00063 void  SWModule_setKeyText(SWHANDLE hmodule, const char *key);
-00064 const char *SWModule_getKeyText(SWHANDLE hmodule);
-00065 const char *SWModule_getName(SWHANDLE hmodule);
-00066 const char *SWModule_getDescription(SWHANDLE hmodule);
-00067 const char *SWModule_getType(SWHANDLE hmodule);
-00068 void  SWModule_previous(SWHANDLE hmodule);
-00069 void  SWModule_next(SWHANDLE hmodule);
-00070 void  SWModule_begin(SWHANDLE hmodule);
-00071 const char *SWModule_getStripText(SWHANDLE hmodule);
-00072 const char *SWModule_getRenderText(SWHANDLE hmodule);
-00073 
-00074 }
-00075 #ifdef __cplusplus
-00076 #endif
-00077 
-00078 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/functions.html b/doc/api-documentation/html/functions.html deleted file mode 100644 index c4c8fd1..0000000 --- a/doc/api-documentation/html/functions.html +++ /dev/null @@ -1,241 +0,0 @@ - - -Compound Member Index - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

The Sword Project Compound Members

-_ | a | b | c | d | e | f | g | h | i | k | l | m | n | o | p | r | s | t | u | v | ~
- -

-Here is a list of all documented class members with links to the classes they belong to:

- _ -

- -

- a -

- -

- b -

- -

- c -

- -

- d -

- -

- e -

- -

- f -

- -

- g -

- -

- h -

- -

- i -

- -

- k -

- -

- l -

- -

- m -

- -

- n -

- -

- o -

- -

- p -

- -

- r -

- -

- s -

- -

- t -

- -

- u -

- -

- v -

- -

- ~ -

- -
Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/gbf_8cpp-source.html b/doc/api-documentation/html/gbf_8cpp-source.html deleted file mode 100644 index 72513b7..0000000 --- a/doc/api-documentation/html/gbf_8cpp-source.html +++ /dev/null @@ -1,749 +0,0 @@ - - -gbf.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

gbf.cpp

00001 enum TToken {
-00002 tokNull, tokEOF, tokHeader, tokContent, tokTail, tokStyle,
-00003               tokWord, tokSpace, tokSync, tokControl, tokChar, tokFont};
-00004 
-00005 enum TCharacterAttribute { caBold, caSmallCaps, caItalic, caOTQuote, caRed,
-00006                             caSuperscript, caUnderline, caSubscript};
-00007 
-00008 //    TCharAttribs = set of TCharacterAttribute;
-00009 
-00010 
-00011 struct TBookNameRec {
-00012         string Name, Abbr;
-00013         char Num;
-00014 }
-00015 
-00016 const struct TBookNameRec TBookAbbr[116] = {
-00017         {"1 Chronicles",    "1CH", 13},   //0
-00018         {"1 Corinthians",   "1CO", 70},   //1
-00019         {"1 Esdras",        "1E", 52},    //2
-00020         {"1 John",          "1J", 86},    //3
-00021         {"1 Kings",         "1K", 11},    //4
-00022         {"1 Maccabees",     "1M", 50},    //5
-00023         {"1 Peter",         "1P", 84},    //6
-00024         {"1 Samuel",        "1S", 9},     //7
-00025         {"1 Thessalonians", "1TH", 76},   //8
-00026         {"1 Timothy",       "1TI", 78},   //9
-00027         {"2 Chronicles",    "2CH", 14},   //10
-00028         {"2 Corinthians",   "2CO", 71},   //11
-00029         {"2 Esdras",        "2E", 56},    //12
-00030         {"2 John",          "2J", 87},    //13
-00031         {"2 Kings",         "2K", 12},    //14
-00032         {"2 Maccabees",     "2M", 51},    //15
-00033         {"2 Peter",         "2P", 85},    //16
-00034         {"2 Samuel",        "2S", 10},    //17
-00035         {"2 Thessalonians", "2TH", 77},   //18
-00036         {"2 Timothy",       "2TI", 79},   //19
-00037         {"3 John",          "3J", 88},    //20
-00038         {"3 Maccabees",     "3M", 55},    //21
-00039         {"4 Maccabees",     "4M", 57},    //22
-00040         {"1 Chronicles",    "1 CH", 13},   //0
-00041         {"1 Corinthians",   "1 CO", 70},   //1
-00042         {"1 Esdras",        "1 E", 52},    //2
-00043         {"1 John",          "1 J", 86},    //3
-00044         {"1 Kings",         "1 K", 11},    //4
-00045         {"1 Maccabees",     "1 M", 50},    //5
-00046         {"1 Peter",         "1 P", 84},    //6
-00047         {"1 Samuel",        "1 S", 9},     //7
-00048         {"1 Thessalonians", "1 TH", 76},   //8
-00049         {"1 Timothy",       "1 TI", 78},   //9
-00050         {"2 Chronicles",    "2 CH", 14},   //10
-00051         {"2 Corinthians",   "2 CO", 71},   //11
-00052         {"2 Esdras",        "2 E", 56},    //12
-00053         {"2 John",          "2 J", 87},    //13
-00054         {"2 Kings",         "2 K", 12},    //14
-00055         {"2 Maccabees",     "2 M", 51},    //15
-00056         {"2 Peter",         "2 P", 85},    //16
-00057         {"2 Samuel",        "2 S", 10},    //17
-00058         {"2 Thessalonians", "2 TH", 77},   //18
-00059         {"2 Timothy",       "2 TI", 79},   //19
-00060         {"3 John",          "3 J", 88},    //20
-00061         {"3 Maccabees",     "3 M", 55},    //21
-00062         {"4 Maccabees",     "4 M", 57},    //22
-00063         {"Acts",            "AC", 68},    //23
-00064         {"Amos",            "AM", 30},    //24
-00065         {"Prayer of Asariah and the Song of the Three Jews", "AZ", 47},
-00066         {"Baruch",          "BA", 45},    //26
-00067         {"Bel and the Dragon","BE", 49},  //27
-00068         {"Colossians",      "CO", 75},    //28
-00069         {"Daniel",          "DA", 27},    //29
-00070         {"Deuteronomy",     "DE", 5},     //30
-00071         {"Deuteronomy",     "DT", 5},     //31
-00072         {"Ecclesiasties",   "EC", 21},    //32
-00073         {"Esther",          "ES", 17},    //33
-00074         {"Exodus",          "EX", 2},     //34
-00075         {"Ezekiel",         "EZE", 26},   //35
-00076         {"Ezra",            "EZR", 15},   //36
-00077         {"Galatians",       "GA", 72},    //37
-00078         {"Genesis",         "GE", 1},     //38
-00079         {"Genesis",         "GN", 1},     //39
-00080         {"Ephesians",       "EP", 73},    //40
-00081         {"Esther (Greek}",  "GR", 42),    //41
-00082         {"Habakkuk",        "HAB", 35},   //42
-00083         {"Haggai",          "HAG", 37},   //43
-00084         {"Hebrews",         "HE", 82},    //44
-00085         {"Hosea",           "HO", 28},    //45
-00086         {"Isaiah",          "IS", 23},    //46
-00087         {"James",           "JA", 83},    //47
-00088         {"Jeremiah",        "JE", 24},    //48
-00089         {"Job",             "JOB", 18},   //49
-00090         {"Joel",            "JOE", 29},   //50
-00091         {"John",            "JOH", 67},   //51
-00092         {"Jonah",           "JON", 32},   //52
-00093         {"Joshua",          "JOS", 6},    //53
-00094         {"Jude",            "JUDE", 89},  //54
-00095         {"Judges",          "JUDG", 7},   //55
-00096         {"Judith",          "JUDI", 41},  //56
-00097         {"Lamentations",    "LA", 25},    //57
-00098         {"Letter of Jeremiah",Abbr:"LET", 46},  //58
-00099         {"Leviticus",       "LEV", 3},    //59
-00100         {"Luke",            "LK", 66},    //60
-00101         {"Leviticus",       "LV", 3},     //61
-00102         {"Luke",            "LU", 66},    //62
-00103         {"Malachi",         "MAL", 39},   //63
-00104         {"Prayer of Manasseh",Abbr:"MAN", 53},  //64
-00105         {"Mark",            "MAR", 65},   //65
-00106         {"Matthew",         "MAT", 64},   //66
-00107         {"Micah",           "MI", 33},    //67
-00108         {"Nahum",           "NA", 34},    //68
-00109         {"Nehemiah",        "NE", 16},    //69
-00110         {"Numbers",         "NU", 4},     //70
-00111         {"Obadiah",         "OB", 31},    //71
-00112         {"Psalm 151",       "P1", 54},    //72
-00113         {"Philemon",        "PHILE", 81}, //73
-00114         {"Philippians",     "PHILI", 74}, //74
-00115         {"Philemon",        "PHM", 81},   //75
-00116         {"Philippians",     "PHP", 74},   //76
-00117         {"Proverbs",        "PR", 20},    //77
-00118         {"Psalms",          "PS", 19},    //78
-00119         {"Revelation",      "RE", 90},    //79
-00120         {"Romans",          "RM", 69},    //80
-00121         {"Romans",          "RO", 69},    //81
-00122         {"Ruth",            "RU", 8},     //82
-00123         {"Sirach",          "SI", 44},    //83
-00124         {"Song of Solomon", "SOL", 22},   //84
-00125         {"Song of Solomon", "SON", 22},   //85
-00126         {"Song of Solomon", "SS", 22},    //86
-00127         {"Susanna",         "SU", 48},    //87
-00128         {"Titus",           "TI", 80},    //88
-00129         {"Tobit",           "TO", 40},    //89
-00130         {"Wisdom",          "WI", 43},    //90
-00131         {"Zechariah",       "ZEC", 38},   //91
-00132         {"Zephaniah",       "ZEP", 36}    //92
-00133         },
-00134 
-00135 string BookFileName[91] = {
-00136         "","Genesis","Exodus","Lev","Num","Deut","Joshua","Judges", // 0 - 7
-00137         "Ruth","1Sam","2Sam","1Kings","2Kings","1Chron","2Chron",   // 8 - 14
-00138         "Ezra","Nehemiah","Esther","Job","Psalms","Proverbs",       // 15-20
-00139         "Eccl","Song","Isaiah","Jeremiah","Lament","Ezekiel",       // 21-26
-00140         "Daniel","Hosea","Joel","Amos","Obadiah","Jonah","Micah",   // 27-33
-00141         "Nahum","Habakkuk","Zeph","Haggai","Zech","Malachi",        // 34-39
-00142         "Tobit","Judith","Esther","Wisdom","Sirach","Baruch",       // 40-45
-00143         "Let","Azar","Susanna","Bel","1Mac","2Mac","1Esdras",       // 46-52
-00144         "Man","P1","3Mac","2Esdras","4Mac","","","","","","",       // 53-63
-00145         "Matthew","Mark","Luke","John","Acts","Romans","1Cor",      // 64-70
-00146         "2Cor","Gal","Eph","Philip","Col","1Thes","2Thes","1Tim",   // 71-78
-00147         "2Tim","Titus","Philemon","Hebrews","James","1Peter",       // 79-84
-00148         "2Peter","1John","2John","3John","Jude","Rev"};             // 85-90
-00149 
-00150 class TReadGBF {
-00151 private:
-00152         FILE *fp;
-00153         string FName, TokenLine;
-00154         int TokenPos;
-00155         bool fFileIsOpen, fParagraphEnd, fInTitle, fInPsalmBookTitle, fInHebrewTitle, fInSectionTitle;
-00156 
-00157 public:
-00158         string sBook, sChapter, sVerse, sMode;
-00159         string sContext; // Last text type (header, body, or tail)
-00160         string sTitle;   // Title of this book of the Bible
-00161         string sPsalmBookTitle; // Title of this Psalm book
-00162         string sHebrewTitle;    // Psalm Hebrew title
-00163         string sSectionTitle;   // Section headings
-00164         string sDate;
-00165         string sFontName;
-00166         int iTotalWords;
-00167         char chJustification, chDirection;
-00168         bool fIndent, fPoetry;
-00169         int CharAttribs;
-00170         char bBk, bChap, bVs, bWd;
-00171 
-00172         bool Init(const string sFileName);
-00173         void Done();
-00174         string GetToken(TToken &TokenKind);
-00175     end;
-00176 
-00177 class TWriteGBF {
-00178         private:
-00179         F: TextFile;
-00180         FName, LineOut: string;
-00181         fFileIsOpen: boolean;
-00182         bBk, bChap, bVs, bWd: byte;
-00183 
-00184         public
-00185 
-00186         function Init(const sFileName: string): boolean;
-00187         function Done: boolean;
-00188         procedure Out(const s: string);
-00189     end;
-00190 
-00191 function isletter(const ch: char): boolean;
-00192 function isinword(const ch: char): boolean;
-00193 function IsDigit(const ch: char): Boolean;
-00194 function IsUpper(const ch: char): Boolean;
-00195 function ConformCase(const sPat, sSrc: string): string;
-00196 function BookNameToNumber(const sBookName: string): byte;
-00197 
-00198 implementation
-00199 
-00200 function isletter(const ch: char): boolean;
-00201 begin
-00202     case ch of
-00203         'A'..'Z': isletter := true;
-00204         'a'..'z': isletter := true;
-00205         else
-00206         isletter := false;
-00207     end;
-00208 end;
-00209 
-00210 function isinword(const ch: char): boolean;
-00211 begin
-00212     case ch of
-00213         '-': isinword := true;
-00214         'A'..'Z': isinword := true;
-00215         'a'..'z': isinword := true;
-00216         else
-00217         isinword := false;
-00218     end;
-00219 end;
-00220 
-00221 function IsUpper(const ch: char): Boolean;
-00222 begin
-00223     case ch of
-00224         'A'..'Z': IsUpper := true;
-00225         else
-00226             IsUpper := false;
-00227     end;
-00228 end;
-00229 
-00230 function IsDigit(const ch: char): Boolean;
-00231 begin
-00232     case ch of
-00233         '0'..'9': IsDigit := true;
-00234         else
-00235             IsDigit := false;
-00236     end;
-00237 end;
-00238 
-00239 
-00240 function MatchAbbrev(const sName, sAbbrev: string): boolean;
-00241 var i: integer;
-00242 begin
-00243     if Length(sName) < Length(sAbbrev) then
-00244         Result := false
-00245     else
-00246         Result := true;
-00247     i := 1;
-00248     while (i <= Length(sAbbrev)) and Result do
-00249         begin
-00250         if UpCase(sName[i]) <> sAbbrev[i] then
-00251             Result := false;
-00252         inc(i);
-00253         end;
-00254 end;
-00255 
-00256 function BookNameToNumber(const sBookName: string): byte;
-00257 var i: integer;
-00258 begin
-00259     Result := 0;
-00260     try
-00261     if IsDigit(sBookName[Length(sBookName)]) and IsDigit(sBookName[1]) then
-00262         Result := StrToInt(sBookName);
-00263     except
-00264     Result := 0;
-00265     end;
-00266     i := 0;
-00267     while (Result = 0) and (i <= 115) do  // Yuk! Linear search.
-00268         begin
-00269         if MatchAbbrev(sBookName,BookAbbr[i].Abbr) then
-00270             begin
-00271             Result := BookAbbr[i].Num;
-00272             end;
-00273         inc(i);
-00274         end;
-00275 end;
-00276 
-00277 function BookNumberToName(const bBookNum: byte): string;
-00278 begin
-00279     if bBookNum <= 115 then
-00280         Result := BookAbbr[bBookNum].Name
-00281     else
-00282         Result := '';
-00283 end;
-00284 
-00285 function ConformCase(const sPat, sSrc: string): string;
-00286 var i: integer;
-00287 begin
-00288     Result := sSrc;
-00289     if (Length(sPat) > 0) and (Length(sSrc) > 0) then
-00290         begin
-00291         Result := LowerCase(sSrc);
-00292         if IsUpper(sPat[1]) then
-00293             Result[1] := UpCase(Result[1]);
-00294         if (Length(sPat) > 1) and (Length(sSrc) > 1) then
-00295             begin
-00296             if IsUpper(sPat[2]) then
-00297                 begin
-00298                 for i := 2 to Length(Result) do
-00299                     Result[i] := UpCase(Result[i]);
-00300                 end;
-00301             end;
-00302         end;
-00303 end;
-00304 
-00305 function TReadGBF.Init(const sFileName: string): boolean;
-00306 var s: string;
-00307     tok: TToken;
-00308 begin
-00309     try
-00310     fParagraphEnd := false;
-00311     bBk := 0;
-00312     bChap := 0;
-00313     bVs := 0;
-00314     bWd := 0;
-00315     iTotalWords := 0;
-00316     FName := sFileName;
-00317     Assign(F, FName);
-00318     reset(F);
-00319     readln(F, TokenLine);
-00320     TokenPos := 1;
-00321     fFileIsOpen := true;
-00322     repeat
-00323         s := GetToken(tok)
-00324     until (tok = tokEOF) or ((tok = tokHeader) and (s[3] = '0'));
-00325     Init := true;
-00326     except
-00327     Init := false;
-00328     fFileIsOpen := false;
-00329     end
-00330 end;
-00331 
-00332 procedure TReadGBF.Done;
-00333 begin
-00334     if fFileIsOpen then
-00335         begin
-00336         closefile(F);
-00337         fFileIsOpen := false;
-00338         end;
-00339 end;
-00340 
-00341 function TReadGBF.GetToken(var TokenKind: TToken): string;
-00342 var m: integer;
-00343 begin
-00344     Result := '';
-00345     TokenKind := tokNull;
-00346     if TokenPos = 0 then
-00347         begin
-00348         if (not fFileIsOpen) or EOF(F) then
-00349             TokenKind := tokEOF
-00350         else
-00351             begin
-00352             ReadLn(F,TokenLine);
-00353             TokenPos := 1;
-00354             end;
-00355         end;
-00356     if TokenKind <> tokEOF then
-00357         begin
-00358         m := Length(TokenLine);
-00359         if TokenPos > m then
-00360             begin
-00361             TokenKind := tokSpace;
-00362             if fParagraphEnd then
-00363                 fParagraphEnd := false
-00364             else
-00365                 Result := ' ';
-00366             TokenPos := 0;
-00367             end
-00368         else
-00369             begin
-00370             if (TokenLine[TokenPos] = '<') then
-00371                 begin
-00372                 fParagraphEnd := false;
-00373                 repeat
-00374                     Result := Result + TokenLine[TokenPos];
-00375                     inc(TokenPos);
-00376                 until (TokenLine[TokenPos] = '>') or (TokenPos > m);
-00377                 Result := Result + '>';
-00378                 inc(TokenPos);
-00379                 case result[2] of
-00380                     'B': begin // File body text type
-00381                          TokenKind := tokContent;
-00382                          sContext := Result;
-00383                          end;
-00384                     'C': begin // Special characters
-00385                          TokenKind := tokControl;
-00386                          if (Result[3] = 'M') or (Result[3] = 'L') then
-00387                              fParagraphEnd := true;
-00388                          end;
-00389                     'D': begin // Direction
-00390                          TokenKind := tokControl;
-00391                          chDirection := Result[3];
-00392                          end;
-00393                     'H': begin
-00394                          TokenKind := tokHeader;
-00395                          sContext := Result;
-00396                          end;
-00397                     'F': begin // Font attributes
-00398                          TokenKind := tokFont;
-00399                          case Result[3] of
-00400                              'B': CharAttribs := CharAttribs + [caBold];
-00401                              'C': CharAttribs := CharAttribs + [caSmallCaps];
-00402                              'I': CharAttribs := CharAttribs + [caItalic];
-00403                              'N': sFontName := copy(Result,4,Length(Result)-4);
-00404                              'O': CharAttribs := CharAttribs + [caOTQuote];
-00405                              'R': CharAttribs := CharAttribs + [caRed];
-00406                              'S': CharAttribs := CharAttribs + [caSuperscript];
-00407                              'U': CharAttribs := CharAttribs + [caUnderline];
-00408                              'V': CharAttribs := CharAttribs + [caSubscript];
-00409                              'b': CharAttribs := CharAttribs - [caBold];
-00410                              'c': CharAttribs := CharAttribs - [caSmallCaps];
-00411                              'i': CharAttribs := CharAttribs - [caItalic];
-00412                              'n': sFontName := '';
-00413                              'o': CharAttribs := CharAttribs - [caOTQuote];
-00414                              'r': CharAttribs := CharAttribs - [caRed];
-00415                              's': CharAttribs := CharAttribs - [caSuperscript];
-00416                              'u': CharAttribs := CharAttribs - [caUnderline];
-00417                              'v': CharAttribs := CharAttribs - [caSubscript];
-00418 
-00419                          end;
-00420                          end;
-00421                     'J': begin // Justification
-00422                          TokenKind := tokStyle;
-00423                          chJustification := Result[3];
-00424                          end;
-00425                     'P': begin // Poetry/prose, indent
-00426                          TokenKind := tokControl;
-00427                          case Result[3] of
-00428                              'I': fIndent := true;
-00429                              'P': fPoetry := true;
-00430                              'i': fIndent := false;
-00431                              'p': fPoetry := false;
-00432                          end;
-00433                          end;
-00434                     'R': begin // References and footnotes
-00435                          TokenKind := tokControl;
-00436                          end;
-00437                     'S': begin // sync mark
-00438                          TokenKind := TokSync;
-00439                          case Result[3] of
-00440                              'B': begin // Book
-00441                                   sBook := system.copy(Result, 4, length(Result)-4);
-00442                                   sPsalmBookTitle := '';
-00443                                   if sBook = '' then
-00444                                       begin
-00445                                       inc(bBk);
-00446                                       sBook := BookNumberToName(bBk);
-00447                                       end
-00448                                   else
-00449                                       bBk := BookNameToNumber(sBook);
-00450                                   sTitle := sBook;
-00451                                   end;
-00452                              'C': begin //chapter
-00453                                   sChapter := system.copy(Result, 4, length(Result)-4);
-00454                                   if sChapter = '' then
-00455                                       begin
-00456                                       inc(bChap);
-00457                                       sChapter := IntToStr(bChap);
-00458                                       end
-00459                                   else
-00460                                       begin
-00461                                       try
-00462                                       bChap := StrToInt(sChapter);
-00463                                       except
-00464                                       showmessage('Non-numeric chapter: '+sBook+' '+sChapter);
-00465                                       end;
-00466                                       end;
-00467                                   sHebrewTitle := '';    
-00468                                   end;
-00469                              'V': begin // Verse
-00470                                   bWd := 0;
-00471                                   sVerse := system.copy(Result, 4, length(Result)-4);
-00472                                   if sVerse = '' then
-00473                                       begin
-00474                                       inc(bVs);
-00475                                       sVerse := IntToStr(bVs);
-00476                                       end
-00477                                   else
-00478                                       begin
-00479                                       try
-00480                                       bVs := StrToInt(sVerse);
-00481                                       except
-00482                                       showmessage('Non-numeric verse: '+sBook+' '+sChapter+':'+sVerse);
-00483                                       end;
-00484                                       end;
-00485                                   end;
-00486                              'D': begin // Date
-00487                                   sDate := system.copy(Result, 3, length(Result)-4);
-00488                                   end;
-00489                          end;
-00490                          end;
-00491                     'T': begin // Titles
-00492                          TokenKind := TokContent;
-00493                          case Result[3] of
-00494                              'B':
-00495                                  begin
-00496                                  sPsalmBookTitle := '';
-00497                                  fInPsalmBookTitle := true;
-00498                                  end;
-00499                              'b': fInPsalmBookTitle := true;
-00500                              'H':
-00501                                  begin
-00502                                  sHebrewTitle := '';
-00503                                  fInHebrewTitle := true;
-00504                                  end;
-00505                              'h': fInHebrewTitle := false;
-00506                              'S':
-00507                                  begin
-00508                                  sSectionTitle := '';
-00509                                  fInSectionTitle := true;
-00510                                  end;
-00511                              's': fInSectionTitle := false;
-00512                              'T':
-00513                                  begin
-00514                                  sTitle := '';
-00515                                  fInTitle := true;
-00516                                  end;
-00517                              't': fInTitle := false;
-00518                          end;
-00519                          end;
-00520                     'Z': begin // File tail
-00521                          TokenKind := tokTail;
-00522                          sContext := Result;
-00523                          if Result[3] = 'Z' then
-00524                              done;
-00525                          end;
-00526                     else
-00527                          TokenKind := TokControl;
-00528 
-00529                 end;
-00530                 end
-00531             else if isletter(TokenLine[TokenPos]) then
-00532                 begin {Word}
-00533                 fParagraphEnd := false;
-00534                 TokenKind := tokWord;
-00535                 repeat
-00536                     Result := Result + TokenLine[TokenPos];
-00537                     inc(TokenPos);
-00538                 until (TokenPos > m) or (not isinword(TokenLine[TokenPos]));
-00539                 inc(bWd);
-00540                 inc(iTotalWords);
-00541                 end
-00542             else if ((TokenLine[TokenPos] = ' ') or (TokenLine[TokenPos] = #9)) then
-00543                 begin
-00544                 fParagraphEnd := false;
-00545                 TokenKind := tokSpace;
-00546                 Result := Result + TokenLine[TokenPos];
-00547                 inc(TokenPos);
-00548                 end
-00549             else
-00550                 begin
-00551                 fParagraphEnd := false;
-00552                 TokenKind := tokChar;
-00553                 Result := Result + TokenLine[TokenPos];
-00554                 inc(TokenPos);
-00555                 end
-00556             end;
-00557         end;
-00558     if ((TokenKind = tokWord) or (TokenKind = tokSpace) or
-00559        (TokenKind = tokChar)) then
-00560         begin
-00561         if fInTitle then
-00562             sTitle := sTitle + Result
-00563         else if fInPsalmBookTitle then
-00564             sPsalmBookTitle := sPsalmBookTitle + Result
-00565         else if fInHebrewTitle then
-00566             sHebrewTitle := sHebrewTitle + Result
-00567         else if fInSectionTitle then
-00568             sSectionTitle := sSectionTitle + Result;
-00569         end;
-00570 end;
-00571 
-00572 function TWriteGBF.Init(const sFileName: string): boolean;
-00573 begin
-00574     try
-00575     bBk := 0;
-00576     bChap := 0;
-00577     bVs := 0;
-00578     bWd := 0;
-00579     LineOut := '';
-00580     FName := sFileName;
-00581     Assign(F, FName);
-00582     filemode := 1;
-00583     rewrite(F);
-00584     fFileIsOpen := true;
-00585     Init := true;
-00586     except
-00587     Init := false;
-00588     fFileIsOpen := false;
-00589     end
-00590 end;
-00591 
-00592 function TWriteGBF.Done: boolean;
-00593 begin
-00594     try
-00595     if fFileIsOpen then
-00596         begin
-00597         if LineOut <> '' then
-00598             begin
-00599             WriteLn(F, LineOut);
-00600             LineOut := '';
-00601             end;
-00602         CloseFile(F);
-00603         end;
-00604     Done := true;
-00605     except
-00606     Done := false;
-00607     end;
-00608 end;
-00609 
-00610 procedure TWriteGBF.Out(const s: string);
-00611 var sPrint, sSave, sBook, sChapter, sVerse: string;
-00612     i: integer;
-00613     b: byte;
-00614 begin
-00615     if (Length(s) > 0) and IsLetter(s[1]) then
-00616         begin
-00617         inc(bWd);
-00618         LineOut := LineOut + s;
-00619         end
-00620     else if Length(s) > 3 then
-00621         begin
-00622         if (s[1] = '<') and (s[2] = 'S') then
-00623             begin
-00624             case s[3] of
-00625                 'B': begin // Book
-00626                      sBook := system.copy(s, 4, length(s)-4);
-00627                      if sBook = '' then
-00628                          begin
-00629                          inc(bBk);
-00630                          LineOut := LineOut + s;
-00631                          end
-00632                      else
-00633                          begin
-00634                          b := bBk;
-00635                          bBk := BookNameToNumber(sBook);
-00636                          if b <> bBk then
-00637                              LineOut := LineOut + s;
-00638                          end;
-00639                      end;
-00640                 'C': begin //chapter
-00641                      sChapter := system.copy(s, 4, length(s)-4);
-00642                      if sChapter = '' then
-00643                          begin
-00644                          inc(bChap);
-00645                          LineOut := LineOut + s;
-00646                          end
-00647                      else
-00648                          begin
-00649                          try
-00650 //                       b := bChap;
-00651                          bChap := StrToInt(sChapter);
-00652 //                       if b <> bChap then
-00653                              LineOut := LineOut + s;
-00654                          except
-00655                          showmessage('Non-numeric chapter: '+sBook+' '+sChapter);
-00656                          end;
-00657                          end;
-00658                      end;
-00659                 'V': begin // Verse
-00660                      bWd := 0;
-00661                      sVerse := system.copy(s, 4, length(s)-4);
-00662                      if sVerse = '' then
-00663                          begin
-00664                          inc(bVs);
-00665                          LineOut := LineOut + s;
-00666                          end
-00667                      else
-00668                          begin
-00669                          try
-00670 //                       b := bVs;
-00671                          bVs := StrToInt(sVerse);
-00672 //                       if b <> bVs then
-00673                              LineOut := LineOut + s;
-00674                          except
-00675                          showmessage('Non-numeric verse: '+sBook+' '+sChapter+':'+sVerse);
-00676                          end;
-00677                          end;
-00678                      end;
-00679                 else
-00680                     LineOut := LineOut + s;
-00681                 end
-00682             end
-00683         else
-00684             LineOut := LineOut + s; // Not a sync mark
-00685         end
-00686     else // other token, space, or punctuation
-00687         LineOut := LineOut + s; // Length <= 3
-00688     if ((s = '<CM>') or (s = '<CL>')) then
-00689         begin
-00690         if (Length(LineOut) > 78) then
-00691             begin
-00692             i := 78;
-00693             while (i > 0) and (LineOut[i] <> ' ') do
-00694                 dec(i);
-00695             if i < 1 then
-00696                 begin
-00697                 WriteLn(F,LineOut);
-00698                 LineOut := '';
-00699                 end
-00700             else
-00701                 begin
-00702                 sPrint := system.copy(LineOut,1,i-1);
-00703                 sSave := system.copy(LineOut,i+1,Length(LineOut)-i);
-00704                 WriteLn(F,sPrint);
-00705                 WriteLn(F, sSave);
-00706                 LineOut := '';
-00707                 end
-00708             end
-00709         else
-00710             begin
-00711             WriteLn(F, LineOut);
-00712             LineOut := '';
-00713             end
-00714         end
-00715     else if (Length(LineOut) > 78) then
-00716         begin
-00717         i := 78;
-00718         while (i > 0) and (LineOut[i] <> ' ') do
-00719             dec(i);
-00720         if i < 1 then
-00721             begin
-00722             WriteLn(F,LineOut);
-00723             LineOut := '';
-00724             end
-00725         else
-00726             begin
-00727             sPrint := system.copy(LineOut,1,i-1);
-00728             sSave := system.copy(LineOut,i+1,Length(LineOut)-i);
-00729             WriteLn(F,sPrint);
-00730             LineOut := sSave;
-00731             end
-00732         end
-00733 end;
-00734 
-00735 end.
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/gbf_8h-source.html b/doc/api-documentation/html/gbf_8h-source.html deleted file mode 100644 index 6feefcb..0000000 --- a/doc/api-documentation/html/gbf_8h-source.html +++ /dev/null @@ -1,81 +0,0 @@ - - -gbf.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

gbf.h

00001 /* Header for module GBF, generated by p2c */
-00002 #ifndef GBF_H
-00003 #define GBF_H
-00004 /* p2c: Gbf.pas, line 5: Warning: Could not find module SYSUTILS [271] */
-00005 
-00006 
-00007 #include "sysutils.h"
-00008 /* p2c: Gbf.pas, line 5: Warning: Could not find module DIALOGS [271] */
-00009 #include "dialogs.h"
-00010 
-00011 
-00012 #ifdef GBF_G
-00013 # define vextern
-00014 #else
-00015 # define vextern extern
-00016 #endif
-00017 
-00018 
-00019 
-00020 typedef enum {
-00021   tokNull, tokEOF, tokHeader, tokContent, tokTail, tokStyle, tokWord,
-00022   tokSpace, tokSync, tokControl, tokChar, tokFont
-00023 } TToken;
-00024 typedef enum {
-00025   caBold, caSmallCaps, caItalic, caOTQuote, caRed, caSuperscript, caUnderline,
-00026   caSubscript
-00027 } TCharacterAttribute;
-00028 typedef long TCharAttribs;
-00029 
-00030 
-00031 
-00032 typedef struct TBookNameRec {
-00033   Char Name[256], Abbr[256];
-00034   uchar Num;
-00035 } TBookNameRec;
-00036 
-00037 typedef TBookNameRec TBookAbbr[116];
-00038 /* p2c: Gbf.pas, line 25: 
-00039  * Warning: Expected an expression, found a '/' [227] */
-00040 /* p2c: Gbf.pas, line 25: 
-00041  * Warning: Expected an expression, found a '/' [227] */
-00042 /* p2c: Gbf.pas, line 25: Warning: Division by zero [163] */
-00043 /* p2c: Gbf.pas, line 26: Warning: Division by zero [163] */
-00044 /* p2c: Gbf.pas, line 26: Warning: Expected a ')', found a '(' [227] */
-00045 /* p2c: Gbf.pas, line 144: 
-00046  * Warning: Expected an expression, found a '/' [227] */
-00047 /* p2c: Gbf.pas, line 144: 
-00048  * Warning: Expected an expression, found a '/' [227] */
-00049 /* p2c: Gbf.pas, line 144: Warning: Division by zero [163] */
-00050 /* p2c: Gbf.pas, line 144: Warning: Division by zero [163] */
-00051 /* p2c: Gbf.pas, line 145: Warning: Mixing non-strings with strings [170] */
-00052 /* p2c: Gbf.pas, line 145: 
-00053  * Warning: Expected a ')', found a string literal [227] */
-00054 
-00055 
-00056 extern TBookAbbr BookAbbr;
-00057 
-00058 extern Char BookFileName[91][256];
-00059 
-00060 vextern Char STR1[256];
-00061 
-00062 
-00063 #undef vextern
-00064 
-00065 #endif /*GBF_H*/
-00066 
-00067 /* End. */
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/gbffootnotes_8cpp-source.html b/doc/api-documentation/html/gbffootnotes_8cpp-source.html deleted file mode 100644 index 0e15deb..0000000 --- a/doc/api-documentation/html/gbffootnotes_8cpp-source.html +++ /dev/null @@ -1,132 +0,0 @@ - - -gbffootnotes.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

gbffootnotes.cpp

00001 /******************************************************************************
-00002  *
-00003  * gbffootnotes -       SWFilter decendant to hide or show footnotes
-00004  *                      in a GBF module.
-00005  */
-00006 
-00007 
-00008 #include <stdlib.h>
-00009 #include <string.h>
-00010 #include <gbffootnotes.h>
-00011 #ifndef __GNUC__
-00012 #else
-00013 #include <unixstr.h>
-00014 #endif
-00015 
-00016 
-00017 const char GBFFootnotes::on[] = "On";
-00018 const char GBFFootnotes::off[] = "Off";
-00019 const char GBFFootnotes::optName[] = "Footnotes";
-00020 const char GBFFootnotes::optTip[] = "Toggles Footnotes On and Off if they exist";
-00021 
-00022 
-00023 GBFFootnotes::GBFFootnotes() {
-00024         option = false;
-00025         options.push_back(on);
-00026         options.push_back(off);
-00027 }
-00028 
-00029 
-00030 GBFFootnotes::~GBFFootnotes() {
-00031 }
-00032 
-00033 void GBFFootnotes::setOptionValue(const char *ival)
-00034 {
-00035         option = (!stricmp(ival, on));
-00036 }
-00037 
-00038 const char *GBFFootnotes::getOptionValue()
-00039 {
-00040         return (option) ? on:off;
-00041 }
-00042 
-00043 char GBFFootnotes::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00044 {
-00045         if (!option) {  // if we don't want footnotes
-00046                 char *to, *from, token[4096]; // cheese.  Fix.
-00047                 int tokpos = 0;
-00048                 bool intoken = false;
-00049                 int len;
-00050                 bool hide = false;
-00051 
-00052                 len = strlen(text) + 1; // shift string to right of buffer
-00053                 if (len < maxlen) {
-00054                         memmove(&text[maxlen - len], text, len);
-00055                         from = &text[maxlen - len];
-00056                 }
-00057                 else    from = text;    // -------------------------------
-00058 
-00059                 for (to = text; *from; from++) {
-00060                         if (*from == '<') {
-00061                                 intoken = true;
-00062                                 tokpos = 0;
-00063 //                              memset(token, 0, 4096);
-00064                                 token[0] = 0;
-00065                                 token[1] = 0;
-00066                                 token[2] = 0;
-00067                                 continue;
-00068                         }
-00069                         if (*from == '>') {     // process tokens
-00070                                 intoken = false;
-00071                                 switch (*token) {
-00072                                 case 'R':                               // Reference
-00073                                         switch(token[1]) {
-00074                                         case 'F':               // Begin footnote
-00075                                                 hide = true;
-00076                                                 break;
-00077                                         case 'f':               // end footnote
-00078                                                 hide = false;
-00079                                                 break;
-00080                                         }
-00081                                         continue;       // skip token
-00082                                 case 'W':
-00083                                         if (token[1] == 'T') {
-00084                                                 switch (token[2]) {
-00085                                                 case 'P':
-00086                                                 case 'S':
-00087                                                 case 'A':
-00088                                                         continue; // remove this token
-00089                                                 default:
-00090                                                         break;
-00091                                                 }
-00092                                         }
-00093                                 }
-00094                                 // if not a footnote token, keep token in text
-00095                                 if (!hide) {
-00096                                         *to++ = '<';
-00097                                         for (char *tok = token; *tok; tok++)
-00098                                                 *to++ = *tok;
-00099                                         *to++ = '>';
-00100                                 }
-00101                                 continue;
-00102                         }
-00103                         if (intoken) {
-00104                                 if (tokpos < 4090)
-00105                                         token[tokpos++] = *from;
-00106                                         token[tokpos+2] = 0;    // +2 cuz we init token with 2 extra '0' because of switch statement
-00107                         }
-00108                         else    {
-00109                                 if (!hide) {
-00110                                         *to++ = *from;
-00111                                 }
-00112                         }
-00113                 }
-00114                 *to++ = 0;
-00115                 *to = 0;
-00116         }
-00117         return 0;
-00118 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/gbffootnotes_8h-source.html b/doc/api-documentation/html/gbffootnotes_8h-source.html deleted file mode 100644 index abc8281..0000000 --- a/doc/api-documentation/html/gbffootnotes_8h-source.html +++ /dev/null @@ -1,70 +0,0 @@ - - -gbffootnotes.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

gbffootnotes.h

00001 /*
-00002  *
-00003  * $Id: gbffootnotes_8h-source.html,v 1.7 2002/06/20 20:23:08 mgruner Exp $
-00004  *
-00005  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00006  *      CrossWire Bible Society
-00007  *      P. O. Box 2528
-00008  *      Tempe, AZ  85280-2528
-00009  *
-00010  * This program is free software; you can redistribute it and/or modify it
-00011  * under the terms of the GNU General Public License as published by the
-00012  * Free Software Foundation version 2.
-00013  *
-00014  * This program is distributed in the hope that it will be useful, but
-00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00017  * General Public License for more details.
-00018  *
-00019  */
-00020 
-00021 #ifndef GBFFOOTNOTES_H
-00022 #define GBFFOOTNOTES_H
-00023 
-00024 #include <swfilter.h>
-00025 
-00026 #include <defs.h>
-00027 
-00030 class SWDLLEXPORT GBFFootnotes:public SWFilter
-00031 {
-00032   bool option;
-00033   static const char on[];
-00034   static const char off[];
-00035   static const char optName[];
-00036   static const char optTip[];
-00037   OptionsList options;
-00038 public:
-00039   GBFFootnotes ();
-00040   virtual ~ GBFFootnotes ();
-00041   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00042   virtual const char *getOptionName ()
-00043   {
-00044     return optName;
-00045   }
-00046   virtual const char *getOptionTip ()
-00047   {
-00048     return optTip;
-00049   }
-00050   virtual void setOptionValue (const char *ival);
-00051   virtual const char *getOptionValue ();
-00052   virtual OptionsList getOptionValues ()
-00053   {
-00054     return options;
-00055   }
-00056 };
-00057 
-00058 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/gbfheadings_8cpp-source.html b/doc/api-documentation/html/gbfheadings_8cpp-source.html deleted file mode 100644 index 967cc06..0000000 --- a/doc/api-documentation/html/gbfheadings_8cpp-source.html +++ /dev/null @@ -1,121 +0,0 @@ - - -gbfheadings.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

gbfheadings.cpp

00001 /******************************************************************************
-00002  *
-00003  * gbfheadings -        SWFilter decendant to hide or show headings
-00004  *                      in a GBF module.
-00005  */
-00006 
-00007 
-00008 #include <stdlib.h>
-00009 #include <string.h>
-00010 #include <gbfheadings.h>
-00011 #ifndef __GNUC__
-00012 #else
-00013 #include <unixstr.h>
-00014 #endif
-00015 
-00016 
-00017 const char GBFHeadings::on[] = "On";
-00018 const char GBFHeadings::off[] = "Off";
-00019 const char GBFHeadings::optName[] = "Headings";
-00020 const char GBFHeadings::optTip[] = "Toggles Headings On and Off if they exist";
-00021 
-00022 
-00023 GBFHeadings::GBFHeadings() {
-00024         option = false;
-00025         options.push_back(on);
-00026         options.push_back(off);
-00027 }
-00028 
-00029 
-00030 GBFHeadings::~GBFHeadings() {
-00031 }
-00032 
-00033 void GBFHeadings::setOptionValue(const char *ival)
-00034 {
-00035         option = (!stricmp(ival, on));
-00036 }
-00037 
-00038 const char *GBFHeadings::getOptionValue()
-00039 {
-00040         return (option) ? on:off;
-00041 }
-00042 
-00043 char GBFHeadings::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00044 {
-00045         if (!option) {  // if we don't want headings
-00046                 char *to, *from, token[2048]; // cheese.  Fix.
-00047                 int tokpos = 0;
-00048                 bool intoken = false;
-00049                 int len;
-00050                 bool hide = false;
-00051 
-00052                 len = strlen(text) + 1; // shift string to right of buffer
-00053                 if (len < maxlen) {
-00054                         memmove(&text[maxlen - len], text, len);
-00055                         from = &text[maxlen - len];
-00056                 }
-00057                 else    from = text;    // -------------------------------
-00058 
-00059                 for (to = text; *from; from++) {
-00060                         if (*from == '<') {
-00061                                 intoken = true;
-00062                                 tokpos = 0;
-00063 //                              memset(token, 0, 2048);
-00064                                 token[0] = 0;
-00065                                 token[1] = 0;
-00066                                 token[2] = 0;
-00067                                 continue;
-00068                         }
-00069                         if (*from == '>') {     // process tokens
-00070                                 intoken = false;
-00071                                 switch (*token) {
-00072                                 case 'T':                               // Reference
-00073                                         switch(token[1]) {
-00074                                         case 'S':               // Begin heading
-00075                                                 hide = true;
-00076                                                 break;
-00077                                         case 's':               // end heading
-00078                                                 hide = false;
-00079                                                 break;
-00080                                         }
-00081                                         continue;       // skip token
-00082                                 }
-00083                                 // if not a heading token, keep token in text
-00084                                 if (!hide) {
-00085                                         *to++ = '<';
-00086                                         for (char *tok = token; *tok; tok++)
-00087                                                 *to++ = *tok;
-00088                                         *to++ = '>';
-00089                                 }
-00090                                 continue;
-00091                         }
-00092                         if (intoken) {
-00093                                 if (tokpos < 2045)
-00094                                         token[tokpos++] = *from;
-00095                                         token[tokpos+2] = 0;
-00096                         }
-00097                         else    {
-00098                                 if (!hide) {
-00099                                         *to++ = *from;
-00100                                 }
-00101                         }
-00102                 }
-00103                 *to++ = 0;
-00104                 *to = 0;
-00105         }
-00106         return 0;
-00107 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/gbfheadings_8h-source.html b/doc/api-documentation/html/gbfheadings_8h-source.html deleted file mode 100644 index 215c2a9..0000000 --- a/doc/api-documentation/html/gbfheadings_8h-source.html +++ /dev/null @@ -1,70 +0,0 @@ - - -gbfheadings.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

gbfheadings.h

00001 /*
-00002  *
-00003  * $Id: gbfheadings_8h-source.html,v 1.7 2002/06/20 20:23:08 mgruner Exp $
-00004  *
-00005  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00006  *      CrossWire Bible Society
-00007  *      P. O. Box 2528
-00008  *      Tempe, AZ  85280-2528
-00009  *
-00010  * This program is free software; you can redistribute it and/or modify it
-00011  * under the terms of the GNU General Public License as published by the
-00012  * Free Software Foundation version 2.
-00013  *
-00014  * This program is distributed in the hope that it will be useful, but
-00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00017  * General Public License for more details.
-00018  *
-00019  */
-00020 
-00021 #ifndef GBFHEADINGS_H
-00022 #define GBFHEADINGS_H
-00023 
-00024 #include <swfilter.h>
-00025 
-00026 #include <defs.h>
-00027 
-00030 class SWDLLEXPORT GBFHeadings:public SWFilter
-00031 {
-00032   bool option;
-00033   static const char on[];
-00034   static const char off[];
-00035   static const char optName[];
-00036   static const char optTip[];
-00037   OptionsList options;
-00038 public:
-00039   GBFHeadings ();
-00040   virtual ~ GBFHeadings ();
-00041   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00042   virtual const char *getOptionName ()
-00043   {
-00044     return optName;
-00045   }
-00046   virtual const char *getOptionTip ()
-00047   {
-00048     return optTip;
-00049   }
-00050   virtual void setOptionValue (const char *ival);
-00051   virtual const char *getOptionValue ();
-00052   virtual OptionsList getOptionValues ()
-00053   {
-00054     return options;
-00055   }
-00056 };
-00057 
-00058 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/gbfhtml_8cpp-source.html b/doc/api-documentation/html/gbfhtml_8cpp-source.html deleted file mode 100644 index 9c26fcb..0000000 --- a/doc/api-documentation/html/gbfhtml_8cpp-source.html +++ /dev/null @@ -1,550 +0,0 @@ - - -gbfhtml.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

gbfhtml.cpp

00001 /***************************************************************************
-00002                           gbfhtml.cpp  -  description
-00003                              -------------------
-00004     begin                : Thu Jun 24 1999
-00005     copyright            : (C) 1999 by Torsten Uhlmann
-00006     email                : TUhlmann@gmx.de
-00007  ***************************************************************************/
-00008 
-00009 /***************************************************************************
-00010  *                                                                         *
-00011  *   This program is free software; you can redistribute it and/or modify  *
-00012  *   it under the terms of the GNU General Public License as published by  *
-00013  *   the Free Software Foundation; either version 2 of the License, or     *
-00014  *   (at your option) any later version.                                   *
-00015  *                                                                         *
-00016  ***************************************************************************/
-00017 
-00018 #include <stdlib.h>
-00019 #include <string.h>
-00020 #include <gbfhtml.h>
-00021 
-00022 
-00023 GBFHTML::GBFHTML()
-00024 {
-00025 }
-00026 
-00027 
-00028 char GBFHTML::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00029 {
-00030         char *to, *from, token[2048];
-00031         int tokpos = 0;
-00032         bool intoken    = false;
-00033         bool hasFootnotePreTag = false;
-00034         bool isRightJustified = false;
-00035         bool isCentered = false;
-00036         int len;
-00037         const char *tok;
-00038 
-00039         len = strlen(text) + 1;         // shift string to right of buffer
-00040         if (len < maxlen) {
-00041                 memmove(&text[maxlen - len], text, len);
-00042                 from = &text[maxlen - len];
-00043         }
-00044         else
-00045                 from = text;                    // -------------------------------
-00046         
-00047         for (to = text; *from; from++)
-00048         {
-00049                 if (*from == '\n') {
-00050                         *from = ' ';
-00051                 }                       
-00052                 if (*from == '<') {
-00053                         intoken = true;
-00054                         tokpos = 0;
-00055                         token[0] = 0;
-00056                         token[1] = 0;
-00057                         token[2] = 0;
-00058                         continue;
-00059                 }
-00060                 if (*from == '>') {
-00061                         intoken = false;
-00062                         // process desired tokens
-00063                         switch (*token) {
-00064                                 case 'W':       // Strongs
-00065                                         switch(token[1])
-00066                                         {
-00067                                                 case 'G':               // Greek
-00068                                                 case 'H':               // Hebrew
-00069                                                 case 'T':               // Tense
-00070                                                         *to++ = ' ';
-00071                                                         *to++ = '<';
-00072                                                         *to++ = 's';
-00073                                                         *to++ = 'm';
-00074                                                         *to++ = 'a';
-00075                                                         *to++ = 'l';
-00076                                                         *to++ = 'l';
-00077                                                         *to++ = '>';
-00078                                                         *to++ = '<';
-00079                                                         *to++ = 'e';
-00080                                                         *to++ = 'm';
-00081                                                         *to++ = '>';
-00082                                                         for (tok = token+2; *tok; tok++)
-00083                                                                 *to++ = *tok;
-00084                                                         *to++ = '<';
-00085                                                         *to++ = '/';
-00086                                                         *to++ = 'e';
-00087                                                         *to++ = 'm';
-00088                                                         *to++ = '>';
-00089                                                         *to++ = '<';
-00090                                                         *to++ = '/';
-00091                                                         *to++ = 's';
-00092                                                         *to++ = 'm';
-00093                                                         *to++ = 'a';
-00094                                                         *to++ = 'l';
-00095                                                         *to++ = 'l';
-00096                                                         *to++ = '>';
-00097                                                         *to++ = ' ';
-00098                                                         continue;
-00099                                         }
-00100                                         break;
-00101                                 case 'R':
-00102                                         switch(token[1])
-00103                                         {
-00104                                         case 'X':
-00105                                           *to++ = '<';
-00106                                           *to++ = 'a';
-00107                                           *to++ = ' ';
-00108                                           *to++ = 'h';
-00109                                           *to++ = 'r';
-00110                                           *to++ = 'e';
-00111                                           *to++ = 'f';
-00112                                           *to++ = '=';
-00113                                           *to++ = '\"';
-00114                                           for (tok = token + 3; *tok; tok++) {
-00115                                             if(*tok != '<' && *tok+1 != 'R' && *tok+2 != 'x') {
-00116                                               *to++ = *tok;
-00117                                             }
-00118                                             else {
-00119                                               break;
-00120                                             }
-00121                                           }
-00122                                           *to++ = '\"';
-00123                                           *to++ = '>';
-00124                                           continue;
-00125                                         case 'x':
-00126                                           *to++ = '<';
-00127                                           *to++ = '/';
-00128                                           *to++ = 'a';
-00129                                           *to++ = '>';
-00130                                           continue;
-00131                                           case 'B':                                                             //word(s) explained in footnote
-00132                                                         *to++ = '<';
-00133                                                         *to++ = 'i';
-00134                                                         *to++ = '>';
-00135                                                         hasFootnotePreTag = true; //we have the RB tag
-00136                                                         continue;
-00137                                                 case 'F':               // footnote begin
-00138                                                         if (hasFootnotePreTag) {
-00139                                                                 *to++ = '<';
-00140                                                                 *to++ = '/';
-00141                                                                 *to++ = 'i';
-00142                                                                 *to++ = '>';
-00143                                                                 *to++ = ' ';
-00144                                                         }
-00145                                                         *to++ = '<';
-00146                                                         *to++ = 'f';
-00147                                                         *to++ = 'o';
-00148                                                         *to++ = 'n';
-00149                                                         *to++ = 't';
-00150                                                         *to++ = ' ';
-00151                                                         *to++ = 'c';
-00152                                                         *to++ = 'o';
-00153                                                         *to++ = 'l';
-00154                                                         *to++ = 'o';
-00155                                                         *to++ = 'r';
-00156                                                         *to++ = '=';
-00157                                                         *to++ = '\"';
-00158                                                         *to++ = '#';
-00159                                                         *to++ = '8';
-00160                                                         *to++ = '0';
-00161                                                         *to++ = '0';
-00162                                                         *to++ = '0';
-00163                                                         *to++ = '0';
-00164                                                         *to++ = '0';
-00165                                                         *to++ = '\"';
-00166                                                         *to++ = '>';
-00167 
-00168                                                         *to++ = ' ';
-00169                                                         *to++ = '<';
-00170                                                         *to++ = 's';
-00171                                                         *to++ = 'm';
-00172                                                         *to++ = 'a';
-00173                                                         *to++ = 'l';
-00174                                                         *to++ = 'l';
-00175                                                         *to++ = '>';
-00176                                                         *to++ = '(';
-00177 
-00178                                                         continue;
-00179                                                 case 'f':               // footnote end
-00180                                                         *to++ = ')';
-00181                                                         *to++ = '<';
-00182                                                         *to++ = '/';
-00183                                                         *to++ = 's';
-00184                                                         *to++ = 'm';
-00185                                                         *to++ = 'a';
-00186                                                         *to++ = 'l';
-00187                                                         *to++ = 'l';
-00188                                                         *to++ = '>';
-00189                                                         *to++ = ' ';
-00190                                                         *to++ = '<';
-00191                                                         *to++ = '/';
-00192                                                         *to++ = 'f';
-00193                                                         *to++ = 'o';
-00194                                                         *to++ = 'n';
-00195                                                         *to++ = 't';
-00196                                                         *to++ = '>';
-00197                                                         hasFootnotePreTag = false;
-00198                                                         continue;
-00199                                         }
-00200                                         break;
-00201 
-00202                                 case 'F':                       // font tags
-00203                                         switch(token[1])
-00204                                         {
-00205                                                 case 'I':               // italic start
-00206                                                         *to++ = '<';
-00207                                                         *to++ = 'i';
-00208                                                         *to++ = '>';
-00209                                                         continue;
-00210                                                 case 'i':               // italic end
-00211                                                         *to++ = '<';
-00212                                                         *to++ = '/';
-00213                                                         *to++ = 'i';
-00214                                                         *to++ = '>';
-00215                                                         continue;
-00216                                                 case 'B':               // bold start
-00217                                                         *to++ = '<';
-00218                                                         *to++ = 'b';
-00219                                                         *to++ = '>';
-00220                                                         continue;
-00221                                                 case 'b':               // bold end
-00222                                                         *to++ = '<';
-00223                                                         *to++ = '/';
-00224                                                         *to++ = 'b';
-00225                                                         *to++ = '>';
-00226                                                         continue;
-00227                                                 case 'R':               // words of Jesus begin
-00228                                                         *to++ = '<';
-00229                                                         *to++ = 'f';
-00230                                                         *to++ = 'o';
-00231                                                         *to++ = 'n';
-00232                                                         *to++ = 't';
-00233                                                         *to++ = ' ';
-00234                                                         *to++ = 'c';
-00235                                                         *to++ = 'o';
-00236                                                         *to++ = 'l';
-00237                                                         *to++ = 'o';
-00238                                                         *to++ = 'r';
-00239                                                         *to++ = '=';
-00240                                                         *to++ = '#';
-00241                                                         *to++ = 'F';
-00242                                                         *to++ = 'F';
-00243                                                         *to++ = '0';
-00244                                                         *to++ = '0';
-00245                                                         *to++ = '0';
-00246                                                         *to++ = '0';
-00247                                                         *to++ = '>';
-00248                                                         continue;
-00249                                                 case 'r':               // words of Jesus end
-00250                                                         *to++ = '<';
-00251                                                         *to++ = '/';
-00252                                                         *to++ = 'f';
-00253                                                         *to++ = 'o';
-00254                                                         *to++ = 'n';
-00255                                                         *to++ = 't';
-00256                                                         *to++ = '>';
-00257                                                         continue;
-00258                                                 case 'U':               // Underline start
-00259                                                         *to++ = '<';
-00260                                                         *to++ = 'u';
-00261                                                         *to++ = '>';
-00262                                                         continue;
-00263                                                         case 'u':               // Underline end
-00264                                                         *to++ = '<';
-00265                                                         *to++ = '/';
-00266                                                         *to++ = 'u';
-00267                                                         *to++ = '>';
-00268                                                         continue;
-00269                                                 case 'O':               // Old Testament quote begin
-00270                                                         *to++ = '<';
-00271                                                         *to++ = 'c';
-00272                                                         *to++ = 'i';
-00273                                                         *to++ = 't';
-00274                                                         *to++ = 'e';
-00275                                                         *to++ = '>';
-00276                                                         continue;
-00277                                                 case 'o':               // Old Testament quote end
-00278                                                         *to++ = '<';
-00279                                                         *to++ = '/';
-00280                                                         *to++ = 'c';
-00281                                                         *to++ = 'i';
-00282                                                         *to++ = 't';
-00283                                                         *to++ = 'e';
-00284                                                         *to++ = '>';
-00285                                                         continue;
-00286                                                 case 'S':               // Superscript begin
-00287                                                         *to++ = '<';
-00288                                                         *to++ = 's';
-00289                                                         *to++ = 'u';
-00290                                                         *to++ = 'p';
-00291                                                         *to++ = '>';
-00292                                                         continue;
-00293                                                 case 's':               // Superscript end
-00294                                                         *to++ = '<';
-00295                                                         *to++ = '/';
-00296                                                         *to++ = 's';
-00297                                                         *to++ = 'u';
-00298                                                         *to++ = 'p';
-00299                                                         *to++ = '>';
-00300                                                         continue;
-00301                                                 case 'V':               // Subscript begin
-00302                                                         *to++ = '<';
-00303                                                         *to++ = 's';
-00304                                                         *to++ = 'u';
-00305                                                         *to++ = 'b';
-00306                                                         *to++ = '>';
-00307                                                         continue;
-00308                                                 case 'v':               // Subscript end
-00309                                                         *to++ = '<';
-00310                                                         *to++ = '/';
-00311                                                         *to++ = 's';
-00312                                                         *to++ = 'u';
-00313                                                         *to++ = 'b';
-00314                                                         *to++ = '>';
-00315                                                         continue;
-00316                                                 case 'N':
-00317                                                         *to++ = '<';
-00318                                                         *to++ = 'f';
-00319                                                         *to++ = 'o';
-00320                                                         *to++ = 'n';
-00321                                                         *to++ = 't';
-00322                                                         *to++ = ' ';
-00323                                                         *to++ = 'f';
-00324                                                         *to++ = 'a';
-00325                                                         *to++ = 'c';
-00326                                                         *to++ = 'e';
-00327                                                         *to++ = '=';
-00328                                                         *to++ = '"';
-00329                                                         for (tok = token + 2; *tok; tok++)
-00330                                                                 *to++ = *tok;
-00331                                                         *to++ = '"';
-00332                                                         *to++ = '>';
-00333                                                         continue;
-00334                                                 case 'n':
-00335                                                         *to++ = '<';
-00336                                                         *to++ = '/';
-00337                                                         *to++ = 'f';
-00338                                                         *to++ = 'o';
-00339                                                         *to++ = 'n';
-00340                                                         *to++ = 't';
-00341                                                         *to++ = '>';
-00342                                                         continue;
-00343                                         }
-00344                                         break;
-00345                                 case 'C':                       // special character tags
-00346                                         switch(token[1])
-00347                                         {
-00348                                                 case 'A':               // ASCII value
-00349                                                         *to++ = (char)atoi(&token[2]);
-00350                                                         continue;
-00351                                                 case 'G':
-00352                                                         //*to++ = ' ';
-00353                                                         continue;
-00354                                                 case 'L':               // line break
-00355                                                         *to++ = '<';
-00356                                                         *to++ = 'b';
-00357                                                         *to++ = 'r';
-00358                                                         *to++ = ' ';
-00359                                                         *to++ = '/';
-00360                                                         *to++ = '>';
-00361                                                         *to++ = ' ';
-00362                                                         continue;
-00363                                                 case 'M':               // new paragraph
-00364                                                         *to++ = '<';
-00365                                                         *to++ = 'b';
-00366                                                         *to++ = 'r';
-00367                                                         *to++ = ' ';
-00368                                                         *to++ = '/';
-00369                                                         *to++ = '>';
-00370                                                         continue;
-00371                                                 case 'T':
-00372                                                         //*to++ = ' ';
-00373                                                         continue;
-00374                                         }
-00375                                         break;
-00376                                 case 'J':       //Justification
-00377                                         switch(token[1])
-00378                                         {
-00379                                                 case 'R':       //right
-00380                                                         *to++ = '<';
-00381                                                         *to++ = 'd';
-00382                                                         *to++ = 'i';
-00383                                                         *to++ = 'v';
-00384                                                         *to++ = ' ';
-00385                                                         *to++ = 'a';
-00386                                                         *to++ = 'l';
-00387                                                         *to++ = 'i';
-00388                                                         *to++ = 'g';
-00389                                                         *to++ = 'n';
-00390                                                         *to++ = '=';
-00391                                                         *to++ = '\"';
-00392                                                         *to++ = 'r';
-00393                                                         *to++ = 'i';
-00394                                                         *to++ = 'g';
-00395                                                         *to++ = 'h';
-00396                                                         *to++ = 't';
-00397                                                         *to++ = '\"';
-00398                                                         *to++ = '>';
-00399                                                         isRightJustified = true;
-00400                                                         continue;
-00401 
-00402                                                 case 'C':       //center
-00403                                                         *to++ = '<';
-00404                                                         *to++ = 'd';
-00405                                                         *to++ = 'i';
-00406                                                         *to++ = 'v';
-00407                                                         *to++ = ' ';
-00408                                                         *to++ = 'a';
-00409                                                         *to++ = 'l';
-00410                                                         *to++ = 'i';
-00411                                                         *to++ = 'g';
-00412                                                         *to++ = 'n';
-00413                                                         *to++ = '=';
-00414                                                         *to++ = '\"';
-00415                                                         *to++ = 'c';
-00416                                                         *to++ = 'e';
-00417                                                         *to++ = 'n';
-00418                                                         *to++ = 't';
-00419                                                         *to++ = 'e';
-00420                                                         *to++ = 'r';
-00421                                                         *to++ = '\"';
-00422                                                         *to++ = '>';
-00423                                                         isCentered = true;
-00424                                                         continue;
-00425 
-00426                                                 case 'L': //left, reset right and center
-00427                                                         if (isCentered) {
-00428                                                                 *to++ = '<';
-00429                                                                 *to++ = '/';
-00430                                                                 *to++ = 'c';
-00431                                                                 *to++ = 'e';
-00432                                                                 *to++ = 'n';
-00433                                                                 *to++ = 't';
-00434                                                                 *to++ = 'e';
-00435                                                                 *to++ = 'r';
-00436                                                                 *to++ = '>';
-00437                                                                 isCentered = false;
-00438                                                         }
-00439                                                         if (isRightJustified) {
-00440                                                                 *to++ = '<';
-00441                                                                 *to++ = '/';
-00442                                                                 *to++ = 'd';
-00443                                                                 *to++ = 'i';
-00444                                                                 *to++ = 'v';
-00445                                                                 *to++ = '>';
-00446                                                                 isRightJustified = false;
-00447                                                         }
-00448                                                         continue;
-00449                                         }
-00450                                         break;
-00451                                 case 'T':                       // title formatting
-00452                                         switch(token[1])
-00453                                         {
-00454                                                 case 'T':               // Book title begin
-00455                                                         *to++ = '<';
-00456                                                         *to++ = 'b';
-00457                                                         *to++ = 'i';
-00458                                                         *to++ = 'g';
-00459                                                         *to++ = '>';
-00460                                                         continue;
-00461                                                 case 't':
-00462                                                         *to++ = '<';
-00463                                                         *to++ = '/';
-00464                                                         *to++ = 'b';
-00465                                                         *to++ = 'i';
-00466                                                         *to++ = 'g';
-00467                                                         *to++ = '>';
-00468                                                         continue;/*
-00469                                                 case 'S':
-00470                                                         *to++ = '<';
-00471                                                         *to++ = 'b';
-00472                                                         *to++ = 'r';
-00473                                                         *to++ = ' ';
-00474                                                         *to++ = '/';
-00475                                                         *to++ = '>';
-00476                                                         *to++ = '<';
-00477                                                         *to++ = 'b';
-00478                                                         *to++ = 'i';
-00479                                                         *to++ = 'g';
-00480                                                         *to++ = '>';
-00481                                                         continue;
-00482                                                 case 's':
-00483                                                         *to++ = '<';
-00484                                                         *to++ = '/';
-00485                                                         *to++ = 'b';
-00486                                                         *to++ = 'i';
-00487                                                         *to++ = 'g';
-00488                                                         *to++ = '>';
-00489                                                         *to++ = '<';
-00490                                                         *to++ = 'b';
-00491                                                         *to++ = 'r';
-00492                                                         *to++ = ' ';
-00493                                                         *to++ = '/';
-00494                                                         *to++ = '>';
-00495                                                         continue;*/
-00496                                         }
-00497                                         break;
-00498         
-00499                                 case 'P': // special formatting
-00500                                         switch(token[1])
-00501                                         {
-00502                                                 case 'P': // Poetry begin
-00503                                                         *to++ = '<';
-00504                                                         *to++ = 'c';
-00505                                                         *to++ = 'i';
-00506                                                         *to++ = 't';
-00507                                                         *to++ = 'e';
-00508                                                         *to++ = '>';
-00509                                                         continue;
-00510                                                 case 'p':
-00511                                                         *to++ = '<';
-00512                                                         *to++ = '/';
-00513                                                         *to++ = 'c';
-00514                                                         *to++ = 'i';
-00515                                                         *to++ = 't';
-00516                                                         *to++ = 'e';
-00517                                                         *to++ = '>';
-00518                                                         continue;
-00519                                         }
-00520                                         break;
-00521                         }
-00522                         continue;
-00523                 }
-00524                 if (intoken) {
-00525                         if (tokpos < 2045) {
-00526                                 token[tokpos++] = *from;
-00527                                 token[tokpos+2] = 0;
-00528                         }
-00529                  }
-00530                 else
-00531                         *to++ = *from;
-00532         }
-00533         *to++ = 0;
-00534         *to = 0;
-00535         return 0;
-00536 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/gbfhtml_8h-source.html b/doc/api-documentation/html/gbfhtml_8h-source.html deleted file mode 100644 index 1f12ccd..0000000 --- a/doc/api-documentation/html/gbfhtml_8h-source.html +++ /dev/null @@ -1,50 +0,0 @@ - - -gbfhtml.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

gbfhtml.h

00001 /***************************************************************************
-00002                           gbfhtml.h  -  description
-00003                              -------------------
-00004     begin                : Tue Jun 15 15:34:26 CEST 1999
-00005 
-00006     copyright            : (C) 1999 by Torsten Uhlmann
-00007     email                : TUhlmann@gmx.de
-00008  ***************************************************************************/
-00009 
-00010 /***************************************************************************
-00011  *                                                                         *
-00012  *   This program is free software; you can redistribute it and/or modify  *
-00013  *   it under the terms of the GNU General Public License as published by  *
-00014  *   the Free Software Foundation; either version 2 of the License, or     *
-00015  *   (at your option) any later version.                                   *
-00016  *                                                                         *
-00017  ***************************************************************************/
-00018 
-00019 /* $Header: /usr/local/cvsroot/sword/doc/api-documentation/html/gbfhtml_8h-source.html,v 1.7 2002/06/20 20:23:08 mgruner Exp $ */
-00020 /* $Revision: 1.7 $ */
-00021 
-00022 #ifndef GBFHTML_H
-00023 #define GBFHTML_H
-00024 
-00025 #include <swfilter.h>
-00026 
-00027 #include <defs.h>
-00028 
-00031 class SWDLLEXPORT GBFHTML:public SWFilter
-00032 {
-00033 public:
-00034   GBFHTML ();
-00035   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00036 };
-00037 
-00038 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/gbfhtmlhref_8cpp-source.html b/doc/api-documentation/html/gbfhtmlhref_8cpp-source.html deleted file mode 100644 index 07a0d60..0000000 --- a/doc/api-documentation/html/gbfhtmlhref_8cpp-source.html +++ /dev/null @@ -1,162 +0,0 @@ - - -gbfhtmlhref.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

gbfhtmlhref.cpp

00001 /***************************************************************************
-00002                           gbfhtmlhref.cpp  -   GBF to HTML filter with hrefs 
-00003                                 for strongs and morph tags
-00004                              -------------------
-00005     begin                    : 2001-09-03
-00006     copyright            : 2001 by CrossWire Bible Society
-00007  ***************************************************************************/
-00008 
-00009 /***************************************************************************
-00010  *                                                                         *
-00011  *   This program is free software; you can redistribute it and/or modify  *
-00012  *   it under the terms of the GNU General Public License as published by  *
-00013  *   the Free Software Foundation; either version 2 of the License, or     *
-00014  *   (at your option) any later version.                                   *
-00015  *                                                                         *
-00016  ***************************************************************************/
-00017 
-00018 #include <stdlib.h>
-00019 #include <string.h>
-00020 #include <gbfhtmlhref.h>
-00021 
-00022 GBFHTMLHREF::GBFHTMLHREF() {
-00023         setTokenStart("<");
-00024         setTokenEnd(">");
-00025         
-00026         setTokenCaseSensitive(true);
-00027 
-00028         addTokenSubstitute("Rf", ")</small></font>");
-00029         addTokenSubstitute("Rx", "</a>");
-00030         addTokenSubstitute("FI", "<i>"); // italics begin
-00031         addTokenSubstitute("Fi", "</i>");
-00032         addTokenSubstitute("FB", "<n>"); // bold begin
-00033         addTokenSubstitute("Fb", "</n>");
-00034         addTokenSubstitute("FR", "<font color=\"#FF0000\">"); // words of Jesus begin
-00035         addTokenSubstitute("Fr", "</font>");
-00036         addTokenSubstitute("FU", "<u>"); // underline begin
-00037         addTokenSubstitute("Fu", "</u>");
-00038         addTokenSubstitute("FO", "<cite>"); //  Old Testament quote begin
-00039         addTokenSubstitute("Fo", "</cite>");
-00040         addTokenSubstitute("FS", "<sup>"); // Superscript begin// Subscript begin
-00041         addTokenSubstitute("Fs", "</sup>");
-00042         addTokenSubstitute("FV", "<sub>"); // Subscript begin
-00043         addTokenSubstitute("Fv", "</sub>");
-00044         addTokenSubstitute("TT", "<big>"); // Book title begin
-00045         addTokenSubstitute("Tt", "</big>");
-00046         addTokenSubstitute("PP", "<cite>"); //  poetry  begin
-00047         addTokenSubstitute("Pp", "</cite>");
-00048         addTokenSubstitute("Fn", "</font>"); //  font  end
-00049         addTokenSubstitute("CL", "<br />"); //  new line
-00050         addTokenSubstitute("CM", "<!P><br />"); //  paragraph <!P> is a non showing comment that can be changed in the front end to <P> if desired
-00051         addTokenSubstitute("CG", ""); //  ???
-00052         addTokenSubstitute("CT", ""); // ???
-00053         addTokenSubstitute("JR", "<div align=\"right\">"); // right align begin
-00054         addTokenSubstitute("JC", "<div align=\"center\">"); // center align begin
-00055         addTokenSubstitute("JL", "</div>"); // align end
-00056         
-00057 }
-00058 
-00059 
-00060 bool GBFHTMLHREF::handleToken(char **buf, const char *token, DualStringMap &userData) {
-00061         const char *tok;
-00062 
-00063         if (!substituteToken(buf, token)) {
-00064                 if (!strncmp(token, "WG", 2) || !strncmp(token, "WH", 2)) { // strong's numbers
-00065                         pushString(buf, " <small><em>&lt;<a href=\"#");
-00066                         for (tok = token+1; *tok; tok++)
-00067                                 //if(token[i] != '\"')
-00068                                         *(*buf)++ = *tok;
-00069                         *(*buf)++ = '\"';
-00070                         *(*buf)++ = '>';
-00071                         for (tok = token + 2; *tok; tok++)
-00072                                 //if(token[i] != '\"')
-00073                                         *(*buf)++ = *tok;
-00074                         pushString(buf, "</a>&gt;</em></small>");
-00075                 }
-00076 
-00077                 else if (!strncmp(token, "WTG", 3) || !strncmp(token, "WTH", 3)) { // strong's numbers tense
-00078                         pushString(buf, " <small><em>(<A HREF=\"#");
-00079                         for (tok = token + 2; *tok; tok++)
-00080                                 if(*tok != '\"')
-00081                                         *(*buf)++ = *tok;
-00082                         *(*buf)++ = '\"';
-00083                         *(*buf)++ = '>';
-00084                         for (tok = token + 3; *tok; tok++)
-00085                                 if(*tok != '\"')
-00086                                         *(*buf)++ = *tok;
-00087                         pushString(buf, "</a>)</em></small>");
-00088                 }
-00089 
-00090                 else if (!strncmp(token, "WT", 2) && strncmp(token, "WTH", 3) && strncmp(token, "WTG", 3)) { // morph tags
-00091                         pushString(buf, " <small><em>(<a href=\"M");
-00092                         for (tok = token + 2; *tok; tok++)
-00093                                 if(*tok != '\"')
-00094                                         *(*buf)++ = *tok;
-00095                         *(*buf)++ = '\"';
-00096                         *(*buf)++ = '>';
-00097                         for (tok = token + 2; *tok; tok++)                              
-00098                                 if(*tok != '\"')                        
-00099                                         *(*buf)++ = *tok;               
-00100                         pushString(buf, "</a>)</em></small>");
-00101                 }
-00102 
-00103                 else if (!strncmp(token, "RX", 2)) {
-00104                         pushString(buf, "<a href=\"");
-00105                         for (tok = token + 3; *tok; tok++) {
-00106                           if(*tok != '<' && *tok+1 != 'R' && *tok+2 != 'x') {
-00107                             *(*buf)++ = *tok;
-00108                           }
-00109                           else {
-00110                             break;
-00111                           }
-00112                         }
-00113                         *(*buf)++ = '\"';
-00114                         *(*buf)++ = '>';
-00115                 }
-00116 
-00117                 else if (!strncmp(token, "RB", 2)) {
-00118                         pushString(buf, "<i>");
-00119                         userData["hasFootnotePreTag"] = "true";
-00120                 }
-00121 
-00122                 else if (!strncmp(token, "RF", 2)) {
-00123                         if(userData["hasFootnotePreTag"] == "true") {
-00124                                 userData["hasFootnotePreTag"] = "false";
-00125                                 pushString(buf, "</i> ");
-00126                         }
-00127                         pushString(buf, "<font color=\"#800000\"><small> (");
-00128                 }
-00129 
-00130                 else if (!strncmp(token, "FN", 2)) {
-00131                         pushString(buf, "<font face=\"");
-00132                         for (tok = token + 2; *tok; tok++)                              
-00133                                 if(*tok != '\"')                        
-00134                                         *(*buf)++ = *tok;
-00135                         *(*buf)++ = '\"';
-00136                         *(*buf)++ = '>';
-00137                 }
-00138 
-00139                 else if (!strncmp(token, "CA", 2)) {    // ASCII value
-00140                         *(*buf)++ = (char)atoi(&token[2]);
-00141                 }
-00142                 
-00143                 else {
-00144                         return false;
-00145                 }
-00146         }
-00147         return true;
-00148 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/gbfhtmlhref_8h-source.html b/doc/api-documentation/html/gbfhtmlhref_8h-source.html deleted file mode 100644 index 237131f..0000000 --- a/doc/api-documentation/html/gbfhtmlhref_8h-source.html +++ /dev/null @@ -1,45 +0,0 @@ - - -gbfhtmlhref.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

gbfhtmlhref.h

00001 /*-*************************************************************************
-00002                           gbfhtmlhref.h  -  description
-00003                              -------------------
-00004     begin                    : 2001-09-03
-00005     copyright            : 2001 by CrossWire Bible Society
-00006  ***************************************************************************/
-00007 
-00008 /***************************************************************************
-00009  *                                                                         *
-00010  *   This program is free software; you can redistribute it and/or modify  *
-00011  *   it under the terms of the GNU General Public License as published by  *
-00012  *   the Free Software Foundation; either version 2 of the License, or     *
-00013  *   (at your option) any later version.                                   *
-00014  *                                                                         *
-00015  ***************************************************************************/
-00016 
-00017 #ifndef GBFHTMLHREF_H
-00018 #define GBFHTMLHREF_H
-00019 
-00020 #include <swbasicfilter.h>
-00021 
-00022 #include <defs.h>
-00023 
-00026 class SWDLLEXPORT GBFHTMLHREF : public SWBasicFilter {
-00027 protected:
-00028         virtual bool handleToken(char **buf, const char *token, DualStringMap &userData);
-00029 public:
-00030   GBFHTMLHREF ();
-00031 };
-00032 
-00033 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/gbfmorph_8cpp-source.html b/doc/api-documentation/html/gbfmorph_8cpp-source.html deleted file mode 100644 index 8598147..0000000 --- a/doc/api-documentation/html/gbfmorph_8cpp-source.html +++ /dev/null @@ -1,112 +0,0 @@ - - -gbfmorph.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

gbfmorph.cpp

00001 /******************************************************************************
-00002  *
-00003  * gbfmorph -   SWFilter decendant to hide or show morph tags
-00004  *                      in a GBF module.
-00005  */
-00006 
-00007 
-00008 #include <stdlib.h>
-00009 #include <string.h>
-00010 #include <gbfmorph.h>
-00011 #ifndef __GNUC__
-00012 #else
-00013 #include <unixstr.h>
-00014 #endif
-00015 
-00016 
-00017 const char GBFMorph::on[] = "On";
-00018 const char GBFMorph::off[] = "Off";
-00019 const char GBFMorph::optName[] = "Morphological Tags";
-00020 const char GBFMorph::optTip[] = "Toggles Morphological Tags On and Off if they exist";
-00021 
-00022 
-00023 GBFMorph::GBFMorph() {
-00024         option = false;
-00025         options.push_back(on);
-00026         options.push_back(off);
-00027 }
-00028 
-00029 
-00030 GBFMorph::~GBFMorph() {
-00031 }
-00032 
-00033 void GBFMorph::setOptionValue(const char *ival)
-00034 {
-00035         option = (!stricmp(ival, on));
-00036 }
-00037 
-00038 const char *GBFMorph::getOptionValue()
-00039 {
-00040         return (option) ? on:off;
-00041 }
-00042 
-00043 char GBFMorph::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00044 {
-00045         if (!option) {  // if we don't want morph tags
-00046                 char *to, *from, token[2048]; // cheese.  Fix.
-00047                 int tokpos = 0;
-00048                 bool intoken = false;
-00049                 int len;
-00050                 bool lastspace = false;
-00051 
-00052                 len = strlen(text) + 1; // shift string to right of buffer
-00053                 if (len < maxlen) {
-00054                         memmove(&text[maxlen - len], text, len);
-00055                         from = &text[maxlen - len];
-00056                 }
-00057                 else    from = text;    // -------------------------------
-00058 
-00059                 for (to = text; *from; from++) {
-00060                         if (*from == '<') {
-00061                                 intoken = true;
-00062                                 tokpos = 0;
-00063                                 token[0] = 0;
-00064                                 token[1] = 0;
-00065                                 token[2] = 0;
-00066                                 continue;
-00067                         }
-00068                         if (*from == '>') {     // process tokens
-00069                                 intoken = false;
-00070                                 if (*token == 'W' && token[1] == 'T') { // Morph
-00071                                   if ((from[1] == ' ') || (from[1] == ',') || (from[1] == ';') || (from[1] == '.') || (from[1] == '?') || (from[1] == '!') || (from[1] == ')') || (from[1] == '\'') || (from[1] == '\"')) {
-00072                                     if (lastspace)
-00073                                       to--;
-00074                                   }
-00075                                   continue;
-00076                                 }
-00077                                 // if not a morph tag token, keep token in text
-00078                                 *to++ = '<';
-00079                                 for (char *tok = token; *tok; tok++)
-00080                                         *to++ = *tok;
-00081                                 *to++ = '>';
-00082                                 continue;
-00083                         }
-00084                         if (intoken) {
-00085                                 if (tokpos < 2045)
-00086                                         token[tokpos++] = *from;
-00087                                         token[tokpos+2] = 0;
-00088                         }
-00089                         else    {
-00090                                 *to++ = *from;
-00091                                 lastspace = (*from == ' ');
-00092                         }
-00093                 }
-00094                 *to++ = 0;
-00095                 *to = 0;
-00096         }
-00097         return 0;
-00098 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/gbfmorph_8h-source.html b/doc/api-documentation/html/gbfmorph_8h-source.html deleted file mode 100644 index b92fd2c..0000000 --- a/doc/api-documentation/html/gbfmorph_8h-source.html +++ /dev/null @@ -1,69 +0,0 @@ - - -gbfmorph.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

gbfmorph.h

00001 /*
-00002  *
-00003  *
-00004  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00005  *      CrossWire Bible Society
-00006  *      P. O. Box 2528
-00007  *      Tempe, AZ  85280-2528
-00008  *
-00009  * This program is free software; you can redistribute it and/or modify it
-00010  * under the terms of the GNU General Public License as published by the
-00011  * Free Software Foundation version 2.
-00012  *
-00013  * This program is distributed in the hope that it will be useful, but
-00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00016  * General Public License for more details.
-00017  *
-00018  */
-00019 
-00020 #ifndef GBFMORPH_H
-00021 #define GBFMORPH_H
-00022 
-00023 #include <swfilter.h>
-00024 
-00025 #include <defs.h>
-00026 
-00029 class SWDLLEXPORT GBFMorph:public SWFilter
-00030 {
-00031   bool option;
-00032   static const char on[];
-00033   static const char off[];
-00034   static const char optName[];
-00035   static const char optTip[];
-00036   OptionsList options;
-00037 public:
-00038     GBFMorph ();
-00039     virtual ~ GBFMorph ();
-00040   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00041   virtual const char *getOptionName ()
-00042   {
-00043     return optName;
-00044   }
-00045   virtual const char *getOptionTip ()
-00046   {
-00047     return optTip;
-00048   }
-00049   virtual void setOptionValue (const char *ival);
-00050   virtual const char *getOptionValue ();
-00051   virtual OptionsList getOptionValues ()
-00052   {
-00053     return options;
-00054   }
-00055 };
-00056 
-00057 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/gbfosis_8cpp-source.html b/doc/api-documentation/html/gbfosis_8cpp-source.html deleted file mode 100644 index 5ef95db..0000000 --- a/doc/api-documentation/html/gbfosis_8cpp-source.html +++ /dev/null @@ -1,325 +0,0 @@ - - -gbfosis.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

gbfosis.cpp

00001 /******************************************************************************
-00002  *
-00003  * gbfstrongs - SWFilter decendant to hide or show strongs number
-00004  *                      in a GBF module.
-00005  */
-00006 
-00007 
-00008 #include <stdlib.h>
-00009 #include <stdio.h>
-00010 #include <string.h>
-00011 #include <gbfosis.h>
-00012 #include <swmodule.h>
-00013 #include <versekey.h>
-00014 #ifndef __GNUC__
-00015 #else
-00016 #include <unixstr.h>
-00017 #endif
-00018 
-00019 
-00020 GBFOSIS::GBFOSIS() {
-00021 }
-00022 
-00023 
-00024 GBFOSIS::~GBFOSIS() {
-00025 }
-00026 
-00027 
-00028 char GBFOSIS::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module) {
-00029 
-00030         char *to, *from, token[2048]; // cheese.  Fix.
-00031         int tokpos = 0;
-00032         bool intoken = false;
-00033         int len;
-00034         bool lastspace = false;
-00035         int word = 1;
-00036         char val[128];
-00037         char buf[128];
-00038         char wordstr[5];
-00039         char *valto;
-00040         char *ch;
-00041         char *textStart, *textEnd;
-00042         char *wordStart, *wordEnd;
-00043         bool newText = false;
-00044         bool newWord = false;
-00045         string tmp;
-00046         bool suspendTextPassThru = false;
-00047         bool keepToken = false;
-00048 
-00049         len = strlen(text) + 1; // shift string to right of buffer
-00050         if (len < maxlen) {
-00051                 memmove(&text[maxlen - len], text, len);
-00052                 from = &text[maxlen - len];
-00053         }
-00054         else    from = text;
-00055         
-00056         textStart = from;
-00057         wordStart = text;
-00058 
-00059         // -------------------------------
-00060 
-00061         for (to = text; *from; from++) {
-00062                 if (*from == '<') {
-00063                         intoken = true;
-00064                         tokpos = 0;
-00065                         token[0] = 0;
-00066                         token[1] = 0;
-00067                         token[2] = 0;
-00068                         textEnd = from-1;
-00069                         wordEnd = to;
-00070                         continue;
-00071                 }
-00072                 if (*from == '>') {     // process tokens
-00073                         intoken = false;
-00074                         keepToken = false;
-00075                         suspendTextPassThru = false;
-00076                         newWord = true;
-00077 
-00078 
-00079                         while (wordStart < (text+maxlen)) {
-00080 //                              if (strchr(" ,;.?!()'\"", *wordStart))
-00081                                 if (strchr(";, .:?!()'\"", *wordStart))
-00082                                         wordStart++;
-00083                                 else break;
-00084                         }
-00085                         while (wordEnd > wordStart) {
-00086                                 if (strchr(" ,;.:?!()'\"", *wordEnd))
-00087                                         wordEnd--;
-00088                                 else break;
-00089                         }
-00090 
-00091                         // Scripture Reference
-00092                         if (!strncmp(token, "scripRef", 8)) {
-00093         //                      pushString(buf, "<reference work=\"Bible.KJV\" reference=\"");
-00094                                 suspendTextPassThru = true;
-00095                                 newText = true;
-00096                         }
-00097                         else    if (!strncmp(token, "/scripRef", 9)) {
-00098                                 tmp = "";
-00099                                 tmp.append(textStart, (int)(textEnd - textStart)+1);
-00100                                 pushString(&to, convertToOSIS(tmp.c_str(), key));
-00101                                 suspendTextPassThru = false;
-00102                         }
-00103 
-00104                         // Footnote
-00105                         if (!strcmp(token, "RF")) {
-00106         //                      pushString(buf, "<reference work=\"Bible.KJV\" reference=\"");
-00107                                 suspendTextPassThru = true;
-00108                                 newText = true;
-00109                         }
-00110                         else    if (!strcmp(token, "Rf")) {
-00111                                 tmp = "<note type=\"x-StudyNote\"><notePart type=\"x-MainText\">";
-00112                                 tmp.append(textStart, (int)(textEnd - textStart)+1);
-00113                                 tmp += "</notePart></note>";
-00114                                 pushString(&to, tmp.c_str());
-00115                                 suspendTextPassThru = false;
-00116                         }
-00117 
-00118                         // Figure
-00119                         else    if (!strncmp(token, "img ", 4)) {
-00120                                 const char *src = strstr(token, "src");
-00121                                 if (!src)               // assert we have a src attribute
-00122                                         return false;
-00123 
-00124                                 pushString(&to, "<figure src=\"");
-00125                                 const char *c;
-00126                                 for (c = src;((*c) && (*c != '"')); c++);
-00127 
-00128                                 /* uncomment for SWORD absolute path logic
-00129                                 if (*(c+1) == '/') {
-00130                                         pushString(buf, "file:");
-00131                                         pushString(buf, module->getConfigEntry("AbsoluteDataPath"));
-00132                                         if (*((*buf)-1) == '/')
-00133                                                 c++;            // skip '/'
-00134                                 }
-00135                                 end of uncomment for asolute path logic */
-00136 
-00137                                 for (c++;((*c) && (*c != '"')); c++)
-00138                                         *to++ = *c;
-00139 
-00140                                 pushString(&to, "\" />");
-00141                                 return true;
-00142                         }
-00143 
-00144                         // Strongs numbers
-00145                         else if (*token == 'W' && (token[1] == 'G' || token[1] == 'H')) {       // Strongs
-00146                                 if (module->isProcessEntryAttributes()) {
-00147                                         valto = val;
-00148                                         for (unsigned int i = 1; ((token[i]) && (i < 150)); i++)
-00149                                                 *valto++ = token[i];
-00150                                         *valto = 0;
-00151                                         // normal strongs number
-00152                                         strstrip(val);
-00153                                         if (!strncmp(wordStart, "<w ", 3)) {
-00154                                                 sprintf(buf, "lemma=\"x-Strong:%s\" ", val);
-00155                                                 memmove(wordStart+3+strlen(buf), wordStart+3, (to-wordStart)+1);
-00156                                                 memcpy(wordStart+3, buf, strlen(buf));
-00157                                                 to+=strlen(buf);
-00158                                         }
-00159                                         else {
-00160                                                 sprintf(buf, "<w lemma=\"x-Strong:%s\">", val);
-00161                                                 memmove(wordStart+strlen(buf), wordStart, (to-wordStart)+1);
-00162                                                 memcpy(wordStart, buf, strlen(buf));
-00163                                                 to+=strlen(buf);
-00164                                                 pushString(&to, "</w>");
-00165                                                 module->getEntryAttributes()["Word"][wordstr]["Strongs"] = val;
-00166                                         }
-00167                                 }
-00168                         }
-00169 
-00170                         // Morphology
-00171                         else if (*token == 'W' && token[1] == 'T' && (token[2] == 'G' || token[2] == 'H')) {    // Strongs
-00172                                 valto = val;
-00173                                 for (unsigned int i = 1; ((token[i]) && (i < 150)); i++)
-00174                                         *valto++ = token[i];
-00175                                 *valto = 0;
-00176                                 strstrip(val);
-00177                                 if (!strncmp(wordStart, "<w ", 3)) {
-00178                                         sprintf(buf, "morph=\"x-%s:%s\" ", "StrongsMorph", val);
-00179                                         memmove(wordStart+3+strlen(buf), wordStart+3, (to-wordStart)+1);
-00180                                         memcpy(wordStart+3, buf, strlen(buf));
-00181                                         to+=strlen(buf);
-00182                                 }
-00183                                 else {
-00184                                         sprintf(buf, "<w morph=\"x-%s:%s\">", "StrongsMorph", val);
-00185                                         memmove(wordStart+strlen(buf), wordStart, (to-wordStart)+1);
-00186                                         memcpy(wordStart, buf, strlen(buf));
-00187                                         to+=strlen(buf);
-00188                                         pushString(&to, "</w>");
-00189                                 }
-00190                         }
-00191 
-00192                         if (!keepToken) {       // if we don't want strongs
-00193                                 if (from[1] && strchr(" ,;.:?!()'\"", from[1])) {
-00194                                         if (lastspace)
-00195                                                 to--;
-00196                                 }
-00197                                 if (newText) {textStart = from+1; newText = false; }
-00198 //                              if (newWord) {wordStart = to; newWord = false; }
-00199                                 continue;
-00200                         }
-00201                         // if not a strongs token, keep token in text
-00202                         *to++ = '<';
-00203                         for (char *tok = token; *tok; tok++)
-00204                                 *to++ = *tok;
-00205                         *to++ = '>';
-00206                         if (newText) {textStart = to; newWord = false; }
-00207 //                      if (newWord) {wordStart = to; newWord = false; }
-00208                         continue;
-00209                 }
-00210                 if (intoken) {
-00211                         if ((tokpos < 2045) && ((*from != 10)&&(*from != 13))) {
-00212                                 token[tokpos++] = *from;
-00213                                 token[tokpos+2] = 0;
-00214                         }
-00215                 }
-00216                 else    {
-00217                         if (newWord && (*from != ' ')) {wordStart = to; newWord = false; memset(to, 0, 10); }
-00218                         if (!suspendTextPassThru) {
-00219                                 *to++ = *from;
-00220                                 lastspace = (*from == ' ');
-00221                         }
-00222                 }
-00223         }
-00224 
-00225         VerseKey *vkey = SWDYNAMIC_CAST(VerseKey, key);
-00226         if (vkey) {
-00227                 char ref[254];
-00228                 if (vkey->Verse())
-00229                         sprintf(ref, "<verseStart ref=\"%s\" />", vkey->getOSISRef());
-00230                 else if (vkey->Chapter())
-00231                         sprintf(ref, "<chapterStart ref=\"%s\" />", vkey->getOSISRef());
-00232                 else if (vkey->Book())
-00233                         sprintf(ref, "<bookStart ref=\"%s\" />", vkey->getOSISRef());
-00234                 else *ref = 0;
-00235                 if (*ref) {
-00236                         memmove(text+strlen(ref), text, maxlen-strlen(ref)-1);
-00237                         memcpy(text, ref, strlen(ref));
-00238                         to+=strlen(ref);
-00239                         if (vkey->Verse()) {
-00240                                 VerseKey tmp;
-00241                                 tmp = *vkey;
-00242                                 tmp.AutoNormalize(0);
-00243                                 tmp.Headings(1);
-00244                                 sprintf(ref, "<verseEnd ref=\"%s\" />", vkey->getOSISRef());
-00245                                 pushString(&to, ref);
-00246                                 tmp = MAXVERSE;
-00247                                 if (*vkey == tmp) {
-00248                                         tmp.Verse(0);
-00249                                         sprintf(ref, "<chapterEnd ref=\"%s\" />", tmp.getOSISRef());
-00250                                         pushString(&to, ref);
-00251                                         tmp = MAXCHAPTER;
-00252                                         tmp = MAXVERSE;
-00253                                         if (*vkey == tmp) {
-00254                                                 tmp.Chapter(0);
-00255                                                 tmp.Verse(0);
-00256                                                 sprintf(ref, "<bookEnd ref=\"%s\" />", tmp.getOSISRef());
-00257                                                 pushString(&to, ref);
-00258                                         }
-00259                                 }
-00260                         }
-00261 
-00262                         else if (vkey->Chapter())
-00263                                 sprintf(ref, "<chapterStart ref=\"%s\" />", vkey->getOSISRef());
-00264                         else sprintf(ref, "<bookStart ref=\"%s\" />", vkey->getOSISRef());
-00265                 }
-00266         }
-00267         *to++ = 0;
-00268         *to = 0;
-00269         return 0;
-00270 }
-00271 
-00272 
-00273 void GBFOSIS::pushString(char **buf, const char *format, ...) {
-00274   va_list argptr;
-00275 
-00276   va_start(argptr, format);
-00277   *buf += vsprintf(*buf, format, argptr);
-00278   va_end(argptr);
-00279 
-00280 //  *buf += strlen(*buf);
-00281 }
-00282 
-00283 
-00284 const char *GBFOSIS::convertToOSIS(const char *inRef, const SWKey *key) {
-00285         static string outRef;
-00286 
-00287         outRef = "";
-00288 
-00289         VerseKey defLanguage;
-00290         ListKey verses = defLanguage.ParseVerseList(inRef, (*key), true);
-00291         const char *startFrag = inRef;
-00292         for (int i = 0; i < verses.Count(); i++) {
-00293                 VerseKey *element = SWDYNAMIC_CAST(VerseKey, verses.GetElement(i));
-00294                 char buf[5120];
-00295                 char frag[800];
-00296                 if (element) {
-00297                         memmove(frag, startFrag, ((const char *)element->userData - startFrag) + 1);
-00298                         frag[((const char *)element->userData - startFrag) + 1] = 0;
-00299                         startFrag = (const char *)element->userData + 1;
-00300                         sprintf(buf, "<reference refStart=\"KJV:%s\" refEnd=\"%s\">%s</reference>", element->LowerBound().getOSISRef(), element->UpperBound().getOSISRef(), frag);
-00301                 }
-00302                 else {
-00303                         memmove(frag, startFrag, ((const char *)verses.GetElement(i)->userData - startFrag) + 1);
-00304                         frag[((const char *)verses.GetElement(i)->userData - startFrag) + 1] = 0;
-00305                         startFrag = (const char *)verses.GetElement(i)->userData + 1;
-00306                         sprintf(buf, "<reference refStart=\"KJV:%s\">%s</reference>", VerseKey(*verses.GetElement(i)).getOSISRef(), frag);
-00307                 }
-00308                 outRef+=buf;
-00309         }
-00310         return outRef.c_str();
-00311 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/gbfosis_8h-source.html b/doc/api-documentation/html/gbfosis_8h-source.html deleted file mode 100644 index 3705dd1..0000000 --- a/doc/api-documentation/html/gbfosis_8h-source.html +++ /dev/null @@ -1,47 +0,0 @@ - - -gbfosis.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

gbfosis.h

00001 /***************************************************************************
-00002                           gbfosis.h  -  description
-00003                              -------------------
-00004     begin                : 2001-09-03
-00005     copyright            : 2001 by CrossWire Bible Society
-00006  ***************************************************************************/
-00007 
-00008 /***************************************************************************
-00009  *                                                                         *
-00010  *   This program is free software; you can redistribute it and/or modify  *
-00011  *   it under the terms of the GNU General Public License as published by  *
-00012  *   the Free Software Foundation; either version 2 of the License, or     *
-00013  *   (at your option) any later version.                                   *
-00014  *                                                                         *
-00015  ***************************************************************************/
-00016 
-00017 #ifndef GBFOSIS_H
-00018 #define GBFOSIS_H
-00019 
-00020 #include <defs.h>
-00021 #include <swfilter.h>
-00022 
-00025 class SWDLLEXPORT GBFOSIS : public SWFilter {
-00026 protected:
-00027         virtual const char *convertToOSIS(const char *, const SWKey *key);
-00028         void pushString(char **buf, const char *format, ...);
-00029 public:
-00030         GBFOSIS();
-00031         virtual ~GBFOSIS();
-00032         char ProcessText(char *text, int maxlen, const SWKey *, const SWModule * = 0);
-00033 };
-00034 
-00035 #endif /* THMLOSIS_H */
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/gbfplain_8cpp-source.html b/doc/api-documentation/html/gbfplain_8cpp-source.html deleted file mode 100644 index d956f6e..0000000 --- a/doc/api-documentation/html/gbfplain_8cpp-source.html +++ /dev/null @@ -1,120 +0,0 @@ - - -gbfplain.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

gbfplain.cpp

00001 /******************************************************************************
-00002  *
-00003  * gbfplain -   SWFilter decendant to strip out all GBF tags or convert to
-00004  *              ASCII rendered symbols.
-00005  */
-00006 
-00007 
-00008 #include <stdlib.h>
-00009 #include <string.h>
-00010 #include <gbfplain.h>
-00011 
-00012 
-00013 GBFPlain::GBFPlain() {
-00014 }
-00015 
-00016 
-00017 char GBFPlain::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00018 {
-00019         char *to, *from, token[2048];
-00020         int tokpos = 0;
-00021         bool intoken = false;
-00022         int len;
-00023 
-00024         len = strlen(text) + 1;                                         // shift string to right of buffer
-00025         if (len < maxlen) {
-00026                 memmove(&text[maxlen - len], text, len);
-00027                 from = &text[maxlen - len];
-00028         }
-00029         else    from = text;                                                    // -------------------------------
-00030         
-00031         for (to = text; *from; from++) {
-00032                 if (*from == '<') {
-00033                         intoken = true;
-00034                         tokpos = 0;
-00035                         token[0] = 0;
-00036                         token[1] = 0;
-00037                         token[2] = 0;
-00038                         continue;
-00039                 }
-00040                 if (*from == '>') {
-00041                         intoken = false;
-00042                                                 // process desired tokens
-00043                         switch (*token) {
-00044                         case 'W':       // Strongs
-00045                                 switch(token[1]) {
-00046                                         case 'G':               // Greek
-00047                                         case 'H':               // Hebrew
-00048                                         case 'T':               // Tense
-00049                                                 *to++ = ' ';
-00050                                                 *to++ = '<';
-00051                                                 for (char *tok = token + 2; *tok; tok++)
-00052                                                         *to++ = *tok;
-00053                                                 *to++ = '>';
-00054                                                 *to++ = ' ';
-00055                                                 continue;
-00056                                 }
-00057                                 break;
-00058                         case 'R':
-00059                                 switch(token[1]) {
-00060                                 case 'F':               // footnote begin
-00061                                         *to++ = ' ';
-00062                                         *to++ = '[';
-00063                                         continue;
-00064                                 case 'f':               // footnote end
-00065                                         *to++ = ']';
-00066                                         *to++ = ' ';
-00067                                         continue;
-00068                                 }
-00069                                 break;
-00070                         case 'C':
-00071                                 switch(token[1]) {
-00072                                 case 'A':               // ASCII value
-00073                                         *to++ = (char)atoi(&token[2]);
-00074                                         continue;
-00075                                 case 'G':
-00076                                         *to++ = '>';
-00077                                         continue;
-00078 /*                                                              Bug in WEB
-00079                                 case 'L':
-00080                                         *to++ = '<';
-00081                                         continue;
-00082 */
-00083                                 case 'L':       //        Bug in WEB.  Use above entry when fixed
-00084                                 case 'N':               // new line
-00085                                         *to++ = '\n';
-00086                                         continue;
-00087                                 case 'M':               // new paragraph
-00088                                         *to++ = '\n';
-00089                                         *to++ = '\n';
-00090                                         continue;
-00091                                 }
-00092                                 break;
-00093                         }
-00094                         continue;
-00095                 }
-00096                 if (intoken) {
-00097                         if (tokpos < 2045)
-00098                                 token[tokpos++] = *from;
-00099                                 token[tokpos+2] = 0;
-00100                 }
-00101                 else    *to++ = *from;
-00102         }
-00103         *to++ = 0;
-00104         *to = 0;
-00105         return 0;
-00106 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/gbfplain_8h-source.html b/doc/api-documentation/html/gbfplain_8h-source.html deleted file mode 100644 index 48a2482..0000000 --- a/doc/api-documentation/html/gbfplain_8h-source.html +++ /dev/null @@ -1,49 +0,0 @@ - - -gbfplain.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

gbfplain.h

00001 /*
-00002  *
-00003  * $Id: gbfplain_8h-source.html,v 1.7 2002/06/20 20:23:08 mgruner Exp $
-00004  *
-00005  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00006  *      CrossWire Bible Society
-00007  *      P. O. Box 2528
-00008  *      Tempe, AZ  85280-2528
-00009  *
-00010  * This program is free software; you can redistribute it and/or modify it
-00011  * under the terms of the GNU General Public License as published by the
-00012  * Free Software Foundation version 2.
-00013  *
-00014  * This program is distributed in the hope that it will be useful, but
-00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00017  * General Public License for more details.
-00018  *
-00019  */
-00020 
-00021 #ifndef GBFPLAIN_H
-00022 #define GBFPLAIN_H
-00023 
-00024 #include <swfilter.h>
-00025 
-00026 #include <defs.h>
-00027 
-00030 class SWDLLEXPORT GBFPlain:public SWFilter
-00031 {
-00032 public:
-00033   GBFPlain ();
-00034   virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule * = 0);
-00035 };
-00036 
-00037 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/gbfrtf_8cpp-source.html b/doc/api-documentation/html/gbfrtf_8cpp-source.html deleted file mode 100644 index 504743f..0000000 --- a/doc/api-documentation/html/gbfrtf_8cpp-source.html +++ /dev/null @@ -1,304 +0,0 @@ - - -gbfrtf.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

gbfrtf.cpp

00001 /******************************************************************************
-00002  *
-00003  * gbfrtf -     SWFilter decendant to convert all GBF tags to RTF tags
-00004  */
-00005 
-00006 
-00007 #include <stdlib.h>
-00008 #include <string.h>
-00009 #include <gbfrtf.h>
-00010 #include <ctype.h>
-00011 
-00012 GBFRTF::GBFRTF() {
-00013 }
-00014 
-00015 
-00016 char GBFRTF::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00017 {
-00018         unsigned char *to, *from;
-00019         char token[2048];
-00020         int tokpos = 0;
-00021         bool intoken = false;
-00022         int len;
-00023         const char *tok;
-00024 
-00025         len = strlen(text) + 1;                                         // shift string to right of buffer
-00026         if (len < maxlen) {
-00027                 memmove(&text[maxlen - len], text, len);
-00028                 from = (unsigned char *)&text[maxlen - len];
-00029         }
-00030         else    from = (unsigned char *)text;                                                   // -------------------------------
-00031         for (to = (unsigned char *)text; *from; from++) {
-00032                 if (*from == '<') {
-00033                         intoken = true;
-00034                         tokpos = 0;
-00035                         token[0] = 0;
-00036                         token[1] = 0;
-00037                         token[2] = 0;
-00038                         continue;
-00039                 }
-00040                 if (*from == '>') {
-00041                         intoken = false;
-00042                                                 // process desired tokens
-00043                         switch (*token) {
-00044                         case 'W':       // Strongs
-00045                                 switch(token[1]) {
-00046                                 case 'G':               // Greek
-00047                                 case 'H':               // Hebrew
-00048                                         *to++ = '{';
-00049                                         *to++ = '\\';
-00050                                         *to++ = 'f';
-00051                                         *to++ = 's';
-00052                                         *to++ = '1';
-00053                                         *to++ = '7';
-00054                                         *to++ = ' ';
-00055                                         *to++ = '<';
-00056                                         for (tok = token + 2; *tok; tok++)
-00057                                                 *to++ = *tok;
-00058                                         *to++ = '>';
-00059                                         *to++ = '}';
-00060                                         continue;
-00061 
-00062                                 case 'T':               // Tense
-00063                                         *to++ = '{';
-00064                                         *to++ = '\\';
-00065                                         *to++ = 'f';
-00066                                         *to++ = 's';
-00067                                         *to++ = '1';
-00068                                         *to++ = '7';
-00069                                         *to++ = ' ';
-00070                                         *to++ = '(';
-00071                                         bool separate = false;
-00072                                         for (tok = token + 2; *tok; tok++) {
-00073                                                 if (separate) {
-00074                                                         *to++ = ';';
-00075                                                         *to++ = ' ';
-00076                                                         separate = false;
-00077                                                 }
-00078                                                 switch (*tok) {
-00079                                                 case 'G':
-00080                                                 case 'H':
-00081                                                         for (tok++; *tok; tok++) {
-00082                                                                 if (isdigit(*tok)) {
-00083                                                                         *to++ = *tok;
-00084                                                                         separate = true;
-00085                                                                 }
-00086                                                                 else {
-00087                                                                         tok--;
-00088                                                                         break;
-00089                                                                 }
-00090                                                         }
-00091                                                         break;
-00092                                                 default:
-00093                                                         for (; *tok; tok++) {
-00094                                                                *to++ = *tok;
-00095                                                         }
-00096                                                 }
-00097                                         }
-00098                                         *to++ = ')';
-00099                                         *to++ = '}';
-00100                                         continue;
-00101                                 }
-00102                                 break;
-00103                         case 'R':
-00104                                 switch(token[1]) {
-00105                                 case 'X':
-00106                                   *to++ = '<';
-00107                                   *to++ = 'a';
-00108                                   *to++ = ' ';
-00109                                   *to++ = 'h';
-00110                                   *to++ = 'r';
-00111                                   *to++ = 'e';
-00112                                   *to++ = 'f';
-00113                                   *to++ = '=';
-00114                                   *to++ = '"';
-00115                                   *to++ = '"';
-00116                                   *to++ = '>';
-00117                                   continue;
-00118                                 case 'x':
-00119                                   *to++ = '<';
-00120                                   *to++ = '/';
-00121                                   *to++ = 'a';
-00122                                   *to++ = '>';
-00123                                   continue;
-00124                                 case 'F':               // footnote begin
-00125                                         *to++ = '{';
-00126                                         *to++ = '\\';
-00127                                         *to++ = 'i';
-00128                                         *to++ = '1';
-00129                                         *to++ = ' ';
-00130                                         *to++ = '\\';
-00131                                         *to++ = 'f';
-00132                                         *to++ = 's';
-00133                                         *to++ = '1';
-00134                                         *to++ = '7';
-00135                                         *to++ = ' ';
-00136                                         *to++ = '(';
-00137                                         continue;
-00138                                 case 'f':               // footnote end
-00139                                         *to++ = ')';
-00140                                         *to++ = ' ';
-00141                                         *to++ = '}';
-00142                                         continue;
-00143                                 }
-00144                                 break;
-00145                         case 'F':                       // font tags
-00146                                 switch(token[1]) {
-00147                                 case 'I':               // italic start
-00148                                         *to++ = '\\';
-00149                                         *to++ = 'i';
-00150                                         *to++ = '1';
-00151                                         *to++ = ' ';
-00152                                         continue;
-00153                                 case 'i':               // italic end
-00154                                         *to++ = '\\';
-00155                                         *to++ = 'i';
-00156                                         *to++ = '0';
-00157                                         *to++ = ' ';
-00158                                         continue;
-00159                                 case 'B':               // bold start
-00160                                         *to++ = '\\';
-00161                                         *to++ = 'b';
-00162                                         *to++ = '1';
-00163                                         *to++ = ' ';
-00164                                         continue;
-00165                                 case 'b':               // bold end
-00166                                         *to++ = '\\';
-00167                                         *to++ = 'b';
-00168                                         *to++ = '0';
-00169                                         *to++ = ' ';
-00170                                         continue;
-00171                                 case 'N':
-00172                                         *to++ = '{';
-00173                                         if (!strnicmp(token+2, "Symbol", 6)) {
-00174                                           *to++ = '\\';
-00175                                           *to++ = 'f';
-00176                                           *to++ = '7';
-00177                                           *to++ = ' ';
-00178                                         }
-00179                                         continue;
-00180                                 case 'n':
-00181                                         *to++ = '}';
-00182                                         continue;
-00183                                 case 'S':
-00184                                         *to++ = '{';
-00185                                         *to++ = '\\';
-00186                                         *to++ = 's';
-00187                                         *to++ = 'u';
-00188                                         *to++ = 'p';
-00189                                         *to++ = 'e';
-00190                                         *to++ = 'r';
-00191                                         *to++ = ' ';
-00192                                         continue;
-00193                                 case 's':
-00194                                         *to++ = '}';
-00195                                         continue;
-00196                                 case 'R':
-00197                                         *to++ = '{';
-00198                                         *to++ = '\\';
-00199                                         *to++ = 'c';
-00200                                         *to++ = 'f';
-00201                                         *to++ = '6';
-00202                                         *to++ = ' ';
-00203                                         continue;
-00204                                 case 'r':
-00205                                         *to++ = '}';
-00206                                         continue;
-00207                                 }
-00208                                 break;
-00209                         case 'C':                       // special character tags
-00210                                 switch(token[1]) {
-00211                                 case 'A':               // ASCII value
-00212                                         *to++ = (char)atoi(&token[2]);
-00213                                         continue;
-00214                                 case 'G':
-00215                                         *to++ = '>';
-00216                                         continue;
-00217                                 case 'L':               // line break
-00218                                         *to++ = '\\';
-00219                                         *to++ = 'l';
-00220                                         *to++ = 'i';
-00221                                         *to++ = 'n';
-00222                                         *to++ = 'e';
-00223                                         *to++ = ' ';
-00224                                         continue;
-00225                                 case 'M':               // new paragraph
-00226                                         *to++ = '\\';
-00227                                         *to++ = 'p';
-00228                                         *to++ = 'a';
-00229                                         *to++ = 'r';
-00230                                         *to++ = ' ';
-00231                                         continue;
-00232                                 case 'T':
-00233                                         *to++ = '<';
-00234                                 }
-00235                                 break;
-00236                         case 'T':                       // title formatting
-00237                           switch(token[1])
-00238                             {
-00239                             case 'T':               // Book title begin
-00240                               *to++ = '{';
-00241                               *to++ = '\\';
-00242                               *to++ = 'f';
-00243                               *to++ = 's';
-00244                               *to++ = '2';
-00245                               *to++ = '2';
-00246                               *to++ = ' ';
-00247                               continue;
-00248                             case 't':
-00249                               *to++ = '}';
-00250                               continue;
-00251                             case 'S':
-00252                               *to++ = '\\';
-00253                               *to++ = 'p';
-00254                               *to++ = 'a';
-00255                               *to++ = 'r';
-00256                               *to++ = ' ';
-00257                               *to++ = '{';
-00258                               *to++ = '\\';
-00259                               *to++ = 'i';
-00260                               *to++ = '1';
-00261                               *to++ = '\\';
-00262                               *to++ = 'b';
-00263                               *to++ = '1';
-00264                               *to++ = ' ';
-00265                               continue;
-00266                             case 's':
-00267                               *to++ = '}';
-00268                               *to++ = '\\';
-00269                               *to++ = 'p';
-00270                               *to++ = 'a';
-00271                               *to++ = 'r';
-00272                               *to++ = ' ';
-00273                               continue;
-00274                             }
-00275                           break;
-00276 
-00277                         }
-00278                         continue;
-00279                 }
-00280                 if (intoken) {
-00281                         if (tokpos < 2045)
-00282                                 token[tokpos++] = *from;
-00283                                 token[tokpos+2] = 0;
-00284                 }
-00285                 else    *to++ = *from;
-00286         }
-00287         *to++ = 0;
-00288         *to = 0;
-00289         return 0;
-00290 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/gbfrtf_8h-source.html b/doc/api-documentation/html/gbfrtf_8h-source.html deleted file mode 100644 index 208e65e..0000000 --- a/doc/api-documentation/html/gbfrtf_8h-source.html +++ /dev/null @@ -1,49 +0,0 @@ - - -gbfrtf.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

gbfrtf.h

00001 /*
-00002  *
-00003  * $Id: gbfrtf_8h-source.html,v 1.7 2002/06/20 20:23:08 mgruner Exp $
-00004  *
-00005  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00006  *      CrossWire Bible Society
-00007  *      P. O. Box 2528
-00008  *      Tempe, AZ  85280-2528
-00009  *
-00010  * This program is free software; you can redistribute it and/or modify it
-00011  * under the terms of the GNU General Public License as published by the
-00012  * Free Software Foundation version 2.
-00013  *
-00014  * This program is distributed in the hope that it will be useful, but
-00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00017  * General Public License for more details.
-00018  *
-00019  */
-00020 
-00021 #ifndef GBFRTF_H
-00022 #define GBFRTF_H
-00023 
-00024 #include <swfilter.h>
-00025 
-00026 #include <defs.h>
-00027 
-00030 class SWDLLEXPORT GBFRTF:public SWFilter
-00031 {
-00032 public:
-00033   GBFRTF ();
-00034   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00035 };
-00036 
-00037 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/gbfstrongs_8cpp-source.html b/doc/api-documentation/html/gbfstrongs_8cpp-source.html deleted file mode 100644 index 064c24c..0000000 --- a/doc/api-documentation/html/gbfstrongs_8cpp-source.html +++ /dev/null @@ -1,144 +0,0 @@ - - -gbfstrongs.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

gbfstrongs.cpp

00001 /******************************************************************************
-00002  *
-00003  * gbfstrongs - SWFilter decendant to hide or show strongs number
-00004  *                      in a GBF module.
-00005  */
-00006 
-00007 
-00008 #include <stdlib.h>
-00009 #include <string.h>
-00010 #include <gbfstrongs.h>
-00011 #include <swmodule.h>
-00012 #ifndef __GNUC__
-00013 #else
-00014 #include <unixstr.h>
-00015 #endif
-00016 
-00017 
-00018 const char GBFStrongs::on[] = "On";
-00019 const char GBFStrongs::off[] = "Off";
-00020 const char GBFStrongs::optName[] = "Strong's Numbers";
-00021 const char GBFStrongs::optTip[] = "Toggles Strong's Numbers On and Off if they exist";
-00022 
-00023 
-00024 GBFStrongs::GBFStrongs() {
-00025         option = false;
-00026         options.push_back(on);
-00027         options.push_back(off);
-00028 }
-00029 
-00030 
-00031 GBFStrongs::~GBFStrongs() {
-00032 }
-00033 
-00034 void GBFStrongs::setOptionValue(const char *ival)
-00035 {
-00036         option = (!stricmp(ival, on));
-00037 }
-00038 
-00039 const char *GBFStrongs::getOptionValue()
-00040 {
-00041         return (option) ? on:off;
-00042 }
-00043 
-00044 char GBFStrongs::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00045 {
-00046         char *to, *from, token[2048]; // cheese.  Fix.
-00047         int tokpos = 0;
-00048         bool intoken = false;
-00049         int len;
-00050         bool lastspace = false;
-00051         int word = 1;
-00052         char val[128];
-00053         char wordstr[5];
-00054         char *valto;
-00055         char *ch;
-00056         char *textStart = text, *textEnd = 0;
-00057         bool newText = false;
-00058         string tmp;
-00059 
-00060         len = strlen(text) + 1; // shift string to right of buffer
-00061         if (len < maxlen) {
-00062                 memmove(&text[maxlen - len], text, len);
-00063                 from = &text[maxlen - len];
-00064         }
-00065         else    from = text;    // -------------------------------
-00066 
-00067         for (to = text; *from; from++) {
-00068                 if (*from == '<') {
-00069                         intoken = true;
-00070                         tokpos = 0;
-00071                         token[0] = 0;
-00072                         token[1] = 0;
-00073                         token[2] = 0;
-00074                         textEnd = to;
-00075                         continue;
-00076                 }
-00077                 if (*from == '>') {     // process tokens
-00078                         intoken = false;
-00079                         if (*token == 'W' && (token[1] == 'G' || token[1] == 'H')) {    // Strongs
-00080                                 if (module->isProcessEntryAttributes()) {
-00081                                         valto = val;
-00082                                         for (unsigned int i = 2; ((token[i]) && (i < 150)); i++)
-00083                                                 *valto++ = token[i];
-00084                                         *valto = 0;
-00085                                         if (atoi((!isdigit(*val))?val+1:val) < 5627) {
-00086                                                 // normal strongs number
-00087                                                 sprintf(wordstr, "%03d", word++);
-00088                                                 module->getEntryAttributes()["Word"][wordstr]["Strongs"] = val;
-00089                                                 tmp = "";
-00090                                                 tmp.append(textStart, (int)(textEnd - textStart));
-00091                                                 module->getEntryAttributes()["Word"][wordstr]["Text"] = tmp;
-00092                                                 newText = true;
-00093                                         }
-00094                                         else {
-00095                                                 // verb morph
-00096                                                 sprintf(wordstr, "%03d", word-1);
-00097                                                 module->getEntryAttributes()["Word"][wordstr]["Morph"] = val;
-00098                                         }
-00099                                 }
-00100                                 if (!option) {
-00101                                         if ((from[1] == ' ') || (from[1] == ',') || (from[1] == ';') || (from[1] == '.') || (from[1] == '?') || (from[1] == '!') || (from[1] == ')') || (from[1] == '\'') || (from[1] == '\"')) {
-00102                                                 if (lastspace)
-00103                                                         to--;
-00104                                         }
-00105                                         if (newText) {textStart = to; newText = false; }
-00106                                         continue;
-00107                                 }
-00108                         }
-00109                         // if not a strongs token, keep token in text
-00110                         *to++ = '<';
-00111                         for (char *tok = token; *tok; tok++)
-00112                                 *to++ = *tok;
-00113                         *to++ = '>';
-00114                         if (newText) {textStart = to; newText = false; }
-00115                         continue;
-00116                 }
-00117                 if (intoken) {
-00118                         if (tokpos < 2045)
-00119                                 token[tokpos++] = *from;
-00120                                 token[tokpos+2] = 0;
-00121                 }
-00122                 else    {
-00123                         *to++ = *from;
-00124                         lastspace = (*from == ' ');
-00125                 }
-00126         }
-00127         *to++ = 0;
-00128         *to = 0;
-00129         return 0;
-00130 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/gbfstrongs_8h-source.html b/doc/api-documentation/html/gbfstrongs_8h-source.html deleted file mode 100644 index 15b32ec..0000000 --- a/doc/api-documentation/html/gbfstrongs_8h-source.html +++ /dev/null @@ -1,70 +0,0 @@ - - -gbfstrongs.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

gbfstrongs.h

00001 /*
-00002  *
-00003  * $Id: gbfstrongs_8h-source.html,v 1.7 2002/06/20 20:23:08 mgruner Exp $
-00004  *
-00005  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00006  *      CrossWire Bible Society
-00007  *      P. O. Box 2528
-00008  *      Tempe, AZ  85280-2528
-00009  *
-00010  * This program is free software; you can redistribute it and/or modify it
-00011  * under the terms of the GNU General Public License as published by the
-00012  * Free Software Foundation version 2.
-00013  *
-00014  * This program is distributed in the hope that it will be useful, but
-00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00017  * General Public License for more details.
-00018  *
-00019  */
-00020 
-00021 #ifndef GBFSTRONGS_H
-00022 #define GBFSTRONGS_H
-00023 
-00024 #include <swfilter.h>
-00025 
-00026 #include <defs.h>
-00027 
-00030 class SWDLLEXPORT GBFStrongs:public SWFilter
-00031 {
-00032   bool option;
-00033   static const char on[];
-00034   static const char off[];
-00035   static const char optName[];
-00036   static const char optTip[];
-00037   OptionsList options;
-00038 public:
-00039     GBFStrongs ();
-00040     virtual ~ GBFStrongs ();
-00041   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00042   virtual const char *getOptionName ()
-00043   {
-00044     return optName;
-00045   }
-00046   virtual const char *getOptionTip ()
-00047   {
-00048     return optTip;
-00049   }
-00050   virtual void setOptionValue (const char *ival);
-00051   virtual const char *getOptionValue ();
-00052   virtual OptionsList getOptionValues ()
-00053   {
-00054     return options;
-00055   }
-00056 };
-00057 
-00058 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/gbfthml_8cpp-source.html b/doc/api-documentation/html/gbfthml_8cpp-source.html deleted file mode 100644 index 29d22b1..0000000 --- a/doc/api-documentation/html/gbfthml_8cpp-source.html +++ /dev/null @@ -1,477 +0,0 @@ - - -gbfthml.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

gbfthml.cpp

00001 /***************************************************************************
-00002                      gbfthml.cpp  -  GBF to ThML filter
-00003                              -------------------
-00004     begin                : 1999-10-27
-00005     copyright            : 2001 by CrossWire Bible Society
-00006  ***************************************************************************/
-00007 
-00008 /***************************************************************************
-00009  *                                                                         *
-00010  *   This program is free software; you can redistribute it and/or modify  *
-00011  *   it under the terms of the GNU General Public License as published by  *
-00012  *   the Free Software Foundation; either version 2 of the License, or     *
-00013  *   (at your option) any later version.                                   *
-00014  *                                                                         *
-00015  ***************************************************************************/
-00016 
-00017 #include <stdlib.h>
-00018 #include <string.h>
-00019 #include <gbfthml.h>
-00020 
-00021 
-00022 GBFThML::GBFThML()
-00023 {
-00024 }
-00025 
-00026 
-00027 char GBFThML::ProcessText(char *text, int maxlen)
-00028 {
-00029         char *to, *from, token[2048];
-00030         int tokpos = 0;
-00031         bool intoken    = false;
-00032         int len;
-00033         const char *tok;
-00034 
-00035         len = strlen(text) + 1;                                         // shift string to right of buffer
-00036         if (len < maxlen) {
-00037                 memmove(&text[maxlen - len], text, len);
-00038                 from = &text[maxlen - len];
-00039         }
-00040         else    from = text;                                                    // -------------------------------
-00041 
-00042         for (to = text; *from; from++)
-00043         {
-00044                 if (*from == '<') {
-00045                         intoken = true;
-00046                         tokpos = 0;
-00047                         token[0] = 0;
-00048                         token[1] = 0;
-00049                         token[2] = 0;
-00050                         continue;
-00051                 }
-00052                 if (*from == '>')
-00053                 {
-00054                         intoken = false;
-00055                         // process desired tokens
-00056                         switch (*token) {
-00057                         case 'W':       // Strongs
-00058                           switch(token[1]) {
-00059                           case 'G':
-00060                           case 'H':                         
-00061                             *to++ = '<';
-00062                             *to++ = 's';
-00063                             *to++ = 'y';
-00064                             *to++ = 'n';
-00065                             *to++ = 'c';
-00066                             *to++ = ' ';
-00067                             *to++ = 't';
-00068                             *to++ = 'y';
-00069                             *to++ = 'p';
-00070                             *to++ = 'e';
-00071                             *to++ = '=';
-00072                             *to++ = '"';
-00073                             *to++ = 'S';
-00074                             *to++ = 't';
-00075                             *to++ = 'r';
-00076                             *to++ = 'o';
-00077                             *to++ = 'n';
-00078                             *to++ = 'g';
-00079                             *to++ = 's';
-00080                             *to++ = '"';
-00081                             *to++ = ' ';
-00082                             *to++ = 'v';
-00083                             *to++ = 'a';
-00084                             *to++ = 'l';
-00085                             *to++ = 'u';
-00086                             *to++ = 'e';
-00087                             *to++ = '=';
-00088                             *to++ = '"';
-00089                             for (tok = token + 1; *tok; tok++)
-00090                               *to++ = *tok;
-00091                             *to++ = '"';
-00092                             *to++ = ' ';
-00093                             *to++ = '/';
-00094                             *to++ = '>';
-00095                             continue;
-00096                             
-00097                           case 'T':               // Tense
-00098                             *to++ = '<';
-00099                             *to++ = 's';
-00100                             *to++ = 'y';
-00101                             *to++ = 'n';
-00102                             *to++ = 'c';
-00103                             *to++ = ' ';
-00104                             *to++ = 't';
-00105                             *to++ = 'y';
-00106                             *to++ = 'p';
-00107                             *to++ = 'e';
-00108                             *to++ = '=';
-00109                             *to++ = '"';
-00110                             *to++ = 'M';
-00111                             *to++ = 'o';
-00112                             *to++ = 'r';
-00113                             *to++ = 'p';
-00114                             *to++ = 'h';
-00115                             *to++ = '"';
-00116                             *to++ = ' ';
-00117                             *to++ = 'v';
-00118                             *to++ = 'a';
-00119                             *to++ = 'l';
-00120                             *to++ = 'u';
-00121                             *to++ = 'e';
-00122                             *to++ = '=';
-00123                             *to++ = '"';
-00124                             for (tok = token + 2; *tok; tok++)
-00125                               *to++ = *tok;
-00126                             *to++ = '"';
-00127                             *to++ = ' ';
-00128                             *to++ = '/';
-00129                             *to++ = '>';
-00130                             continue;
-00131                                 }
-00132                           break;
-00133                         case 'R':
-00134                           switch(token[1])
-00135                             {
-00136                             case 'X':
-00137                               *to++ = '<';
-00138                               *to++ = 'a';
-00139                               *to++ = ' ';
-00140                               *to++ = 'h';
-00141                               *to++ = 'r';
-00142                               *to++ = 'e';
-00143                               *to++ = 'f';
-00144                               *to++ = '=';
-00145                               *to++ = '\"';
-00146                               for (tok = token + 3; *tok; tok++) {
-00147                                 if(*tok != '<' && *tok+1 != 'R' && *tok+2 != 'x') {
-00148                                   *to++ = *tok;
-00149                                 }
-00150                                 else {
-00151                                   break;
-00152                                 }
-00153                               }
-00154                               *to++ = '\"';
-00155                               *to++ = '>';
-00156                               continue;
-00157                             case 'x':
-00158                               *to++ = '<';
-00159                               *to++ = '/';
-00160                               *to++ = 'a';
-00161                               *to++ = '>';
-00162                               continue;
-00163                             case 'F':               // footnote begin
-00164                               *to++ = '<';
-00165                               *to++ = 'n';
-00166                               *to++ = 'o';
-00167                               *to++ = 't';
-00168                               *to++ = 'e';
-00169                               *to++ = ' ';
-00170                               *to++ = 'p';
-00171                               *to++ = 'l';
-00172                               *to++ = 'a';
-00173                               *to++ = 'c';
-00174                               *to++ = 'e';
-00175                               *to++ = '=';
-00176                               *to++ = '"';
-00177                               *to++ = 'f';
-00178                               *to++ = 'o';
-00179                               *to++ = 'o';
-00180                               *to++ = 't';
-00181                               *to++ = '"';
-00182                               *to++ = '>';
-00183                               continue;
-00184                             case 'f':               // footnote end
-00185                               *to++ = '<';
-00186                               *to++ = '/';
-00187                               *to++ = 'n';
-00188                               *to++ = 'o';
-00189                               *to++ = 't';
-00190                               *to++ = 'e';
-00191                               *to++ = '>';
-00192                               continue;
-00193                             }
-00194                           break;
-00195                         case 'F':                       // font tags
-00196                           switch(token[1])
-00197                             {
-00198                             case 'N':
-00199                               *to++ = '<';
-00200                               *to++ = 'f';
-00201                               *to++ = 'o';
-00202                               *to++ = 'n';
-00203                               *to++ = 't';
-00204                               *to++ = ' ';
-00205                               *to++ = 'f';
-00206                               *to++ = 'a';
-00207                               *to++ = 'c';
-00208                               *to++ = 'e';
-00209                               *to++ = '=';
-00210                               *to++ = '"';              
-00211                               for (tok = token + 2; *tok; tok++)
-00212                                 *to++ = *tok;
-00213                               *to++ = '"';
-00214                               *to++ = '>';
-00215                               continue;
-00216                             case 'n':
-00217                               *to++ = '<';
-00218                               *to++ = '/';
-00219                               *to++ = 'f';
-00220                               *to++ = 'o';
-00221                               *to++ = 'n';
-00222                               *to++ = 't';
-00223                               *to++ = '>';
-00224                               continue;
-00225                             case 'I':           // italic start
-00226                               *to++ = '<';
-00227                               *to++ = 'i';
-00228                               *to++ = '>';
-00229                               continue;
-00230                             case 'i':           // italic end
-00231                               *to++ = '<';
-00232                               *to++ = '/';
-00233                               *to++ = 'i';
-00234                               *to++ = '>';
-00235                               continue;
-00236                             case 'B':           // bold start
-00237                               *to++ = '<';
-00238                               *to++ = 'b';
-00239                               *to++ = '>';
-00240                               continue;
-00241                             case 'b':           // bold end
-00242                               *to++ = '<';
-00243                               *to++ = '/';
-00244                               *to++ = 'b';
-00245                               *to++ = '>';
-00246                               continue;
-00247 
-00248                             case 'R':           // words of Jesus begin
-00249                               *to++ = '<';
-00250                               *to++ = 'f';
-00251                               *to++ = 'o';
-00252                               *to++ = 'n';
-00253                               *to++ = 't';
-00254                               *to++ = ' ';
-00255                               *to++ = 'c';
-00256                               *to++ = 'o';
-00257                               *to++ = 'l';
-00258                               *to++ = 'o';
-00259                               *to++ = 'r';
-00260                               *to++ = '=';
-00261                               *to++ = '\"';
-00262                               *to++ = '#';
-00263                               *to++ = 'f';
-00264                               *to++ = 'f';
-00265                               *to++ = '0';
-00266                               *to++ = '0';
-00267                               *to++ = '0';
-00268                               *to++ = '0';
-00269                               *to++ = '\"';
-00270                               *to++ = '>';
-00271                               continue;
-00272                             case 'r':           // words of Jesus end
-00273                               *to++ = '<';
-00274                               *to++ = '/';
-00275                               *to++ = 'f';
-00276                               *to++ = 'o';
-00277                               *to++ = 'n';
-00278                               *to++ = 't';
-00279                               *to++ = '>';
-00280                               continue;
-00281                             case 'U':           // Underline start
-00282                               *to++ = '<';
-00283                               *to++ = 'u';
-00284                               *to++ = '>';
-00285                               continue;
-00286                             case 'u':           // Underline end
-00287                               *to++ = '<';
-00288                               *to++ = '/';
-00289                               *to++ = 'u';
-00290                               *to++ = '>';
-00291                               continue;
-00292                             case 'O':           // Old Testament quote begin
-00293                               *to++ = '<';
-00294                               *to++ = 'c';
-00295                               *to++ = 'i';
-00296                               *to++ = 't';
-00297                               *to++ = 'e';
-00298                               *to++ = '>';
-00299                               continue;
-00300                             case 'o':           // Old Testament quote end
-00301                               *to++ = '<';
-00302                               *to++ = '/';
-00303                               *to++ = 'c';
-00304                               *to++ = 'i';
-00305                               *to++ = 't';
-00306                               *to++ = 'e';
-00307                               *to++ = '>';
-00308                               continue;
-00309                             case 'S':           // Superscript begin
-00310                               *to++ = '<';
-00311                               *to++ = 's';
-00312                               *to++ = 'u';
-00313                               *to++ = 'p';
-00314                               *to++ = '>';
-00315                               continue;
-00316                             case 's':           // Superscript end
-00317                               *to++ = '<';
-00318                               *to++ = '/';
-00319                               *to++ = 's';
-00320                               *to++ = 'u';
-00321                               *to++ = 'p';
-00322                               *to++ = '>';
-00323                               continue;
-00324                             case 'V':           // Subscript begin
-00325                               *to++ = '<';
-00326                               *to++ = 's';
-00327                               *to++ = 'u';
-00328                               *to++ = 'b';
-00329                               *to++ = '>';
-00330                               continue;
-00331                             case 'v':           // Subscript end
-00332                               *to++ = '<';
-00333                               *to++ = '/';
-00334                               *to++ = 's';
-00335                               *to++ = 'u';
-00336                               *to++ = 'b';
-00337                               *to++ = '>';
-00338                               continue;
-00339                             }
-00340                           break;
-00341                         case 'C':                       // special character tags
-00342                           switch(token[1])
-00343                                 {
-00344                                 case 'A':               // ASCII value
-00345                                   *to++ = (char)atoi(&token[2]);
-00346                                   continue;
-00347                                 case 'G':
-00348                                   //*to++ = ' ';
-00349                                   continue;
-00350                                 case 'L':               // line break
-00351                                   *to++ = '<';
-00352                                   *to++ = 'b';
-00353                                   *to++ = 'r';
-00354                                   *to++ = ' ';
-00355                                   *to++ = '/';
-00356                                   *to++ = '>';
-00357                                   *to++ = ' ';
-00358                                   continue;
-00359                                 case 'M':               // new paragraph
-00360                                   *to++ = '<';
-00361                                   *to++ = 'p';
-00362                                   *to++ = ' ';
-00363                                   *to++ = '/';
-00364                                   *to++ = '>';
-00365                                   continue;
-00366                                 case 'T':
-00367                                   //*to++ = ' ';
-00368                                   continue;
-00369                                 }
-00370                           break;
-00371                         case 'T':                       // title formatting
-00372                           switch(token[1])
-00373                             {
-00374                             case 'T':               // Book title begin
-00375                               *to++ = '<';
-00376                               *to++ = 'b';
-00377                               *to++ = 'i';
-00378                               *to++ = 'g';
-00379                               *to++ = '>';
-00380                               continue;
-00381                             case 't':
-00382                               *to++ = '<';
-00383                               *to++ = '/';
-00384                               *to++ = 'b';
-00385                               *to++ = 'i';
-00386                               *to++ = 'g';
-00387                               *to++ = '>';
-00388                               continue;
-00389                             case 'S':
-00390                               *to++ = '<';
-00391                               *to++ = 'd';
-00392                               *to++ = 'i';
-00393                               *to++ = 'v';
-00394                               *to++ = ' ';
-00395                               *to++ = 'c';
-00396                               *to++ = 'l';
-00397                               *to++ = 'a';
-00398                               *to++ = 's';
-00399                               *to++ = 's';
-00400                               *to++ = '=';
-00401                               *to++ = '\"';
-00402                               *to++ = 's';
-00403                               *to++ = 'e';
-00404                               *to++ = 'c';
-00405                               *to++ = 'h';
-00406                               *to++ = 'e';
-00407                               *to++ = 'a';
-00408                               *to++ = 'd';
-00409                               *to++ = '\"';
-00410                               *to++ = '>';
-00411                               continue;
-00412                             case 's':
-00413                               *to++ = '<';
-00414                               *to++ = '/';
-00415                               *to++ = 'd';
-00416                               *to++ = 'i';
-00417                               *to++ = 'v';
-00418                               *to++ = '>';
-00419                               continue;
-00420                             }
-00421                           break;
-00422 
-00423                         case 'P':                       // special formatting
-00424                           switch(token[1])
-00425                             {
-00426                             case 'P':               // Poetry begin
-00427                               *to++ = '<';
-00428                               *to++ = 'v';
-00429                               *to++ = 'e';
-00430                               *to++ = 'r';
-00431                               *to++ = 's';
-00432                               *to++ = 'e';
-00433                               *to++ = '>';
-00434                               continue;
-00435                             case 'p':
-00436                               *to++ = '<';
-00437                               *to++ = '/';
-00438                               *to++ = 'v';
-00439                               *to++ = 'e';
-00440                               *to++ = 'r';
-00441                               *to++ = 's';
-00442                               *to++ = 'e';
-00443                               *to++ = '>';
-00444                               continue;
-00445                             }
-00446                           break;
-00447                         }
-00448                         continue;
-00449                 }
-00450                 if (intoken) {
-00451                         if (tokpos < 2045)
-00452                                 token[tokpos++] = *from;
-00453                                 token[tokpos+2] = 0;
-00454                 }
-00455                 else    *to++ = *from;
-00456         }
-00457         *to++ = 0;
-00458         *to = 0;
-00459         return 0;
-00460 }
-00461 
-00462 
-00463 
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/gbfthml_8h-source.html b/doc/api-documentation/html/gbfthml_8h-source.html deleted file mode 100644 index d6e42fb..0000000 --- a/doc/api-documentation/html/gbfthml_8h-source.html +++ /dev/null @@ -1,46 +0,0 @@ - - -gbfthml.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

gbfthml.h

00001 /***************************************************************************
-00002                           gbfthml.h  -  description
-00003                              -------------------
-00004     begin                : 1999-10-28
-00005     copyright            : 1999 by Chris Little
-00006     email                : chrislit@chiasma.org
-00007  ***************************************************************************/
-00008 
-00009 /***************************************************************************
-00010  *                                                                         *
-00011  *   This program is free software; you can redistribute it and/or modify  *
-00012  *   it under the terms of the GNU General Public License as published by  *
-00013  *   the Free Software Foundation; either version 2 of the License, or     *
-00014  *   (at your option) any later version.                                   *
-00015  *                                                                         *
-00016  ***************************************************************************/
-00017 
-00018 #ifndef GBFTHML_H
-00019 #define GBFTHML_H
-00020 
-00021 #include <swfilter.h>
-00022 
-00023 #include <defs.h>
-00024 
-00027 class SWDLLEXPORT GBFThML:public SWFilter
-00028 {
-00029 public:
-00030   GBFThML ();
-00031   virtual char ProcessText (char *text, int maxlen = -1);
-00032 };
-00033 
-00034 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/graph_legend.dot b/doc/api-documentation/html/graph_legend.dot deleted file mode 100644 index bda2ddb..0000000 --- a/doc/api-documentation/html/graph_legend.dot +++ /dev/null @@ -1,20 +0,0 @@ -digraph inheritance -{ - Node9 [shape="box",label="Inherited",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",style="filled" fontcolor="white"]; - Node10 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="Helvetica"]; - Node10 [shape="box",label="PublicBase",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classPublicBase.html"]; - Node11 -> Node10 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="Helvetica"]; - Node11 [shape="box",label="Truncated",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="red",URL="$classTruncated.html"]; - Node13 -> Node9 [dir=back,color="darkgreen",fontsize=10,style="solid",fontname="Helvetica"]; - Node13 [shape="box",label="ProtectedBase",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classProtectedBase.html"]; - Node14 -> Node9 [dir=back,color="firebrick4",fontsize=10,style="solid",fontname="Helvetica"]; - Node14 [shape="box",label="PrivateBase",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classPrivateBase.html"]; - Node15 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="Helvetica"]; - Node15 [shape="box",label="Undocumented",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="grey75"]; - Node16 -> Node9 [dir=back,color="midnightblue",fontsize=10,style="solid",fontname="Helvetica"]; - Node16 [shape="box",label="Templ< int >",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classTempl.html"]; - Node17 -> Node16 [dir=back,color="orange",fontsize=10,style="dashed",label="< int >",fontname="Helvetica"]; - Node17 [shape="box",label="Templ< T >",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classTempl.html"]; - Node18 -> Node9 [dir=back,color="darkorchid3",fontsize=10,style="dashed",label="m_usedClass",fontname="Helvetica"]; - Node18 [shape="box",label="Used",fontsize=10,height=0.2,width=0.4,fontname="Helvetica",color="black",URL="$classUsed.html"]; -} diff --git a/doc/api-documentation/html/graph_legend.html b/doc/api-documentation/html/graph_legend.html deleted file mode 100644 index 8c7f1a8..0000000 --- a/doc/api-documentation/html/graph_legend.html +++ /dev/null @@ -1,60 +0,0 @@ - - -Graph Legend - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen. -

- Consider the following example:

/*! Invisible class because of truncation */
-class Invisible { };
-
-/*! Truncated class, inheritance relation is hidden */
-class Truncated : public Invisible { };
-
-/* Class not documented with doxygen comments */
-class Undocumented { };
-
-/*! Class that is inherited using public inheritance */
-class PublicBase : public Truncated { };
-
-/*! A template class */
-template<class T> class Templ { };
-
-/*! Class that is inherited using protected inheritance */
-class ProtectedBase { };
-
-/*! Class that is inherited using private inheritance */
-class PrivateBase { };
-
-/*! Class that is used by the Inherited class */
-class Used { };
-
-/*! Super class that inherits a number of other classes */
-class Inherited : public PublicBase,
-                  protected ProtectedBase,
-                  private PrivateBase,
-                  public Undocumented
-                  public Templ<int>
-{
-  private:
-    Used *m_usedClass;
-};
-
If the MAX_DOT_GRAPH_HEIGHT tag in the configuration file is set to 240 this will result in the following graph: -

-

-
- -

- The boxes in the above graph have the following meaning:

-The arrows have the following meaning: -
Generated on Thu Jun 20 22:13:05 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/graph_legend.png b/doc/api-documentation/html/graph_legend.png deleted file mode 100644 index 344ea7f..0000000 Binary files a/doc/api-documentation/html/graph_legend.png and /dev/null differ diff --git a/doc/api-documentation/html/greeklexattribs_8cpp-source.html b/doc/api-documentation/html/greeklexattribs_8cpp-source.html deleted file mode 100644 index cb4b36e..0000000 --- a/doc/api-documentation/html/greeklexattribs_8cpp-source.html +++ /dev/null @@ -1,109 +0,0 @@ - - -greeklexattribs.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

greeklexattribs.cpp

00001 /******************************************************************************
-00002  *
-00003  * greeklexattribs -    SWFilter decendant to set entry attributes for greek
-00004  *      lexicons
-00005  */
-00006 
-00007 
-00008 #include <stdlib.h>
-00009 #include <string.h>
-00010 #include <greeklexattribs.h>
-00011 #include <swmodule.h>
-00012 
-00013 
-00014 GreekLexAttribs::GreekLexAttribs() {
-00015 }
-00016 
-00017 
-00018 char GreekLexAttribs::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module) {
-00019 
-00020         if (module->isProcessEntryAttributes()) {
-00021                 char *from;
-00022                 bool inAV = false;
-00023                 string phrase;
-00024                 string freq;
-00025                 char val[128], *valto;
-00026                 char wordstr[7];
-00027                 char *currentPhrase = 0, *ch = 0;
-00028                 char *currentPhraseEnd = 0;
-00029                 int number = 0;
-00030 
-00031 
-00032                 for (from = text; *from; from++) {
-00033                         if (inAV) {
-00034                                 if (currentPhrase == 0) {
-00035                                         if (isalpha(*from))
-00036                                                 currentPhrase = from;
-00037                                 }
-00038                                 else {
-00039                                         if ((!isalpha(*from)) && (*from != ' ') && (*from != '+') && (*from !='(') && (*from != ')') && (*from != '\'')) {
-00040                                                 if (*from == '<') {
-00041                                                         if (!currentPhraseEnd)
-00042                                                                 currentPhraseEnd = from - 1;
-00043                                                         for (; *from && *from != '>'; from++) {
-00044                                                                 if (!strncmp(from, "value=\"", 7)) {
-00045                                                                         valto = val;
-00046                                                                         from += 7;
-00047                                                                         for (unsigned int i = 0; from[i] != '\"' && i < 127; i++)
-00048                                                                                 *valto++ = from[i];
-00049                                                                         *valto = 0;
-00050                                                                         sprintf(wordstr, "%03d", number+1);
-00051                                                                         module->getEntryAttributes()["AVPhrase"][wordstr]["CompoundedWith"] = val;
-00052                                                                         from += strlen(val);
-00053                                                                 }
-00054                                                         }
-00055                                                         continue;
-00056                                                 }
-00057 
-00058                                                 phrase = "";
-00059                                                 phrase.append(currentPhrase, (int)(((currentPhraseEnd)?currentPhraseEnd:from) - currentPhrase)-1);
-00060                                                 currentPhrase = from;
-00061                                                 while (*from && isdigit(*from)) from++;
-00062                                                 freq = "";
-00063                                                 freq.append(currentPhrase, (int)(from - currentPhrase));
-00064                                                 if ((freq.length() > 0) && (phrase.length() > 0)) {
-00065                                                         sprintf(wordstr, "%03d", ++number);
-00066                                                         if ((strchr(phrase.c_str(), '(') > phrase.c_str()) && (strchr(phrase.c_str(), ')') > phrase.c_str() + 1)) {
-00067                                                                 string tmp = phrase.substr(0, phrase.find_first_of("("));
-00068                                                                 phrase.erase(phrase.find_first_of("("), 1);
-00069                                                                 phrase.erase(phrase.find_first_of(")"), 1);
-00070                                                                 phrase.erase(0,phrase.find_first_not_of("\r\n\v\t ")); phrase.erase(phrase.find_last_not_of("\r\n\v\t ")+1);
-00071                                                                 module->getEntryAttributes()["AVPhrase"][wordstr]["Alt"] = phrase;
-00072                                                                 phrase = tmp;
-00073                                                         }
-00074                                                         phrase.erase(0,phrase.find_first_not_of("\r\n\v\t ")); phrase.erase(phrase.find_last_not_of("\r\n\v\t ")+1);
-00075                                                         freq.erase(0,freq.find_first_not_of("\r\n\v\t ")); freq.erase(freq.find_last_not_of("\r\n\v\t ")+1);
-00076                                                         module->getEntryAttributes()["AVPhrase"][wordstr]["Phrase"] = phrase;
-00077                                                         module->getEntryAttributes()["AVPhrase"][wordstr]["Frequency"] = freq;
-00078                                                         currentPhrase = 0;
-00079                                                         currentPhraseEnd = 0;
-00080                                                 }
-00081                                         }
-00082                                 }
-00083                                 if (*from == ';') inAV = false;
-00084 
-00085                         }
-00086                         else if (!strncmp(from, "AV-", 3)) {
-00087                                 inAV = true;
-00088                                 from+=2;
-00089                         }
-00090                 }
-00091         }
-00092         return 0;
-00093 }
-00094 
-00095 
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/greeklexattribs_8h-source.html b/doc/api-documentation/html/greeklexattribs_8h-source.html deleted file mode 100644 index f67415b..0000000 --- a/doc/api-documentation/html/greeklexattribs_8h-source.html +++ /dev/null @@ -1,48 +0,0 @@ - - -greeklexattribs.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

greeklexattribs.h

00001 /*
-00002  *
-00003  * thmlplain.h
-00004  *
-00005  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00006  *      CrossWire Bible Society
-00007  *      P. O. Box 2528
-00008  *      Tempe, AZ  85280-2528
-00009  *
-00010  * This program is free software; you can redistribute it and/or modify it
-00011  * under the terms of the GNU General Public License as published by the
-00012  * Free Software Foundation version 2.
-00013  *
-00014  * This program is distributed in the hope that it will be useful, but
-00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00017  * General Public License for more details.
-00018  *
-00019  */
-00020 
-00021 #ifndef GREEKLEXATTRIBS_H
-00022 #define GREEKLEXATTRIBS_H
-00023 
-00024 #include <swfilter.h>
-00025 
-00026 #include <defs.h>
-00027 
-00030 class SWDLLEXPORT GreekLexAttribs:public SWFilter {
-00031 public:
-00032         GreekLexAttribs();
-00033         virtual char ProcessText(char *text, int maxlen, const SWKey *, const SWModule * = 0);
-00034 };
-00035 
-00036 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/hebrewmcim_8cpp-source.html b/doc/api-documentation/html/hebrewmcim_8cpp-source.html deleted file mode 100644 index 6ec69fa..0000000 --- a/doc/api-documentation/html/hebrewmcim_8cpp-source.html +++ /dev/null @@ -1,658 +0,0 @@ - - -hebrewmcim.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

hebrewmcim.cpp

00001 
-00011 #include <hebrewmcim.h>
-00012 
-00013 HebrewMCIM::HebrewMCIM()
-00014                 :SWInputMethod() {
-00015 
-00016    init();
-00017 }
-00018 
-00019 
-00020 int *HebrewMCIM::translate(char in) {
-00021         int retVal = 0;
-00022         static int retString[5];
-00023         int retStringIndex = 0;
-00024 
-00025         memset(retString, 0, 5);
-00026 
-00027         if (getState() > 1) {
-00028                 if (getState() >= 12) { // serious issue with internal structure
-00029                         setState(0);
-00030                         retString[retStringIndex++] = in;
-00031                         return retString;
-00032                 }
-00033                 map<int, int>::iterator find = subst2[getState()].find(in);
-00034                 if (find != subst2[getState()].end())
-00035                         retVal = find->second;
-00036                 else retVal = in;
-00037 
-00038                 setState(0);
-00039                 retString[retStringIndex++] = retVal;
-00040                 return retString;
-00041         }
-00042         else {
-00043                 retVal = subst[in];
-00044 
-00045                 if (retVal == 0) {
-00046                         setState(0);
-00047                         retString[retStringIndex++] = in;
-00048                         return retString;
-00049                 }
-00050                 if (retVal > 100) {
-00051                         setState(1);
-00052                         retString[retStringIndex++] = retVal;
-00053                         return retString;
-00054                 }
-00055                 if (retVal == 50) {  // multiChar
-00056                         setState(1);
-00057                         int *chars = multiChars[in];
-00058                         if (chars != 0) {
-00059                                 retString[retStringIndex++] = chars[0];
-00060                                 retString[retStringIndex++] = chars[1];
-00061                                 return retString;
-00062                         }
-00063                 }
-00064         }
-00065         setState(retVal);
-00066         return 0;
-00067 }
-00068 
-00069 
-00070 void HebrewMCIM::init() {
-00071         memset(subst, 0, 255);
-00072 
-00073         subst[')'] = 1488;
-00074         subst['B'] = 1489;
-00075         subst['G'] = 1490;
-00076         subst['D'] = 1491;
-00077         subst['H'] = 1492;
-00078         subst['W'] = 1493;
-00079         subst['Z'] = 1494;
-00080         subst['X'] = 1495;
-00081         subst['+'] = 1496;
-00082         subst['Y'] = 1497;
-00083 
-00084         subst['k'] = 1498;  // finals
-00085         subst['m'] = 1501;
-00086         subst['n'] = 1503;
-00087         subst['c'] = 1509;
-00088 
-00089         subst['P'] = 1508;
-00090         subst['K'] = 1499;
-00091         subst['L'] = 1500;
-00092         subst['M'] = 1502;
-00093         subst['N'] = 1504;
-00094         subst['S'] = 1505;
-00095         subst['('] = 1506;
-00096         subst['p'] = 1507;
-00097         subst['C'] = 1510;
-00098         subst['Q'] = 1511;
-00099         subst['R'] = 1512;
-00100         subst['#'] = 1513;
-00101 
-00102         // special multiChars
-00103         subst['&'] = 50;
-00104         subst['$'] = 50;
-00105 
-00106         static int x[] = {1513, 1474};
-00107         multiChars['&'] = x;
-00108         static int y[] = {1513, 1473};
-00109         multiChars['$'] = y;
-00110 
-00111         subst['T'] = 1514;
-00112 
-00113         // VOWELS
-00114         subst['A'] = 1463;
-00115         subst['F'] = 1464;
-00116         subst['E'] = 1462;
-00117         subst['"'] = 1461;
-00118         subst['I'] = 1460;
-00119         subst['O'] = 1465;
-00120         subst['U'] = 1467;
-00121 
-00122 
-00123 
-00124         // OTHER DIACRITICS
-00125         subst['.'] = 1468;
-00126         subst['-'] = 1470;
-00127         subst[','] = 1471;
-00128 
-00129         // Compound input
-00130 
-00131         // CANTILLATION
-00132 
-00133         subst[':'] = 2;
-00134         subst2[2]['A'] = 1458;
-00135         subst2[2]['E'] = 1457;
-00136         subst2[2]['F'] = 1459;
-00137 
-00138 
-00139         /* Telisha qetana is postpositive as in '04' above. However, Michigan
-00140 # code '24' is for a medial telisha. Graphically, there is no
-00141 # difference.
-00142         */
-00143         subst['2'] = 5;
-00144         subst2[5]['4'] = 1449;
-00145 
-00146 
-00147         /* Note Michigan encoding distinguishes between medial metheg '35' (occuring
-00148 # on the left of the vowel), and the ordinary meteg '95' (occuring on the
-00149 # right of the vowel). It is also used for silluq.
-00150         */
-00151         subst['3'] = 6;
-00152         subst2[6]['3'] = 1433;
-00153         subst2[6]['5'] = 1469;
-00154 
-00155 
-00156         /* The Michigan code of telisha gedola in medial position. Graphically,
-00157 # there is no difference.
-00158         */
-00159         subst['4'] = 7;
-00160         subst2[7]['4'] = 1440;
-00161 
-00162         subst['6'] = 8;
-00163         subst2[8]['0'] = 1451;
-00164         subst2[8]['1'] = 1436;
-00165 
-00166         subst['1'] = 4;
-00167         subst2[4]['0'] = 1434;
-00168 
-00169         /* In the poetic books, prepositive dehi occurs; it's unclear whether
-00170 # tipeha also occurs in the poetic books. Otherwise, we could simply
-00171 # check for what book in the Tanach we are in. Michigan uses the same
-00172 # code for each.
-00173         */
-00174 
-00175         subst2[4]['3'] = 1430;
-00176 
-00177         /* This is the poetic accent mugrash, which also includes rebia, but is
-00178 # encoded separately as '81' in the Michigan text.
-00179         */
-00180         subst2[4]['1'] = 1437;
-00181         subst2[4]['4'] = 1440;
-00182 
-00183 
-00184         subst['0'] = 3;
-00185         subst2[3]['0'] = 1475;
-00186         subst2[3]['1'] = 1426;
-00187 
-00188         /* According to BHS, zarqa and sinnor are both postpositive. However,
-00189 # the Michigan encoding uses one code for both. The Unicode zarqa
-00190 # (0x0598) is definitely NOT postpositive. And further, the shape of
-00191 # the symbol is different in BHS and Uniocde. This needs further
-00192 # research to determine what's going on here. For now, we follow BHS
-00193 # and use the postpositive Unicode zinor or both accents.
-00194         */
-00195 
-00196         subst2[3]['2'] = 1454;
-00197 
-00198         /* Pashta is postpositive, and the Unicode equivalent reflects
-00199 # this. However, there is a poetic equivalent -- azla legarmeh --
-00200 # which is not postpositive, but no equivalent code point exists in
-00201 # Unicode. The Michigan encoding does not distinguish between the two,
-00202 # although it could be algorithmically determined.
-00203         */
-00204 
-00205         subst2[3]['3'] = 1433;
-00206         subst2[3]['4'] = 1449;
-00207         subst2[3]['5'] = 1472;
-00208 
-00209 
-00210         /* This is the Unicode Hebrew *accent*; there is also another Hebrew
-00211 # *punctuation* called GERSHAYIM 0x05F4. I'm using the more
-00212 # traditional rounded marks, rather than the alternate straight
-00213 # marks.
-00214         */
-00215 
-00216         subst2[8]['2'] = 1438;
-00217 
-00218         // Also known as azla
-00219         subst2[8]['3'] = 1448;
-00220         subst2[8]['4'] = 1452;
-00221         subst2[8]['5'] = 1427;
-00222 
-00223 
-00224         subst['8'] = 9;
-00225         subst2[9]['0'] = 1428;
-00226         subst2[9]['1'] = 1431;
-00227 
-00228         /* Note, this accent is actually sinnorit, but it does not exist as a
-00229 # separate glyph in the Unicode standard. The 'ZINOR' Unicode accent
-00230 # is postpositive, while sinnorit is not. ZARQA is as close as I can
-00231 # get to this.
-00232         */
-00233         subst2[9]['2'] = 1432;
-00234 
-00235         /* The Unicode form does not match the form used by BHS, but the names
-00236 # are the same.
-00237         */
-00238         subst2[9]['3'] = 1441;
-00239         subst2[9]['4'] = 1439;
-00240         subst2[9]['5'] = 1429;
-00241 
-00242         subst['7'] = 10;
-00243         subst2[10]['0'] = 1444;
-00244         subst2[10]['1'] = 1445;
-00245         subst2[10]['2'] = 1446;
-00246         subst2[10]['3'] = 1430;  // also '13', '73' also is used for majela
-00247         subst2[10]['4'] = 1443;
-00248         subst2[10]['5'] = 1469;  // this is silluq; should appear to the left of the vowel
-00249 
-00250         subst['9'] = 11;
-00251         subst2[11]['1'] = 1435;
-00252         subst2[11]['2'] = 1425;
-00253         subst2[11]['3'] = 1450;
-00254         subst2[11]['4'] = 1447;
-00255         subst2[11]['5'] = 1469;  // should appear to the right of the vowel
-00256 
-00257 }
-00258 
-00259         /*
-00260 
-00261 
-00262 # CANTILLION MARKS
-00263 
-00264         my  $ETNAHTA =           '&#1425;';
-00265 # officially the Unicode name for this symbol was "SEGOL." However, that is
-00266 # not a unique name, conflicting with the vowel of the same name. Further,
-00267 # the position of the symbol is different. I have changed the name of the
-00268 # accent to "SEGOLTA," the traditional name for this accent.
-00269         my  $SEGOLTA =           '&#1426;';
-00270         my  $SHALSHELET =        '&#1427;';
-00271         my  $ZAQEF_QATAN =       '&#1428;';
-00272         my  $ZAQEF_GADOL =       '&#1429;';
-00273         my  $TIPEHA =            '&#1430;';
-00274         my  $REVIA =             '&#1431;';
-00275         my  $ZARQA =             '&#1432;';
-00276         my  $PASHTA =            '&#1433;';
-00277         my  $YETIV =             '&#1434;';
-00278         my  $TEVIR =             '&#1435;';
-00279         my  $GERESH =            '&#1436;';
-00280         my  $GERESH_MUQDAM =     '&#1437;';
-00281         my  $GERSHAYIM =         '&#1438;';
-00282         my  $QARNEY_PARA =       '&#1439;';
-00283         my  $TELISHA_GEDOLA =    '&#1440;';
-00284         my  $PAZER =             '&#1441;';
-00285         my  $MUNAH =             '&#1443;';
-00286         my  $MAHAPAKH =          '&#1444;';
-00287         my  $MERKHA =            '&#1445;';
-00288         my  $MERKHA_KEFULA =     '&#1446;';
-00289         my  $DARGA =             '&#1447;';
-00290         my  $QADMA =             '&#1448;';
-00291         my  $TELISHA_QETANA =    '&#1449;';
-00292         my  $YERAH_BEN_YOMO =    '&#1450;';
-00293         my  $OLE =               '&#1451;';
-00294         my  $ILUY =              '&#1452;';
-00295         my  $DEHI =              '&#1453;';
-00296         my  $ZINOR =             '&#1454;';
-00297 # HEBREW MARK
-00298         my  $MASORA_CIRCLE =     '&#1455;';
-00299 # HEBREW EXTENDED-A  points and punctuation
-00300         my  $SHEVA =             '&#1456;';
-00301         my  $HATAF_SEGOL =       '&#1457;';
-00302         my  $HATAF_PATAH =       '&#1458;';
-00303         my  $HATAF_QAMATS =      '&#1459;';
-00304         my  $HIRIQ =             '&#1460;';
-00305         my  $TSERE =             '&#1461;';
-00306         my  $SEGOL =             '&#1462;';
-00307 # furtive Patah is not a distinct character
-00308         my  $PATAH =             '&#1463;';
-00309         my  $QAMATS =            '&#1464;';
-00310         my  $HOLAM =             '&#1465;';
-00311         my  $QUBUTS =            '&#1467;';
-00312 # also used as shuruq
-00313 # falls within the base letter
-00314         my  $DAGESH_OR_MAPIQ =   '&#1468;';
-00315 # also used as siluq
-00316         my  $METAG =             '&#1469;';
-00317         my  $MAQAF =             '&#1470;';
-00318         my  $RAFE =              '&#1471;';
-00319 # Also used for legarmeh
-00320 #   may be treated as spacing punctuation, not as a point
-00321         my  $PASEQ =             '&#1472;';
-00322         my  $SHIN_DOT =          '&#1473;';
-00323         my  $SIN_DOT =           '&#1474;';
-00324         my  $SOF_PASUQ =         '&#1475;';
-00325 # HEBREW MARK
-00326         my  $UPPER_DOT =         '&#1476;';
-00327 # HEBREW LETTERS based on ISO 8859-8
-00328 # aleph
-00329 #  x (alef symbol - 2135)
-00330         my  $ALEF =              '&#1488;';
-00331 #  x (bet symbol - 2136)
-00332         my  $BET =               '&#1489;';
-00333 #  x (gimel symbol - 2137)
-00334         my  $GIMEL =             '&#1490;';
-00335 #  x (dalet symbol - 2138)
-00336         my  $DALET =             '&#1491;';
-00337         my  $HE =                '&#1492;';
-00338         my  $VAV =               '&#1493;';
-00339         my  $ZAYIN =             '&#1494;';
-00340         my  $HET =               '&#1495;';
-00341         my  $TET =               '&#1496;';
-00342         my  $YOD =               '&#1497;';
-00343         my  $FINAL_KAF =         '&#1498;';
-00344         my  $KAF =               '&#1499;';
-00345         my  $LAMED =             '&#1500;';
-00346         my  $FINAL_MEM =         '&#1501;';
-00347         my  $MEM =               '&#1502;';
-00348         my  $FINAL_NUN =         '&#1503;';
-00349         my  $NUN =               '&#1504;';
-00350         my  $SAMEKH =            '&#1505;';
-00351         my  $AYIN =              '&#1506;';
-00352         my  $FINAL_PE =          '&#1507;';
-00353         my  $PE =                '&#1508;';
-00354         my  $FINAL_TSADI =       '&#1509;';
-00355 # also known as zade
-00356         my  $TSADI =             '&#1510;';
-00357         my  $QOF =               '&#1511;';
-00358         my  $RESH =              '&#1512;';
-00359         my  $SHIN =              '&#1513;';
-00360         my  $TAV =               '&#1514;';
-00361 # Yiddish digraphs
-00362 #   Hebrew Ligature
-00363 # tsvey vovn
-00364         my  $DOUBLE_VAV =        '&#1520;';
-00365         my  $VAV_YOD =           '&#1521;';
-00366 # tsvey yudn
-00367         my  $DOUBLE_YOD =        '&#1522;';
-00368 
-00369 # Additional punctuation
-00370         my  $PUNCT_GERESH =      '&#1523;';
-00371         my  $PUNCT_GERSHAYIM =   '&#1524;';
-00372 # Reserved: 0x05F5"
-00373 # x (hebrew point judeo-spanish varika - FB1E)
-00374 #my  $JUDEO_SPANISH_VARIKA = pack("U",0xFB1E); # UTF-8 OxFB1E
-00375 
-00376 #############################
-00377 # End of Unicode 2.0 Hebrew #
-00378 #############################
-00379 
-00380 # A hash whose key is a Michagan code, and whose value is a Unicode
-00381 # equvalent
-00382 
-00383         char subst[] = new char [255];
-00384         subst[')'] = 1488;
-00385         'B'  => $BET,
-00386         'G'  => $GIMEL,
-00387         'D'  => $DALET,
-00388         'H'  => $HE,
-00389         'W'  => $VAV,
-00390         'Z'  => $ZAYIN,
-00391         'X'  => $HET,
-00392         '+'  => $TET,
-00393         'Y'  => $YOD,
-00394         'K'  => $KAF,
-00395         'L'  => $LAMED,
-00396         'M'  => $MEM,
-00397         'N'  => $NUN,
-00398         'S'  => $SAMEKH,
-00399         '('  => $AYIN,
-00400         'P'  => $PE,
-00401         'C'  => $TSADI,
-00402         'Q'  => $QOF,
-00403         'R'  => $RESH,
-00404         '#'  => $SHIN, # the letter shin without a point
-00405         '&'  => ($SHIN . $SIN_DOT),
-00406         '$'  => ($SHIN . $SHIN_DOT), # '
-00407         'T'  => $TAV,
-00408 # VOWELS
-00409         'A'  => $PATAH,
-00410         'F'  => $QAMATS,
-00411         'E'  => $SEGOL,
-00412         '"'  => $TSERE,
-00413         'I'  => $HIRIQ,
-00414         'O'  => $HOLAM,
-00415         'U'  => $QUBUTS,
-00416         ':'  => $SHEVA,
-00417         ':A' => $HATAF_PATAH,
-00418         ':E' => $HATAF_SEGOL,
-00419         ':F' => $HATAF_QAMATS,
-00420 # OTHER DIACRITICS
-00421         '.'  => $DAGESH_OR_MAPIQ,
-00422         '-'  => $MAQAF,
-00423         ','  => $RAFE,
-00424 # CANTILLATION
-00425         '00' => $SOF_PASUQ,
-00426         '01' => $SEGOLTA,
-00427 # According to BHS, zarqa and sinnor are both postpositive. However,
-00428 # the Michigan encoding uses one code for both. The Unicode zarqa
-00429 # (0x0598) is definitely NOT postpositive. And further, the shape of
-00430 # the symbol is different in BHS and Uniocde. This needs further
-00431 # research to determine what's going on here. For now, we follow BHS
-00432 # and use the postpositive Unicode zinor or both accents.
-00433         '02' => $ZINOR,
-00434 # Pashta is postpositive, and the Unicode equivalent reflects
-00435 # this. However, there is a poetic equivalent -- azla legarmeh --
-00436 # which is not postpositive, but no equivalent code point exists in
-00437 # Unicode. The Michigan encoding does not distinguish between the two,
-00438 # although it could be algorithmically determined.
-00439         '03' => $PASHTA,
-00440         '04' => $TELISHA_QETANA,
-00441         '05' => $PASEQ,
-00442         '10' => $YETIV,
-00443 # In the poetic books, prepositive dehi occurs; it's unclear whether
-00444 # tipeha also occurs in the poetic books. Otherwise, we could simply
-00445 # check for what book in the Tanach we are in. Michigan uses the same
-00446 # code for each.
-00447         '13' => $TIPEHA, # also $DEHI
-00448 # This is the poetic accent mugrash, which also includes rebia, but is
-00449 # encoded separately as '81' in the Michigan text.
-00450         '11' => $GERESH_MUQDAM,
-00451         '14' => $TELISHA_GEDOLA,
-00452 # Telisha qetana is postpositive as in '04' above. However, Michigan
-00453 # code '24' is for a medial telisha. Graphically, there is no
-00454 # difference.
-00455         '24' => $TELISHA_QETANA,
-00456         '33' => $PASHTA,
-00457 # The Michigan code of telisha gedola in medial position. Graphically,
-00458 # there is no difference.
-00459         '44' => $TELISHA_GEDOLA,
-00460         '60' => $OLE,
-00461         '61' => $GERESH,
-00462 # This is the Unicode Hebrew *accent*; there is also another Hebrew
-00463 # *punctuation* called GERSHAYIM 0x05F4. I'm using the more
-00464 # traditional rounded marks, rather than the alternate straight
-00465 # marks.
-00466         '62' => $GERSHAYIM,
-00467 # Also known as azla
-00468         '63' => $QADMA,
-00469         '64' => $ILUY,
-00470         '65' => $SHALSHELET,
-00471         '80' => $ZAQEF_QATAN,
-00472         '81' => $REVIA,
-00473 # Note, this accent is actually sinnorit, but it does not exist as a
-00474 # separate glyph in the Unicode standard. The 'ZINOR' Unicode accent
-00475 # is postpositive, while sinnorit is not. ZARQA is as close as I can
-00476 # get to this.
-00477         '82' => $ZARQA,
-00478 # The Unicode form does not match the form used by BHS, but the names
-00479 # are the same.
-00480         '83' => $PAZER,
-00481         '84' => $QARNEY_PARA,
-00482         '85' => $ZAQEF_GADOL,
-00483 # Note Michigan encoding distinguishes between medial metheg '35' (occuring
-00484 # on the left of the vowel), and the ordinary meteg '95' (occuring on the
-00485 # right of the vowel). It is also used for silluq.
-00486         '35' => $METAG,
-00487         '70' => $MAHAPAKH,
-00488         '71' => $MERKHA,
-00489         '72' => $MERKHA_KEFULA,
-00490         '73' => $TIPEHA, # also '13', '73' also is used for majela
-00491         '74' => $MUNAH,
-00492         '75' => $METAG, # this is silluq; should appear to the left of the vowel
-00493         '91' => $TEVIR,
-00494         '92' => $ETNAHTA,
-00495         '93' => $YERAH_BEN_YOMO,
-00496         '94' => $DARGA,
-00497         '95' => $METAG, # should appear to the right of the vowel
-00498 
-00499 # Not used by the Michigan Encoding
-00500 # $UPPER_DOT = '05C4';
-00501         );
-00502 
-00503 # declare other variables
-00504         my (@bhsLines,
-00505         @bhsVerse,
-00506         @entity_line) = ();
-00507 
-00508         my ($i,
-00509         $verse,
-00510         $word,
-00511         $character) = 0;
-00512 
-00513         my ($element,
-00514         $saveGuttural) = "";
-00515 
-00516 # read in a line
-00517         while (<>) {
-00518 # Process one verse
-00519 # iterate over every character and change to XML decimal entity
-00520         CHAR: for ( $i = 0; ($i < scalar(@bhsVerse)); $i++) {
-00521          # find and convert final kaf, mem, nun, pe, tsade
-00522          ( # if final form
-00523           $bhsVerse[$i] =~ /[KMNPC]/
-00524          )
-00525            &&
-00526                 (
-00527                  ( # whitespace or
-00528                   $bhsVerse[$i+1] =~ /[ \-?]/
-00529                  )
-00530                  ||
-00531                  ( # EOL or
-00532                   $i == ( scalar(@bhsVerse) - 1 )
-00533                  )
-00534                  ||
-00535                  ( # sof pasuq or
-00536                   ( $bhsVerse[$i+1] =~ /0/ ) &&
-00537                   ( $bhsVerse[$i+2] =~ /0/ )
-00538                  )
-00539                  ||
-00540                  ( # one accent followed by white, eol or
-00541                   (
-00542                    ( $bhsVerse[$i+1] =~ /\d/ ) &&
-00543                    ( $bhsVerse[$i+2] =~ /\d/ )
-00544                   ) &&
-00545                   (
-00546                    ( $bhsVerse[$i+3] =~ /[ \-?]/ ) ||
-00547                    ( $i == ( scalar(@bhsVerse) - 1 ) )
-00548                   )
-00549                  )
-00550                  ||
-00551                  ( # two accents followed by white, eol
-00552                   (
-00553                    ( $bhsVerse[$i+1] =~ /\d/ ) &&
-00554                    ( $bhsVerse[$i+2] =~ /\d/ ) &&
-00555                    ( $bhsVerse[$i+3] =~ /\d/ ) &&
-00556                    ( $bhsVerse[$i+4] =~ /\d/ )
-00557                   ) &&
-00558                   (
-00559                    ( $bhsVerse[$i+5] =~ /[ \-?]/ ) ||
-00560                    ( $i == ( scalar(@bhsVerse) - 1 ) )
-00561                   )
-00562                  )
-00563                  ||
-00564                  ( # followed by a vowel and white, eol, sof pasuq
-00565                   ( $bhsVerse[$i+1] =~ /[:F]/ ) &&
-00566                   ( # followed by
-00567                    ( $bhsVerse[$i+2] =~ /[ \-?]/ ) || # whitespace or
-00568                    ( $i == ( scalar(@bhsVerse) - 1 ) ) || # eol or
-00569                    ( # sof pasuq
-00570                     ( $bhsVerse[$i+2] =~ /0/ ) &&
-00571                     ( $bhsVerse[$i+3] =~ /0/ )
-00572                    )
-00573                   )
-00574                  )
-00575                 ) # end of what follows after final letter
-00576                   &&
-00577                     do {
-00578                          $bhsVerse[$i] =~ /K/ && eval { push @entity_line,$FINAL_KAF; }
-00579                            && next CHAR;
-00580                          $bhsVerse[$i] =~ /M/ && eval { push @entity_line,$FINAL_MEM; }
-00581                            && next CHAR;
-00582                          $bhsVerse[$i] =~ /N/ && eval { push @entity_line,$FINAL_NUN; }
-00583                            && next CHAR;
-00584                          $bhsVerse[$i] =~ /P/ && eval { push @entity_line,$FINAL_PE; }
-00585                            && next CHAR;
-00586                          $bhsVerse[$i] =~ /C/ && eval { push @entity_line,$FINAL_TSADI; }
-00587                            && next CHAR;
-00588                     };
-00589          # find and convert "furtive patach"
-00590          ( $bhsVerse[$i] =~ /A/ ) &&             # If the letter is a patach
-00591            ( $bhsVerse[$i-1] =~ /[)HX(]/ ) &&    #  and is preceeded by a guttural
-00592            ( ( $bhsVerse[$i-2] =~ /[AEFOU]/ ) || #  and is preceeded by a vowel
-00593                 ( ( $bhsVerse[$i-2] =~ /\./ ) &&    #  or by suruq
-00594                   ( $bhsVerse[$i-3] =~ /W/ ) ) ||    #
-00595                 ( ( $bhsVerse[$i-2] =~ /W/ ) &&      #  or by holem (written plene)
-00596                   ( $bhsVerse[$i-3] =~ /O/ ) ) ||    #
-00597                 ( ( $bhsVerse[$i-2] =~ /Y/ ) &&      #  or by hiriq-yod
-00598                   ( $bhsVerse[$i-3] =~ /I/ ) ) ) &&
-00599                   do {
-00600                          $saveGuttural = pop @entity_line; # snip off the gutteral
-00601                          push @entity_line,$PATAH;         # push on the patach
-00602                          push @entity_line,$saveGuttural;  # push back on the gutteral
-00603                          next CHAR;
-00604                   };
-00605          # convert cantillation
-00606          #   since we have previously dealt with all other cases of
-00607          #   numbers, two digit patterns are all we have to search for
-00608          $bhsVerse[$i] =~ /\d/ && $bhsVerse[$i+1] =~ /\d/ && do {
-00609                 push @entity_line,$Michigan2XMLentity{"$bhsVerse[$i]$bhsVerse[$i+1]"};
-00610                 $i++; # accents are two digits long, so advance past the 2nd digit
-00611                 next CHAR;
-00612          };
-00613          # convert katef vowels, which are two characters long
-00614          $bhsVerse[$i] =~ /:/ && $bhsVerse[$i+1] =~ /[AEF]/ && do {
-00615                 push @entity_line,$Michigan2XMLentity{"$bhsVerse[$i]$bhsVerse[$i+1]"};
-00616                 $i++;
-00617                 next CHAR;
-00618          };
-00619          # convert everything else
-00620          push @entity_line,$Michigan2XMLentity{"$bhsVerse[$i]"};
-00621         } # end CHAR
-00622 # print the line to standard output with XML character-level encoding
-00623 # each character has the following format:
-00624 # <c id="1kg1.verse#.word#.character#">&#1234;</c>
-00625 
-00626 # set up the verse element
-00627         $word = 1;
-00628         $character = 1;
-00629         print "<verse>\n<word>\n";
-00630 # print each character element
-00631 # if there is a space, then close the word entity, open a new word
-00632 # entity, increment the word number, reset the character number to
-00633 # zero.
-00634         foreach $element (@entity_line) {
-00635          if ( $element =~ " " ) {
-00636            $word++;
-00637            $character = 1;
-00638            print "</word>\n<word>\n";
-00639            next;
-00640          }
-00641          print "<c id=\"1kg1.$verse.$word.$character\">$element</c>\n";
-00642          $character++;
-00643         }
-00644 # close the verse element
-00645         print "</word></verse>\n";
-00646 # reinitialize variables
-00647         @bhsVerse = ();
-00648         @entity_line = ();
-00649         @bhsLines = ();
-00650         } # end while
-00651 # close the XML document
-00652         print "</body>\n";
-00653         */
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/hebrewmcim_8h-source.html b/doc/api-documentation/html/hebrewmcim_8h-source.html deleted file mode 100644 index 650c5cd..0000000 --- a/doc/api-documentation/html/hebrewmcim_8h-source.html +++ /dev/null @@ -1,34 +0,0 @@ - - -hebrewmcim.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

hebrewmcim.h

00001 #ifndef HEBREWMCIM_H
-00002 #define HEBREWMCIM_H
-00003 
-00013 #include <swinputmeth.h>
-00014 #include <map>
-00015 using namespace std;
-00016 
-00017 class HebrewMCIM : public SWInputMethod {
-00018 
-00019     void init();
-00020     int subst[255];
-00021     map<int, int> subst2[12];
-00022     map<int, int*> multiChars;
-00023 
-00024 public:
-00025     HebrewMCIM();
-00026     int *translate(char in);
-00027 };
-00028 
-00029 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/hierarchy.html b/doc/api-documentation/html/hierarchy.html deleted file mode 100644 index 806c262..0000000 --- a/doc/api-documentation/html/hierarchy.html +++ /dev/null @@ -1,93 +0,0 @@ - - -Hierarchical Index - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

The Sword Project Class Hierarchy

Go to the graphical class hierarchy -

-This inheritance list is sorted roughly, but not completely, alphabetically:

-
Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/hrefcom_8cpp-source.html b/doc/api-documentation/html/hrefcom_8cpp-source.html deleted file mode 100644 index 50e8c16..0000000 --- a/doc/api-documentation/html/hrefcom_8cpp-source.html +++ /dev/null @@ -1,111 +0,0 @@ - - -hrefcom.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

hrefcom.cpp

00001 /******************************************************************************
-00002  *  hrefcom.cpp - code for class 'HREFCom'- a module that produces HTML HREFs
-00003  *                      pointing to actual text desired.  Uses standard
-00004  *                      files:  ot and nt using indexs ??.bks ??.cps ??.vss
-00005  */
-00006 
-00007 
-00008 #include <ctype.h>
-00009 #include <stdio.h>
-00010 #include <fcntl.h>
-00011 
-00012 #ifndef __GNUC__
-00013 #include <io.h>
-00014 #else
-00015 #include <unistd.h>
-00016 #endif
-00017 
-00018 #include <string.h>
-00019 #include <utilfuns.h>
-00020 #include <rawverse.h>
-00021 #include <hrefcom.h>
-00022 
-00023 
-00024  /******************************************************************************
-00025  * HREFCom Constructor - Initializes data for instance of HREFCom
-00026  *
-00027  * ENT: iname - Internal name for module
-00028  *      iprefix - string to prepend to each HREF (e.g. "file://mods/com/jfb/")
-00029  *      idesc - Name to display to user for module
-00030  *      idisp    - Display object to use for displaying
-00031  */
-00032 
-00033 HREFCom::HREFCom(const char *ipath, const char *iprefix, const char *iname, const char *idesc, SWDisplay *idisp) : RawVerse(ipath), SWCom(iname, idesc, idisp)
-00034 {
-00035         prefix   = 0;
-00036         stdstr(&prefix, iprefix);
-00037 }
-00038 
-00039 
-00040 /******************************************************************************
-00041  * HREFCom Destructor - Cleans up instance of HREFCom
-00042  */
-00043 
-00044 HREFCom::~HREFCom()
-00045 {
-00046         if (prefix)
-00047                 delete [] prefix;
-00048 }
-00049 
-00050 
-00051 /******************************************************************************
-00052  * HREFCom::operator char *     - Returns the correct verse when char * cast
-00053  *                                      is requested
-00054  *
-00055  * RET: string buffer with verse
-00056  */
-00057 
-00058 char *HREFCom::getRawEntry() {
-00059         long  start;
-00060         unsigned short size;
-00061         char *tmpbuf;
-00062         VerseKey *key = 0;
-00063 
-00064 #ifndef _WIN32_WCE
-00065         try {
-00066 #endif
-00067                 key = SWDYNAMIC_CAST(VerseKey, this->key);
-00068 #ifndef _WIN32_WCE
-00069         }
-00070         catch ( ... ) {}
-00071 #endif
-00072         if (!key)
-00073                 key = new VerseKey(this->key);
-00074 
-00075         findoffset(key->Testament(), key->Index(), &start, &size);
-00076         entrySize = size;        // support getEntrySize call
-00077 
-00078         unsigned long newsize = ((size + 2) + strlen(prefix)) * FILTERPAD;
-00079         if (newsize > entrybufallocsize) {
-00080                 if (entrybuf)
-00081                         delete [] entrybuf;
-00082                 entrybuf = new char [ newsize ];
-00083                 entrybufallocsize = newsize;
-00084         }
-00085         tmpbuf   = new char [ size + 10 ];
-00086 
-00087         gettext(key->Testament(), start, size + 2, tmpbuf);
-00088         sprintf(entrybuf, "%s%s", prefix, tmpbuf);
-00089         preptext(entrybuf);
-00090 
-00091         delete [] tmpbuf;
-00092 
-00093         if (key != this->key)
-00094                 delete key;
-00095 
-00096         return entrybuf;
-00097 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/hrefcom_8h-source.html b/doc/api-documentation/html/hrefcom_8h-source.html deleted file mode 100644 index 8e5c400..0000000 --- a/doc/api-documentation/html/hrefcom_8h-source.html +++ /dev/null @@ -1,60 +0,0 @@ - - -hrefcom.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

hrefcom.h

00001 /******************************************************************************
-00002  *  hrefcom.h - code for class 'HREFCom'- a module that produces HTML HREFs
-00003  *                      pointing to actual text desired.  Uses standard
-00004  *                      files:  ot and nt using indexs ??.bks ??.cps ??.vss
-00005  *
-00006  * $Id: hrefcom_8h-source.html,v 1.7 2002/06/20 20:23:08 mgruner Exp $
-00007  *
-00008  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00009  *      CrossWire Bible Society
-00010  *      P. O. Box 2528
-00011  *      Tempe, AZ  85280-2528
-00012  *
-00013  * This program is free software; you can redistribute it and/or modify it
-00014  * under the terms of the GNU General Public License as published by the
-00015  * Free Software Foundation version 2.
-00016  *
-00017  * This program is distributed in the hope that it will be useful, but
-00018  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00020  * General Public License for more details.
-00021  *
-00022  */
-00023 
-00024 #ifndef HREFCOM_H
-00025 #define HREFCOM_H
-00026 
-00027 #include <rawverse.h>
-00028 #include <swcom.h>
-00029 
-00030 #include <defs.h>
-00031 
-00032 class SWDLLEXPORT HREFCom:public RawVerse, public SWCom
-00033 {
-00034   char *prefix;
-00035 
-00036 public:
-00037   
-00038     
-00039     HREFCom (const char *ipath, const char *prefix, const char *iname =
-00040              0, const char *idesc = 0, SWDisplay * idisp = 0);
-00041     virtual ~ HREFCom ();
-00042   virtual char *getRawEntry ();
-00043 };
-00044 
-00045 
-00046 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/index.html b/doc/api-documentation/html/index.html deleted file mode 100644 index a39bf85..0000000 --- a/doc/api-documentation/html/index.html +++ /dev/null @@ -1,26 +0,0 @@ - - -The Sword Project 1.5.3 - API documentation - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

The Sword Project 1.5.3 - API documentation

-

-

1.5.3

This is the API documentation of the Sword project. it describes the structure of the Sword library and documents the functions of the classes. From time to time this documentation gives programming examples, too. -

-Sword provides an interface to different modules (Bibles/Commentaries/Lexicons) on disk. The object to work directly with the modules is SWModule. Use the class SWMgr to manage the modules. -

-If you want to write your own frontend for Sword please have a look at the already existing ones. Well knwon frontends are:
- -BibleCS for Windows (the sourcecode is availble in the CVS of crosswire.org)
- -GnomeSword (http://gnomesword.sourceforge.net/)
- -BibleTime (http://www.bibletime.de/)
- -

-


Generated on Thu Jun 20 22:12:58 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/infblock_8h-source.html b/doc/api-documentation/html/infblock_8h-source.html deleted file mode 100644 index 1cbd10c..0000000 --- a/doc/api-documentation/html/infblock_8h-source.html +++ /dev/null @@ -1,53 +0,0 @@ - - -infblock.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

infblock.h

00001 /* infblock.h -- header to use infblock.c
-00002  * Copyright (C) 1995-1998 Mark Adler
-00003  * For conditions of distribution and use, see copyright notice in zlib.h 
-00004  */
-00005 
-00006 /* WARNING: this file should *not* be used by applications. It is
-00007    part of the implementation of the compression library and is
-00008    subject to change. Applications should only use zlib.h.
-00009  */
-00010 
-00011 struct inflate_blocks_state;
-00012 typedef struct inflate_blocks_state FAR inflate_blocks_statef;
-00013 
-00014 extern inflate_blocks_statef * inflate_blocks_new OF((
-00015     z_streamp z,
-00016     check_func c,               /* check function */
-00017     uInt w));                   /* window size */
-00018 
-00019 extern int inflate_blocks OF((
-00020     inflate_blocks_statef *,
-00021     z_streamp ,
-00022     int));                      /* initial return code */
-00023 
-00024 extern void inflate_blocks_reset OF((
-00025     inflate_blocks_statef *,
-00026     z_streamp ,
-00027     uLongf *));                  /* check value on output */
-00028 
-00029 extern int inflate_blocks_free OF((
-00030     inflate_blocks_statef *,
-00031     z_streamp));
-00032 
-00033 extern void inflate_set_dictionary OF((
-00034     inflate_blocks_statef *s,
-00035     const Bytef *d,  /* dictionary */
-00036     uInt  n));       /* dictionary length */
-00037 
-00038 extern int inflate_blocks_sync_point OF((
-00039     inflate_blocks_statef *s));
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/infcodes_8h-source.html b/doc/api-documentation/html/infcodes_8h-source.html deleted file mode 100644 index ab80a04..0000000 --- a/doc/api-documentation/html/infcodes_8h-source.html +++ /dev/null @@ -1,41 +0,0 @@ - - -infcodes.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

infcodes.h

00001 /* infcodes.h -- header to use infcodes.c
-00002  * Copyright (C) 1995-1998 Mark Adler
-00003  * For conditions of distribution and use, see copyright notice in zlib.h 
-00004  */
-00005 
-00006 /* WARNING: this file should *not* be used by applications. It is
-00007    part of the implementation of the compression library and is
-00008    subject to change. Applications should only use zlib.h.
-00009  */
-00010 
-00011 struct inflate_codes_state;
-00012 typedef struct inflate_codes_state FAR inflate_codes_statef;
-00013 
-00014 extern inflate_codes_statef *inflate_codes_new OF((
-00015     uInt, uInt,
-00016     inflate_huft *, inflate_huft *,
-00017     z_streamp ));
-00018 
-00019 extern int inflate_codes OF((
-00020     inflate_blocks_statef *,
-00021     z_streamp ,
-00022     int));
-00023 
-00024 extern void inflate_codes_free OF((
-00025     inflate_codes_statef *,
-00026     z_streamp ));
-00027 
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/inffast_8h-source.html b/doc/api-documentation/html/inffast_8h-source.html deleted file mode 100644 index a4772b2..0000000 --- a/doc/api-documentation/html/inffast_8h-source.html +++ /dev/null @@ -1,31 +0,0 @@ - - -inffast.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

inffast.h

00001 /* inffast.h -- header to use inffast.c
-00002  * Copyright (C) 1995-1998 Mark Adler
-00003  * For conditions of distribution and use, see copyright notice in zlib.h 
-00004  */
-00005 
-00006 /* WARNING: this file should *not* be used by applications. It is
-00007    part of the implementation of the compression library and is
-00008    subject to change. Applications should only use zlib.h.
-00009  */
-00010 
-00011 extern int inflate_fast OF((
-00012     uInt,
-00013     uInt,
-00014     inflate_huft *,
-00015     inflate_huft *,
-00016     inflate_blocks_statef *,
-00017     z_streamp ));
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/inffixed_8h-source.html b/doc/api-documentation/html/inffixed_8h-source.html deleted file mode 100644 index 22b82c1..0000000 --- a/doc/api-documentation/html/inffixed_8h-source.html +++ /dev/null @@ -1,165 +0,0 @@ - - -inffixed.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

inffixed.h

00001 /* inffixed.h -- table for decoding fixed codes
-00002  * Generated automatically by the maketree.c program
-00003  */
-00004 
-00005 /* WARNING: this file should *not* be used by applications. It is
-00006    part of the implementation of the compression library and is
-00007    subject to change. Applications should only use zlib.h.
-00008  */
-00009 
-00010 local uInt fixed_bl = 9;
-00011 local uInt fixed_bd = 5;
-00012 local inflate_huft fixed_tl[] = {
-00013     {{{96,7}},256}, {{{0,8}},80}, {{{0,8}},16}, {{{84,8}},115},
-00014     {{{82,7}},31}, {{{0,8}},112}, {{{0,8}},48}, {{{0,9}},192},
-00015     {{{80,7}},10}, {{{0,8}},96}, {{{0,8}},32}, {{{0,9}},160},
-00016     {{{0,8}},0}, {{{0,8}},128}, {{{0,8}},64}, {{{0,9}},224},
-00017     {{{80,7}},6}, {{{0,8}},88}, {{{0,8}},24}, {{{0,9}},144},
-00018     {{{83,7}},59}, {{{0,8}},120}, {{{0,8}},56}, {{{0,9}},208},
-00019     {{{81,7}},17}, {{{0,8}},104}, {{{0,8}},40}, {{{0,9}},176},
-00020     {{{0,8}},8}, {{{0,8}},136}, {{{0,8}},72}, {{{0,9}},240},
-00021     {{{80,7}},4}, {{{0,8}},84}, {{{0,8}},20}, {{{85,8}},227},
-00022     {{{83,7}},43}, {{{0,8}},116}, {{{0,8}},52}, {{{0,9}},200},
-00023     {{{81,7}},13}, {{{0,8}},100}, {{{0,8}},36}, {{{0,9}},168},
-00024     {{{0,8}},4}, {{{0,8}},132}, {{{0,8}},68}, {{{0,9}},232},
-00025     {{{80,7}},8}, {{{0,8}},92}, {{{0,8}},28}, {{{0,9}},152},
-00026     {{{84,7}},83}, {{{0,8}},124}, {{{0,8}},60}, {{{0,9}},216},
-00027     {{{82,7}},23}, {{{0,8}},108}, {{{0,8}},44}, {{{0,9}},184},
-00028     {{{0,8}},12}, {{{0,8}},140}, {{{0,8}},76}, {{{0,9}},248},
-00029     {{{80,7}},3}, {{{0,8}},82}, {{{0,8}},18}, {{{85,8}},163},
-00030     {{{83,7}},35}, {{{0,8}},114}, {{{0,8}},50}, {{{0,9}},196},
-00031     {{{81,7}},11}, {{{0,8}},98}, {{{0,8}},34}, {{{0,9}},164},
-00032     {{{0,8}},2}, {{{0,8}},130}, {{{0,8}},66}, {{{0,9}},228},
-00033     {{{80,7}},7}, {{{0,8}},90}, {{{0,8}},26}, {{{0,9}},148},
-00034     {{{84,7}},67}, {{{0,8}},122}, {{{0,8}},58}, {{{0,9}},212},
-00035     {{{82,7}},19}, {{{0,8}},106}, {{{0,8}},42}, {{{0,9}},180},
-00036     {{{0,8}},10}, {{{0,8}},138}, {{{0,8}},74}, {{{0,9}},244},
-00037     {{{80,7}},5}, {{{0,8}},86}, {{{0,8}},22}, {{{192,8}},0},
-00038     {{{83,7}},51}, {{{0,8}},118}, {{{0,8}},54}, {{{0,9}},204},
-00039     {{{81,7}},15}, {{{0,8}},102}, {{{0,8}},38}, {{{0,9}},172},
-00040     {{{0,8}},6}, {{{0,8}},134}, {{{0,8}},70}, {{{0,9}},236},
-00041     {{{80,7}},9}, {{{0,8}},94}, {{{0,8}},30}, {{{0,9}},156},
-00042     {{{84,7}},99}, {{{0,8}},126}, {{{0,8}},62}, {{{0,9}},220},
-00043     {{{82,7}},27}, {{{0,8}},110}, {{{0,8}},46}, {{{0,9}},188},
-00044     {{{0,8}},14}, {{{0,8}},142}, {{{0,8}},78}, {{{0,9}},252},
-00045     {{{96,7}},256}, {{{0,8}},81}, {{{0,8}},17}, {{{85,8}},131},
-00046     {{{82,7}},31}, {{{0,8}},113}, {{{0,8}},49}, {{{0,9}},194},
-00047     {{{80,7}},10}, {{{0,8}},97}, {{{0,8}},33}, {{{0,9}},162},
-00048     {{{0,8}},1}, {{{0,8}},129}, {{{0,8}},65}, {{{0,9}},226},
-00049     {{{80,7}},6}, {{{0,8}},89}, {{{0,8}},25}, {{{0,9}},146},
-00050     {{{83,7}},59}, {{{0,8}},121}, {{{0,8}},57}, {{{0,9}},210},
-00051     {{{81,7}},17}, {{{0,8}},105}, {{{0,8}},41}, {{{0,9}},178},
-00052     {{{0,8}},9}, {{{0,8}},137}, {{{0,8}},73}, {{{0,9}},242},
-00053     {{{80,7}},4}, {{{0,8}},85}, {{{0,8}},21}, {{{80,8}},258},
-00054     {{{83,7}},43}, {{{0,8}},117}, {{{0,8}},53}, {{{0,9}},202},
-00055     {{{81,7}},13}, {{{0,8}},101}, {{{0,8}},37}, {{{0,9}},170},
-00056     {{{0,8}},5}, {{{0,8}},133}, {{{0,8}},69}, {{{0,9}},234},
-00057     {{{80,7}},8}, {{{0,8}},93}, {{{0,8}},29}, {{{0,9}},154},
-00058     {{{84,7}},83}, {{{0,8}},125}, {{{0,8}},61}, {{{0,9}},218},
-00059     {{{82,7}},23}, {{{0,8}},109}, {{{0,8}},45}, {{{0,9}},186},
-00060     {{{0,8}},13}, {{{0,8}},141}, {{{0,8}},77}, {{{0,9}},250},
-00061     {{{80,7}},3}, {{{0,8}},83}, {{{0,8}},19}, {{{85,8}},195},
-00062     {{{83,7}},35}, {{{0,8}},115}, {{{0,8}},51}, {{{0,9}},198},
-00063     {{{81,7}},11}, {{{0,8}},99}, {{{0,8}},35}, {{{0,9}},166},
-00064     {{{0,8}},3}, {{{0,8}},131}, {{{0,8}},67}, {{{0,9}},230},
-00065     {{{80,7}},7}, {{{0,8}},91}, {{{0,8}},27}, {{{0,9}},150},
-00066     {{{84,7}},67}, {{{0,8}},123}, {{{0,8}},59}, {{{0,9}},214},
-00067     {{{82,7}},19}, {{{0,8}},107}, {{{0,8}},43}, {{{0,9}},182},
-00068     {{{0,8}},11}, {{{0,8}},139}, {{{0,8}},75}, {{{0,9}},246},
-00069     {{{80,7}},5}, {{{0,8}},87}, {{{0,8}},23}, {{{192,8}},0},
-00070     {{{83,7}},51}, {{{0,8}},119}, {{{0,8}},55}, {{{0,9}},206},
-00071     {{{81,7}},15}, {{{0,8}},103}, {{{0,8}},39}, {{{0,9}},174},
-00072     {{{0,8}},7}, {{{0,8}},135}, {{{0,8}},71}, {{{0,9}},238},
-00073     {{{80,7}},9}, {{{0,8}},95}, {{{0,8}},31}, {{{0,9}},158},
-00074     {{{84,7}},99}, {{{0,8}},127}, {{{0,8}},63}, {{{0,9}},222},
-00075     {{{82,7}},27}, {{{0,8}},111}, {{{0,8}},47}, {{{0,9}},190},
-00076     {{{0,8}},15}, {{{0,8}},143}, {{{0,8}},79}, {{{0,9}},254},
-00077     {{{96,7}},256}, {{{0,8}},80}, {{{0,8}},16}, {{{84,8}},115},
-00078     {{{82,7}},31}, {{{0,8}},112}, {{{0,8}},48}, {{{0,9}},193},
-00079     {{{80,7}},10}, {{{0,8}},96}, {{{0,8}},32}, {{{0,9}},161},
-00080     {{{0,8}},0}, {{{0,8}},128}, {{{0,8}},64}, {{{0,9}},225},
-00081     {{{80,7}},6}, {{{0,8}},88}, {{{0,8}},24}, {{{0,9}},145},
-00082     {{{83,7}},59}, {{{0,8}},120}, {{{0,8}},56}, {{{0,9}},209},
-00083     {{{81,7}},17}, {{{0,8}},104}, {{{0,8}},40}, {{{0,9}},177},
-00084     {{{0,8}},8}, {{{0,8}},136}, {{{0,8}},72}, {{{0,9}},241},
-00085     {{{80,7}},4}, {{{0,8}},84}, {{{0,8}},20}, {{{85,8}},227},
-00086     {{{83,7}},43}, {{{0,8}},116}, {{{0,8}},52}, {{{0,9}},201},
-00087     {{{81,7}},13}, {{{0,8}},100}, {{{0,8}},36}, {{{0,9}},169},
-00088     {{{0,8}},4}, {{{0,8}},132}, {{{0,8}},68}, {{{0,9}},233},
-00089     {{{80,7}},8}, {{{0,8}},92}, {{{0,8}},28}, {{{0,9}},153},
-00090     {{{84,7}},83}, {{{0,8}},124}, {{{0,8}},60}, {{{0,9}},217},
-00091     {{{82,7}},23}, {{{0,8}},108}, {{{0,8}},44}, {{{0,9}},185},
-00092     {{{0,8}},12}, {{{0,8}},140}, {{{0,8}},76}, {{{0,9}},249},
-00093     {{{80,7}},3}, {{{0,8}},82}, {{{0,8}},18}, {{{85,8}},163},
-00094     {{{83,7}},35}, {{{0,8}},114}, {{{0,8}},50}, {{{0,9}},197},
-00095     {{{81,7}},11}, {{{0,8}},98}, {{{0,8}},34}, {{{0,9}},165},
-00096     {{{0,8}},2}, {{{0,8}},130}, {{{0,8}},66}, {{{0,9}},229},
-00097     {{{80,7}},7}, {{{0,8}},90}, {{{0,8}},26}, {{{0,9}},149},
-00098     {{{84,7}},67}, {{{0,8}},122}, {{{0,8}},58}, {{{0,9}},213},
-00099     {{{82,7}},19}, {{{0,8}},106}, {{{0,8}},42}, {{{0,9}},181},
-00100     {{{0,8}},10}, {{{0,8}},138}, {{{0,8}},74}, {{{0,9}},245},
-00101     {{{80,7}},5}, {{{0,8}},86}, {{{0,8}},22}, {{{192,8}},0},
-00102     {{{83,7}},51}, {{{0,8}},118}, {{{0,8}},54}, {{{0,9}},205},
-00103     {{{81,7}},15}, {{{0,8}},102}, {{{0,8}},38}, {{{0,9}},173},
-00104     {{{0,8}},6}, {{{0,8}},134}, {{{0,8}},70}, {{{0,9}},237},
-00105     {{{80,7}},9}, {{{0,8}},94}, {{{0,8}},30}, {{{0,9}},157},
-00106     {{{84,7}},99}, {{{0,8}},126}, {{{0,8}},62}, {{{0,9}},221},
-00107     {{{82,7}},27}, {{{0,8}},110}, {{{0,8}},46}, {{{0,9}},189},
-00108     {{{0,8}},14}, {{{0,8}},142}, {{{0,8}},78}, {{{0,9}},253},
-00109     {{{96,7}},256}, {{{0,8}},81}, {{{0,8}},17}, {{{85,8}},131},
-00110     {{{82,7}},31}, {{{0,8}},113}, {{{0,8}},49}, {{{0,9}},195},
-00111     {{{80,7}},10}, {{{0,8}},97}, {{{0,8}},33}, {{{0,9}},163},
-00112     {{{0,8}},1}, {{{0,8}},129}, {{{0,8}},65}, {{{0,9}},227},
-00113     {{{80,7}},6}, {{{0,8}},89}, {{{0,8}},25}, {{{0,9}},147},
-00114     {{{83,7}},59}, {{{0,8}},121}, {{{0,8}},57}, {{{0,9}},211},
-00115     {{{81,7}},17}, {{{0,8}},105}, {{{0,8}},41}, {{{0,9}},179},
-00116     {{{0,8}},9}, {{{0,8}},137}, {{{0,8}},73}, {{{0,9}},243},
-00117     {{{80,7}},4}, {{{0,8}},85}, {{{0,8}},21}, {{{80,8}},258},
-00118     {{{83,7}},43}, {{{0,8}},117}, {{{0,8}},53}, {{{0,9}},203},
-00119     {{{81,7}},13}, {{{0,8}},101}, {{{0,8}},37}, {{{0,9}},171},
-00120     {{{0,8}},5}, {{{0,8}},133}, {{{0,8}},69}, {{{0,9}},235},
-00121     {{{80,7}},8}, {{{0,8}},93}, {{{0,8}},29}, {{{0,9}},155},
-00122     {{{84,7}},83}, {{{0,8}},125}, {{{0,8}},61}, {{{0,9}},219},
-00123     {{{82,7}},23}, {{{0,8}},109}, {{{0,8}},45}, {{{0,9}},187},
-00124     {{{0,8}},13}, {{{0,8}},141}, {{{0,8}},77}, {{{0,9}},251},
-00125     {{{80,7}},3}, {{{0,8}},83}, {{{0,8}},19}, {{{85,8}},195},
-00126     {{{83,7}},35}, {{{0,8}},115}, {{{0,8}},51}, {{{0,9}},199},
-00127     {{{81,7}},11}, {{{0,8}},99}, {{{0,8}},35}, {{{0,9}},167},
-00128     {{{0,8}},3}, {{{0,8}},131}, {{{0,8}},67}, {{{0,9}},231},
-00129     {{{80,7}},7}, {{{0,8}},91}, {{{0,8}},27}, {{{0,9}},151},
-00130     {{{84,7}},67}, {{{0,8}},123}, {{{0,8}},59}, {{{0,9}},215},
-00131     {{{82,7}},19}, {{{0,8}},107}, {{{0,8}},43}, {{{0,9}},183},
-00132     {{{0,8}},11}, {{{0,8}},139}, {{{0,8}},75}, {{{0,9}},247},
-00133     {{{80,7}},5}, {{{0,8}},87}, {{{0,8}},23}, {{{192,8}},0},
-00134     {{{83,7}},51}, {{{0,8}},119}, {{{0,8}},55}, {{{0,9}},207},
-00135     {{{81,7}},15}, {{{0,8}},103}, {{{0,8}},39}, {{{0,9}},175},
-00136     {{{0,8}},7}, {{{0,8}},135}, {{{0,8}},71}, {{{0,9}},239},
-00137     {{{80,7}},9}, {{{0,8}},95}, {{{0,8}},31}, {{{0,9}},159},
-00138     {{{84,7}},99}, {{{0,8}},127}, {{{0,8}},63}, {{{0,9}},223},
-00139     {{{82,7}},27}, {{{0,8}},111}, {{{0,8}},47}, {{{0,9}},191},
-00140     {{{0,8}},15}, {{{0,8}},143}, {{{0,8}},79}, {{{0,9}},255}
-00141   };
-00142 local inflate_huft fixed_td[] = {
-00143     {{{80,5}},1}, {{{87,5}},257}, {{{83,5}},17}, {{{91,5}},4097},
-00144     {{{81,5}},5}, {{{89,5}},1025}, {{{85,5}},65}, {{{93,5}},16385},
-00145     {{{80,5}},3}, {{{88,5}},513}, {{{84,5}},33}, {{{92,5}},8193},
-00146     {{{82,5}},9}, {{{90,5}},2049}, {{{86,5}},129}, {{{192,5}},24577},
-00147     {{{80,5}},2}, {{{87,5}},385}, {{{83,5}},25}, {{{91,5}},6145},
-00148     {{{81,5}},7}, {{{89,5}},1537}, {{{85,5}},97}, {{{93,5}},24577},
-00149     {{{80,5}},4}, {{{88,5}},769}, {{{84,5}},49}, {{{92,5}},12289},
-00150     {{{82,5}},13}, {{{90,5}},3073}, {{{86,5}},193}, {{{192,5}},24577}
-00151   };
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/inftrees_8h-source.html b/doc/api-documentation/html/inftrees_8h-source.html deleted file mode 100644 index bfd7b6a..0000000 --- a/doc/api-documentation/html/inftrees_8h-source.html +++ /dev/null @@ -1,72 +0,0 @@ - - -inftrees.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

inftrees.h

00001 /* inftrees.h -- header to use inftrees.c
-00002  * Copyright (C) 1995-1998 Mark Adler
-00003  * For conditions of distribution and use, see copyright notice in zlib.h 
-00004  */
-00005 
-00006 /* WARNING: this file should *not* be used by applications. It is
-00007    part of the implementation of the compression library and is
-00008    subject to change. Applications should only use zlib.h.
-00009  */
-00010 
-00011 /* Huffman code lookup table entry--this entry is four bytes for machines
-00012    that have 16-bit pointers (e.g. PC's in the small or medium model). */
-00013 
-00014 typedef struct inflate_huft_s FAR inflate_huft;
-00015 
-00016 struct inflate_huft_s {
-00017   union {
-00018     struct {
-00019       Byte Exop;        /* number of extra bits or operation */
-00020       Byte Bits;        /* number of bits in this code or subcode */
-00021     } what;
-00022     uInt pad;           /* pad structure to a power of 2 (4 bytes for */
-00023   } word;               /*  16-bit, 8 bytes for 32-bit int's) */
-00024   uInt base;            /* literal, length base, distance base,
-00025                            or table offset */
-00026 };
-00027 
-00028 /* Maximum size of dynamic tree.  The maximum found in a long but non-
-00029    exhaustive search was 1004 huft structures (850 for length/literals
-00030    and 154 for distances, the latter actually the result of an
-00031    exhaustive search).  The actual maximum is not known, but the
-00032    value below is more than safe. */
-00033 #define MANY 1440
-00034 
-00035 extern int inflate_trees_bits OF((
-00036     uIntf *,                    /* 19 code lengths */
-00037     uIntf *,                    /* bits tree desired/actual depth */
-00038     inflate_huft * FAR *,       /* bits tree result */
-00039     inflate_huft *,             /* space for trees */
-00040     z_streamp));                /* for messages */
-00041 
-00042 extern int inflate_trees_dynamic OF((
-00043     uInt,                       /* number of literal/length codes */
-00044     uInt,                       /* number of distance codes */
-00045     uIntf *,                    /* that many (total) code lengths */
-00046     uIntf *,                    /* literal desired/actual bit depth */
-00047     uIntf *,                    /* distance desired/actual bit depth */
-00048     inflate_huft * FAR *,       /* literal/length tree result */
-00049     inflate_huft * FAR *,       /* distance tree result */
-00050     inflate_huft *,             /* space for trees */
-00051     z_streamp));                /* for messages */
-00052 
-00053 extern int inflate_trees_fixed OF((
-00054     uIntf *,                    /* literal desired/actual bit depth */
-00055     uIntf *,                    /* distance desired/actual bit depth */
-00056     inflate_huft * FAR *,       /* literal/length tree result */
-00057     inflate_huft * FAR *,       /* distance tree result */
-00058     z_streamp));                /* for memory allocation */
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/infutil_8h-source.html b/doc/api-documentation/html/infutil_8h-source.html deleted file mode 100644 index c654bf5..0000000 --- a/doc/api-documentation/html/infutil_8h-source.html +++ /dev/null @@ -1,112 +0,0 @@ - - -infutil.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

infutil.h

00001 /* infutil.h -- types and macros common to blocks and codes
-00002  * Copyright (C) 1995-1998 Mark Adler
-00003  * For conditions of distribution and use, see copyright notice in zlib.h 
-00004  */
-00005 
-00006 /* WARNING: this file should *not* be used by applications. It is
-00007    part of the implementation of the compression library and is
-00008    subject to change. Applications should only use zlib.h.
-00009  */
-00010 
-00011 #ifndef _INFUTIL_H
-00012 #define _INFUTIL_H
-00013 
-00014 typedef enum {
-00015       TYPE,     /* get type bits (3, including end bit) */
-00016       LENS,     /* get lengths for stored */
-00017       STORED,   /* processing stored block */
-00018       TABLE,    /* get table lengths */
-00019       BTREE,    /* get bit lengths tree for a dynamic block */
-00020       DTREE,    /* get length, distance trees for a dynamic block */
-00021       CODES,    /* processing fixed or dynamic block */
-00022       DRY,      /* output remaining window bytes */
-00023       DONE,     /* finished last block, done */
-00024       BAD}      /* got a data error--stuck here */
-00025 inflate_block_mode;
-00026 
-00027 /* inflate blocks semi-private state */
-00028 struct inflate_blocks_state {
-00029 
-00030   /* mode */
-00031   inflate_block_mode  mode;     /* current inflate_block mode */
-00032 
-00033   /* mode dependent information */
-00034   union {
-00035     uInt left;          /* if STORED, bytes left to copy */
-00036     struct {
-00037       uInt table;               /* table lengths (14 bits) */
-00038       uInt index;               /* index into blens (or border) */
-00039       uIntf *blens;             /* bit lengths of codes */
-00040       uInt bb;                  /* bit length tree depth */
-00041       inflate_huft *tb;         /* bit length decoding tree */
-00042     } trees;            /* if DTREE, decoding info for trees */
-00043     struct {
-00044       inflate_codes_statef 
-00045          *codes;
-00046     } decode;           /* if CODES, current state */
-00047   } sub;                /* submode */
-00048   uInt last;            /* true if this block is the last block */
-00049 
-00050   /* mode independent information */
-00051   uInt bitk;            /* bits in bit buffer */
-00052   uLong bitb;           /* bit buffer */
-00053   inflate_huft *hufts;  /* single malloc for tree space */
-00054   Bytef *window;        /* sliding window */
-00055   Bytef *end;           /* one byte after sliding window */
-00056   Bytef *read;          /* window read pointer */
-00057   Bytef *write;         /* window write pointer */
-00058   check_func checkfn;   /* check function */
-00059   uLong check;          /* check on output */
-00060 
-00061 };
-00062 
-00063 
-00064 /* defines for inflate input/output */
-00065 /*   update pointers and return */
-00066 #define UPDBITS {s->bitb=b;s->bitk=k;}
-00067 #define UPDIN {z->avail_in=n;z->total_in+=p-z->next_in;z->next_in=p;}
-00068 #define UPDOUT {s->write=q;}
-00069 #define UPDATE {UPDBITS UPDIN UPDOUT}
-00070 #define LEAVE {UPDATE return inflate_flush(s,z,r);}
-00071 /*   get bytes and bits */
-00072 #define LOADIN {p=z->next_in;n=z->avail_in;b=s->bitb;k=s->bitk;}
-00073 #define NEEDBYTE {if(n)r=Z_OK;else LEAVE}
-00074 #define NEXTBYTE (n--,*p++)
-00075 #define NEEDBITS(j) {while(k<(j)){NEEDBYTE;b|=((uLong)NEXTBYTE)<<k;k+=8;}}
-00076 #define DUMPBITS(j) {b>>=(j);k-=(j);}
-00077 /*   output bytes */
-00078 #define WAVAIL (uInt)(q<s->read?s->read-q-1:s->end-q)
-00079 #define LOADOUT {q=s->write;m=(uInt)WAVAIL;}
-00080 #define WRAP {if(q==s->end&&s->read!=s->window){q=s->window;m=(uInt)WAVAIL;}}
-00081 #define FLUSH {UPDOUT r=inflate_flush(s,z,r); LOADOUT}
-00082 #define NEEDOUT {if(m==0){WRAP if(m==0){FLUSH WRAP if(m==0) LEAVE}}r=Z_OK;}
-00083 #define OUTBYTE(a) {*q++=(Byte)(a);m--;}
-00084 /*   load local pointers */
-00085 #define LOAD {LOADIN LOADOUT}
-00086 
-00087 /* masks for lower bits (size given to avoid silly warnings with Visual C++) */
-00088 extern uInt inflate_mask[17];
-00089 
-00090 /* copy as much as possible from the sliding window to the output area */
-00091 extern int inflate_flush OF((
-00092     inflate_blocks_statef *,
-00093     z_streamp ,
-00094     int));
-00095 
-00096 struct internal_state      {int dummy;}; /* for buggy compilers */
-00097 
-00098 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/inherit__graph__0.png b/doc/api-documentation/html/inherit__graph__0.png deleted file mode 100644 index 53d1b26..0000000 Binary files a/doc/api-documentation/html/inherit__graph__0.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__1.png b/doc/api-documentation/html/inherit__graph__1.png deleted file mode 100644 index d294c2e..0000000 Binary files a/doc/api-documentation/html/inherit__graph__1.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__10.png b/doc/api-documentation/html/inherit__graph__10.png deleted file mode 100644 index 5699ebc..0000000 Binary files a/doc/api-documentation/html/inherit__graph__10.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__11.png b/doc/api-documentation/html/inherit__graph__11.png deleted file mode 100644 index 27e53cb..0000000 Binary files a/doc/api-documentation/html/inherit__graph__11.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__12.png b/doc/api-documentation/html/inherit__graph__12.png deleted file mode 100644 index aaa4738..0000000 Binary files a/doc/api-documentation/html/inherit__graph__12.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__13.png b/doc/api-documentation/html/inherit__graph__13.png deleted file mode 100644 index 5f2de1a..0000000 Binary files a/doc/api-documentation/html/inherit__graph__13.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__14.png b/doc/api-documentation/html/inherit__graph__14.png deleted file mode 100644 index d2c00a2..0000000 Binary files a/doc/api-documentation/html/inherit__graph__14.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__15.png b/doc/api-documentation/html/inherit__graph__15.png deleted file mode 100644 index c70bac1..0000000 Binary files a/doc/api-documentation/html/inherit__graph__15.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__16.png b/doc/api-documentation/html/inherit__graph__16.png deleted file mode 100644 index c1713e2..0000000 Binary files a/doc/api-documentation/html/inherit__graph__16.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__17.png b/doc/api-documentation/html/inherit__graph__17.png deleted file mode 100644 index df00c65..0000000 Binary files a/doc/api-documentation/html/inherit__graph__17.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__18.png b/doc/api-documentation/html/inherit__graph__18.png deleted file mode 100644 index f8fd9f1..0000000 Binary files a/doc/api-documentation/html/inherit__graph__18.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__19.png b/doc/api-documentation/html/inherit__graph__19.png deleted file mode 100644 index 106f135..0000000 Binary files a/doc/api-documentation/html/inherit__graph__19.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__2.png b/doc/api-documentation/html/inherit__graph__2.png deleted file mode 100644 index 7befca0..0000000 Binary files a/doc/api-documentation/html/inherit__graph__2.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__20.png b/doc/api-documentation/html/inherit__graph__20.png deleted file mode 100644 index e793599..0000000 Binary files a/doc/api-documentation/html/inherit__graph__20.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__21.png b/doc/api-documentation/html/inherit__graph__21.png deleted file mode 100644 index 2223278..0000000 Binary files a/doc/api-documentation/html/inherit__graph__21.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__22.png b/doc/api-documentation/html/inherit__graph__22.png deleted file mode 100644 index 3b9d35e..0000000 Binary files a/doc/api-documentation/html/inherit__graph__22.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__23.png b/doc/api-documentation/html/inherit__graph__23.png deleted file mode 100644 index 0532bd0..0000000 Binary files a/doc/api-documentation/html/inherit__graph__23.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__24.png b/doc/api-documentation/html/inherit__graph__24.png deleted file mode 100644 index bf20a9a..0000000 Binary files a/doc/api-documentation/html/inherit__graph__24.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__25.png b/doc/api-documentation/html/inherit__graph__25.png deleted file mode 100644 index 7a5117f..0000000 Binary files a/doc/api-documentation/html/inherit__graph__25.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__26.png b/doc/api-documentation/html/inherit__graph__26.png deleted file mode 100644 index 07b0f23..0000000 Binary files a/doc/api-documentation/html/inherit__graph__26.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__27.png b/doc/api-documentation/html/inherit__graph__27.png deleted file mode 100644 index 9428d00..0000000 Binary files a/doc/api-documentation/html/inherit__graph__27.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__28.png b/doc/api-documentation/html/inherit__graph__28.png deleted file mode 100644 index ac8ddfe..0000000 Binary files a/doc/api-documentation/html/inherit__graph__28.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__29.png b/doc/api-documentation/html/inherit__graph__29.png deleted file mode 100644 index cadc98d..0000000 Binary files a/doc/api-documentation/html/inherit__graph__29.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__3.png b/doc/api-documentation/html/inherit__graph__3.png deleted file mode 100644 index 7f50a42..0000000 Binary files a/doc/api-documentation/html/inherit__graph__3.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__30.png b/doc/api-documentation/html/inherit__graph__30.png deleted file mode 100644 index 65fb453..0000000 Binary files a/doc/api-documentation/html/inherit__graph__30.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__31.png b/doc/api-documentation/html/inherit__graph__31.png deleted file mode 100644 index a89bc9a..0000000 Binary files a/doc/api-documentation/html/inherit__graph__31.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__32.png b/doc/api-documentation/html/inherit__graph__32.png deleted file mode 100644 index cf5fd7d..0000000 Binary files a/doc/api-documentation/html/inherit__graph__32.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__33.png b/doc/api-documentation/html/inherit__graph__33.png deleted file mode 100644 index af1d2e6..0000000 Binary files a/doc/api-documentation/html/inherit__graph__33.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__34.png b/doc/api-documentation/html/inherit__graph__34.png deleted file mode 100644 index 1e3494c..0000000 Binary files a/doc/api-documentation/html/inherit__graph__34.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__35.png b/doc/api-documentation/html/inherit__graph__35.png deleted file mode 100644 index f574d53..0000000 Binary files a/doc/api-documentation/html/inherit__graph__35.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__36.png b/doc/api-documentation/html/inherit__graph__36.png deleted file mode 100644 index 01f6ce0..0000000 Binary files a/doc/api-documentation/html/inherit__graph__36.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__37.png b/doc/api-documentation/html/inherit__graph__37.png deleted file mode 100644 index b6fc908..0000000 Binary files a/doc/api-documentation/html/inherit__graph__37.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__38.png b/doc/api-documentation/html/inherit__graph__38.png deleted file mode 100644 index 0727b10..0000000 Binary files a/doc/api-documentation/html/inherit__graph__38.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__39.png b/doc/api-documentation/html/inherit__graph__39.png deleted file mode 100644 index c109d77..0000000 Binary files a/doc/api-documentation/html/inherit__graph__39.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__4.png b/doc/api-documentation/html/inherit__graph__4.png deleted file mode 100644 index fa56e3d..0000000 Binary files a/doc/api-documentation/html/inherit__graph__4.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__40.png b/doc/api-documentation/html/inherit__graph__40.png deleted file mode 100644 index e46633d..0000000 Binary files a/doc/api-documentation/html/inherit__graph__40.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__41.png b/doc/api-documentation/html/inherit__graph__41.png deleted file mode 100644 index df945bc..0000000 Binary files a/doc/api-documentation/html/inherit__graph__41.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__42.png b/doc/api-documentation/html/inherit__graph__42.png deleted file mode 100644 index 505f71a..0000000 Binary files a/doc/api-documentation/html/inherit__graph__42.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__43.png b/doc/api-documentation/html/inherit__graph__43.png deleted file mode 100644 index d870149..0000000 Binary files a/doc/api-documentation/html/inherit__graph__43.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__44.png b/doc/api-documentation/html/inherit__graph__44.png deleted file mode 100644 index dda66cc..0000000 Binary files a/doc/api-documentation/html/inherit__graph__44.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__45.png b/doc/api-documentation/html/inherit__graph__45.png deleted file mode 100644 index 94cbe9f..0000000 Binary files a/doc/api-documentation/html/inherit__graph__45.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__46.png b/doc/api-documentation/html/inherit__graph__46.png deleted file mode 100644 index b6582aa..0000000 Binary files a/doc/api-documentation/html/inherit__graph__46.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__5.png b/doc/api-documentation/html/inherit__graph__5.png deleted file mode 100644 index 746a594..0000000 Binary files a/doc/api-documentation/html/inherit__graph__5.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__6.png b/doc/api-documentation/html/inherit__graph__6.png deleted file mode 100644 index beb85fb..0000000 Binary files a/doc/api-documentation/html/inherit__graph__6.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__7.png b/doc/api-documentation/html/inherit__graph__7.png deleted file mode 100644 index f63c823..0000000 Binary files a/doc/api-documentation/html/inherit__graph__7.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__8.png b/doc/api-documentation/html/inherit__graph__8.png deleted file mode 100644 index 68356c5..0000000 Binary files a/doc/api-documentation/html/inherit__graph__8.png and /dev/null differ diff --git a/doc/api-documentation/html/inherit__graph__9.png b/doc/api-documentation/html/inherit__graph__9.png deleted file mode 100644 index 02f8125..0000000 Binary files a/doc/api-documentation/html/inherit__graph__9.png and /dev/null differ diff --git a/doc/api-documentation/html/inherits.html b/doc/api-documentation/html/inherits.html deleted file mode 100644 index ac96391..0000000 --- a/doc/api-documentation/html/inherits.html +++ /dev/null @@ -1,222 +0,0 @@ - - -Graphical Class Hierarchy - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

The Sword Project Graphical Class Hierarchy

Go to the textual class hierarchy -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-


Generated on Thu Jun 20 22:13:06 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/jfbgen_8cpp-source.html b/doc/api-documentation/html/jfbgen_8cpp-source.html deleted file mode 100644 index dfff10b..0000000 --- a/doc/api-documentation/html/jfbgen_8cpp-source.html +++ /dev/null @@ -1,256 +0,0 @@ - - -jfbgen.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

jfbgen.cpp

00001 /*****************************************************************************
-00002  *
-00003  */
-00004 
-00005 #include <stdio.h>
-00006 #include <stdlib.h>
-00007 #include <string.h>
-00008 #include <ctype.h>
-00009 
-00010 #ifndef __GNUC__
-00011 #include <io.h>
-00012 #else
-00013 #include <unistd.h>
-00014 #endif
-00015 
-00016 #include <fcntl.h>
-00017 #include <versekey.h>
-00018 
-00019 #ifndef O_BINARY
-00020         #define O_BINARY 0
-00021 #endif
-00022 
-00023 void writeidx(VerseKey &key1, VerseKey &key2, VerseKey &key3, long offset, short size);
-00024 char findbreak(int fp, long *offset, int *num1, int *num2, int *rangemax, short *size);
-00025 void openfiles();
-00026 void checkparams(int argc, char **argv);
-00027 void charsetconvert(char *data);
-00028 
-00029 
-00030 VerseKey key1, key2, key3;
-00031 int fp, vfp, cfp, bfp;
-00032 long chapoffset;
-00033 short chapsize;
-00034 char testmnt;
-00035 char startflag = 0;
-00036 
-00037 
-00038 main(int argc, char **argv)
-00039 {
-00040         long pos, offset;
-00041         int num1, num2, rangemax, curbook = 0, curchap = 0, curverse = 0;
-00042         char buf[127];
-00043         short size, tmp;
-00044         extern struct zonline online;
-00045 
-00046         checkparams(argc, argv);
-00047 
-00048         key1 = key2 = key3 = "Genesis 1:1";
-00049 
-00050         openfiles();
-00051 
-00052         num1    = key1.Chapter();
-00053         num2    = key1.Verse();
-00054 
-00055         while(!findbreak(fp, &offset, &num1, &num2, &rangemax, &size)) {
-00056                 if (!startflag) {
-00057                         startflag = 1;
-00058                 }
-00059                 else {
-00060                         if (num2 < key2.Verse()) {            // new chapter
-00061                                 if (num1 <= key2.Chapter()) { // new book
-00062                                         key2.Verse(1);
-00063                                         key2.Chapter(1);
-00064                                         key2.Book(key2.Book()+1);
-00065                                 }
-00066                                 printf("Found Chapter Break: %d ('%s')\n", num1, (const char *)key2);
-00067                                 chapoffset = offset;
-00068                                 chapsize = size;
-00069 //                              continue;
-00070                         }
-00071                 }
-00072                 key2.Verse(1);
-00073                 key2.Chapter(num1);
-00074                 key2.Verse(num2);
-00075 
-00076                 key3 = key2;
-00077 //              key3 += (rangemax - key3.Verse());
-00078 
-00079                 writeidx(key1, key2, key3, offset, size);
-00080         }
-00081         close(vfp);
-00082         close(cfp);
-00083         close(bfp);
-00084         close(fp);
-00085 }
-00086 
-00087 
-00088 /**************************************************************************
-00089  * ENT: key1    - current location of index
-00090  *      key2    - minimum keyval for which this offset is valid
-00091  *      key3    - maximum keyval for which this offset is valid
-00092  */
-00093 
-00094 void writeidx(VerseKey &key1, VerseKey &key2, VerseKey &key3, long offset, short size)
-00095 {
-00096         long pos;
-00097         short tmp;
-00098 
-00099                 if (key1.Verse() == 1) {        // new chapter
-00100                         if (key1.Chapter() == 1) {      // new book
-00101                                 pos = lseek(cfp, 0, SEEK_CUR);
-00102                                 write(bfp, &pos, 4);
-00103                                 pos = lseek(vfp, 0, SEEK_CUR); /* Book intro (cps) */
-00104                                 write(cfp, &pos, 4);
-00105                                 write(vfp, &chapoffset, 4);  /* Book intro (vss)  set to same as chap for now(it should be chap 1 which usually contains the book into anyway)*/
-00106                                 write(vfp, &chapsize, 2);
-00107                         }
-00108                         pos = lseek(vfp, 0, SEEK_CUR);
-00109                         write(cfp, &pos, 4);
-00110                         write(vfp, &chapoffset, 4);  /* Chapter intro */
-00111                         write(vfp, &chapsize, 2);
-00112                 }
-00113                 if (key1 >= key2) {
-00114                         write(vfp, &offset, 4);
-00115                         write(vfp, &size, 2);
-00116                 }
-00117                 else    {
-00118                         pos = 0;
-00119                         tmp = 0;
-00120                         write(vfp, &pos, 4);
-00121                         write(vfp, &tmp, 2);
-00122                 }
-00123                 key1++;
-00124 }
-00125 
-00126 
-00127 static VerseKey inckey = "Genesis 1:1";
-00128 
-00129 char findbreak(int fp, long *offset, int *num1, int *num2, int *rangemax, short *size)
-00130 {
-00131         char buf[7];
-00132         char buf2[20];
-00133         char ch;
-00134         char loop;
-00135         long offset2;
-00136         int ch2, vs2, rm2;
-00137         bool flag;
-00138         long chapstart = 0; 
-00139         static int olbvnum = 0;
-00140         char data[256];
-00141         char *bookabrev[66] = {"Ge", "Ex", "Le", "Nu", "De", "Jos", "Jud", "Ru",
-00142                 "1Sa", "2Sa", "1Ki", "2Ki", "1Ch", "2Ch", "Ezr", "Ne", "Es",
-00143                 "Job", "Ps", "Pr", "Ec", "So", "Isa", "Jer", "La", "Eze", "Da",
-00144                 "Ho", "Joe", "Am", "Ob", "Jon", "Mic", "Na", "Heb", "Zep",
-00145                 "Hag", "Zec", "Mal",
-00146                 "Mt", "Mr", "Lu", "Joh", "Ac", "Ro", "1Co", "2Co", "Ga",
-00147                 "Eph", "Php", "Col", "1Th", "2Th", "1Ti", "2Ti", "Tit", "Phm",
-00148                 "Heb", "Jas", "1Pe", "2Pe", "1Jo", "2Jo", "3Jo", "Jude", "Re" };
-00149 
-00150         if (++olbvnum <= 31102) {
-00151 
-00152                 if (olbvnum == 23146) { // "Matthew 1:1"        
-00153                         close(vfp);
-00154                         close(cfp);
-00155                         close(bfp);
-00156                         close(fp);
-00157                         key1 = key2 = key3 = inckey = "Matthew 1:1";
-00158                         openfiles();
-00159                         startflag = 0;
-00160                 }
-00161 
-00162 
-00163                 *offset = lseek(fp, 0, SEEK_CUR);
-00164 
-00165                 if ((olbvnum!=1) && (olbvnum != 23146))
-00166                         inckey++;
-00167                         
-00168                 *num1 = inckey.Chapter();
-00169                 *num2 = inckey.Verse();
-00170         
-00171                 sprintf(data, "JFB%.2d.htm#%s%d_%d", inckey.Book() + ((inckey.Testament()>1)?39:0), bookabrev[inckey.Book() + ((inckey.Testament()>1)?39:0)-1], inckey.Chapter(), inckey.Verse());
-00172                 write(fp, data, strlen(data));
-00173 
-00174                 *size = lseek(fp, 0, SEEK_CUR) - *offset;
-00175                 write(fp, "\n", 1);
-00176                 return 0;
-00177         }
-00178         return 1;
-00179 }
-00180 
-00181 
-00182 void openfiles()
-00183 {
-00184         char buf[255];
-00185         char fname[5];
-00186         long pos;
-00187         short size;
-00188         
-00189         testmnt = key1.Testament();
-00190 
-00191         strcpy(fname, (testmnt==2) ? "nt" : "ot");
-00192         unlink(fname);
-00193         if ((fp = open(fname, O_CREAT|O_RDWR|O_BINARY)) == -1) {
-00194                 fprintf(stderr, "Couldn't open file: %s\n", fname);
-00195                 exit(1);
-00196         }
-00197 
-00198         sprintf(buf, "%s.vss", fname);
-00199         unlink(buf);
-00200         if ((vfp = open(buf, O_CREAT|O_WRONLY|O_BINARY)) == -1) {
-00201                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00202                 exit(1);
-00203         }
-00204 
-00205         sprintf(buf, "%s.cps", fname);
-00206         unlink(buf);
-00207         if ((cfp = open(buf, O_CREAT|O_WRONLY|O_BINARY)) == -1) {
-00208                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00209                 exit(1);
-00210         }
-00211 
-00212         sprintf(buf, "%s.bks", fname);
-00213         unlink(buf);
-00214         if ((bfp = open(buf, O_CREAT|O_WRONLY|O_BINARY)) == -1) {
-00215                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00216                 exit(1);
-00217         }
-00218 
-00219         pos  = 0;
-00220         write(bfp, &pos, 4);  /* Book    offset for testament intros */
-00221         pos = 4;
-00222         write(cfp, &pos, 4);  /* Chapter offset for testament intro */
-00223 
-00224 
-00225 /*      Right now just zero out intros until parsing correctly */
-00226         pos = 0;
-00227         size = 0;
-00228         write(vfp, &pos, 4);  /* Module intro */
-00229         write(vfp, &size, 2);
-00230         write(vfp, &pos, 4);  /* Testament intro */
-00231         write(vfp, &size, 2);
-00232 
-00233 }
-00234 
-00235 
-00236 void checkparams(int argc, char **argv)
-00237 {
-00238         if (argc !=1) {
-00239                 fprintf(stderr, "usage: %s\n", argv[0]);
-00240                 exit(1);
-00241         }
-00242 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/kjvidx_8cpp-source.html b/doc/api-documentation/html/kjvidx_8cpp-source.html deleted file mode 100644 index 6bd4a1a..0000000 --- a/doc/api-documentation/html/kjvidx_8cpp-source.html +++ /dev/null @@ -1,183 +0,0 @@ - - -kjvidx.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

kjvidx.cpp

00001 #include <stdio.h>
-00002 #include <fcntl.h>
-00003 #include <versekey.h>
-00004 
-00005 
-00006 char findbreak(int fp, int *offset, int *num1, int *num2, short *size);
-00007 
-00008 
-00009 main(int argc, char **argv)
-00010 {
-00011         int fp, vfp, cfp, bfp;
-00012         long pos;
-00013         short size, tmp;
-00014         int num1, num2, offset, curbook = 0, curchap = 0, curverse = 0;
-00015         char buf[127];
-00016         VerseKey mykey;
-00017 
-00018         if ((argc < 2) || (argc > 3)) {
-00019                 fprintf(stderr, "usage: %s <file to process> [nt]\n", argv[0]);
-00020                 exit(1);
-00021         }
-00022 
-00023         if ((fp = open(argv[1], O_RDONLY)) == -1) {
-00024                 fprintf(stderr, "Couldn't open file: %s\n", argv[1]);
-00025                 exit(1);
-00026         }
-00027 
-00028         sprintf(buf, "%s.vss", argv[1]);
-00029         if ((vfp = open(buf, O_CREAT|O_WRONLY)) == -1) {
-00030                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00031                 exit(1);
-00032         }
-00033 
-00034         sprintf(buf, "%s.cps", argv[1]);
-00035         if ((cfp = open(buf, O_CREAT|O_WRONLY)) == -1) {
-00036                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00037                 exit(1);
-00038         }
-00039 
-00040         sprintf(buf, "%s.bks", argv[1]);
-00041         if ((bfp = open(buf, O_CREAT|O_WRONLY)) == -1) {
-00042                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00043                 exit(1);
-00044         }
-00045 
-00046         pos  = 0;
-00047         write(bfp, &pos, 4);  /* Book    offset for testament intros */
-00048         pos = 4;
-00049         write(cfp, &pos, 4);  /* Chapter offset for testament intro */
-00050 
-00051 
-00052 /*      Right now just zero out intros until parsing correctly */
-00053         pos = 0;
-00054         size = 0;
-00055         write(vfp, &pos, 4);  /* Module intro */
-00056         write(vfp, &size, 2);
-00057         write(vfp, &pos, 4);  /* Testament intro */
-00058         write(vfp, &size, 2);
-00059 
-00060         mykey = (argc == 3) ? "Matthew 1:1" : "Genesis 1:1";
-00061 
-00062         while (!findbreak(fp, &offset, &num1, &num2, &size)) {
-00063                 num1 = mykey.Chapter();
-00064                 num2 = mykey.Verse();
-00065                 if (num2 == 1) {                /* if we're at a new chapter */
-00066                         if (num1 == 1) {        /* if we're at a new book */
-00067                                 pos = lseek(cfp, 0, SEEK_CUR);
-00068                                 write(bfp, &pos, 4);
-00069                                 pos = lseek(vfp, 0, SEEK_CUR); /* Book intro (cps) */
-00070                                 write(cfp, &pos, 4);
-00071                                 pos  = 0;
-00072                                 tmp = 0;
-00073                                 write(vfp, &pos, 4);  /* Book intro (vss) */
-00074                                 write(vfp, &tmp, 2);
-00075                                 curbook++;
-00076                                 curchap = 0;
-00077                         }
-00078                         pos = lseek(vfp, 0, SEEK_CUR);
-00079                         write(cfp, &pos, 4);
-00080                         curverse = 1;
-00081                         pos  = 0;
-00082                         tmp = 0;
-00083                         write(vfp, &pos, 4);  /* Chapter intro */
-00084                         write(vfp, &tmp, 2);
-00085                         curchap++;
-00086                 }
-00087                 else curverse++;
-00088         
-00089                 printf("%2d:%3d:%3d found at offset: %7d\n", curbook, num1, num2, offset);
-00090 
-00091                 if (num1 != curchap) {
-00092                         fprintf(stderr, "Error: Found chaptures out of sequence\n");
-00093                         break;
-00094                 }
-00095                 if (num2 != curverse) {
-00096                         fprintf(stderr, "Error: Found verses out of sequence\n");
-00097                         break;
-00098                 }
-00099                 write(vfp, &offset, 4);
-00100                 write(vfp, &size, 2);
-00101                 mykey++;
-00102         }
-00103         
-00104         close(vfp);
-00105         close(cfp);
-00106         close(bfp);
-00107         close(fp);
-00108 }
-00109 
-00110 
-00111 char findbreak(int fp, int *offset, int *num1, int *num2, short *size)
-00112 {
-00113         char buf[17];
-00114         char buf2[7];
-00115         char loop;
-00116         char offadj, inquotes, sizeadj;
-00117         int offset2, ch2, vs2;
-00118         
-00119         memset(buf, ' ', 17);
-00120 
-00121         while (1) {
-00122                 offadj = -10;
-00123                 inquotes = 0;
-00124                 sizeadj = 0;
-00125                 if ((!memcmp(buf, "\\widctlpar {\\b\\f0\\cf2 ", 16)) && (!size)) {
-00126                         offadj = -1;
-00127 //                      inquotes = 1;
-00128                         sizeadj = -18;
-00129                 }
-00130                 if (!memcmp(&buf[1], "\\f0\\fs16\\cf2\\up6", 15)) {
-00131                         offadj = 0;
-00132                         inquotes = 1;
-00133                         sizeadj = (*buf == 10) ? -18:-17;
-00134                 }
-00135                 if (!memcmp(buf, "\\fi200\\widctlpar", 16)) {
-00136                         offadj = -1;
-00137 //                      inquotes = 1;
-00138                         sizeadj = -18;
-00139                 }
-00140                 if (offadj > -10) {
-00141                         *offset = lseek(fp, 0, SEEK_CUR) + offadj;
-00142                         if (size) {
-00143                                 (*offset)++;
-00144                                 while (inquotes) {
-00145                                         while (read(fp, buf2, 1) == 1) {
-00146                                                 if (*buf2 == '}')
-00147                                                         break;
-00148                                                 (*offset)++;
-00149                                         }
-00150                                         inquotes--;
-00151                                 }
-00152                                 if (findbreak(fp, &offset2, &ch2, &vs2, 0)) {
-00153                                         *size = (short) (lseek(fp, 0, SEEK_END) - (*offset));
-00154                                 }
-00155                                 else {
-00156                                         sprintf(buf2, "%d:%d", ch2, vs2);
-00157                                         *size = (offset2 - (*offset));
-00158                                 }
-00159                                 lseek(fp, *offset+17, SEEK_SET);
-00160                         }
-00161                         else (*offset) += sizeadj;
-00162                         return 0;
-00163                 }
-00164                 memmove(buf, &buf[1], 16);
-00165                 if (read(fp, &buf[16], 1) != 1)
-00166                         return 1;
-00167         }
-00168 }
-00169 
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/latin1utf16_8cpp-source.html b/doc/api-documentation/html/latin1utf16_8cpp-source.html deleted file mode 100644 index 39a4173..0000000 --- a/doc/api-documentation/html/latin1utf16_8cpp-source.html +++ /dev/null @@ -1,134 +0,0 @@ - - -latin1utf16.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

latin1utf16.cpp

00001 /******************************************************************************
-00002  *
-00003  * Latin1UTF16 -        SWFilter decendant to convert a Latin-1 character to UTF-16
-00004  *
-00005  */
-00006 
-00007 
-00008 #include <stdlib.h>
-00009 #include <stdio.h>
-00010 #include <latin1utf16.h>
-00011 
-00012 Latin1UTF16::Latin1UTF16() {
-00013 }
-00014 
-00015 
-00016 char Latin1UTF16::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00017 {
-00018     unsigned char *from;
-00019     unsigned short *to;
-00020     int len;
-00021     
-00022     len = strlen(text) + 1;                                             // shift string to right of buffer
-00023     if (len < maxlen) {
-00024       memmove(&text[maxlen - len], text, len);
-00025       from = (unsigned char*)&text[maxlen - len];
-00026     }
-00027     else        
-00028       from = (unsigned char*)text;
-00029     // -------------------------------
-00030     
-00031     for (to = (unsigned short*)text; *from; from++) {
-00032         switch (*from) {
-00033         case 0x80: // '€'
-00034                 *to++ = 0x20AC;
-00035                 break;
-00036         case 0x82: // '‚'
-00037                 *to++ = 0x201A;
-00038                 break;
-00039         case 0x83: // 'ƒ'
-00040                 *to++ = 0x0192;
-00041                 break;
-00042         case 0x84: // '„'
-00043                 *to++ = 0x201E;
-00044                 break;
-00045         case 0x85: // '…'
-00046                 *to++ = 0x2026;
-00047                 break;
-00048         case 0x86: // '†'
-00049                 *to++ = 0x2020;
-00050                 break;
-00051         case 0x87: // '‡'
-00052                 *to++ = 0x2021;
-00053                 break;
-00054         case 0x88: // 'ˆ'
-00055                 *to++ = 0x02C6;
-00056                 break;
-00057         case 0x89: // '‰'
-00058                 *to++ = 0x2030;
-00059                 break;
-00060         case 0x8A: // 'Š'
-00061                 *to++ = 0x0160;
-00062                 break;
-00063         case 0x8B: // '‹'
-00064                 *to++ = 0x2039;
-00065                 break;
-00066         case 0x8C: // 'Œ'
-00067                 *to++ = 0x0152;
-00068                 break;
-00069         case 0x8E: // 'Ž'
-00070                 *to++ = 0x017D;
-00071                 break;
-00072         case 0x91: // '‘'
-00073                 *to++ = 0x2018;
-00074                 break;
-00075         case 0x92: // '’'
-00076                 *to++ = 0x2019;
-00077                 break;
-00078         case 0x93: // '“'
-00079                 *to++ = 0x201C;
-00080                 break;
-00081         case 0x94: // '”'
-00082                 *to++ = 0x201D;
-00083                 break;
-00084         case 0x95: // '•'
-00085                 *to++ = 0x2022;
-00086                 break;
-00087         case 0x96: // '–'
-00088                 *to++ = 0x2013;
-00089                 break;
-00090         case 0x97: // '—'
-00091                 *to++ = 0x2014;
-00092                 break;
-00093         case 0x98: // '˜'
-00094                 *to++ = 0x02DC;
-00095                 break;
-00096         case 0x99: // '™'
-00097                 *to++ = 0x2122;
-00098                 break;
-00099         case 0x9A: // 'š'
-00100                 *to++ = 0x0161;
-00101                 break;
-00102         case 0x9B: // '›'
-00103                 *to++ = 0x203A;
-00104                 break;
-00105         case 0x9C: // 'œ'
-00106                 *to++ = 0x0153;
-00107                 break;
-00108         case 0x9E: // 'ž'
-00109                 *to++ = 0x017E;
-00110                 break;
-00111         case 0x9F: // 'Ÿ'
-00112                 *to++ = 0x0178;
-00113                 break;
-00114         default:
-00115                *to++ = (unsigned short)*from;
-00116         }
-00117     }
-00118     *to = 0;
-00119     return 0;
-00120 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/latin1utf16_8h-source.html b/doc/api-documentation/html/latin1utf16_8h-source.html deleted file mode 100644 index d7b7c3c..0000000 --- a/doc/api-documentation/html/latin1utf16_8h-source.html +++ /dev/null @@ -1,47 +0,0 @@ - - -latin1utf16.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

latin1utf16.h

00001 /*
-00002  *
-00003  *
-00004  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00005  *      CrossWire Bible Society
-00006  *      P. O. Box 2528
-00007  *      Tempe, AZ  85280-2528
-00008  *
-00009  * This program is free software; you can redistribute it and/or modify it
-00010  * under the terms of the GNU General Public License as published by the
-00011  * Free Software Foundation version 2.
-00012  *
-00013  * This program is distributed in the hope that it will be useful, but
-00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00016  * General Public License for more details.
-00017  *
-00018  */
-00019 
-00020 #ifndef LATIN1UTF16_H
-00021 #define LATIN1UTF16_H
-00022 
-00023 #include <swfilter.h>
-00024 
-00025 #include <defs.h>
-00026 
-00029 class SWDLLEXPORT Latin1UTF16:public SWFilter {
-00030 public:
-00031   Latin1UTF16();
-00032   virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule * = 0);
-00033 };
-00034 
-00035 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/latin1utf8_8cpp-source.html b/doc/api-documentation/html/latin1utf8_8cpp-source.html deleted file mode 100644 index da81d50..0000000 --- a/doc/api-documentation/html/latin1utf8_8cpp-source.html +++ /dev/null @@ -1,193 +0,0 @@ - - -latin1utf8.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

latin1utf8.cpp

00001 /******************************************************************************
-00002  *
-00003  * Latin1UTF8 - SWFilter decendant to convert a Latin-1 character to UTF-8
-00004  *
-00005  */
-00006 
-00007 
-00008 #include <stdlib.h>
-00009 #include <stdio.h>
-00010 #include <latin1utf8.h>
-00011 #include <swmodule.h>
-00012 
-00013 Latin1UTF8::Latin1UTF8() {
-00014 }
-00015 
-00016 
-00017 char Latin1UTF8::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00018 {
-00019     unsigned char *to, *from;
-00020         int len;
-00021 
-00022         len = strlen(text) + 1;
-00023         if (len == maxlen + 1)
-00024                 maxlen = (maxlen + 1) * FILTERPAD;
-00025         // shift string to right of buffer
-00026         if (len < maxlen) {
-00027           memmove(&text[maxlen - len], text, len);
-00028           from = (unsigned char*)&text[maxlen - len];
-00029         }
-00030         else    
-00031           from = (unsigned char*)text;                                                  // -------------------------------
-00032 
-00033 
-00034 
-00035         for (to = (unsigned char*)text; *from; from++) {
-00036           if (*from < 0x80) {
-00037             *to++ = *from;
-00038           }
-00039           else if (*from < 0xc0) {
-00040                 switch(*from) {
-00041                 case 0x80: // '€'
-00042                         *to++ = 0xe2; // 'â'
-00043                         *to++ = 0x82; // '‚'
-00044                         *to++ = 0xac; // '¬'
-00045                         break;
-00046                 case 0x82: // '‚'
-00047                         *to++ = 0xe2; // 'â'
-00048                         *to++ = 0x80; // '€'
-00049                         *to++ = 0x9a; // 'š'
-00050                         break;
-00051                 case 0x83: // 'ƒ'
-00052                         *to++ = 0xc6; // 'Æ'
-00053                         *to++ = 0x92; // '’'
-00054                         break;
-00055                 case 0x84: // '„'
-00056                         *to++ = 0xe2; // 'â'
-00057                         *to++ = 0x80; // '€'
-00058                         *to++ = 0x9e; // 'ž'
-00059                         break;
-00060                 case 0x85: // '…'
-00061                         *to++ = 0xe2; // 'â'
-00062                         *to++ = 0x80; // '€'
-00063                         *to++ = 0xa6; // '¦'
-00064                         break;
-00065                 case 0x86: // '†'
-00066                         *to++ = 0xe2; // 'â'
-00067                         *to++ = 0x80; // '€'
-00068                         *to++ = 0xa0; // ' '
-00069                         break;
-00070                 case 0x87: // '‡'
-00071                         *to++ = 0xe2; // 'â'
-00072                         *to++ = 0x80; // '€'
-00073                         *to++ = 0xa1; // '¡'
-00074                         break;
-00075                 case 0x88: // 'ˆ'
-00076                         *to++ = 0xcb; // 'Ë'
-00077                         *to++ = 0x86; // '†'
-00078                         break;
-00079                 case 0x89: // '‰'
-00080                         *to++ = 0xe2; // 'â'
-00081                         *to++ = 0x80; // '€'
-00082                         *to++ = 0xb0; // '°'
-00083                         break;
-00084                 case 0x8A: // 'Š'
-00085                         *to++ = 0xc5; // 'Å'
-00086                         *to++ = 0xa0; // ' '
-00087                         break;
-00088                 case 0x8B: // '‹'
-00089                         *to++ = 0xe2; // 'â'
-00090                         *to++ = 0x80; // '€'
-00091                         *to++ = 0xb9; // '¹'
-00092                         break;
-00093                 case 0x8C: // 'Œ'
-00094                         *to++ = 0xc5; // 'Å'
-00095                         *to++ = 0x92; // '’'
-00096                         break;
-00097                 case 0x8E: // 'Ž'
-00098                         *to++ = 0xc5; // 'Å'
-00099                         *to++ = 0xbd; // '½'
-00100                         break;
-00101                 case 0x91: // '‘'
-00102                         *to++ = 0xe2; // 'â'
-00103                         *to++ = 0x80; // '€'
-00104                         *to++ = 0x98; // '˜'
-00105                         break;
-00106                 case 0x92: // '’'
-00107                         *to++ = 0xe2; // 'â'
-00108                         *to++ = 0x80; // '€'
-00109                         *to++ = 0x99; // '™'
-00110                         break;
-00111                 case 0x93: // '“'
-00112                         *to++ = 0xe2; // 'â'
-00113                         *to++ = 0x80; // '€'
-00114                         *to++ = 0x9c; // 'œ'
-00115                         break;
-00116                 case 0x94: // '”'
-00117                         *to++ = 0xe2; // 'â'
-00118                         *to++ = 0x80; // '€'
-00119                         *to++ = 0x9d; // ''
-00120                         break;
-00121                 case 0x95: // '•'
-00122                         *to++ = 0xe2; // 'â'
-00123                         *to++ = 0x80; // '€'
-00124                         *to++ = 0xa2; // '¢'
-00125                         break;
-00126                 case 0x96: // '–'
-00127                         *to++ = 0xe2; // 'â'
-00128                         *to++ = 0x80; // '€'
-00129                         *to++ = 0x93; // '“'
-00130                         break;
-00131                 case 0x97: // '—'
-00132                         *to++ = 0xe2; // 'â'
-00133                         *to++ = 0x80; // '€'
-00134                         *to++ = 0x94; // '”'
-00135                         break;
-00136                 case 0x98: // '˜'
-00137                         *to++ = 0xcb; // 'Ë'
-00138                         *to++ = 0x9c; // 'œ'
-00139                         break;
-00140                 case 0x99: // '™'
-00141                         *to++ = 0xe2; // 'â'
-00142                         *to++ = 0x84; // '„'
-00143                         *to++ = 0xa2; // '¢'
-00144                         break;
-00145                 case 0x9A: // 'š'
-00146                         *to++ = 0xc5; // 'Å'
-00147                         *to++ = 0xa1; // '¡'
-00148                         break;
-00149                 case 0x9B: // '›'
-00150                         *to++ = 0xe2; // 'â'
-00151                         *to++ = 0x80; // '€'
-00152                         *to++ = 0xba; // 'º'
-00153                         break;
-00154                 case 0x9C: // 'œ'
-00155                         *to++ = 0xc5; // 'Å'
-00156                         *to++ = 0x93; // '“'
-00157                         break;
-00158                 case 0x9E: // 'ž'
-00159                         *to++ = 0xc5; // 'Å'
-00160                         *to++ = 0xbe; // '¾'
-00161                         break;
-00162                 case 0x9F: // 'Ÿ'
-00163                         *to++ = 0xc5; // 'Å'
-00164                         *to++ = 0xb8; // '¸'
-00165                         break;
-00166                 default:
-00167                         *to++ = 0xC2;
-00168                         *to++ = *from;
-00169                 }
-00170           }
-00171           else {
-00172             *to++ = 0xC3;
-00173             *to++ = (*from - 0x40);
-00174           }
-00175         }
-00176         *to++ = 0;
-00177         *to = 0;
-00178         return 0;
-00179 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/latin1utf8_8h-source.html b/doc/api-documentation/html/latin1utf8_8h-source.html deleted file mode 100644 index 5291b69..0000000 --- a/doc/api-documentation/html/latin1utf8_8h-source.html +++ /dev/null @@ -1,47 +0,0 @@ - - -latin1utf8.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

latin1utf8.h

00001 /*
-00002  *
-00003  *
-00004  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00005  *      CrossWire Bible Society
-00006  *      P. O. Box 2528
-00007  *      Tempe, AZ  85280-2528
-00008  *
-00009  * This program is free software; you can redistribute it and/or modify it
-00010  * under the terms of the GNU General Public License as published by the
-00011  * Free Software Foundation version 2.
-00012  *
-00013  * This program is distributed in the hope that it will be useful, but
-00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00016  * General Public License for more details.
-00017  *
-00018  */
-00019 
-00020 #ifndef LATIN1UTF8_H
-00021 #define LATIN1UTF8_H
-00022 
-00023 #include <swfilter.h>
-00024 
-00025 #include <defs.h>
-00026 
-00029 class SWDLLEXPORT Latin1UTF8:public SWFilter {
-00030 public:
-00031   Latin1UTF8();
-00032   virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule * = 0);
-00033 };
-00034 
-00035 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/listkey_8cpp-source.html b/doc/api-documentation/html/listkey_8cpp-source.html deleted file mode 100644 index dd4c941..0000000 --- a/doc/api-documentation/html/listkey_8cpp-source.html +++ /dev/null @@ -1,270 +0,0 @@ - - -listkey.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

listkey.cpp

00001 /******************************************************************************
-00002  *  listkey.cpp - code for base class 'ListKey'.  ListKey is the basis for all
-00003  *                              types of keys that have lists of specified indexes
-00004  *                              (e.g. a list of verses, place, etc.)
-00005  */
-00006 
-00007 #include <utilfuns.h>
-00008 #include <string.h>
-00009 #include <stdlib.h>
-00010 #include <swkey.h>
-00011 #include <listkey.h>
-00012 
-00013 static const char *classes[] = {"ListKey", "SWKey", "SWObject", 0};
-00014 SWClass ListKey::classdef(classes);
-00015 
-00016 /******************************************************************************
-00017  * ListKey Constructor - initializes instance of ListKey
-00018  *
-00019  * ENT: ikey - text key
-00020  */
-00021 
-00022 ListKey::ListKey(const char *ikey): SWKey(ikey) {
-00023         arraymax = 0;
-00024         ClearList();
-00025         init();
-00026 }
-00027 
-00028 
-00029 ListKey::ListKey(ListKey const &k) : SWKey(k.keytext) {
-00030         arraymax = k.arraymax;
-00031         arraypos = k.arraypos;
-00032         arraycnt = k.arraycnt;
-00033         array = (arraymax)?(SWKey **)malloc(k.arraymax * sizeof(SWKey *)):0;
-00034         for (int i = 0; i < arraycnt; i++)
-00035                 array[i] = k.array[i]->clone();
-00036         init();
-00037 }
-00038 
-00039 
-00040 void ListKey::init() {
-00041         myclass = &classdef;
-00042 }
-00043 
-00044 
-00045 SWKey *ListKey::clone() const
-00046 {
-00047         return new ListKey(*this);
-00048 }
-00049 
-00050 /******************************************************************************
-00051  * ListKey Destructor - cleans up instance of ListKey
-00052  */
-00053 
-00054 ListKey::~ListKey()
-00055 {
-00056         ClearList();
-00057 }
-00058 
-00059 
-00060 /******************************************************************************
-00061  * ListKey::ClearList   - Clears out elements of list
-00062  */
-00063 
-00064 void ListKey::ClearList()
-00065 {
-00066         int loop;
-00067 
-00068         if (arraymax) {
-00069                 for (loop = 0; loop < arraycnt; loop++)
-00070                         delete array[loop];
-00071 
-00072                 free(array);
-00073                 arraymax  = 0;
-00074         }
-00075         arraycnt  = 0;
-00076         arraypos  = 0;
-00077         array     = 0;
-00078 }
-00079 
-00080 
-00081 /******************************************************************************
-00082  * ListKey::copyFrom Equates this ListKey to another ListKey object
-00083  *
-00084  * ENT: ikey - other ListKey object
-00085  */
-00086 
-00087 void ListKey::copyFrom(const ListKey &ikey) {
-00088         ClearList();
-00089 
-00090         arraymax = ikey.arraymax;
-00091         arraypos = ikey.arraypos;
-00092         arraycnt = ikey.arraycnt;
-00093         array = (arraymax)?(SWKey **)malloc(ikey.arraymax * sizeof(SWKey *)):0;
-00094         for (int i = 0; i < arraycnt; i++)
-00095                 array[i] = ikey.array[i]->clone();
-00096 
-00097         SetToElement(0);
-00098 }
-00099 
-00100 
-00101 /******************************************************************************
-00102  * ListKey::add - Adds an element to the list
-00103  */
-00104 
-00105 void ListKey::add(const SWKey &ikey) {
-00106         if (++arraycnt > arraymax) {
-00107                 array = (SWKey **) ((array) ? realloc(array, (arraycnt + 32) * sizeof(SWKey *)) : calloc(arraycnt + 32, sizeof(SWKey *)));
-00108                 arraymax = arraycnt + 32;
-00109         }
-00110         array[arraycnt-1] = ikey.clone();
-00111         SetToElement(arraycnt-1);
-00112 }
-00113 
-00114 
-00115 
-00116 /******************************************************************************
-00117  * ListKey::setPosition(SW_POSITION)    - Positions this key
-00118  *
-00119  * ENT: p       - position
-00120  *
-00121  * RET: *this
-00122  */
-00123 
-00124 void ListKey::setPosition(SW_POSITION p) {
-00125         switch (p) {
-00126         case 1: // GCC won't compile P_TOP
-00127                 SetToElement(0);
-00128                 break;
-00129         case 2: // GCC won't compile P_BOTTOM
-00130                 SetToElement(arraycnt-1);
-00131                 break;
-00132         }
-00133 }
-00134 
-00135 
-00136 /******************************************************************************
-00137  * ListKey::increment - Increments a number of elements
-00138  */
-00139 
-00140 void ListKey::increment(int step) {
-00141         if (step < 0) {
-00142                 decrement(step*-1);
-00143                 return;
-00144         }
-00145         Error();                // clear error
-00146         for(; step && !Error(); step--) {
-00147                 if (arraypos < arraycnt) {
-00148                         (*(array[arraypos]))++;
-00149                         if (array[arraypos]->Error()) {
-00150                                 SetToElement(arraypos+1);
-00151                         }
-00152                         else *this = (const char *)(*array[arraypos]);
-00153                 }
-00154                 else error = KEYERR_OUTOFBOUNDS;
-00155         }
-00156 }
-00157 
-00158 
-00159 /******************************************************************************
-00160  * ListKey::decrement - Decrements a number of elements
-00161  */
-00162 
-00163 void ListKey::decrement(int step) {
-00164         if (step < 0) {
-00165                 increment(step*-1);
-00166                 return;
-00167         }
-00168         Error();                // clear error
-00169         for(; step && !Error(); step--) {
-00170                 if (arraypos > -1) {
-00171                         (*(array[arraypos]))--;
-00172                         if (array[arraypos]->Error()) {
-00173                                 SetToElement(arraypos-1, BOTTOM);
-00174                         }
-00175                         else *this = (const char *)(*array[arraypos]);
-00176                 }
-00177                 else error = KEYERR_OUTOFBOUNDS;
-00178         }
-00179 }
-00180 
-00181 
-00182 /******************************************************************************
-00183  * ListKey::Count       - Returns number of elements in list
-00184  */
-00185 
-00186 int ListKey::Count() {
-00187         return arraycnt;
-00188 }
-00189 
-00190 
-00191 /******************************************************************************
-00192  * ListKey::SetToElement        - Sets key to element number
-00193  *
-00194  * ENT: ielement        - element number to set to
-00195  *
-00196  * RET: error status
-00197  */
-00198 
-00199 char ListKey::SetToElement(int ielement, SW_POSITION pos) {
-00200         arraypos = ielement;
-00201         if (arraypos >= arraycnt) {
-00202                 arraypos = (arraycnt>0)?arraycnt - 1:0;
-00203                 error = KEYERR_OUTOFBOUNDS;
-00204         }
-00205         else {
-00206                 if (arraypos < 0) {
-00207                         arraypos = 0;
-00208                         error = KEYERR_OUTOFBOUNDS;
-00209                 }
-00210                 else {
-00211                         error = 0;
-00212                 }
-00213         }
-00214         
-00215         if (arraycnt) {
-00216                 (*array[arraypos]) = pos;
-00217                 *this = (const char *)(*array[arraypos]);
-00218         }
-00219         else *this = "";
-00220         
-00221         return error;
-00222 }
-00223 
-00224 
-00225 /******************************************************************************
-00226  * ListKey::GetElement  - Gets a key element number
-00227  *
-00228  * ENT: pos     - element number to get (or default current)
-00229  *
-00230  * RET: Key or null on error
-00231  */
-00232 
-00233 SWKey *ListKey::GetElement(int pos) {
-00234         if (pos >=0) {
-00235                 if (pos >=arraycnt)
-00236                         error = KEYERR_OUTOFBOUNDS;
-00237         }
-00238         else pos = arraypos;
-00239         return (error) ? 0:array[pos];
-00240 }
-00241         
-00242 
-00243 /******************************************************************************
-00244  * ListKey::Remove      - Removes current element from list
-00245  */
-00246 
-00247 void ListKey::Remove() {
-00248         if ((arraypos > -1) && (arraypos < arraycnt)) {
-00249                 delete array[arraypos];
-00250                 if (arraypos < arraycnt - 1)
-00251                         memmove(&array[arraypos], &array[arraypos+1], (arraycnt - arraypos - 1) * sizeof(SWKey *));
-00252                 arraycnt--;
-00253                 
-00254                 SetToElement((arraypos)?arraypos-1:0);
-00255         }
-00256 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/listkey_8h-source.html b/doc/api-documentation/html/listkey_8h-source.html deleted file mode 100644 index 2926de3..0000000 --- a/doc/api-documentation/html/listkey_8h-source.html +++ /dev/null @@ -1,86 +0,0 @@ - - -listkey.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

listkey.h

00001 /******************************************************************************
-00002  * listkey.h    - code for base class 'listkey'.  listkey is the basis for all
-00003  *                              types of keys for indexing into modules
-00004  *                              (e.g. verse, word,
-00005  *                              place, etc.)
-00006  *
-00007  * $Id: listkey_8h-source.html,v 1.7 2002/06/20 20:23:09 mgruner Exp $
-00008  *
-00009  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00010  *      CrossWire Bible Society
-00011  *      P. O. Box 2528
-00012  *      Tempe, AZ  85280-2528
-00013  *
-00014  * This program is free software; you can redistribute it and/or modify it
-00015  * under the terms of the GNU General Public License as published by the
-00016  * Free Software Foundation version 2.
-00017  *
-00018  * This program is distributed in the hope that it will be useful, but
-00019  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00021  * General Public License for more details.
-00022  *
-00023  */
-00024 
-00025 #ifndef SWLSTKEY_H
-00026 #define SWLSTKEY_H
-00027 
-00028 #include <swkey.h>
-00029 
-00030 #include <defs.h>
-00031 
-00036 class SWDLLEXPORT ListKey : public SWKey {
-00037 
-00038   static SWClass classdef;
-00039   void init ();
-00040 protected:
-00041   int arraypos;
-00042   int arraymax;
-00043   int arraycnt;
-00044   SWKey **array;
-00045 public:
-00050         ListKey (const char *ikey = 0);
-00051         ListKey (ListKey const &k);
-00054         virtual ~ ListKey ();
-00055 
-00056         virtual SWKey *clone () const;
-00059         virtual void ClearList ();
-00063         virtual int Count ();
-00066         virtual void Remove ();
-00072         virtual char SetToElement (int ielement, SW_POSITION = TOP);
-00078         virtual SWKey *GetElement (int pos = -1);
-00082         ListKey & operator << (const SWKey &ikey) { add(ikey); return *this; }
-00083         virtual void add(const SWKey &ikey);
-00084 
-00089         virtual void copyFrom(const ListKey & ikey);
-00090         virtual void copyFrom(const SWKey & ikey) { SWKey::copyFrom(ikey); }
-00091 
-00097         virtual void setPosition(SW_POSITION);
-00100         virtual void decrement(int step);
-00103         virtual void increment(int step);
-00104 
-00105         virtual char Traversable () { return 1; }
-00106         virtual long Index () const { return arraypos; }
-00107 
-00112         virtual long Index (long index) { SetToElement (index); return Index (); }
-00113 
-00114         SWKEY_OPERATORS
-00115         ListKey & operator =(const ListKey &key) { copyFrom(key); return *this; }
-00116 };
-00117 
-00118 
-00119 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/localemgr_8cpp-source.html b/doc/api-documentation/html/localemgr_8cpp-source.html deleted file mode 100644 index 5bbcca4..0000000 --- a/doc/api-documentation/html/localemgr_8cpp-source.html +++ /dev/null @@ -1,198 +0,0 @@ - - -localemgr.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

localemgr.cpp

00001 /******************************************************************************
-00002  *  localemgr.cpp - implementation of class LocaleMgr used to interact with
-00003  *                              registered locales for a sword installation
-00004  *
-00005  * $Id: localemgr_8cpp-source.html,v 1.3 2002/06/20 20:23:09 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #include <stdio.h>
-00024 #include <stdlib.h>
-00025 #include <fcntl.h>
-00026 
-00027 #ifndef __GNUC__
-00028 #include <io.h>
-00029 #else
-00030 #include <unistd.h>
-00031 #include <unixstr.h>
-00032 #endif
-00033 #include <sys/stat.h>
-00034 #include <dirent.h>
-00035 
-00036 #include <swmgr.h>
-00037 #include <utilfuns.h>
-00038 
-00039 #include <localemgr.h>
-00040 #include <filemgr.h>
-00041 
-00042 
-00043 LocaleMgr LocaleMgr::systemLocaleMgr;
-00044 
-00045 
-00046 LocaleMgr::LocaleMgr(const char *iConfigPath) {
-00047         char *prefixPath = 0;
-00048         char *configPath = 0;
-00049         char configType = 0;
-00050         string path;
-00051         
-00052         defaultLocaleName = 0;
-00053         
-00054         char *lang = getenv ("LANG");
-00055         if (lang) {
-00056                 if (strlen(lang) > 0)
-00057                         setDefaultLocaleName(lang);
-00058                 else setDefaultLocaleName("en_us");
-00059         }
-00060         else setDefaultLocaleName("en_us");
-00061 
-00062         if (!iConfigPath)
-00063                 SWMgr::findConfig(&configType, &prefixPath, &configPath);
-00064         else configPath = (char *)iConfigPath;
-00065 
-00066         if (prefixPath) {
-00067                 switch (configType) {
-00068                 case 2:
-00069                         int i;
-00070                         for (i = strlen(configPath)-1; ((i) && (configPath[i] != '/') && (configPath[i] != '\\')); i--);
-00071                         configPath[i] = 0;
-00072                         path = configPath;
-00073                         path += "/";
-00074                         break;
-00075                 default:
-00076                         path = prefixPath;
-00077                         if ((prefixPath[strlen(prefixPath)-1] != '\\') && (prefixPath[strlen(prefixPath)-1] != '/'))
-00078                                 path += "/";
-00079 
-00080                         break;
-00081                 }
-00082                 if (FileMgr::existsDir(path.c_str(), "locales.d")) {
-00083                         path += "locales.d";
-00084                         loadConfigDir(path.c_str());
-00085                 }
-00086         }
-00087 
-00088         if (prefixPath)
-00089                 delete [] prefixPath;
-00090 
-00091         if (configPath)
-00092                 delete [] configPath;
-00093 }
-00094 
-00095 
-00096 LocaleMgr::~LocaleMgr() {
-00097         if (defaultLocaleName)
-00098                 delete [] defaultLocaleName;
-00099      deleteLocales();
-00100 }
-00101 
-00102 
-00103 void LocaleMgr::loadConfigDir(const char *ipath) {
-00104         DIR *dir;
-00105         struct dirent *ent;
-00106         string newmodfile;
-00107         LocaleMap::iterator it;
-00108  
-00109         if ((dir = opendir(ipath))) {
-00110                 rewinddir(dir);
-00111                 while ((ent = readdir(dir))) {
-00112                         if ((strcmp(ent->d_name, ".")) && (strcmp(ent->d_name, ".."))) {
-00113                                 newmodfile = ipath;
-00114                                 if ((ipath[strlen(ipath)-1] != '\\') && (ipath[strlen(ipath)-1] != '/'))
-00115                                         newmodfile += "/";
-00116                                 newmodfile += ent->d_name;
-00117                                 SWLocale *locale = new SWLocale(newmodfile.c_str());
-00118                                 if (locale->getName()) {
-00119                                         it = locales.find(locale->getName());
-00120                                         if (it != locales.end()) {
-00121                                                 *((*it).second) += *locale;
-00122                                                 delete locale;
-00123                                         }
-00124                                         else locales.insert(LocaleMap::value_type(locale->getName(), locale));
-00125                                 }
-00126                     else        delete locale;
-00127                         }
-00128                 }
-00129                 closedir(dir);
-00130         }
-00131 }
-00132 
-00133 
-00134 void LocaleMgr::deleteLocales() {
-00135 
-00136         LocaleMap::iterator it;
-00137 
-00138         for (it = locales.begin(); it != locales.end(); it++)
-00139                 delete (*it).second;
-00140 
-00141         locales.erase(locales.begin(), locales.end());
-00142 }
-00143 
-00144 
-00145 SWLocale *LocaleMgr::getLocale(const char *name) {
-00146         LocaleMap::iterator it;
-00147 
-00148         it = locales.find(name);
-00149         if (it != locales.end())
-00150                 return (*it).second;
-00151 
-00152         return 0;
-00153 }
-00154 
-00155 
-00156 list <string> LocaleMgr::getAvailableLocales() {
-00157         list <string> retVal;
-00158         for (LocaleMap::iterator it = locales.begin(); it != locales.end(); it++) 
-00159                 retVal.push_back((*it).second->getName());
-00160 
-00161         return retVal;
-00162 }
-00163 
-00164 
-00165 const char *LocaleMgr::translate(const char *text, const char *localeName) {
-00166         SWLocale *target;
-00167         if (!localeName) {
-00168                 localeName = getDefaultLocaleName();
-00169         }
-00170         target = getLocale(localeName);
-00171         if (target)
-00172                 return target->translate(text);
-00173         return text;
-00174 }
-00175 
-00176 
-00177 const char *LocaleMgr::getDefaultLocaleName() {
-00178         return defaultLocaleName;
-00179 }
-00180 
-00181 
-00182 void LocaleMgr::setDefaultLocaleName(const char *name) {
-00183         stdstr(&defaultLocaleName, name);
-00184 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/localemgr_8h-source.html b/doc/api-documentation/html/localemgr_8h-source.html deleted file mode 100644 index 8e7ab4e..0000000 --- a/doc/api-documentation/html/localemgr_8h-source.html +++ /dev/null @@ -1,82 +0,0 @@ - - -localemgr.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

localemgr.h

00001 /******************************************************************************
-00002  *  localemgr.h   - definition of class LocaleMgr used to interact with
-00003  *                              registered locales for a sword installation
-00004  *
-00005  * $Id: localemgr_8h-source.html,v 1.7 2002/06/20 20:23:09 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #ifndef LOCALEMGR_H
-00024 #define LOCALEMGR_H
-00025 
-00026 #include <string>
-00027 #include <map>
-00028 #include <list>
-00029 #include <swconfig.h>
-00030 #include <swlocale.h>
-00031 
-00032 #include <defs.h>
-00033 
-00034 using namespace std;
-00035 
-00036 typedef map < string, SWLocale *, less < string > >LocaleMap;
-00037 
-00049 class SWDLLEXPORT LocaleMgr
-00050 {
-00051 private:
-00052   void deleteLocales ();
-00053   char *defaultLocaleName;
-00054 
-00055 protected:
-00056   LocaleMap locales;
-00057 
-00058 public:
-00062   LocaleMgr (const char *iConfigPath = 0);
-00063 
-00067   virtual ~ LocaleMgr ();
-00068 
-00074   virtual SWLocale *getLocale (const char *name);
-00075 
-00080   virtual list < string > getAvailableLocales ();
-00081   
-00089   virtual const char *translate (const char *text, const char *localeName = 0);
-00090 
-00095   virtual const char *getDefaultLocaleName ();
-00096 
-00101   virtual void setDefaultLocaleName (const char *name);
-00102 
-00106   static LocaleMgr systemLocaleMgr;
-00107 
-00108   
-00111   virtual void loadConfigDir(const char *ipath);
-00112   
-00113 };
-00114 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/lzsscomprs_8cpp-source.html b/doc/api-documentation/html/lzsscomprs_8cpp-source.html deleted file mode 100644 index 6b34b6e..0000000 --- a/doc/api-documentation/html/lzsscomprs_8cpp-source.html +++ /dev/null @@ -1,679 +0,0 @@ - - -lzsscomprs.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

lzsscomprs.cpp

00001 /******************************************************************************
-00002  *  lzsscomprs.cpp   - code for class 'LZSSCompress'- a driver class that
-00003  *                      provides LZSS compression
-00004  */
-00005 
-00006 #include <string.h>
-00007 #include <stdlib.h>
-00008 #include <lzsscomprs.h>
-00009 
-00010 
-00011 /******************************************************************************
-00012  * LZSSCompress Statics
-00013  */
-00014 
-00015 // m_ring_buffer is a text buffer.  It contains "nodes" of
-00016 // uncompressed text that can be indexed by position.  That is,
-00017 // a substring of the ring buffer can be indexed by a position
-00018 // and a length.  When decoding, the compressed text may contain
-00019 // a position in the ring buffer and a count of the number of
-00020 // bytes from the ring buffer that are to be moved into the
-00021 // uncompressed buffer.  
-00022 //
-00023 // This ring buffer is not maintained as part of the compressed
-00024 // text.  Instead, it is reconstructed dynamically.  That is,
-00025 // it starts out empty and gets built as the text is decompressed.
-00026 //
-00027 // The ring buffer contain N bytes, with an additional F - 1 bytes
-00028 // to facilitate string comparison.
-00029 
-00030 unsigned char LZSSCompress::m_ring_buffer[N + F - 1];
-00031 
-00032 // m_match_position and m_match_length are set by InsertNode().
-00033 //
-00034 // These variables indicate the position in the ring buffer 
-00035 // and the number of characters at that position that match
-00036 // a given string.
-00037 
-00038 short int LZSSCompress::m_match_position;
-00039 short int LZSSCompress::m_match_length;
-00040 
-00041 // m_lson, m_rson, and m_dad are the Japanese way of referring to
-00042 // a tree structure.  The dad is the parent and it has a right and
-00043 // left son (child).
-00044 //
-00045 // For i = 0 to N-1, m_rson[i] and m_lson[i] will be the right 
-00046 // and left children of node i.  
-00047 //
-00048 // For i = 0 to N-1, m_dad[i] is the parent of node i.
-00049 //
-00050 // For i = 0 to 255, rson[N + i + 1] is the root of the tree for 
-00051 // strings that begin with the character i.  Note that this requires 
-00052 // one byte characters.
-00053 //
-00054 // These nodes store values of 0...(N-1).  Memory requirements
-00055 // can be reduces by using 2-byte integers instead of full 4-byte
-00056 // integers (for 32-bit applications).  Therefore, these are 
-00057 // defined as "short ints."
-00058 
-00059 short int LZSSCompress::m_lson[N + 1];
-00060 short int LZSSCompress::m_rson[N + 257];
-00061 short int LZSSCompress::m_dad[N + 1];
-00062 
-00063 
-00064 /******************************************************************************
-00065  * LZSSCompress Constructor - Initializes data for instance of LZSSCompress
-00066  *
-00067  */
-00068 
-00069 LZSSCompress::LZSSCompress() : SWCompress() {
-00070 }
-00071 
-00072 
-00073 /******************************************************************************
-00074  * LZSSCompress Destructor - Cleans up instance of LZSSCompress
-00075  */
-00076 
-00077 LZSSCompress::~LZSSCompress() {
-00078 }
-00079 
-00080 
-00081 /******************************************************************************
-00082  * LZSSCompress::InitTree       - This function initializes the tree nodes to
-00083  *                                                      "empty" states. 
-00084  */
-00085 
-00086 void LZSSCompress::InitTree(void) {
-00087         int  i;
-00088 
-00089         // For i = 0 to N - 1, m_rson[i] and m_lson[i] will be the right
-00090         // and left children of node i.  These nodes need not be
-00091         // initialized.  However, for debugging purposes, it is nice to
-00092         // have them initialized.  Since this is only used for compression
-00093         // (not decompression), I don't mind spending the time to do it.
-00094         //
-00095         // For the same range of i, m_dad[i] is the parent of node i.
-00096         // These are initialized to a known value that can represent
-00097         // a "not used" state.
-00098         
-00099         for (i = 0; i < N; i++) {
-00100                 m_lson[i] = NOT_USED;
-00101                 m_rson[i] = NOT_USED;
-00102                 m_dad[i] = NOT_USED;
-00103         }
-00104 
-00105         // For i = 0 to 255, m_rson[N + i + 1] is the root of the tree
-00106         // for strings that begin with the character i.  This is why
-00107         // the right child array is larger than the left child array.
-00108         // These are also initialzied to a "not used" state.
-00109         //
-00110         // Note that there are 256 of these, one for each of the possible
-00111         // 256 characters.
-00112 
-00113         for (i = N + 1; i <= (N + 256); i++) {
-00114                 m_rson[i] = NOT_USED;
-00115         }
-00116 }
-00117 
-00118 
-00119 /******************************************************************************
-00120  * LZSSCompress::InsertNode     - This function inserts a string from the ring
-00121  *                                                      buffer into one of the trees.  It loads the
-00122  *                                                      match position and length member variables
-00123  *                                                      for the longest match.
-00124  *      
-00125  *                                                      The string to be inserted is identified by
-00126  *                                                      the parameter Pos, A full F bytes are
-00127  *                                                      inserted.  So,
-00128  *                                                      m_ring_buffer[Pos ... Pos+F-1]
-00129  *                                                      are inserted.
-00130  *
-00131  *                                                      If the matched length is exactly F, then an
-00132  *                                                      old node is removed in favor of the new one
-00133  *                                                      (because the old one will be deleted
-00134  *                                                      sooner).
-00135  *
-00136  *                                                      Note that Pos plays a dual role.  It is
-00137  *                                                      used as both a position in the ring buffer
-00138  *                                                      and also as a tree node.
-00139  *                                                      m_ring_buffer[Pos] defines a character that
-00140  *                                                      is used to identify a tree node.
-00141  *
-00142  * ENT: pos     - position in the buffer
-00143  */
-00144 
-00145 void LZSSCompress::InsertNode(short int Pos)
-00146 {
-00147         short int i;
-00148         short int p;
-00149         int cmp;
-00150         unsigned char * key;
-00151 
-00152 /*
-00153         ASSERT(Pos >= 0);
-00154         ASSERT(Pos < N);
-00155 */
-00156 
-00157         cmp = 1;
-00158         key = &(m_ring_buffer[Pos]);
-00159 
-00160         // The last 256 entries in m_rson contain the root nodes for
-00161         // strings that begin with a letter.  Get an index for the
-00162         // first letter in this string.
-00163 
-00164         p = (short int) (N + 1 + key[0]);
-00165 
-00166         // Set the left and right tree nodes for this position to "not
-00167         // used."
-00168 
-00169         m_lson[Pos] = NOT_USED;
-00170         m_rson[Pos] = NOT_USED;
-00171 
-00172         // Haven't matched anything yet.
-00173 
-00174         m_match_length = 0;
-00175 
-00176         for ( ; ; ) {
-00177                 if (cmp >= 0) {
-00178                         if (m_rson[p] != NOT_USED) {
-00179                                 p = m_rson[p];
-00180                         }
-00181                         else {
-00182                                 m_rson[p] = Pos;
-00183                                 m_dad[Pos] = p;
-00184                                 return;
-00185                         }
-00186                 }
-00187                 else {
-00188                         if (m_lson[p] != NOT_USED) {
-00189                                 p = m_lson[p];
-00190                         }
-00191                         else {
-00192                                 m_lson[p] = Pos;
-00193                                 m_dad[Pos] = p;
-00194                                 return;
-00195                         }
-00196                 }
-00197 
-00198                 // Should we go to the right or the left to look for the
-00199                 // next match?
-00200 
-00201                 for (i = 1; i < F; i++) {
-00202                         cmp = key[i] - m_ring_buffer[p + i];
-00203                         if (cmp != 0)
-00204                                 break;
-00205                 }
-00206 
-00207                 if (i > m_match_length) {
-00208                         m_match_position = p;
-00209                         m_match_length = i;
-00210 
-00211                         if (i >= F)
-00212                                 break;
-00213                 }
-00214         }
-00215 
-00216         m_dad[Pos] = m_dad[p];
-00217         m_lson[Pos] = m_lson[p];
-00218         m_rson[Pos] = m_rson[p];
-00219 
-00220         m_dad[ m_lson[p] ] = Pos;
-00221         m_dad[ m_rson[p] ] = Pos;
-00222 
-00223         if (m_rson[ m_dad[p] ] == p) {
-00224                 m_rson[ m_dad[p] ] = Pos;
-00225         }
-00226         else {
-00227                 m_lson[ m_dad[p] ] = Pos;
-00228         }
-00229 
-00230         // Remove "p"
-00231 
-00232         m_dad[p] = NOT_USED;
-00233 }
-00234 
-00235 
-00236 /******************************************************************************
-00237  * LZSSCompress::DeleteNode     - This function removes the node "Node" from the
-00238  *                                                      tree.
-00239  *
-00240  * ENT: node    - node to be removed
-00241  */
-00242 
-00243 void LZSSCompress::DeleteNode(short int Node)
-00244 {
-00245         short int  q;
-00246 
-00247 /*
-00248         ASSERT(Node >= 0);
-00249         ASSERT(Node < (N+1));
-00250 */
-00251 
-00252         if (m_dad[Node] == NOT_USED) { // not in tree, nothing to do
-00253                 return;
-00254         }
-00255 
-00256         if (m_rson[Node] == NOT_USED) {
-00257                 q = m_lson[Node];
-00258         }
-00259         else if (m_lson[Node] == NOT_USED) {
-00260                 q = m_rson[Node];
-00261         }
-00262         else {
-00263                 q = m_lson[Node];
-00264                 if (m_rson[q] != NOT_USED) {
-00265                         do {
-00266                                 q = m_rson[q];
-00267                         } while (m_rson[q] != NOT_USED);
-00268 
-00269                         m_rson[ m_dad[q] ] = m_lson[q];
-00270                         m_dad[ m_lson[q] ] = m_dad[q];
-00271                         m_lson[q] = m_lson[Node];
-00272                         m_dad[ m_lson[Node] ] = q;
-00273                 }
-00274 
-00275                 m_rson[q] = m_rson[Node];
-00276                 m_dad[ m_rson[Node] ] = q;
-00277         }
-00278 
-00279         m_dad[q] = m_dad[Node];
-00280 
-00281         if (m_rson[ m_dad[Node] ] == Node) {
-00282                 m_rson[ m_dad[Node] ] = q;
-00283         }
-00284         else {
-00285                 m_lson[ m_dad[Node] ] = q;
-00286         }
-00287 
-00288         m_dad[Node] = NOT_USED;
-00289 }
-00290 
-00291 
-00292 /******************************************************************************
-00293  * LZSSCompress::Encode - This function "encodes" the input stream into the
-00294  *                                              output stream.
-00295  *                                              The GetChars() and SendChars() functions are
-00296  *                                              used to separate this method from the actual
-00297  *                                              i/o.
-00298  *              NOTE:                   must set zlen for parent class to know length of
-00299  *                                              compressed buffer.
-00300  */
-00301 
-00302 void LZSSCompress::Encode(void)
-00303 {
-00304         short int i;                                            // an iterator
-00305         short int r;                                            // node number in the binary tree
-00306         short int s;                                            // position in the ring buffer
-00307         unsigned short int len;                  // len of initial string
-00308         short int last_match_length;            // length of last match
-00309         short int code_buf_pos;                  // position in the output buffer
-00310         unsigned char code_buf[17];              // the output buffer
-00311         unsigned char mask;                              // bit mask for byte 0 of out buf
-00312         unsigned char c;                                        // character read from string
-00313 
-00314         // Start with a clean tree.
-00315 
-00316         InitTree();
-00317         direct = 0;     // set direction needed by parent [Get|Send]Chars()
-00318 
-00319         // code_buf[0] works as eight flags.  A "1" represents that the
-00320         // unit is an unencoded letter (1 byte), and a "0" represents
-00321         // that the next unit is a <position,length> pair (2 bytes).
-00322         //
-00323         // code_buf[1..16] stores eight units of code.  Since the best
-00324         // we can do is store eight <position,length> pairs, at most 16 
-00325         // bytes are needed to store this.
-00326         //
-00327         // This is why the maximum size of the code buffer is 17 bytes.
-00328 
-00329         code_buf[0] = 0;
-00330         code_buf_pos = 1;
-00331 
-00332         // Mask iterates over the 8 bits in the code buffer.  The first
-00333         // character ends up being stored in the low bit.
-00334         //
-00335         //  bit   8   7   6   5   4   3   2   1
-00336         //              |                                                  |
-00337         //              |                        first sequence in code buffer
-00338         //              |
-00339         //        last sequence in code buffer          
-00340 
-00341         mask = 1;
-00342 
-00343         s = 0;
-00344         r = (short int) N - (short int) F;
-00345 
-00346         // Initialize the ring buffer with spaces...
-00347 
-00348         // Note that the last F bytes of the ring buffer are not filled.
-00349         // This is because those F bytes will be filled in immediately
-00350         // with bytes from the input stream.
-00351 
-00352         memset(m_ring_buffer, ' ', N - F);
-00353         
-00354         // Read F bytes into the last F bytes of the ring buffer.
-00355         //
-00356         // This function loads the buffer with X characters and returns
-00357         // the actual amount loaded.
-00358 
-00359         len = GetChars((char *) &(m_ring_buffer[r]), F);
-00360 
-00361         // Make sure there is something to be compressed.
-00362 
-00363         if (len == 0)
-00364                 return;
-00365 
-00366         // Insert the F strings, each of which begins with one or more
-00367         // 'space' characters.  Note the order in which these strings
-00368         // are inserted.  This way, degenerate trees will be less likely
-00369         // to occur.
-00370 
-00371         for (i = 1; i <= F; i++) {
-00372                 InsertNode((short int) (r - i));
-00373         }
-00374 
-00375         // Finally, insert the whole string just read.  The
-00376         // member variables match_length and match_position are set.
-00377 
-00378         InsertNode(r);
-00379 
-00380         // Now that we're preloaded, continue till done.
-00381 
-00382         do {
-00383 
-00384                 // m_match_length may be spuriously long near the end of
-00385                 // text.
-00386 
-00387                 if (m_match_length > len) {
-00388                         m_match_length = len;
-00389                 }
-00390 
-00391                 // Is it cheaper to store this as a single character?  If so,
-00392                 // make it so.
-00393 
-00394                 if (m_match_length < THRESHOLD) {
-00395                         // Send one character.  Remember that code_buf[0] is the
-00396                         // set of flags for the next eight items.
-00397 
-00398                         m_match_length = 1;      
-00399                         code_buf[0] |= mask;  
-00400                         code_buf[code_buf_pos++] = m_ring_buffer[r];
-00401                 }
-00402 
-00403                 // Otherwise, we do indeed have a string that can be stored
-00404                 // compressed to save space.
-00405 
-00406                 else {
-00407                         // The next 16 bits need to contain the position (12 bits)
-00408                         // and the length (4 bits).
-00409 
-00410                         code_buf[code_buf_pos++] = (unsigned char) m_match_position;
-00411                         code_buf[code_buf_pos++] = (unsigned char) (
-00412                                 ((m_match_position >> 4) & 0xf0) | 
-00413                                 (m_match_length - THRESHOLD) );
-00414                 }
-00415 
-00416                 // Shift the mask one bit to the left so that it will be ready
-00417                 // to store the new bit.
-00418 
-00419                 mask = (unsigned char) (mask << 1);
-00420 
-00421                 // If the mask is now 0, then we know that we have a full set
-00422                 // of flags and items in the code buffer.  These need to be
-00423                 // output.
-00424 
-00425                 if (!mask) {
-00426                         // code_buf is the buffer of characters to be output.
-00427                         // code_buf_pos is the number of characters it contains.
-00428 
-00429                         SendChars((char *) code_buf, code_buf_pos);
-00430 
-00431                         // Reset for next buffer...
-00432 
-00433                         code_buf[0] = 0;
-00434                         code_buf_pos = 1;
-00435                         mask = 1;
-00436                 }
-00437 
-00438                 last_match_length = m_match_length;
-00439 
-00440                 // Delete old strings and read new bytes...
-00441 
-00442                 for (i = 0; i < last_match_length; i++) {
-00443                         // Get next character...
-00444 
-00445                         if (GetChars((char *) &c, 1) != 1)
-00446                                 break;
-00447 
-00448                         // Delete "old strings"
-00449 
-00450                         DeleteNode(s);
-00451 
-00452                         // Put this character into the ring buffer.
-00453                         //                
-00454                         // The original comment here says "If the position is near
-00455                         // the end of the buffer, extend the buffer to make
-00456                         // string comparison easier."
-00457                         //
-00458                         // That's a little misleading, because the "end" of the 
-00459                         // buffer is really what we consider to be the "beginning"
-00460                         // of the buffer, that is, positions 0 through F.
-00461                         //
-00462                         // The idea is that the front end of the buffer is duplicated
-00463                         // into the back end so that when you're looking at characters
-00464                         // at the back end of the buffer, you can index ahead (beyond
-00465                         // the normal end of the buffer) and see the characters
-00466                         // that are at the front end of the buffer wihtout having
-00467                         // to adjust the index.
-00468                         //
-00469                         // That is...
-00470                         //
-00471                         //        1234xxxxxxxxxxxxxxxxxxxxxxxxxxxxx1234
-00472                         //        |                                                        |  |
-00473                         //        position 0              end of buffer  |
-00474                         //                                                                               |
-00475                         //                                duplicate of front of buffer
-00476 
-00477                         m_ring_buffer[s] = c;
-00478 
-00479                         if (s < F - 1) {
-00480                                 m_ring_buffer[s + N] = c;
-00481                         }
-00482 
-00483                         // Increment the position, and wrap around when we're at
-00484                         // the end.  Note that this relies on N being a power of 2.
-00485 
-00486                         s = (short int) ( (s + 1) & (N - 1) );
-00487                         r = (short int) ( (r + 1) & (N - 1) );
-00488 
-00489                         // Register the string that is found in 
-00490                         // m_ring_buffer[r..r+F-1].
-00491 
-00492                         InsertNode(r);
-00493                 }
-00494 
-00495                 // If we didn't quit because we hit the last_match_length,
-00496                 // then we must have quit because we ran out of characters
-00497                 // to process.
-00498 
-00499                 while (i++ < last_match_length) {                                                         
-00500                         DeleteNode(s);
-00501 
-00502                         s = (short int) ( (s + 1) & (N - 1) );
-00503                         r = (short int) ( (r + 1) & (N - 1) );
-00504 
-00505                         // Note that len hitting 0 is the key that causes the
-00506                         // do...while() to terminate.  This is the only place
-00507                         // within the loop that len is modified.
-00508                         //
-00509                         // Its original value is F (or a number less than F for
-00510                         // short strings).
-00511 
-00512                         if (--len) {
-00513                                 InsertNode(r);     /* buffer may not be empty. */
-00514                         }
-00515                 }
-00516 
-00517                 // End of do...while() loop.  Continue processing until there
-00518                 // are no more characters to be compressed.  The variable
-00519                 // "len" is used to signal this condition.
-00520         } while (len > 0);
-00521 
-00522         // There could still be something in the output buffer.  Send it
-00523         // now.
-00524 
-00525         if (code_buf_pos > 1) {
-00526                 // code_buf is the encoded string to send.
-00527                 // code_buf_ptr is the number of characters.
-00528 
-00529                 SendChars((char *) code_buf, code_buf_pos);
-00530         }
-00531 
-00532 
-00533         // must set zlen for parent class to know length of compressed buffer
-00534         zlen = zpos;
-00535 }
-00536 
-00537 
-00538 /******************************************************************************
-00539  * LZSSCompress::Decode - This function "decodes" the input stream into the
-00540  *                                              output stream.
-00541  *                                              The GetChars() and SendChars() functions are
-00542  *                                              used to separate this method from the actual
-00543  *                                              i/o.
-00544  */
-00545 
-00546 void LZSSCompress::Decode(void)
-00547 {
-00548         int k;
-00549         int r;                                                    // node number
-00550         unsigned char c[F];                              // an array of chars
-00551         unsigned char flags;                            // 8 bits of flags
-00552         int flag_count;                                  // which flag we're on
-00553         short int pos;                                    // position in the ring buffer
-00554         short int len;                                    // number of chars in ring buffer
-00555         unsigned long totalLen = 0;
-00556 
-00557         direct = 1;     // set direction needed by parent [Get|Send]Chars()
-00558 
-00559         // Initialize the ring buffer with a common string.
-00560         //
-00561         // Note that the last F bytes of the ring buffer are not filled.
-00562 
-00563         memset(m_ring_buffer, ' ', N - F);
-00564         
-00565         r = N - F;
-00566 
-00567         flags = (char) 0;
-00568         flag_count = 0;
-00569 
-00570         for ( ; ; ) {
-00571 
-00572                 // If there are more bits of interest in this flag, then
-00573                 // shift that next interesting bit into the 1's position.
-00574                 //
-00575                 // If this flag has been exhausted, the next byte must 
-00576                 // be a flag.
-00577 
-00578                 if (flag_count > 0) {
-00579                         flags = (unsigned char) (flags >> 1);
-00580                         flag_count--;
-00581                 }
-00582                 else {
-00583                         // Next byte must be a flag.
-00584 
-00585                         if (GetChars((char *) &flags, 1) != 1)
-00586                                 break;
-00587 
-00588                         // Set the flag counter.  While at first it might appear
-00589                         // that this should be an 8 since there are 8 bits in the
-00590                         // flag, it should really be a 7 because the shift must
-00591                         // be performed 7 times in order to see all 8 bits.
-00592 
-00593                         flag_count = 7;
-00594                 }
-00595 
-00596                 // If the low order bit of the flag is now set, then we know
-00597                 // that the next byte is a single, unencoded character.
-00598 
-00599                 if (flags & 1) {
-00600                         if (GetChars((char *) c, 1) != 1)
-00601                                 break;
-00602 
-00603                         if (SendChars((char *) c, 1) != 1) {
-00604                                 totalLen++;
-00605                                 break;
-00606                         }
-00607 
-00608                         // Add to buffer, and increment to next spot. Wrap at end.
-00609 
-00610                         m_ring_buffer[r] = c[0];
-00611                         r = (short int) ( (r + 1) & (N - 1) );
-00612                 }
-00613 
-00614                 // Otherwise, we know that the next two bytes are a
-00615                 // <position,length> pair.  The position is in 12 bits and
-00616                 // the length is in 4 bits.
-00617 
-00618                 else {
-00619                         // Original code:
-00620                         //  if ((i = getc(infile)) == EOF)
-00621                         //        break;
-00622                         //  if ((j = getc(infile)) == EOF)
-00623                         //        break;
-00624                         //  i |= ((j & 0xf0) << 4);     
-00625                         //  j = (j & 0x0f) + THRESHOLD;
-00626                         //
-00627                         // I've modified this to only make one input call, and
-00628                         // have changed the variable names to something more
-00629                         // obvious.
-00630 
-00631                         if (GetChars((char *) c, 2) != 2)
-00632                                 break;
-00633 
-00634                         // Convert these two characters into the position and
-00635                         // length.  Note that the length is always at least
-00636                         // THRESHOLD, which is why we're able to get a length
-00637                         // of 18 out of only 4 bits.
-00638 
-00639                         pos = (short int) ( c[0] | ((c[1] & 0xf0) << 4) );
-00640 
-00641                         len = (short int) ( (c[1] & 0x0f) + THRESHOLD );
-00642 
-00643                         // There are now "len" characters at position "pos" in
-00644                         // the ring buffer that can be pulled out.  Note that
-00645                         // len is never more than F.
-00646 
-00647                         for (k = 0; k < len; k++) {
-00648                                 c[k] = m_ring_buffer[(pos + k) & (N - 1)];
-00649 
-00650                                 // Add to buffer, and increment to next spot. Wrap at end.
-00651 
-00652                                 m_ring_buffer[r] = c[k];
-00653                                 r = (short int) ( (r + 1) & (N - 1) );
-00654                         }
-00655 
-00656                         // Add the "len" :characters to the output stream.
-00657 
-00658                         if (SendChars((char *) c, len) != (unsigned int)len) {
-00659                                 totalLen += len;
-00660                                 break;
-00661                         }
-00662                 }
-00663         }
-00664         slen = totalLen;
-00665 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/lzsscomprs_8h-source.html b/doc/api-documentation/html/lzsscomprs_8h-source.html deleted file mode 100644 index 0fe73f6..0000000 --- a/doc/api-documentation/html/lzsscomprs_8h-source.html +++ /dev/null @@ -1,93 +0,0 @@ - - -lzsscomprs.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

lzsscomprs.h

00001 /******************************************************************************
-00002  *  lzsscomprs.h   - definition of Class SWCompress used for data compression
-00003  *
-00004  * $Id: lzsscomprs_8h-source.html,v 1.7 2002/06/20 20:23:09 mgruner Exp $
-00005  *
-00006  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00007  *      CrossWire Bible Society
-00008  *      P. O. Box 2528
-00009  *      Tempe, AZ  85280-2528
-00010  *
-00011  * This program is free software; you can redistribute it and/or modify it
-00012  * under the terms of the GNU General Public License as published by the
-00013  * Free Software Foundation version 2.
-00014  *
-00015  * This program is distributed in the hope that it will be useful, but
-00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00018  * General Public License for more details.
-00019  *
-00020  */
-00021 
-00022 #ifndef LZSSCOMPRS_H
-00023 #define LZSSCOMPRS_H
-00024 
-00025 #include <swcomprs.h>
-00026 
-00027 #include <defs.h>
-00028 
-00029 // The following are constant sizes used by the compression algorithm.
-00030 //
-00031 //  N         - This is the size of the ring buffer.  It is set
-00032 //              to 4K.  It is important to note that a position
-00033 //              within the ring buffer requires 12 bits.  
-00034 //
-00035 //  F         - This is the maximum length of a character sequence
-00036 //              that can be taken from the ring buffer.  It is set
-00037 //              to 18.  Note that a length must be 3 before it is
-00038 //              worthwhile to store a position/length pair, so the
-00039 //              length can be encoded in only 4 bits.  Or, put yet
-00040 //              another way, it is not necessary to encode a length
-00041 //              of 0-18, it is necessary to encode a length of
-00042 //              3-18, which requires 4 bits.
-00043 //              
-00044 //  THRESHOLD - It takes 2 bytes to store an offset and
-00045 //              a length.  If a character sequence only
-00046 //              requires 1 or 2 characters to store 
-00047 //              uncompressed, then it is better to store
-00048 //              it uncompressed than as an offset into
-00049 //              the ring buffer.
-00050 //
-00051 // Note that the 12 bits used to store the position and the 4 bits
-00052 // used to store the length equal a total of 16 bits, or 2 bytes.
-00053 
-00054 #define N               4096
-00055 #define F               18
-00056 #define THRESHOLD       3
-00057 #define NOT_USED        N
-00058 
-00059 
-00060 
-00061 class SWDLLEXPORT LZSSCompress:public SWCompress
-00062 {
-00063   static unsigned char m_ring_buffer[N + F - 1];
-00064   static short int m_match_position;
-00065   static short int m_match_length;
-00066   static short int m_lson[N + 1];
-00067   static short int m_rson[N + 257];
-00068   static short int m_dad[N + 1];
-00069   void InitTree ();
-00070   void InsertNode (short int Pos);
-00071   void DeleteNode (short int Node);
-00072 public:
-00073     LZSSCompress ();
-00074     virtual ~ LZSSCompress ();
-00075   virtual void Encode (void);
-00076   virtual void Decode (void);
-00077 };
-00078 
-00079 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/markupfiltmgr_8cpp-source.html b/doc/api-documentation/html/markupfiltmgr_8cpp-source.html deleted file mode 100644 index d1934ab..0000000 --- a/doc/api-documentation/html/markupfiltmgr_8cpp-source.html +++ /dev/null @@ -1,250 +0,0 @@ - - -markupfiltmgr.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

markupfiltmgr.cpp

00001 /******************************************************************************
-00002  *  swmarkupmgr.cpp   - implementaion of class MarkupFilterMgr, subclass of
-00003  *                        used to transcode all module text to a requested
-00004  *                        markup.
-00005  *
-00006  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00007  *      CrossWire Bible Society
-00008  *      P. O. Box 2528
-00009  *      Tempe, AZ  85280-2528
-00010  *
-00011  * This program is free software; you can redistribute it and/or modify it
-00012  * under the terms of the GNU General Public License as published by the
-00013  * Free Software Foundation version 2.
-00014  *
-00015  * This program is distributed in the hope that it will be useful, but
-00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00018  * General Public License for more details.
-00019  *
-00020  */
-00021 
-00022 #include <thmlplain.h>
-00023 #include <gbfplain.h>
-00024 #include <thmlgbf.h>
-00025 #include <gbfthml.h>
-00026 #include <thmlhtml.h>
-00027 #include <gbfhtml.h>
-00028 #include <plainhtml.h>
-00029 #include <thmlhtmlhref.h>
-00030 #include <gbfhtmlhref.h>
-00031 #include <thmlrtf.h>
-00032 #include <gbfrtf.h>
-00033 #include <gbfosis.h>
-00034 #include <thmlosis.h>
-00035 
-00036 #include <markupfiltmgr.h>
-00037 
-00038 #include <swmgr.h>
-00039 
-00040 
-00041 /******************************************************************************
-00042  * MarkupFilterMgr Constructor - initializes instance of MarkupFilterMgr
-00043  *
-00044  * ENT:
-00045  *      enc - Encoding format to emit
-00046  *      mark - Markup format to emit
-00047  */
-00048 
-00049 MarkupFilterMgr::MarkupFilterMgr (char mark, char enc)
-00050                    : EncodingFilterMgr(enc) {
-00051 
-00052         markup = mark;
-00053 
-00054         CreateFilters(markup);
-00055 }
-00056 
-00057 
-00058 /******************************************************************************
-00059  * MarkupFilterMgr Destructor - Cleans up instance of MarkupFilterMgr
-00060  */
-00061 
-00062 MarkupFilterMgr::~MarkupFilterMgr() {
-00063         if (fromthml)
-00064                 delete (fromthml);
-00065         if (fromgbf)
-00066                 delete (fromgbf);
-00067         if (fromplain)
-00068                 delete (fromplain);
-00069         if (fromosis)
-00070                 delete (fromosis);
-00071 }
-00072 
-00073 /******************************************************************************
-00074  * MarkupFilterMgr::Markup      - sets/gets markup
-00075  *
-00076  * ENT: mark    - new encoding or 0 to simply get the current markup
-00077  *
-00078  * RET: markup
-00079  */
-00080 char MarkupFilterMgr::Markup(char mark) {
-00081         if (mark && mark != markup) {
-00082                 markup = mark;
-00083                 ModMap::const_iterator module;
-00084 
-00085                 SWFilter * oldplain = fromplain;
-00086                 SWFilter * oldthml = fromthml;
-00087                 SWFilter * oldgbf = fromgbf;
-00088                 SWFilter * oldosis = fromosis;
-00089 
-00090                 CreateFilters(markup);
-00091 
-00092                 for (module = getParentMgr()->Modules.begin(); module != getParentMgr()->Modules.end(); module++)
-00093                         switch (module->second->Markup()) {
-00094                         case FMT_THML:
-00095                                 if (oldthml != fromthml) {
-00096                                         if (oldthml) {
-00097                                                 if (!fromthml) {
-00098                                                         module->second->RemoveRenderFilter(oldthml);
-00099                                                 }
-00100                                                 else {
-00101                                                         module->second->ReplaceRenderFilter(oldthml, fromthml);
-00102                                                 }
-00103                                         }
-00104                                         else if (fromthml) {
-00105                                                 module->second->AddRenderFilter(fromthml);
-00106                                         }
-00107                                 }
-00108                                 break;
-00109                         case FMT_GBF:
-00110                                 if (oldgbf != fromgbf) {
-00111                                         if (oldgbf) {
-00112                                                 if (!fromgbf) {
-00113                                                         module->second->RemoveRenderFilter(oldgbf);
-00114                                                 }
-00115                                                 else {
-00116                                                         module->second->ReplaceRenderFilter(oldgbf, fromgbf);
-00117                                                 }
-00118                                         }
-00119                                         else if (fromgbf) {
-00120                                                 module->second->AddRenderFilter(fromgbf);
-00121                                         }
-00122                                         break;
-00123                                 }
-00124                         case FMT_PLAIN:
-00125                                 if (oldplain != fromplain) {
-00126                                         if (oldplain) {
-00127                                                 if (!fromplain) {
-00128                                                         module->second->RemoveRenderFilter(oldplain);
-00129                                                 }
-00130                                                 else {
-00131                                                         module->second->ReplaceRenderFilter(oldplain, fromplain);
-00132                                                 }
-00133                                         }
-00134                                         else if (fromplain) {
-00135                                                 module->second->AddRenderFilter(fromplain);
-00136                                         }
-00137                                         break;
-00138                                 }
-00139                         case FMT_OSIS:
-00140                                 if (oldosis != fromosis) {
-00141                                         if (oldosis) {
-00142                                                 if (!fromosis) {
-00143                                                         module->second->RemoveRenderFilter(oldosis);
-00144                                                 }
-00145                                                 else {
-00146                                                         module->second->ReplaceRenderFilter(oldosis, fromosis);
-00147                                                 }
-00148                                         }
-00149                                         else if (fromosis) {
-00150                                                 module->second->AddRenderFilter(fromosis);
-00151                                         }
-00152                                         break;
-00153                                 }
-00154                         }
-00155 
-00156                 if (oldthml)
-00157                         delete oldthml;
-00158                 if (oldgbf)
-00159                         delete oldgbf;
-00160                 if (oldplain)
-00161                         delete oldplain;
-00162                 if (oldosis)
-00163                         delete oldosis;
-00164         }
-00165         return markup;
-00166 }
-00167 
-00168 void MarkupFilterMgr::AddRenderFilters(SWModule *module, ConfigEntMap &section) {
-00169         switch (module->Markup()) {
-00170         case FMT_THML:
-00171                 if (fromthml)
-00172                         module->AddRenderFilter(fromthml);
-00173                 break;
-00174         case FMT_GBF:
-00175                 if (fromgbf)
-00176                         module->AddRenderFilter(fromgbf);
-00177                 break;
-00178         case FMT_PLAIN:
-00179                 if (fromplain)
-00180                         module->AddRenderFilter(fromplain);
-00181                 break;
-00182         case FMT_OSIS:
-00183                 if (fromosis)
-00184                         module->AddRenderFilter(fromosis);
-00185                 break;
-00186         }
-00187 }
-00188 
-00189 void MarkupFilterMgr::CreateFilters(char markup) {
-00190 
-00191                 switch (markup) {
-00192                 case FMT_PLAIN:
-00193                         fromplain = NULL;
-00194                         fromthml = new ThMLPlain();
-00195                         fromgbf = new GBFPlain();
-00196                         fromosis = NULL;
-00197                         break;
-00198                 case FMT_THML:
-00199                         fromplain = NULL;
-00200                         fromthml = NULL;
-00201                         fromgbf = new GBFThML();
-00202                         fromosis = NULL;
-00203                         break;
-00204                 case FMT_GBF:
-00205                         fromplain = NULL;
-00206                         fromthml = new ThMLGBF();
-00207                         fromgbf = NULL;
-00208                         fromosis = NULL;
-00209                         break;
-00210                 case FMT_HTML:
-00211                         fromplain = new PLAINHTML();
-00212                         fromthml = new ThMLHTML();
-00213                         fromgbf = new GBFHTML();
-00214                         fromosis = NULL;
-00215                         break;
-00216                 case FMT_HTMLHREF:
-00217                         fromplain = NULL;
-00218                         fromthml = new ThMLHTMLHREF();
-00219                         fromgbf = new GBFHTMLHREF();
-00220                         fromosis = NULL;
-00221                         break;
-00222                 case FMT_RTF:
-00223                         fromplain = NULL;
-00224                         fromthml = new ThMLRTF();
-00225                         fromgbf = new GBFRTF();
-00226                         fromosis = NULL;
-00227                         break;
-00228                 case FMT_OSIS:
-00229                         fromplain = NULL;
-00230                         fromthml = new ThMLOSIS();
-00231                         fromgbf = new GBFOSIS();
-00232                         fromosis = NULL;
-00233                         break;
-00234                 }
-00235 
-00236 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/markupfiltmgr_8h-source.html b/doc/api-documentation/html/markupfiltmgr_8h-source.html deleted file mode 100644 index 4f06d77..0000000 --- a/doc/api-documentation/html/markupfiltmgr_8h-source.html +++ /dev/null @@ -1,64 +0,0 @@ - - -markupfiltmgr.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

markupfiltmgr.h

00001 /******************************************************************************
-00002  *  swmarkupmgr.h   - definition of class SWMarkupMgr, subclass of
-00003  *                        used to transcode all module text to a requested
-00004  *                        markup.
-00005  *
-00006  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00007  *      CrossWire Bible Society
-00008  *      P. O. Box 2528
-00009  *      Tempe, AZ  85280-2528
-00010  *
-00011  * This program is free software; you can redistribute it and/or modify it
-00012  * under the terms of the GNU General Public License as published by the
-00013  * Free Software Foundation version 2.
-00014  *
-00015  * This program is distributed in the hope that it will be useful, but
-00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00018  * General Public License for more details.
-00019  *
-00020  */
-00021 
-00022 #ifndef MARKUPFILTMGR_H
-00023 #define MARKUPFILTMGR_H
-00024 
-00025 #include <encfiltmgr.h>
-00026 
-00031 class SWDLLEXPORT MarkupFilterMgr : public EncodingFilterMgr {
-00032 protected:
-00033         SWFilter* fromthml;
-00034         SWFilter* fromgbf;
-00035         SWFilter* fromplain;
-00036         SWFilter* fromosis;
-00037 
-00038         /*
-00039          * current markup value
-00040          */
-00041         char markup;
-00042 
-00043         void CreateFilters(char markup);
-00044 public:
-00053         MarkupFilterMgr(char markup = FMT_THML, char encoding = ENC_UTF8);
-00054 
-00058         ~MarkupFilterMgr();
-00059 
-00065         char Markup(char m = FMT_UNKNOWN);
-00066 
-00072         virtual void AddRenderFilters(SWModule *module, ConfigEntMap &section);
-00073 };
-00074 
-00075 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/mhcidx_8cpp-source.html b/doc/api-documentation/html/mhcidx_8cpp-source.html deleted file mode 100644 index 76bb75d..0000000 --- a/doc/api-documentation/html/mhcidx_8cpp-source.html +++ /dev/null @@ -1,306 +0,0 @@ - - -mhcidx.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

mhcidx.cpp

00001 /*****************************************************************************
-00002  *
-00003  *      This code wreaks but works (at least for MHC).  Good luck!
-00004  */
-00005 
-00006 #include <stdio.h>
-00007 #include <stdlib.h>
-00008 #include <string.h>
-00009 #include <ctype.h>
-00010 
-00011 #ifndef __GNUC__
-00012 #include <io.h>
-00013 #else
-00014 #include <unistd.h>
-00015 #endif
-00016 
-00017 #include <fcntl.h>
-00018 #include <versekey.h>
-00019 
-00020 
-00021 void writeidx(VerseKey &key1, VerseKey &key2, VerseKey &key3, long offset, short size);
-00022 char findbreak(int fp, long *offset, int *num1, int *num2, int *rangemax, short *size);
-00023 void openfiles(char *fname);
-00024 void checkparams(int argc, char **argv);
-00025 
-00026 
-00027 VerseKey key1, key2, key3;
-00028 int fp, vfp, cfp, bfp;
-00029 long chapoffset;
-00030 short chapsize;
-00031 char testmnt;
-00032 
-00033 
-00034 main(int argc, char **argv)
-00035 {
-00036         long pos, offset;
-00037         int num1, num2, rangemax, curbook = 0, curchap = 0, curverse = 0;
-00038         char buf[127], startflag = 0;
-00039         short size, tmp;
-00040 
-00041         checkparams(argc, argv);
-00042 
-00043         openfiles(argv[1]);
-00044 
-00045         testmnt = key1.Testament();
-00046         pos  = 0;
-00047         write(bfp, &pos, 4);  /* Book    offset for testament intros */
-00048         pos = 4;
-00049         write(cfp, &pos, 4);  /* Chapter offset for testament intro */
-00050 
-00051 
-00052 /*      Right now just zero out intros until parsing correctly */
-00053         pos = 0;
-00054         size = 0;
-00055         write(vfp, &pos, 4);  /* Module intro */
-00056         write(vfp, &size, 2);
-00057         write(vfp, &pos, 4);  /* Testament intro */
-00058         write(vfp, &size, 2);
-00059 
-00060         while(!findbreak(fp, &offset, &num1, &num2, &rangemax, &size)) {
-00061                 if (num2) {                             
-00062                         key2.Verse(1);
-00063                         key2.Chapter(num1);
-00064                         key2.Verse(num2);
-00065                 }
-00066                 else {
-00067                         key2.Verse(1);
-00068                         if (!startflag) {
-00069                                 startflag = 1;
-00070                         }
-00071                         else {
-00072                                 if (num1 <= key2.Chapter()) { // new book
-00073                                         key2.Chapter(1);
-00074                                         key2.Book(key2.Book()+1);
-00075                                 }
-00076                         }
-00077                         key2.Chapter(num1);
-00078                         printf("Found Chapter Break: %d ('%s')\n", num1, (const char *)key2);
-00079                         chapoffset = offset;
-00080                         chapsize = size;
-00081                         continue;
-00082                 }
-00083 
-00084                 key3 = key2;
-00085                 key3 += (rangemax - key3.Verse());
-00086 
-00087                 writeidx(key1, key2, key3, offset, size);
-00088         }
-00089         close(vfp);
-00090         close(cfp);
-00091         close(bfp);
-00092         close(fp);
-00093 }
-00094 
-00095 
-00096 /**************************************************************************
-00097  * ENT: key1    - current location of index
-00098  *      key2    - minimum keyval for which this offset is valid
-00099  *      key3    - maximum keyval for which this offset is valid
-00100  */
-00101 
-00102 void writeidx(VerseKey &key1, VerseKey &key2, VerseKey &key3, long offset, short size)
-00103 {
-00104         long pos;
-00105         short tmp;
-00106 
-00107         for (; ((key1 <= key3) && (key1.Error() != KEYERR_OUTOFBOUNDS) && (key1.Testament() == testmnt)); key1+=1) {
-00108                 if (key1.Verse() == 1) {        // new chapter
-00109                         if (key1.Chapter() == 1) {      // new book
-00110                                 pos = lseek(cfp, 0, SEEK_CUR);
-00111                                 write(bfp, &pos, 4);
-00112                                 pos = lseek(vfp, 0, SEEK_CUR); /* Book intro (cps) */
-00113                                 write(cfp, &pos, 4);
-00114                                 write(vfp, &chapoffset, 4);  /* Book intro (vss)  set to same as chap for now(it should be chap 1 which usually contains the book into anyway)*/
-00115                                 write(vfp, &chapsize, 2);
-00116                         }
-00117                         pos = lseek(vfp, 0, SEEK_CUR);
-00118                         write(cfp, &pos, 4);
-00119                         write(vfp, &chapoffset, 4);  /* Chapter intro */
-00120                         write(vfp, &chapsize, 2);
-00121                 }
-00122                 if (key1 >= key2) {
-00123                         write(vfp, &offset, 4);
-00124                         write(vfp, &size, 2);
-00125                 }
-00126                 else    {
-00127                         pos = 0;
-00128                         tmp = 0;
-00129                         write(vfp, &pos, 4);
-00130                         write(vfp, &tmp, 2);
-00131                 }
-00132         }
-00133 }
-00134 
-00135 
-00136 char startentry(char *buf)
-00137 {
-00138         char loop;
-00139 
-00140         if (buf[0] != 10)
-00141                 return 0;
-00142         if (buf[1] != '#')
-00143                 return 0;
-00144         if (!isdigit(buf[2]))
-00145                 return 0;
-00146         for (loop = 3; loop < 7; loop++) {
-00147                 if (buf[loop] == ' ')
-00148                         break;
-00149                 if ((!isdigit(buf[loop])) && (buf[loop] != ',') && (buf[loop] != '-'))
-00150                         return 0;
-00151         }
-00152         return 1;
-00153 }
-00154 
-00155 
-00156 char findbreak(int fp, long *offset, int *num1, int *num2, int *rangemax, short *size)
-00157 {
-00158         char buf[7];
-00159         char buf2[20];
-00160         char ch;
-00161         char loop;
-00162         long offset2;
-00163         int ch2, vs2, rm2;
-00164         
-00165         memset(buf, ' ', 7);
-00166 
-00167         while (1) {
-00168                 if (startentry(buf)) {
-00169                         memset(buf, ' ', 2);
-00170                         for (loop = 2; loop < 7; loop++) {
-00171                                 if ((buf[loop] == '-') || (buf[loop] == ',') || (buf[loop] == ' ')) {
-00172                                         buf[loop] = 0;
-00173                                         *num2 = atoi(buf);
-00174                                         break;
-00175                                 }
-00176                         }
-00177                         for (ch = loop + 1; ch < 7; ch++) {
-00178                                 if (buf[ch] == ' ') {
-00179                                         break;
-00180                                 }
-00181                         }
-00182                         buf[ch] = 0;
-00183                         *rangemax = atoi(&buf[loop+1]);
-00184                         if (!*rangemax)
-00185                                 *rangemax = *num2;
-00186                         *offset = lseek(fp, 0, SEEK_CUR) - 5;
-00187                         if (size) {
-00188                                 if (findbreak(fp, &offset2, &ch2, &vs2, &rm2, 0)) {
-00189                                         *size = (short) (lseek(fp, 0, SEEK_END) - (*offset));
-00190                                 }
-00191                                 else {
-00192                                         if (vs2) {
-00193                                                 *size = (offset2 - (*offset)) - 3;
-00194                                         }
-00195                                         else {
-00196                                                 sprintf(buf2, "$-$-$- XX:%d", ch2);
-00197                                                 *size = (offset2 - (*offset)) - ((strlen(buf2) + 4));
-00198                                         }
-00199                                 }
-00200                                 lseek(fp, *offset, SEEK_SET);
-00201                         }
-00202                         return 0;
-00203                 }
-00204                                         
-00205                 if (!strncmp(buf, "$-$-$-", 6)) {
-00206                         memset(buf2, 0, 7);
-00207                         loop = 0;
-00208                         while ((read(fp, &buf2[loop], 1) == 1) && (loop < 7)) {
-00209                                 if ((buf2[loop] == 10) || (buf2[loop] == 13)) {
-00210                                         buf2[loop] = 0;
-00211                                         break;
-00212                                 }
-00213                                 loop++;
-00214                         }
-00215                         while (read(fp, &ch, 1) == 1) {
-00216                                 if (ch == '*')
-00217                                         break;
-00218                         }
-00219                         
-00220                         *offset = lseek(fp, 0, SEEK_CUR) - 1;
-00221                         *num2 = 0;
-00222                         for (loop = strlen(buf2) - 1; loop; loop--) {
-00223                                 if (buf2[loop] == ':')
-00224                                         break;
-00225                         }
-00226                         *num1 = atoi(&buf2[loop+1]);
-00227                         printf("Chapter marker: %s\n", buf2);
-00228                         if (size) {
-00229                                 if (findbreak(fp, &offset2, &ch2, &vs2, &rm2, 0)) {
-00230                                         *size = (short) (lseek(fp, 0, SEEK_END) - (*offset));
-00231                                 }
-00232                                 else {
-00233                                         if (vs2) {
-00234                                                 *size = (offset2 - (*offset)) - 3;
-00235                                         }
-00236                                         else {
-00237                                                 sprintf(buf2, "$-$-$- XX:%d", ch2);
-00238                                                 *size = (offset2 - (*offset)) - ((strlen(buf2) + 4));
-00239                                         }
-00240                                 }
-00241                                 lseek(fp, *offset, SEEK_SET);
-00242                         }
-00243                         return 0;
-00244                 }
-00245                                  
-00246                                 
-00247                 memmove(buf, &buf[1], 6);
-00248                 if (read(fp, &buf[6], 1) != 1)
-00249                         return 1;
-00250         }
-00251 }
-00252 
-00253 
-00254 void openfiles(char *fname)
-00255 {
-00256         char buf[255];
-00257 
-00258         if ((fp = open(fname, O_RDONLY)) == -1) {
-00259                 fprintf(stderr, "Couldn't open file: %s\n", fname);
-00260                 exit(1);
-00261         }
-00262 
-00263         sprintf(buf, "%s.vss", fname);
-00264         if ((vfp = open(buf, O_CREAT|O_WRONLY)) == -1) {
-00265                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00266                 exit(1);
-00267         }
-00268 
-00269         sprintf(buf, "%s.cps", fname);
-00270         if ((cfp = open(buf, O_CREAT|O_WRONLY)) == -1) {
-00271                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00272                 exit(1);
-00273         }
-00274 
-00275         sprintf(buf, "%s.bks", fname);
-00276         if ((bfp = open(buf, O_CREAT|O_WRONLY)) == -1) {
-00277                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00278                 exit(1);
-00279         }
-00280 }
-00281 
-00282 
-00283 void checkparams(int argc, char **argv)
-00284 {
-00285         if (argc < 2) {
-00286                 fprintf(stderr, "usage: %s <file to process> [nt - for new testmt file]\n", argv[0]);
-00287                 exit(1);
-00288         }
-00289         if (argc == 3)
-00290                 key1 = key2 = key3 = "Matthew 1:1";
-00291         else    key1 = key2 = key3 = "Genesis 1:1";
-00292 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/multimapwdef_8h-source.html b/doc/api-documentation/html/multimapwdef_8h-source.html deleted file mode 100644 index e17bed9..0000000 --- a/doc/api-documentation/html/multimapwdef_8h-source.html +++ /dev/null @@ -1,45 +0,0 @@ - - -multimapwdef.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

multimapwdef.h

00001 #ifndef MULTIMAPWDEF
-00002 #define MULTIMAPWDEF
-00003 
-00004 #include <map>
-00005 
-00006 using namespace std;
-00007 
-00008 // multmap that still lets you use [] to reference FIRST
-00009 // entry of a key if multiples exist
-00010 template <class Key, class T, class Compare>
-00011 class multimapwithdefault : public multimap<Key, T, Compare> {
-00012 public:
-00013         typedef pair<const Key, T> value_type;
-00014         T& operator[](const Key& k) {
-00015                 if (find(k) == end()) {
-00016                         insert(value_type(k, T()));
-00017                 }
-00018                 return (*(find(k))).second;
-00019         }
-00020         bool has(const Key& k, const T &val) const {
-00021                 typename multimap<Key, T, Compare>::const_iterator start = lower_bound(k);
-00022                 typename multimap<Key, T, Compare>::const_iterator end = upper_bound(k);
-00023                 for (; start!=end; start++) {
-00024                         if (start->second == val)
-00025                                 return true;
-00026                 }
-00027                 return false;
-00028         }
-00029 };
-00030 
-00031 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/namespaces.html b/doc/api-documentation/html/namespaces.html deleted file mode 100644 index f6867be..0000000 --- a/doc/api-documentation/html/namespaces.html +++ /dev/null @@ -1,17 +0,0 @@ - - -Namespace Index - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

The Sword Project Namespace List

Here is a list of all documented namespaces with brief descriptions: - -
stdTitle: Keyboard mapping for Michigan-Claremont Hebrew input Description: Copyright: Copyright (c) 2001 CrossWire Bible Society under the terms of the GNU GPL Company:
-
Generated on Thu Jun 20 22:13:05 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/namespacestd.html b/doc/api-documentation/html/namespacestd.html deleted file mode 100644 index 321d486..0000000 --- a/doc/api-documentation/html/namespacestd.html +++ /dev/null @@ -1,28 +0,0 @@ - - -std Namespace Reference - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

std Namespace Reference

Title: Keyboard mapping for Michigan-Claremont Hebrew input Description: Copyright: Copyright (c) 2001 CrossWire Bible Society under the terms of the GNU GPL Company:. -More... -

- -
-


Detailed Description

-Title: Keyboard mapping for Michigan-Claremont Hebrew input Description: Copyright: Copyright (c) 2001 CrossWire Bible Society under the terms of the GNU GPL Company:. -

-

-Author:
-Troy A. Griffitts
-Version:
-1.0
-

-


Generated on Thu Jun 20 22:13:05 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/nasb_8cpp-source.html b/doc/api-documentation/html/nasb_8cpp-source.html deleted file mode 100644 index f8110b3..0000000 --- a/doc/api-documentation/html/nasb_8cpp-source.html +++ /dev/null @@ -1,121 +0,0 @@ - - -nasb.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

nasb.cpp

00001 
-00002 
-00003 #include <ctype.h>
-00004 #include <stdio.h>
-00005 #include <fcntl.h>
-00006 #include <errno.h>
-00007 
-00008 #ifndef __GNUC__
-00009 #include <io.h>
-00010 #else
-00011 #include <unistd.h>
-00012 #endif
-00013 
-00014 #include <swcomprs.h>
-00015 
-00016 class FileCompress: public SWCompress {
-00017         int ifd;
-00018         int ofd;
-00019         int ufd;
-00020         int zfd;
-00021 public:
-00022         FileCompress(char *);
-00023         ~FileCompress();
-00024         int GetChars(char *, int len);
-00025         int SendChars(char *, int len);
-00026         void Encode();
-00027         void Decode();
-00028 };
-00029 
-00030 
-00031 FileCompress::FileCompress(char *fname) 
-00032 {
-00033         char buf[256];
-00034 
-00035 #ifndef O_BINARY
-00036 #define O_BINARY 0
-00037 #endif
-00038 
-00039         ufd  = open(fname, O_RDWR|O_CREAT|O_BINARY);
-00040 
-00041         sprintf(buf, "%s.zzz", fname);
-00042         zfd = open(buf, O_RDWR|O_CREAT|O_BINARY);
-00043 }
-00044 
-00045         
-00046 FileCompress::~FileCompress(char *fname) 
-00047 {
-00048         close(ufd);
-00049         close(zfd);
-00050 }
-00051 
-00052 
-00053 int FileCompress::GetChars(char *buf, int len) 
-00054 {
-00055         return read(ifd, buf, len);
-00056 }
-00057 
-00058 
-00059 int FileCompress::SendChars(char *buf, int len) 
-00060 {
-00061         return write(ofd, buf, len);
-00062 }
-00063 
-00064 
-00065 void FileCompress::Encode() 
-00066 {
-00067         ifd = ufd;
-00068         ofd = zfd;
-00069 
-00070         SWCompress::Encode();
-00071 }
-00072 
-00073 
-00074 void FileCompress::Decode() 
-00075 {
-00076         ifd = zfd;
-00077         ofd = ufd;
-00078 
-00079         SWCompress::Decode();
-00080 }
-00081 
-00082 
-00083 main(int argc, char **argv)
-00084 {
-00085         int decomp = 0;
-00086         SWCompress *fobj;
-00087         
-00088         if (argc != 2) {
-00089                 fprintf(stderr, "usage: %s <filename|filename.zzz>\n", argv[0]);
-00090                 exit(1);
-00091         }
-00092 
-00093         if (strlen(argv[1]) > 4) {
-00094                 if (!strcmp(&argv[1][strlen(argv[1])-4], ".zzz")) {
-00095                         argv[1][strlen(argv[1])-4] = 0;
-00096                         decomp = 1;
-00097                 }
-00098         }
-00099                         
-00100         fobj = new FileCompress(argv[1]);
-00101         
-00102         if (decomp)
-00103                 fobj->Decode();
-00104         else fobj->Encode();
-00105 
-00106         delete fobj;
-00107 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/nuidx_8cpp-source.html b/doc/api-documentation/html/nuidx_8cpp-source.html deleted file mode 100644 index cf64350..0000000 --- a/doc/api-documentation/html/nuidx_8cpp-source.html +++ /dev/null @@ -1,252 +0,0 @@ - - -nuidx.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

nuidx.cpp

00001 /*****************************************************************************
-00002  *
-00003  *      This code wreaks but works (at least for MHC).  Good luck!
-00004  */
-00005 
-00006 #include <stdio.h>
-00007 #include <stdlib.h>
-00008 #include <string.h>
-00009 #include <ctype.h>
-00010 
-00011 #ifndef __GNUC__
-00012 #include <io.h>
-00013 #else
-00014 #include <unistd.h>
-00015 #endif
-00016 
-00017 #include <fcntl.h>
-00018 #include <versekey.h>
-00019 
-00020 
-00021 void writeidx(VerseKey &key1, VerseKey &key2, VerseKey &key3, long offset, short size);
-00022 char findbreak(int fp, long *offset, int *num1, int *num2, int *rangemax, short *size);
-00023 void openfiles(char *fname);
-00024 void checkparams(int argc, char **argv);
-00025 
-00026 
-00027 VerseKey key1, key2, key3;
-00028 int fp, vfp, cfp, bfp;
-00029 long chapoffset;
-00030 short chapsize;
-00031 char testmnt;
-00032 
-00033 
-00034 main(int argc, char **argv)
-00035 {
-00036         long pos, offset;
-00037         int num1, num2, rangemax, curbook = 0, curchap = 0, curverse = 0;
-00038         char buf[127], startflag = 0;
-00039         short size, tmp;
-00040 
-00041         checkparams(argc, argv);
-00042 
-00043         openfiles(argv[1]);
-00044 
-00045         testmnt = key1.Testament();
-00046         num1 = key1.Chapter();
-00047         num2 = key1.Verse();
-00048         pos  = 0;
-00049         write(bfp, &pos, 4);  /* Book    offset for testament intros */
-00050         pos = 4;
-00051         write(cfp, &pos, 4);  /* Chapter offset for testament intro */
-00052 
-00053 
-00054 /*      Right now just zero out intros until parsing correctly */
-00055         pos = 0;
-00056         size = 0;
-00057         write(vfp, &pos, 4);  /* Module intro */
-00058         write(vfp, &size, 2);
-00059         write(vfp, &pos, 4);  /* Testament intro */
-00060         write(vfp, &size, 2);
-00061 
-00062         while(!findbreak(fp, &offset, &num1, &num2, &rangemax, &size)) {
-00063                 writeidx(key1, key2, key3, offset, size);
-00064                 key2++;
-00065                 key3 = key2;
-00066         }
-00067         close(vfp);
-00068         close(cfp);
-00069         close(bfp);
-00070         close(fp);
-00071 }
-00072 
-00073 
-00074 /**************************************************************************
-00075  * ENT: key1    - current location of index
-00076  *      key2    - minimum keyval for which this offset is valid
-00077  *      key3    - maximum keyval for which this offset is valid
-00078  */
-00079 
-00080 void writeidx(VerseKey &key1, VerseKey &key2, VerseKey &key3, long offset, short size)
-00081 {
-00082         long pos;
-00083         short tmp;
-00084 
-00085         for (; ((key1 <= key3) && (key1.Error() != KEYERR_OUTOFBOUNDS) && (key1.Testament() == testmnt)); key1+=1) {
-00086                 if (key1.Verse() == 1) {        // new chapter
-00087                         if (key1.Chapter() == 1) {      // new book
-00088                                 pos = lseek(cfp, 0, SEEK_CUR);
-00089                                 write(bfp, &pos, 4);
-00090                                 pos = lseek(vfp, 0, SEEK_CUR); /* Book intro (cps) */
-00091                                 write(cfp, &pos, 4);
-00092                                 write(vfp, &chapoffset, 4);  /* Book intro (vss)  set to same as chap for now(it should be chap 1 which usually contains the book into anyway)*/
-00093                                 write(vfp, &chapsize, 2);
-00094                         }
-00095                         pos = lseek(vfp, 0, SEEK_CUR);
-00096                         write(cfp, &pos, 4);
-00097                         write(vfp, &chapoffset, 4);  /* Chapter intro */
-00098                         write(vfp, &chapsize, 2);
-00099                 }
-00100                 if (key1 >= key2) {
-00101                         write(vfp, &offset, 4);
-00102                         write(vfp, &size, 2);
-00103                 }
-00104                 else    {
-00105                         pos = 0;
-00106                         tmp = 0;
-00107                         write(vfp, &pos, 4);
-00108                         write(vfp, &tmp, 2);
-00109                 }
-00110         }
-00111 }
-00112 
-00113 
-00114 char startchap(char *buf)
-00115 {
-00116         char loop;
-00117 
-00118         if (buf[0] != '<')
-00119                 return 0;
-00120         if (buf[1] != 'S')
-00121                 return 0;
-00122         if (buf[2] != 'C')
-00123                 return 0;
-00124 /*
-00125         if (!isdigit(buf[2]))
-00126                 return 0;
-00127         for (loop = 3; loop < 7; loop++) {
-00128                 if (buf[loop] == ' ')
-00129                         break;
-00130                 if ((!isdigit(buf[loop])) && (buf[loop] != ',') && (buf[loop] != '-'))
-00131                         return 0;
-00132         }
-00133 */
-00134         return 1;
-00135 }
-00136 
-00137 
-00138 char startentry(char *buf)
-00139 {
-00140         char loop;
-00141 
-00142         if (buf[0] != '<')
-00143                 return 0;
-00144         if (buf[1] != 'S')
-00145                 return 0;
-00146         if (buf[2] != 'V')
-00147                 return 0;
-00148 /*
-00149         if (!isdigit(buf[2]))
-00150                 return 0;
-00151         for (loop = 3; loop < 7; loop++) {
-00152                 if (buf[loop] == ' ')
-00153                         break;
-00154                 if ((!isdigit(buf[loop])) && (buf[loop] != ',') && (buf[loop] != '-'))
-00155                         return 0;
-00156         }
-00157 */
-00158         return 1;
-00159 }
-00160 
-00161 
-00162 char findbreak(int fp, long *offset, int *num1, int *num2, int *rangemax, short *size)
-00163 {
-00164         char buf[7];
-00165         char buf2[20];
-00166         char ch;
-00167         char loop;
-00168         long offset2;
-00169         int ch2, vs2, rm2;
-00170         bool flag;
-00171         long chapstart = 0; 
-00172         
-00173         memset(buf, ' ', 7);
-00174 
-00175         while (1) {
-00176                 if (startentry(buf)) {
-00177                         if (size)
-00178                                 *offset = lseek(fp, 0, SEEK_CUR) - 3;
-00179                         else    *offset = lseek(fp, 0, SEEK_CUR) - 7;
-00180                         if (size) {
-00181                                 ch2 = *num1;
-00182                                 vs2 = *num2;
-00183                                 if (findbreak(fp, &offset2, &ch2, &vs2, &rm2, 0)) {
-00184                                         *size = (short) (lseek(fp, 0, SEEK_END) - (*offset));
-00185                                 }
-00186                                 else {
-00187                                         *size = (offset2 - (*offset));
-00188                                 }
-00189                                 lseek(fp, *offset, SEEK_SET);
-00190                         }
-00191                         return 0;
-00192                 }
-00193                 memmove(buf, &buf[1], 6);
-00194                 if (read(fp, &buf[6], 1) != 1)
-00195                         return 1;
-00196         }
-00197 }
-00198 
-00199 
-00200 void openfiles(char *fname)
-00201 {
-00202         char buf[255];
-00203 
-00204         if ((fp = open(fname, O_RDONLY)) == -1) {
-00205                 fprintf(stderr, "Couldn't open file: %s\n", fname);
-00206                 exit(1);
-00207         }
-00208 
-00209         sprintf(buf, "%s.vss", fname);
-00210         if ((vfp = open(buf, O_CREAT|O_WRONLY)) == -1) {
-00211                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00212                 exit(1);
-00213         }
-00214 
-00215         sprintf(buf, "%s.cps", fname);
-00216         if ((cfp = open(buf, O_CREAT|O_WRONLY)) == -1) {
-00217                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00218                 exit(1);
-00219         }
-00220 
-00221         sprintf(buf, "%s.bks", fname);
-00222         if ((bfp = open(buf, O_CREAT|O_WRONLY)) == -1) {
-00223                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00224                 exit(1);
-00225         }
-00226 }
-00227 
-00228 
-00229 void checkparams(int argc, char **argv)
-00230 {
-00231         if (argc < 2) {
-00232                 fprintf(stderr, "usage: %s <file to process> [nt - for new testmt file]\n", argv[0]);
-00233                 exit(1);
-00234         }
-00235         if (argc == 3)
-00236                 key1 = key2 = key3 = "Matthew 1:1";
-00237         else    key1 = key2 = key3 = "Genesis 1:1";
-00238 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/nullim_8cpp-source.html b/doc/api-documentation/html/nullim_8cpp-source.html deleted file mode 100644 index c44f015..0000000 --- a/doc/api-documentation/html/nullim_8cpp-source.html +++ /dev/null @@ -1,25 +0,0 @@ - - -nullim.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

nullim.cpp

00001 #include <nullim.h>
-00002 
-00003 
-00004 NullIM::NullIM() {
-00005 }
-00006 
-00007 int *NullIM::translate(char ch) {
-00008         static int retVal[1];
-00009         *retVal = ch;
-00010         return retVal;
-00011 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/nullim_8h-source.html b/doc/api-documentation/html/nullim_8h-source.html deleted file mode 100644 index cfd1d3b..0000000 --- a/doc/api-documentation/html/nullim_8h-source.html +++ /dev/null @@ -1,28 +0,0 @@ - - -nullim.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

nullim.h

00001 #ifndef NULLIM_H
-00002 #define NULLIM_H
-00003 
-00004 #include <swinputmeth.h>
-00005 
-00006 
-00007 class NullIM : public SWInputMethod {
-00008 
-00009 public:
-00010         NullIM();
-00011         int * translate(char ch);
-00012 };
-00013 
-00014 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/plainfootnotes_8cpp-source.html b/doc/api-documentation/html/plainfootnotes_8cpp-source.html deleted file mode 100644 index 4881756..0000000 --- a/doc/api-documentation/html/plainfootnotes_8cpp-source.html +++ /dev/null @@ -1,116 +0,0 @@ - - -plainfootnotes.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

plainfootnotes.cpp

00001 /***************************************************************************
-00002                           plainfootnotes.cpp  -  description
-00003                              -------------------
-00004     begin                : Wed Oct 13 1999
-00005     copyright            : (C) 1999 by The team of BibleTime
-00006     email                : info@bibletime.de
-00007  ***************************************************************************/
-00008 
-00009 /***************************************************************************
-00010  *                                                                         *
-00011  *   This program is free software; you can redistribute it and/or modify  *
-00012  *   it under the terms of the GNU General Public License as published by  *
-00013  *   the Free Software Foundation; either version 2 of the License, or     *
-00014  *   (at your option) any later version.                                   *
-00015  *                                                                         *
-00016  ***************************************************************************/
-00017 
-00018 #include <plainfootnotes.h>
-00019 #include <swkey.h>
-00020 
-00021 #include <stdlib.h>
-00022 #include <string.h>
-00023 #ifndef __GNUC__
-00024 #else
-00025 #include <unixstr.h>
-00026 #endif
-00027 
-00028 const char PLAINFootnotes::on[] = "On";
-00029 const char PLAINFootnotes::off[] = "Off";
-00030 const char PLAINFootnotes::optName[] = "Footnotes";
-00031 const char PLAINFootnotes::optTip[] = "Toggles Footnotes On and Off In Bible Texts If They Exist";
-00032 
-00033 PLAINFootnotes::PLAINFootnotes(){
-00034         option = false;
-00035         options.push_back(on);
-00036         options.push_back(off);
-00037 }
-00038 
-00039 PLAINFootnotes::~PLAINFootnotes(){
-00040 }
-00041 
-00042 
-00043 void PLAINFootnotes::setOptionValue(const char *ival)
-00044 {
-00045         option = (!stricmp(ival, on));
-00046 }
-00047 
-00048 const char *PLAINFootnotes::getOptionValue()
-00049 {
-00050         return (option) ? on:off;
-00051 }
-00052 
-00053 
-00054 char PLAINFootnotes::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00055 {
-00056         char token[2048];
-00057         int tokpos = 0;
-00058         bool intoken    = false;
-00059         bool lastspace = false;
-00060 
-00061         if (!option) {  // if we don't want footnotes
-00062                 char *to, *from;
-00063                 int len;
-00064                 bool hide = false;
-00065 
-00066                 len = strlen(text) + 1; // shift string to right of buffer
-00067                 if (len < maxlen)
-00068                 {
-00069                         memmove(&text[maxlen - len], text, len);
-00070                         from = &text[maxlen - len];
-00071                 }
-00072                 else    from = text;    // -------------------------------
-00073 
-00074                 for (to = text; *from; from++) {
-00075                         if (*from == '{') // Footnote start
-00076                         {
-00077                                 hide = true;
-00078                                 continue;
-00079                         }
-00080                         if (*from == '}') // Footnote end
-00081                         {
-00082                                 hide=false;
-00083                                 continue;
-00084                         }
-00085                         if (intoken) {
-00086                                 if (tokpos < 2045)
-00087                                         token[tokpos++] = *from;
-00088                                         token[tokpos+2] = 0;
-00089                         }
-00090                         else    {
-00091                                 if (!hide) {
-00092                                         *to++ = *from;
-00093                                         lastspace = (*from == ' ');
-00094                                 }
-00095                         }
-00096                 }
-00097                 *to++ = 0;
-00098                 *to = 0;
-00099         }
-00100         return 0;
-00101 }
-00102 
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/plainfootnotes_8h-source.html b/doc/api-documentation/html/plainfootnotes_8h-source.html deleted file mode 100644 index f23216b..0000000 --- a/doc/api-documentation/html/plainfootnotes_8h-source.html +++ /dev/null @@ -1,73 +0,0 @@ - - -plainfootnotes.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

plainfootnotes.h

00001 /***************************************************************************
-00002                           plainfootnotes.h  -  description                              
-00003                              -------------------                                         
-00004     begin                : Wed Oct 13 1999                                           
-00005     copyright            : (C) 1999 by The team of BibleTime                         
-00006     email                : info@bibletime.de                                     
-00007  ***************************************************************************/
-00008 
-00009 /***************************************************************************
-00010  *                                                                         *
-00011  *   This program is free software; you can redistribute it and/or modify  *
-00012  *   it under the terms of the GNU General Public License as published by  *
-00013  *   the Free Software Foundation; either version 2 of the License, or     *
-00014  *   (at your option) any later version.                                   * 
-00015  *                                                                         *
-00016  ***************************************************************************/
-00017 
-00018 /* $Header: /usr/local/cvsroot/sword/doc/api-documentation/html/plainfootnotes_8h-source.html,v 1.7 2002/06/20 20:23:09 mgruner Exp $ */
-00019 /* $Revision: 1.7 $ */
-00020 
-00021 #ifndef PLAINFOOTNOTES_H
-00022 #define PLAINFOOTNOTES_H
-00023 
-00024 #include <defs.h>
-00025 
-00026 class QObject;
-00027 #include <swfilter.h>
-00028 class SWKey;
-00029 
-00033 class SWDLLEXPORT PLAINFootnotes:public SWFilter
-00034 {
-00035   bool option;
-00036   static const char on[];
-00037   static const char off[];
-00038   static const char optName[];
-00039   static const char optTip[];
-00040   OptionsList options;
-00041 
-00042 public:
-00043     PLAINFootnotes ();
-00044     virtual ~ PLAINFootnotes ();
-00045   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00046   virtual const char *getOptionName ()
-00047   {
-00048     return optName;
-00049   }
-00050   virtual const char *getOptionTip ()
-00051   {
-00052     return optTip;
-00053   }
-00054   virtual void setOptionValue (const char *ival);
-00055   virtual const char *getOptionValue ();
-00056   virtual OptionsList getOptionValues ()
-00057   {
-00058     return options;
-00059   }
-00060 };
-00061 
-00062 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/plainhtml_8cpp-source.html b/doc/api-documentation/html/plainhtml_8cpp-source.html deleted file mode 100644 index 7892c5e..0000000 --- a/doc/api-documentation/html/plainhtml_8cpp-source.html +++ /dev/null @@ -1,148 +0,0 @@ - - -plainhtml.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

plainhtml.cpp

00001 /***************************************************************************
-00002                           rwphtml.cpp  -  description
-00003                              -------------------
-00004     begin                : Thu Jun 24 1999
-00005     copyright            : (C) 1999 by Torsten Uhlmann
-00006     email                : TUhlmann@gmx.de
-00007  ***************************************************************************/
-00008 
-00009 /***************************************************************************
-00010  *                                                                         *
-00011  *   This program is free software; you can redistribute it and/or modify  *
-00012  *   it under the terms of the GNU General Public License as published by  *
-00013  *   the Free Software Foundation; either version 2 of the License, or     *
-00014  *   (at your option) any later version.                                   *
-00015  *                                                                         *
-00016  ***************************************************************************/
-00017 
-00018 #include <stdlib.h>
-00019 #include <string.h>
-00020 #include <plainhtml.h>
-00021 
-00022 
-00023 PLAINHTML::PLAINHTML()
-00024 {
-00025 }
-00026 
-00027 
-00028 char PLAINHTML::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00029 {
-00030         char *to, *from;
-00031         int len;
-00032         int count = 0;
-00033 
-00034         len = strlen(text) + 1;                                         // shift string to right of buffer
-00035         if (len < maxlen) {
-00036                 memmove(&text[maxlen - len], text, len);
-00037                 from = &text[maxlen - len];
-00038         }
-00039         else    from = text;                                                    // -------------------------------
-00040         for (to = text; *from; from++)
-00041         {
-00042                 if ((*from == '\n') && (from[1] == '\n')) // paragraph
-00043                 {
-00044                         *to++ = '<';
-00045                         *to++ = 'P';
-00046                         *to++ = '>';
-00047                         from++;
-00048                         continue;
-00049                 } else {
-00050                         if ((*from == '\n')) // && (from[1] != '\n')) // new line
-00051                         {
-00052                                 *to++ = '<';
-00053                                 *to++ = 'B';
-00054                                 *to++ = 'R';
-00055                                 *to++ = '>';
-00056                                 continue;
-00057                         }
-00058                 }
-00059                 
-00060                 if (*from == '{') {
-00061                   *to++ = '<';
-00062                 *to++ = 'F';
-00063                 *to++ = 'O';
-00064                         *to++ = 'N';
-00065                         *to++ = 'T';
-00066                         *to++ = ' ';
-00067                         *to++ = 'C';
-00068                         *to++ = 'O';
-00069                         *to++ = 'L';
-00070                         *to++ = 'O';
-00071                         *to++ = 'R';
-00072                         *to++ = '=';
-00073                         *to++ = '#';
-00074                         *to++ = '8';
-00075                         *to++ = '0';
-00076                         *to++ = '0';
-00077                         *to++ = '0';
-00078                         *to++ = '0';
-00079                         *to++ = '0';
-00080                         *to++ = '>';
-00081 
-00082                         *to++ = '<';
-00083                         *to++ = 'S';
-00084                         *to++ = 'M';
-00085                         *to++ = 'A';
-00086                         *to++ = 'L';
-00087                         *to++ = 'L';
-00088                         *to++ = '>';
-00089                         *to++ = ' ';
-00090                         *to++ = '(';
-00091                         continue;
-00092                 }
-00093 
-00094                 if (*from == '}')
-00095                 {
-00096                         *to++ = ')';
-00097                         *to++ = ' ';
-00098                         *to++ = '<';
-00099                         *to++ = '/';
-00100                         *to++ = 'S';
-00101                         *to++ = 'M';
-00102                         *to++ = 'A';
-00103                         *to++ = 'L';
-00104                         *to++ = 'L';
-00105                         *to++ = '>';
-00106                         
-00107                         *to++ = '<';
-00108                         *to++ = '/';
-00109                 *to++ = 'F';
-00110                         *to++ = 'O';
-00111                         *to++ = 'N';
-00112                         *to++ = 'T';
-00113                         *to++ = '>';
-00114                         continue;
-00115                 }
-00116 
-00117                 if ((*from == ' ') && (count > 5000))
-00118                 {
-00119                         *to++ = '<';
-00120                         *to++ = 'W';
-00121                         *to++ = 'B';
-00122                         *to++ = 'R';
-00123                         *to++ = '>';
-00124                         count = 0;
-00125                         continue;
-00126                 }
-00127 
-00128                 *to++ = *from;
-00129                 count++;
-00130         }
-00131         *to++ = 0;
-00132         *to = 0;
-00133         return 0;
-00134 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/plainhtml_8h-source.html b/doc/api-documentation/html/plainhtml_8h-source.html deleted file mode 100644 index a7fc76a..0000000 --- a/doc/api-documentation/html/plainhtml_8h-source.html +++ /dev/null @@ -1,50 +0,0 @@ - - -plainhtml.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

plainhtml.h

00001 /***************************************************************************
-00002                           rwphtml.h  -  description
-00003                              -------------------
-00004     begin                : Tue Jun 15 15:34:26 CEST 1999
-00005 
-00006     copyright            : (C) 1999 by Torsten Uhlmann
-00007     email                : TUhlmann@gmx.de
-00008  ***************************************************************************/
-00009 
-00010 /***************************************************************************
-00011  *                                                                         *
-00012  *   This program is free software; you can redistribute it and/or modify  *
-00013  *   it under the terms of the GNU General Public License as published by  *
-00014  *   the Free Software Foundation; either version 2 of the License, or     *
-00015  *   (at your option) any later version.                                   *
-00016  *                                                                         *
-00017  ***************************************************************************/
-00018 
-00019 /* $Header: /usr/local/cvsroot/sword/doc/api-documentation/html/plainhtml_8h-source.html,v 1.7 2002/06/20 20:23:09 mgruner Exp $ */
-00020 /* $Revision: 1.7 $ */
-00021 
-00022 #ifndef PLAINHTML_H
-00023 #define PLAINHTML_H
-00024 
-00025 #include <swfilter.h>
-00026 
-00027 #include <defs.h>
-00028 
-00031 class SWDLLEXPORT PLAINHTML:public SWFilter
-00032 {
-00033 public:
-00034   PLAINHTML ();
-00035   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00036 };
-00037 
-00038 #endif
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rawcom_8cpp-source.html b/doc/api-documentation/html/rawcom_8cpp-source.html deleted file mode 100644 index 5115fb1..0000000 --- a/doc/api-documentation/html/rawcom_8cpp-source.html +++ /dev/null @@ -1,289 +0,0 @@ - - -rawcom.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rawcom.cpp

00001 /******************************************************************************
-00002  *  rawcom.cpp - code for class 'RawCom'- a module that reads raw commentary
-00003  *                      files:  ot and nt using indexs ??.bks ??.cps ??.vss
-00004  */
-00005 
-00006 
-00007 #include <ctype.h>
-00008 #include <stdio.h>
-00009 #include <fcntl.h>
-00010 
-00011 #ifndef __GNUC__
-00012 #include <io.h>
-00013 #else
-00014 #include <unistd.h>
-00015 #endif
-00016 
-00017 #include <string.h>
-00018 #include <utilfuns.h>
-00019 #include <rawverse.h>
-00020 #include <rawcom.h>
-00021 
-00022 
-00023  /******************************************************************************
-00024  * RawCom Constructor - Initializes data for instance of RawCom
-00025  *
-00026  * ENT: iname - Internal name for module
-00027  *      idesc - Name to display to user for module
-00028  *      idisp    - Display object to use for displaying
-00029  */
-00030 
-00031 RawCom::RawCom(const char *ipath, const char *iname, const char *idesc, SWDisplay *idisp, SWTextEncoding encoding, SWTextDirection dir, SWTextMarkup markup, const char* ilang)
-00032                 : RawVerse(ipath),
-00033             SWCom(iname, idesc, idisp, encoding, dir, markup, ilang){
-00034 }
-00035 
-00036 
-00037 /******************************************************************************
-00038  * RawCom Destructor - Cleans up instance of RawCom
-00039  */
-00040 
-00041 RawCom::~RawCom()
-00042 {
-00043 }
-00044 
-00045 
-00046 /******************************************************************************
-00047  * RawCom::operator char *      - Returns the correct verse when char * cast
-00048  *                                      is requested
-00049  *
-00050  * RET: string buffer with verse
-00051  */
-00052 
-00053 char *RawCom::getRawEntry() {
-00054         long  start = 0;
-00055         unsigned short size = 0;
-00056         VerseKey *key = 0;
-00057 
-00058 #ifndef _WIN32_WCE
-00059         try {
-00060 #endif
-00061                 key = SWDYNAMIC_CAST(VerseKey, this->key);
-00062 #ifndef _WIN32_WCE
-00063         }
-00064         catch ( ... ) {}
-00065 #endif
-00066         if (!key)
-00067                 key = new VerseKey(this->key);
-00068 
-00069 
-00070         findoffset(key->Testament(), key->Index(), &start, &size);
-00071         entrySize = size;        // support getEntrySize call
-00072 
-00073         unsigned long newsize = (size + 2) * FILTERPAD;
-00074         if (newsize > entrybufallocsize) {
-00075                 if (entrybuf)
-00076                         delete [] entrybuf;
-00077                 entrybuf = new char [ newsize ];
-00078                 entrybufallocsize = newsize;
-00079         }
-00080         *entrybuf = 0;
-00081 
-00082         gettext(key->Testament(), start, (size + 2), entrybuf);
-00083 
-00084         rawFilter(entrybuf, size, key);
-00085 
-00086         if (!isUnicode())
-00087                 preptext(entrybuf);
-00088 
-00089         if (key != this->key)
-00090                 delete key;
-00091 
-00092         return entrybuf;
-00093 }
-00094 
-00095 
-00096 /******************************************************************************
-00097  * RawCom::operator +=  - Increments module key a number of entries
-00098  *
-00099  * ENT: increment       - Number of entries to jump forward
-00100  *
-00101  * RET: *this
-00102  */
-00103 
-00104 SWModule &RawCom::operator +=(int increment)
-00105 {
-00106         long  start;
-00107         unsigned short size;
-00108         VerseKey *tmpkey = 0;
-00109 
-00110 #ifndef _WIN32_WCE
-00111         try {
-00112 #endif
-00113                 tmpkey = SWDYNAMIC_CAST(VerseKey, key);
-00114 #ifndef _WIN32_WCE
-00115         }
-00116         catch ( ... ) {}
-00117 #endif
-00118         if (!tmpkey)
-00119                 tmpkey = new VerseKey(key);
-00120 
-00121         findoffset(tmpkey->Testament(), tmpkey->Index(), &start, &size);
-00122 
-00123         SWKey lastgood = *tmpkey;
-00124         while (increment) {
-00125                 long laststart = start;
-00126                 unsigned short lastsize = size;
-00127                 SWKey lasttry = *tmpkey;
-00128                 (increment > 0) ? (*key)++ : (*key)--;
-00129                 if (tmpkey != key)
-00130                         delete tmpkey;
-00131                 tmpkey = 0;
-00132 #ifndef _WIN32_WCE
-00133                 try {
-00134 #endif
-00135                         tmpkey = SWDYNAMIC_CAST(VerseKey, key);
-00136 #ifndef _WIN32_WCE
-00137                 }
-00138                 catch ( ... ) {}
-00139 #endif
-00140                 if (!tmpkey)
-00141                         tmpkey = new VerseKey(key);
-00142 
-00143                 if ((error = key->Error())) {
-00144                         *key = lastgood;
-00145                         break;
-00146                 }
-00147                 long index = tmpkey->Index();
-00148                 findoffset(tmpkey->Testament(), index, &start, &size);
-00149                 if ((((laststart != start) || (lastsize != size))||(!skipConsecutiveLinks)) && (start >= 0) && (size)) {
-00150                         increment += (increment < 0) ? 1 : -1;
-00151                         lastgood = *tmpkey;
-00152                 }
-00153         }
-00154         error = (error) ? KEYERR_OUTOFBOUNDS : 0;
-00155 
-00156         if (tmpkey != key)
-00157                 delete tmpkey;
-00158 
-00159         return *this;
-00160 }
-00161 
-00162 SWModule &RawCom::setentry(const char *inbuf, long len) {
-00163         VerseKey *key = 0;
-00164         // see if we have a VerseKey * or decendant
-00165 #ifndef _WIN32_WCE
-00166         try {
-00167 #endif
-00168                 key = SWDYNAMIC_CAST(VerseKey, this->key);
-00169 #ifndef _WIN32_WCE
-00170         }
-00171         catch ( ... ) {}
-00172 #endif
-00173         // if we don't have a VerseKey * decendant, create our own
-00174         if (!key)
-00175                 key = new VerseKey(this->key);
-00176 
-00177         settext(key->Testament(), key->Index(), inbuf, len);
-00178 
-00179         if (this->key != key) // free our key if we created a VerseKey
-00180                 delete key;
-00181 
-00182         return *this;
-00183 }
-00184 
-00185 SWModule &RawCom::operator <<(const char *inbuf) {
-00186         VerseKey *key = 0;
-00187         // see if we have a VerseKey * or decendant
-00188 #ifndef _WIN32_WCE
-00189         try {
-00190 #endif
-00191                 key = SWDYNAMIC_CAST(VerseKey, this->key);
-00192 #ifndef _WIN32_WCE
-00193         }
-00194         catch ( ... ) {}
-00195 #endif
-00196         // if we don't have a VerseKey * decendant, create our own
-00197         if (!key)
-00198                 key = new VerseKey(this->key);
-00199 
-00200         settext(key->Testament(), key->Index(), inbuf);
-00201 
-00202         if (this->key != key) // free our key if we created a VerseKey
-00203                 delete key;
-00204 
-00205         return *this;
-00206 }
-00207 
-00208 
-00209 SWModule &RawCom::operator <<(const SWKey *inkey) {
-00210         VerseKey *destkey = 0;
-00211         const VerseKey *srckey = 0;
-00212         // see if we have a VerseKey * or decendant
-00213 #ifndef _WIN32_WCE
-00214         try {
-00215 #endif
-00216                 destkey = SWDYNAMIC_CAST(VerseKey, this->key);
-00217 #ifndef _WIN32_WCE
-00218         }
-00219         catch ( ... ) {}
-00220 #endif
-00221         // if we don't have a VerseKey * decendant, create our own
-00222         if (!destkey)
-00223                 destkey = new VerseKey(this->key);
-00224 
-00225         // see if we have a VerseKey * or decendant
-00226 #ifndef _WIN32_WCE
-00227         try {
-00228 #endif
-00229                 srckey = SWDYNAMIC_CAST(VerseKey, inkey);
-00230 #ifndef _WIN32_WCE
-00231         }
-00232         catch ( ... ) {}
-00233 #endif
-00234         // if we don't have a VerseKey * decendant, create our own
-00235         if (!srckey)
-00236                 srckey = new VerseKey(inkey);
-00237 
-00238         linkentry(destkey->Testament(), destkey->Index(), srckey->Index());
-00239 
-00240         if (this->key != destkey) // free our key if we created a VerseKey
-00241                 delete destkey;
-00242 
-00243         if (inkey != srckey) // free our key if we created a VerseKey
-00244                 delete srckey;
-00245 
-00246         return *this;
-00247 }
-00248 
-00249 
-00250 /******************************************************************************
-00251  * RawCom::deleteEntry  - deletes this entry
-00252  *
-00253  * RET: *this
-00254  */
-00255 
-00256 void RawCom::deleteEntry() {
-00257 
-00258         VerseKey *key = 0;
-00259 
-00260 #ifndef _WIN32_WCE
-00261         try {
-00262 #endif
-00263                 key = SWDYNAMIC_CAST(VerseKey, this->key);
-00264 #ifndef _WIN32_WCE
-00265         }
-00266         catch ( ... ) {}
-00267 #endif
-00268         if (!key)
-00269                 key = new VerseKey(this->key);
-00270 
-00271         settext(key->Testament(), key->Index(), "");
-00272 
-00273         if (key != this->key)
-00274                 delete key;
-00275 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rawcom_8h-source.html b/doc/api-documentation/html/rawcom_8h-source.html deleted file mode 100644 index ad92d79..0000000 --- a/doc/api-documentation/html/rawcom_8h-source.html +++ /dev/null @@ -1,69 +0,0 @@ - - -rawcom.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rawcom.h

00001 /******************************************************************************
-00002  *  rawcom.h   - code for class 'RawCom'- a module that reads raw commentary
-00003  *                      files:  ot and nt using indexs ??.bks ??.cps ??.vss
-00004  *
-00005  * $Id: rawcom_8h-source.html,v 1.7 2002/06/20 20:23:09 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #ifndef RAWCOM_H
-00024 #define RAWCOM_H
-00025 
-00026 #include <rawverse.h>
-00027 #include <swcom.h>
-00028 
-00029 #include <defs.h>
-00030 
-00031 class SWDLLEXPORT RawCom:public RawVerse, public SWCom {
-00032 
-00033 public:
-00034   
-00035     
-00036         RawCom (const char *ipath, const char *iname = 0, const char *idesc = 0,
-00037                 SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN,
-00038                 const char* ilang = 0);
-00039      virtual ~ RawCom ();
-00040      virtual char *getRawEntry ();
-00041 
-00042      virtual SWModule & operator += (int increment);
-00043      virtual SWModule & operator -= (int decrement) { return this->operator += (-decrement); }
-00044 
-00045         // write interface ----------------------------
-00046         virtual bool isWritable () { return ((idxfp[0]->getFd() > 0) && ((idxfp[0]->mode & O_RDWR) == O_RDWR)); }
-00047         static char createModule (const char *path) { return RawVerse::createModule (path); }
-00048         virtual SWModule & setentry (const char *inbuf, long len);      // Modify current module entry
-00049         virtual SWModule & operator << (const char *inbuf);     // Modify current module entry
-00050         virtual SWModule & operator << (const SWKey * linkKey); // Link current module entry to other module entry
-00051         virtual void deleteEntry ();    // Delete current module entry
-00052         // end write interface ------------------------
-00053 
-00054 };
-00055 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rawfiles_8cpp-source.html b/doc/api-documentation/html/rawfiles_8cpp-source.html deleted file mode 100644 index 7384a23..0000000 --- a/doc/api-documentation/html/rawfiles_8cpp-source.html +++ /dev/null @@ -1,305 +0,0 @@ - - -rawfiles.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rawfiles.cpp

00001 /******************************************************************************
-00002  *  rawfiles.cpp - code for class 'RawFiles'- a module that produces HTML HREFs
-00003  *                      pointing to actual text desired.  Uses standard
-00004  *                      files:  ot and nt using indexs ??.bks ??.cps ??.vss
-00005  */
-00006 
-00007 
-00008 #include <ctype.h>
-00009 #include <stdio.h>
-00010 #include <fcntl.h>
-00011 
-00012 #ifndef __GNUC__
-00013 #include <io.h>
-00014 #else
-00015 #include <unistd.h>
-00016 #endif
-00017 
-00018 #include <string.h>
-00019 #include <utilfuns.h>
-00020 #include <rawverse.h>
-00021 #include <rawfiles.h>
-00022 #include <filemgr.h>
-00023 
-00024 #ifndef O_BINARY                // O_BINARY is needed in Borland C++ 4.53
-00025 #define O_BINARY 0              // If it hasn't been defined than we probably
-00026 #endif                          // don't need it.
-00027 
-00028 
-00029  /******************************************************************************
-00030  * RawFiles Constructor - Initializes data for instance of RawFiles
-00031  *
-00032  * ENT: iname - Internal name for module
-00033  *      idesc - Name to display to user for module
-00034  *      idisp    - Display object to use for displaying
-00035  */
-00036 
-00037 RawFiles::RawFiles(const char *ipath, const char *iname, const char *idesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang) : RawVerse(ipath, O_RDWR), SWCom(iname, idesc, idisp, enc, dir, mark, ilang)
-00038 {
-00039 }
-00040 
-00041 
-00042 /******************************************************************************
-00043  * RawFiles Destructor - Cleans up instance of RawFiles
-00044  */
-00045 
-00046 RawFiles::~RawFiles()
-00047 {
-00048 }
-00049 
-00050 
-00051 /******************************************************************************
-00052  * RawFiles::operator char *    - Returns the correct verse when char * cast
-00053  *                                      is requested
-00054  *
-00055  * RET: string buffer with verse
-00056  */
-00057 
-00058 char *RawFiles::getRawEntry() {
-00059         FileDesc *datafile;
-00060         long  start = 0;
-00061         unsigned short size = 0;
-00062         char *tmpbuf;
-00063         VerseKey *key = 0;
-00064 
-00065 #ifndef _WIN32_WCE
-00066         try {
-00067 #endif
-00068                 key = SWDYNAMIC_CAST(VerseKey, this->key);
-00069 #ifndef _WIN32_WCE
-00070         }
-00071         catch ( ... ) {}
-00072 #endif
-00073         if (!key)
-00074                 key = new VerseKey(this->key);
-00075 
-00076         findoffset(key->Testament(), key->Index(), &start, &size);
-00077 
-00078         if (entrybuf)
-00079                 delete [] entrybuf;
-00080 
-00081         if (size) {
-00082                 tmpbuf   = new char [ (size + 2) + strlen(path) + 5 ];
-00083                 sprintf(tmpbuf,"%s/",path);
-00084                 gettext(key->Testament(), start, (size + 2), tmpbuf+strlen(tmpbuf));
-00085                 datafile = FileMgr::systemFileMgr.open(tmpbuf, O_RDONLY|O_BINARY);
-00086                 delete [] tmpbuf;
-00087                 if (datafile->getFd() > 0) {
-00088                         size = lseek(datafile->getFd(), 0, SEEK_END);
-00089                         entrybuf = new char [ size * FILTERPAD ];
-00090                         memset(entrybuf, 0, size * FILTERPAD);
-00091                         lseek(datafile->getFd(), 0, SEEK_SET);
-00092                         read(datafile->getFd(), entrybuf, size);
-00093 //                      preptext(entrybuf);
-00094                 }
-00095                 else {
-00096                         entrybuf = new char [2];
-00097                         entrybuf[0] = 0;
-00098                         entrybuf[1] = 0;
-00099                 }
-00100                 FileMgr::systemFileMgr.close(datafile);
-00101         }
-00102         else {
-00103                 entrybuf = new char [2];
-00104                 entrybuf[0] = 0;
-00105                 entrybuf[1] = 0;
-00106         }
-00107 
-00108         if (key != this->key)
-00109                 delete key;
-00110 
-00111         return entrybuf;
-00112 }
-00113 
-00114 
-00115 /******************************************************************************
-00116  * RawFiles::operator << (char *)- Update the modules current key entry with
-00117  *                              provided text
-00118  *
-00119  * RET: *this
-00120  */
-00121 
-00122 SWModule &RawFiles::operator <<(const char *inbuf) {
-00123         FileDesc *datafile;
-00124         long  start;
-00125         unsigned short size;
-00126         char *tmpbuf;
-00127         VerseKey *key = 0;
-00128 
-00129 #ifndef _WIN32_WCE
-00130         try {
-00131 #endif
-00132                 key = SWDYNAMIC_CAST(VerseKey, this->key);
-00133 #ifndef _WIN32_WCE
-00134         }
-00135         catch ( ... ) {}
-00136 #endif
-00137         if (!key)
-00138                 key = new VerseKey(this->key);
-00139 
-00140         findoffset(key->Testament(), key->Index(), &start, &size);
-00141 
-00142         if (size) {
-00143                 tmpbuf   = new char [ (size + 2) + strlen(path) + 1 ];
-00144                 sprintf(tmpbuf, "%s/", path);
-00145                 gettext(key->Testament(), start, (size + 2), tmpbuf+strlen(tmpbuf));
-00146         }
-00147         else {
-00148                 tmpbuf   = new char [ 16 + strlen(path) + 1 ];
-00149                 sprintf(tmpbuf, "%s/%s", path, getnextfilename());
-00150                 settext(key->Testament(), key->Index(), tmpbuf+strlen(path)+1);
-00151         }
-00152         datafile = FileMgr::systemFileMgr.open(tmpbuf, O_CREAT|O_WRONLY|O_BINARY|O_TRUNC);
-00153         delete [] tmpbuf;
-00154         if (datafile->getFd() > 0) {
-00155                 write(datafile->getFd(), inbuf, strlen(inbuf));
-00156         }
-00157         FileMgr::systemFileMgr.close(datafile);
-00158         
-00159         if (key != this->key)
-00160                 delete key;
-00161 
-00162         return *this;
-00163 }
-00164 
-00165 
-00166 /******************************************************************************
-00167  * RawFiles::operator << (SWKey *)- Link the modules current key entry with
-00168  *                              another module entry
-00169  *
-00170  * RET: *this
-00171  */
-00172 
-00173 SWModule &RawFiles::operator <<(const SWKey *inkey) {
-00174 
-00175         long  start;
-00176         unsigned short size;
-00177         char *tmpbuf;
-00178         const VerseKey *key = 0;
-00179 
-00180 #ifndef _WIN32_WCE
-00181         try {
-00182 #endif
-00183                 key = SWDYNAMIC_CAST(VerseKey, inkey);
-00184 #ifndef _WIN32_WCE
-00185         }
-00186         catch ( ... ) {}
-00187 #endif
-00188         if (!key)
-00189                 key = new VerseKey(this->key);
-00190 
-00191         findoffset(key->Testament(), key->Index(), &start, &size);
-00192 
-00193         if (size) {
-00194                 tmpbuf   = new char [ size + 2];
-00195                 gettext(key->Testament(), start, size + 2, tmpbuf);
-00196 
-00197                 if (key != inkey)
-00198                         delete key;
-00199                 key = 0;
-00200 
-00201 #ifndef _WIN32_WCE
-00202                 try {
-00203 #endif
-00204                         key = SWDYNAMIC_CAST(VerseKey, inkey);
-00205 #ifndef _WIN32_WCE
-00206                 }
-00207                 catch ( ... ) {}
-00208 #endif
-00209                 if (!key)
-00210                         key = new VerseKey(this->key);
-00211                 settext(key->Testament(), key->Index(), tmpbuf);
-00212         }
-00213         
-00214         if (key != inkey)
-00215                 delete key;
-00216 
-00217         return *this;
-00218 }
-00219 
-00220 
-00221 /******************************************************************************
-00222  * RawFiles::deleteEntry        - deletes this entry
-00223  *
-00224  * RET: *this
-00225  */
-00226 
-00227 void RawFiles::deleteEntry() {
-00228 
-00229         VerseKey *key = 0;
-00230 
-00231 #ifndef _WIN32_WCE
-00232         try {
-00233 #endif
-00234                 key = SWDYNAMIC_CAST(VerseKey, this->key);
-00235 #ifndef _WIN32_WCE
-00236         }
-00237         catch ( ... ) {}
-00238 #endif
-00239         if (!key)
-00240                 key = new VerseKey(this->key);
-00241 
-00242         settext(key->Testament(), key->Index(), "");
-00243 
-00244         if (key != this->key)
-00245                 delete key;
-00246 }
-00247 
-00248 
-00249 /******************************************************************************
-00250  * RawFiles::getnextfilename - generates a valid filename in which to store
-00251  *                              an entry
-00252  *
-00253  * RET: filename
-00254  */
-00255 
-00256 char *RawFiles::getnextfilename() {
-00257         static char incfile[255];
-00258         long number;
-00259         FileDesc *datafile;
-00260 
-00261         sprintf(incfile, "%s/incfile", path);
-00262         datafile = FileMgr::systemFileMgr.open(incfile, O_RDONLY|O_BINARY);
-00263         if (read(datafile->getFd(), &number, 4) != 4)
-00264                 number = 0;
-00265         number++;
-00266         FileMgr::systemFileMgr.close(datafile);
-00267         
-00268         datafile = FileMgr::systemFileMgr.open(incfile, O_CREAT|O_WRONLY|O_BINARY|O_TRUNC);
-00269         write(datafile->getFd(), &number, 4);
-00270         FileMgr::systemFileMgr.close(datafile);
-00271         sprintf(incfile, "%.7ld", number-1);
-00272         return incfile;
-00273 }
-00274 
-00275 
-00276 char RawFiles::createModule (const char *path) {
-00277         char *incfile = new char [ strlen (path) + 16 ];
-00278     static long zero = 0;
-00279         FileDesc *datafile;
-00280 
-00281         sprintf(incfile, "%s/incfile", path);
-00282         datafile = FileMgr::systemFileMgr.open(incfile, O_CREAT|O_WRONLY|O_BINARY|O_TRUNC);
-00283     delete [] incfile;
-00284         write(datafile->getFd(), &zero, 4);
-00285         FileMgr::systemFileMgr.close(datafile);
-00286 
-00287     return RawVerse::createModule (path);
-00288 }
-00289 
-00290 
-00291 
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rawfiles_8h-source.html b/doc/api-documentation/html/rawfiles_8h-source.html deleted file mode 100644 index 5935e4e..0000000 --- a/doc/api-documentation/html/rawfiles_8h-source.html +++ /dev/null @@ -1,74 +0,0 @@ - - -rawfiles.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rawfiles.h

00001 /******************************************************************************
-00002  *  rawfiles.h - code for class 'RawFiles'- a module that produces HTML HREFs
-00003  *                      pointing to actual text desired.  Uses standard
-00004  *                      files:  ot and nt using indexs ??.bks ??.cps ??.vss
-00005  *
-00006  * $Id: rawfiles_8h-source.html,v 1.7 2002/06/20 20:23:09 mgruner Exp $
-00007  *
-00008  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00009  *      CrossWire Bible Society
-00010  *      P. O. Box 2528
-00011  *      Tempe, AZ  85280-2528
-00012  *
-00013  * This program is free software; you can redistribute it and/or modify it
-00014  * under the terms of the GNU General Public License as published by the
-00015  * Free Software Foundation version 2.
-00016  *
-00017  * This program is distributed in the hope that it will be useful, but
-00018  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00020  * General Public License for more details.
-00021  *
-00022  */
-00023 
-00024 #ifndef RAWFILES_H
-00025 #define RAWFILES_H
-00026 
-00027 #include <rawverse.h>
-00028 #include <swcom.h>
-00029 
-00030 #include <defs.h>
-00031 
-00032 class SWDLLEXPORT RawFiles:public RawVerse, public SWCom
-00033 {
-00034 
-00035   char *getnextfilename ();
-00036 
-00037 public:
-00038   
-00039     
-00040     RawFiles (const char *ipath, const char *iname = 0, const char *idesc =
-00041               0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN,
-00042               const char* ilang = 0);
-00043     virtual ~RawFiles ();
-00044   virtual char *getRawEntry ();
-00045 
-00046   // write interface ----------------------------
-00050         virtual bool isWritable () { return ((idxfp[0]->getFd() > 0) && ((idxfp[0]->mode & O_RDWR) == O_RDWR)); }
-00051   
-00056   static char createModule (const char *);
-00057   
-00062   virtual SWModule & operator << (const char *);
-00063   
-00068   virtual SWModule & operator << (const SWKey *);
-00069   
-00073   virtual void deleteEntry ();
-00074   // end write interface ------------------------
-00075 };
-00076 
-00077 
-00078 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rawfilesgen_8cpp-source.html b/doc/api-documentation/html/rawfilesgen_8cpp-source.html deleted file mode 100644 index 85badac..0000000 --- a/doc/api-documentation/html/rawfilesgen_8cpp-source.html +++ /dev/null @@ -1,250 +0,0 @@ - - -rawfilesgen.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rawfilesgen.cpp

00001 /*****************************************************************************
-00002  *
-00003  */
-00004 
-00005 #include <stdio.h>
-00006 #include <stdlib.h>
-00007 #include <string.h>
-00008 #include <ctype.h>
-00009 
-00010 #ifndef __GNUC__
-00011 #include <io.h>
-00012 #else
-00013 #include <unistd.h>
-00014 #endif
-00015 
-00016 #include <fcntl.h>
-00017 #include <versekey.h>
-00018 
-00019 #ifndef O_BINARY
-00020         #define O_BINARY 0
-00021 #endif
-00022 
-00023 void writeidx(VerseKey &key1, VerseKey &key2, VerseKey &key3, long offset, short size);
-00024 char findbreak(int fp, long *offset, int *num1, int *num2, int *rangemax, short *size);
-00025 void openfiles();
-00026 void checkparams(int argc, char **argv);
-00027 void charsetconvert(char *data);
-00028 
-00029 
-00030 VerseKey key1, key2, key3;
-00031 int fp, vfp, cfp, bfp;
-00032 long chapoffset;
-00033 short chapsize;
-00034 char testmnt;
-00035 char startflag = 0;
-00036 
-00037 
-00038 main(int argc, char **argv)
-00039 {
-00040         long pos, offset;
-00041         int num1, num2, rangemax, curbook = 0, curchap = 0, curverse = 0;
-00042         char buf[127];
-00043         short size, tmp;
-00044         extern struct zonline online;
-00045 
-00046         checkparams(argc, argv);
-00047 
-00048         key1 = key2 = key3 = "Genesis 1:1";
-00049 
-00050         openfiles();
-00051 
-00052         num1    = key1.Chapter();
-00053         num2    = key1.Verse();
-00054 
-00055         while(!findbreak(fp, &offset, &num1, &num2, &rangemax, &size)) {
-00056                 if (!startflag) {
-00057                         startflag = 1;
-00058                 }
-00059                 else {
-00060                         if (num2 < key2.Verse()) {            // new chapter
-00061                                 if (num1 <= key2.Chapter()) { // new book
-00062                                         key2.Verse(1);
-00063                                         key2.Chapter(1);
-00064                                         key2.Book(key2.Book()+1);
-00065                                 }
-00066                                 printf("Created Empty Entry: %d ('%s')\n", num1, (const char *)key2);
-00067                                 chapoffset = offset;
-00068                                 chapsize = size;
-00069 //                              continue;
-00070                         }
-00071                 }
-00072                 key2.Verse(1);
-00073                 key2.Chapter(num1);
-00074                 key2.Verse(num2);
-00075 
-00076                 key3 = key2;
-00077 //              key3 += (rangemax - key3.Verse());
-00078 
-00079                 writeidx(key1, key2, key3, offset, size);
-00080         }
-00081         close(vfp);
-00082         close(cfp);
-00083         close(bfp);
-00084         close(fp);
-00085 }
-00086 
-00087 
-00088 /**************************************************************************
-00089  * ENT: key1    - current location of index
-00090  *      key2    - minimum keyval for which this offset is valid
-00091  *      key3    - maximum keyval for which this offset is valid
-00092  */
-00093 
-00094 void writeidx(VerseKey &key1, VerseKey &key2, VerseKey &key3, long offset, short size)
-00095 {
-00096         long pos;
-00097         short tmp;
-00098 
-00099                 if (key1.Verse() == 1) {        // new chapter
-00100                         if (key1.Chapter() == 1) {      // new book
-00101                                 pos = lseek(cfp, 0, SEEK_CUR);
-00102                                 write(bfp, &pos, 4);
-00103                                 pos = lseek(vfp, 0, SEEK_CUR); /* Book intro (cps) */
-00104                                 write(cfp, &pos, 4);
-00105                                 write(vfp, &chapoffset, 4);  /* Book intro (vss)  set to same as chap for now(it should be chap 1 which usually contains the book into anyway)*/
-00106                                 write(vfp, &chapsize, 2);
-00107                         }
-00108                         pos = lseek(vfp, 0, SEEK_CUR);
-00109                         write(cfp, &pos, 4);
-00110                         write(vfp, &chapoffset, 4);  /* Chapter intro */
-00111                         write(vfp, &chapsize, 2);
-00112                 }
-00113                 if (key1 >= key2) {
-00114                         write(vfp, &offset, 4);
-00115                         size = 0;
-00116                         write(vfp, &size, 2);
-00117                 }
-00118                 else    {
-00119                         pos = 0;
-00120                         tmp = 0;
-00121                         write(vfp, &pos, 4);
-00122                         write(vfp, &tmp, 2);
-00123                 }
-00124                 key1++;
-00125 }
-00126 
-00127 
-00128 static VerseKey inckey = "Genesis 1:1";
-00129 
-00130 char findbreak(int fp, long *offset, int *num1, int *num2, int *rangemax, short *size)
-00131 {
-00132         char buf[7];
-00133         char buf2[20];
-00134         char ch;
-00135         char loop;
-00136         long offset2;
-00137         int ch2, vs2, rm2;
-00138         bool flag;
-00139         long chapstart = 0; 
-00140         static int olbvnum = 0;
-00141         char data[16];
-00142 
-00143         memset (data,0,16);
-00144 
-00145         if (++olbvnum <= 31102) {
-00146 
-00147                 if (olbvnum == 23146) { // "Matthew 1:1"        
-00148                         close(vfp);
-00149                         close(cfp);
-00150                         close(bfp);
-00151                         close(fp);
-00152                         key1 = key2 = key3 = inckey = "Matthew 1:1";
-00153                         openfiles();
-00154                         startflag = 0;
-00155                 }
-00156 
-00157 
-00158                 *offset = lseek(fp, 0, SEEK_CUR);
-00159 
-00160                 if ((olbvnum!=1) && (olbvnum != 23146))
-00161                         inckey++;
-00162                         
-00163                 *num1 = inckey.Chapter();
-00164                 *num2 = inckey.Verse();
-00165         
-00166                 
-00167                 write(fp, data, 16);
-00168 
-00169                 *size = lseek(fp, 0, SEEK_CUR) - *offset;
-00170                 return 0;
-00171         }
-00172         return 1;
-00173 }
-00174 
-00175 
-00176 void openfiles()
-00177 {
-00178         char buf[255];
-00179         char fname[5];
-00180         long pos;
-00181         short size;
-00182         
-00183         testmnt = key1.Testament();
-00184 
-00185         strcpy(fname, (testmnt==2) ? "nt" : "ot");
-00186         unlink(fname);
-00187         if ((fp = open(fname, O_CREAT|O_RDWR|O_BINARY)) == -1) {
-00188                 fprintf(stderr, "Couldn't open file: %s\n", fname);
-00189                 exit(1);
-00190         }
-00191 
-00192         sprintf(buf, "%s.vss", fname);
-00193         unlink(buf);
-00194         if ((vfp = open(buf, O_CREAT|O_WRONLY|O_BINARY)) == -1) {
-00195                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00196                 exit(1);
-00197         }
-00198 
-00199         sprintf(buf, "%s.cps", fname);
-00200         unlink(buf);
-00201         if ((cfp = open(buf, O_CREAT|O_WRONLY|O_BINARY)) == -1) {
-00202                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00203                 exit(1);
-00204         }
-00205 
-00206         sprintf(buf, "%s.bks", fname);
-00207         unlink(buf);
-00208         if ((bfp = open(buf, O_CREAT|O_WRONLY|O_BINARY)) == -1) {
-00209                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00210                 exit(1);
-00211         }
-00212 
-00213         pos  = 0;
-00214         write(bfp, &pos, 4);  /* Book    offset for testament intros */
-00215         pos = 4;
-00216         write(cfp, &pos, 4);  /* Chapter offset for testament intro */
-00217 
-00218 
-00219 /*      Right now just zero out intros until parsing correctly */
-00220         pos = 0;
-00221         size = 0;
-00222         write(vfp, &pos, 4);  /* Module intro */
-00223         write(vfp, &size, 2);
-00224         write(vfp, &pos, 4);  /* Testament intro */
-00225         write(vfp, &size, 2);
-00226 
-00227 }
-00228 
-00229 
-00230 void checkparams(int argc, char **argv)
-00231 {
-00232         if (argc !=1) {
-00233                 fprintf(stderr, "usage: %s\n", argv[0]);
-00234                 exit(1);
-00235         }
-00236 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rawgbf_2gbfidx_8cpp-source.html b/doc/api-documentation/html/rawgbf_2gbfidx_8cpp-source.html deleted file mode 100644 index 2c61994..0000000 --- a/doc/api-documentation/html/rawgbf_2gbfidx_8cpp-source.html +++ /dev/null @@ -1,308 +0,0 @@ - - -gbfidx.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

gbfidx.cpp

00001 /*****************************************************************************
-00002  *
-00003  *      This code wreaks but works (at least for WEB).  Good luck!
-00004  */
-00005 
-00006 #include <stdio.h>
-00007 #include <stdlib.h>
-00008 #include <string.h>
-00009 #include <ctype.h>
-00010 
-00011 #ifndef __GNUC__
-00012 #include <io.h>
-00013 #else
-00014 #include <unistd.h>
-00015 #endif
-00016 
-00017 #include <fcntl.h>
-00018 #include <versekey.h>
-00019 
-00020 
-00021 void writeidx(VerseKey &key1, VerseKey &key2, VerseKey &key3, long offset, short size);
-00022 char findbreak(int fp, long *offset, int *num1, int *num2, int *rangemax, short *size);
-00023 void openfiles(char *fname);
-00024 void checkparams(int argc, char **argv);
-00025 
-00026 
-00027 VerseKey key1, key2, key3;
-00028 int fp, vfp, cfp, bfp;
-00029 long chapoffset;
-00030 short chapsize;
-00031 char testmnt;
-00032 
-00033 
-00034 main(int argc, char **argv)
-00035 {
-00036         long pos, offset;
-00037         int num1, num2, rangemax, curbook = 0, curchap = 0, curverse = 0;
-00038         char buf[127], startflag = 0;
-00039         short size, tmp;
-00040 
-00041         checkparams(argc, argv);
-00042 
-00043         openfiles(argv[1]);
-00044 
-00045         testmnt = key1.Testament();
-00046         num1 = key1.Chapter();
-00047         num2 = key1.Verse();
-00048         pos  = 0;
-00049         write(bfp, &pos, 4);  /* Book    offset for testament intros */
-00050         pos = 4;
-00051         write(cfp, &pos, 4);  /* Chapter offset for testament intro */
-00052 
-00053 
-00054 /*      Right now just zero out intros until parsing correctly */
-00055         pos = 0;
-00056         size = 0;
-00057         write(vfp, &pos, 4);  /* Module intro */
-00058         write(vfp, &size, 2);
-00059         write(vfp, &pos, 4);  /* Testament intro */
-00060         write(vfp, &size, 2);
-00061 
-00062         while(!findbreak(fp, &offset, &num1, &num2, &rangemax, &size)) {
-00063                 if (!startflag) {
-00064                         startflag = 1;
-00065                 }
-00066                 else {
-00067                         if (num2 < key2.Verse()) {            // new chapter
-00068                                 if (num1 <= key2.Chapter()) { // new book
-00069                                         key2.Verse(1);
-00070                                         key2.Chapter(1);
-00071                                         key2.Book(key2.Book()+1);
-00072                                 }
-00073                                 printf("Found Chapter Break: %d ('%s')\n", num1, (const char *)key2);
-00074                                 chapoffset = offset;
-00075                                 chapsize = size;
-00076 //                              continue;
-00077                         }
-00078                 }
-00079                 key2.Verse(1);
-00080                 key2.Chapter(num1);
-00081                 key2.Verse(num2);
-00082 
-00083                 key3 = key2;
-00084 //              key3 += (rangemax - key3.Verse());
-00085 
-00086                 writeidx(key1, key2, key3, offset, size);
-00087         }
-00088         close(vfp);
-00089         close(cfp);
-00090         close(bfp);
-00091         close(fp);
-00092 }
-00093 
-00094 
-00095 /**************************************************************************
-00096  * ENT: key1    - current location of index
-00097  *      key2    - minimum keyval for which this offset is valid
-00098  *      key3    - maximum keyval for which this offset is valid
-00099  */
-00100 
-00101 void writeidx(VerseKey &key1, VerseKey &key2, VerseKey &key3, long offset, short size)
-00102 {
-00103         long pos;
-00104         short tmp;
-00105 
-00106         for (; ((key1 <= key3) && (key1.Error() != KEYERR_OUTOFBOUNDS) && (key1.Testament() == testmnt)); key1+=1) {
-00107                 if (key1.Verse() == 1) {        // new chapter
-00108                         if (key1.Chapter() == 1) {      // new book
-00109                                 pos = lseek(cfp, 0, SEEK_CUR);
-00110                                 write(bfp, &pos, 4);
-00111                                 pos = lseek(vfp, 0, SEEK_CUR); /* Book intro (cps) */
-00112                                 write(cfp, &pos, 4);
-00113                                 write(vfp, &chapoffset, 4);  /* Book intro (vss)  set to same as chap for now(it should be chap 1 which usually contains the book into anyway)*/
-00114                                 write(vfp, &chapsize, 2);
-00115                         }
-00116                         pos = lseek(vfp, 0, SEEK_CUR);
-00117                         write(cfp, &pos, 4);
-00118                         write(vfp, &chapoffset, 4);  /* Chapter intro */
-00119                         write(vfp, &chapsize, 2);
-00120                 }
-00121                 if (key1 >= key2) {
-00122                         write(vfp, &offset, 4);
-00123                         write(vfp, &size, 2);
-00124                 }
-00125                 else    {
-00126                         pos = 0;
-00127                         tmp = 0;
-00128                         write(vfp, &pos, 4);
-00129                         write(vfp, &tmp, 2);
-00130                 }
-00131         }
-00132 }
-00133 
-00134 
-00135 char startchap(char *buf)
-00136 {
-00137         char loop;
-00138 
-00139         if (buf[0] != '<')
-00140                 return 0;
-00141         if (buf[1] != 'S')
-00142                 return 0;
-00143         if (buf[2] != 'C')
-00144                 return 0;
-00145 /*
-00146         if (!isdigit(buf[2]))
-00147                 return 0;
-00148         for (loop = 3; loop < 7; loop++) {
-00149                 if (buf[loop] == ' ')
-00150                         break;
-00151                 if ((!isdigit(buf[loop])) && (buf[loop] != ',') && (buf[loop] != '-'))
-00152                         return 0;
-00153         }
-00154 */
-00155         return 1;
-00156 }
-00157 
-00158 
-00159 char startentry(char *buf)
-00160 {
-00161         char loop;
-00162 
-00163         if (buf[0] != '<')
-00164                 return 0;
-00165         if (buf[1] != 'S')
-00166                 return 0;
-00167         if (buf[2] != 'V')
-00168                 return 0;
-00169 /*
-00170         if (!isdigit(buf[2]))
-00171                 return 0;
-00172         for (loop = 3; loop < 7; loop++) {
-00173                 if (buf[loop] == ' ')
-00174                         break;
-00175                 if ((!isdigit(buf[loop])) && (buf[loop] != ',') && (buf[loop] != '-'))
-00176                         return 0;
-00177         }
-00178 */
-00179         return 1;
-00180 }
-00181 
-00182 
-00183 char findbreak(int fp, long *offset, int *num1, int *num2, int *rangemax, short *size)
-00184 {
-00185         char buf[7];
-00186         char buf2[20];
-00187         char ch;
-00188         char loop;
-00189         long offset2;
-00190         int ch2, vs2, rm2;
-00191         bool flag;
-00192         long chapstart = 0; 
-00193         
-00194         memset(buf, ' ', 7);
-00195 
-00196         while (1) {
-00197                 if (startchap(buf)) {
-00198                         chapstart = lseek(fp, 0, SEEK_CUR) - 7;
-00199                         memset(buf, ' ', 3);
-00200                         flag = false;
-00201                         for (loop = 3; loop < 6; loop++) {
-00202                                 if (isdigit(buf[loop]))
-00203                                         flag = true;
-00204                                 else {
-00205                                         buf[loop] = 0;
-00206                                         break;
-00207                                 }
-00208                         }
-00209                         if (flag) 
-00210                                 *num1 = atoi(buf);
-00211                         else    (*num1)++;
-00212                 }
-00213                 if (startentry(buf)) {
-00214                         memset(buf, ' ', 3);
-00215                         flag = false;
-00216                         for (loop = 3; loop < 6; loop++) {
-00217                                 if (isdigit(buf[loop]))
-00218                                         flag = true;
-00219                                 else {
-00220                                         buf[loop] = 0;
-00221                                         break;
-00222                                 }
-00223                         if (flag)
-00224                                 *num2 = atoi(buf);
-00225                         else    (*num2)++;
-00226                         }
-00227                         loop++;
-00228                         if (size)
-00229                                 *offset = lseek(fp, 0, SEEK_CUR) - (7 - loop);
-00230                         else    *offset = (chapstart) ? chapstart : lseek(fp, 0, SEEK_CUR) - 7;
-00231                         if (size) {
-00232                                 ch2 = *num1;
-00233                                 vs2 = *num2;
-00234                                 if (findbreak(fp, &offset2, &ch2, &vs2, &rm2, 0)) {
-00235                                         *size = (short) (lseek(fp, 0, SEEK_END) - (*offset));
-00236                                 }
-00237                                 else {
-00238                                         if (vs2) {
-00239                                                 *size = (offset2 - (*offset));
-00240                                         }
-00241                                 }
-00242                                 lseek(fp, *offset, SEEK_SET);
-00243                         }
-00244                         return 0;
-00245                 }
-00246                 memmove(buf, &buf[1], 6);
-00247                 if (read(fp, &buf[6], 1) != 1)
-00248                         return 1;
-00249         }
-00250 }
-00251 
-00252 
-00253 void openfiles(char *fname)
-00254 {
-00255 #ifndef O_BINARY                // O_BINARY is needed in Borland C++ 4.53
-00256 #define O_BINARY 0              // If it hasn't been defined than we probably
-00257 #endif                          // don't need it.
-00258         char buf[255];
-00259 
-00260         if ((fp = open(fname, O_RDONLY|O_BINARY)) == -1) {
-00261                 fprintf(stderr, "Couldn't open file: %s\n", fname);
-00262                 exit(1);
-00263         }
-00264 
-00265         sprintf(buf, "%s.vss", fname);
-00266         if ((vfp = open(buf, O_CREAT|O_WRONLY|O_BINARY)) == -1) {
-00267                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00268                 exit(1);
-00269         }
-00270 
-00271         sprintf(buf, "%s.cps", fname);
-00272         if ((cfp = open(buf, O_CREAT|O_WRONLY|O_BINARY)) == -1) {
-00273                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00274                 exit(1);
-00275         }
-00276 
-00277         sprintf(buf, "%s.bks", fname);
-00278         if ((bfp = open(buf, O_CREAT|O_WRONLY|O_BINARY)) == -1) {
-00279                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00280                 exit(1);
-00281         }
-00282 }
-00283 
-00284 
-00285 void checkparams(int argc, char **argv)
-00286 {
-00287         if (argc < 2) {
-00288                 fprintf(stderr, "usage: %s <file to process> [nt - for new testmt file]\n", argv[0]);
-00289                 exit(1);
-00290         }
-00291         if (argc == 3)
-00292                 key1 = key2 = key3 = "Matthew 1:1";
-00293         else    key1 = key2 = key3 = "Genesis 1:1";
-00294 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rawgbf_8cpp-source.html b/doc/api-documentation/html/rawgbf_8cpp-source.html deleted file mode 100644 index 23d9c7e..0000000 --- a/doc/api-documentation/html/rawgbf_8cpp-source.html +++ /dev/null @@ -1,98 +0,0 @@ - - -rawgbf.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rawgbf.cpp

00001 /******************************************************************************
-00002  *  rawgbf.cpp - code for class 'RawGBF'- a module that reads raw text files:
-00003  *                ot and nt using indexs ??.bks ??.cps ??.vss
-00004  */
-00005 
-00006 
-00007 #include <ctype.h>
-00008 #include <stdio.h>
-00009 #include <fcntl.h>
-00010 
-00011 #ifndef __GNUC__
-00012 #include <io.h>
-00013 #else
-00014 #include <unistd.h>
-00015 #endif
-00016 
-00017 #include <string.h>
-00018 #include <utilfuns.h>
-00019 #include <rawverse.h>
-00020 #include <rawgbf.h>
-00021 
-00022 
-00023 /******************************************************************************
-00024  * RawGBF Constructor - Initializes data for instance of RawGBF
-00025  *
-00026  * ENT: iname - Internal name for module
-00027  *      idesc - Name to display to user for module
-00028  *      idisp    - Display object to use for displaying
-00029  */
-00030 
-00031 RawGBF::RawGBF(const char *ipath, const char *iname, const char *idesc, SWDisplay *idisp) : SWText(iname, idesc, idisp), RawVerse(ipath)
-00032 {
-00033 }
-00034 
-00035 
-00036 /******************************************************************************
-00037  * RawGBF Destructor - Cleans up instance of RawGBF
-00038  */
-00039 
-00040 RawGBF::~RawGBF()
-00041 {
-00042 }
-00043 
-00044 
-00045 /******************************************************************************
-00046  * RawGBF::operator char *      - Returns the correct verse when char * cast
-00047  *                                      is requested
-00048  *
-00049  * RET: string buffer with verse
-00050  */
-00051 
-00052 RawGBF::operator char*()
-00053 {
-00054         long  start;
-00055         unsigned short size;
-00056         VerseKey *key = 0;
-00057 
-00058 #ifndef _WIN32_WCE
-00059         try {
-00060 #endif
-00061                 key = SWDYNAMIC_CAST(VerseKey, this->key);
-00062 #ifndef _WIN32_WCE
-00063         }
-00064         catch ( ... ) {}
-00065 #endif
-00066         if (!key)
-00067                 key = new VerseKey(this->key);
-00068 
-00069 
-00070         findoffset(key->Testament(), key->Index(), &start, &size);
-00071 
-00072         if (entrybuf)
-00073                 delete [] entrybuf;
-00074         entrybuf = new char [ size * 3 ];               // extra for conversion to RTF or other.
-00075 
-00076         gettext(key->Testament(), start, size + 1, entrybuf);
-00077         preptext(entrybuf);
-00078         RenderText(entrybuf, size * 3);
-00079         
-00080         if (key != this->key)
-00081                 delete key;
-00082 
-00083         return entrybuf;
-00084 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rawgbf_8h-source.html b/doc/api-documentation/html/rawgbf_8h-source.html deleted file mode 100644 index ca89793..0000000 --- a/doc/api-documentation/html/rawgbf_8h-source.html +++ /dev/null @@ -1,59 +0,0 @@ - - -rawgbf.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rawgbf.h

00001 /******************************************************************************
-00002  *  rawgbf.h   - code for class 'RawGBF'- a module that reads raw text files:
-00003  *                ot and nt using indexs ??.bks ??.cps ??.vss
-00004  *
-00005  * $Id: rawgbf_8h-source.html,v 1.7 2002/06/20 20:23:09 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #ifndef RAWGBF_H
-00024 #define RAWGBF_H
-00025 
-00026 #include <rawverse.h>
-00027 #include <swtext.h>
-00028 #include <swfilter.h>
-00029 
-00030 #include <defs.h>
-00031 
-00032 class SWDLLEXPORT RawGBF:public SWText, public RawVerse
-00033 {
-00034 
-00035 public:
-00036   
-00037     
-00038     RawGBF (const char *ipath, const char *iname = 0, const char *idesc =
-00039             0, SWDisplay * idisp = 0);
-00040     virtual ~ RawGBF ();
-00041   virtual operator char *();
-00042 };
-00043 
-00044 
-00045 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rawgenbook_8cpp-source.html b/doc/api-documentation/html/rawgenbook_8cpp-source.html deleted file mode 100644 index 83f1136..0000000 --- a/doc/api-documentation/html/rawgenbook_8cpp-source.html +++ /dev/null @@ -1,256 +0,0 @@ - - -rawgenbook.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rawgenbook.cpp

00001 /******************************************************************************
-00002  *  rawtext.cpp - code for class 'RawGenBook'- a module that reads raw text files:
-00003  *                ot and nt using indexs ??.bks ??.cps ??.vss
-00004  */
-00005 
-00006 
-00007 #include <stdio.h>
-00008 #include <fcntl.h>
-00009 
-00010 #ifndef __GNUC__
-00011 #include <io.h>
-00012 #else
-00013 #include <unistd.h>
-00014 #endif
-00015 
-00016 #include <string.h>
-00017 #include <utilfuns.h>
-00018 #include <rawgenbook.h>
-00019 #include <rawstr.h>
-00020 
-00021 #ifndef O_BINARY
-00022 #define O_BINARY 0
-00023 #endif
-00024 
-00025 /******************************************************************************
-00026  * RawGenBook Constructor - Initializes data for instance of RawGenBook
-00027  *
-00028  * ENT: iname - Internal name for module
-00029  *      idesc - Name to display to user for module
-00030  *      idisp    - Display object to use for displaying
-00031  */
-00032 
-00033 RawGenBook::RawGenBook(const char *ipath, const char *iname, const char *idesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang)
-00034                 : SWGenBook(iname, idesc, idisp, enc, dir, mark, ilang) {
-00035         int fileMode = O_RDWR;
-00036         char *buf = new char [ strlen (ipath) + 20 ];
-00037 
-00038         entryBuf = 0;
-00039         path = 0;
-00040         stdstr(&path, ipath);
-00041 
-00042 
-00043         if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\'))
-00044                 path[strlen(path)-1] = 0;
-00045 
-00046         delete key;
-00047         key = CreateKey();
-00048 
-00049 
-00050         sprintf(buf, "%s.bdt", path);
-00051         bdtfd = FileMgr::systemFileMgr.open(buf, fileMode|O_BINARY, true);
-00052 
-00053         delete [] buf;
-00054 
-00055 }
-00056 
-00057 
-00058 /******************************************************************************
-00059  * RawGenBook Destructor - Cleans up instance of RawGenBook
-00060  */
-00061 
-00062 RawGenBook::~RawGenBook() {
-00063 
-00064         FileMgr::systemFileMgr.close(bdtfd);
-00065 
-00066         if (path)
-00067                 delete [] path;
-00068 
-00069         if (entryBuf)
-00070                 delete [] entryBuf;
-00071 }
-00072 
-00073 
-00074 /******************************************************************************
-00075  * RawGenBook::operator char *  - Returns the correct verse when char * cast
-00076  *                                      is requested
-00077  *
-00078  * RET: string buffer with verse
-00079  */
-00080 
-00081 char *RawGenBook::getRawEntry() {
-00082 
-00083         __u32 offset = 0;
-00084         __u32 size = 0;
-00085 
-00086         TreeKeyIdx *key = 0;
-00087 #ifndef _WIN32_WCE
-00088         try {
-00089 #endif
-00090                 key = SWDYNAMIC_CAST(TreeKeyIdx, (this->key));
-00091 #ifndef _WIN32_WCE
-00092         }
-00093         catch ( ... ) {}
-00094 #endif
-00095 
-00096         if (!key) {
-00097                 key = (TreeKeyIdx *)CreateKey();
-00098                 (*key) = *(this->key);
-00099         }
-00100 
-00101         if (entryBuf)
-00102                 delete [] entryBuf;
-00103 
-00104         int dsize;
-00105         key->getUserData(&dsize);
-00106         if (dsize > 7) {
-00107                 memcpy(&offset, key->getUserData(), 4);
-00108                 offset = swordtoarch32(offset);
-00109 
-00110                 memcpy(&size, key->getUserData() + 4, 4);
-00111                 size = swordtoarch32(size);
-00112 
-00113                 entrySize = size;        // support getEntrySize call
-00114 
-00115                 entryBuf = new char [ (size + 2) * FILTERPAD ];
-00116                 *entryBuf = 0;
-00117                 lseek(bdtfd->getFd(), offset, SEEK_SET);
-00118                 read(bdtfd->getFd(), entryBuf, size);
-00119 
-00120                 rawFilter(entryBuf, size, key);
-00121 
-00122                    if (!isUnicode())
-00123                         RawStr::preptext(entryBuf);
-00124         }
-00125         else {
-00126                 entryBuf = new char [2];
-00127                 entryBuf[0] = 0;
-00128                 entryBuf[1] = 0;
-00129                 entrySize = 0;
-00130         }
-00131 
-00132         if (key != this->key) // free our key if we created a VerseKey
-00133                 delete key;
-00134 
-00135         return entryBuf;
-00136 }
-00137 
-00138 
-00139 
-00140 #ifdef _MSC_VER
-00141 SWModule &RawGenBook::operator =(SW_POSITION p) {
-00142 #else
-00143 RawGenBook &RawGenBook::operator =(SW_POSITION p) {
-00144 #endif
-00145         SWModule::operator =(p);
-00146         return *this;
-00147 }
-00148 
-00149 SWModule &RawGenBook::setentry(const char *inbuf, long len) {
-00150 
-00151         __u32 offset = archtosword32(lseek(bdtfd->getFd(), 0, SEEK_END));
-00152         __u32 size = 0;
-00153         TreeKeyIdx *key = ((TreeKeyIdx *)this->key);
-00154 
-00155         char userData[8];
-00156 
-00157         if (!len)
-00158                 len = strlen(inbuf);
-00159 
-00160         write(bdtfd->getFd(), inbuf, len);
-00161 
-00162         size = archtosword32(len);
-00163         memcpy(userData, &offset, 4);
-00164         memcpy(userData+4, &size, 4);
-00165         key->setUserData(userData, 8);
-00166         key->save();
-00167 
-00168         return *this;
-00169 }
-00170 
-00171 SWModule &RawGenBook::operator <<(const char *inbuf) {
-00172         return setentry(inbuf, 0);
-00173 }
-00174 
-00175 
-00176 SWModule &RawGenBook::operator <<(const SWKey *inkey) {
-00177         TreeKeyIdx *srckey = 0;
-00178         TreeKeyIdx *key = ((TreeKeyIdx *)this->key);
-00179         // see if we have a VerseKey * or decendant
-00180 #ifndef _WIN32_WCE
-00181         try {
-00182 #endif
-00183                 srckey = SWDYNAMIC_CAST(TreeKeyIdx, inkey);
-00184 #ifndef _WIN32_WCE
-00185         }
-00186         catch ( ... ) {}
-00187 #endif
-00188         // if we don't have a VerseKey * decendant, create our own
-00189         if (!srckey) {
-00190                 srckey = (TreeKeyIdx *)CreateKey();
-00191                 (*srckey) = *inkey;
-00192         }
-00193 
-00194         key->setUserData(srckey->getUserData(), 8);
-00195         key->save();
-00196 
-00197         if (inkey != srckey) // free our key if we created a VerseKey
-00198                 delete srckey;
-00199 
-00200         return *this;
-00201 }
-00202 
-00203 
-00204 /******************************************************************************
-00205  * RawGenBook::deleteEntry      - deletes this entry
-00206  *
-00207  * RET: *this
-00208  */
-00209 
-00210 void RawGenBook::deleteEntry() {
-00211         TreeKeyIdx *key = ((TreeKeyIdx *)this->key);
-00212         key->remove();
-00213 }
-00214 
-00215 
-00216 char RawGenBook::createModule(const char *ipath) {
-00217         char *path = 0;
-00218         char *buf = new char [ strlen (ipath) + 20 ];
-00219         FileDesc *fd;
-00220         signed char retval;
-00221 
-00222         stdstr(&path, ipath);
-00223 
-00224         if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\'))
-00225                 path[strlen(path)-1] = 0;
-00226 
-00227         sprintf(buf, "%s.bdt", path);
-00228         unlink(buf);
-00229         fd = FileMgr::systemFileMgr.open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-00230         fd->getFd();
-00231         FileMgr::systemFileMgr.close(fd);
-00232 
-00233         retval = TreeKeyIdx::create(path);
-00234         delete [] path;
-00235         return retval;  
-00236 }
-00237 
-00238 
-00239 SWKey *RawGenBook::CreateKey() {
-00240         TreeKeyIdx *newKey = new TreeKeyIdx(path);
-00241         return newKey;
-00242 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rawgenbook_8h-source.html b/doc/api-documentation/html/rawgenbook_8h-source.html deleted file mode 100644 index e050f22..0000000 --- a/doc/api-documentation/html/rawgenbook_8h-source.html +++ /dev/null @@ -1,73 +0,0 @@ - - -rawgenbook.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rawgenbook.h

00001 /******************************************************************************
-00002  *  rawtext.h   - code for class 'RawText'- a module that reads raw text files:
-00003  *                ot and nt using indexs ??.bks ??.cps ??.vss
-00004  *
-00005  * $Id: rawgenbook_8h-source.html,v 1.3 2002/06/20 20:23:09 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #ifndef RAWGENBOOK_H
-00024 #define RAWGENBOOK_H
-00025 
-00026 #include <swgenbook.h>
-00027 #include <filemgr.h>
-00028 
-00029 #include <defs.h>
-00030 
-00031 class SWDLLEXPORT RawGenBook:public SWGenBook {
-00032         char *entryBuf;
-00033         char *path;
-00034         FileDesc *bdtfd;
-00035 
-00036 public:
-00037   
-00038     
-00039         RawGenBook (const char *ipath, const char *iname = 0, const char *idesc = 0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0);
-00040         virtual ~ RawGenBook ();
-00041         virtual char *getRawEntry ();
-00042 #ifdef _MSC_VER
-00043         virtual SWModule & operator = (SW_POSITION);
-00044 #else
-00045         virtual RawGenBook & operator = (SW_POSITION);
-00046 #endif
-00047         // write interface ----------------------------
-00048         virtual bool isWritable () { return ((bdtfd->getFd() > 0) && ((bdtfd->mode & O_RDWR) == O_RDWR)); }
-00049         static char createModule (const char *ipath);
-00050         virtual SWModule & setentry (const char *inbuf, long len);      // Modify current module entry
-00051         virtual SWModule & operator << (const char *inbuf);     // Modify current module entry
-00052         virtual SWModule & operator << (const SWKey * linkKey); // Link current module entry to other module entry
-00053         virtual void deleteEntry ();    // Delete current module entry
-00054         virtual SWKey *CreateKey ();
-00055         // end write interface ------------------------
-00056 };
-00057 
-00058 
-00059 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rawld4_8cpp-source.html b/doc/api-documentation/html/rawld4_8cpp-source.html deleted file mode 100644 index 45f9e9e..0000000 --- a/doc/api-documentation/html/rawld4_8cpp-source.html +++ /dev/null @@ -1,218 +0,0 @@ - - -rawld4.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rawld4.cpp

00001 /******************************************************************************
-00002  *  rawld.cpp - code for class 'RawLD'- a module that reads raw lexicon and
-00003  *                              dictionary files: *.dat *.idx
-00004  */
-00005 
-00006 
-00007 #include <ctype.h>
-00008 #include <stdio.h>
-00009 #include <fcntl.h>
-00010 
-00011 #ifndef __GNUC__
-00012 #include <io.h>
-00013 #else
-00014 #include <unistd.h>
-00015 #endif
-00016 
-00017 #include <string.h>
-00018 #include <utilfuns.h>
-00019 #include <rawstr4.h>
-00020 #include <rawld4.h>
-00021 
-00022 
-00023  /******************************************************************************
-00024  * RawLD Constructor - Initializes data for instance of RawLD
-00025  *
-00026  * ENT: ipath   - path and filename of files (no extension)
-00027  *              iname   - Internal name for module
-00028  *              idesc   - Name to display to user for module
-00029  *              idisp   - Display object to use for displaying
-00030  */
-00031 
-00032 RawLD4::RawLD4(const char *ipath, const char *iname, const char *idesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang) : RawStr4(ipath), SWLD(iname, idesc, idisp, enc, dir, mark, ilang)
-00033 {
-00034 }
-00035 
-00036 
-00037 /******************************************************************************
-00038  * RawLD Destructor - Cleans up instance of RawLD
-00039  */
-00040 
-00041 RawLD4::~RawLD4()
-00042 {
-00043 }
-00044 
-00045 
-00046 /******************************************************************************
-00047  * RawLD4::strongsPad   - Pads a key if it is 100% digits to 5 places
-00048  *
-00049  * ENT: buf -   buffer to check and pad
-00050  */
-00051 
-00052 void RawLD4::strongsPad(char *buf)
-00053 {
-00054         const char *check;
-00055         long size = 0;
-00056         int len = strlen(buf);
-00057         if ((len < 5) && (len > 0)) {
-00058                 for (check = buf; *check; check++) {
-00059                         if (!isdigit(*check))
-00060                                 break;
-00061                         else size++;
-00062                 }
-00063 
-00064                 if ((size == len) && size) 
-00065                         sprintf(buf, "%.5d", atoi(buf));
-00066         }
-00067 }
-00068 
-00069 
-00070 /******************************************************************************
-00071  * RawLD4::getEntry     - Looks up entry from data file.  'Snaps' to closest
-00072  *                              entry and sets 'entrybuf'.
-00073  *
-00074  * ENT: away - number of entries offset from key (default = 0)
-00075  *
-00076  * RET: error status
-00077  */
-00078 
-00079 char RawLD4::getEntry(long away)
-00080 {
-00081         long  start = 0;
-00082         unsigned long size = 0;
-00083         char *idxbuf = 0;
-00084         char retval = 0;
-00085 
-00086         char *buf = new char [ strlen(*key) + 6 ];
-00087         strcpy(buf, *key);
-00088 
-00089         strongsPad(buf);
-00090 
-00091         *entrybuf = 0;
-00092         if (!(retval = findoffset(buf, &start, &size, away))) {
-00093                 entrySize = size;        // support getEntrySize call
-00094                 if (entrybuf)
-00095                         delete [] entrybuf;
-00096                 entrybuf = new char [ ++size * FILTERPAD ];
-00097                 idxbuf   = new char [ size * FILTERPAD ];
-00098 
-00099                 gettext(start, size, idxbuf, entrybuf);
-00100                 if (!key->Persist())                    // If we have our own key
-00101                         *key = idxbuf;                          // reset it to entry index buffer
-00102 
-00103                 stdstr(&entkeytxt, idxbuf);     // set entry key text that module 'snapped' to.
-00104                 delete [] idxbuf;
-00105         }
-00106         else {
-00107                 entrybuf = new char [ 5 ];
-00108                 *entrybuf = 0;
-00109         }
-00110                 
-00111         delete [] buf;
-00112         return retval;
-00113 }
-00114 
-00115 
-00116 /******************************************************************************
-00117  * RawLD4::operator char *      - Returns the correct entry when char * cast
-00118  *                                                      is requested
-00119  *
-00120  * RET: string buffer with entry
-00121  */
-00122 
-00123 char *RawLD4::getRawEntry() {
-00124         if (!getEntry() && !isUnicode()) {
-00125                 preptext(entrybuf);
-00126         }
-00127 
-00128         return entrybuf;
-00129 }
-00130 
-00131 
-00132 /******************************************************************************
-00133  * RawLD4::operator +=  - Increments module key a number of entries
-00134  *
-00135  * ENT: increment       - Number of entries to jump forward
-00136  *
-00137  * RET: *this
-00138  */
-00139 
-00140 SWModule &RawLD4::operator +=(int increment)
-00141 {
-00142         char tmperror;
-00143 
-00144         if (key->Traversable()) {
-00145                 *key += increment;
-00146                 error = key->Error();
-00147                 increment = 0;
-00148         }
-00149         
-00150         tmperror = (getEntry(increment)) ? KEYERR_OUTOFBOUNDS : 0;
-00151         error = (error)?error:tmperror;
-00152         *key = entkeytxt;
-00153         return *this;
-00154 }
-00155 
-00156 
-00157 /******************************************************************************
-00158  * RawLD4::operator =(SW_POSITION)      - Positions this key if applicable
-00159  */
-00160 
-00161 SWModule &RawLD4::operator =(SW_POSITION p)
-00162 {
-00163         if (!key->Traversable()) {
-00164                 switch (p) {
-00165                 case POS_TOP:
-00166                         *key = "";
-00167                         break;
-00168                 case POS_BOTTOM:
-00169                         *key = "zzzzzzzzz";
-00170                         break;
-00171                 } 
-00172         }
-00173         else    *key = p;
-00174         return *this;
-00175 }
-00176 
-00177 
-00178 SWModule &RawLD4::setentry(const char *inbuf, long len) {
-00179         settext(*key, inbuf, len);
-00180 
-00181         return *this;
-00182 }
-00183 
-00184 SWModule &RawLD4::operator <<(const char *inbuf) {
-00185         return setentry(inbuf, 0);
-00186 }
-00187 
-00188 
-00189 SWModule &RawLD4::operator <<(const SWKey *inkey) {
-00190         linkentry(*key, *inkey);
-00191 
-00192         return *this;
-00193 }
-00194 
-00195 
-00196 /******************************************************************************
-00197  * RawFiles::deleteEntry        - deletes this entry
-00198  *
-00199  * RET: *this
-00200  */
-00201 
-00202 void RawLD4::deleteEntry() {
-00203         settext(*key, "");
-00204 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rawld4_8h-source.html b/doc/api-documentation/html/rawld4_8h-source.html deleted file mode 100644 index f06f0da..0000000 --- a/doc/api-documentation/html/rawld4_8h-source.html +++ /dev/null @@ -1,78 +0,0 @@ - - -rawld4.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rawld4.h

00001 /******************************************************************************
-00002  *  rawld.cpp - code for class 'RawLD'- a module that reads raw lexicon and
-00003  *                              dictionary files: *.dat *.idx
-00004  *
-00005  * $Id: rawld4_8h-source.html,v 1.7 2002/06/20 20:23:09 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #ifndef RAWLD4_H
-00024 #define RAWLD4_H
-00025 
-00026 #include <rawstr4.h>
-00027 #include <swld.h>
-00028 
-00029 #include <defs.h>
-00030 
-00031 class SWDLLEXPORT RawLD4:public RawStr4, public SWLD
-00032 {
-00033   void strongsPad (char *buf);
-00034   char getEntry (long away = 0);
-00035 
-00036 public:
-00037   
-00038     
-00039     RawLD4(const char *ipath, const char *iname = 0, const char *idesc =
-00040            0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN,
-00041            const char* ilang = 0);
-00042     virtual ~RawLD4();
-00043   virtual char *getRawEntry();
-00044 
-00045   virtual SWModule & operator =(SW_POSITION pos);
-00046   virtual SWModule & operator +=(int increment);
-00047   virtual SWModule & operator -=(int decrement) {
-00048     return this->operator +=(-decrement);
-00049   }
-00050   // write interface ----------------------------
-00051         virtual bool isWritable () { return ((idxfd->getFd() > 0) && ((idxfd->mode & O_RDWR) == O_RDWR)); }
-00052         static char createModule (const char *path) {
-00053                 return RawStr4::createModule (path);
-00054         }
-00055 
-00056   virtual SWModule & setentry (const char *inbuf, long len);    // Modify current module entry
-00057   virtual SWModule & operator << (const char *inbuf);   // Modify current module entry
-00058   virtual SWModule & operator << (const SWKey * linkKey);       // Link current module entry to other module entry
-00059   virtual void deleteEntry ();  // Delete current module entry
-00060   // end write interface ------------------------
-00061 };
-00062 
-00063 
-00064 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rawld_8cpp-source.html b/doc/api-documentation/html/rawld_8cpp-source.html deleted file mode 100644 index 9f0e93c..0000000 --- a/doc/api-documentation/html/rawld_8cpp-source.html +++ /dev/null @@ -1,218 +0,0 @@ - - -rawld.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rawld.cpp

00001 /******************************************************************************
-00002  *  rawld.cpp - code for class 'RawLD'- a module that reads raw lexicon and
-00003  *                              dictionary files: *.dat *.idx
-00004  */
-00005 
-00006 
-00007 #include <ctype.h>
-00008 #include <stdio.h>
-00009 #include <fcntl.h>
-00010 
-00011 #ifndef __GNUC__
-00012 #include <io.h>
-00013 #else
-00014 #include <unistd.h>
-00015 #endif
-00016 
-00017 #include <string.h>
-00018 #include <utilfuns.h>
-00019 #include <rawstr.h>
-00020 #include <rawld.h>
-00021 
-00022 
-00023  /******************************************************************************
-00024  * RawLD Constructor - Initializes data for instance of RawLD
-00025  *
-00026  * ENT: ipath   - path and filename of files (no extension)
-00027  *              iname   - Internal name for module
-00028  *              idesc   - Name to display to user for module
-00029  *              idisp   - Display object to use for displaying
-00030  */
-00031 
-00032 RawLD::RawLD(const char *ipath, const char *iname, const char *idesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang) : RawStr(ipath), SWLD(iname, idesc, idisp, enc, dir, mark, ilang)
-00033 {
-00034 }
-00035 
-00036 
-00037 /******************************************************************************
-00038  * RawLD Destructor - Cleans up instance of RawLD
-00039  */
-00040 
-00041 RawLD::~RawLD()
-00042 {
-00043 }
-00044 
-00045 
-00046 /******************************************************************************
-00047  * RawLD::strongsPad    - Pads a key if it is 100% digits to 5 places
-00048  *
-00049  * ENT: buf -   buffer to check and pad
-00050  */
-00051 
-00052 void RawLD::strongsPad(char *buf)
-00053 {
-00054         const char *check;
-00055         int size = 0;
-00056         int len = strlen(buf);
-00057         if ((len < 5) && (len > 0)) {
-00058                 for (check = buf; *check; check++) {
-00059                         if (!isdigit(*check))
-00060                                 break;
-00061                         else size++;
-00062                 }
-00063 
-00064                 if ((size == len) && size) 
-00065                         sprintf(buf, "%.5d", atoi(buf));
-00066         }
-00067 }
-00068 
-00069 
-00070 /******************************************************************************
-00071  * RawLD::getEntry      - Looks up entry from data file.  'Snaps' to closest
-00072  *                              entry and sets 'entrybuf'.
-00073  *
-00074  * ENT: away - number of entries offset from key (default = 0)
-00075  *
-00076  * RET: error status
-00077  */
-00078 
-00079 char RawLD::getEntry(long away)
-00080 {
-00081         long  start = 0;
-00082         unsigned short size = 0;
-00083         char *idxbuf = 0;
-00084         char retval = 0;
-00085 
-00086         char *buf = new char [ strlen(*key) + 6 ];
-00087         strcpy(buf, *key);
-00088 
-00089         strongsPad(buf);
-00090 
-00091         *entrybuf = 0;
-00092         if (!(retval = findoffset(buf, &start, &size, away))) {
-00093                 entrySize = size;        // support getEntrySize call
-00094                 if (entrybuf)
-00095                         delete [] entrybuf;
-00096                 entrybuf = new char [ ++size * FILTERPAD ];
-00097                 idxbuf   = new char [ size * FILTERPAD ];
-00098 
-00099                 gettext(start, size + 1, idxbuf, entrybuf);
-00100                 if (!key->Persist())                    // If we have our own key
-00101                         *key = idxbuf;                          // reset it to entry index buffer
-00102 
-00103                 stdstr(&entkeytxt, idxbuf);     // set entry key text that module 'snapped' to.
-00104                 delete [] idxbuf;
-00105         }
-00106         else {
-00107                 entrybuf = new char [ 5 ];
-00108                 *entrybuf = 0;
-00109         }
-00110                 
-00111         delete [] buf;
-00112         return retval;
-00113 }
-00114 
-00115 
-00116 /******************************************************************************
-00117  * RawLD::operator char *       - Returns the correct entry when char * cast
-00118  *                                                      is requested
-00119  *
-00120  * RET: string buffer with entry
-00121  */
-00122 
-00123 char *RawLD::getRawEntry() {
-00124         if (!getEntry() && !isUnicode()) {
-00125                 preptext(entrybuf);
-00126         }
-00127 
-00128         return entrybuf;
-00129 }
-00130 
-00131 
-00132 /******************************************************************************
-00133  * RawLD::operator +=   - Increments module key a number of entries
-00134  *
-00135  * ENT: increment       - Number of entries to jump forward
-00136  *
-00137  * RET: *this
-00138  */
-00139 
-00140 SWModule &RawLD::operator +=(int increment)
-00141 {
-00142         char tmperror;
-00143 
-00144         if (key->Traversable()) {
-00145                 *key += increment;
-00146                 error = key->Error();
-00147                 increment = 0;
-00148         }
-00149         
-00150         tmperror = (getEntry(increment)) ? KEYERR_OUTOFBOUNDS : 0;
-00151         error = (error)?error:tmperror;
-00152         *key = entkeytxt;
-00153         return *this;
-00154 }
-00155 
-00156 
-00157 /******************************************************************************
-00158  * RawLD::operator =(SW_POSITION)       - Positions this key if applicable
-00159  */
-00160 
-00161 SWModule &RawLD::operator =(SW_POSITION p)
-00162 {
-00163         if (!key->Traversable()) {
-00164                 switch (p) {
-00165                 case POS_TOP:
-00166                         *key = "";
-00167                         break;
-00168                 case POS_BOTTOM:
-00169                         *key = "zzzzzzzzz";
-00170                         break;
-00171                 } 
-00172         }
-00173         else    *key = p;
-00174         return *this;
-00175 }
-00176 
-00177 
-00178 SWModule &RawLD::setentry(const char *inbuf, long len) {
-00179         settext(*key, inbuf, len);
-00180 
-00181         return *this;
-00182 }
-00183 
-00184 SWModule &RawLD::operator <<(const char *inbuf) {
-00185         return setentry(inbuf, 0);
-00186 }
-00187 
-00188 
-00189 SWModule &RawLD::operator <<(const SWKey *inkey) {
-00190         linkentry(*key, *inkey);
-00191 
-00192         return *this;
-00193 }
-00194 
-00195 
-00196 /******************************************************************************
-00197  * RawFiles::deleteEntry        - deletes this entry
-00198  *
-00199  * RET: *this
-00200  */
-00201 
-00202 void RawLD::deleteEntry() {
-00203         settext(*key, "");
-00204 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rawld_8h-source.html b/doc/api-documentation/html/rawld_8h-source.html deleted file mode 100644 index 857fd37..0000000 --- a/doc/api-documentation/html/rawld_8h-source.html +++ /dev/null @@ -1,80 +0,0 @@ - - -rawld.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rawld.h

00001 /******************************************************************************
-00002  *  rawld.cpp - code for class 'RawLD'- a module that reads raw lexicon and
-00003  *                              dictionary files: *.dat *.idx
-00004  *
-00005  * $Id: rawld_8h-source.html,v 1.7 2002/06/20 20:23:09 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #ifndef RAWLD_H
-00024 #define RAWLD_H
-00025 
-00026 #include <rawstr.h>
-00027 #include <swld.h>
-00028 
-00029 #include <defs.h>
-00030 
-00031 class SWDLLEXPORT RawLD:public RawStr, public SWLD
-00032 {
-00033   void strongsPad (char *buf);
-00034   char getEntry (long away = 0);
-00035 
-00036 public:
-00037   
-00038     
-00039     RawLD (const char *ipath, const char *iname = 0, const char *idesc =
-00040            0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN,
-00041            const char* ilang = 0);
-00042     virtual ~ RawLD ();
-00043   virtual char *getRawEntry ();
-00044 
-00045   virtual SWModule & operator = (SW_POSITION pos);
-00046   virtual SWModule & operator += (int increment);
-00047   virtual SWModule & operator -= (int decrement)
-00048   {
-00049     return this->operator += (-decrement);
-00050   }
-00051   // write interface ----------------------------
-00052         virtual bool isWritable () { return ((idxfd->getFd() > 0) && ((idxfd->mode & O_RDWR) == O_RDWR)); }
-00053   static char createModule (const char *path)
-00054   {
-00055     return RawStr::createModule (path);
-00056   }
-00057   
-00058   virtual SWModule & setentry (const char *inbuf, long len);    // Modify current module entry
-00059   virtual SWModule & operator << (const char *inbuf);   // Modify current module entry
-00060   virtual SWModule & operator << (const SWKey * linkKey);       // Link current module entry to other module entry
-00061   virtual void deleteEntry ();  // Delete current module entry
-00062   // end write interface ------------------------
-00063 };
-00064 
-00065 
-00066 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rawstr4_8cpp-source.html b/doc/api-documentation/html/rawstr4_8cpp-source.html deleted file mode 100644 index 2626f05..0000000 --- a/doc/api-documentation/html/rawstr4_8cpp-source.html +++ /dev/null @@ -1,576 +0,0 @@ - - -rawstr4.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rawstr4.cpp

00001 /******************************************************************************
-00002  *  rawstr.cpp   - code for class 'RawStr'- a module that reads raw text
-00003  *                              files:  ot and nt using indexs ??.bks ??.cps ??.vss
-00004  *                              and provides lookup and parsing functions based on
-00005  *                              class StrKey
-00006  */
-00007 
-00008 #include <stdio.h>
-00009 #include <fcntl.h>
-00010 #include <errno.h>
-00011 
-00012 #ifndef __GNUC__
-00013 #include <io.h>
-00014 #else
-00015 #include <unistd.h>
-00016 #endif
-00017 
-00018 #include <string.h>
-00019 #include <stdlib.h>
-00020 #include <utilfuns.h>
-00021 #include <rawstr4.h>
-00022 #include <sysdata.h>
-00023 
-00024 /******************************************************************************
-00025  * RawStr Statics
-00026  */
-00027 
-00028 int RawStr4::instance = 0;
-00029 
-00030 
-00031 /******************************************************************************
-00032  * RawStr Constructor - Initializes data for instance of RawStr
-00033  *
-00034  * ENT: ipath - path of the directory where data and index files are located.
-00035  *              be sure to include the trailing separator (e.g. '/' or '\')
-00036  *              (e.g. 'modules/texts/rawtext/webster/')
-00037  */
-00038 
-00039 RawStr4::RawStr4(const char *ipath, int fileMode)
-00040 {
-00041         char buf[127];
-00042 
-00043         nl = '\n';
-00044         lastoff = -1;
-00045         path = 0;
-00046         stdstr(&path, ipath);
-00047 
-00048 #ifndef O_BINARY                // O_BINARY is needed in Borland C++ 4.53
-00049 #define O_BINARY 0              // If it hasn't been defined than we probably
-00050 #endif                          // don't need it.
-00051 
-00052         if (fileMode == -1) { // try read/write if possible
-00053                 fileMode = O_RDWR;
-00054         }
-00055                 
-00056         sprintf(buf, "%s.idx", path);
-00057         idxfd = FileMgr::systemFileMgr.open(buf, fileMode|O_BINARY, true);
-00058 
-00059         sprintf(buf, "%s.dat", path);
-00060         datfd = FileMgr::systemFileMgr.open(buf, fileMode|O_BINARY, true);
-00061 
-00062         if (datfd < 0) {
-00063                 sprintf(buf, "Error: %d", errno);
-00064                 perror(buf);
-00065         }
-00066 
-00067         instance++;
-00068 }
-00069 
-00070 
-00071 /******************************************************************************
-00072  * RawStr Destructor - Cleans up instance of RawStr
-00073  */
-00074 
-00075 RawStr4::~RawStr4()
-00076 {
-00077         if (path)
-00078                 delete [] path;
-00079 
-00080         --instance;
-00081 
-00082         FileMgr::systemFileMgr.close(idxfd);
-00083         FileMgr::systemFileMgr.close(datfd);
-00084 }
-00085 
-00086 
-00087 /******************************************************************************
-00088  * RawStr4::getidxbufdat        - Gets the index string at the given idx offset
-00089  *                                              NOTE: buf is allocated and must be freed by
-00090  *                                                      calling function
-00091  *
-00092  * ENT: ioffset - offset in dat file to lookup
-00093  *              buf             - address of pointer to allocate for storage of string
-00094  */
-00095 
-00096 void RawStr4::getidxbufdat(long ioffset, char **buf)
-00097 {
-00098         int size;
-00099         char ch;
-00100         if (datfd > 0) {
-00101                 lseek(datfd->getFd(), ioffset, SEEK_SET);
-00102                 for (size = 0; read(datfd->getFd(), &ch, 1) == 1; size++) {
-00103                         if ((ch == '\\') || (ch == 10) || (ch == 13))
-00104                                 break;
-00105                 }
-00106                 *buf = (*buf) ? (char *)realloc(*buf, size + 1) : (char *)malloc(size + 1);
-00107                 if (size) {
-00108                         lseek(datfd->getFd(), ioffset, SEEK_SET);
-00109                         read(datfd->getFd(), *buf, size);
-00110                 }
-00111                 (*buf)[size] = 0;
-00112                 for (size--; size > 0; size--)
-00113                         (*buf)[size] = SW_toupper((*buf)[size]);
-00114         }
-00115         else {
-00116                 *buf = (*buf) ? (char *)realloc(*buf, 1) : (char *)malloc(1);
-00117                 **buf = 0;
-00118         }
-00119 }
-00120 
-00121 
-00122 /******************************************************************************
-00123  * RawStr4::getidxbuf   - Gets the index string at the given idx offset
-00124  *                                              NOTE: buf is allocated and must be freed by
-00125  *                                                      calling function
-00126  *
-00127  * ENT: ioffset - offset in idx file to lookup
-00128  *              buf             - address of pointer to allocate for storage of string
-00129  */
-00130 
-00131 void RawStr4::getidxbuf(long ioffset, char **buf)
-00132 {
-00133         char *trybuf, *targetbuf;
-00134         long offset;
-00135         
-00136         if (idxfd > 0) {
-00137                 lseek(idxfd->getFd(), ioffset, SEEK_SET);
-00138                 read(idxfd->getFd(), &offset, 4);
-00139 
-00140                 offset = swordtoarch32(offset);
-00141 
-00142                 getidxbufdat(offset, buf);
-00143                 for (trybuf = targetbuf = *buf; *trybuf; trybuf++, targetbuf++) {
-00144 /*
-00145                         if (*trybuf == '-') {           // ignore '-' because alphabetized silly in file
-00146                                 targetbuf--;
-00147                                 continue;
-00148                         }
-00149 */
-00150                         *targetbuf = SW_toupper(*trybuf);
-00151                 }
-00152                 *targetbuf = 0;
-00153                 trybuf = 0;
-00154         }
-00155 }
-00156 
-00157 
-00158 /******************************************************************************
-00159  * RawStr4::findoffset  - Finds the offset of the key string from the indexes
-00160  *
-00161  * ENT: key             - key string to lookup
-00162  *              start   - address to store the starting offset
-00163  *              size            - address to store the size of the entry
-00164  *              away            - number of entries before of after to jump
-00165  *                                      (default = 0)
-00166  *
-00167  * RET: error status
-00168  */
-00169 
-00170 signed char RawStr4::findoffset(const char *ikey, long *start, unsigned long *size, long away, long *idxoff)
-00171 {
-00172         char *trybuf, *targetbuf, *key, quitflag = 0;
-00173         signed char retval = 0;
-00174         long headoff, tailoff, tryoff = 0, maxoff = 0;
-00175 
-00176         if (idxfd->getFd() >=0) {
-00177                 if (*ikey) {
-00178                         headoff = 0;
-00179                         tailoff = maxoff = lseek(idxfd->getFd(), 0, SEEK_END) - 8;
-00180 
-00181                         key = new char [ strlen(ikey) + 1 ];
-00182                         strcpy(key, ikey);
-00183 
-00184                         for (trybuf = targetbuf = key; *trybuf; trybuf++, targetbuf++) {
-00185         /*
-00186                                 if (*trybuf == '-') {           // ignore '-' because alphabetized silly in file
-00187                                         targetbuf--;
-00188                                         continue;
-00189                                 }
-00190         */
-00191                                 *targetbuf = SW_toupper(*trybuf);
-00192                         }
-00193                         *targetbuf = 0;
-00194                         trybuf = 0;
-00195 
-00196                         while (headoff < tailoff) {
-00197                                 tryoff = (lastoff == -1) ? headoff + ((((tailoff / 8) - (headoff / 8))) / 2) * 8 : lastoff; 
-00198                                 lastoff = -1;
-00199                                 getidxbuf(tryoff, &trybuf);
-00200 
-00201                                 if (!*trybuf) {         // In case of extra entry at end of idx
-00202                                         tryoff += (tryoff > (maxoff / 2))?-8:8;
-00203                                         retval = -1;
-00204                                         break;
-00205                                 }
-00206                                         
-00207                                 if (!strcmp(key, trybuf))
-00208                                         break;
-00209 
-00210                                 int diff = strcmp(key, trybuf);
-00211                                 if (diff < 0)
-00212                                         tailoff = (tryoff == headoff) ? headoff : tryoff;
-00213                                 else headoff = tryoff;
-00214                                 if (tailoff == headoff + 8) {
-00215                                         if (quitflag++)
-00216                                                 headoff = tailoff;
-00217                                 }
-00218                         }
-00219                         if (headoff >= tailoff)
-00220                                 tryoff = headoff;
-00221                         if (trybuf)
-00222                                 free(trybuf);
-00223                         delete [] key;
-00224                 }
-00225                 else    tryoff = 0;
-00226 
-00227                 lseek(idxfd->getFd(), tryoff, SEEK_SET);
-00228 
-00229                 *start = *size = 0;
-00230                 read(idxfd->getFd(), start, 4);
-00231                 read(idxfd->getFd(), size, 4);
-00232                 if (idxoff)
-00233                         *idxoff = tryoff;
-00234 
-00235                 *start = swordtoarch32(*start);
-00236                 *size  = swordtoarch32(*size);
-00237 
-00238                 while (away) {
-00239                         long laststart = *start;
-00240                         unsigned long lastsize = *size;
-00241                         long lasttry = tryoff;
-00242                         tryoff += (away > 0) ? 8 : -8;
-00243 
-00244                         bool bad = false;
-00245                         if (((tryoff + (away*8)) < -8) || (tryoff + (away*8) > (maxoff+8)))
-00246                                 bad = true;
-00247                         else if (lseek(idxfd->getFd(), tryoff, SEEK_SET) < 0)
-00248                                 bad = true;
-00249                         if (bad) {
-00250                                 retval = -1;
-00251                                 *start = laststart;
-00252                                 *size = lastsize;
-00253                                 tryoff = lasttry;
-00254                                 if (idxoff)
-00255                                         *idxoff = tryoff;
-00256                                 break;
-00257                         }
-00258                         read(idxfd->getFd(), start, 4);
-00259                         read(idxfd->getFd(), size, 4);
-00260                         if (idxoff)
-00261                                 *idxoff = tryoff;
-00262 
-00263                         *start = swordtoarch32(*start);
-00264                         *size  = swordtoarch32(*size);
-00265 
-00266                         if (((laststart != *start) || (lastsize != *size)) && (*start >= 0) && (*size)) 
-00267                                 away += (away < 0) ? 1 : -1;
-00268                 }
-00269         
-00270                 lastoff = tryoff;
-00271         }
-00272         else {
-00273                 *start = 0;
-00274                 *size  = 0;
-00275                 if (idxoff)
-00276                         *idxoff = 0;
-00277                 retval = -1;
-00278         }
-00279         return retval;
-00280 }
-00281 
-00282 
-00283 /******************************************************************************
-00284  * RawStr4::preptext    - Prepares the text before returning it to external
-00285  *                                      objects
-00286  *
-00287  * ENT: buf     - buffer where text is stored and where to store the prep'd
-00288  *                              text.
-00289  */
-00290 
-00291 void RawStr4::preptext(char *buf)
-00292 {
-00293         char *to, *from, space = 0, cr = 0, realdata = 0, nlcnt = 0;
-00294 
-00295         for (to = from = buf; *from; from++) {
-00296                 switch (*from) {
-00297                 case 10:
-00298                         if (!realdata)
-00299                                 continue;
-00300                         space = (cr) ? 0 : 1;
-00301                         cr = 0;
-00302                         nlcnt++;
-00303                         if (nlcnt > 1) {
-00304 //                              *to++ = nl;
-00305                                 *to++ = nl;
-00306 //                              nlcnt = 0;
-00307                         }
-00308                         continue;
-00309                 case 13:
-00310                         if (!realdata)
-00311                                 continue;
-00312                         *to++ = nl;
-00313                         space = 0;
-00314                         cr = 1;
-00315                         continue;
-00316                 }
-00317                 realdata = 1;
-00318                 nlcnt = 0;
-00319                 if (space) {
-00320                         space = 0;
-00321                         if (*from != ' ') {
-00322                                 *to++ = ' ';
-00323                                 from--;
-00324                                 continue;
-00325                         }
-00326                 }
-00327                 *to++ = *from;
-00328         }
-00329         *to = 0;
-00330 
-00331         while (to > (buf+1)) {                  // remove trailing excess
-00332                 to--;
-00333                 if ((*to == 10) || (*to == ' '))
-00334                         *to = 0;
-00335                 else break;
-00336         }
-00337 }
-00338 
-00339 
-00340 /******************************************************************************
-00341  * RawStr4::gettext     - gets text at a given offset
-00342  *
-00343  * ENT:
-00344  *      start   - starting offset where the text is located in the file
-00345  *      size            - size of text entry
-00346  *      buf             - buffer to store text
-00347  *
-00348  */
-00349 
-00350 void RawStr4::gettext(long istart, unsigned long isize, char *idxbuf, char *buf)
-00351 {
-00352         char *ch;
-00353         char *idxbuflocal = 0;
-00354         getidxbufdat(istart, &idxbuflocal);
-00355         long start = istart;
-00356         unsigned long size = isize;
-00357 
-00358         do {
-00359                 memset(buf, 0, size);
-00360                 lseek(datfd->getFd(), start, SEEK_SET);
-00361                 read(datfd->getFd(), buf, (int)(size - 1));
-00362 
-00363                 for (ch = buf; *ch; ch++) {             // skip over index string
-00364                         if (*ch == 10) {
-00365                                 ch++;
-00366                                 break;
-00367                         }
-00368                 }
-00369                 memmove(buf, ch, size - (unsigned long)(ch-buf));
-00370 
-00371                 // resolve link
-00372                 if (!strncmp(buf, "@LINK", 5)) {
-00373                         for (ch = buf; *ch; ch++) {             // null before nl
-00374                                 if (*ch == 10) {
-00375                                         *ch = 0;
-00376                                         break;
-00377                                 }
-00378                         }
-00379                         findoffset(buf + 8, &start, &size);
-00380                 }
-00381                 else break;
-00382         }
-00383         while (true);   // while we're resolving links
-00384 
-00385         if (idxbuflocal) {
-00386                 int localsize = strlen(idxbuflocal);
-00387                 localsize = (localsize < (size - 1)) ? localsize : (size - 1);
-00388                 strncpy(idxbuf, idxbuflocal, localsize);
-00389                 idxbuf[localsize] = 0;
-00390                 free(idxbuflocal);
-00391         }
-00392 }
-00393 
-00394 
-00395 /******************************************************************************
-00396  * RawLD::settext       - Sets text for current offset
-00397  *
-00398  * ENT: key     - key for this entry
-00399  *      buf     - buffer to store
-00400  *      len     - length of buffer (0 - null terminated)
-00401  */
-00402 
-00403 void RawStr4::settext(const char *ikey, const char *buf, long len)
-00404 {
-00405 
-00406         long start, outstart;
-00407         long idxoff;
-00408         long endoff;
-00409         long shiftSize;
-00410         unsigned long size;
-00411         unsigned long outsize;
-00412         static const char nl[] = {13, 10};
-00413         char *tmpbuf = 0;
-00414         char *key = 0;
-00415         char *dbKey = 0;
-00416         char *idxBytes = 0;
-00417         char *outbuf = 0;
-00418         char *ch = 0;
-00419 
-00420         findoffset(ikey, &start, &size, 0, &idxoff);
-00421         stdstr(&key, ikey);
-00422         for (ch = key; *ch; ch++)
-00423                 *ch = SW_toupper(*ch);
-00424         ch = 0;
-00425 
-00426         getidxbufdat(start, &dbKey);
-00427 
-00428         if (strcmp(key, dbKey) < 0) {
-00429         }
-00430         else if (strcmp(key, dbKey) > 0) {
-00431                 idxoff += 8;
-00432         } else if ((!strcmp(key, dbKey)) && (len || strlen(buf) /*we're not deleting*/)) { // got absolute entry
-00433                 do {
-00434                         tmpbuf = new char [ size + 2 ];
-00435                         memset(tmpbuf, 0, size + 2);
-00436                         lseek(datfd->getFd(), start, SEEK_SET);
-00437                         read(datfd->getFd(), tmpbuf, (int)(size - 1));
-00438 
-00439                         for (ch = tmpbuf; *ch; ch++) {          // skip over index string
-00440                                 if (*ch == 10) {
-00441                                         ch++;
-00442                                         break;
-00443                                 }
-00444                         }
-00445                         memmove(tmpbuf, ch, size - (unsigned long)(ch-tmpbuf));
-00446 
-00447                         // resolve link
-00448                         if (!strncmp(tmpbuf, "@LINK", 5) && (len ? len : strlen(buf))) {
-00449                                 for (ch = tmpbuf; *ch; ch++) {          // null before nl
-00450                                         if (*ch == 10) {
-00451                                                 *ch = 0;
-00452                                                 break;
-00453                                         }
-00454                                 }
-00455                                 findoffset(tmpbuf + 8, &start, &size, 0, &idxoff);
-00456                         }
-00457                         else break;
-00458                 }
-00459                 while (true);   // while we're resolving links
-00460         }
-00461 
-00462         endoff = lseek(idxfd->getFd(), 0, SEEK_END);
-00463 
-00464         shiftSize = endoff - idxoff;
-00465 
-00466         if (shiftSize > 0) {
-00467                 idxBytes = new char [ shiftSize ];
-00468                 lseek(idxfd->getFd(), idxoff, SEEK_SET);
-00469                 read(idxfd->getFd(), idxBytes, shiftSize);
-00470         }
-00471 
-00472         outbuf = new char [ (len ? len : strlen(buf)) + strlen(key) + 5 ];
-00473         sprintf(outbuf, "%s%c%c", key, 13, 10);
-00474         size = strlen(outbuf);
-00475         memcpy (outbuf + size, buf, len ? len : strlen(buf));
-00476         size = outsize = size + (len ? len : strlen(buf));
-00477 
-00478         start = outstart = lseek(datfd->getFd(), 0, SEEK_END);
-00479 
-00480         outstart = archtosword32(start);
-00481         outsize  = archtosword32(size);
-00482 
-00483         lseek(idxfd->getFd(), idxoff, SEEK_SET);
-00484         if (len ? len : strlen(buf)) {
-00485                 lseek(datfd->getFd(), start, SEEK_SET);
-00486                 write(datfd->getFd(), outbuf, (long)size);
-00487 
-00488                 // add a new line to make data file easier to read in an editor
-00489                 write(datfd->getFd(), &nl, 2);
-00490                 
-00491                 write(idxfd->getFd(), &outstart, 4);
-00492                 write(idxfd->getFd(), &outsize, 4);
-00493                 if (idxBytes) {
-00494                         write(idxfd->getFd(), idxBytes, shiftSize);
-00495                         delete [] idxBytes;
-00496                 }
-00497         }
-00498         else {  // delete entry
-00499                 if (idxBytes) {
-00500                         write(idxfd->getFd(), idxBytes+8, shiftSize-8);
-00501                         lseek(idxfd->getFd(), -1, SEEK_CUR);    // last valid byte
-00502                         FileMgr::systemFileMgr.trunc(idxfd);    // truncate index
-00503                         delete [] idxBytes;
-00504                 }
-00505         }
-00506 
-00507         delete [] key;
-00508         delete [] outbuf;
-00509         free(dbKey);
-00510 }
-00511 
-00512 
-00513 /******************************************************************************
-00514  * RawLD::linkentry     - links one entry to another
-00515  *
-00516  * ENT: testmt  - testament to find (0 - Bible/module introduction)
-00517  *      destidxoff      - dest offset into .vss
-00518  *      srcidxoff               - source offset into .vss
-00519  */
-00520 
-00521 void RawStr4::linkentry(const char *destkey, const char *srckey) {
-00522         char *text = new char [ strlen(destkey) + 7 ];
-00523         sprintf(text, "@LINK %s", destkey);
-00524         settext(srckey, text);
-00525         delete [] text;
-00526 }
-00527 
-00528 
-00529 /******************************************************************************
-00530  * RawLD::CreateModule  - Creates new module files
-00531  *
-00532  * ENT: path    - directory to store module files
-00533  * RET: error status
-00534  */
-00535 
-00536 signed char RawStr4::createModule(const char *ipath)
-00537 {
-00538         char *path = 0;
-00539         char *buf = new char [ strlen (ipath) + 20 ];
-00540         FileDesc *fd, *fd2;
-00541 
-00542         stdstr(&path, ipath);
-00543 
-00544         if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\'))
-00545                 path[strlen(path)-1] = 0;
-00546 
-00547         sprintf(buf, "%s.dat", path);
-00548         unlink(buf);
-00549         fd = FileMgr::systemFileMgr.open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-00550         fd->getFd();
-00551         FileMgr::systemFileMgr.close(fd);
-00552 
-00553         sprintf(buf, "%s.idx", path);
-00554         unlink(buf);
-00555         fd2 = FileMgr::systemFileMgr.open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-00556         fd2->getFd();
-00557         FileMgr::systemFileMgr.close(fd2);
-00558 
-00559         delete [] path;
-00560         
-00561         return 0;
-00562 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rawstr4_8h-source.html b/doc/api-documentation/html/rawstr4_8h-source.html deleted file mode 100644 index df8bf4e..0000000 --- a/doc/api-documentation/html/rawstr4_8h-source.html +++ /dev/null @@ -1,70 +0,0 @@ - - -rawstr4.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rawstr4.h

00001 /*****************************************************************************
-00002  * rawstr.h   - code for class 'RawStr'- a module that reads raw text
-00003  *                      files:  ot and nt using indexs ??.bks ??.cps ??.vss
-00004  *                      and provides lookup and parsing functions based on
-00005  *                      class StrKey
-00006  *
-00007  * $Id: rawstr4_8h-source.html,v 1.7 2002/06/20 20:23:09 mgruner Exp $
-00008  *
-00009  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00010  *      CrossWire Bible Society
-00011  *      P. O. Box 2528
-00012  *      Tempe, AZ  85280-2528
-00013  *
-00014  * This program is free software; you can redistribute it and/or modify it
-00015  * under the terms of the GNU General Public License as published by the
-00016  * Free Software Foundation version 2.
-00017  *
-00018  * This program is distributed in the hope that it will be useful, but
-00019  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00021  * General Public License for more details.
-00022  *
-00023  */
-00024 
-00025 #ifndef RAWSTR4_H
-00026 #define RAWSTR4_H
-00027 
-00028 #include <filemgr.h>
-00029 
-00030 #include <defs.h>
-00031 
-00032 class SWDLLEXPORT RawStr4
-00033 {
-00034   static int instance;          // number of instantiated RawStr4 objects or derivitives
-00035   char *path;
-00036   long lastoff;
-00037 
-00038 protected:
-00039   FileDesc *idxfd;
-00040   FileDesc *datfd;
-00041   void preptext (char *buf);
-00042   void settext (const char *key, const char *buf, long len = 0);
-00043   void linkentry (const char *destkey, const char *srckey);
-00044 public:
-00045   char nl;
-00046     RawStr4(const char *ipath, int fileMode = -1);
-00047     virtual ~ RawStr4();
-00048   void getidxbuf (long ioffset, char **buf);
-00049   void getidxbufdat (long ioffset, char **buf);
-00050   signed char findoffset (const char *key, long *start, unsigned long *size,
-00051                    long away = 0, long *idxoff = 0);
-00052   void gettext (long start, unsigned long size, char *idxbuf, char *buf);
-00053   static signed char createModule (const char *path);
-00054 };
-00055 
-00056 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rawstr_8cpp-source.html b/doc/api-documentation/html/rawstr_8cpp-source.html deleted file mode 100644 index 16d7bd3..0000000 --- a/doc/api-documentation/html/rawstr_8cpp-source.html +++ /dev/null @@ -1,579 +0,0 @@ - - -rawstr.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rawstr.cpp

00001 /******************************************************************************
-00002  *  rawstr.cpp   - code for class 'RawStr'- a module that reads raw text
-00003  *                              files:  ot and nt using indexs ??.bks ??.cps ??.vss
-00004  *                              and provides lookup and parsing functions based on
-00005  *                              class StrKey
-00006  */
-00007 
-00008 
-00009 #include <stdio.h>
-00010 #include <fcntl.h>
-00011 #include <errno.h>
-00012 
-00013 #ifndef __GNUC__
-00014 #include <io.h>
-00015 #else
-00016 #include <unistd.h>
-00017 #endif
-00018 
-00019 #include <string.h>
-00020 #include <stdlib.h>
-00021 #include <utilfuns.h>
-00022 #include <rawstr.h>
-00023 #include <sysdata.h>
-00024 /******************************************************************************
-00025  * RawStr Statics
-00026  */
-00027 
-00028 int RawStr::instance = 0;
-00029 char RawStr::nl = '\n';
-00030 
-00031 
-00032 /******************************************************************************
-00033  * RawStr Constructor - Initializes data for instance of RawStr
-00034  *
-00035  * ENT: ipath - path of the directory where data and index files are located.
-00036  *              be sure to include the trailing separator (e.g. '/' or '\')
-00037  *              (e.g. 'modules/texts/rawtext/webster/')
-00038  */
-00039 
-00040 RawStr::RawStr(const char *ipath, int fileMode)
-00041 {
-00042         char buf[127];
-00043 
-00044         lastoff = -1;
-00045         path = 0;
-00046         stdstr(&path, ipath);
-00047 
-00048 #ifndef O_BINARY                // O_BINARY is needed in Borland C++ 4.53
-00049 #define O_BINARY 0              // If it hasn't been defined than we probably
-00050 #endif                          // don't need it.
-00051 
-00052         if (fileMode == -1) { // try read/write if possible
-00053                 fileMode = O_RDWR;
-00054         }
-00055                 
-00056         sprintf(buf, "%s.idx", path);
-00057         idxfd = FileMgr::systemFileMgr.open(buf, fileMode|O_BINARY, true);
-00058 
-00059         sprintf(buf, "%s.dat", path);
-00060         datfd = FileMgr::systemFileMgr.open(buf, fileMode|O_BINARY, true);
-00061 
-00062         if (datfd < 0) {
-00063                 sprintf(buf, "Error: %d", errno);
-00064                 perror(buf);
-00065         }
-00066 
-00067         instance++;
-00068 }
-00069 
-00070 
-00071 /******************************************************************************
-00072  * RawStr Destructor - Cleans up instance of RawStr
-00073  */
-00074 
-00075 RawStr::~RawStr()
-00076 {
-00077         if (path)
-00078                 delete [] path;
-00079 
-00080         --instance;
-00081 
-00082         FileMgr::systemFileMgr.close(idxfd);
-00083         FileMgr::systemFileMgr.close(datfd);
-00084 }
-00085 
-00086 
-00087 /******************************************************************************
-00088  * RawStr::getidxbufdat - Gets the index string at the given idx offset
-00089  *                                              NOTE: buf is allocated and must be freed by
-00090  *                                                      calling function
-00091  *
-00092  * ENT: ioffset - offset in dat file to lookup
-00093  *              buf             - address of pointer to allocate for storage of string
-00094  */
-00095 
-00096 void RawStr::getidxbufdat(long ioffset, char **buf)
-00097 {
-00098         int size;
-00099         char ch;
-00100         if (datfd > 0) {
-00101                 lseek(datfd->getFd(), ioffset, SEEK_SET);
-00102                 for (size = 0; read(datfd->getFd(), &ch, 1) == 1; size++) {
-00103                         if ((ch == '\\') || (ch == 10) || (ch == 13))
-00104                                 break;
-00105                 }
-00106                 *buf = (*buf) ? (char *)realloc(*buf, size + 1) : (char *)malloc(size + 1);
-00107                 if (size) {
-00108                         lseek(datfd->getFd(), ioffset, SEEK_SET);
-00109                         read(datfd->getFd(), *buf, size);
-00110                 }
-00111                 (*buf)[size] = 0;
-00112                 for (size--; size > 0; size--)
-00113                         (*buf)[size] = SW_toupper((*buf)[size]);
-00114         }
-00115         else {
-00116                 *buf = (*buf) ? (char *)realloc(*buf, 1) : (char *)malloc(1);
-00117                 **buf = 0;
-00118         }
-00119 }
-00120 
-00121 
-00122 /******************************************************************************
-00123  * RawStr::getidxbuf    - Gets the index string at the given idx offset
-00124  *                                              NOTE: buf is allocated and must be freed by
-00125  *                                                      calling function
-00126  *
-00127  * ENT: ioffset - offset in idx file to lookup
-00128  *              buf             - address of pointer to allocate for storage of string
-00129  */
-00130 
-00131 void RawStr::getidxbuf(long ioffset, char **buf)
-00132 {
-00133         char *trybuf, *targetbuf;
-00134         long offset;
-00135         
-00136         if (idxfd > 0) {
-00137                 lseek(idxfd->getFd(), ioffset, SEEK_SET);
-00138                 read(idxfd->getFd(), &offset, 4);
-00139 
-00140                 offset = swordtoarch32(offset);
-00141 
-00142                 getidxbufdat(offset, buf);
-00143                 for (trybuf = targetbuf = *buf; *trybuf; trybuf++, targetbuf++) {
-00144 /*
-00145                         if (*trybuf == '-') {           // ignore '-' because alphabetized silly in file
-00146                                 targetbuf--;
-00147                                 continue;
-00148                         }
-00149 */
-00150                         *targetbuf = SW_toupper(*trybuf);
-00151                 }
-00152                 *targetbuf = 0;
-00153                 trybuf = 0;
-00154         }
-00155 }
-00156 
-00157 
-00158 /******************************************************************************
-00159  * RawStr::findoffset   - Finds the offset of the key string from the indexes
-00160  *
-00161  * ENT: key             - key string to lookup
-00162  *              start   - address to store the starting offset
-00163  *              size            - address to store the size of the entry
-00164  *              away            - number of entries before of after to jump
-00165  *                                      (default = 0)
-00166  *
-00167  * RET: error status
-00168  */
-00169 
-00170 signed char RawStr::findoffset(const char *ikey, long *start, unsigned short *size, long away, long *idxoff)
-00171 {
-00172         char *trybuf, *targetbuf, *key, quitflag = 0;
-00173         signed char retval = 0;
-00174         long headoff, tailoff, tryoff = 0, maxoff = 0;
-00175 
-00176         if (idxfd->getFd() >=0) {
-00177                 tailoff = maxoff = lseek(idxfd->getFd(), 0, SEEK_END) - 6;
-00178                 if (*ikey) {
-00179                         headoff = 0;
-00180 
-00181                         key = new char [ strlen(ikey) + 1 ];
-00182                         strcpy(key, ikey);
-00183 
-00184                         for (trybuf = targetbuf = key; *trybuf; trybuf++, targetbuf++) {
-00185         /*
-00186                                 if (*trybuf == '-') {           // ignore '-' because alphabetized silly in file
-00187                                         targetbuf--;
-00188                                         continue;
-00189                                 }
-00190         */
-00191                                 *targetbuf = SW_toupper(*trybuf);
-00192                         }
-00193                         *targetbuf = 0;
-00194                         trybuf = 0;
-00195 
-00196                         while (headoff < tailoff) {
-00197                                 tryoff = (lastoff == -1) ? headoff + ((((tailoff / 6) - (headoff / 6))) / 2) * 6 : lastoff; 
-00198                                 lastoff = -1;
-00199                                 getidxbuf(tryoff, &trybuf);
-00200 
-00201                                 if (!*trybuf && tryoff) {               // In case of extra entry at end of idx (not first entry)
-00202                                         tryoff += (tryoff > (maxoff / 2))?-6:6;
-00203                                         retval = -1;
-00204                                         break;
-00205                                 }
-00206                                         
-00207                                 if (!strcmp(key, trybuf))
-00208                                         break;
-00209 
-00210                                 int diff = strcmp(key, trybuf);
-00211                                 if (diff < 0)
-00212                                         tailoff = (tryoff == headoff) ? headoff : tryoff;
-00213                                 else headoff = tryoff;
-00214                                 if (tailoff == headoff + 6) {
-00215                                         if (quitflag++)
-00216                                                 headoff = tailoff;
-00217                                 }
-00218                         }
-00219                         if (headoff >= tailoff)
-00220                                 tryoff = headoff;
-00221                         if (trybuf)
-00222                                 free(trybuf);
-00223                         delete [] key;
-00224                 }
-00225                 else    tryoff = 0;
-00226 
-00227                 lseek(idxfd->getFd(), tryoff, SEEK_SET);
-00228 
-00229                 *start = *size = 0;
-00230                 read(idxfd->getFd(), start, 4);
-00231                 read(idxfd->getFd(), size, 2);
-00232                 if (idxoff)
-00233                         *idxoff = tryoff;
-00234 
-00235                 *start = swordtoarch32(*start);
-00236                 *size  = swordtoarch16(*size);
-00237 
-00238                 while (away) {
-00239                         long laststart = *start;
-00240                         unsigned short lastsize = *size;
-00241                         long lasttry = tryoff;
-00242                         tryoff += (away > 0) ? 6 : -6;
-00243                 
-00244                         bool bad = false;
-00245                         if (((tryoff + (away*6)) < -6) || (tryoff + (away*6) > (maxoff+6)))
-00246                                 bad = true;
-00247                         else if (lseek(idxfd->getFd(), tryoff, SEEK_SET) < 0)
-00248                                 bad = true;
-00249                         if (bad) {
-00250                                 retval = -1;
-00251                                 *start = laststart;
-00252                                 *size = lastsize;
-00253                                 tryoff = lasttry;
-00254                                 if (idxoff)
-00255                                         *idxoff = tryoff;
-00256                                 break;
-00257                         }
-00258                         read(idxfd->getFd(), start, 4);
-00259                         read(idxfd->getFd(), size, 2);
-00260                         if (idxoff)
-00261                                 *idxoff = tryoff;
-00262 
-00263                         *start = swordtoarch32(*start);
-00264                         *size  = swordtoarch16(*size);
-00265 
-00266                         if (((laststart != *start) || (lastsize != *size)) && (*start >= 0) && (*size)) 
-00267                                 away += (away < 0) ? 1 : -1;
-00268                 }
-00269         
-00270                 lastoff = tryoff;
-00271         }
-00272         else {
-00273                 *start = 0;
-00274                 *size  = 0;
-00275                 if (idxoff)
-00276                         *idxoff = 0;
-00277                 retval = -1;
-00278         }
-00279         return retval;
-00280 }
-00281 
-00282 
-00283 /******************************************************************************
-00284  * RawStr::preptext     - Prepares the text before returning it to external
-00285  *                                      objects
-00286  *
-00287  * ENT: buf     - buffer where text is stored and where to store the prep'd
-00288  *                              text.
-00289  */
-00290 
-00291 void RawStr::preptext(char *buf) {
-00292         char *to, *from, space = 0, cr = 0, realdata = 0, nlcnt = 0;
-00293 
-00294         for (to = from = buf; *from; from++) {
-00295                 switch (*from) {
-00296                 case 10:
-00297                         if (!realdata)
-00298                                 continue;
-00299                         space = (cr) ? 0 : 1;
-00300                         cr = 0;
-00301                         nlcnt++;
-00302                         if (nlcnt > 1) {
-00303 //                              *to++ = nl;
-00304                                 *to++ = nl;
-00305 //                              nlcnt = 0;
-00306                         }
-00307                         continue;
-00308                 case 13:
-00309                         if (!realdata)
-00310                                 continue;
-00311                         *to++ = nl;
-00312                         space = 0;
-00313                         cr = 1;
-00314                         continue;
-00315                 }
-00316                 realdata = 1;
-00317                 nlcnt = 0;
-00318                 if (space) {
-00319                         space = 0;
-00320                         if (*from != ' ') {
-00321                                 *to++ = ' ';
-00322                                 from--;
-00323                                 continue;
-00324                         }
-00325                 }
-00326                 *to++ = *from;
-00327         }
-00328         *to = 0;
-00329 
-00330         while (to > (buf+1)) {                  // remove trailing excess
-00331                 to--;
-00332                 if ((*to == 10) || (*to == ' '))
-00333                         *to = 0;
-00334                 else break;
-00335         }
-00336 }
-00337 
-00338 
-00339 /******************************************************************************
-00340  * RawStr::gettext      - gets text at a given offset
-00341  *
-00342  * ENT:
-00343  *      start   - starting offset where the text is located in the file
-00344  *      size            - size of text entry
-00345  *      buf             - buffer to store text
-00346  *
-00347  */
-00348 
-00349 void RawStr::gettext(long istart, unsigned short isize, char *idxbuf, char *buf)
-00350 {
-00351         char *ch;
-00352         char *idxbuflocal = 0;
-00353         getidxbufdat(istart, &idxbuflocal);
-00354         long start = istart;
-00355         unsigned short size = isize;
-00356 
-00357         do {
-00358                 memset(buf, 0, size);
-00359                 lseek(datfd->getFd(), start, SEEK_SET);
-00360                 read(datfd->getFd(), buf, (int)(size - 2));
-00361 
-00362                 for (ch = buf; *ch; ch++) {             // skip over index string
-00363                         if (*ch == 10) {
-00364                                 ch++;
-00365                                 break;
-00366                         }
-00367                 }
-00368                 size -= (unsigned short)(ch-buf);
-00369                 memmove(buf, ch, size);
-00370                 buf[size] = 0;
-00371                 buf[size+1] = 0;
-00372 
-00373                 // resolve link
-00374                 if (!strncmp(buf, "@LINK", 5)) {
-00375                         for (ch = buf; *ch; ch++) {             // null before nl
-00376                                 if (*ch == 10) {
-00377                                         *ch = 0;
-00378                                         break;
-00379                                 }
-00380                         }
-00381                         findoffset(buf + 6, &start, &size);
-00382                         // TODO: FIX!  THIS IS WRONG!!!  buf is not reallocated for the appropriate size!
-00383                 }
-00384                 else break;
-00385         }
-00386         while (true);   // while we're resolving links
-00387 
-00388         if (idxbuflocal) {
-00389                 int localsize = strlen(idxbuflocal);
-00390                 localsize = (localsize < (size - 1)) ? localsize : (size - 1);
-00391                 strncpy(idxbuf, idxbuflocal, localsize);
-00392                 idxbuf[localsize] = 0;
-00393                 free(idxbuflocal);
-00394         }
-00395 }
-00396 
-00397 
-00398 /******************************************************************************
-00399  * RawLD::settext       - Sets text for current offset
-00400  *
-00401  * ENT: key     - key for this entry
-00402  *      buf     - buffer to store
-00403  *      len     - length of buffer (0 - null terminated)
-00404  */
-00405 
-00406 void RawStr::settext(const char *ikey, const char *buf, long len)
-00407 {
-00408 
-00409         long start, outstart;
-00410         long idxoff;
-00411         long endoff;
-00412         long shiftSize;
-00413         unsigned short size;
-00414         unsigned short outsize;
-00415         static const char nl[] = {13, 10};
-00416         char *tmpbuf = 0;
-00417         char *key = 0;
-00418         char *dbKey = 0;
-00419         char *idxBytes = 0;
-00420         char *outbuf = 0;
-00421         char *ch = 0;
-00422 
-00423         findoffset(ikey, &start, &size, 0, &idxoff);
-00424         stdstr(&key, ikey);
-00425         for (ch = key; *ch; ch++)
-00426                 *ch = SW_toupper(*ch);
-00427         ch = 0;
-00428 
-00429         getidxbufdat(start, &dbKey);
-00430 
-00431         if (strcmp(key, dbKey) < 0) {
-00432         }
-00433         else if (strcmp(key, dbKey) > 0) {
-00434                 idxoff += 6;
-00435         } else if ((!strcmp(key, dbKey)) && (len || strlen(buf) /*we're not deleting*/)) { // got absolute entry
-00436                 do {
-00437                         tmpbuf = new char [ size + 2 ];
-00438                         memset(tmpbuf, 0, size + 2);
-00439                         lseek(datfd->getFd(), start, SEEK_SET);
-00440                         read(datfd->getFd(), tmpbuf, (int)(size - 1));
-00441 
-00442                         for (ch = tmpbuf; *ch; ch++) {          // skip over index string
-00443                                 if (*ch == 10) {
-00444                                         ch++;
-00445                                         break;
-00446                                 }
-00447                         }
-00448                         memmove(tmpbuf, ch, size - (unsigned short)(ch-tmpbuf));
-00449 
-00450                         // resolve link
-00451                         if (!strncmp(tmpbuf, "@LINK", 5) && (len ? len : strlen(buf))) {
-00452                                 for (ch = tmpbuf; *ch; ch++) {          // null before nl
-00453                                         if (*ch == 10) {
-00454                                                 *ch = 0;
-00455                                                 break;
-00456                                         }
-00457                                 }
-00458                                 findoffset(tmpbuf + 6, &start, &size, 0, &idxoff);
-00459                         }
-00460                         else break;
-00461                 }
-00462                 while (true);   // while we're resolving links
-00463         }
-00464 
-00465         endoff = lseek(idxfd->getFd(), 0, SEEK_END);
-00466 
-00467         shiftSize = endoff - idxoff;
-00468 
-00469         if (shiftSize > 0) {
-00470                 idxBytes = new char [ shiftSize ];
-00471                 lseek(idxfd->getFd(), idxoff, SEEK_SET);
-00472                 read(idxfd->getFd(), idxBytes, shiftSize);
-00473         }
-00474 
-00475         outbuf = new char [ (len ? len : strlen(buf)) + strlen(key) + 5 ];
-00476         sprintf(outbuf, "%s%c%c", key, 13, 10);
-00477         size = strlen(outbuf);
-00478         memcpy (outbuf + size, buf, len ? len : strlen(buf));
-00479         size = outsize = size + (len ? len : strlen(buf));
-00480 
-00481         start = outstart = lseek(datfd->getFd(), 0, SEEK_END);
-00482 
-00483         outstart = archtosword32(start);
-00484         outsize  = archtosword16(size);
-00485 
-00486         lseek(idxfd->getFd(), idxoff, SEEK_SET);
-00487         if (len ? len : strlen(buf)) {
-00488                 lseek(datfd->getFd(), start, SEEK_SET);
-00489                 write(datfd->getFd(), outbuf, (int)size);
-00490 
-00491                 // add a new line to make data file easier to read in an editor
-00492                 write(datfd->getFd(), &nl, 2);
-00493                 
-00494                 write(idxfd->getFd(), &outstart, 4);
-00495                 write(idxfd->getFd(), &outsize, 2);
-00496                 if (idxBytes) {
-00497                         write(idxfd->getFd(), idxBytes, shiftSize);
-00498                         delete [] idxBytes;
-00499                 }
-00500         }
-00501         else {  // delete entry
-00502                 if (idxBytes) {
-00503                         write(idxfd->getFd(), idxBytes+6, shiftSize-6);
-00504                         lseek(idxfd->getFd(), -1, SEEK_CUR);    // last valid byte
-00505                         FileMgr::systemFileMgr.trunc(idxfd);    // truncate index
-00506                         delete [] idxBytes;
-00507                 }
-00508         }
-00509 
-00510         delete [] key;
-00511         delete [] outbuf;
-00512         free(dbKey);
-00513 }
-00514 
-00515 
-00516 /******************************************************************************
-00517  * RawLD::linkentry     - links one entry to another
-00518  *
-00519  * ENT: testmt  - testament to find (0 - Bible/module introduction)
-00520  *      destidxoff      - dest offset into .vss
-00521  *      srcidxoff               - source offset into .vss
-00522  */
-00523 
-00524 void RawStr::linkentry(const char *destkey, const char *srckey) {
-00525         char *text = new char [ strlen(destkey) + 7 ];
-00526         sprintf(text, "@LINK %s", destkey);
-00527         settext(srckey, text);
-00528         delete [] text;
-00529 }
-00530 
-00531 
-00532 /******************************************************************************
-00533  * RawLD::CreateModule  - Creates new module files
-00534  *
-00535  * ENT: path    - directory to store module files
-00536  * RET: error status
-00537  */
-00538 
-00539 signed char RawStr::createModule(const char *ipath)
-00540 {
-00541         char *path = 0;
-00542         char *buf = new char [ strlen (ipath) + 20 ];
-00543         FileDesc *fd, *fd2;
-00544 
-00545         stdstr(&path, ipath);
-00546 
-00547         if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\'))
-00548                 path[strlen(path)-1] = 0;
-00549 
-00550         sprintf(buf, "%s.dat", path);
-00551         unlink(buf);
-00552         fd = FileMgr::systemFileMgr.open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-00553         fd->getFd();
-00554         FileMgr::systemFileMgr.close(fd);
-00555 
-00556         sprintf(buf, "%s.idx", path);
-00557         unlink(buf);
-00558         fd2 = FileMgr::systemFileMgr.open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-00559         fd2->getFd();
-00560         FileMgr::systemFileMgr.close(fd2);
-00561 
-00562         delete [] path;
-00563         
-00564         return 0;
-00565 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rawstr_8h-source.html b/doc/api-documentation/html/rawstr_8h-source.html deleted file mode 100644 index c6c17c9..0000000 --- a/doc/api-documentation/html/rawstr_8h-source.html +++ /dev/null @@ -1,68 +0,0 @@ - - -rawstr.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rawstr.h

00001 /*****************************************************************************
-00002  * rawstr.h   - code for class 'RawStr'- a module that reads raw text
-00003  *                      files:  ot and nt using indexs ??.bks ??.cps ??.vss
-00004  *                      and provides lookup and parsing functions based on
-00005  *                      class StrKey
-00006  *
-00007  * $Id: rawstr_8h-source.html,v 1.7 2002/06/20 20:23:09 mgruner Exp $
-00008  *
-00009  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00010  *      CrossWire Bible Society
-00011  *      P. O. Box 2528
-00012  *      Tempe, AZ  85280-2528
-00013  *
-00014  * This program is free software; you can redistribute it and/or modify it
-00015  * under the terms of the GNU General Public License as published by the
-00016  * Free Software Foundation version 2.
-00017  *
-00018  * This program is distributed in the hope that it will be useful, but
-00019  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00021  * General Public License for more details.
-00022  *
-00023  */
-00024 
-00025 #ifndef RAWSTR_H
-00026 #define RAWSTR_H
-00027 
-00028 #include <filemgr.h>
-00029 
-00030 #include <defs.h>
-00031 
-00032 class SWDLLEXPORT RawStr {
-00033         static int instance;            // number of instantiated RawStr objects or derivitives
-00034         char *path;
-00035         long lastoff;
-00036 
-00037 protected:
-00038         FileDesc *idxfd;
-00039         FileDesc *datfd;
-00040         void settext(const char *key, const char *buf, long len = 0);
-00041         void linkentry(const char *destkey, const char *srckey);
-00042 public:
-00043         static void preptext(char *buf);
-00044         static char nl;
-00045         RawStr(const char *ipath, int fileMode = -1);
-00046         virtual ~RawStr ();
-00047         void getidxbuf(long ioffset, char **buf);
-00048         void getidxbufdat(long ioffset, char **buf);
-00049         signed char findoffset(const char *key, long *start, unsigned short *size, long away = 0, long *idxoff = 0);
-00050         void gettext(long start, unsigned short size, char *idxbuf, char *buf);
-00051         static signed char createModule(const char *path);
-00052 };
-00053 
-00054 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rawtext_8cpp-source.html b/doc/api-documentation/html/rawtext_8cpp-source.html deleted file mode 100644 index 599021e..0000000 --- a/doc/api-documentation/html/rawtext_8cpp-source.html +++ /dev/null @@ -1,644 +0,0 @@ - - -rawtext.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rawtext.cpp

00001 /******************************************************************************
-00002  *  rawtext.cpp - code for class 'RawText'- a module that reads raw text files:
-00003  *                ot and nt using indexs ??.bks ??.cps ??.vss
-00004  */
-00005 
-00006 
-00007 #include <stdio.h>
-00008 #include <fcntl.h>
-00009 
-00010 #ifndef __GNUC__
-00011 #include <io.h>
-00012 #else
-00013 #include <unistd.h>
-00014 #endif
-00015 
-00016 #include <string.h>
-00017 #include <utilfuns.h>
-00018 #include <rawverse.h>
-00019 #include <rawtext.h>
-00020 
-00021 #include <map>
-00022 #include <list>
-00023 #include <algorithm>
-00024 #include <regex.h>      // GNU
-00025 
-00026 #ifndef O_BINARY
-00027 #define O_BINARY 0
-00028 #endif
-00029 
-00030 /******************************************************************************
-00031  * RawText Constructor - Initializes data for instance of RawText
-00032  *
-00033  * ENT: iname - Internal name for module
-00034  *      idesc - Name to display to user for module
-00035  *      idisp    - Display object to use for displaying
-00036  */
-00037 
-00038 RawText::RawText(const char *ipath, const char *iname, const char *idesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang)
-00039                 : SWText(iname, idesc, idisp, enc, dir, mark, ilang),
-00040           RawVerse(ipath) {
-00041           
-00042         string fname;
-00043         fname = path;
-00044         char ch = fname.c_str()[strlen(fname.c_str())-1];
-00045         if ((ch != '/') && (ch != '\\'))
-00046                 fname += "/";
-00047         
-00048         for (int loop = 0; loop < 2; loop++) {
-00049         fastSearch[loop] = 0;
-00050                 string fastidxname =(fname + ((loop)?"ntwords.dat":"otwords.dat"));
-00051                 if (!access(fastidxname.c_str(), 04)) {
-00052                         fastidxname = (fname + ((loop)?"ntwords.idx":"otwords.idx"));
-00053                         if (!access(fastidxname.c_str(), 04))
-00054                                 fastSearch[loop] = new RawStr((fname + ((loop)?"ntwords":"otwords")).c_str());
-00055                 }
-00056         }
-00057 }
-00058 
-00059 
-00060 /******************************************************************************
-00061  * RawText Destructor - Cleans up instance of RawText
-00062  */
-00063 
-00064 RawText::~RawText()
-00065 {
-00066         if (fastSearch[0])
-00067                 delete fastSearch[0];
-00068 
-00069         if (fastSearch[1])
-00070                 delete fastSearch[1];
-00071 }
-00072 
-00073 
-00074 /******************************************************************************
-00075  * RawText::operator char *     - Returns the correct verse when char * cast
-00076  *                                      is requested
-00077  *
-00078  * RET: string buffer with verse
-00079  */
-00080 
-00081 char *RawText::getRawEntry() {
-00082         long  start = 0;
-00083         unsigned short size = 0;
-00084         VerseKey *key = 0;
-00085 
-00086         // see if we have a VerseKey * or decendant
-00087 #ifndef _WIN32_WCE
-00088         try {
-00089 #endif
-00090                 key = SWDYNAMIC_CAST(VerseKey, this->key);
-00091 #ifndef _WIN32_WCE
-00092         }
-00093         catch ( ... ) { }
-00094 #endif
-00095         // if we don't have a VerseKey * decendant, create our own
-00096         if (!key)
-00097                 key = new VerseKey(this->key);
-00098 
-00099         findoffset(key->Testament(), key->Index(), &start, &size);
-00100         entrySize = size;        // support getEntrySize call
-00101 
-00102         unsigned long newsize = (size + 2) * FILTERPAD;
-00103         if (newsize > entrybufallocsize) {
-00104                 if (entrybuf)
-00105                         delete [] entrybuf;
-00106                 entrybuf = new char [ newsize ];
-00107                 entrybufallocsize = newsize;
-00108         }
-00109         *entrybuf = 0;
-00110 
-00111         gettext(key->Testament(), start, (size + 2), entrybuf);
-00112 
-00113         rawFilter(entrybuf, size, key);
-00114 
-00115         if (!isUnicode())
-00116                 preptext(entrybuf);
-00117 
-00118         if (this->key != key) // free our key if we created a VerseKey
-00119                 delete key;
-00120 
-00121         return entrybuf;
-00122 }
-00123 
-00124 
-00125 signed char RawText::createSearchFramework() {
-00126         SWKey *savekey = 0;
-00127         SWKey *searchkey = 0;
-00128         SWKey textkey;
-00129         char *word = 0;
-00130         char *wordBuf = 0;
-00131 
-00132         // dictionary holds words associated with a list
-00133         // containing every module position that contains
-00134         // the word.  [0] Old Testament; [1] NT
-00135         map < string, list<long> > dictionary[2];
-00136 
-00137 
-00138         // save key information so as not to disrupt original
-00139         // module position
-00140         if (!key->Persist()) {
-00141                 savekey = CreateKey();
-00142                 *savekey = *key;
-00143         }
-00144         else    savekey = key;
-00145 
-00146         searchkey = (key->Persist())?key->clone():0;
-00147         if (searchkey) {
-00148                 searchkey->Persist(1);
-00149                 SetKey(*searchkey);
-00150         }
-00151 
-00152         // position module at the beginning
-00153         *this = TOP;
-00154 
-00155         VerseKey *lkey = (VerseKey *)key;
-00156 
-00157         // iterate thru each entry in module
-00158         while (!Error()) {
-00159                 long index = lkey->Index();
-00160                 wordBuf = (char *)calloc(sizeof(char), strlen(StripText()) + 1);
-00161                 strcpy(wordBuf, StripText());
-00162 
-00163                 // grab each word from the text
-00164                 word = strtok(wordBuf, " !.,?;:()-=+/\\|{}[]\"<>");
-00165                 while (word) {
-00166 
-00167                         // make work upper case
-00168                         for (unsigned int i = 0; i < strlen(word); i++)
-00169                                 word[i] = SW_toupper(word[i]);
-00170 
-00171                         // lookup word in dictionary (or make entry in dictionary
-00172                         // for this word) and add this module position (index) to
-00173                         // the word's associated list of module positions
-00174                         dictionary[lkey->Testament()-1][word].push_back(index);
-00175                         word = strtok(NULL, " !.,?;:()-=+/\\|{}[]\"<>");
-00176                 }
-00177                 free(wordBuf);
-00178                 (*this)++;
-00179         }
-00180 
-00181         // reposition module back to where it was before we were called
-00182         SetKey(*savekey);
-00183 
-00184         if (!savekey->Persist())
-00185                 delete savekey;
-00186 
-00187         if (searchkey)
-00188                 delete searchkey;
-00189 
-00190         
-00191         // --------- Let's output an index from our dictionary -----------
-00192         int datfd;
-00193         int idxfd;
-00194         map < string, list<long> >::iterator it;
-00195         list<long>::iterator it2;
-00196         unsigned long offset, entryoff;
-00197         unsigned short size;
-00198 
-00199         string fname;
-00200         fname = path;
-00201         char ch = fname.c_str()[strlen(fname.c_str())-1];
-00202         if ((ch != '/') && (ch != '\\'))
-00203                 fname += "/";
-00204 
-00205         // for old and new testament do...
-00206         for (int loop = 0; loop < 2; loop++) {
-00207                 if ((datfd = open((fname + ((loop)?"ntwords.dat":"otwords.dat")).c_str(), O_CREAT|O_WRONLY|O_BINARY, 00644 )) == -1)
-00208                         return -1;
-00209                 if ((idxfd = open((fname + ((loop)?"ntwords.idx":"otwords.idx")).c_str(), O_CREAT|O_WRONLY|O_BINARY, 00644 )) == -1) {
-00210                         close(datfd);
-00211                         return -1;
-00212                 }
-00213 
-00214                 // iterate thru each word in the dictionary
-00215                 for (it = dictionary[loop].begin(); it != dictionary[loop].end(); it++) {
-00216                         printf("%s: ", it->first.c_str());
-00217 
-00218                         // get our current offset in our word.dat file and write this as the start
-00219                         // of the next entry in our database
-00220                         offset = lseek(datfd, 0, SEEK_CUR);
-00221                         write(idxfd, &offset, 4);
-00222 
-00223                         // write our word out to the word.dat file, delineating with a \n
-00224                         write(datfd, it->first.c_str(), strlen(it->first.c_str()));
-00225                         write(datfd, "\n", 1);
-00226 
-00227                         // force our mod position list for this word to be unique (remove
-00228                         // duplicates that may exist if the word was found more than once
-00229                         // in the verse
-00230                         it->second.unique();
-00231 
-00232                         // iterate thru each mod position for this word and output it to
-00233                         // our database
-00234                         unsigned short count = 0;
-00235                         for (it2 = it->second.begin(); it2 != it->second.end(); it2++) {
-00236                                 entryoff= *it2;
-00237                                 write(datfd, &entryoff, 4);
-00238                                 count++;
-00239                         }
-00240                         
-00241                         // now see what our new position is in our word.dat file and
-00242                         // determine the size of this database entry
-00243                         size = lseek(datfd, 0, SEEK_CUR) - offset;
-00244 
-00245                         // store the size of this database entry
-00246                         write(idxfd, &size, 2);
-00247                         printf("%d entries (size: %d)\n", count, size);
-00248                 }
-00249                 close(datfd);
-00250                 close(idxfd);
-00251         }
-00252         return 0;
-00253 }
-00254 
-00255 
-00256 /******************************************************************************
-00257  * SWModule::Search     - Searches a module for a string
-00258  *
-00259  * ENT: istr            - string for which to search
-00260  *      searchType      - type of search to perform
-00261  *                              >=0 - regex
-00262  *                              -1  - phrase
-00263  *                              -2  - multiword
-00264  *      flags           - options flags for search
-00265  *      justCheckIfSupported    - if set, don't search, only tell if this
-00266  *                                                      function supports requested search.
-00267  *
-00268  * RET: listkey set to verses that contain istr
-00269  */
-00270 
-00271 ListKey &RawText::Search(const char *istr, int searchType, int flags, SWKey *scope, bool *justCheckIfSupported, void (*percent)(char, void *), void *percentUserData)
-00272 {
-00273         listkey.ClearList();
-00274 
-00275         if ((fastSearch[0]) && (fastSearch[1])) {
-00276 
-00277                 switch (searchType) {
-00278                 case -2: {
-00279 
-00280                         if ((flags & REG_ICASE) != REG_ICASE)   // if haven't chosen to
-00281                                                                                         // ignore case
-00282                                 break; // can't handle fast case sensitive searches
-00283 
-00284                         // test to see if our scope for this search is bounded by a
-00285                         // VerseKey
-00286                         VerseKey *testKeyType = 0;
-00287 #ifndef _WIN32_WCE
-00288                         try {
-00289 #endif
-00290                                 testKeyType = SWDYNAMIC_CAST(VerseKey, ((scope)?scope:key));
-00291 #ifndef _WIN32_WCE
-00292                         }
-00293                         catch ( ... ) {}
-00294 #endif
-00295                         // if we don't have a VerseKey * decendant we can't handle
-00296                         // because of scope.
-00297                         // In the future, add bool SWKey::isValid(const char *tryString);
-00298                         if (!testKeyType)
-00299                                 break;
-00300 
-00301 
-00302                         // check if we just want to see if search is supported.
-00303                         // If we've gotten this far, then it is supported.
-00304                         if (justCheckIfSupported) {
-00305                                 *justCheckIfSupported = true;
-00306                                 return listkey;
-00307                         }
-00308 
-00309                         SWKey saveKey = *testKeyType; // save current place
-00310 
-00311                         char error = 0;
-00312                         char **words = 0;
-00313                         char *wordBuf = 0;
-00314                         int wordCount = 0;
-00315                         long start;
-00316                         unsigned short size;
-00317                         char *idxbuf = 0;
-00318                         char *datbuf = 0;
-00319                         list <long> indexes;
-00320                         list <long> indexes2;
-00321                         VerseKey vk;
-00322                         vk = TOP;
-00323 
-00324                         (*percent)(10, percentUserData);
-00325 
-00326                         // toupper our copy of search string
-00327                         stdstr(&wordBuf, istr);
-00328                         for (unsigned int i = 0; i < strlen(wordBuf); i++)
-00329                                 wordBuf[i] = SW_toupper(wordBuf[i]);
-00330 
-00331                         // get list of individual words
-00332                         words = (char **)calloc(sizeof(char *), 10);
-00333                         int allocWords = 10;
-00334                         words[wordCount] = strtok(wordBuf, " ");
-00335                         while (words[wordCount]) {
-00336                                 wordCount++;
-00337                                 if (wordCount == allocWords) {
-00338                                         allocWords+=10;
-00339                                         words = (char **)realloc(words, sizeof(char *)*allocWords);
-00340                                 }
-00341                                 words[wordCount] = strtok(NULL, " ");
-00342                         }
-00343 
-00344                         (*percent)(20, percentUserData);
-00345 
-00346                         // clear our result set
-00347                         indexes.erase(indexes.begin(), indexes.end());
-00348 
-00349                         // search both old and new testament indexes
-00350                         for (int j = 0; j < 2; j++) {
-00351                                 // iterate thru each word the user passed to us.
-00352                                 for (int i = 0; i < wordCount; i++) {
-00353 
-00354                                         // clear this word's result set
-00355                                         indexes2.erase(indexes2.begin(), indexes2.end());
-00356                                         error = 0;
-00357 
-00358                                         // iterate thru every word in the database that starts
-00359                                         // with our search word
-00360                                         for (int away = 0; !error; away++) {
-00361                                                 idxbuf = 0;
-00362                                                 
-00363                                                 // find our word in the database and jump ahead _away_
-00364                                                 error = fastSearch[j]->findoffset(words[i], &start, &size, away);
-00365 
-00366                                                 // get the word from the database
-00367                                                 fastSearch[j]->getidxbufdat(start, &idxbuf);
-00368 
-00369                                                 // check to see if it starts with our target word
-00370                                                 if (strlen(idxbuf) > strlen(words[i]))
-00371                                                         idxbuf[strlen(words[i])] = 0;
-00372 //                                              else    words[i][strlen(idxbuf)] = 0;
-00373                                                 if (!strcmp(idxbuf, words[i])) {
-00374 
-00375                                                         // get data for this word from database
-00376                                                         free(idxbuf);
-00377                                                         idxbuf = (char *)calloc(size+2, 1);
-00378                                                         datbuf = (char *)calloc(size+2, 1);
-00379                                                         fastSearch[j]->gettext(start, size + 2, idxbuf, datbuf);
-00380 
-00381                                                         // we know that the data consists of sizof(long)
-00382                                                         // records each a valid module position that constains
-00383                                                         // this word
-00384                                                         //
-00385                                                         // iterate thru each of these module positions
-00386                                                         long *keyindex = (long *)datbuf;
-00387                                                         while (keyindex < (long *)(datbuf + size - (strlen(idxbuf) + 1))) {
-00388                                                                 if (i) {        // if we're not on our first word
-00389 
-00390                                                                         // check to see if this word is already in the result set.
-00391                                                                         // This is our AND functionality
-00392                                                                         if (find(indexes.begin(), indexes.end(), *keyindex) != indexes.end())
-00393                                                                                 // add to new result set
-00394                                                                                 indexes2.push_back(*keyindex);
-00395                                                                 }
-00396                                                                 else    indexes2.push_back(*keyindex);
-00397                                                                 keyindex++;
-00398                                                         }
-00399                                                         free(datbuf);
-00400                                                 }
-00401                                                 else error = 1; // no more matches
-00402                                                 free(idxbuf);
-00403                                         }
-00404 
-00405                                         // make new result set final result set
-00406                                         indexes = indexes2;
-00407 
-00408                                         percent((char)(20 + (float)((j*wordCount)+i)/(wordCount * 2) * 78), percentUserData);
-00409                                 }
-00410 
-00411                                 // indexes contains our good verses, lets return them in a listkey
-00412                                 indexes.sort();
-00413 
-00414                                 // iterate thru each good module position that meets the search
-00415                                 for (list <long>::iterator it = indexes.begin(); it != indexes.end(); it++) {
-00416 
-00417                                         // set a temporary verse key to this module position
-00418                                         vk.Testament(j+1);
-00419                                         vk.Error();
-00420                                         vk.Index(*it);
-00421 
-00422                                         // check scope
-00423                                         // Try to set our scope key to this verse key
-00424                                         if (scope) {
-00425                                                 *testKeyType = vk;
-00426 
-00427                                                 // check to see if it set ok and if so, add to our return list
-00428                                                 if (*testKeyType == vk)
-00429                                                         listkey << (const char *) vk;
-00430                                         }
-00431                                         else listkey << (const char*) vk;
-00432                                 }
-00433                         }
-00434                         (*percent)(98, percentUserData);
-00435 
-00436                         free(words);
-00437                         free(wordBuf);
-00438 
-00439                         *testKeyType = saveKey; // set current place back to original
-00440 
-00441                         listkey = TOP;
-00442                         (*percent)(100, percentUserData);
-00443                         return listkey;
-00444                 }
-00445 
-00446                 default:
-00447                         break;
-00448                 }
-00449         }
-00450 
-00451         // check if we just want to see if search is supported
-00452         if (justCheckIfSupported) {
-00453                 *justCheckIfSupported = false;
-00454                 return listkey;
-00455         }
-00456 
-00457         // if we don't support this search, fall back to base class
-00458         return SWModule::Search(istr, searchType, flags, scope, justCheckIfSupported, percent, percentUserData);
-00459 }
-00460 
-00461 #ifdef _MSC_VER
-00462 SWModule &RawText::operator =(SW_POSITION p) {
-00463 #else
-00464 RawText &RawText::operator =(SW_POSITION p) {
-00465 #endif
-00466         SWModule::operator =(p);
-00467         return *this;
-00468 }
-00469 
-00470 SWModule &RawText::setentry(const char *inbuf, long len) {
-00471         VerseKey *key = 0;
-00472         // see if we have a VerseKey * or decendant
-00473 #ifndef _WIN32_WCE
-00474         try {
-00475 #endif
-00476                 key = SWDYNAMIC_CAST(VerseKey, this->key);
-00477 #ifndef _WIN32_WCE
-00478         }
-00479         catch ( ... ) {}
-00480 #endif
-00481         // if we don't have a VerseKey * decendant, create our own
-00482         if (!key)
-00483                 key = new VerseKey(this->key);
-00484 
-00485         settext(key->Testament(), key->Index(), inbuf, len);
-00486 
-00487         if (this->key != key) // free our key if we created a VerseKey
-00488                 delete key;
-00489 
-00490         return *this;
-00491 }
-00492 
-00493 SWModule &RawText::operator <<(const char *inbuf) {
-00494         return setentry(inbuf, 0);
-00495 }
-00496 
-00497 
-00498 SWModule &RawText::operator <<(const SWKey *inkey) {
-00499         VerseKey *destkey = 0;
-00500         const VerseKey *srckey = 0;
-00501         // see if we have a VerseKey * or decendant
-00502 #ifndef _WIN32_WCE
-00503         try {
-00504 #endif
-00505                 destkey = SWDYNAMIC_CAST(VerseKey, this->key);
-00506 #ifndef _WIN32_WCE
-00507         }
-00508         catch ( ... ) {}
-00509 #endif
-00510         // if we don't have a VerseKey * decendant, create our own
-00511         if (!destkey)
-00512                 destkey = new VerseKey(this->key);
-00513 
-00514         // see if we have a VerseKey * or decendant
-00515 #ifndef _WIN32_WCE
-00516         try {
-00517 #endif
-00518                 srckey = SWDYNAMIC_CAST(VerseKey, inkey);
-00519 #ifndef _WIN32_WCE
-00520         }
-00521         catch ( ... ) {}
-00522 #endif
-00523         // if we don't have a VerseKey * decendant, create our own
-00524         if (!srckey)
-00525                 srckey = new VerseKey(inkey);
-00526 
-00527         linkentry(destkey->Testament(), destkey->Index(), srckey->Index());
-00528 
-00529         if (this->key != destkey) // free our key if we created a VerseKey
-00530                 delete destkey;
-00531 
-00532         if (inkey != srckey) // free our key if we created a VerseKey
-00533                 delete srckey;
-00534 
-00535         return *this;
-00536 }
-00537 
-00538 
-00539 /******************************************************************************
-00540  * RawText::deleteEntry - deletes this entry
-00541  *
-00542  * RET: *this
-00543  */
-00544 
-00545 void RawText::deleteEntry() {
-00546 
-00547         VerseKey *key = 0;
-00548 
-00549 #ifndef _WIN32_WCE
-00550         try {
-00551 #endif
-00552                 key = SWDYNAMIC_CAST(VerseKey, this->key);
-00553 #ifndef _WIN32_WCE
-00554         }
-00555         catch ( ... ) {}
-00556 #endif
-00557         if (!key)
-00558                 key = new VerseKey(this->key);
-00559 
-00560         settext(key->Testament(), key->Index(), "");
-00561 
-00562         if (key != this->key)
-00563                 delete key;
-00564 }
-00565 
-00566 /******************************************************************************
-00567  * RawText::operator += - Increments module key a number of entries
-00568  *
-00569  * ENT: increment       - Number of entries to jump forward
-00570  *
-00571  * RET: *this
-00572  */
-00573 
-00574 SWModule &RawText::operator +=(int increment)
-00575 {
-00576         long  start;
-00577         unsigned short size;
-00578         VerseKey *tmpkey = 0;
-00579 
-00580 #ifndef _WIN32_WCE
-00581         try {
-00582 #endif
-00583                 tmpkey = SWDYNAMIC_CAST(VerseKey, key);
-00584 #ifndef _WIN32_WCE
-00585         }
-00586         catch ( ... ) {}
-00587 #endif
-00588         if (!tmpkey)
-00589                 tmpkey = new VerseKey(key);
-00590 
-00591         findoffset(tmpkey->Testament(), tmpkey->Index(), &start, &size);
-00592 
-00593         SWKey lastgood = *tmpkey;
-00594         while (increment) {
-00595                 long laststart = start;
-00596                 unsigned short lastsize = size;
-00597                 SWKey lasttry = *tmpkey;
-00598                 (increment > 0) ? (*key)++ : (*key)--;
-00599                 if (tmpkey != key)
-00600                         delete tmpkey;
-00601                 tmpkey = 0;
-00602 #ifndef _WIN32_WCE
-00603                 try {
-00604 #endif
-00605                         tmpkey = SWDYNAMIC_CAST(VerseKey, key);
-00606 #ifndef _WIN32_WCE
-00607                 }
-00608                 catch ( ... ) {}
-00609 #endif
-00610                 if (!tmpkey)
-00611                         tmpkey = new VerseKey(key);
-00612 
-00613                 if ((error = key->Error())) {
-00614                         *key = lastgood;
-00615                         break;
-00616                 }
-00617                 long index = tmpkey->Index();
-00618                 findoffset(tmpkey->Testament(), index, &start, &size);
-00619                 if ((((laststart != start) || (lastsize != size))||(!skipConsecutiveLinks)) && (start >= 0) && (size)) {
-00620                         increment += (increment < 0) ? 1 : -1;
-00621                         lastgood = *tmpkey;
-00622                 }
-00623         }
-00624         error = (error) ? KEYERR_OUTOFBOUNDS : 0;
-00625 
-00626         if (tmpkey != key)
-00627                 delete tmpkey;
-00628 
-00629         return *this;
-00630 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rawtext_8h-source.html b/doc/api-documentation/html/rawtext_8h-source.html deleted file mode 100644 index 042fe1b..0000000 --- a/doc/api-documentation/html/rawtext_8h-source.html +++ /dev/null @@ -1,78 +0,0 @@ - - -rawtext.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rawtext.h

00001 /******************************************************************************
-00002  *  rawtext.h   - code for class 'RawText'- a module that reads raw text files:
-00003  *                ot and nt using indexs ??.bks ??.cps ??.vss
-00004  *
-00005  * $Id: rawtext_8h-source.html,v 1.7 2002/06/20 20:23:09 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #ifndef RAWTEXT_H
-00024 #define RAWTEXT_H
-00025 
-00026 #include <rawverse.h>
-00027 #include <rawstr.h>
-00028 #include <swtext.h>
-00029 
-00030 #include <defs.h>
-00031 
-00032 class SWDLLEXPORT RawText:public SWText, public RawVerse {
-00033         RawStr *fastSearch[2];
-00034 
-00035 public:
-00036   
-00037     
-00038         RawText (const char *ipath, const char *iname = 0, const char *idesc = 0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN,
-00039         const char* ilang = 0);
-00040         virtual ~ RawText ();
-00041         virtual char *getRawEntry ();
-00042      virtual SWModule & operator += (int increment);
-00043      virtual SWModule & operator -= (int decrement) { return this->operator += (-decrement); }
-00044         virtual signed char createSearchFramework ();
-00045         virtual bool hasSearchFramework () { return true; }
-00046 #ifdef _MSC_VER
-00047         virtual SWModule & operator = (SW_POSITION);
-00048 #else
-00049         virtual RawText & operator = (SW_POSITION);
-00050 #endif
-00051         virtual ListKey & Search (const char *istr, int searchType = 0, int flags = 0, SWKey * scope = 0, bool * justCheckIfSupported = 0, void (*percent) (char, void *) = &SWModule::nullPercent, void *percentUserData = 0);
-00052 
-00053         // write interface ----------------------------
-00054         virtual bool isWritable () { return ((idxfp[0]->getFd() > 0) && ((idxfp[0]->mode & O_RDWR) == O_RDWR)); }
-00055         static char createModule (const char *path) { return RawVerse::createModule (path); }
-00056         virtual SWModule & setentry (const char *inbuf, long len);      // Modify current module entry
-00057         virtual SWModule & operator << (const char *inbuf);     // Modify current module entry
-00058         virtual SWModule & operator << (const SWKey * linkKey); // Link current module entry to other module entry
-00059         virtual void deleteEntry ();    // Delete current module entry
-00060         // end write interface ------------------------
-00061 };
-00062 
-00063 
-00064 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rawverse_8cpp-source.html b/doc/api-documentation/html/rawverse_8cpp-source.html deleted file mode 100644 index f4ea5ae..0000000 --- a/doc/api-documentation/html/rawverse_8cpp-source.html +++ /dev/null @@ -1,361 +0,0 @@ - - -rawverse.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rawverse.cpp

00001 /******************************************************************************
-00002  *  rawverse.cpp   - code for class 'RawVerse'- a module that reads raw text
-00003  *                      files:  ot and nt using indexs ??.bks ??.cps ??.vss
-00004  *                      and provides lookup and parsing functions based on
-00005  *                      class VerseKey
-00006  */
-00007 
-00008 
-00009 #include <ctype.h>
-00010 #include <stdio.h>
-00011 #include <fcntl.h>
-00012 #include <errno.h>
-00013 
-00014 #ifndef __GNUC__
-00015 #include <io.h>
-00016 #include <sys/stat.h>
-00017 #else
-00018 #include <unistd.h>
-00019 #endif
-00020 
-00021 #include <string.h>
-00022 #include <utilfuns.h>
-00023 #include <rawverse.h>
-00024 #include <versekey.h>
-00025 #include <sysdata.h>
-00026 
-00027 #ifndef O_BINARY                // O_BINARY is needed in Borland C++ 4.53
-00028 #define O_BINARY 0              // If it hasn't been defined than we probably
-00029 #endif                          // don't need it.
-00030 
-00031 
-00032 /******************************************************************************
-00033  * RawVerse Statics
-00034  */
-00035 
-00036  int RawVerse::instance = 0;
-00037 
-00038 
-00039 /******************************************************************************
-00040  * RawVerse Constructor - Initializes data for instance of RawVerse
-00041  *
-00042  * ENT: ipath - path of the directory where data and index files are located.
-00043  *              be sure to include the trailing separator (e.g. '/' or '\')
-00044  *              (e.g. 'modules/texts/rawtext/webster/')
-00045  */
-00046 
-00047 RawVerse::RawVerse(const char *ipath, int fileMode)
-00048 {
-00049         char *buf;
-00050 
-00051         nl = '\n';
-00052         path = 0;
-00053         stdstr(&path, ipath);
-00054      buf = new char [ strlen(path) + 80 ];
-00055         if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\'))
-00056                 path[strlen(path)-1] = 0;
-00057 
-00058         if (fileMode == -1) { // try read/write if possible
-00059                 fileMode = O_RDWR;
-00060         }
-00061                 
-00062         sprintf(buf, "%s/ot.vss", path);
-00063         idxfp[0] = FileMgr::systemFileMgr.open(buf, fileMode|O_BINARY, true);
-00064 
-00065         sprintf(buf, "%s/nt.vss", path);
-00066         idxfp[1] = FileMgr::systemFileMgr.open(buf, fileMode|O_BINARY, true);
-00067 
-00068         sprintf(buf, "%s/ot", path);
-00069         textfp[0] = FileMgr::systemFileMgr.open(buf, fileMode|O_BINARY, true);
-00070 
-00071         sprintf(buf, "%s/nt", path);
-00072         textfp[1] = FileMgr::systemFileMgr.open(buf, fileMode|O_BINARY, true);
-00073 
-00074         delete [] buf;
-00075         instance++;
-00076 }
-00077 
-00078 
-00079 /******************************************************************************
-00080  * RawVerse Destructor - Cleans up instance of RawVerse
-00081  */
-00082 
-00083 RawVerse::~RawVerse()
-00084 {
-00085         int loop1;
-00086 
-00087         if (path)
-00088                 delete [] path;
-00089 
-00090         --instance;
-00091 
-00092         for (loop1 = 0; loop1 < 2; loop1++) {
-00093                 FileMgr::systemFileMgr.close(idxfp[loop1]);
-00094                 FileMgr::systemFileMgr.close(textfp[loop1]);
-00095         }
-00096 }
-00097 
-00098 
-00099 /******************************************************************************
-00100  * RawVerse::findoffset - Finds the offset of the key verse from the indexes
-00101  *
-00102  * ENT: testmt  - testament to find (0 - Bible/module introduction)
-00103  *      idxoff  - offset into .vss
-00104  *      start   - address to store the starting offset
-00105  *      size    - address to store the size of the entry
-00106  */
-00107 
-00108 void RawVerse::findoffset(char testmt, long idxoff, long *start, unsigned short *size) {
-00109         idxoff *= 6;
-00110         if (!testmt)
-00111                 testmt = ((idxfp[1]) ? 1:2);
-00112                 
-00113         if (idxfp[testmt-1]->getFd() >= 0) {
-00114                 lseek(idxfp[testmt-1]->getFd(), idxoff, SEEK_SET);
-00115                 read(idxfp[testmt-1]->getFd(), start, 4);
-00116                 long len = read(idxfp[testmt-1]->getFd(), size, 2);             // read size
-00117 
-00118                 *start = swordtoarch32(*start);
-00119                 *size  = swordtoarch16(*size);
-00120 
-00121                 if (len < 2) {
-00122                         *size = (unsigned short)((*start) ? (lseek(textfp[testmt-1]->getFd(), 0, SEEK_END) - (long)*start) : 0);        // if for some reason we get an error reading size, make size to end of file
-00123                 }
-00124         }
-00125         else {
-00126                 *start = 0;
-00127                 *size = 0;
-00128         }
-00129 }
-00130 
-00131 
-00132 /******************************************************************************
-00133  * RawVerse::preptext   - Prepares the text before returning it to external
-00134  *                              objects
-00135  *
-00136  * ENT: buf     - buffer where text is stored and where to store the prep'd
-00137  *                      text.
-00138  */
-00139 
-00140 void RawVerse::preptext(char *buf)
-00141 {
-00142         char *to, *from, space = 0, cr = 0, realdata = 0, nlcnt = 0;
-00143 
-00144         for (to = from = buf; *from; from++) {
-00145                 switch (*from) {
-00146                 case 10:
-00147                         if (!realdata)
-00148                                 continue;
-00149                         space = (cr) ? 0 : 1;
-00150                         cr = 0;
-00151                         nlcnt++;
-00152                         if (nlcnt > 1) {
-00153 //                              *to++ = nl;
-00154                                 *to++ = nl;
-00155 //                              nlcnt = 0;
-00156                         }
-00157                         continue;
-00158                 case 13:
-00159                         if (!realdata)
-00160                                 continue;
-00161                         *to++ = nl;
-00162                         space = 0;
-00163                         cr = 1;
-00164                         continue;
-00165                 }
-00166                 realdata = 1;
-00167                 nlcnt = 0;
-00168                 if (space) {
-00169                         space = 0;
-00170                         if (*from != ' ') {
-00171                                 *to++ = ' ';
-00172                                 from--;
-00173                                 continue;
-00174                         }
-00175                 }
-00176                 *to++ = *from;
-00177         }
-00178         *to = 0;
-00179 
-00180         while (to > (buf+1)) {                  // remove trailing excess
-00181                 to--;
-00182                 if ((*to == 10) || (*to == ' '))
-00183                         *to = 0;
-00184                 else break;
-00185         }
-00186 }
-00187 
-00188 
-00189 /******************************************************************************
-00190  * RawVerse::gettext    - gets text at a given offset
-00191  *
-00192  * ENT: testmt  - testament file to search in (0 - Old; 1 - New)
-00193  *      start   - starting offset where the text is located in the file
-00194  *      size    - size of text entry + 2 (null)(null)
-00195  *      buf     - buffer to store text
-00196  *
-00197  */
-00198 
-00199 void RawVerse::gettext(char testmt, long start, unsigned short size, char *buf) {
-00200         memset(buf, 0, size+1);
-00201         if (!testmt)
-00202                 testmt = ((idxfp[1]) ? 1:2);
-00203         if (size) {
-00204                 if (textfp[testmt-1]->getFd() >= 0) {
-00205                         lseek(textfp[testmt-1]->getFd(), start, SEEK_SET);
-00206                         read(textfp[testmt-1]->getFd(), buf, (int)size - 2); 
-00207                 }
-00208         }
-00209 }
-00210 
-00211 
-00212 /******************************************************************************
-00213  * RawVerse::settext    - Sets text for current offset
-00214  *
-00215  * ENT: testmt  - testament to find (0 - Bible/module introduction)
-00216  *      idxoff  - offset into .vss
-00217  *      buf     - buffer to store
-00218  *      len     - length of buffer (0 - null terminated)
-00219  */
-00220 
-00221 void RawVerse::settext(char testmt, long idxoff, const char *buf, long len)
-00222 {
-00223         long start, outstart;
-00224         unsigned short size;
-00225         unsigned short outsize;
-00226         static const char nl[] = {13, 10};
-00227 
-00228         idxoff *= 6;
-00229         if (!testmt)
-00230                 testmt = ((idxfp[1]) ? 1:2);
-00231 
-00232         size = outsize = len ? len : strlen(buf);
-00233 
-00234         start = outstart = lseek(textfp[testmt-1]->getFd(), 0, SEEK_END);
-00235         lseek(idxfp[testmt-1]->getFd(), idxoff, SEEK_SET);
-00236 
-00237         if (size) {
-00238                 lseek(textfp[testmt-1]->getFd(), start, SEEK_SET);
-00239                 write(textfp[testmt-1]->getFd(), buf, (int)size);
-00240 
-00241                 // add a new line to make data file easier to read in an editor
-00242                 write(textfp[testmt-1]->getFd(), &nl, 2);
-00243         }
-00244         else {
-00245                 start = 0;
-00246         }
-00247 
-00248         outstart = archtosword32(start);
-00249         outsize  = archtosword16(size);
-00250 
-00251         write(idxfp[testmt-1]->getFd(), &outstart, 4);
-00252         write(idxfp[testmt-1]->getFd(), &outsize, 2);
-00253 
-00254 
-00255 }
-00256 
-00257 
-00258 /******************************************************************************
-00259  * RawVerse::linkentry  - links one entry to another
-00260  *
-00261  * ENT: testmt  - testament to find (0 - Bible/module introduction)
-00262  *      destidxoff      - dest offset into .vss
-00263  *      srcidxoff               - source offset into .vss
-00264  */
-00265 
-00266 void RawVerse::linkentry(char testmt, long destidxoff, long srcidxoff) {
-00267         long start;
-00268         unsigned short size;
-00269 
-00270         destidxoff *= 6;
-00271         srcidxoff  *= 6;
-00272 
-00273         if (!testmt)
-00274                 testmt = ((idxfp[1]) ? 1:2);
-00275 
-00276         // get source
-00277         lseek(idxfp[testmt-1]->getFd(), srcidxoff, SEEK_SET);
-00278         read(idxfp[testmt-1]->getFd(), &start, 4);
-00279         read(idxfp[testmt-1]->getFd(), &size, 2);
-00280 
-00281         // write dest
-00282         lseek(idxfp[testmt-1]->getFd(), destidxoff, SEEK_SET);
-00283         write(idxfp[testmt-1]->getFd(), &start, 4);
-00284         write(idxfp[testmt-1]->getFd(), &size, 2);
-00285 }
-00286 
-00287 
-00288 /******************************************************************************
-00289  * RawVerse::CreateModule       - Creates new module files
-00290  *
-00291  * ENT: path    - directory to store module files
-00292  * RET: error status
-00293  */
-00294 
-00295 char RawVerse::createModule(const char *ipath)
-00296 {
-00297         char *path = 0;
-00298         char *buf = new char [ strlen (ipath) + 20 ];
-00299         FileDesc *fd, *fd2;
-00300 
-00301         stdstr(&path, ipath);
-00302 
-00303         if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\'))
-00304                 path[strlen(path)-1] = 0;
-00305 
-00306         sprintf(buf, "%s/ot", path);
-00307         unlink(buf);
-00308         fd = FileMgr::systemFileMgr.open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-00309         fd->getFd();
-00310         FileMgr::systemFileMgr.close(fd);
-00311 
-00312         sprintf(buf, "%s/nt", path);
-00313         unlink(buf);
-00314         fd = FileMgr::systemFileMgr.open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-00315         fd->getFd();
-00316         FileMgr::systemFileMgr.close(fd);
-00317 
-00318         sprintf(buf, "%s/ot.vss", path);
-00319         unlink(buf);
-00320         fd = FileMgr::systemFileMgr.open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-00321         fd->getFd();
-00322 
-00323         sprintf(buf, "%s/nt.vss", path);
-00324         unlink(buf);
-00325         fd2 = FileMgr::systemFileMgr.open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-00326         fd2->getFd();
-00327 
-00328         VerseKey vk;
-00329         vk.Headings(1);
-00330         long offset = 0;
-00331         short size = 0;
-00332         for (vk = TOP; !vk.Error(); vk++) {
-00333                 write((vk.Testament() == 1) ? fd->getFd() : fd2->getFd(), &offset, 4);
-00334                 write((vk.Testament() == 1) ? fd->getFd() : fd2->getFd(), &size, 2);
-00335         }
-00336 
-00337         FileMgr::systemFileMgr.close(fd);
-00338         FileMgr::systemFileMgr.close(fd2);
-00339 
-00340         delete [] path;
-00341 /*
-00342         RawVerse rv(path);
-00343         VerseKey mykey("Rev 22:21");
-00344 */
-00345         
-00346         return 0;
-00347 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rawverse_8h-source.html b/doc/api-documentation/html/rawverse_8h-source.html deleted file mode 100644 index d247400..0000000 --- a/doc/api-documentation/html/rawverse_8h-source.html +++ /dev/null @@ -1,52 +0,0 @@ - - -rawverse.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rawverse.h

00001 /******************************************************************************
-00002  *  rawverse.h   - code for class 'RawVerse'- a module that reads raw text
-00003  *                      files:  ot and nt using indexs ??.bks ??.cps ??.vss
-00004  *                      and provides lookup and parsing functions based on
-00005  *                      class VerseKey
-00006  */
-00007 
-00008 #ifndef RAWVERSE_H
-00009 #define RAWVERSE_H
-00010 
-00011 #include <filemgr.h>
-00012 #include <fcntl.h>
-00013 
-00014 #include <defs.h>
-00015 
-00016 class SWDLLEXPORT RawVerse {
-00017   static int instance;          // number of instantiated RawVerse objects or derivitives
-00018 protected:
-00019   FileDesc *idxfp[2];
-00020   FileDesc *textfp[2];
-00021 
-00022   char *path;
-00023   void preptext (char *buf);
-00024   void settext (char testmt, long idxoff, const char *buf, long len = 0);
-00025   void linkentry (char testmt, long destidxoff, long srcidxoff);
-00026 
-00027 public:
-00028   char nl;
-00029     RawVerse (const char *ipath, int fileMode = -1);
-00030     virtual ~ RawVerse ();
-00031   void findoffset (char testmt, long idxoff, long *start,
-00032                    unsigned short *end);
-00033   void gettext (char testmt, long start, unsigned short size, char *buf);
-00034   static char createModule (const char *path);
-00035 };
-00036 
-00037 
-00038 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/regex_8h-source.html b/doc/api-documentation/html/regex_8h-source.html deleted file mode 100644 index 18a7b73..0000000 --- a/doc/api-documentation/html/regex_8h-source.html +++ /dev/null @@ -1,559 +0,0 @@ - - -regex.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

regex.h

00001 /* Definitions for data structures and routines for the regular
-00002    expression library, version 0.12.
-00003    Copyright (C) 1985,89,90,91,92,93,95,96,97 Free Software Foundation, Inc.
-00004 
-00005    the C library, however.  The master source lives in /gd/gnu/lib.
-00006 
-00007 NOTE: The canonical source of this file is maintained with the 
-00008 GNU C Library.  Bugs can be reported to bug-glibc@prep.ai.mit.edu.
-00009 
-00010 This program is free software; you can redistribute it and/or modify it
-00011 under the terms of the GNU General Public License as published by the
-00012 Free Software Foundation; either version 2, or (at your option) any
-00013 later version.
-00014 
-00015 This program is distributed in the hope that it will be useful,
-00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
-00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-00018 GNU General Public License for more details.
-00019 
-00020 You should have received a copy of the GNU General Public License
-00021 along with this program; if not, write to the Free Software Foundation, 
-00022 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-00023 
-00024 #ifndef _REGEX_H
-00025 #define _REGEX_H 1
-00026 
-00027 /* Allow the use in C++ code.  */
-00028 #ifdef __cplusplus
-00029 extern "C"
-00030 {
-00031 #endif
-00032 
-00033 /* POSIX says that <sys/types.h> must be included (by the caller) before
-00034    <regex.h>.  */
-00035 
-00036 #if !defined (_POSIX_C_SOURCE) && !defined (_POSIX_SOURCE) && defined (VMS)
-00037 /* VMS doesn't have `size_t' in <sys/types.h>, even though POSIX says it
-00038    should be there.  */
-00039 #include <stddef.h>
-00040 #endif
-00041 
-00042 /* The following two types have to be signed and unsigned integer type
-00043    wide enough to hold a value of a pointer.  For most ANSI compilers
-00044    ptrdiff_t and size_t should be likely OK.  Still size of these two
-00045    types is 2 for Microsoft C.  Ugh... */
-00046   typedef long int s_reg_t;
-00047   typedef unsigned long int active_reg_t;
-00048 
-00049 /* The following bits are used to determine the regexp syntax we
-00050    recognize.  The set/not-set meanings are chosen so that Emacs syntax
-00051    remains the value 0.  The bits are given in alphabetical order, and
-00052    the definitions shifted by one from the previous bit; thus, when we
-00053    add or remove a bit, only one other definition need change.  */
-00054   typedef unsigned long int reg_syntax_t;
-00055 
-00056 /* If this bit is not set, then \ inside a bracket expression is literal.
-00057    If set, then such a \ quotes the following character.  */
-00058 #define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
-00059 
-00060 /* If this bit is not set, then + and ? are operators, and \+ and \? are
-00061      literals.
-00062    If set, then \+ and \? are operators and + and ? are literals.  */
-00063 #define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
-00064 
-00065 /* If this bit is set, then character classes are supported.  They are:
-00066      [:alpha:], [:upper:], [:lower:],  [:digit:], [:alnum:], [:xdigit:],
-00067      [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:].
-00068    If not set, then character classes are not supported.  */
-00069 #define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
-00070 
-00071 /* If this bit is set, then ^ and $ are always anchors (outside bracket
-00072      expressions, of course).
-00073    If this bit is not set, then it depends:
-00074         ^  is an anchor if it is at the beginning of a regular
-00075            expression or after an open-group or an alternation operator;
-00076         $  is an anchor if it is at the end of a regular expression, or
-00077            before a close-group or an alternation operator.
-00078 
-00079    This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because
-00080    POSIX draft 11.2 says that * etc. in leading positions is undefined.
-00081    We already implemented a previous draft which made those constructs
-00082    invalid, though, so we haven't changed the code back.  */
-00083 #define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
-00084 
-00085 /* If this bit is set, then special characters are always special
-00086      regardless of where they are in the pattern.
-00087    If this bit is not set, then special characters are special only in
-00088      some contexts; otherwise they are ordinary.  Specifically,
-00089      * + ? and intervals are only special when not after the beginning,
-00090      open-group, or alternation operator.  */
-00091 #define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
-00092 
-00093 /* If this bit is set, then *, +, ?, and { cannot be first in an re or
-00094      immediately after an alternation or begin-group operator.  */
-00095 #define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
-00096 
-00097 /* If this bit is set, then . matches newline.
-00098    If not set, then it doesn't.  */
-00099 #define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
-00100 
-00101 /* If this bit is set, then . doesn't match NUL.
-00102    If not set, then it does.  */
-00103 #define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
-00104 
-00105 /* If this bit is set, nonmatching lists [^...] do not match newline.
-00106    If not set, they do.  */
-00107 #define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
-00108 
-00109 /* If this bit is set, either \{...\} or {...} defines an
-00110      interval, depending on RE_NO_BK_BRACES.
-00111    If not set, \{, \}, {, and } are literals.  */
-00112 #define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
-00113 
-00114 /* If this bit is set, +, ? and | aren't recognized as operators.
-00115    If not set, they are.  */
-00116 #define RE_LIMITED_OPS (RE_INTERVALS << 1)
-00117 
-00118 /* If this bit is set, newline is an alternation operator.
-00119    If not set, newline is literal.  */
-00120 #define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
-00121 
-00122 /* If this bit is set, then `{...}' defines an interval, and \{ and \}
-00123      are literals.
-00124   If not set, then `\{...\}' defines an interval.  */
-00125 #define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
-00126 
-00127 /* If this bit is set, (...) defines a group, and \( and \) are literals.
-00128    If not set, \(...\) defines a group, and ( and ) are literals.  */
-00129 #define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
-00130 
-00131 /* If this bit is set, then <digit> matches <digit>.
-00132    If not set, then <digit> is a back-reference.  */
-00133 #define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
-00134 
-00135 /* If this bit is set, then | is an alternation operator, and \| is literal.
-00136    If not set, then \| is an alternation operator, and | is literal.  */
-00137 #define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
-00138 
-00139 /* If this bit is set, then an ending range point collating higher
-00140      than the starting range point, as in [z-a], is invalid.
-00141    If not set, then when ending range point collates higher than the
-00142      starting range point, the range is ignored.  */
-00143 #define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
-00144 
-00145 /* If this bit is set, then an unmatched ) is ordinary.
-00146    If not set, then an unmatched ) is invalid.  */
-00147 #define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
-00148 
-00149 /* If this bit is set, succeed as soon as we match the whole pattern,
-00150    without further backtracking.  */
-00151 #define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
-00152 
-00153 /* If this bit is set, do not process the GNU regex operators.
-00154    If not set, then the GNU regex operators are recognized. */
-00155 #define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
-00156 
-00157 /* If this bit is set, turn on internal regex debugging.
-00158    If not set, and debugging was on, turn it off.
-00159    This only works if regex.c is compiled -DDEBUG.
-00160    We define this bit always, so that all that's needed to turn on
-00161    debugging is to recompile regex.c; the calling code can always have
-00162    this bit set, and it won't affect anything in the normal case. */
-00163 #define RE_DEBUG (RE_NO_GNU_OPS << 1)
-00164 
-00165 /* This global variable defines the particular regexp syntax to use (for
-00166    some interfaces).  When a regexp is compiled, the syntax used is
-00167    stored in the pattern buffer, so changing this does not affect
-00168    already-compiled regexps.  */
-00169   extern reg_syntax_t re_syntax_options;
-00170 
-00171 /* Define combinations of the above bits for the standard possibilities.
-00172    (The [[[ comments delimit what gets put into the Texinfo file, so
-00173    don't delete them!)  */
-00174 /* [[[begin syntaxes]]] */
-00175 #define RE_SYNTAX_EMACS 0
-00176 
-00177 #define RE_SYNTAX_AWK                                                   \
-00178   (RE_BACKSLASH_ESCAPE_IN_LISTS   | RE_DOT_NOT_NULL                     \
-00179    | RE_NO_BK_PARENS              | RE_NO_BK_REFS                       \
-00180    | RE_NO_BK_VBAR                | RE_NO_EMPTY_RANGES                  \
-00181    | RE_DOT_NEWLINE               | RE_CONTEXT_INDEP_ANCHORS            \
-00182    | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS)
-00183 
-00184 #define RE_SYNTAX_GNU_AWK                                               \
-00185   ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG) \
-00186    & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS))
-00187 
-00188 #define RE_SYNTAX_POSIX_AWK                                             \
-00189   (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS              \
-00190    | RE_INTERVALS           | RE_NO_GNU_OPS)
-00191 
-00192 #define RE_SYNTAX_GREP                                                  \
-00193   (RE_BK_PLUS_QM              | RE_CHAR_CLASSES                         \
-00194    | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS                            \
-00195    | RE_NEWLINE_ALT)
-00196 
-00197 #define RE_SYNTAX_EGREP                                                 \
-00198   (RE_CHAR_CLASSES        | RE_CONTEXT_INDEP_ANCHORS                    \
-00199    | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE                    \
-00200    | RE_NEWLINE_ALT       | RE_NO_BK_PARENS                             \
-00201    | RE_NO_BK_VBAR)
-00202 
-00203 #define RE_SYNTAX_POSIX_EGREP                                           \
-00204   (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES)
-00205 
-00206 /* P1003.2/D11.2, section 4.20.7.1, lines 5078ff.  */
-00207 #define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
-00208 
-00209 #define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC
-00210 
-00211 /* Syntax bits common to both basic and extended POSIX regex syntax.  */
-00212 #define _RE_SYNTAX_POSIX_COMMON                                         \
-00213   (RE_CHAR_CLASSES | RE_DOT_NEWLINE      | RE_DOT_NOT_NULL              \
-00214    | RE_INTERVALS  | RE_NO_EMPTY_RANGES)
-00215 
-00216 #define RE_SYNTAX_POSIX_BASIC                                           \
-00217   (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM)
-00218 
-00219 /* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes
-00220    RE_LIMITED_OPS, i.e., \? \+ \| are not recognized.  Actually, this
-00221    isn't minimal, since other operators, such as \`, aren't disabled.  */
-00222 #define RE_SYNTAX_POSIX_MINIMAL_BASIC                                   \
-00223   (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS)
-00224 
-00225 #define RE_SYNTAX_POSIX_EXTENDED                                        \
-00226   (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS                   \
-00227    | RE_CONTEXT_INDEP_OPS  | RE_NO_BK_BRACES                            \
-00228    | RE_NO_BK_PARENS       | RE_NO_BK_VBAR                              \
-00229    | RE_UNMATCHED_RIGHT_PAREN_ORD)
-00230 
-00231 /* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INVALID_OPS
-00232    replaces RE_CONTEXT_INDEP_OPS and RE_NO_BK_REFS is added.  */
-00233 #define RE_SYNTAX_POSIX_MINIMAL_EXTENDED                                \
-00234   (_RE_SYNTAX_POSIX_COMMON  | RE_CONTEXT_INDEP_ANCHORS                  \
-00235    | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES                           \
-00236    | RE_NO_BK_PARENS        | RE_NO_BK_REFS                             \
-00237    | RE_NO_BK_VBAR          | RE_UNMATCHED_RIGHT_PAREN_ORD)
-00238 /* [[[end syntaxes]]] */
-00239 
-00240 /* Maximum number of duplicates an interval can allow.  Some systems
-00241    (erroneously) define this in other header files, but we want our
-00242    value, so remove any previous define.  */
-00243 #ifdef RE_DUP_MAX
-00244 #undef RE_DUP_MAX
-00245 #endif
-00246 /* If sizeof(int) == 2, then ((1 << 15) - 1) overflows.  */
-00247 #define RE_DUP_MAX (0x7fff)
-00248 
-00249 
-00250 /* POSIX `cflags' bits (i.e., information for `regcomp').  */
-00251 
-00252 /* If this bit is set, then use extended regular expression syntax.
-00253    If not set, then use basic regular expression syntax.  */
-00254 #define REG_EXTENDED 1
-00255 
-00256 /* If this bit is set, then ignore case when matching.
-00257    If not set, then case is significant.  */
-00258 #define REG_ICASE (REG_EXTENDED << 1)
-00259 
-00260 /* If this bit is set, then anchors do not match at newline
-00261      characters in the string.
-00262    If not set, then anchors do match at newlines.  */
-00263 #define REG_NEWLINE (REG_ICASE << 1)
-00264 
-00265 /* If this bit is set, then report only success or fail in regexec.
-00266    If not set, then returns differ between not matching and errors.  */
-00267 #define REG_NOSUB (REG_NEWLINE << 1)
-00268 
-00269 
-00270 /* POSIX `eflags' bits (i.e., information for regexec).  */
-00271 
-00272 /* If this bit is set, then the beginning-of-line operator doesn't match
-00273      the beginning of the string (presumably because it's not the
-00274      beginning of a line).
-00275    If not set, then the beginning-of-line operator does match the
-00276      beginning of the string.  */
-00277 #define REG_NOTBOL 1
-00278 
-00279 /* Like REG_NOTBOL, except for the end-of-line.  */
-00280 #define REG_NOTEOL (1 << 1)
-00281 
-00282 
-00283 /* If any error codes are removed, changed, or added, update the
-00284    `re_error_msg' table in regex.c.  */
-00285   typedef enum
-00286   {
-00287     REG_NOERROR = 0,            /* Success.  */
-00288     REG_NOMATCH,                /* Didn't find a match (for regexec).  */
-00289 
-00290     /* POSIX regcomp return error codes.  (In the order listed in the
-00291        standard.)  */
-00292     REG_BADPAT,                 /* Invalid pattern.  */
-00293     REG_ECOLLATE,               /* Not implemented.  */
-00294     REG_ECTYPE,                 /* Invalid character class name.  */
-00295     REG_EESCAPE,                /* Trailing backslash.  */
-00296     REG_ESUBREG,                /* Invalid back reference.  */
-00297     REG_EBRACK,                 /* Unmatched left bracket.  */
-00298     REG_EPAREN,                 /* Parenthesis imbalance.  */
-00299     REG_EBRACE,                 /* Unmatched \{.  */
-00300     REG_BADBR,                  /* Invalid contents of \{\}.  */
-00301     REG_ERANGE,                 /* Invalid range end.  */
-00302     REG_ESPACE,                 /* Ran out of memory.  */
-00303     REG_BADRPT,                 /* No preceding re for repetition op.  */
-00304 
-00305     /* Error codes we've added.  */
-00306     REG_EEND,                   /* Premature end.  */
-00307     REG_ESIZE,                  /* Compiled pattern bigger than 2^16 bytes.  */
-00308     REG_ERPAREN                 /* Unmatched ) or \); not returned from regcomp.  */
-00309   }
-00310   reg_errcode_t;
-00311 
-00312 /* This data structure represents a compiled pattern.  Before calling
-00313    the pattern compiler, the fields `buffer', `allocated', `fastmap',
-00314    `translate', and `no_sub' can be set.  After the pattern has been
-00315    compiled, the `re_nsub' field is available.  All other fields are
-00316    private to the regex routines.  */
-00317 
-00318 #ifndef RE_TRANSLATE_TYPE
-00319 #define RE_TRANSLATE_TYPE char *
-00320 #endif
-00321 
-00322   struct re_pattern_buffer
-00323   {
-00324 /* [[[begin pattern_buffer]]] */
-00325     /* Space that holds the compiled pattern.  It is declared as
-00326        `unsigned char *' because its elements are
-00327        sometimes used as array indexes.  */
-00328     unsigned char *buffer;
-00329 
-00330     /* Number of bytes to which `buffer' points.  */
-00331     unsigned long int allocated;
-00332 
-00333     /* Number of bytes actually used in `buffer'.  */
-00334     unsigned long int used;
-00335 
-00336     /* Syntax setting with which the pattern was compiled.  */
-00337     reg_syntax_t syntax;
-00338 
-00339     /* Pointer to a fastmap, if any, otherwise zero.  re_search uses
-00340        the fastmap, if there is one, to skip over impossible
-00341        starting points for matches.  */
-00342     char *fastmap;
-00343 
-00344     /* Either a translate table to apply to all characters before
-00345        comparing them, or zero for no translation.  The translation
-00346        is applied to a pattern when it is compiled and to a string
-00347        when it is matched.  */
-00348     RE_TRANSLATE_TYPE translate;
-00349 
-00350     /* Number of subexpressions found by the compiler.  */
-00351     size_t re_nsub;
-00352 
-00353     /* Zero if this pattern cannot match the empty string, one else.
-00354        Well, in truth it's used only in `re_search_2', to see
-00355        whether or not we should use the fastmap, so we don't set
-00356        this absolutely perfectly; see `re_compile_fastmap' (the
-00357        `duplicate' case).  */
-00358     unsigned can_be_null:1;
-00359 
-00360     /* If REGS_UNALLOCATED, allocate space in the `regs' structure
-00361        for `max (RE_NREGS, re_nsub + 1)' groups.
-00362        If REGS_REALLOCATE, reallocate space if necessary.
-00363        If REGS_FIXED, use what's there.  */
-00364 #define REGS_UNALLOCATED 0
-00365 #define REGS_REALLOCATE 1
-00366 #define REGS_FIXED 2
-00367     unsigned regs_allocated:2;
-00368 
-00369     /* Set to zero when `regex_compile' compiles a pattern; set to one
-00370        by `re_compile_fastmap' if it updates the fastmap.  */
-00371     unsigned fastmap_accurate:1;
-00372 
-00373     /* If set, `re_match_2' does not return information about
-00374        subexpressions.  */
-00375     unsigned no_sub:1;
-00376 
-00377     /* If set, a beginning-of-line anchor doesn't match at the
-00378        beginning of the string.  */
-00379     unsigned not_bol:1;
-00380 
-00381     /* Similarly for an end-of-line anchor.  */
-00382     unsigned not_eol:1;
-00383 
-00384     /* If true, an anchor at a newline matches.  */
-00385     unsigned newline_anchor:1;
-00386 
-00387 /* [[[end pattern_buffer]]] */
-00388   };
-00389 
-00390   typedef struct re_pattern_buffer regex_t;
-00391 
-00392 /* Type for byte offsets within the string.  POSIX mandates this.  */
-00393   typedef int regoff_t;
-00394 
-00395 
-00396 /* This is the structure we store register match data in.  See
-00397    regex.texinfo for a full description of what registers match.  */
-00398   struct re_registers
-00399   {
-00400     unsigned num_regs;
-00401     regoff_t *start;
-00402     regoff_t *end;
-00403   };
-00404 
-00405 
-00406 /* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer,
-00407    `re_match_2' returns information about at least this many registers
-00408    the first time a `regs' structure is passed.  */
-00409 #ifndef RE_NREGS
-00410 #define RE_NREGS 30
-00411 #endif
-00412 
-00413 
-00414 /* POSIX specification for registers.  Aside from the different names than
-00415    `re_registers', POSIX uses an array of structures, instead of a
-00416    structure of arrays.  */
-00417   typedef struct
-00418   {
-00419     regoff_t rm_so;             /* Byte offset from string's start to substring's start.  */
-00420     regoff_t rm_eo;             /* Byte offset from string's start to substring's end.  */
-00421   }
-00422   regmatch_t;
-00423 
-00424 /* Declarations for routines.  */
-00425 
-00426 /* To avoid duplicating every routine declaration -- once with a
-00427         prototype (if we are ANSI), and once without (if we aren't) -- we
-00428    use the following macro to declare argument types.  This
-00429    unfortunately clutters up the declarations a bit, but I think it's
-00430    worth it.  */
-00431 #ifndef __STDC__
-00432 #define __STDC__ 1
-00433 #endif
-00434 #if __STDC__
-00435 
-00436 #define _RE_ARGS(args) args
-00437 
-00438 #else                           /* not __STDC__ */
-00439 
-00440 #define _RE_ARGS(args) ()
-00441 
-00442 #endif                          /* not __STDC__ */
-00443 
-00444 /* Sets the current default syntax to SYNTAX, and return the old syntax.
-00445    You can also simply assign to the `re_syntax_options' variable.  */
-00446   extern reg_syntax_t re_set_syntax _RE_ARGS ((reg_syntax_t syntax));
-00447 
-00448 /* Compile the regular expression PATTERN, with length LENGTH
-00449    and syntax given by the global `re_syntax_options', into the buffer
-00450    BUFFER.  Return NULL if successful, and an error string if not.  */
-00451   extern const char *re_compile_pattern
-00452     _RE_ARGS ((const char *pattern, size_t length,
-00453                struct re_pattern_buffer * buffer));
-00454 
-00455 
-00456 /* Compile a fastmap for the compiled pattern in BUFFER; used to
-00457    accelerate searches.  Return 0 if successful and -2 if was an
-00458    internal error.  */
-00459   extern int re_compile_fastmap
-00460     _RE_ARGS ((struct re_pattern_buffer * buffer));
-00461 
-00462 
-00463 /* Search in the string STRING (with length LENGTH) for the pattern
-00464    compiled into BUFFER.  Start searching at position START, for RANGE
-00465    characters.  Return the starting position of the match, -1 for no
-00466    match, or -2 for an internal error.  Also return register
-00467    information in REGS (if REGS and BUFFER->no_sub are nonzero).  */
-00468   extern int re_search
-00469     _RE_ARGS ((struct re_pattern_buffer * buffer, const char *string,
-00470                int length, int start, int range, struct re_registers * regs));
-00471 
-00472 
-00473 /* Like `re_search', but search in the concatenation of STRING1 and
-00474    STRING2.  Also, stop searching at index START + STOP.  */
-00475   extern int re_search_2
-00476     _RE_ARGS ((struct re_pattern_buffer * buffer, const char *string1,
-00477                int length1, const char *string2, int length2,
-00478                int start, int range, struct re_registers * regs, int stop));
-00479 
-00480 
-00481 /* Like `re_search', but return how many characters in STRING the regexp
-00482    in BUFFER matched, starting at position START.  */
-00483   extern int re_match
-00484     _RE_ARGS ((struct re_pattern_buffer * buffer, const char *string,
-00485                int length, int start, struct re_registers * regs));
-00486 
-00487 
-00488 /* Relates to `re_match' as `re_search_2' relates to `re_search'.  */
-00489   extern int re_match_2
-00490     _RE_ARGS ((struct re_pattern_buffer * buffer, const char *string1,
-00491                int length1, const char *string2, int length2,
-00492                int start, struct re_registers * regs, int stop));
-00493 
-00494 
-00495 /* Set REGS to hold NUM_REGS registers, storing them in STARTS and
-00496    ENDS.  Subsequent matches using BUFFER and REGS will use this memory
-00497    for recording register information.  STARTS and ENDS must be
-00498    allocated with malloc, and must each be at least `NUM_REGS * sizeof
-00499    (regoff_t)' bytes long.
-00500 
-00501    If NUM_REGS == 0, then subsequent matches should allocate their own
-00502    register data.
-00503 
-00504    Unless this function is called, the first search or match using
-00505    PATTERN_BUFFER will allocate its own register data, without
-00506    freeing the old data.  */
-00507   extern void re_set_registers
-00508     _RE_ARGS ((struct re_pattern_buffer * buffer, struct re_registers * regs,
-00509                unsigned num_regs, regoff_t * starts, regoff_t * ends));
-00510 
-00511 #ifdef _REGEX_RE_COMP
-00512 #ifndef _CRAY
-00513 /* 4.2 bsd compatibility.  */
-00514   extern char *re_comp _RE_ARGS ((const char *));
-00515   extern int re_exec _RE_ARGS ((const char *));
-00516 #endif
-00517 #endif
-00518 
-00519 /* POSIX compatibility.  */
-00520   extern int regcomp
-00521     _RE_ARGS ((regex_t * preg, const char *pattern, int cflags));
-00522   extern int regexec
-00523     _RE_ARGS (
-00524               (const regex_t * preg, const char *string, size_t nmatch,
-00525                regmatch_t pmatch[], int eflags));
-00526   extern size_t regerror
-00527     _RE_ARGS (
-00528               (int errcode, const regex_t * preg, char *errbuf,
-00529                size_t errbuf_size));
-00530   extern void regfree _RE_ARGS ((regex_t * preg));
-00531 
-00532 
-00533 #ifdef __cplusplus
-00534 }
-00535 #endif                          /* C++ */
-00536 
-00537 #endif                          /* regex.h */
-00538 
-00539 /*
-00540 Local variables:
-00541 make-backup-files: t
-00542 version-control: t
-00543 trim-versions-without-asking: nil
-00544 End:
-00545 */
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/roman_8h-source.html b/doc/api-documentation/html/roman_8h-source.html deleted file mode 100644 index 87dac78..0000000 --- a/doc/api-documentation/html/roman_8h-source.html +++ /dev/null @@ -1,39 +0,0 @@ - - -roman.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

roman.h

00001 /******************************************************************************
-00002  *  roman.h     - roman numeral functions
-00003  *
-00004  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00005  *      CrossWire Bible Society
-00006  *      P. O. Box 2528
-00007  *      Tempe, AZ  85280-2528
-00008  *
-00009  * This program is free software; you can redistribute it and/or modify it
-00010  * under the terms of the GNU General Public License as published by the
-00011  * Free Software Foundation version 2.
-00012  *
-00013  * This program is distributed in the hope that it will be useful, but
-00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00016  * General Public License for more details.
-00017  *
-00018  */
-00019 #ifndef ROMAN_H
-00020 #define ROMAN_H
-00021 char isroman(const char *);
-00022 /* char* to_rom(int num, char *p); */
-00023 int from_rom(const char *s);
-00024 
-00025 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rtfhtml_8cpp-source.html b/doc/api-documentation/html/rtfhtml_8cpp-source.html deleted file mode 100644 index 47280d8..0000000 --- a/doc/api-documentation/html/rtfhtml_8cpp-source.html +++ /dev/null @@ -1,113 +0,0 @@ - - -rtfhtml.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rtfhtml.cpp

00001 /***************************************************************************
-00002                           rtfhtml.cpp  -  description
-00003                              -------------------
-00004     begin                : Wed Oct 13 1999
-00005     copyright            : (C) 1999 by The team of BibleTime
-00006     email                : info@bibletime.de
-00007  ***************************************************************************/
-00008 
-00009 /***************************************************************************
-00010  *                                                                         *
-00011  *   This program is free software; you can redistribute it and/or modify  *
-00012  *   it under the terms of the GNU General Public License as published by  *
-00013  *   the Free Software Foundation; either version 2 of the License, or     *
-00014  *   (at your option) any later version.                                   *
-00015  *                                                                         *
-00016  ***************************************************************************/
-00017 
-00018 #include <stdlib.h>
-00019 #include <string.h>
-00020 #include <rtfhtml.h>
-00021 
-00022 
-00023 RTFHTML::RTFHTML() {
-00024 
-00025 }
-00026 
-00027 
-00028 char RTFHTML::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00029 {
-00030         char *to, *from;
-00031         int len;
-00032         bool center = false;
-00033 
-00034         len = strlen(text) + 1;                                         // shift string to right of buffer
-00035         if (len < maxlen) {
-00036                 memmove(&text[maxlen - len], text, len);
-00037                 from = &text[maxlen - len];
-00038         }
-00039         else    from = text;                                                    // -------------------------------
-00040         for (to = text; *from; from++) {
-00041                 if (*from == '\\') // a RTF command
-00042                 {
-00043                         if ((from[1] == 'p') && (from[2] == 'a') && (from[3] == 'r') && (from[4] == 'd'))
-00044                         { // switch all modifier off
-00045                                 if (center)
-00046                                 {
-00047                                         *to++ = '<';
-00048                                         *to++ = '/';
-00049                                         *to++ = 'C';
-00050                                         *to++ = 'E';
-00051                                         *to++ = 'N';
-00052                                         *to++ = 'T';
-00053                                         *to++ = 'E';
-00054                                         *to++ = 'R';
-00055                                         *to++ = '>';
-00056                                         center = false;
-00057                                 }
-00058                                 from += 4;
-00059                                 continue;
-00060                         }
-00061                         if ((from[1] == 'p') && (from[2] == 'a') && (from[3] == 'r'))
-00062                         {
-00063                                 *to++ = '<';
-00064                                 *to++ = 'P';
-00065                                 *to++ = '>';
-00066                                 *to++ = '\n';
-00067                                 from += 3;
-00068                                 continue;
-00069                         }
-00070                         if (from[1] == ' ')
-00071                         {
-00072                                 from += 1;
-00073                                 continue;
-00074                         }
-00075                         if ((from[1] == 'q') && (from[2] == 'c')) // center on
-00076                         {
-00077                                 if (!center)
-00078                                 {
-00079                                         *to++ = '<';
-00080                                         *to++ = 'C';
-00081                                         *to++ = 'E';
-00082                                         *to++ = 'N';
-00083                                         *to++ = 'T';
-00084                                         *to++ = 'E';
-00085                                         *to++ = 'R';
-00086                                         *to++ = '>';
-00087                                         center = true;
-00088                                 }
-00089                                 from += 2;
-00090                                 continue;
-00091                         }
-00092                 }
-00093 
-00094                 *to++ = *from;
-00095         }
-00096         *to++ = 0;
-00097         *to = 0;
-00098         return 0;
-00099 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rtfhtml_8h-source.html b/doc/api-documentation/html/rtfhtml_8h-source.html deleted file mode 100644 index 4e2fde5..0000000 --- a/doc/api-documentation/html/rtfhtml_8h-source.html +++ /dev/null @@ -1,49 +0,0 @@ - - -rtfhtml.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rtfhtml.h

00001 /***************************************************************************
-00002                           rtfhtml.h  -  description                              
-00003                              -------------------                                         
-00004     begin                : Wed Oct 13 1999                                           
-00005     copyright            : (C) 1999 by The team of BibleTime                         
-00006     email                : info@bibletime.de                                     
-00007  ***************************************************************************/
-00008 
-00009 /***************************************************************************
-00010  *                                                                         *
-00011  *   This program is free software; you can redistribute it and/or modify  *
-00012  *   it under the terms of the GNU General Public License as published by  *
-00013  *   the Free Software Foundation; either version 2 of the License, or     *
-00014  *   (at your option) any later version.                                   * 
-00015  *                                                                         *
-00016  ***************************************************************************/
-00017 
-00018 /* $Header: /usr/local/cvsroot/sword/doc/api-documentation/html/rtfhtml_8h-source.html,v 1.7 2002/06/20 20:23:09 mgruner Exp $ */
-00019 /* $Revision: 1.7 $ */
-00020 
-00021 #ifndef RTFHTML_H
-00022 #define RTFHTML_H
-00023 
-00024 #include <swfilter.h>
-00025 
-00026 #include <defs.h>
-00027 
-00030 class SWDLLEXPORT RTFHTML:public SWFilter
-00031 {
-00032 public:
-00033   RTFHTML ();
-00034   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00035 };
-00036 
-00037 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rwphtml_8cpp-source.html b/doc/api-documentation/html/rwphtml_8cpp-source.html deleted file mode 100644 index eca1cfd..0000000 --- a/doc/api-documentation/html/rwphtml_8cpp-source.html +++ /dev/null @@ -1,201 +0,0 @@ - - -rwphtml.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rwphtml.cpp

00001 /***************************************************************************
-00002                           rwphtml.cpp  -  description
-00003                              -------------------
-00004     begin                : Thu Jun 24 1999
-00005     copyright            : (C) 1999 by Torsten Uhlmann
-00006     email                : TUhlmann@gmx.de
-00007  ***************************************************************************/
-00008 
-00009 /***************************************************************************
-00010  *                                                                         *
-00011  *   This program is free software; you can redistribute it and/or modify  *
-00012  *   it under the terms of the GNU General Public License as published by  *
-00013  *   the Free Software Foundation; either version 2 of the License, or     *
-00014  *   (at your option) any later version.                                   *
-00015  *                                                                         *
-00016  ***************************************************************************/
-00017 
-00018 #include <stdlib.h>
-00019 #include <string.h>
-00020 #include <ctype.h>
-00021 #include <rwphtml.h>
-00022 
-00023 RWPHTML::RWPHTML()
-00024 {
-00025 }
-00026 
-00027 
-00028 char RWPHTML::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00029 {
-00030         char *to, *from; 
-00031         signed char greek_str[500];
-00032         bool inverse = false;
-00033         bool first_letter = false;
-00034         int len;
-00035 
-00036         len = strlen(text) + 1; // shift string to right of buffer
-00037         if (len < maxlen) {
-00038                 memmove(&text[maxlen - len], text, len);
-00039                 from = &text[maxlen - len];
-00040         } else
-00041                 from = text;    
-00042         for (to = text; *from; from++) {
-00043                 if (*from == '\\') {
-00044                         ++from;
-00045                         int i=0;
-00046                         first_letter = true;
-00047                         greek_str[0] = '\0';                    
-00048                         while (*from != '\\') { /* get the greek word or phrase */
-00049                                 greek_str[i++] = *from;
-00050                                 greek_str[i + 1] = '\0';
-00051                                 from++;
-00052                         } /* convert to symbol font as best we can */
-00053                         strcpy(to,"<I> </I><FONT FACE=\"symbol\">");
-00054                         to += strlen(to);
-00055                         for (int j = 0; j < i; j++) {
-00056                                 if ((first_letter)
-00057                                     && (greek_str[j] == 'h')) {
-00058                                         if (greek_str[j + 1] == 'o') {
-00059                                                 *to++ = 'o';
-00060                                                 first_letter = false;
-00061                                                 ++j;
-00062                                                 continue;
-00063                                         } else if (greek_str[j + 1] == 'a') {
-00064                                                 *to++ = 'a';
-00065                                                 first_letter = false;
-00066                                                 ++j;
-00067                                                 continue;
-00068                                         } else if (greek_str[j + 1] == 'w') {
-00069                                                 *to++ = 'w';
-00070                                                 first_letter = false;
-00071                                                 ++j;
-00072                                                 continue;
-00073                                         } else if (greek_str[j + 1] == 'u') {
-00074                                                 *to++ = 'u';
-00075                                                 first_letter = false;
-00076                                                 ++j;
-00077                                                 continue;
-00078                                         } else if (greek_str[j + 1] ==
-00079                                                    -109) {
-00080                                                 *to++ = 'w';
-00081                                                 first_letter = false;
-00082                                                 ++j;
-00083                                                 continue;
-00084                                         } else if (greek_str[j + 1] ==
-00085                                                    -120) {
-00086                                                 *to++ = 'h';
-00087                                                 first_letter = false;
-00088                                                 ++j;
-00089                                                 continue;
-00090                                         } else if (greek_str[j + 1] == 'i') {
-00091                                                 *to++ = 'i';
-00092                                                 first_letter = false;
-00093                                                 ++j;
-00094                                                 continue;
-00095                                         }else if (greek_str[j + 1] == 'e') {
-00096                                                 *to++ = 'e';
-00097                                                 first_letter = false;
-00098                                                 ++j;
-00099                                                 continue;
-00100                                         }
-00101                                         first_letter = false;
-00102                                 }
-00103                                 if ((greek_str[j] == 't')
-00104                                     && (greek_str[j + 1] == 'h')) {
-00105                                         *to++ = 'q';
-00106                                         ++j;
-00107                                         continue;
-00108                                 }
-00109                                 if ((greek_str[j] == 'c')
-00110                                     && (greek_str[j + 1] == 'h')) {
-00111                                         *to++ = 'c';
-00112                                         ++j;
-00113                                         continue;
-00114                                 }
-00115                                 if ((greek_str[j] == 'p')
-00116                                     && (greek_str[j + 1] == 'h')) {
-00117                                         ++j;
-00118                                         *to++ = 'f';
-00119                                         continue;
-00120                                 }
-00121                                 if (greek_str[j] == -120) {
-00122                                         *to++ = 'h';
-00123                                         continue;
-00124                                 }
-00125                                 if (greek_str[j] == -125) {
-00126                                         *to++ = 'a';
-00127                                         continue;
-00128                                 }
-00129                                 if (greek_str[j] == -109) {
-00130                                         if(greek_str[j+1] == 'i') ++j;
-00131                                         *to++ = 'w';
-00132                                         continue;
-00133                                 }
-00134                                 if (greek_str[j] == ' ')
-00135                                         first_letter = true;
-00136                                 if (greek_str[j] == 's') {
-00137                                         if(isalpha(greek_str[j + 1])) *to++ = 's';
-00138                                         else if(!isprint(greek_str[j] )) *to++ = 's';                                           
-00139                                         else *to++ = 'V';
-00140                                         continue;                                       
-00141                                 }
-00142                                 if (greek_str[j] == '\'') {                                     
-00143                                         continue;
-00144                                 }
-00145                                 *to++ = greek_str[j];
-00146                         }
-00147                         strcpy(to,"</FONT><I> </I>");
-00148                         to += strlen(to);
-00149                         continue;
-00150                 }
-00151                 if (*from == '#') {     // verse markings (e.g. "#Mark 1:1|")
-00152                         inverse = true;
-00153                         strcpy(to,"<FONT COLOR=#0000FF>");
-00154                         to += strlen(to);                       
-00155                         continue;
-00156                 }
-00157                 if ((*from == '|') && (inverse)) {
-00158                         inverse = false;
-00159                         strcpy(to,"</FONT>");
-00160                         to += strlen(to);
-00161                         continue;
-00162                 }
-00163                 if (*from == '{') {
-00164                         strcpy(to,"<BR><STRONG>");
-00165                         to += strlen(to);
-00166                         if ((from - &text[maxlen - len]) > 10) { // not the beginning of the entry
-00167                                 strcpy(to,"<P>");
-00168                                 to += strlen(to);
-00169                         }
-00170                         continue;
-00171                 }
-00172                 if (*from == '}') {
-00173                         strcpy(to," </STRONG>");
-00174                         to += strlen(to);
-00175                         continue;
-00176                 }
-00177                 if ((*from == '\n') && (from[1] == '\n')) {
-00178                         strcpy(to,"<P>");
-00179                         to += strlen(to);
-00180                         continue;
-00181                 }
-00182                 *to++ = *from;
-00183         }
-00184         *to++ = 0;
-00185         *to = 0;        
-00186         return 0;
-00187 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rwphtml_8h-source.html b/doc/api-documentation/html/rwphtml_8h-source.html deleted file mode 100644 index 0912f77..0000000 --- a/doc/api-documentation/html/rwphtml_8h-source.html +++ /dev/null @@ -1,50 +0,0 @@ - - -rwphtml.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rwphtml.h

00001 /***************************************************************************
-00002                           rwphtml.h  -  description
-00003                              -------------------
-00004     begin                : Tue Jun 15 15:34:26 CEST 1999
-00005 
-00006     copyright            : (C) 1999 by Torsten Uhlmann
-00007     email                : TUhlmann@gmx.de
-00008  ***************************************************************************/
-00009 
-00010 /***************************************************************************
-00011  *                                                                         *
-00012  *   This program is free software; you can redistribute it and/or modify  *
-00013  *   it under the terms of the GNU General Public License as published by  *
-00014  *   the Free Software Foundation; either version 2 of the License, or     *
-00015  *   (at your option) any later version.                                   *
-00016  *                                                                         *
-00017  ***************************************************************************/
-00018 
-00019 /* $Header: /usr/local/cvsroot/sword/doc/api-documentation/html/rwphtml_8h-source.html,v 1.7 2002/06/20 20:23:09 mgruner Exp $ */
-00020 /* $Revision: 1.7 $ */
-00021 
-00022 #ifndef RWPHTML_H
-00023 #define RWPHTML_H
-00024 
-00025 #include <swfilter.h>
-00026 
-00027 #include <defs.h>
-00028 
-00031 class SWDLLEXPORT RWPHTML:public SWFilter
-00032 {
-00033 public:
-00034   RWPHTML ();
-00035   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00036 };
-00037 
-00038 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rwpidx_8cpp-source.html b/doc/api-documentation/html/rwpidx_8cpp-source.html deleted file mode 100644 index 772691b..0000000 --- a/doc/api-documentation/html/rwpidx_8cpp-source.html +++ /dev/null @@ -1,280 +0,0 @@ - - -rwpidx.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rwpidx.cpp

00001 /*****************************************************************************
-00002  *
-00003  *      This code wreaks but works (at least for RWP).  Good luck!
-00004  */
-00005 
-00006 #include <stdio.h>
-00007 #include <stdlib.h>
-00008 #include <string.h>
-00009 #include <ctype.h>
-00010 
-00011 #ifndef __GNUC__
-00012 #include <io.h>
-00013 #else
-00014 #include <unistd.h>
-00015 #endif
-00016 
-00017 #include <fcntl.h>
-00018 #include <versekey.h>
-00019 
-00020 
-00021 void writeidx(VerseKey &key1, VerseKey &key2, VerseKey &key3, long offset, short size);
-00022 char findbreak(int fp, long *offset, int *num1, int *num2, int *rangemax, short *size);
-00023 void openfiles(char *fname);
-00024 void checkparams(int argc, char **argv);
-00025 
-00026 
-00027 VerseKey key1, key2, key3;
-00028 int fp, vfp, cfp, bfp;
-00029 long chapoffset;
-00030 short chapsize;
-00031 char testmnt;
-00032 
-00033 
-00034 main(int argc, char **argv)
-00035 {
-00036         long pos, offset;
-00037         int num1 = 0, num2 = 0, rangemax, curbook = 0, curchap = 0, curverse = 0;
-00038         char buf[127], startflag = 0;
-00039         short size, tmp;
-00040 
-00041         checkparams(argc, argv);
-00042 
-00043         openfiles(argv[1]);
-00044 
-00045         testmnt = key1.Testament();
-00046         pos  = 0;
-00047         write(bfp, &pos, 4);  /* Book    offset for testament intros */
-00048         pos = 4;
-00049         write(cfp, &pos, 4);  /* Chapter offset for testament intro */
-00050 
-00051 
-00052 /*      Right now just zero out intros until parsing correctly */
-00053         pos = 0;
-00054         size = 0;
-00055         write(vfp, &pos, 4);  /* Module intro */
-00056         write(vfp, &size, 2);
-00057         write(vfp, &pos, 4);  /* Testament intro */
-00058         write(vfp, &size, 2);
-00059 
-00060         while(!findbreak(fp, &offset, &num1, &num2, &rangemax, &size)) {
-00061                 if (num2) {                             
-00062                         key2.Verse(1);
-00063                         key2.Chapter(num1);
-00064                         key2.Verse(num2);
-00065                 }
-00066                 else {
-00067                         key2.Verse(1);
-00068                         if (!startflag) {
-00069                                 startflag = 1;
-00070                         }
-00071                         else {
-00072                                 if (num1 <= key2.Chapter()) { // new book
-00073                                         key2.Chapter(1);
-00074                                         key2.Book(key2.Book()+1);
-00075                                 }
-00076                         }
-00077                         key2.Chapter(num1);
-00078                         printf("Found Chapter Break: %d ('%s')\n", num1, (const char *)key2);
-00079                         chapoffset = offset;
-00080                         chapsize = size;
-00081                         continue;
-00082                 }
-00083 
-00084                 key3 = key2;
-00085                 key3 += (rangemax - key3.Verse());
-00086 
-00087                 printf("Found verse Break: ('%s')\n", (const char *)key2);
-00088                 writeidx(key1, key2, key3, offset, size);
-00089         }
-00090         close(vfp);
-00091         close(cfp);
-00092         close(bfp);
-00093         close(fp);
-00094 }
-00095 
-00096 
-00097 /**************************************************************************
-00098  * ENT: key1    - current location of index
-00099  *      key2    - minimum keyval for which this offset is valid
-00100  *      key3    - maximum keyval for which this offset is valid
-00101  */
-00102 
-00103 void writeidx(VerseKey &key1, VerseKey &key2, VerseKey &key3, long offset, short size)
-00104 {
-00105         long pos;
-00106         short tmp;
-00107 
-00108         for (; ((key1 <= key3) && (key1.Error() != KEYERR_OUTOFBOUNDS) && (key1.Testament() == testmnt)); key1+=1) {
-00109                 if (key1.Verse() == 1) {        // new chapter
-00110                         if (key1.Chapter() == 1) {      // new book
-00111                                 pos = lseek(cfp, 0, SEEK_CUR);
-00112                                 write(bfp, &pos, 4);
-00113                                 pos = lseek(vfp, 0, SEEK_CUR); /* Book intro (cps) */
-00114                                 write(cfp, &pos, 4);
-00115                                 write(vfp, &chapoffset, 4);  /* Book intro (vss)  set to same as chap for now(it should be chap 1 which usually contains the book into anyway)*/
-00116                                 write(vfp, &chapsize, 2);
-00117                         }
-00118                         pos = lseek(vfp, 0, SEEK_CUR);
-00119                         write(cfp, &pos, 4);
-00120                         write(vfp, &chapoffset, 4);  /* Chapter intro */
-00121                         write(vfp, &chapsize, 2);
-00122                 }
-00123                 if (key1 >= key2) {
-00124                         write(vfp, &offset, 4);
-00125                         write(vfp, &size, 2);
-00126                 }
-00127                 else    {
-00128                         pos = 0;
-00129                         tmp = 0;
-00130                         write(vfp, &pos, 4);
-00131                         write(vfp, &tmp, 2);
-00132                 }
-00133         }
-00134 }
-00135 
-00136 
-00137 char startentry(char *buf)
-00138 {
-00139         char colon = 0;
-00140 
-00141         if (buf[0] != 10)
-00142                 return 0;
-00143         if (buf[1] != 10)
-00144                 return 0;
-00145         if (!isdigit(buf[2]))
-00146                 return 0;
-00147         if (!isdigit(buf[3])) {
-00148                 if (buf[3]!= ':')
-00149                         return 0;
-00150                 else    colon++;
-00151         }
-00152         if (!isdigit(buf[4])) {
-00153                 if (buf[4]!= ':')
-00154                         return 0;
-00155                 else    colon++;
-00156         }
-00157         if (colon != 1)
-00158                 return 0;
-00159         return 1;
-00160 }
-00161 
-00162 
-00163 char findbreak(int fp, long *offset, int *num1, int *num2, int *rangemax, short *size)
-00164 {
-00165         char buf[7];
-00166         char buf2[20];
-00167         char ch;
-00168         char loop;
-00169         long offset2;
-00170         int ch2, vs2, rm2;
-00171         
-00172         memset(buf, ' ', 7);
-00173 
-00174         while (1) {
-00175                 if (startentry(buf)) {
-00176                         buf[0] = ' ';
-00177                         buf[1] = ' ';
-00178                         sscanf(buf, "%d:%d", num1, num2);
-00179                         *rangemax = *num2;
-00180                         *offset = lseek(fp, 0, SEEK_CUR) - 5;
-00181                         if (size) {
-00182                                 if (findbreak(fp, &offset2, &ch2, &vs2, &rm2, 0)) {
-00183                                         *size = (short) (lseek(fp, 0, SEEK_END) - (*offset));
-00184                                 }
-00185                                 else {
-00186                                         if (vs2) {
-00187                                                 *size = (offset2 - (*offset)) - 2;
-00188                                         }
-00189                                         else {
-00190                                                 *size = (offset2 - (*offset)) - 6;
-00191                                         }
-00192                                 }
-00193                                 lseek(fp, *offset, SEEK_SET);
-00194                         }
-00195                         return 0;
-00196                 }
-00197                                         
-00198                 if (!strncmp(buf, "$-$-$-", 6)) {
-00199                         *offset = lseek(fp, 0, SEEK_CUR) - 1;
-00200                         *num2 = 0;
-00201                         (*num1)++;
-00202                         printf("Book marker: %s\n", buf2);
-00203                         if (size) {
-00204                                 if (findbreak(fp, &offset2, &ch2, &vs2, &rm2, 0)) {
-00205                                         *size = (short) (lseek(fp, 0, SEEK_END) - (*offset));
-00206                                 }
-00207                                 else {
-00208                                         if (vs2) {
-00209                                                 *size = (offset2 - (*offset)) - 2;
-00210                                         }
-00211                                         else {
-00212                                                 *size = (offset2 - (*offset)) - 6;
-00213                                         }
-00214                                 }
-00215                                 lseek(fp, *offset, SEEK_SET);
-00216                         }
-00217                         return 0;
-00218                 }
-00219                                  
-00220                                 
-00221                 memmove(buf, &buf[1], 6);
-00222                 if (read(fp, &buf[6], 1) != 1)
-00223                         return 1;
-00224         }
-00225 }
-00226 
-00227 
-00228 void openfiles(char *fname)
-00229 {
-00230         char buf[255];
-00231 
-00232         if ((fp = open(fname, O_RDONLY)) == -1) {
-00233                 fprintf(stderr, "Couldn't open file: %s\n", fname);
-00234                 exit(1);
-00235         }
-00236 
-00237         sprintf(buf, "%s.vss", fname);
-00238         if ((vfp = open(buf, O_CREAT|O_WRONLY)) == -1) {
-00239                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00240                 exit(1);
-00241         }
-00242 
-00243         sprintf(buf, "%s.cps", fname);
-00244         if ((cfp = open(buf, O_CREAT|O_WRONLY)) == -1) {
-00245                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00246                 exit(1);
-00247         }
-00248 
-00249         sprintf(buf, "%s.bks", fname);
-00250         if ((bfp = open(buf, O_CREAT|O_WRONLY)) == -1) {
-00251                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00252                 exit(1);
-00253         }
-00254 }
-00255 
-00256 
-00257 void checkparams(int argc, char **argv)
-00258 {
-00259         if (argc < 2) {
-00260                 fprintf(stderr, "usage: %s <file to process> [nt - for new testmt file]\n", argv[0]);
-00261                 exit(1);
-00262         }
-00263         if (argc == 3)
-00264                 key1 = key2 = key3 = "Matthew 1:1";
-00265         else    key1 = key2 = key3 = "Genesis 1:1";
-00266 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rwprtf_8cpp-source.html b/doc/api-documentation/html/rwprtf_8cpp-source.html deleted file mode 100644 index 9e0cd27..0000000 --- a/doc/api-documentation/html/rwprtf_8cpp-source.html +++ /dev/null @@ -1,121 +0,0 @@ - - -rwprtf.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rwprtf.cpp

00001 /******************************************************************************
-00002  *
-00003  * rwprtf -     SWFilter decendant to convert all GBF tags to RTF tags
-00004  */
-00005 
-00006 
-00007 #include <stdlib.h>
-00008 #include <string.h>
-00009 #include <rwprtf.h>
-00010 
-00011 
-00012 RWPRTF::RWPRTF() {
-00013 
-00014 }
-00015 
-00016 
-00017 char RWPRTF::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00018 {
-00019         char *to, *from;
-00020         bool ingreek = false;
-00021         bool inverse = false;
-00022         int len;
-00023 
-00024         len = strlen(text) + 1;                                         // shift string to right of buffer
-00025         if (len < maxlen) {
-00026                 memmove(&text[maxlen - len], text, len);
-00027                 from = &text[maxlen - len];
-00028         }
-00029         else    from = text;                                                    // -------------------------------
-00030         for (to = text; *from; from++) {
-00031                 if (*from == '\\') {
-00032                         if(!ingreek) {
-00033                                 ingreek = true;
-00034                                 *to++ = '[';
-00035                                 *to++ = '{';
-00036                                 *to++ = '\\';
-00037                                 *to++ = 'f';
-00038                                 *to++ = '8';
-00039                                 *to++ = ' ';
-00040                                 continue;
-00041                         }
-00042                         else {
-00043                                 ingreek = false;
-00044                                 *to++ = '}';
-00045                                 *to++ = ']';
-00046                                 continue;
-00047                         }
-00048                 }
-00049 
-00050                 if ((ingreek) && ((*from == 'h') || (*from == 'H')))
-00051                         continue;               // 'h's are mostly useless in RWP translitterations.  The greek is more correct without them.
-00052 
-00053                 if (*from == '#') {     // verse markings (e.g. "#Mark 1:1|")
-00054                         inverse = true;
-00055                         *to++ = '{';
-00056                         *to++ = '\\';
-00057                         *to++ = 'c';
-00058                         *to++ = 'f';
-00059                         *to++ = '2';
-00060                         *to++ = ' ';
-00061                         *to++ = '#';
-00062                         continue;
-00063                 }
-00064                 if ((*from == '|') && (inverse)) {
-00065                         inverse = false;
-00066                         *to++ = '|';
-00067                         *to++ = '}';
-00068                         continue;
-00069                 }
-00070                 
-00071                 if (*from == '{') {
-00072                         *to++ = '{';
-00073                         *to++ = '\\';
-00074                         *to++ = 'b';
-00075                         *to++ = ' ';
-00076                         if ((from - &text[maxlen - len]) > 10) {        // not the beginning of the entry
-00077                                 *to++ = '\\';
-00078                                 *to++ = 'p';
-00079                                 *to++ = 'a';
-00080                                 *to++ = 'r';
-00081                                 *to++ = ' ';
-00082                         }
-00083                         continue;
-00084                 }
-00085 
-00086                 if (*from == '}') {
-00087                         // this is kinda neat... DO NOTHING
-00088                 }
-00089                 if ((*from == '\n') && (from[1] == '\n')) {
-00090                         *to++ = '\\';
-00091                         *to++ = 'p';
-00092                         *to++ = 'a';
-00093                         *to++ = 'r';
-00094                         *to++ = '\\';
-00095                         *to++ = 'p';
-00096                         *to++ = 'a';
-00097                         *to++ = 'r';
-00098                         *to++ = ' ';
-00099                         continue;
-00100                 }
-00101 
-00102                 *to++ = *from;
-00103         }
-00104         *to++ = 0;
-00105         *to = 0;
-00106         return 0;
-00107 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/rwprtf_8h-source.html b/doc/api-documentation/html/rwprtf_8h-source.html deleted file mode 100644 index dcee3df..0000000 --- a/doc/api-documentation/html/rwprtf_8h-source.html +++ /dev/null @@ -1,52 +0,0 @@ - - -rwprtf.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rwprtf.h

00001 /******************************************************************************
-00002  *  rwprtf.h   - definition of Class RWPRTF, an SWFilter used to convert
-00003  *                              special tags in Robertsons Word Pictures commentary into
-00004  *                              Rich Text Format tags
-00005  *
-00006  * $Id: rwprtf_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00007  *
-00008  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00009  *      CrossWire Bible Society
-00010  *      P. O. Box 2528
-00011  *      Tempe, AZ  85280-2528
-00012  *
-00013  * This program is free software; you can redistribute it and/or modify it
-00014  * under the terms of the GNU General Public License as published by the
-00015  * Free Software Foundation version 2.
-00016  *
-00017  * This program is distributed in the hope that it will be useful, but
-00018  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00020  * General Public License for more details.
-00021  *
-00022  */
-00023 
-00024 #ifndef RWPRTF_H
-00025 #define RWPRTF_H
-00026 
-00027 #include <swfilter.h>
-00028 
-00029 #include <defs.h>
-00030 
-00033 class SWDLLEXPORT RWPRTF:public SWFilter
-00034 {
-00035 public:
-00036   RWPRTF ();
-00037   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00038 };
-00039 
-00040 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/sapphire_8cpp-source.html b/doc/api-documentation/html/sapphire_8cpp-source.html deleted file mode 100644 index d76c79c..0000000 --- a/doc/api-documentation/html/sapphire_8cpp-source.html +++ /dev/null @@ -1,242 +0,0 @@ - - -sapphire.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

sapphire.cpp

00001 /* sapphire.cpp -- the Saphire II stream cipher class.
-00002    Dedicated to the Public Domain the author and inventor:
-00003    (Michael Paul Johnson).  This code comes with no warranty.
-00004    Use it at your own risk.
-00005    Ported from the Pascal implementation of the Sapphire Stream
-00006    Cipher 9 December 1994.
-00007    Added hash pre- and post-processing 27 December 1994.
-00008    Modified initialization to make index variables key dependent,
-00009    made the output function more resistant to cryptanalysis,
-00010    and renamed to Sapphire II 2 January 1995
-00011 */
-00012 
-00013 
-00014 #ifdef WIN32
-00015 #include <memory.h>
-00016 #endif
-00017 
-00018 #ifdef UNIX
-00019 #include <memory.h>
-00020 #include <unistd.h>
-00021 #else
-00022 #ifndef _MSC_VER
-00023 #include <mem.h>
-00024 #endif
-00025 #endif
-00026 
-00027 #ifdef _WIN32_WCE
-00028 #include <string.h>
-00029 #endif
-00030 
-00031 #include "sapphire.h"
-00032 
-00033 unsigned char sapphire::keyrand(int limit,
-00034                                 unsigned char *user_key,
-00035                                 unsigned char keysize,
-00036                                 unsigned char *rsum,
-00037                                 unsigned *keypos)
-00038     {
-00039     unsigned u,             // Value from 0 to limit to return.
-00040         retry_limiter,      // No infinite loops allowed.
-00041         mask;               // Select just enough bits.
-00042 
-00043     if (!limit) return 0;   // Avoid divide by zero error.
-00044     retry_limiter = 0;
-00045     mask = 1;               // Fill mask with enough bits to cover
-00046     while (mask < (unsigned)limit)    // the desired range.
-00047         mask = (mask << 1) + 1;
-00048     do
-00049         {
-00050         *rsum = cards[*rsum] + user_key[(*keypos)++];
-00051         if (*keypos >= keysize)
-00052             {
-00053             *keypos = 0;            // Recycle the user key.
-00054             *rsum += keysize;   // key "aaaa" != key "aaaaaaaa"
-00055             }
-00056         u = mask & *rsum;
-00057         if (++retry_limiter > 11)
-00058             u %= limit;     // Prevent very rare long loops.
-00059         }
-00060     while (u > (unsigned)limit);
-00061     return u;
-00062     }
-00063 
-00064 void sapphire::initialize(unsigned char *key, unsigned char keysize)
-00065     {
-00066     // Key size may be up to 256 bytes.
-00067     // Pass phrases may be used directly, with longer length
-00068     // compensating for the low entropy expected in such keys.
-00069     // Alternatively, shorter keys hashed from a pass phrase or
-00070     // generated randomly may be used. For random keys, lengths
-00071     // of from 4 to 16 bytes are recommended, depending on how
-00072     // secure you want this to be.
-00073 
-00074     int i;
-00075     unsigned char toswap, swaptemp, rsum;
-00076     unsigned keypos;
-00077 
-00078     // If we have been given no key, assume the default hash setup.
-00079 
-00080     if (keysize < 1)
-00081         {
-00082         hash_init();
-00083         return;
-00084         }
-00085 
-00086     // Start with cards all in order, one of each.
-00087 
-00088     for (i=0;i<256;i++)
-00089         cards[i] = i;
-00090 
-00091     // Swap the card at each position with some other card.
-00092 
-00093     toswap = 0;
-00094     keypos = 0;         // Start with first byte of user key.
-00095     rsum = 0;
-00096     for (i=255;i>=0;i--)
-00097         {
-00098         toswap = keyrand(i, key, keysize, &rsum, &keypos);
-00099         swaptemp = cards[i];
-00100         cards[i] = cards[toswap];
-00101         cards[toswap] = swaptemp;
-00102         }
-00103 
-00104     // Initialize the indices and data dependencies.
-00105     // Indices are set to different values instead of all 0
-00106     // to reduce what is known about the state of the cards
-00107     // when the first byte is emitted.
-00108 
-00109     rotor = cards[1];
-00110     ratchet = cards[3];
-00111     avalanche = cards[5];
-00112     last_plain = cards[7];
-00113     last_cipher = cards[rsum];
-00114 
-00115     toswap = swaptemp = rsum = 0;
-00116     keypos = 0;
-00117     }
-00118 
-00119 void sapphire::hash_init(void)
-00120     {
-00121     // This function is used to initialize non-keyed hash
-00122     // computation.
-00123 
-00124     int i, j;
-00125 
-00126     // Initialize the indices and data dependencies.
-00127 
-00128     rotor = 1;
-00129     ratchet = 3;
-00130     avalanche = 5;
-00131     last_plain = 7;
-00132     last_cipher = 11;
-00133 
-00134     // Start with cards all in inverse order.
-00135 
-00136     for (i=0, j=255;i<256;i++,j--)
-00137         cards[i] = (unsigned char) j;
-00138     }
-00139 
-00140 sapphire::sapphire(unsigned char *key, unsigned char keysize)
-00141     {
-00142     if (key && keysize)
-00143         initialize(key, keysize);
-00144     }
-00145 
-00146 void sapphire::burn(void)
-00147     {
-00148     // Destroy the key and state information in RAM.
-00149     memset(cards, 0, 256);
-00150     rotor = ratchet = avalanche = last_plain = last_cipher = 0;
-00151     }
-00152 
-00153 sapphire::~sapphire()
-00154     {
-00155     burn();
-00156     }
-00157 
-00158 unsigned char sapphire::encrypt(unsigned char b)
-00159     {
-00160 #ifdef USBINARY
-00161     // Picture a single enigma rotor with 256 positions, rewired
-00162     // on the fly by card-shuffling.
-00163 
-00164     // This cipher is a variant of one invented and written
-00165     // by Michael Paul Johnson in November, 1993.
-00166 
-00167     unsigned char swaptemp;
-00168 
-00169     // Shuffle the deck a little more.
-00170 
-00171     ratchet += cards[rotor++];
-00172     swaptemp = cards[last_cipher];
-00173     cards[last_cipher] = cards[ratchet];
-00174     cards[ratchet] = cards[last_plain];
-00175     cards[last_plain] = cards[rotor];
-00176     cards[rotor] = swaptemp;
-00177     avalanche += cards[swaptemp];
-00178 
-00179     // Output one byte from the state in such a way as to make it
-00180     // very hard to figure out which one you are looking at.
-00181 
-00182     last_cipher = b^cards[(cards[ratchet] + cards[rotor]) & 0xFF] ^
-00183                   cards[cards[(cards[last_plain] +
-00184                                cards[last_cipher] +
-00185                                cards[avalanche])&0xFF]];
-00186     last_plain = b;
-00187     return last_cipher;
-00188 #else
-00189     return b;
-00190 #endif
-00191     }
-00192 
-00193 unsigned char sapphire::decrypt(unsigned char b)
-00194     {
-00195     unsigned char swaptemp;
-00196 
-00197     // Shuffle the deck a little more.
-00198 
-00199     ratchet += cards[rotor++];
-00200     swaptemp = cards[last_cipher];
-00201     cards[last_cipher] = cards[ratchet];
-00202     cards[ratchet] = cards[last_plain];
-00203     cards[last_plain] = cards[rotor];
-00204     cards[rotor] = swaptemp;
-00205     avalanche += cards[swaptemp];
-00206 
-00207     // Output one byte from the state in such a way as to make it
-00208     // very hard to figure out which one you are looking at.
-00209 
-00210     last_plain = b^cards[(cards[ratchet] + cards[rotor]) & 0xFF] ^
-00211                    cards[cards[(cards[last_plain] +
-00212                                 cards[last_cipher] +
-00213                                 cards[avalanche])&0xFF]];
-00214     last_cipher = b;
-00215     return last_plain;
-00216     }
-00217 
-00218 void sapphire::hash_final(unsigned char *hash,      // Destination
-00219                           unsigned char hashlength) // Size of hash.
-00220     {
-00221     int i;
-00222 
-00223     for (i=255;i>=0;i--)
-00224         encrypt((unsigned char) i);
-00225     for (i=0;i<hashlength;i++)
-00226         hash[i] = encrypt(0);
-00227     }
-00228 
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/sapphire_8h-source.html b/doc/api-documentation/html/sapphire_8h-source.html deleted file mode 100644 index f36c275..0000000 --- a/doc/api-documentation/html/sapphire_8h-source.html +++ /dev/null @@ -1,67 +0,0 @@ - - -sapphire.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

sapphire.h

00001 /* sapphire.h -- Interface for the Saphire II stream cipher.
-00002 
-00003    Dedicated to the Public Domain the author and inventor
-00004    (Michael Paul Johnson).  This code comes with no warranty.
-00005    Use it at your own risk.
-00006    Ported from the Pascal implementation of the Sapphire Stream
-00007    Cipher 9 December 1994.
-00008    Added hash-specific functions 27 December 1994.
-00009    Made index variable initialization key-dependent,
-00010    made the output function more resistant to cryptanalysis,
-00011    and renamed to Sapphire II Stream Cipher 2 January 1995.
-00012 
-00013    unsigned char is assumed to be 8 bits.  If it is not, the
-00014    results of assignments need to be reduced to 8 bits with
-00015    & 0xFF or % 0x100, whichever is faster.
-00016 */  
-00017   
-00018 #ifndef NULL
-00019 #define NULL 0
-00020 #endif  /*  */
-00021   class sapphire 
-00022 {
-00023   
-00024     // These variables comprise the state of the state machine.
-00025   unsigned char cards[256];     // A permutation of 0-255.
-00026   unsigned char rotor,          // Index that rotates smoothly
-00027     ratchet,                    // Index that moves erratically
-00028     avalanche,                  // Index heavily data dependent
-00029     last_plain,                 // Last plain text byte
-00030     last_cipher;                // Last cipher text byte
-00031   
-00032     // This function is used by initialize(), which is called by the
-00033     // constructor.
-00034   unsigned char keyrand (int limit, unsigned char *user_key,
-00035                           unsigned char keysize, unsigned char *rsum,
-00036 unsigned *keypos); public:sapphire (unsigned char
-00037                                       *key = NULL,      // Calls initialize if a real
-00038                                       unsigned char keysize = 0);       // key is provided.  If none
-00039   // is provided, call initialize
-00040   // before encrypt or decrypt.
-00041   ~sapphire ();                 // Destroy cipher state information.
-00042   void initialize (unsigned char *key,  // User key is used to set
-00043                    unsigned char keysize);      // up state information.
-00044   void hash_init (void);        // Set up default hash.
-00045   unsigned char encrypt (unsigned char b = 0);  // Encrypt byte
-00046   // or get a random byte.
-00047   unsigned char decrypt (unsigned char b);      // Decrypt byte.
-00048   void hash_final (unsigned char *hash, // Copy hash value to hash
-00049                    unsigned char hashlength = 20);      // Hash length (16-32)
-00050   void burn (void);             // Destroy cipher state information.
-00051 };
-00052 
-00053 
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/scsuutf8_8cpp-source.html b/doc/api-documentation/html/scsuutf8_8cpp-source.html deleted file mode 100644 index 4d58df3..0000000 --- a/doc/api-documentation/html/scsuutf8_8cpp-source.html +++ /dev/null @@ -1,234 +0,0 @@ - - -scsuutf8.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

scsuutf8.cpp

00001 /******************************************************************************
-00002  *
-00003  * SCSUUTF8 -   SWFilter decendant to convert a SCSU character to UTF-8
-00004  *
-00005  */
-00006 
-00007 
-00008 /* This class is based on:
-00009  * http://czyborra.com/scsu/scsu.c written by Roman Czyborra@dds.nl
-00010  * on Andrea's balcony in North Amsterdam on 1998-08-04
-00011  * Thanks to Richard Verhoeven <rcb5@win.tue.nl> for his suggestion
-00012  * to correct the haphazard "if" after UQU to "else if" on 1998-10-01
-00013  * 
-00014  * This is a deflator to UTF-8 output for input compressed in SCSU,
-00015  * the (Reuters) Standard Compression Scheme for Unicode as described
-00016  * in http://www.unicode.org/unicode/reports/tr6.html
-00017  */
-00018 
-00019 #include <stdlib.h>
-00020 #include <stdio.h>
-00021 #include <swmodule.h>
-00022 
-00023 #include <scsuutf8.h>
-00024 
-00025 SCSUUTF8::SCSUUTF8() {
-00026 }
-00027 
-00028 
-00029 unsigned char* SCSUUTF8::UTF8Output(unsigned long uchar, unsigned char* text)
-00030 {
-00031   /* join UTF-16 surrogates without any pairing sanity checks */
-00032 
-00033   static int d;
-00034   
-00035   if (uchar >= 0xd800 && uchar <= 0xdbff) { d = uchar & 0x3f; return text;  }
-00036   if (uchar >= 0xdc00 && uchar <= 0xdfff) { uchar = uchar + 0x2400 + d * 0x400; }
-00037   
-00038   /* output one character as UTF-8 multibyte sequence */
-00039   
-00040   if (uchar < 0x80) {
-00041     *text++ = c;
-00042   }
-00043   else if (uchar < 0x800) { 
-00044     *text++ = 0xc0 | uchar >> 6; 
-00045     *text++ = 0x80 | uchar & 0x3f;
-00046   }
-00047   else if (uchar < 0x10000) {
-00048     *text++ = 0xe0 | uchar >> 12; 
-00049     *text++ = 0x80 | uchar >> 6 & 0x3f;
-00050     *text++ = 0x80 | uchar & 0x3f;
-00051   }
-00052   else if (uchar < 0x200000) {
-00053     *text++ = 0xf0 | uchar >> 18;
-00054     *text++ = 0x80 | uchar >> 12 & 0x3f; 
-00055     *text++ = 0x80 | uchar >> 6 & 0x3f; 
-00056     *text++ = 0x80 | uchar & 0x3f;
-00057   }  
-00058   
-00059   return text;
-00060 }
-00061 
-00062 char SCSUUTF8::ProcessText(char *text, int len, const SWKey *key, const SWModule *module)
-00063 {
-00064   unsigned char *to, *from;
-00065   unsigned long buflen = len * FILTERPAD;
-00066   char active = 0, mode = 0;
-00067 
-00068   static unsigned short start[8] = {0x0000,0x0080,0x0100,0x0300,0x2000,0x2080,0x2100,0x3000};
-00069   static unsigned short slide[8] = {0x0080,0x00C0,0x0400,0x0600,0x0900,0x3040,0x30A0,0xFF00};
-00070   static unsigned short win[256]   = {
-00071     0x0000, 0x0080, 0x0100, 0x0180, 0x0200, 0x0280, 0x0300, 0x0380,
-00072     0x0400, 0x0480, 0x0500, 0x0580, 0x0600, 0x0680, 0x0700, 0x0780,
-00073     0x0800, 0x0880, 0x0900, 0x0980, 0x0A00, 0x0A80, 0x0B00, 0x0B80,
-00074     0x0C00, 0x0C80, 0x0D00, 0x0D80, 0x0E00, 0x0E80, 0x0F00, 0x0F80,
-00075     0x1000, 0x1080, 0x1100, 0x1180, 0x1200, 0x1280, 0x1300, 0x1380,
-00076     0x1400, 0x1480, 0x1500, 0x1580, 0x1600, 0x1680, 0x1700, 0x1780,
-00077     0x1800, 0x1880, 0x1900, 0x1980, 0x1A00, 0x1A80, 0x1B00, 0x1B80,
-00078     0x1C00, 0x1C80, 0x1D00, 0x1D80, 0x1E00, 0x1E80, 0x1F00, 0x1F80,
-00079     0x2000, 0x2080, 0x2100, 0x2180, 0x2200, 0x2280, 0x2300, 0x2380,
-00080     0x2400, 0x2480, 0x2500, 0x2580, 0x2600, 0x2680, 0x2700, 0x2780,
-00081     0x2800, 0x2880, 0x2900, 0x2980, 0x2A00, 0x2A80, 0x2B00, 0x2B80,
-00082     0x2C00, 0x2C80, 0x2D00, 0x2D80, 0x2E00, 0x2E80, 0x2F00, 0x2F80,
-00083     0x3000, 0x3080, 0x3100, 0x3180, 0x3200, 0x3280, 0x3300, 0x3800,
-00084     0xE000, 0xE080, 0xE100, 0xE180, 0xE200, 0xE280, 0xE300, 0xE380,
-00085     0xE400, 0xE480, 0xE500, 0xE580, 0xE600, 0xE680, 0xE700, 0xE780,
-00086     0xE800, 0xE880, 0xE900, 0xE980, 0xEA00, 0xEA80, 0xEB00, 0xEB80,
-00087     0xEC00, 0xEC80, 0xED00, 0xED80, 0xEE00, 0xEE80, 0xEF00, 0xEF80,
-00088     0xF000, 0xF080, 0xF100, 0xF180, 0xF200, 0xF280, 0xF300, 0xF380,
-00089     0xF400, 0xF480, 0xF500, 0xF580, 0xF600, 0xF680, 0xF700, 0xF780,
-00090     0xF800, 0xF880, 0xF900, 0xF980, 0xFA00, 0xFA80, 0xFB00, 0xFB80,
-00091     0xFC00, 0xFC80, 0xFD00, 0xFD80, 0xFE00, 0xFE80, 0xFF00, 0xFF80,
-00092     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-00093     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-00094     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-00095     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-00096     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-00097     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-00098     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-00099     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-00100     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-00101     0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-00102     0x0000, 0x00C0, 0x0250, 0x0370, 0x0530, 0x3040, 0x30A0, 0xFF60
-00103   };
-00104 
-00105   if (!len)
-00106         return 0;
-00107 
-00108   memmove(&text[buflen - len], text, len);
-00109   from = (unsigned char*)&text[buflen - len];
-00110   to = (unsigned char *)text;
-00111 
-00112   // -------------------------------
-00113 
-00114   for (int i = 0; i < len;) {
-00115 
-00116 
-00117       if (i >= len) break;
-00118       c = from[i++];
-00119 
-00120       if (c >= 0x80)
-00121         {
-00122           to = UTF8Output (c - 0x80 + slide[active], to);
-00123         }
-00124       else if (c >= 0x20 && c <= 0x7F)
-00125         {
-00126           to = UTF8Output (c, to);
-00127         }
-00128       else if (c == 0x0 || c == 0x9 || c == 0xA || c == 0xC || c == 0xD)
-00129         {
-00130           to = UTF8Output (c, to);
-00131         }
-00132       else if (c >= 0x1 && c <= 0x8) /* SQn */
-00133         {
-00134           if (i >= len) break;
-00135           /* single quote */ d = from[i++];
-00136 
-00137           to = UTF8Output (d < 0x80 ? d + start [c - 0x1] :
-00138                   d - 0x80 + slide [c - 0x1], to);
-00139         }
-00140       else if (c >= 0x10 && c <= 0x17) /* SCn */
-00141         {
-00142           /* change window */ active = c - 0x10;
-00143         }
-00144       else if (c >= 0x18 && c <= 0x1F) /* SDn */
-00145         {
-00146           /* define window */ active = c - 0x18;
-00147           if (i >= len) break;
-00148           slide [active] = win [from[i++]];
-00149         }
-00150       else if (c == 0xB) /* SDX */
-00151         {
-00152           if (i >= len) break;
-00153           c = from[i++];
-00154 
-00155           if (i >= len) break;
-00156           d = from[i++];
-00157 
-00158           slide [active = c>>5] = 0x10000 + (((c & 0x1F) << 8 | d) << 7);
-00159         }
-00160       else if (c == 0xE) /* SQU */
-00161         {
-00162           if (i >= len) break;
-00163           /* SQU */ c = from[i++];
-00164 
-00165           if (i >= len) break;
-00166           to = UTF8Output (c << 8 | from[i++], to);
-00167         }
-00168       else if (c == 0xF) /* SCU */
-00169         {
-00170           /* change to Unicode mode */ mode = 1;
-00171 
-00172           while (mode)
-00173             {
-00174               if (i >= len) break;
-00175               c = from[i++];
-00176 
-00177               if (c <= 0xDF || c >= 0xF3)
-00178                 {
-00179                   if (i >= len) break;
-00180                   to = UTF8Output (c << 8 | from[i++], to);
-00181                 }
-00182               else if (c == 0xF0) /* UQU */
-00183                 {
-00184                   if (i >= len) break;
-00185                   c = from[i++];
-00186 
-00187                   if (i >= len) break;
-00188                   to = UTF8Output (c << 8 | from[i++], to);
-00189                 }
-00190               else if (c >= 0xE0 && c <= 0xE7) /* UCn */
-00191                 {
-00192                   active = c - 0xE0; mode = 0;
-00193                 }
-00194               else if (c >= 0xE8 && c <= 0xEF) /* UDn */
-00195                 {
-00196                   if (i >= len) break;
-00197                   slide [active=c-0xE8] = win [from[i++]]; mode = 0;
-00198                 }
-00199               else if (c == 0xF1) /* UDX */
-00200                 {
-00201                   if (i >= len) break;
-00202                   c = from[i++];
-00203 
-00204                   if (i >= len) break;
-00205                   d = from[i++];
-00206 
-00207                   slide [active = c>>5] =
-00208                     0x10000 + (((c & 0x1F) << 8 | d) << 7); mode = 0;
-00209                 }
-00210             }
-00211         }
-00212 
-00213 
-00214   }
-00215 
-00216   *to++ = 0;
-00217   *to = 0;
-00218   return 0;
-00219 }
-00220 
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/scsuutf8_8h-source.html b/doc/api-documentation/html/scsuutf8_8h-source.html deleted file mode 100644 index b01f044..0000000 --- a/doc/api-documentation/html/scsuutf8_8h-source.html +++ /dev/null @@ -1,53 +0,0 @@ - - -scsuutf8.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

scsuutf8.h

00001 /*
-00002  *
-00003  *
-00004  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00005  *      CrossWire Bible Society
-00006  *      P. O. Box 2528
-00007  *      Tempe, AZ  85280-2528
-00008  *
-00009  * This program is free software; you can redistribute it and/or modify it
-00010  * under the terms of the GNU General Public License as published by the
-00011  * Free Software Foundation version 2.
-00012  *
-00013  * This program is distributed in the hope that it will be useful, but
-00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00016  * General Public License for more details.
-00017  *
-00018  */
-00019 
-00020 #ifndef SCSUUTF8_H
-00021 #define SCSUUTF8_H
-00022 
-00023 #include <swfilter.h>
-00024 
-00025 #include <defs.h>
-00026 
-00029 class SWDLLEXPORT SCSUUTF8:public SWFilter {
-00030  private:
-00031   unsigned char* UTF8Output(unsigned long, unsigned char* text);
-00032   
-00033   unsigned long c, d;
-00034   
-00035 
-00036  public:
-00037   SCSUUTF8();
-00038   virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule * = 0);
-00039 };
-00040 
-00041 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/strkey_8cpp-source.html b/doc/api-documentation/html/strkey_8cpp-source.html deleted file mode 100644 index 87a6389..0000000 --- a/doc/api-documentation/html/strkey_8cpp-source.html +++ /dev/null @@ -1,55 +0,0 @@ - - -strkey.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

strkey.cpp

00001 /******************************************************************************
-00002  *  StrKey.cpp - code for class 'StrKey'- a standard string key class (used
-00003  *                              for modules that index on single strings (eg. cities,
-00004  *                              names, words, etc.)
-00005  */
-00006 
-00007 #include <swmacs.h>
-00008 #include <utilfuns.h>
-00009 #include <strkey.h>
-00010 #include <string.h>
-00011 #include <stdio.h>
-00012 
-00013 
-00014 static const char *classes[] = {"StrKey", "SWKey", "SWObject", 0};
-00015 SWClass StrKey::classdef(classes);
-00016 
-00017 /******************************************************************************
-00018  * StrKey Constructor - initializes instance of StrKey
-00019  *
-00020  * ENT: ikey - text key (word, city, name, etc.)
-00021  */
-00022 
-00023 StrKey::StrKey(const char *ikey) : SWKey(ikey)
-00024 {
-00025         init();
-00026 }
-00027 
-00028 
-00029 void StrKey::init() {
-00030         myclass = &classdef;
-00031 }
-00032 
-00033 
-00034 /******************************************************************************
-00035  * StrKey Destructor - cleans up instance of StrKey
-00036  *
-00037  * ENT: ikey - text key
-00038  */
-00039 
-00040 StrKey::~StrKey() {
-00041 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/strkey_8h-source.html b/doc/api-documentation/html/strkey_8h-source.html deleted file mode 100644 index c9ab793..0000000 --- a/doc/api-documentation/html/strkey_8h-source.html +++ /dev/null @@ -1,58 +0,0 @@ - - -strkey.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

strkey.h

00001 /******************************************************************************
-00002  *  strkey.h - code for class 'strkey'- a standard Biblical verse key
-00003  *
-00004  * $Id: strkey_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00005  *
-00006  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00007  *      CrossWire Bible Society
-00008  *      P. O. Box 2528
-00009  *      Tempe, AZ  85280-2528
-00010  *
-00011  * This program is free software; you can redistribute it and/or modify it
-00012  * under the terms of the GNU General Public License as published by the
-00013  * Free Software Foundation version 2.
-00014  *
-00015  * This program is distributed in the hope that it will be useful, but
-00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00018  * General Public License for more details.
-00019  *
-00020  */
-00021 
-00022 
-00023 #ifndef STRKEY_H
-00024 #define STRKEY_H
-00025 
-00026 #include <swkey.h>
-00027 #include <swmacs.h>
-00028 
-00029 #include <defs.h>
-00030 
-00035 class SWDLLEXPORT StrKey:public SWKey
-00036 {
-00037   static SWClass classdef;
-00038   void init ();
-00039 public:
-00044   StrKey (const char *ikey = 0);
-00047   virtual ~ StrKey ();
-00048 
-00049   SWKEY_OPERATORS
-00050 
-00051 };
-00052 
-00053 
-00054 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swbasicfilter_8cpp-source.html b/doc/api-documentation/html/swbasicfilter_8cpp-source.html deleted file mode 100644 index db03790..0000000 --- a/doc/api-documentation/html/swbasicfilter_8cpp-source.html +++ /dev/null @@ -1,314 +0,0 @@ - - -swbasicfilter.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swbasicfilter.cpp

00001 /******************************************************************************
-00002  *  swbasicfilter.h     - definition of class SWBasicFilter.  An SWFilter
-00003  *                              impl that provides some basic methods that
-00004  *                              many filters will need and can use as a starting
-00005  *                              point. 
-00006  *
-00007  * $Id: swbasicfilter_8cpp-source.html,v 1.3 2002/06/20 20:23:10 mgruner Exp $
-00008  *
-00009  * Copyright 2001 CrossWire Bible Society (http://www.crosswire.org)
-00010  *      CrossWire Bible Society
-00011  *      P. O. Box 2528
-00012  *      Tempe, AZ  85280-2528
-00013  *
-00014  * This program is free software; you can redistribute it and/or modify it
-00015  * under the terms of the GNU General Public License as published by the
-00016  * Free Software Foundation version 2.
-00017  *
-00018  * This program is distributed in the hope that it will be useful, but
-00019  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00021  * General Public License for more details.
-00022  *
-00023  */
-00024 
-00025 #include <stdlib.h>
-00026 #include <string.h>
-00027 #include <swbasicfilter.h>
-00028 #include <stdio.h>
-00029 #include <stdarg.h>
-00030 
-00031 SWBasicFilter::SWBasicFilter() {
-00032         tokenStart = 0;
-00033         tokenEnd = 0;
-00034         escStart = 0;
-00035         escEnd = 0;
-00036 
-00037         setTokenStart("<");
-00038         setTokenEnd(">");
-00039         setEscapeStart("&");
-00040         setEscapeEnd(";");
-00041 
-00042         escStringCaseSensitive = false;
-00043         tokenCaseSensitive = false;
-00044         passThruUnknownToken = false;
-00045         passThruUnknownEsc = false;
-00046 }
-00047 
-00048 
-00049 void SWBasicFilter::setPassThruUnknownToken(bool val) {
-00050         passThruUnknownToken = val;
-00051 }
-00052 
-00053 
-00054 void SWBasicFilter::setPassThruUnknownEscapeString(bool val) {
-00055         passThruUnknownEsc = val;
-00056 }
-00057 
-00058 
-00059 void SWBasicFilter::setTokenCaseSensitive(bool val) {
-00060         tokenCaseSensitive = val;
-00061 }
-00062 
-00063 
-00064 void SWBasicFilter::setEscapeStringCaseSensitive(bool val) {
-00065         escStringCaseSensitive = val;
-00066 }
-00067 
-00068 
-00069 SWBasicFilter::~SWBasicFilter() {
-00070         if (tokenStart)
-00071                 delete [] tokenStart;
-00072 
-00073         if (tokenEnd)
-00074                 delete [] tokenEnd;
-00075 
-00076         if (escStart)
-00077                 delete [] escStart;
-00078 
-00079         if (escEnd)
-00080                 delete [] escEnd;
-00081 }
-00082 
-00083 
-00084 void SWBasicFilter::addTokenSubstitute(const char *findString, const char *replaceString) {
-00085         char *buf = 0;
-00086 
-00087         if (!tokenCaseSensitive) {
-00088                 stdstr(&buf, findString);
-00089                 toupperstr(buf);
-00090                 tokenSubMap.insert(DualStringMap::value_type(buf, replaceString));
-00091                 delete [] buf;
-00092         }
-00093         else tokenSubMap.insert(DualStringMap::value_type(findString, replaceString));
-00094 }
-00095 
-00096 
-00097 void SWBasicFilter::addEscapeStringSubstitute(const char *findString, const char *replaceString) {
-00098         char *buf = 0;
-00099 
-00100         if (!escStringCaseSensitive) {
-00101                 stdstr(&buf, findString);
-00102                 toupperstr(buf);
-00103                 escSubMap.insert(DualStringMap::value_type(buf, replaceString));
-00104                 delete [] buf;
-00105         }
-00106         else escSubMap.insert(DualStringMap::value_type(findString, replaceString));
-00107 }
-00108 
-00109 
-00110 void SWBasicFilter::pushString(char **buf, const char *format, ...) {
-00111   va_list argptr;
-00112 
-00113   va_start(argptr, format);
-00114   *buf += vsprintf(*buf, format, argptr);
-00115   va_end(argptr);
-00116 
-00117 //  *buf += strlen(*buf);
-00118 }
-00119 
-00120 
-00121 bool SWBasicFilter::substituteToken(char **buf, const char *token) {
-00122         DualStringMap::iterator it;
-00123 
-00124         if (!tokenCaseSensitive) {
-00125                 char *tmp = 0;
-00126                 stdstr(&tmp, token);
-00127                 toupperstr(tmp);
-00128                 it = tokenSubMap.find(tmp);
-00129                 delete [] tmp;
-00130         } else
-00131         it = tokenSubMap.find(token);
-00132 
-00133         if (it != tokenSubMap.end()) {
-00134                 pushString(buf, it->second.c_str());
-00135                 return true;
-00136         }
-00137         return false;
-00138 }
-00139 
-00140 
-00141 bool SWBasicFilter::substituteEscapeString(char **buf, const char *escString) {
-00142         DualStringMap::iterator it;
-00143 
-00144         if (!escStringCaseSensitive) {
-00145                 char *tmp = 0;
-00146                 stdstr(&tmp, escString);
-00147                 toupperstr(tmp);
-00148                 it = escSubMap.find(tmp);
-00149                 delete [] tmp;
-00150         } else 
-00151         it = escSubMap.find(escString);
-00152 
-00153         if (it != escSubMap.end()) {
-00154                 pushString(buf, it->second.c_str());
-00155                 return true;
-00156         }
-00157         return false;
-00158 }
-00159 
-00160 
-00161 bool SWBasicFilter::handleToken(char **buf, const char *token, DualStringMap &userData) {
-00162         return substituteToken(buf, token);
-00163 }
-00164 
-00165 
-00166 bool SWBasicFilter::handleEscapeString(char **buf, const char *escString, DualStringMap &userData) {
-00167         return substituteEscapeString(buf, escString);
-00168 }
-00169 
-00170 
-00171 void SWBasicFilter::setEscapeStart(const char *escStart) {
-00172         stdstr(&(this->escStart), escStart);
-00173 }
-00174 
-00175 
-00176 void SWBasicFilter::setEscapeEnd(const char *escEnd) {
-00177         stdstr(&(this->escEnd), escEnd);
-00178 }
-00179 
-00180 
-00181 void SWBasicFilter::setTokenStart(const char *tokenStart) {
-00182         stdstr(&(this->tokenStart), tokenStart);
-00183 }
-00184 
-00185 
-00186 void SWBasicFilter::setTokenEnd(const char *tokenEnd) {
-00187         stdstr(&(this->tokenEnd), tokenEnd);
-00188 }
-00189 
-00190 
-00191 char SWBasicFilter::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module) {
-00192         this->key = key;
-00193         this->module = module;
-00194         char *to, *from, token[4096];
-00195         int tokpos = 0;
-00196         bool intoken    = false;
-00197         int len;
-00198         bool inEsc = false;
-00199         char escStartLen = strlen(escStart);
-00200         char escEndLen   = strlen(escEnd);
-00201         char escStartPos = 0, escEndPos = 0;
-00202         char tokenStartLen = strlen(tokenStart);
-00203         char tokenEndLen   = strlen(tokenEnd);
-00204         char tokenStartPos = 0, tokenEndPos = 0;
-00205         DualStringMap userData;
-00206         string lastTextNode;
-00207 
-00208         bool suspendTextPassThru = false;
-00209         userData["suspendTextPassThru"] = "false";
-00210 
-00211         len = strlen(text) + 1;         // shift string to right of buffer
-00212         if (len < maxlen) {
-00213                 memmove(&text[maxlen - len], text, len);
-00214                 from = &text[maxlen - len];
-00215         }
-00216         else    from = text;                    // -------------------------------
-00217 
-00218         resultBuffer = text;
-00219 
-00220         for (to = text; *from; from++) {
-00221                 if (*from == tokenStart[tokenStartPos]) {
-00222                         if (tokenStartPos == (tokenStartLen - 1)) {
-00223                                 intoken = true;
-00224                                 tokpos = 0;
-00225                                 token[0] = 0;
-00226                                 token[1] = 0;
-00227                                 token[2] = 0;
-00228                                 inEsc = false;
-00229                         }
-00230                         else tokenStartPos++;
-00231                         continue;
-00232                 }
-00233 
-00234                 if (*from == escStart[escStartPos]) {
-00235                         if (escStartPos == (escStartLen - 1)) {
-00236                                 intoken = true;
-00237                                 tokpos = 0;
-00238                                 token[0] = 0;
-00239                                 token[1] = 0;
-00240                                 token[2] = 0;
-00241                                 inEsc = true;
-00242                         }
-00243                         else escStartPos++;
-00244                         continue;
-00245                 }
-00246 
-00247                 if (inEsc) {
-00248                         if (*from == escEnd[escEndPos]) {
-00249                                 if (escEndPos == (escEndLen - 1)) {
-00250                                         intoken = false;
-00251                                         userData["lastTextNode"] = lastTextNode;
-00252                                         if ((!handleEscapeString(&to, token, userData)) && (passThruUnknownEsc)) {
-00253                                                 pushString(&to, escStart);
-00254                                                 pushString(&to, token);
-00255                                                 pushString(&to, escEnd);
-00256                                         }
-00257                                         escEndPos = escStartPos = tokenEndPos = tokenStartPos = 0;
-00258                                         lastTextNode = "";
-00259                                         suspendTextPassThru = (!userData["suspendTextPassThru"].compare("true"));
-00260                                         continue;
-00261                                 }
-00262                         }
-00263                 }
-00264 
-00265                 if (!inEsc) {
-00266                         if (*from == tokenEnd[tokenEndPos]) {
-00267                                 if (tokenEndPos == (tokenEndLen - 1)) {
-00268                                         intoken = false;
-00269                                         userData["lastTextNode"] = lastTextNode;
-00270                                         if ((!handleToken(&to, token, userData)) && (passThruUnknownToken)) {
-00271                                                 pushString(&to, tokenStart);
-00272                                                 pushString(&to, token);
-00273                                                 pushString(&to, tokenEnd);
-00274                                         }
-00275                                         escEndPos = escStartPos = tokenEndPos = tokenStartPos = 0;
-00276                                         lastTextNode = "";
-00277                                         suspendTextPassThru = (!userData["suspendTextPassThru"].compare("true"));
-00278                                         continue;
-00279                                 }
-00280                         }
-00281                 }
-00282 
-00283                 if (intoken) {
-00284                         if (tokpos < 4090)
-00285                                 token[tokpos++] = *from;
-00286                                 token[tokpos+2] = 0;
-00287                 }
-00288                 else {
-00289                         if (!suspendTextPassThru)
-00290                                 *to++ = *from;
-00291                         lastTextNode += *from;
-00292                 }
-00293         }
-00294         *to++ = 0;
-00295         *to = 0;
-00296         return 0;
-00297 }
-00298 
-00299 
-00300 
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swbasicfilter_8h-source.html b/doc/api-documentation/html/swbasicfilter_8h-source.html deleted file mode 100644 index 6732ca5..0000000 --- a/doc/api-documentation/html/swbasicfilter_8h-source.html +++ /dev/null @@ -1,99 +0,0 @@ - - -swbasicfilter.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swbasicfilter.h

00001 /******************************************************************************
-00002  *  swbasicfilter.h     - definition of class SWBasicFilter.  An SWFilter
-00003  *                              impl that provides some basic methods that
-00004  *                              many filter will need and can use as a starting
-00005  *                              point. 
-00006  *
-00007  * $Id: swbasicfilter_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00008  *
-00009  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00010  *      CrossWire Bible Society
-00011  *      P. O. Box 2528
-00012  *      Tempe, AZ  85280-2528
-00013  *
-00014  * This program is free software; you can redistribute it and/or modify it
-00015  * under the terms of the GNU General Public License as published by the
-00016  * Free Software Foundation version 2.
-00017  *
-00018  * This program is distributed in the hope that it will be useful, but
-00019  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00021  * General Public License for more details.
-00022  *
-00023  */
-00024 
-00025 #ifndef SWBASICFILTER_H
-00026 #define SWBASICFILTER_H
-00027 
-00028 #include <swfilter.h>
-00029 
-00030 #include <defs.h>
-00031 #include <map>
-00032 using namespace std;
-00033 
-00045 class SWDLLEXPORT SWBasicFilter : public SWFilter {
-00046 
-00047         char *tokenStart;
-00048         char *tokenEnd;
-00049         char *escStart;
-00050         char *escEnd;
-00051         bool escStringCaseSensitive;
-00052         bool tokenCaseSensitive;
-00053         bool passThruUnknownToken;
-00054         bool passThruUnknownEsc;
-00055 
-00056 public:
-00057         SWBasicFilter();
-00058         virtual char ProcessText(char *text, int maxlen, const SWKey *, const SWModule * = 0);
-00059         virtual ~SWBasicFilter();
-00060 
-00061 protected:
-00062         const SWModule *module;
-00063         const SWKey *key;
-00064         char *resultBuffer;
-00065         typedef map<string, string> DualStringMap;
-00066         DualStringMap tokenSubMap;
-00067         DualStringMap escSubMap;
-00068 
-00070         void setEscapeStart(const char *escStart);
-00071 
-00073         void setEscapeEnd(const char *escEnd);
-00074 
-00076         void setTokenStart(const char *tokenStart);
-00077 
-00079         void setTokenEnd(const char *tokenEnd);
-00080 
-00083         void setPassThruUnknownToken(bool val);
-00084 
-00087         void setPassThruUnknownEscapeString(bool val);
-00088 
-00089         void setTokenCaseSensitive(bool val);
-00090         void setEscapeStringCaseSensitive(bool val);
-00091 
-00092         void addTokenSubstitute(const char *findString, const char *replaceString);
-00093         void addEscapeStringSubstitute(const char *findString, const char *replaceString);
-00094         bool substituteToken(char **buf, const char *token);
-00095         bool substituteEscapeString(char **buf, const char *escString);
-00096 
-00098         void pushString(char **buf, const char *format, ...);
-00099 
-00106         virtual bool handleToken(char **buf, const char *token, DualStringMap &userData);
-00107 
-00114         virtual bool handleEscapeString(char **buf, const char *escString, DualStringMap &userData);
-00115 };
-00116 
-00117 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swcacher_8cpp-source.html b/doc/api-documentation/html/swcacher_8cpp-source.html deleted file mode 100644 index f3cfb7d..0000000 --- a/doc/api-documentation/html/swcacher_8cpp-source.html +++ /dev/null @@ -1,57 +0,0 @@ - - -swcacher.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swcacher.cpp

00001 /******************************************************************************
-00002  *  swcacher.h  - definition of class SWCacher used to provide an interface for
-00003  *      objects that cache and want a standard interface for cleaning up.
-00004  *
-00005  * $Id: swcacher_8cpp-source.html,v 1.3 2002/06/20 20:23:10 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #include <swcacher.h>
-00024 
-00025 
-00026 SWCacher::SWCacher() {
-00027 }
-00028 
-00029 
-00030 SWCacher::~SWCacher() {
-00031 }
-00032 
-00033 
-00034 void SWCacher::flush() {
-00035 }
-00036 
-00037 long SWCacher::resourceConsumption() {
-00038         return 0;
-00039 }
-00040 
-00041 long SWCacher::lastAccess() {
-00042         return 0;
-00043 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swcacher_8h-source.html b/doc/api-documentation/html/swcacher_8h-source.html deleted file mode 100644 index de6b15b..0000000 --- a/doc/api-documentation/html/swcacher_8h-source.html +++ /dev/null @@ -1,51 +0,0 @@ - - -swcacher.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swcacher.h

00001 /******************************************************************************
-00002  *  swcacher.h  - definition of class SWCacher used to provide an interface for
-00003  *      objects that cache and want a standard interface for cleaning up.
-00004  *
-00005  * $Id: swcacher_8h-source.html,v 1.3 2002/06/20 20:23:10 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #ifndef SWCACHER_H
-00024 #define SWCACHER_H
-00025 
-00026 #include <defs.h>
-00027 
-00028 class SWDLLEXPORT  SWCacher {
-00029 public:
-00030         SWCacher();
-00031         virtual ~SWCacher();
-00032         virtual void flush();
-00033         virtual long resourceConsumption();
-00034         virtual long lastAccess();
-00035 };
-00036 
-00037 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swcipher_8cpp-source.html b/doc/api-documentation/html/swcipher_8cpp-source.html deleted file mode 100644 index 736a676..0000000 --- a/doc/api-documentation/html/swcipher_8cpp-source.html +++ /dev/null @@ -1,137 +0,0 @@ - - -swcipher.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swcipher.cpp

00001 /******************************************************************************
-00002  *  swcipher.cpp   - code for class 'SWCipher'- a driver class that provides
-00003  *                              cipher utilities.
-00004  */
-00005 
-00006 #include <string.h>
-00007 #include <stdlib.h>
-00008 #include <swcipher.h>
-00009 
-00010 
-00011 /******************************************************************************
-00012  * SWCipher Constructor - Initializes data for instance of SWCipher
-00013  *
-00014  */
-00015 
-00016 SWCipher::SWCipher(unsigned char *key) {
-00017         master.initialize(key, strlen((char *)key));
-00018         buf = 0;
-00019 }
-00020 
-00021 
-00022 /******************************************************************************
-00023  * SWCipher Destructor - Cleans up instance of SWCipher
-00024  */
-00025 
-00026 SWCipher::~SWCipher()
-00027 {
-00028         if (buf)
-00029                 free(buf);
-00030 }
-00031 
-00032 
-00033 char *SWCipher::Buf(const char *ibuf, unsigned int ilen)
-00034 {
-00035         if (ibuf) {
-00036         
-00037                 if (buf)
-00038                         free(buf);
-00039 
-00040                 if (!ilen) {
-00041                         len = strlen(buf);
-00042                         ilen = len + 1;
-00043                 }
-00044                 else len = ilen;
-00045 
-00046                 buf = (char *) malloc(ilen);
-00047                 memcpy(buf, ibuf, ilen);
-00048                 cipher = false;
-00049         }
-00050 
-00051         Decode();
-00052 
-00053         return buf;
-00054 }
-00055 
-00056 
-00057 char *SWCipher::cipherBuf(unsigned int *ilen, const char *ibuf)
-00058 {
-00059         if (ibuf) {
-00060         
-00061                 if (buf)
-00062                         free(buf);
-00063                         
-00064                 buf = (char *) malloc(*ilen);
-00065                 memcpy(buf, ibuf, *ilen);
-00066                 len = *ilen;
-00067                 cipher = true;
-00068         }
-00069 
-00070         Encode();
-00071 
-00072         *ilen = (short)len;
-00073         return buf;
-00074 }
-00075 
-00076 
-00077 /******************************************************************************
-00078  * SWCipher::Encode     - This function "encodes" the input stream into the
-00079  *                                              output stream.
-00080  *                                              The GetChars() and SendChars() functions are
-00081  *                                              used to separate this method from the actual
-00082  *                                              i/o.
-00083  */
-00084 
-00085 void SWCipher::Encode(void)
-00086 {
-00087         if (!cipher) {
-00088                 work = master;
-00089                 for (int i = 0; i < len; i++)
-00090                         buf[i] = work.encrypt(buf[i]);
-00091                 cipher = true;
-00092         }
-00093 }
-00094 
-00095 
-00096 /******************************************************************************
-00097  * SWCipher::Decode     - This function "decodes" the input stream into the
-00098  *                                              output stream.
-00099  *                                              The GetChars() and SendChars() functions are
-00100  *                                              used to separate this method from the actual
-00101  *                                              i/o.
-00102  */
-00103 
-00104 void SWCipher::Decode(void)
-00105 {
-00106         if (cipher) {
-00107                 work = master;
-00108                 for (int i = 0; i < len; i++)
-00109                         buf[i] = work.decrypt(buf[i]);
-00110                 cipher = false;
-00111         }
-00112 }
-00113 
-00114 
-00115 /******************************************************************************
-00116  * SWCipher::setCipherKey       - setter for a new CipherKey
-00117  *
-00118  */
-00119 
-00120 void SWCipher::setCipherKey(const char *ikey) {
-00121         unsigned char *key = (unsigned char *)ikey;
-00122         master.initialize(key, strlen((char *)key));
-00123 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swcipher_8h-source.html b/doc/api-documentation/html/swcipher_8h-source.html deleted file mode 100644 index 0f54984..0000000 --- a/doc/api-documentation/html/swcipher_8h-source.html +++ /dev/null @@ -1,63 +0,0 @@ - - -swcipher.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swcipher.h

00001 /******************************************************************************
-00002  *  swcipher.h   - definition of Class SWCipher used for data cipher/decipher
-00003  *
-00004  * $Id: swcipher_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00005  *
-00006  * Copyright 1999 CrossWire Bible Society (http://www.crosswire.org)
-00007  *      CrossWire Bible Society
-00008  *      P. O. Box 2528
-00009  *      Tempe, AZ  85280-2528
-00010  *
-00011  * This program is free software; you can redistribute it and/or modify it
-00012  * under the terms of the GNU General Public License as published by the
-00013  * Free Software Foundation version 2.
-00014  *
-00015  * This program is distributed in the hope that it will be useful, but
-00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00018  * General Public License for more details.
-00019  *
-00020  */
-00021 
-00022 #ifndef SWCIPHER_H
-00023 #define SWCIPHER_H
-00024 
-00025 #include "sapphire.h"
-00026 
-00027 #include <defs.h>
-00028 
-00029 class SWDLLEXPORT SWCipher
-00030 {
-00031 
-00032   sapphire master;
-00033   sapphire work;
-00034 
-00035   char *buf;
-00036   bool cipher;
-00037   int len;
-00038 protected:
-00039 public:
-00040     SWCipher (unsigned char *key);
-00041   virtual void setCipherKey (const char *key);
-00042     virtual ~ SWCipher ();
-00043   virtual char *Buf (const char *buf = 0, unsigned int len = 0);
-00044   virtual char *cipherBuf (unsigned int *len, const char *buf = 0);
-00045   virtual void Encode (void);
-00046   virtual void Decode (void);
-00047 };
-00048 
-00049 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swcom_8cpp-source.html b/doc/api-documentation/html/swcom_8cpp-source.html deleted file mode 100644 index 869e176..0000000 --- a/doc/api-documentation/html/swcom_8cpp-source.html +++ /dev/null @@ -1,44 +0,0 @@ - - -swcom.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swcom.cpp

00001 /******************************************************************************
-00002  *  swcom.cpp  - code for base class 'SWCom'- The basis for all commentary
-00003  *                      modules
-00004  */
-00005 
-00006 #include <swcom.h>
-00007 
-00008 
-00009 /******************************************************************************
-00010  * SWCom Constructor - Initializes data for instance of SWCom
-00011  *
-00012  * ENT: imodname - Internal name for module
-00013  *      imoddesc - Name to display to user for module
-00014  *      idisp    - Display object to use for displaying
-00015  */
-00016 
-00017 SWCom::SWCom(const char *imodname, const char *imoddesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang): SWModule(imodname, imoddesc, idisp, "Commentaries", enc, dir, mark, ilang)
-00018 {
-00019         delete key;
-00020         key = CreateKey();
-00021 }
-00022 
-00023 
-00024 /******************************************************************************
-00025  * SWCom Destructor - Cleans up instance of SWCom
-00026  */
-00027 
-00028 SWCom::~SWCom()
-00029 {
-00030 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swcom_8h-source.html b/doc/api-documentation/html/swcom_8h-source.html deleted file mode 100644 index c587ca9..0000000 --- a/doc/api-documentation/html/swcom_8h-source.html +++ /dev/null @@ -1,57 +0,0 @@ - - -swcom.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swcom.h

00001 /******************************************************************************
-00002  *  swcom.h   - code for base class 'SWCom'.  SWCom is the basis for all
-00003  *               types of commentary modules
-00004  *
-00005  * $Id: swcom_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #ifndef SWCOM_H
-00024 #define SWCOM_H
-00025 
-00026 #include <swmodule.h>
-00027 #include <versekey.h>
-00028 
-00029 #include <defs.h>
-00030 
-00033 class SWDLLEXPORT SWCom : public SWModule {
-00034 public:
-00035 
-00042   SWCom(const char *imodname = 0, const char *imoddesc = 0, SWDisplay * idisp = 0, SWTextEncoding enc = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup mark = FMT_UNKNOWN, const char* ilang = 0);
-00043   virtual ~SWCom();
-00044   virtual SWKey *CreateKey()
-00045   {
-00046     return new VerseKey();
-00047   }
-00048 };
-00049 
-00050 
-00051 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swcomprs_8cpp-source.html b/doc/api-documentation/html/swcomprs_8cpp-source.html deleted file mode 100644 index 1ec5ff7..0000000 --- a/doc/api-documentation/html/swcomprs_8cpp-source.html +++ /dev/null @@ -1,204 +0,0 @@ - - -swcomprs.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swcomprs.cpp

00001 /******************************************************************************
-00002  *  swcomprs.cpp   - code for class 'SWCompress'- a driver class that provides
-00003  *                              compression utilities.
-00004  */
-00005 
-00006 #include <string.h>
-00007 #include <stdlib.h>
-00008 #include <swcomprs.h>
-00009 
-00010 
-00011 /******************************************************************************
-00012  * SWCompress Constructor - Initializes data for instance of SWCompress
-00013  *
-00014  */
-00015 
-00016 SWCompress::SWCompress()
-00017 {
-00018         buf = zbuf = 0;
-00019         Init();
-00020 }
-00021 
-00022 
-00023 /******************************************************************************
-00024  * SWCompress Destructor - Cleans up instance of SWCompress
-00025  */
-00026 
-00027 SWCompress::~SWCompress()
-00028 {
-00029         if (zbuf)
-00030                 free(zbuf);
-00031 
-00032         if (buf)
-00033                 free(buf);
-00034 }
-00035 
-00036 
-00037 void SWCompress::Init()
-00038 {
-00039                 if (buf)
-00040                         free(buf);
-00041 
-00042                 if (zbuf)
-00043                         free(zbuf);
-00044 
-00045                 buf    = 0;
-00046                 zbuf   = 0;
-00047                 direct  = 0;
-00048                 zlen    = 0;
-00049                 slen    = 0;
-00050                 zpos    = 0;
-00051                 pos     = 0;
-00052 }
-00053 
-00054 
-00055 char *SWCompress::Buf(const char *ibuf, unsigned long *len) {
-00056         // setting an uncompressed buffer
-00057         if (ibuf) {
-00058                 Init();
-00059                 slen = (len) ? *len : strlen(ibuf);
-00060                 buf = (char *) calloc(slen + 1, 1);
-00061                 memcpy(buf, ibuf, slen);
-00062         }
-00063 
-00064         // getting an uncompressed buffer
-00065         if (!buf) {
-00066                 buf = (char *)calloc(1,1); // be sure we at least allocate an empty buf for return;
-00067                 direct = 1;
-00068                 Decode();
-00069 //              slen = strlen(buf);
-00070                 if (len)
-00071                         *len = slen;
-00072         }
-00073         return buf;
-00074 }
-00075 
-00076 
-00077 char *SWCompress::zBuf(unsigned long *len, char *ibuf)
-00078 {
-00079         // setting a compressed buffer
-00080         if (ibuf) {
-00081                 Init();
-00082                 zbuf = (char *) malloc(*len);
-00083                 memcpy(zbuf, ibuf, *len);
-00084                 zlen = *len;
-00085         }
-00086 
-00087         // getting a compressed buffer
-00088         if (!zbuf) {
-00089                 direct = 0;
-00090                 Encode();
-00091         }
-00092 
-00093         *len = zlen;
-00094         return zbuf;
-00095 }
-00096 
-00097 
-00098 unsigned long SWCompress::GetChars(char *ibuf, unsigned long len)
-00099 {
-00100         if (direct) {
-00101                 len = (((zlen - zpos) > (unsigned)len) ? len : zlen - zpos);
-00102                 if (len > 0) {
-00103                         memmove(ibuf, &zbuf[zpos], len);
-00104                         zpos += len;
-00105                 }
-00106         }
-00107         else {
-00108 //              slen = strlen(buf);
-00109                 len = (((slen - pos) > (unsigned)len) ? len : slen - pos);
-00110                 if (len > 0) {
-00111                         memmove(ibuf, &buf[pos], len);
-00112                         pos += len;
-00113                 }
-00114         }
-00115         return len;
-00116 }
-00117         
-00118 
-00119 unsigned long SWCompress::SendChars(char *ibuf, unsigned long len)
-00120 {
-00121         if (direct) {
-00122                 if (buf) {
-00123 //                      slen = strlen(buf);
-00124                         if ((pos + len) > (unsigned)slen) {
-00125                                 buf = (char *) realloc(buf, pos + len + 1024);
-00126                                 memset(&buf[pos], 0, len + 1024);
-00127                         }
-00128                 }
-00129                 else    buf = (char *)calloc(1, len + 1024);
-00130                 memmove(&buf[pos], ibuf, len);
-00131                 pos += len;
-00132         }
-00133         else {
-00134                 if (zbuf) {
-00135                         if ((zpos + len) > zlen) {
-00136                                 zbuf = (char *) realloc(zbuf, zpos + len + 1024);
-00137                                 zlen = zpos + len + 1024;
-00138                         }
-00139                 }
-00140                 else {
-00141                         zbuf = (char *)calloc(1, len + 1024);
-00142                         zlen = len + 1024;
-00143                 }
-00144                 memmove(&zbuf[zpos], ibuf, len);
-00145                 zpos += len;
-00146         }
-00147         return len;
-00148 }
-00149 
-00150 
-00151 /******************************************************************************
-00152  * SWCompress::Encode   - This function "encodes" the input stream into the
-00153  *                                              output stream.
-00154  *                                              The GetChars() and SendChars() functions are
-00155  *                                              used to separate this method from the actual
-00156  *                                              i/o.
-00157  */
-00158 
-00159 void SWCompress::Encode(void)
-00160 {
-00161         cycleStream();
-00162 }
-00163 
-00164 
-00165 /******************************************************************************
-00166  * SWCompress::Decode   - This function "decodes" the input stream into the
-00167  *                                              output stream.
-00168  *                                              The GetChars() and SendChars() functions are
-00169  *                                              used to separate this method from the actual
-00170  *                                              i/o.
-00171  */
-00172 
-00173 void SWCompress::Decode(void)
-00174 {
-00175         cycleStream();
-00176 }
-00177 
-00178 
-00179 void SWCompress::cycleStream() {
-00180         char buf[1024];
-00181         unsigned long len, totlen = 0;
-00182 
-00183         do {
-00184                 len = GetChars(buf, 1024);
-00185                 if (len)
-00186                         totlen += SendChars(buf, len);
-00187         } while (len == 1024);
-00188 
-00189         zlen = slen = totlen;
-00190 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swcomprs_8h-source.html b/doc/api-documentation/html/swcomprs_8h-source.html deleted file mode 100644 index 31e5934..0000000 --- a/doc/api-documentation/html/swcomprs_8h-source.html +++ /dev/null @@ -1,59 +0,0 @@ - - -swcomprs.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swcomprs.h

00001 /******************************************************************************
-00002  *  swcomprs.h   - definition of Class SWCompress used for data compression
-00003  *
-00004  * $Id: swcomprs_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00005  *
-00006  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00007  *      CrossWire Bible Society
-00008  *      P. O. Box 2528
-00009  *      Tempe, AZ  85280-2528
-00010  *
-00011  * This program is free software; you can redistribute it and/or modify it
-00012  * under the terms of the GNU General Public License as published by the
-00013  * Free Software Foundation version 2.
-00014  *
-00015  * This program is distributed in the hope that it will be useful, but
-00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00018  * General Public License for more details.
-00019  *
-00020  */
-00021 
-00022 #ifndef SWCOMPRS_H
-00023 #define SWCOMPRS_H
-00024 
-00025 #include <defs.h>
-00026 
-00027 class SWDLLEXPORT SWCompress
-00028 {
-00029   void Init ();
-00030   void cycleStream ();
-00031 protected:
-00032   char *buf, *zbuf, direct;     // 0 - encode; 1 - decode
-00033   unsigned long zlen, zpos, pos, slen;
-00034 public:
-00035     SWCompress ();
-00036     virtual ~ SWCompress ();
-00037   virtual char *Buf (const char *buf = 0, unsigned long *len = 0);
-00038   virtual char *zBuf (unsigned long *len, char *buf = 0);
-00039   virtual unsigned long GetChars (char *buf, unsigned long len);        // override for other than buffer compression
-00040   virtual unsigned long SendChars (char *buf, unsigned long len);       // override for other than buffer compression
-00041   virtual void Encode (void);   // override to provide compression algorythm
-00042   virtual void Decode (void);   // override to provide compression algorythm
-00043 };
-00044 
-00045 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swconfig_8cpp-source.html b/doc/api-documentation/html/swconfig_8cpp-source.html deleted file mode 100644 index 54093d7..0000000 --- a/doc/api-documentation/html/swconfig_8cpp-source.html +++ /dev/null @@ -1,179 +0,0 @@ - - -swconfig.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swconfig.cpp

00001 /******************************************************************************
-00002  *  swconfig.cpp   - implementation of Class SWConfig used for saving and
-00003  *                      retrieval of configuration information
-00004  *
-00005  * $Id: swconfig_8cpp-source.html,v 1.3 2002/06/20 20:23:10 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #include <swconfig.h>
-00024 #include <utilfuns.h>
-00025 
-00026 
-00027 SWConfig::SWConfig(const char * ifilename) {
-00028         filename = ifilename;
-00029         Load();
-00030 }
-00031 
-00032 
-00033 SWConfig::~SWConfig() {
-00034 }
-00035 
-00036 
-00037 char SWConfig::getline(FILE *fp, string &line)
-00038 {
-00039         char retval = 0;
-00040         char buf[255];
-00041 
-00042         line = "";
-00043         
-00044         while (fgets(buf, 254, fp)) {
-00045                 while (buf[strlen(buf)-1] == '\n' || buf[strlen(buf)-1] == '\r')
-00046                         buf[strlen(buf)-1] = 0;
-00047 
-00048                 if (buf[strlen(buf)-1] == '\\') {
-00049                         buf[strlen(buf)-1] = 0;
-00050                         line += buf;
-00051                         continue;
-00052                 }
-00053                 line += buf;
-00054 
-00055                 if (strlen(buf) < 253) {
-00056                         retval = 1;
-00057                         break;
-00058                 }
-00059         }
-00060         return retval;
-00061 }
-00062 
-00063 
-00064 void SWConfig::Load() {
-00065         FILE *cfile;
-00066         char *buf, *data;
-00067         string line;
-00068         ConfigEntMap cursect;
-00069         string sectname;
-00070         bool first = true;
-00071         
-00072         Sections.erase(Sections.begin(), Sections.end());
-00073         
-00074         if ((cfile = fopen(filename.c_str(), "r"))) {
-00075                 while (getline(cfile, line)) {
-00076                         buf = new char [ line.length() + 1 ];
-00077                         strcpy(buf, line.c_str());
-00078                         if (*strstrip(buf) == '[') {
-00079                                 if (!first)
-00080                                         Sections.insert(SectionMap::value_type(sectname, cursect));
-00081                                 else first = false;
-00082                                 
-00083                                 cursect.erase(cursect.begin(), cursect.end());
-00084 
-00085                                 strtok(buf, "]");
-00086                                 sectname = buf+1;
-00087                         }
-00088                         else {
-00089                                 strtok(buf, "=");
-00090                                 if ((*buf) && (*buf != '=')) {
-00091                                         if ((data = strtok(NULL, "")))
-00092                                                 cursect.insert(ConfigEntMap::value_type(buf, strstrip(data)));
-00093                                         else cursect.insert(ConfigEntMap::value_type(buf, ""));
-00094                                 }
-00095                         }
-00096                         delete [] buf;
-00097                 }
-00098                 if (!first)
-00099                         Sections.insert(SectionMap::value_type(sectname, cursect));
-00100 
-00101                 fclose(cfile);
-00102         }
-00103 }
-00104 
-00105 
-00106 void SWConfig::Save() {
-00107         FILE *cfile;
-00108         string buf;
-00109         SectionMap::iterator sit;
-00110         ConfigEntMap::iterator entry;
-00111         string sectname;
-00112         
-00113         if ((cfile = fopen(filename.c_str(), "w"))) {
-00114                 
-00115                 for (sit = Sections.begin(); sit != Sections.end(); sit++) {
-00116                         buf =  "\n[";
-00117                         buf += (*sit).first.c_str();
-00118                         buf += "]\n";
-00119                         fputs(buf.c_str(), cfile);
-00120                         for (entry = (*sit).second.begin(); entry != (*sit).second.end(); entry++) {
-00121                                 buf = (*entry).first.c_str();
-00122                                 buf += "=";
-00123                                 buf += (*entry).second.c_str();
-00124                                 buf += "\n";
-00125                                 fputs(buf.c_str(), cfile);
-00126                         }
-00127                 }
-00128                 fputs("\n", cfile);     // so getline will find last line
-00129                 fclose(cfile);
-00130         }
-00131 }
-00132 
-00133 
-00134 SWConfig &SWConfig::operator +=(SWConfig &addFrom)
-00135 {
-00136 
-00137         SectionMap::iterator section;
-00138         ConfigEntMap::iterator entry, start, end;
-00139 
-00140         for (section = addFrom.Sections.begin(); section != addFrom.Sections.end(); section++) {
-00141                 for (entry = (*section).second.begin(); entry != (*section).second.end(); entry++) {
-00142                         start = Sections[section->first].lower_bound(entry->first);
-00143                         end   = Sections[section->first].upper_bound(entry->first);
-00144                         if (start != end) {
-00145                                 if (((++start) != end)
-00146                                                 || ((++(addFrom.Sections[section->first].lower_bound(entry->first))) != addFrom.Sections[section->first].upper_bound(entry->first))) {
-00147                                         for (--start; start != end; start++) {
-00148                                                 if (!strcmp(start->second.c_str(), entry->second.c_str()))
-00149                                                         break;
-00150                                         }
-00151                                         if (start == end)
-00152                                                 Sections[(*section).first].insert(ConfigEntMap::value_type((*entry).first, (*entry).second));
-00153                                 }
-00154                                 else    Sections[section->first][entry->first.c_str()] = entry->second.c_str();
-00155                         }               
-00156                         else    Sections[section->first][entry->first.c_str()] = entry->second.c_str();
-00157                 }
-00158         }
-00159         return *this;
-00160 }
-00161 
-00162 
-00163 ConfigEntMap & SWConfig::operator [] (const char *section) {
-00164     return Sections[section];
-00165 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swconfig_8h-source.html b/doc/api-documentation/html/swconfig_8h-source.html deleted file mode 100644 index 13ed4f7..0000000 --- a/doc/api-documentation/html/swconfig_8h-source.html +++ /dev/null @@ -1,75 +0,0 @@ - - -swconfig.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swconfig.h

00001 /******************************************************************************
-00002  *  swconfig.h   - definition of Class SWConfig used for saving and retrieval
-00003  *                              of configuration information
-00004  *
-00005  * $Id: swconfig_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #ifndef SWCONFIG_H
-00024 #define SWCONFIG_H
-00025 
-00026 #include <stdio.h>
-00027 
-00028 #include <string>
-00029 #include <map>
-00030 
-00031 #include <defs.h>
-00032 #include <multimapwdef.h>
-00033 
-00034 using namespace std;
-00035 
-00036 
-00037 
-00038 typedef multimapwithdefault < string, string, less < string > >ConfigEntMap;
-00039 typedef map < string, ConfigEntMap, less < string > >SectionMap;
-00040 
-00044 class SWDLLEXPORT SWConfig
-00045 {
-00046 private:
-00047   char getline (FILE * fp, string & line);
-00048 public:
-00052   string filename;
-00056   SectionMap Sections;
-00057 
-00061   SWConfig (const char *ifilename);
-00062   virtual ~ SWConfig ();
-00063 
-00067   virtual void Load ();
-00068 
-00072   virtual void Save ();
-00073 
-00077   virtual SWConfig & operator += (SWConfig & addFrom);
-00078 
-00088   virtual ConfigEntMap & operator [] (const char *section);
-00089 };
-00090 
-00091 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swdisp_8cpp-source.html b/doc/api-documentation/html/swdisp_8cpp-source.html deleted file mode 100644 index 274ebd9..0000000 --- a/doc/api-documentation/html/swdisp_8cpp-source.html +++ /dev/null @@ -1,41 +0,0 @@ - - -swdisp.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swdisp.cpp

00001 /******************************************************************************
-00002  *  swdisp.cpp  - code for base class 'swdisp'.  swdisp is the basis for all
-00003  *                types of displays (e.g. raw textout, curses, xwindow, etc.)
-00004  */
-00005 
-00006 #include <iostream.h>
-00007 #include <swmodule.h>
-00008 #include <swdisp.h>
-00009 
-00010 static const char *classes[] = {"SWDisplay", "SWObject", 0};
-00011 SWClass SWDisplay::classdef(classes);
-00012 
-00013 /******************************************************************************
-00014  * SWDisplay::Display - casts a module to a character pointer and displays it to
-00015  *                      raw output (overriden for different display types and
-00016  *                      module types if necessary)
-00017  *
-00018  * ENT: imodule - module to display
-00019  *
-00020  * RET: error status
-00021  */
-00022 
-00023 char SWDisplay::Display(SWModule &imodule)
-00024 {
-00025         cout << (const char *)imodule;
-00026         return 0;
-00027 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swdisp_8h-source.html b/doc/api-documentation/html/swdisp_8h-source.html deleted file mode 100644 index dc69e95..0000000 --- a/doc/api-documentation/html/swdisp_8h-source.html +++ /dev/null @@ -1,51 +0,0 @@ - - -swdisp.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swdisp.h

00001 /******************************************************************************
-00002  *  swdisp.h  - code for base class 'swdisp'.  swdisp is the basis for all
-00003  *              types of displays (e.g. raw textout, curses, xwindow, etc.)
-00004  *
-00005  * $Id: swdisp_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #ifndef SWDISP_H
-00024 #define SWDISP_H
-00025 
-00026 #include <swobject.h>
-00027 #include <defs.h>
-00028 
-00029 class SWModule;
-00030 
-00034 class SWDLLEXPORT SWDisplay : public SWObject {
-00035   static SWClass classdef;
-00036 public:
-00037   SWDisplay () { myclass = &classdef; };
-00045   virtual char Display (SWModule & imodule);
-00046 };
-00047 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swdisprtf_8h-source.html b/doc/api-documentation/html/swdisprtf_8h-source.html deleted file mode 100644 index 9c34102..0000000 --- a/doc/api-documentation/html/swdisprtf_8h-source.html +++ /dev/null @@ -1,116 +0,0 @@ - - -swdisprtf.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swdisprtf.h

00001 /******************************************************************************
-00002  *  swdisprtf.h   - definition of Class SWDispRTF-- an SWDisplay used to display
-00003  *                              a verse in Rich Text Format.
-00004  *
-00005  * $Id: swdisprtf_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 //---------------------------------------------------------------------------
-00024 #ifndef SWDispRTFH
-00025 #define SWDispRTFH
-00026 //---------------------------------------------------------------------------
-00027 #include <vcl\SysUtils.hpp>
-00028 #include <vcl\Controls.hpp>
-00029 #include <vcl\Classes.hpp>
-00030 #include <vcl\Forms.hpp>
-00031 #include <vcl\ComCtrls.hpp>
-00032 #include <vcl\StdCtrls.hpp>
-00033 #include <swtext.h>
-00034 #ifndef USEOLDRTF
-00035 #include <RxRichEdit.hpp>
-00036 #endif
-00037 //---------------------------------------------------------------------------
-00038 
-00039 #define defRTFHeader          "{\\rtf1\\ansi{\\fonttbl{\\f0\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f1\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f2\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f3\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f4\\froman\\fcharset0\\fprq2 Times New Roman;}{\\f7\\froman\\fcharset2\\fprq2 Symbol;}{\\f8\\froman\\fcharset2\\fprq2 Symbol;}}{\\colortbl;\\red0\\green0\\blue255;\\red0\\green200\\blue50;\\red0\\green0\\blue255;\\red0\\green200\\blue50;\\red0\\green0\\blue255;\\red255\\green0\\blue0;} "
-00040 #define defRTFHeadMargin          "{\\fs8\\cf1\\par\\pard} "
-00041 #define defRTFTrailer         "{\\fs%d \\par }}"        // 24
-00042 
-00043 #define defRTFChapterMarkPre  "\\pard \\qc\\nowidctlpar{\\f1\\cf7\\fs%d\\b Chapter "    // 30
-00044 #define defRTFChapterMarkPost "\\par\\fs%d\\par}"       // 10
-00045 
-00046 #define defRTFVerseMarkPre    "{\\fs%d\\cf1\\super "    //20
-00047 #define defRTFVerseMarkPost   "}"
-00048 
-00049 #define defRTFVersePre        "{\\fs%d" // 24
-00050 #define defRTFVersePost       " }"
-00051 
-00052 #ifndef USEOLDRTF
-00053 class SWDispRTF:public TRxRichEdit
-00054 #else
-00055 class SWDispRTF:public TRichEdit
-00056 #endif
-00057 {
-00058 protected:
-00059 
-00060   System::AnsiString FRTFHeader;
-00061   System::AnsiString FRTFHeadMargin;
-00062   System::AnsiString FRTFTrailer;
-00063   System::AnsiString FRTFChapterMarkPre;
-00064   System::AnsiString FRTFChapterMarkPost;
-00065   System::AnsiString FRTFVerseMarkPre;
-00066   System::AnsiString FRTFVerseMarkPost;
-00067   System::AnsiString FRTFVersePre;
-00068   System::AnsiString FRTFVersePost;
-00069   bool FExpandNewLine;
-00070   CHARRANGE FCharRange;
-00071   int fontSize;
-00072 
-00073   int __fastcall GetMySelStart ();
-00074   void __fastcall SetMySelStart (int iselstart);
-00075   int __fastcall getFontSize ();
-00076   void __fastcall setFontSize (int iFontSize);
-00077   void recalcHeaders ();
-00078 protected:
-00079     TMemoryStream * RTFStream;
-00080 
-00081   virtual void __fastcall Loaded (void);
-00082 public:
-00083     __fastcall SWDispRTF (TComponent * Owner);
-00084     __fastcall ~ SWDispRTF ();
-00085 
-00086   virtual char Display (SWModule & imodule);
-00087 __published:
-00088   __property System::AnsiString RTFHeader = { read = FRTFHeader, write = FRTFHeader};
-00089   __property System::AnsiString RTFHeadMargin = { read = FRTFHeadMargin, write = FRTFHeadMargin };
-00090   __property System::AnsiString RTFChapterMarkPre = { read = FRTFChapterMarkPre, write = FRTFChapterMarkPre };
-00091   __property System::AnsiString RTFChapterMarkPost = { read = FRTFChapterMarkPost, write = FRTFChapterMarkPost };
-00092   __property System::AnsiString RTFVerseMarkPre = { read = FRTFVerseMarkPre, write = FRTFVerseMarkPre };
-00093   __property System::AnsiString RTFVerseMarkPost = { read = FRTFVerseMarkPost, write = FRTFVerseMarkPost };
-00094   __property System::AnsiString RTFVersePre = { read = FRTFVersePre, write = FRTFVersePre };
-00095   __property System::AnsiString RTFVersePost = { read = FRTFVersePost, write = FRTFVersePost };
-00096   __property System::AnsiString RTFTrailer = { read = FRTFTrailer, write = FRTFTrailer };
-00097   __property bool ExpandNewLine = { read = FExpandNewLine, write = FExpandNewLine };
-00098   __property int FontSize = { read = getFontSize, write = setFontSize };
-00099 };
-00100 
-00101 //---------------------------------------------------------------------------
-00102 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swdisprtfchap_8h-source.html b/doc/api-documentation/html/swdisprtfchap_8h-source.html deleted file mode 100644 index 97b7023..0000000 --- a/doc/api-documentation/html/swdisprtfchap_8h-source.html +++ /dev/null @@ -1,80 +0,0 @@ - - -swdisprtfchap.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swdisprtfchap.h

00001 /******************************************************************************
-00002  *  swdisprtfchap.h     - definition of class SWDispRTFChap, an SWDisplay used to
-00003  *                              display an entire chapter in Rich Text Format
-00004  *
-00005  * $Id: swdisprtfchap_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 //---------------------------------------------------------------------------
-00024 #ifndef swdisprtfchapH
-00025 #define swdisprtfchapH
-00026 //---------------------------------------------------------------------------
-00027 #include <vcl\SysUtils.hpp>
-00028 #include <vcl\Controls.hpp>
-00029 #include <vcl\Classes.hpp>
-00030 #include <vcl\Forms.hpp>
-00031 #include <vcl\ComCtrls.hpp>
-00032 #include <vcl\StdCtrls.hpp>
-00033 #include <swtext.h>
-00034 #include <swdisprtf.h>
-00035 //---------------------------------------------------------------------------
-00036 
-00037 class SWDispRTFChap:public SWDispRTF
-00038 {
-00039 protected:
-00040 
-00041   bool FCurVerseMrk;
-00042   bool FCurVersePos;
-00043   bool FMarkCurrentVerse;
-00044   bool FAutoPosition;
-00045   
-00046   char platformID;
-00047 
-00048   virtual void __fastcall Loaded (void);
-00049 public:
-00050     __fastcall SWDispRTFChap (TComponent * Owner);
-00051     __fastcall ~ SWDispRTFChap ();
-00052 
-00053   virtual char Display (SWModule & imodule);
-00054     __published:__property bool CurVersePos =
-00055   {
-00056   read = FCurVersePos, write = FCurVersePos, default = true};
-00057     __property bool CurVerseMrk = { read = FCurVerseMrk, write =
-00058       FCurVerseMrk, default = true };
-00059   __property bool MarkCurrentVerse = { read = FMarkCurrentVerse, write =
-00060       FMarkCurrentVerse, default = true };
-00061   __property bool AutoPosition = { read = FAutoPosition, write =
-00062       FAutoPosition, default = true };
-00063 };
-00064 
-00065 //---------------------------------------------------------------------------
-00066 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swfilter_8h-source.html b/doc/api-documentation/html/swfilter_8h-source.html deleted file mode 100644 index 76f7525..0000000 --- a/doc/api-documentation/html/swfilter_8h-source.html +++ /dev/null @@ -1,84 +0,0 @@ - - -swfilter.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swfilter.h

00001 /******************************************************************************
-00002  *  swfilter.h  - definition of class SWFilter used to filter text between
-00003  *                              different formats
-00004  *
-00005  * $Id: swfilter_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #ifndef SWFILTER_H
-00024 #define SWFILTER_H
-00025 #include <string>
-00026 #include <list>
-00027 #include <swkey.h>
-00028 
-00029 #include <defs.h>
-00030 
-00034 typedef std::list < std::string > OptionsList;
-00035 
-00036 
-00041 class SWModule;
-00042 
-00043 class SWDLLEXPORT  SWFilter {
-00044 public:
-00045        virtual ~SWFilter() {}
-00049 //  typedef std::list < std::string > OptionsList;
-00053   virtual const char * getOptionName ()
-00054   {
-00055     return 0;
-00056   }
-00061   virtual const char * getOptionTip ()
-00062   {
-00063     return 0;
-00064   }
-00069   virtual OptionsList getOptionValues ()
-00070   {
-00071     OptionsList options;
-00072     return options;
-00073   }
-00080   virtual void setOptionValue (const char *)
-00081   {
-00082   }
-00083   virtual const char * getOptionValue ()
-00084   {
-00085     return 0;
-00086   }
-00093   virtual char ProcessText(char *text, int maxlen, const SWKey *, const SWModule * = 0)
-00094   {
-00095     return ProcessText(text, maxlen);
-00096   }
-00102   virtual char ProcessText(char *text, int maxlen = -1)
-00103   {
-00104     return ProcessText(text, maxlen, 0);
-00105   }
-00106 };
-00107 
-00108 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swfiltermgr_8cpp-source.html b/doc/api-documentation/html/swfiltermgr_8cpp-source.html deleted file mode 100644 index cbdf86e..0000000 --- a/doc/api-documentation/html/swfiltermgr_8cpp-source.html +++ /dev/null @@ -1,80 +0,0 @@ - - -swfiltermgr.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swfiltermgr.cpp

00001 /******************************************************************************
-00002  *  swfiltermgr.cpp   - definition of class SWFilterMgr used as an interface to
-00003  *                              manage filters on a module
-00004  *
-00005  * $Id: swfiltermgr_8cpp-source.html,v 1.3 2002/06/20 20:23:10 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #include <swfiltermgr.h>
-00024 
-00025 
-00026 SWFilterMgr::SWFilterMgr() {
-00027 }
-00028 
-00029 
-00030 SWFilterMgr::~SWFilterMgr() {
-00031 }
-00032 
-00033 
-00034 void SWFilterMgr::setParentMgr(SWMgr *parentMgr) {
-00035         this->parentMgr = parentMgr;
-00036 }
-00037 
-00038 
-00039 SWMgr *SWFilterMgr::getParentMgr() {
-00040         return parentMgr;
-00041 }
-00042 
-00043 
-00044 void SWFilterMgr::AddGlobalOptions(SWModule * module, ConfigEntMap & section, ConfigEntMap::iterator start, ConfigEntMap::iterator end) {
-00045 }
-00046 
-00047 
-00048 void SWFilterMgr::AddLocalOptions(SWModule * module, ConfigEntMap & section, ConfigEntMap::iterator start, ConfigEntMap::iterator end) {
-00049 }
-00050 
-00051 
-00058 void SWFilterMgr::AddEncodingFilters(SWModule * module, ConfigEntMap & section) {
-00059 }
-00060 
-00061 
-00068 void SWFilterMgr::AddRenderFilters(SWModule * module, ConfigEntMap & section) {
-00069 }
-00070 
-00071 
-00078 void SWFilterMgr::AddStripFilters(SWModule * module, ConfigEntMap & section) {
-00079 }
-00080 
-00081 
-00088 void SWFilterMgr::AddRawFilters(SWModule * module, ConfigEntMap & section) {
-00089 }
-00090 
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swfiltermgr_8h-source.html b/doc/api-documentation/html/swfiltermgr_8h-source.html deleted file mode 100644 index 2adf1ec..0000000 --- a/doc/api-documentation/html/swfiltermgr_8h-source.html +++ /dev/null @@ -1,76 +0,0 @@ - - -swfiltermgr.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swfiltermgr.h

00001 /******************************************************************************
-00002  *  swfiltermgr.h   - definition of class SWFilterMgr used as an interface to
-00003  *                              manage filters on a module
-00004  *
-00005  * $Id: swfiltermgr_8h-source.html,v 1.5 2002/06/20 20:23:10 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #ifndef SWFILTERMGR_H
-00024 #define SWFILTERMGR_H
-00025 
-00026 #include <sys/types.h>
-00027 #include <swmodule.h>
-00028 #include <swconfig.h>
-00029 #include <swlog.h>
-00030 
-00031 #include <defs.h>
-00032 
-00033 class SWMgr;
-00034 
-00035 
-00036 class SWDLLEXPORT SWFilterMgr {
-00037 
-00038 private:
-00039         SWMgr *parentMgr;
-00040 
-00041 public:
-00042   SWFilterMgr ();
-00043   virtual ~SWFilterMgr ();
-00044 
-00045   virtual void setParentMgr(SWMgr *parentMgr);
-00046   virtual SWMgr *getParentMgr();
-00047 
-00048   virtual void AddGlobalOptions (SWModule * module, ConfigEntMap & section,
-00049                                  ConfigEntMap::iterator start,
-00050                                  ConfigEntMap::iterator end);
-00051   virtual void AddLocalOptions (SWModule * module, ConfigEntMap & section,
-00052                                 ConfigEntMap::iterator start,
-00053                                 ConfigEntMap::iterator end);
-00054 
-00060   virtual void AddEncodingFilters (SWModule * module, ConfigEntMap & section);
-00066   virtual void AddRenderFilters (SWModule * module, ConfigEntMap & section);
-00072   virtual void AddStripFilters (SWModule * module, ConfigEntMap & section);
-00078   virtual void AddRawFilters (SWModule * module, ConfigEntMap & section);
-00079 
-00080 };
-00081 
-00082 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swgenbook_8cpp-source.html b/doc/api-documentation/html/swgenbook_8cpp-source.html deleted file mode 100644 index 9c5f96c..0000000 --- a/doc/api-documentation/html/swgenbook_8cpp-source.html +++ /dev/null @@ -1,41 +0,0 @@ - - -swgenbook.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swgenbook.cpp

00001 /******************************************************************************
-00002  *  swld.cpp   - code for base class 'SWLD'.  SWLD is the basis for all
-00003  *                              types of Lexicon and Dictionary modules (hence the 'LD').
-00004  */
-00005 
-00006 #include <swgenbook.h>
-00007 
-00008 
-00009 /******************************************************************************
-00010  * SWLD Constructor - Initializes data for instance of SWLD
-00011  *
-00012  * ENT: imodname - Internal name for module
-00013  *      imoddesc - Name to display to user for module
-00014  *      idisp    - Display object to use for displaying
-00015  */
-00016 
-00017 SWGenBook::SWGenBook(const char *imodname, const char *imoddesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang) : SWModule(imodname, imoddesc, idisp, "Generic Books", enc, dir, mark, ilang) {
-00018 }
-00019 
-00020 
-00021 /******************************************************************************
-00022  * SWLD Destructor - Cleans up instance of SWLD
-00023  */
-00024 
-00025 SWGenBook::~SWGenBook() {
-00026 }
-00027 
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swgenbook_8h-source.html b/doc/api-documentation/html/swgenbook_8h-source.html deleted file mode 100644 index 4793ace..0000000 --- a/doc/api-documentation/html/swgenbook_8h-source.html +++ /dev/null @@ -1,56 +0,0 @@ - - -swgenbook.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swgenbook.h

00001 /******************************************************************************
-00002 *  swld.h   - code for base class 'SWLD'.  SWLD is the basis for all
-00003 *                               types of Lexicon and Dictionary modules (hence the 'LD').
-00004 *
-00005 * $Id: swgenbook_8h-source.html,v 1.3 2002/06/20 20:23:10 mgruner Exp $
-00006 *
-00007 * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008 *       CrossWire Bible Society
-00009 *       P. O. Box 2528
-00010 *       Tempe, AZ  85280-2528
-00011 *
-00012 * This program is free software; you can redistribute it and/or modify it
-00013 * under the terms of the GNU General Public License as published by the
-00014 * Free Software Foundation version 2.
-00015 *
-00016 * This program is distributed in the hope that it will be useful, but
-00017 * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019 * General Public License for more details.
-00020 *
-00021 */
-00022 
-00023 #ifndef SWGENBOOK_H
-00024 #define SWGENBOOK_H
-00025 
-00026 #include <swmodule.h>
-00027 #include <treekeyidx.h>
-00028 
-00029 #include <defs.h>
-00030 
-00034 class SWDLLEXPORT SWGenBook:public SWModule {
-00035 
-00036 protected:
-00037         char *entkeytxt;
-00038 
-00039 public:
-00046         SWGenBook(const char *imodname = 0, const char *imoddesc = 0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0);
-00047         virtual ~SWGenBook();
-00048         virtual SWKey *CreateKey() = 0;
-00049 };
-00050 
-00051 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swinputmeth_8cpp-source.html b/doc/api-documentation/html/swinputmeth_8cpp-source.html deleted file mode 100644 index 747ceb9..0000000 --- a/doc/api-documentation/html/swinputmeth_8cpp-source.html +++ /dev/null @@ -1,32 +0,0 @@ - - -swinputmeth.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swinputmeth.cpp

00001 
-00010 #include <swinputmeth.h>
-00011 
-00012 SWInputMethod::SWInputMethod() {
-00013    state = 0;
-00014 }
-00015 
-00016 void SWInputMethod::setState(int state) {
-00017    this->state = state;
-00018 }
-00019 
-00020 int SWInputMethod::getState() {
-00021    return state;
-00022 }
-00023 
-00024 void SWInputMethod::clearState() {
-00025    state = 0;
-00026 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swinputmeth_8h-source.html b/doc/api-documentation/html/swinputmeth_8h-source.html deleted file mode 100644 index 053fbc0..0000000 --- a/doc/api-documentation/html/swinputmeth_8h-source.html +++ /dev/null @@ -1,36 +0,0 @@ - - -swinputmeth.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swinputmeth.h

00001 
-00010 #ifndef SWINPUTMETHOD_H
-00011 #define SWINPUTMETHOD_H
-00012 
-00013 class SWInputMethod {
-00014 
-00015 private:
-00016     int state;
-00017 
-00018 protected:
-00019     virtual void setState(int state);
-00020 
-00021 public:
-00022     SWInputMethod();
-00023     virtual ~SWInputMethod() {}
-00024 
-00025     virtual int *translate(char in) = 0;
-00026     virtual int getState();
-00027     virtual void clearState();
-00028 };
-00029 
-00030 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swkey_8cpp-source.html b/doc/api-documentation/html/swkey_8cpp-source.html deleted file mode 100644 index 115e65e..0000000 --- a/doc/api-documentation/html/swkey_8cpp-source.html +++ /dev/null @@ -1,210 +0,0 @@ - - -swkey.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swkey.cpp

00001 /******************************************************************************
-00002  *  swkey.cpp - code for base class 'SWKey'.  SWKey is the basis for all
-00003  *              types of keys for indexing into modules (e.g. verse, word,
-00004  *              place, etc.)
-00005  */
-00006 
-00007 #include <swkey.h>
-00008 #include <utilfuns.h>
-00009 #include <string.h>
-00010 
-00011 static const char *classes[] = {"SWKey", "SWObject", 0};
-00012 SWClass SWKey::classdef(classes);
-00013 
-00014 /******************************************************************************
-00015  * SWKey Constructor - initializes instance of SWKey
-00016  *
-00017  * ENT: ikey - text key
-00018  */
-00019 
-00020 SWKey::SWKey(const char *ikey)
-00021 {
-00022         index   = 0;
-00023         persist = 0;
-00024         keytext = 0;
-00025         error   = 0;
-00026         stdstr(&keytext, ikey);
-00027         init();
-00028 }
-00029 
-00030 SWKey::SWKey(SWKey const &k)
-00031 {
-00032         index    = k.index;
-00033         persist  = k.persist;
-00034         userData = k.userData;
-00035         keytext  = 0;
-00036         error    = k.error;
-00037         stdstr(&keytext, k.keytext);
-00038         init();
-00039 }
-00040 
-00041 void SWKey::init() {
-00042         myclass = &classdef;
-00043 }
-00044 
-00045 SWKey *SWKey::clone() const
-00046 {
-00047         return new SWKey(*this);
-00048 }
-00049 
-00050 /******************************************************************************
-00051  * SWKey Destructor - cleans up instance of SWKey
-00052  */
-00053 
-00054 SWKey::~SWKey() {
-00055         if (keytext)
-00056                 delete [] keytext;
-00057 }
-00058 
-00059 
-00060 /******************************************************************************
-00061  * SWKey::Persist - Gets whether this object itself persists within a
-00062  *                      module that it was used to SetKey or just a copy.
-00063  *                      (1 - persists in module; 0 - a copy is attempted
-00064  *
-00065  * RET: value of persist
-00066  */
-00067 
-00068 char SWKey::Persist() const
-00069 {
-00070         return persist;
-00071 }
-00072 
-00073 
-00074 /******************************************************************************
-00075  * SWKey::Persist - Set/gets whether this object itself persists within a
-00076  *                      module that it was used to SetKey or just a copy.
-00077  *                      (1 - persists in module; 0 - a copy is attempted
-00078  *
-00079  * ENT: ipersist - value which to set persist
-00080  *              [-1] - only get
-00081  *
-00082  * RET: value of persist
-00083  */
-00084 
-00085 char SWKey::Persist(signed char ipersist)
-00086 {
-00087         if (ipersist != -1)
-00088                 persist = ipersist;
-00089 
-00090         return persist;
-00091 }
-00092 
-00093 
-00094 /******************************************************************************
-00095  * SWKey::Error - Gets and clears error status
-00096  *
-00097  * RET: error status
-00098  */
-00099 
-00100 char SWKey::Error()
-00101 {
-00102         char retval = error;
-00103 
-00104         error = 0;
-00105         return retval;
-00106 }
-00107 
-00108 
-00109 /******************************************************************************
-00110  * SWKey::setText Equates this SWKey to a character string
-00111  *
-00112  * ENT: ikey - other swkey object
-00113  */
-00114 
-00115 void SWKey::setText(const char *ikey) {
-00116         stdstr(&keytext, ikey);
-00117 }
-00118 
-00119 
-00120 /******************************************************************************
-00121  * SWKey::copyFrom Equates this SWKey to another SWKey object
-00122  *
-00123  * ENT: ikey - other swkey object
-00124  */
-00125 
-00126 void SWKey::copyFrom(const SWKey &ikey) {
-00127 // not desirable        Persist(ikey.Persist());
-00128         setText((const char *)ikey);
-00129 }
-00130 
-00131 
-00132 /******************************************************************************
-00133  * SWKey::getText - returns text key if (char *) cast is requested
-00134  */
-00135 
-00136 const char *SWKey::getText() const {
-00137         return keytext;
-00138 }
-00139 
-00140 
-00141 /******************************************************************************
-00142  * SWKey::compare       - Compares another VerseKey object
-00143  *
-00144  * ENT: ikey - key to compare with this one
-00145  *
-00146  * RET: > 0 if this key is greater than compare key
-00147  *      < 0
-00148  *        0
-00149  */
-00150 
-00151 int SWKey::compare(const SWKey &ikey)
-00152 {
-00153         return strcmp((const char *)*this, (const char *)ikey);
-00154 }
-00155 
-00156 
-00157 /******************************************************************************
-00158  * SWKey::setPosition(SW_POSITION)      - Positions this key if applicable
-00159  */
-00160 
-00161 void SWKey::setPosition(SW_POSITION p) {
-00162         switch (p) {
-00163         case POS_TOP:
-00164 //              *this = "";
-00165                 break;
-00166         case POS_BOTTOM:
-00167 //              *this = "zzzzzzzzz";
-00168                 break;
-00169         } 
-00170 }
-00171 
-00172 
-00173 /******************************************************************************
-00174  * SWKey::increment     - Increments key a number of entries
-00175  *
-00176  * ENT: increment       - Number of entries to jump forward
-00177  *
-00178  * RET: *this
-00179  */
-00180 
-00181 void SWKey::increment(int) {
-00182         error = KEYERR_OUTOFBOUNDS;
-00183 }
-00184 
-00185 
-00186 /******************************************************************************
-00187  * SWKey::decrement     - Decrements key a number of entries
-00188  *
-00189  * ENT: decrement       - Number of entries to jump backward
-00190  *
-00191  * RET: *this
-00192  */
-00193 
-00194 void SWKey::decrement(int) {
-00195         error = KEYERR_OUTOFBOUNDS;
-00196 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swkey_8h-source.html b/doc/api-documentation/html/swkey_8h-source.html deleted file mode 100644 index ca6c283..0000000 --- a/doc/api-documentation/html/swkey_8h-source.html +++ /dev/null @@ -1,142 +0,0 @@ - - -swkey.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swkey.h

00001 /******************************************************************************
-00002  *  swkey.h     - code for base class 'swkey'.  swkey is the basis for all
-00003  *                              types of keys for indexing into modules (e.g. verse, word,
-00004  *                              place, etc.)
-00005  *
-00006  * $Id: swkey_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00007  *
-00008  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00009  *      CrossWire Bible Society
-00010  *      P. O. Box 2528
-00011  *      Tempe, AZ  85280-2528
-00012  *
-00013  * This program is free software; you can redistribute it and/or modify it
-00014  * under the terms of the GNU General Public License as published by the
-00015  * Free Software Foundation version 2.
-00016  *
-00017  * This program is distributed in the hope that it will be useful, but
-00018  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00020  * General Public License for more details.
-00021  *
-00022  */
-00023 
-00024 #ifndef SWKEY_H
-00025 #define SWKEY_H
-00026 
-00027 #include <swobject.h>
-00028 
-00029 #include <defs.h>
-00030 
-00031 #define KEYERR_OUTOFBOUNDS 1
-00032 
-00033 #define SWKEY_OPERATORS \
-00034   SWKey & operator = (const char *ikey) { setText(ikey); return *this; } \
-00035   SWKey & operator = (const SWKey &ikey) { copyFrom(ikey); return *this; } \
-00036   SWKey & operator = (SW_POSITION pos) { setPosition(pos); return *this; } \
-00037   operator const char *() const { return getText(); } \
-00038   bool operator == (const SWKey & ikey) { return equals(ikey); } \
-00039   bool operator != (const SWKey & ikey) { return !equals(ikey); } \
-00040   virtual bool operator > (const SWKey & ikey) { return (compare (ikey) > 0); } \
-00041   virtual bool operator < (const SWKey & ikey) { return (compare (ikey) < 0); } \
-00042   virtual bool operator >= (const SWKey & ikey) { return (compare (ikey) > -1); }  \
-00043   virtual bool operator <= (const SWKey & ikey) { return (compare (ikey) < 1); } \
-00044   SWKey & operator -= (int steps) { decrement(steps); return *this; } \
-00045   SWKey & operator += (int steps) { increment(steps); return *this; } \
-00046   SWKey & operator++ (int) { return *this += 1; } \
-00047   SWKey & operator-- (int) { return *this -= 1; }
-00048 
-00049 
-00050 // For use with = operator to position key.
-00051 
-00052 class SW_POSITION
-00053 {
-00054   char pos;
-00055 public:
-00056     SW_POSITION (char ipos)
-00057   {
-00058     pos = ipos;
-00059   }
-00060   operator char ()
-00061   {
-00062     return pos;
-00063   }
-00064 };
-00065 
-00066 #define POS_TOP ((char)1)
-00067 #define POS_BOTTOM ((char)2)
-00068 
-00069 #define TOP SW_POSITION(POS_TOP)
-00070 #define BOTTOM SW_POSITION(POS_BOTTOM)
-00071 
-00076 class SWDLLEXPORT SWKey : public SWObject {
-00077   long index;
-00078   static SWClass classdef;
-00079   void init ();
-00080 
-00081 protected:
-00082   char *keytext;
-00083   char persist;
-00084   char error;
-00085 
-00086 public:
-00087 
-00088   // misc pointer for whatever
-00089   void *userData;
-00090 
-00095   SWKey (const char *ikey = 0);
-00096 
-00100   SWKey (SWKey const &k);
-00101 
-00104   virtual ~ SWKey ();
-00105 
-00110   virtual SWKey *clone () const;
-00111 
-00118   char Persist () const;
-00119 
-00128   char Persist (signed char ikey);
-00129 
-00134   virtual char Error ();
-00135 
-00140   virtual void setText(const char *ikey);
-00141 
-00146   virtual void copyFrom(const SWKey &ikey);
-00147 
-00150   virtual const char *getText() const;
-00151   virtual const char *getShortText() const { return getText(); }
-00152 
-00160   virtual int compare (const SWKey & ikey);
-00161 
-00167   virtual bool equals(const SWKey &ikey) { return !compare(ikey); }
-00168 
-00169   virtual void setPosition(SW_POSITION);
-00170 
-00176   virtual void decrement(int steps = 1);
-00177 
-00183   virtual void increment(int steps = 1);
-00184 
-00185   virtual char Traversable () { return 0; }
-00186 
-00208   virtual long Index () const { return index; }
-00209   virtual long Index (long iindex) { index = iindex; return index; }
-00210 
-00211   SWKEY_OPERATORS
-00212 
-00213 };
-00214 
-00215 
-00216 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swld_8cpp-source.html b/doc/api-documentation/html/swld_8cpp-source.html deleted file mode 100644 index b5a2a61..0000000 --- a/doc/api-documentation/html/swld_8cpp-source.html +++ /dev/null @@ -1,69 +0,0 @@ - - -swld.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swld.cpp

00001 /******************************************************************************
-00002  *  swld.cpp   - code for base class 'SWLD'.  SWLD is the basis for all
-00003  *                              types of Lexicon and Dictionary modules (hence the 'LD').
-00004  */
-00005 
-00006 #include <swld.h>
-00007 
-00008 
-00009 /******************************************************************************
-00010  * SWLD Constructor - Initializes data for instance of SWLD
-00011  *
-00012  * ENT: imodname - Internal name for module
-00013  *      imoddesc - Name to display to user for module
-00014  *      idisp    - Display object to use for displaying
-00015  */
-00016 
-00017 SWLD::SWLD(const char *imodname, const char *imoddesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang) : SWModule(imodname, imoddesc, idisp, "Lexicons / Dictionaries", enc, dir, mark, ilang)
-00018 {
-00019         delete key;
-00020         key = CreateKey();
-00021         entkeytxt = new char [1];
-00022         *entkeytxt = 0;
-00023 }
-00024 
-00025 
-00026 /******************************************************************************
-00027  * SWLD Destructor - Cleans up instance of SWLD
-00028  */
-00029 
-00030 SWLD::~SWLD()
-00031 {
-00032         if (entkeytxt)
-00033                 delete [] entkeytxt;
-00034 }
-00035 
-00036 
-00037 /******************************************************************************
-00038  * SWLD::KeyText - Sets/gets module KeyText, getting from saved text if key is
-00039  *                              persistent
-00040  *
-00041  * ENT: ikeytext - value which to set keytext
-00042  *              [0] - only get
-00043  *
-00044  * RET: pointer to keytext
-00045  */
-00046 
-00047 const char *SWLD::KeyText(const char *ikeytext)
-00048 {
-00049         if (key->Persist() && !ikeytext) {
-00050                 getRawEntry();  // force module key to snap to entry
-00051                 return entkeytxt;
-00052         }
-00053         else return SWModule::KeyText(ikeytext);
-00054 }
-00055 
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swld_8h-source.html b/doc/api-documentation/html/swld_8h-source.html deleted file mode 100644 index 2a78c27..0000000 --- a/doc/api-documentation/html/swld_8h-source.html +++ /dev/null @@ -1,60 +0,0 @@ - - -swld.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swld.h

00001 /******************************************************************************
-00002  *  swld.h   - code for base class 'SWLD'.  SWLD is the basis for all
-00003  *                              types of Lexicon and Dictionary modules (hence the 'LD').
-00004  *
-00005  * $Id: swld_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #ifndef SWLD_H
-00024 #define SWLD_H
-00025 
-00026 #include <swmodule.h>
-00027 #include <strkey.h>
-00028 
-00029 #include <defs.h>
-00030 
-00034 class SWDLLEXPORT SWLD:public SWModule
-00035 {
-00036 protected:
-00037   char *entkeytxt;
-00038 public:
-00045   SWLD (const char *imodname = 0, const char *imoddesc = 0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0);
-00046   virtual ~ SWLD ();
-00047   virtual SWKey *CreateKey ()
-00048   {
-00049     return new StrKey ();
-00050   }
-00057   virtual const char *KeyText (const char *ikeytext);
-00058 };
-00059 
-00060 
-00061 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swlocale_8cpp-source.html b/doc/api-documentation/html/swlocale_8cpp-source.html deleted file mode 100644 index 910d4ea..0000000 --- a/doc/api-documentation/html/swlocale_8cpp-source.html +++ /dev/null @@ -1,155 +0,0 @@ - - -swlocale.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swlocale.cpp

00001 /******************************************************************************
-00002  *  swlocale.cpp   - implementation of Class SWLocale used for retrieval
-00003  *                              of locale lookups
-00004  *
-00005  * $Id: swlocale_8cpp-source.html,v 1.3 2002/06/20 20:23:10 mgruner Exp $
-00006  *
-00007  * Copyright 2000 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #include <swlocale.h>
-00024 #include <utilfuns.h>
-00025 
-00026 
-00027 SWLocale::SWLocale(const char * ifilename) {
-00028         ConfigEntMap::iterator confEntry;
-00029 
-00030         name         = 0;
-00031         description  = 0;
-00032         bookAbbrevs  = 0;
-00033         BMAX         = 0;
-00034         books        = 0;
-00035         localeSource = new SWConfig(ifilename);
-00036 
-00037         confEntry = localeSource->Sections["Meta"].find("Name");
-00038         if (confEntry != localeSource->Sections["Meta"].end())
-00039                 stdstr(&name, (*confEntry).second.c_str());
-00040         
-00041         confEntry = localeSource->Sections["Meta"].find("Description");
-00042         if (confEntry != localeSource->Sections["Meta"].end())
-00043                 stdstr(&description, (*confEntry).second.c_str());
-00044 }
-00045 
-00046 
-00047 SWLocale::~SWLocale() {
-00048 
-00049         delete localeSource;
-00050 
-00051         if (description)
-00052                 delete [] description;
-00053 
-00054         if (name)
-00055                 delete [] name;
-00056 
-00057         if (bookAbbrevs)
-00058                 delete [] bookAbbrevs;
-00059 
-00060         if (BMAX) {
-00061                 for (int i = 0; i < 2; i++)
-00062                         delete [] books[i];
-00063                 delete [] BMAX;
-00064                 delete [] books;
-00065         }
-00066 }
-00067 
-00068 
-00069 const char *SWLocale::translate(const char *text) {
-00070         LookupMap::iterator entry;
-00071 
-00072         entry = lookupTable.find(text);
-00073 
-00074         if (entry == lookupTable.end()) {
-00075                 ConfigEntMap::iterator confEntry;
-00076                 confEntry = localeSource->Sections["Text"].find(text);
-00077                 if (confEntry == localeSource->Sections["Text"].end())
-00078                         lookupTable.insert(LookupMap::value_type(text, text));
-00079                 else    lookupTable.insert(LookupMap::value_type(text, (*confEntry).second.c_str()));
-00080                 entry = lookupTable.find(text);
-00081         }
-00082         return (*entry).second.c_str();
-00083 }
-00084 
-00085 
-00086 const char *SWLocale::getName() {
-00087         return name;
-00088 }
-00089 
-00090 
-00091 const char *SWLocale::getDescription() {
-00092         return description;
-00093 }
-00094 
-00095 
-00096 SWLocale &SWLocale::operator +=(SWLocale &addFrom) {
-00097         *localeSource += *addFrom.localeSource;
-00098         return *this;
-00099 }
-00100 
-00101 
-00102 const struct abbrev *SWLocale::getBookAbbrevs() {
-00103         static const char *nullstr = "";
-00104         if (!bookAbbrevs) {
-00105                 ConfigEntMap::iterator it;
-00106                 int i;
-00107                 int size = localeSource->Sections["Book Abbrevs"].size();
-00108                 bookAbbrevs = new struct abbrev[size + 1];
-00109                 for (i = 0, it = localeSource->Sections["Book Abbrevs"].begin(); it != localeSource->Sections["Book Abbrevs"].end(); it++, i++) {
-00110                         bookAbbrevs[i].ab = (*it).first.c_str();
-00111                         bookAbbrevs[i].book = atoi((*it).second.c_str());
-00112                 }
-00113                 bookAbbrevs[i].ab = nullstr;
-00114                 bookAbbrevs[i].book = -1;
-00115         }
-00116                 
-00117         return bookAbbrevs;
-00118 }
-00119 
-00120 
-00121 void SWLocale::getBooks(char **iBMAX, struct sbook ***ibooks) {
-00122         if (!BMAX) {
-00123                 BMAX = new char [2];
-00124                 BMAX[0] = VerseKey::builtin_BMAX[0];
-00125                 BMAX[1] = VerseKey::builtin_BMAX[1];
-00126 
-00127                 books = new struct sbook *[2];
-00128                 books[0] = new struct sbook[BMAX[0]];
-00129                 books[1] = new struct sbook[BMAX[1]];
-00130 
-00131                 for (int i = 0; i < 2; i++) {
-00132                         for (int j = 0; j < BMAX[i]; j++) {
-00133                                 books[i][j] = VerseKey::builtin_books[i][j];
-00134                                 books[i][j].name = translate(VerseKey::builtin_books[i][j].name);
-00135                         }
-00136                 }
-00137         }
-00138 
-00139         *iBMAX  = BMAX;
-00140         *ibooks = books;
-00141 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swlocale_8h-source.html b/doc/api-documentation/html/swlocale_8h-source.html deleted file mode 100644 index f77bdf1..0000000 --- a/doc/api-documentation/html/swlocale_8h-source.html +++ /dev/null @@ -1,74 +0,0 @@ - - -swlocale.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swlocale.h

00001 /******************************************************************************
-00002  *  swlocale.h   - definition of Class SWLocale used for retrieval
-00003  *                              of locale lookups
-00004  *
-00005  * $Id: swlocale_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00006  *
-00007  * Copyright 2000 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #ifndef SWLOCALE_H
-00024 #define SWLOCALE_H
-00025 
-00026 #include <string>
-00027 #include <map>
-00028 
-00029 #include <swconfig.h>
-00030 #include <versekey.h>
-00031 
-00032 #include <defs.h>
-00033 
-00034 using namespace std;
-00035 
-00036 typedef map < string, string, less < string > >LookupMap;
-00037 
-00044 class SWDLLEXPORT SWLocale
-00045 {
-00046   LookupMap lookupTable;
-00047   SWConfig *localeSource;
-00048   char *name;
-00049   char *description;
-00050   struct abbrev *bookAbbrevs;
-00051   char *BMAX;
-00052   struct sbook **books;
-00053 
-00054 public:
-00055   SWLocale (const char *ifilename);
-00056   virtual ~ SWLocale ();
-00057 
-00062   virtual const char *getName ();
-00066   virtual const char *getDescription ();
-00067   virtual const char *translate (const char *text);
-00068   virtual SWLocale & operator += (SWLocale & addFrom);
-00069   virtual const struct abbrev *getBookAbbrevs ();
-00070   virtual void getBooks (char **iBMAX, struct sbook ***ibooks);
-00071 };
-00072 
-00073 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swlog_8cpp-source.html b/doc/api-documentation/html/swlog_8cpp-source.html deleted file mode 100644 index 7ac6bf5..0000000 --- a/doc/api-documentation/html/swlog_8cpp-source.html +++ /dev/null @@ -1,109 +0,0 @@ - - -swlog.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swlog.cpp

00001 //---------------------------------------------------------------------------
-00002 
-00003 #include <stdarg.h>
-00004 #include <stdio.h>
-00005 #ifndef _MSC_VER
-00006 #include <iostream.h>
-00007 #endif
-00008 #include "swlog.h"
-00009 //---------------------------------------------------------------------------
-00010 
-00011 
-00012 SWLog *SWLog::systemlog = 0;
-00013 
-00014 
-00015 class __staticsystemlog {
-00016 public:
-00017         __staticsystemlog() {
-00018                 SWLog::systemlog = new SWLog();
-00019         }
-00020         ~__staticsystemlog() {
-00021                 delete SWLog::systemlog;
-00022         }
-00023 } _staticsystemlog;
-00024 
-00025 
-00026 void SWLog::LogWarning(char *fmt, ...)
-00027 {
-00028         char msg[2048];
-00029         va_list argptr;
-00030 
-00031         if (log) {
-00032                 va_start(argptr, fmt);
-00033                 vsprintf(msg, fmt, argptr);
-00034                 va_end(argptr);
-00035 
-00036 #ifndef _MSC_VER
-00037                 cerr << msg;
-00038                 cerr << "\n";
-00039 #endif
-00040         }
-00041 }
-00042 
-00043 
-00044 void SWLog::LogError(char *fmt, ...)
-00045 {
-00046         char msg[2048];
-00047         va_list argptr;
-00048 
-00049         if (log) {
-00050                 va_start(argptr, fmt);
-00051                 vsprintf(msg, fmt, argptr);
-00052                 va_end(argptr);
-00053 
-00054 #ifndef _MSC_VER
-00055                 cerr << msg;
-00056                 cerr << "\n";
-00057 #endif
-00058         }
-00059 }
-00060 
-00061 
-00062 void SWLog::LogTimedInformation(char *fmt, ...)
-00063 {
-00064         char msg[2048];
-00065         va_list argptr;
-00066 
-00067         if (log) {
-00068                 va_start(argptr, fmt);
-00069                 vsprintf(msg, fmt, argptr);
-00070                 va_end(argptr);
-00071 
-00072 #ifndef _MSC_VER
-00073                 cout << msg;
-00074                 cout << "\n";
-00075 #endif
-00076         }
-00077 }
-00078 
-00079 
-00080 void SWLog::LogInformation(char *fmt, ...)
-00081 {
-00082         char msg[2048];
-00083         va_list argptr;
-00084 
-00085         if (log) {
-00086                 va_start(argptr, fmt);
-00087                 vsprintf(msg, fmt, argptr);
-00088                 va_end(argptr);
-00089 
-00090 #ifndef _MSC_VER
-00091                 cout << msg;
-00092                 cout << "\n";
-00093 #endif
-00094         }
-00095 } 
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swlog_8h-source.html b/doc/api-documentation/html/swlog_8h-source.html deleted file mode 100644 index a0dbf30..0000000 --- a/doc/api-documentation/html/swlog_8h-source.html +++ /dev/null @@ -1,60 +0,0 @@ - - -swlog.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swlog.h

00001 /******************************************************************************
-00002  *  swlog.h     - definition of class SWLog used for logging messages
-00003  *
-00004  * $Id: swlog_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00005  *
-00006  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00007  *      CrossWire Bible Society
-00008  *      P. O. Box 2528
-00009  *      Tempe, AZ  85280-2528
-00010  *
-00011  * This program is free software; you can redistribute it and/or modify it
-00012  * under the terms of the GNU General Public License as published by the
-00013  * Free Software Foundation version 2.
-00014  *
-00015  * This program is distributed in the hope that it will be useful, but
-00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00018  * General Public License for more details.
-00019  *
-00020  */
-00021 
-00022 //---------------------------------------------------------------------------
-00023 #ifndef swlogH
-00024 #define swlogH
-00025 //---------------------------------------------------------------------------
-00026 
-00027 #include <defs.h>
-00028 
-00029 class SWDLLEXPORT SWLog
-00030 {
-00031 public:
-00032   static SWLog *systemlog;
-00033 
-00034   bool log;
-00035     SWLog ()
-00036   {
-00037     log = true;
-00038   }
-00039   virtual void LogWarning (char *fmt, ...);
-00040   virtual void LogError (char *fmt, ...);
-00041   virtual void LogTimedInformation (char *fmt, ...);
-00042   virtual void LogInformation (char *fmt, ...);
-00043 };
-00044 
-00045 
-00046 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swmacs_8h-source.html b/doc/api-documentation/html/swmacs_8h-source.html deleted file mode 100644 index ea6ac63..0000000 --- a/doc/api-documentation/html/swmacs_8h-source.html +++ /dev/null @@ -1,44 +0,0 @@ - - -swmacs.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swmacs.h

00001 /******************************************************************************
-00002  *  swmacs.h    - generic macros
-00003  *
-00004  * $Id: swmacs_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00005  *
-00006  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00007  *      CrossWire Bible Society
-00008  *      P. O. Box 2528
-00009  *      Tempe, AZ  85280-2528
-00010  *
-00011  * This program is free software; you can redistribute it and/or modify it
-00012  * under the terms of the GNU General Public License as published by the
-00013  * Free Software Foundation version 2.
-00014  *
-00015  * This program is distributed in the hope that it will be useful, but
-00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00018  * General Public License for more details.
-00019  *
-00020  */
-00021 
-00022 #ifndef SWMACS_H
-00023 #define SWMACS_H
-00024 
-00025 
-00026 // Maximum positive value of a signed numeric type
-00027 #define MAXPOS(x) ((x)((unsigned x)(1L << (sizeof(x)*8-1)) - 1))
-00028 
-00029 
-00030 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swmgr_8cpp-source.html b/doc/api-documentation/html/swmgr_8cpp-source.html deleted file mode 100644 index ba8d877..0000000 --- a/doc/api-documentation/html/swmgr_8cpp-source.html +++ /dev/null @@ -1,1069 +0,0 @@ - - -swmgr.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swmgr.cpp

00001 /******************************************************************************
-00002  *  swmgr.cpp   - implementaion of class SWMgr used to interact with an install
-00003  *                              base of sword modules.
-00004  *
-00005  * $Id: swmgr_8cpp-source.html,v 1.3 2002/06/20 20:23:10 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #include <stdio.h>
-00024 #include <stdlib.h>
-00025 #include <fcntl.h>
-00026 
-00027 #ifndef __GNUC__
-00028 #include <io.h>
-00029 #else
-00030 #include <unistd.h>
-00031 #include <unixstr.h>
-00032 #endif
-00033 #include <sys/stat.h>
-00034 #ifndef _MSC_VER
-00035 #include <iostream.h>
-00036 #endif
-00037 #include <dirent.h>
-00038 
-00039 #include <swmgr.h>
-00040 #include <rawtext.h>
-00041 #include <rawgenbook.h>
-00042 #include <rawcom.h>
-00043 #include <hrefcom.h>
-00044 #include <rawld.h>
-00045 #include <rawld4.h>
-00046 #include <utilfuns.h>
-00047 #include <gbfplain.h>
-00048 #include <thmlplain.h>
-00049 #include <gbfstrongs.h>
-00050 #include <gbffootnotes.h>
-00051 #include <gbfheadings.h>
-00052 #include <gbfmorph.h>
-00053 #include <thmlstrongs.h>
-00054 #include <thmlfootnotes.h>
-00055 #include <thmlheadings.h>
-00056 #include <thmlmorph.h>
-00057 #include <thmllemma.h>
-00058 #include <thmlscripref.h>
-00059 #include <cipherfil.h>
-00060 #include <rawfiles.h>
-00061 #include <ztext.h>
-00062 #include <zld.h>
-00063 #include <zcom.h>
-00064 #include <lzsscomprs.h>
-00065 #include <utf8greekaccents.h>
-00066 #include <utf8cantillation.h>
-00067 #include <utf8hebrewpoints.h>
-00068 #include <greeklexattribs.h>
-00069 #include <swfiltermgr.h>
-00070 
-00071 
-00072 
-00073 #ifdef ICU
-00074 #include <utf8transliterator.h>
-00075 #endif
-00076 
-00077 #ifndef EXCLUDEZLIB
-00078 #include <zipcomprs.h>
-00079 #endif
-00080 
-00081 bool SWMgr::debug = false;
-00082 
-00083 #ifdef GLOBCONFPATH
-00084 const char *SWMgr::globalConfPath = GLOBCONFPATH;
-00085 #else
-00086 const char *SWMgr::globalConfPath = "/etc/sword.conf:/usr/local/etc/sword.conf";
-00087 #endif
-00088 
-00089 void SWMgr::init() {
-00090         SWFilter *tmpFilter = 0;
-00091         configPath  = 0;
-00092         prefixPath  = 0;
-00093         configType  = 0;
-00094         myconfig    = 0;
-00095         mysysconfig = 0;
-00096         homeConfig = 0;
-00097 
-00098 
-00099         cipherFilters.clear();
-00100         optionFilters.clear();
-00101         cleanupFilters.clear();
-00102 
-00103         tmpFilter = new GBFStrongs();
-00104         optionFilters.insert(FilterMap::value_type("GBFStrongs", tmpFilter));
-00105         cleanupFilters.push_back(tmpFilter);
-00106 
-00107         tmpFilter = new GBFFootnotes();
-00108         optionFilters.insert(FilterMap::value_type("GBFFootnotes", tmpFilter));
-00109         cleanupFilters.push_back(tmpFilter);
-00110 
-00111         tmpFilter = new GBFMorph();
-00112         optionFilters.insert(FilterMap::value_type("GBFMorph", tmpFilter));
-00113         cleanupFilters.push_back(tmpFilter);
-00114 
-00115         tmpFilter = new GBFHeadings();
-00116         optionFilters.insert(FilterMap::value_type("GBFHeadings", tmpFilter));
-00117         cleanupFilters.push_back(tmpFilter);
-00118 
-00119         tmpFilter = new ThMLStrongs();
-00120         optionFilters.insert(FilterMap::value_type("ThMLStrongs", tmpFilter));
-00121         cleanupFilters.push_back(tmpFilter);
-00122 
-00123         tmpFilter = new ThMLFootnotes();
-00124         optionFilters.insert(FilterMap::value_type("ThMLFootnotes", tmpFilter));
-00125         cleanupFilters.push_back(tmpFilter);
-00126 
-00127         tmpFilter = new ThMLMorph();
-00128         optionFilters.insert(FilterMap::value_type("ThMLMorph", tmpFilter));
-00129         cleanupFilters.push_back(tmpFilter);
-00130 
-00131         tmpFilter = new ThMLHeadings();
-00132         optionFilters.insert(FilterMap::value_type("ThMLHeadings", tmpFilter));
-00133         cleanupFilters.push_back(tmpFilter);
-00134 
-00135         tmpFilter = new ThMLLemma();
-00136         optionFilters.insert(FilterMap::value_type("ThMLLemma", tmpFilter));
-00137         cleanupFilters.push_back(tmpFilter);
-00138 
-00139         tmpFilter = new ThMLScripref();
-00140         optionFilters.insert(FilterMap::value_type("ThMLScripref", tmpFilter));
-00141         cleanupFilters.push_back(tmpFilter);
-00142 
-00143         tmpFilter = new UTF8GreekAccents();
-00144         optionFilters.insert(FilterMap::value_type("UTF8GreekAccents", tmpFilter));
-00145         cleanupFilters.push_back(tmpFilter);
-00146 
-00147         tmpFilter = new UTF8HebrewPoints();
-00148         optionFilters.insert(FilterMap::value_type("UTF8HebrewPoints", tmpFilter));
-00149         cleanupFilters.push_back(tmpFilter);
-00150 
-00151         tmpFilter = new UTF8Cantillation();
-00152         optionFilters.insert(FilterMap::value_type("UTF8Cantillation", tmpFilter));
-00153         cleanupFilters.push_back(tmpFilter);
-00154 
-00155         tmpFilter = new GreekLexAttribs();
-00156         optionFilters.insert(FilterMap::value_type("GreekLexAttribs", tmpFilter));
-00157         cleanupFilters.push_back(tmpFilter);
-00158 
-00159 /* UTF8Transliterator needs to be handled differently because it should always available as an option, for all modules
-00160 #ifdef ICU
-00161         tmpFilter = new UTF8Transliterator();
-00162         optionFilters.insert(FilterMap::value_type("UTF8Transliterator", tmpFilter));
-00163         cleanupFilters.push_back(tmpFilter);
-00164 #endif
-00165 */
-00166         gbfplain = new GBFPlain();
-00167         cleanupFilters.push_back(gbfplain);
-00168 
-00169         thmlplain = new ThMLPlain();
-00170         cleanupFilters.push_back(thmlplain);
-00171 }
-00172 
-00173 
-00174 SWMgr::SWMgr(SWFilterMgr *filterMgr) {
-00175         commonInit(0, 0, true, filterMgr);
-00176 }
-00177 
-00178 
-00179 SWMgr::SWMgr(SWConfig *iconfig, SWConfig *isysconfig, bool autoload, SWFilterMgr *filterMgr) {
-00180         commonInit(iconfig, isysconfig, autoload, filterMgr);
-00181 }
-00182 
-00183 
-00184 void SWMgr::commonInit(SWConfig * iconfig, SWConfig * isysconfig, bool autoload, SWFilterMgr *filterMgr) {
-00185         this->filterMgr = filterMgr;
-00186         if (filterMgr)
-00187                 filterMgr->setParentMgr(this);
-00188 
-00189         init();
-00190         
-00191         if (iconfig) {
-00192                 config   = iconfig;
-00193                 myconfig = 0;
-00194         }
-00195         else config = 0;
-00196         if (isysconfig) {
-00197                 sysconfig   = isysconfig;
-00198                 mysysconfig = 0;
-00199         }
-00200         else sysconfig = 0;
-00201 
-00202         if (autoload)
-00203                 Load();
-00204 }
-00205 
-00206 
-00207 SWMgr::SWMgr(const char *iConfigPath, bool autoload, SWFilterMgr *filterMgr) {
-00208 
-00209         string path;
-00210         
-00211         this->filterMgr = filterMgr;
-00212         if (filterMgr)
-00213                 filterMgr->setParentMgr(this);
-00214 
-00215         init();
-00216         
-00217         path = iConfigPath;
-00218         if ((iConfigPath[strlen(iConfigPath)-1] != '\\') && (iConfigPath[strlen(iConfigPath)-1] != '/'))
-00219                 path += "/";
-00220         if (FileMgr::existsFile(path.c_str(), "mods.conf")) {
-00221                 stdstr(&prefixPath, path.c_str());
-00222                 path += "mods.conf";
-00223                 stdstr(&configPath, path.c_str());
-00224         }
-00225         else {
-00226                 if (FileMgr::existsDir(path.c_str(), "mods.d")) {
-00227                         stdstr(&prefixPath, path.c_str());
-00228                         path += "mods.d";
-00229                         stdstr(&configPath, path.c_str());
-00230                         configType = 1;
-00231                 }
-00232         }
-00233 
-00234         config = 0;
-00235         sysconfig = 0;
-00236 
-00237         if (autoload && configPath)
-00238                 Load();
-00239 }
-00240 
-00241 
-00242 SWMgr::~SWMgr() {
-00243 
-00244         DeleteMods();
-00245 
-00246         for (FilterList::iterator it = cleanupFilters.begin(); it != cleanupFilters.end(); it++)
-00247                 delete (*it);
-00248                         
-00249         if (homeConfig)
-00250                 delete homeConfig;
-00251 
-00252         if (myconfig)
-00253                 delete myconfig;
-00254 
-00255         if (prefixPath)
-00256                 delete [] prefixPath;
-00257 
-00258         if (configPath)
-00259                 delete [] configPath;
-00260 
-00261         if (filterMgr)
-00262                 delete filterMgr;
-00263 }
-00264 
-00265 
-00266 void SWMgr::findConfig(char *configType, char **prefixPath, char **configPath) {
-00267         string path;
-00268         ConfigEntMap::iterator entry;
-00269 
-00270         char *envsworddir = getenv ("SWORD_PATH");
-00271         char *envhomedir  = getenv ("HOME");
-00272 
-00273         *configType = 0;
-00274 
-00275 #ifndef _MSC_VER
-00276         // check working directory
-00277 if (debug)
-00278         cerr << "Checking working directory for mods.conf...";
-00279 #endif
-00280 
-00281         if (FileMgr::existsFile(".", "mods.conf")) {
-00282 
-00283 #ifndef _MSC_VER
-00284 if (debug)
-00285         cerr << "found\n";
-00286 #endif
-00287 
-00288                 stdstr(prefixPath, "./");
-00289                 stdstr(configPath, "./mods.conf");
-00290                 return;
-00291         }
-00292 
-00293 #ifndef _MSC_VER
-00294 if (debug)
-00295         cerr << "\nChecking working directory for mods.d...";
-00296 #endif
-00297 
-00298         if (FileMgr::existsDir(".", "mods.d")) {
-00299 
-00300 #ifndef _MSC_VER
-00301 if (debug)
-00302         cerr << "found\n";
-00303 #endif
-00304 
-00305                 stdstr(prefixPath, "./");
-00306                 stdstr(configPath, "./mods.d");
-00307                 *configType = 1;
-00308                 return;
-00309         }
-00310 
-00311 
-00312         // check environment variable SWORD_PATH
-00313 #ifndef _MSC_VER
-00314 if (debug)
-00315         cerr << "\nChecking SWORD_PATH...";
-00316 #endif
-00317 
-00318         if (envsworddir != NULL) {
-00319 
-00320 #ifndef _MSC_VER
-00321 if (debug)
-00322         cerr << "found (" << envsworddir << ")\n";
-00323 #endif
-00324 
-00325                 path = envsworddir;
-00326                 if ((envsworddir[strlen(envsworddir)-1] != '\\') && (envsworddir[strlen(envsworddir)-1] != '/'))
-00327                         path += "/";
-00328 
-00329 #ifndef _MSC_VER
-00330 if (debug)
-00331         cerr << "\nChecking $SWORD_PATH for mods.conf...";
-00332 #endif
-00333 
-00334                 if (FileMgr::existsFile(path.c_str(), "mods.conf")) {
-00335 
-00336 #ifndef _MSC_VER
-00337 if (debug)
-00338         cerr << "found\n";
-00339 #endif
-00340 
-00341                         stdstr(prefixPath, path.c_str());
-00342                         path += "mods.conf";
-00343                         stdstr(configPath, path.c_str());
-00344                         return;
-00345                 }
-00346 
-00347 #ifndef _MSC_VER
-00348 if (debug)
-00349         cerr << "\nChecking $SWORD_PATH for mods.d...";
-00350 #endif
-00351 
-00352                 if (FileMgr::existsDir(path.c_str(), "mods.d")) {
-00353 
-00354 #ifndef _MSC_VER
-00355 if (debug)
-00356         cerr << "found\n";
-00357 #endif
-00358 
-00359                         stdstr(prefixPath, path.c_str());
-00360                         path += "mods.d";
-00361                         stdstr(configPath, path.c_str());
-00362                         *configType = 1;
-00363                         return;
-00364                 }
-00365         }
-00366 
-00367 
-00368         // check for systemwide globalConfPath
-00369 
-00370 #ifndef _MSC_VER
-00371 if (debug)
-00372         cerr << "\nParsing " << globalConfPath << "...";
-00373 #endif
-00374 
-00375         char *globPaths = 0;
-00376         char *gfp;
-00377         stdstr(&globPaths, globalConfPath);
-00378         for (gfp = strtok(globPaths, ":"); gfp; gfp = strtok(0, ":")) {
-00379 
-00380         #ifndef _MSC_VER
-00381 if (debug)
-00382         cerr << "\nChecking for " << gfp << "...";
-00383 #endif
-00384 
-00385                 if (FileMgr::existsFile(gfp))
-00386                         break;
-00387         }
-00388 
-00389         if (gfp) {
-00390 
-00391 #ifndef _MSC_VER
-00392 if (debug)
-00393         cerr << "found\n";
-00394 #endif
-00395 
-00396                 SWConfig etcconf(gfp);
-00397                 if ((entry = etcconf.Sections["Install"].find("DataPath")) != etcconf.Sections["Install"].end()) {
-00398                         path = (*entry).second;
-00399                         if (((*entry).second.c_str()[strlen((*entry).second.c_str())-1] != '\\') && ((*entry).second.c_str()[strlen((*entry).second.c_str())-1] != '/'))
-00400                                 path += "/";
-00401 
-00402 #ifndef _MSC_VER
-00403 if (debug)
-00404         cerr << "DataPath in " << gfp << " is set to: " << path;
-00405 #endif
-00406 
-00407 #ifndef _MSC_VER
-00408 if (debug)
-00409         cerr << "\nChecking for mods.conf in DataPath ";
-00410 #endif
-00411                         if (FileMgr::existsFile(path.c_str(), "mods.conf")) {
-00412 
-00413 #ifndef _MSC_VER
-00414 if (debug)
-00415         cerr << "found\n";
-00416 #endif
-00417 
-00418                                 stdstr(prefixPath, path.c_str());
-00419                                 path += "mods.conf";
-00420                                 stdstr(configPath, path.c_str());
-00421                                 delete [] globPaths;
-00422                                 return;
-00423                         }
-00424 
-00425 #ifndef _MSC_VER
-00426 if (debug)
-00427         cerr << "\nChecking for mods.d in DataPath ";
-00428 #endif
-00429 
-00430                         if (FileMgr::existsDir(path.c_str(), "mods.d")) {
-00431 
-00432 #ifndef _MSC_VER
-00433 if (debug)
-00434         cerr << "found\n";
-00435 #endif
-00436 
-00437                                 stdstr(prefixPath, path.c_str());
-00438                                 path += "mods.d";
-00439                                 stdstr(configPath, path.c_str());
-00440                                 *configType = 1;
-00441                                 delete [] globPaths;
-00442                                 return;
-00443                         }
-00444                 }
-00445         }
-00446 
-00447         delete [] globPaths;
-00448 
-00449         // check ~/.sword/
-00450 
-00451 #ifndef _MSC_VER
-00452 if (debug)
-00453         cerr << "\nChecking home directory for ~/.sword/mods.conf" << path;
-00454 #endif
-00455 
-00456         if (envhomedir != NULL) {
-00457                 path = envhomedir;
-00458                 if ((envhomedir[strlen(envhomedir)-1] != '\\') && (envhomedir[strlen(envhomedir)-1] != '/'))
-00459                         path += "/";
-00460                 path += ".sword/";
-00461                 if (FileMgr::existsFile(path.c_str(), "mods.conf")) {
-00462 
-00463 #ifndef _MSC_VER
-00464 if (debug)
-00465         cerr << " found\n";
-00466 #endif
-00467 
-00468                         stdstr(prefixPath, path.c_str());
-00469                         path += "mods.conf";
-00470                         stdstr(configPath, path.c_str());
-00471                         return;
-00472                 }
-00473 
-00474 #ifndef _MSC_VER
-00475 if (debug)
-00476         cerr << "\nChecking home directory for ~/.sword/mods.d" << path;
-00477 #endif
-00478 
-00479                 if (FileMgr::existsDir(path.c_str(), "mods.d")) {
-00480 
-00481 #ifndef _MSC_VER
-00482 if (debug)
-00483         cerr << "found\n";
-00484 #endif
-00485 
-00486                         stdstr(prefixPath, path.c_str());
-00487                         path += "mods.d";
-00488                         stdstr(configPath, path.c_str());
-00489                         *configType = 2;
-00490                         return;
-00491                 }
-00492         }
-00493 }
-00494 
-00495 
-00496 void SWMgr::loadConfigDir(const char *ipath)
-00497 {
-00498    DIR *dir;
-00499    struct dirent *ent;
-00500    string newmodfile;
-00501  
-00502         if ((dir = opendir(ipath))) {
-00503                 rewinddir(dir);
-00504                 while ((ent = readdir(dir))) {
-00505                         if ((strcmp(ent->d_name, ".")) && (strcmp(ent->d_name, ".."))) {
-00506                                 newmodfile = ipath;
-00507                                 if ((ipath[strlen(ipath)-1] != '\\') && (ipath[strlen(ipath)-1] != '/'))
-00508                                         newmodfile += "/";
-00509                                 newmodfile += ent->d_name;
-00510                                 if (config) {
-00511                                         SWConfig tmpConfig(newmodfile.c_str());
-00512                                         *config += tmpConfig;
-00513                                 }
-00514                                 else    config = myconfig = new SWConfig(newmodfile.c_str());
-00515                         }
-00516                 }
-00517                 closedir(dir);
-00518                 if (!config) {  // if no .conf file exist yet, create a default
-00519                         newmodfile = ipath;
-00520                         if ((ipath[strlen(ipath)-1] != '\\') && (ipath[strlen(ipath)-1] != '/'))
-00521                                 newmodfile += "/";
-00522                         newmodfile += "globals.conf";
-00523                         config = myconfig = new SWConfig(newmodfile.c_str());
-00524                 }
-00525         }
-00526 }
-00527 
-00528 
-00529 /***********************************************************************
-00530  * SWMgr::Load - loads actual modules
-00531  *
-00532  * RET: status - 0 = ok; -1 no config found; 1 = no modules installed
-00533  *
-00534  */
-00535 
-00536 signed char SWMgr::Load() {
-00537         signed char ret = 0;
-00538 
-00539         if (!config) {  // If we weren't passed a config object at construction, find a config file
-00540                 if (!configPath)        // If we weren't passed a config path at construction...
-00541                         findConfig(&configType, &prefixPath, &configPath);
-00542                 if (configPath) {
-00543                         if (configType)
-00544                                 loadConfigDir(configPath);
-00545                         else    config = myconfig = new SWConfig(configPath);
-00546                 }
-00547         }
-00548 
-00549         if (config) {
-00550                 SectionMap::iterator Sectloop, Sectend;
-00551                 ConfigEntMap::iterator Entryloop, Entryend;
-00552 
-00553                 DeleteMods();
-00554 
-00555                 for (Sectloop = config->Sections.lower_bound("Globals"), Sectend = config->Sections.upper_bound("Globals"); Sectloop != Sectend; Sectloop++) {          // scan thru all 'Globals' sections
-00556                         for (Entryloop = (*Sectloop).second.lower_bound("AutoInstall"), Entryend = (*Sectloop).second.upper_bound("AutoInstall"); Entryloop != Entryend; Entryloop++)   // scan thru all AutoInstall entries
-00557                                 InstallScan((*Entryloop).second.c_str());               // Scan AutoInstall entry directory for new modules and install
-00558                 }               
-00559                 if (configType) {       // force reload on config object because we may have installed new modules
-00560                         delete myconfig;
-00561                         config = myconfig = 0;
-00562                         loadConfigDir(configPath);
-00563                 }
-00564                 else    config->Load();
-00565 
-00566                 CreateMods();
-00567 
-00568 //      augment config with ~/.sword/mods.d if it exists ---------------------
-00569                         char *envhomedir  = getenv ("HOME");
-00570                         if (envhomedir != NULL && configType != 2) { // 2 = user only
-00571                                 string path = envhomedir;
-00572                                 if ((envhomedir[strlen(envhomedir)-1] != '\\') && (envhomedir[strlen(envhomedir)-1] != '/'))
-00573                                         path += "/";
-00574                                 path += ".sword/";
-00575                                 if (FileMgr::existsDir(path.c_str(), "mods.d")) {
-00576                                         char *savePrefixPath = 0;
-00577                                         char *saveConfigPath = 0;
-00578                                         SWConfig *saveConfig = 0;
-00579                                         stdstr(&savePrefixPath, prefixPath);
-00580                                         stdstr(&prefixPath, path.c_str());
-00581                                         path += "mods.d";
-00582                                         stdstr(&saveConfigPath, configPath);
-00583                                         stdstr(&configPath, path.c_str());
-00584                                         saveConfig = config;
-00585                                         config = myconfig = 0;
-00586                                         loadConfigDir(configPath);
-00587 
-00588                                         CreateMods();
-00589 
-00590                                         stdstr(&prefixPath, savePrefixPath);
-00591                                         delete []savePrefixPath;
-00592                                         stdstr(&configPath, saveConfigPath);
-00593                                         delete []saveConfigPath;
-00594                                         (*saveConfig) += *config;
-00595                                         homeConfig = myconfig;
-00596                                         config = myconfig = saveConfig;
-00597                                 }
-00598                         }
-00599 // -------------------------------------------------------------------------
-00600                 if ( !Modules.size() ) // config exists, but no modules
-00601                         ret = 1;
-00602 
-00603         }
-00604         else {
-00605                 SWLog::systemlog->LogError("SWMgr: Can't find 'mods.conf' or 'mods.d'.  Try setting:\n\tSWORD_PATH=<directory containing mods.conf>\n\tOr see the README file for a full description of setup options (%s)", (configPath) ? configPath : "<configPath is null>");
-00606                 ret = -1;
-00607         }
-00608 
-00609         return ret;
-00610 }
-00611 
-00612 SWModule *SWMgr::CreateMod(string name, string driver, ConfigEntMap &section)
-00613 {
-00614         string description, datapath, misc1;
-00615         ConfigEntMap::iterator entry;
-00616         SWModule *newmod = 0;
-00617         string lang, sourceformat, encoding;
-00618         signed char direction, enc, markup;
-00619 
-00620         description  = ((entry = section.find("Description")) != section.end()) ? (*entry).second : (string)"";
-00621         lang  = ((entry = section.find("Lang")) != section.end()) ? (*entry).second : (string)"en";
-00622         sourceformat = ((entry = section.find("SourceType"))  != section.end()) ? (*entry).second : (string)"";
-00623         encoding = ((entry = section.find("Encoding"))  != section.end()) ? (*entry).second : (string)"";
-00624         datapath = prefixPath;
-00625         if ((prefixPath[strlen(prefixPath)-1] != '\\') && (prefixPath[strlen(prefixPath)-1] != '/'))
-00626                 datapath += "/";
-00627         misc1 += ((entry = section.find("DataPath")) != section.end()) ? (*entry).second : (string)"";
-00628         char *buf = new char [ strlen(misc1.c_str()) + 1 ];
-00629         char *buf2 = buf;
-00630         strcpy(buf, misc1.c_str());
-00631 //      for (; ((*buf2) && ((*buf2 == '.') || (*buf2 == '/') || (*buf2 == '\\'))); buf2++);
-00632         for (; ((*buf2) && ((*buf2 == '/') || (*buf2 == '\\'))); buf2++);
-00633         if (*buf2)
-00634                 datapath += buf2;
-00635         delete [] buf;
-00636 
-00637         section["AbsoluteDataPath"] = datapath;
-00638 
-00639         if (!stricmp(sourceformat.c_str(), "GBF"))
-00640                 markup = FMT_GBF;
-00641         else if (!stricmp(sourceformat.c_str(), "ThML"))
-00642                 markup = FMT_THML;
-00643         else if (!stricmp(sourceformat.c_str(), "OSIS"))
-00644                 markup = FMT_OSIS;
-00645         else
-00646                 markup = FMT_PLAIN;
-00647 
-00648         if (!stricmp(encoding.c_str(), "SCSU"))
-00649                 enc = ENC_SCSU;
-00650         else if (!stricmp(encoding.c_str(), "UTF-8")) {
-00651                 enc = ENC_UTF8;
-00652         }
-00653         else enc = ENC_LATIN1;
-00654 
-00655         if ((entry = section.find("Direction")) == section.end()) {
-00656                 direction = DIRECTION_LTR;
-00657         }
-00658         else if (!stricmp((*entry).second.c_str(), "rtol")) {
-00659                 direction = DIRECTION_RTL;
-00660         }
-00661         else if (!stricmp((*entry).second.c_str(), "bidi")) {
-00662                 direction = DIRECTION_BIDI;
-00663         }
-00664         else {
-00665                 direction = DIRECTION_LTR;
-00666         }
-00667 
-00668         if ((!stricmp(driver.c_str(), "zText")) || (!stricmp(driver.c_str(), "zCom"))) {
-00669                 SWCompress *compress = 0;
-00670                 int blockType = CHAPTERBLOCKS;
-00671                 misc1 = ((entry = section.find("BlockType")) != section.end()) ? (*entry).second : (string)"CHAPTER";
-00672                 if (!stricmp(misc1.c_str(), "VERSE"))
-00673                         blockType = VERSEBLOCKS;
-00674                 else if (!stricmp(misc1.c_str(), "CHAPTER"))
-00675                         blockType = CHAPTERBLOCKS;
-00676                 else if (!stricmp(misc1.c_str(), "BOOK"))
-00677                         blockType = BOOKBLOCKS;
-00678 
-00679                 misc1 = ((entry = section.find("CompressType")) != section.end()) ? (*entry).second : (string)"LZSS";
-00680 #ifndef EXCLUDEZLIB
-00681                 if (!stricmp(misc1.c_str(), "ZIP"))
-00682                         compress = new ZipCompress();
-00683                 else
-00684 #endif
-00685                 if (!stricmp(misc1.c_str(), "LZSS"))
-00686                         compress = new LZSSCompress();
-00687 
-00688                 if (compress) {
-00689                         if (!stricmp(driver.c_str(), "zText"))
-00690                                 newmod = new zText(datapath.c_str(), name.c_str(), description.c_str(), blockType, compress, 0, enc, direction, markup, lang.c_str());
-00691                         else    newmod = new zCom(datapath.c_str(), name.c_str(), description.c_str(), blockType, compress, 0, enc, direction, markup, lang.c_str());
-00692                 }
-00693         }
-00694 
-00695         if (!stricmp(driver.c_str(), "RawText")) {
-00696                 newmod = new RawText(datapath.c_str(), name.c_str(), description.c_str(), 0, enc, direction, markup, lang.c_str());
-00697         }
-00698 
-00699         // backward support old drivers
-00700         if (!stricmp(driver.c_str(), "RawGBF")) {
-00701                 newmod = new RawText(datapath.c_str(), name.c_str(), description.c_str(), 0, enc, direction, markup, lang.c_str());
-00702         }
-00703 
-00704         if (!stricmp(driver.c_str(), "RawCom")) {
-00705                 newmod = new RawCom(datapath.c_str(), name.c_str(), description.c_str(), 0, enc, direction, markup, lang.c_str());
-00706         }
-00707 
-00708         if (!stricmp(driver.c_str(), "RawFiles")) {
-00709                 newmod = new RawFiles(datapath.c_str(), name.c_str(), description.c_str(), 0, enc, direction, markup, lang.c_str());
-00710         }
-00711 
-00712         if (!stricmp(driver.c_str(), "HREFCom")) {
-00713                 misc1 = ((entry = section.find("Prefix")) != section.end()) ? (*entry).second : (string)"";
-00714                 newmod = new HREFCom(datapath.c_str(), misc1.c_str(), name.c_str(), description.c_str());
-00715         }
-00716 
-00717         if (!stricmp(driver.c_str(), "RawLD"))
-00718                 newmod = new RawLD(datapath.c_str(), name.c_str(), description.c_str(), 0, enc, direction, markup, lang.c_str());
-00719 
-00720         if (!stricmp(driver.c_str(), "RawLD4"))
-00721                 newmod = new RawLD4(datapath.c_str(), name.c_str(), description.c_str(), 0, enc, direction, markup, lang.c_str());
-00722 
-00723         if (!stricmp(driver.c_str(), "zLD")) {
-00724                 SWCompress *compress = 0;
-00725                 int blockCount;
-00726                 misc1 = ((entry = section.find("BlockCount")) != section.end()) ? (*entry).second : (string)"200";
-00727                 blockCount = atoi(misc1.c_str());
-00728                 blockCount = (blockCount) ? blockCount : 200;
-00729 
-00730                 misc1 = ((entry = section.find("CompressType")) != section.end()) ? (*entry).second : (string)"LZSS";
-00731 #ifndef EXCLUDEZLIB
-00732                 if (!stricmp(misc1.c_str(), "ZIP"))
-00733                         compress = new ZipCompress();
-00734                 else
-00735 #endif
-00736                 if (!stricmp(misc1.c_str(), "LZSS"))
-00737                         compress = new LZSSCompress();
-00738 
-00739                 if (compress) {
-00740                         newmod = new zLD(datapath.c_str(), name.c_str(), description.c_str(), blockCount, compress, 0, enc, direction, markup, lang.c_str());
-00741                 }
-00742         }
-00743 
-00744         if (!stricmp(driver.c_str(), "RawGenBook")) {
-00745                 newmod = new RawGenBook(datapath.c_str(), name.c_str(), description.c_str(), 0, enc, direction, markup, lang.c_str());
-00746         }
-00747     // if a specific module type is set in the config, use this
-00748     if ((entry = section.find("Type")) != section.end())
-00749         newmod->Type(entry->second.c_str());
-00750 
-00751      newmod->setConfig(&section);
-00752         return newmod;
-00753 }
-00754 
-00755 
-00756 void SWMgr::AddGlobalOptions(SWModule *module, ConfigEntMap &section, ConfigEntMap::iterator start, ConfigEntMap::iterator end) {
-00757         for (;start != end; start++) {
-00758                 FilterMap::iterator it;
-00759                 it = optionFilters.find((*start).second);
-00760                 if (it != optionFilters.end()) {
-00761                         module->AddOptionFilter((*it).second);  // add filter to module and option as a valid option
-00762                         OptionsList::iterator loop;
-00763                         for (loop = options.begin(); loop != options.end(); loop++) {
-00764                                 if (!strcmp((*loop).c_str(), (*it).second->getOptionName()))
-00765                                         break;
-00766                         }
-00767                         if (loop == options.end())      // if we have not yet included the option
-00768                                 options.push_back((*it).second->getOptionName());
-00769                 }
-00770         }
-00771         if (filterMgr)
-00772                 filterMgr->AddGlobalOptions(module, section, start, end);
-00773 }
-00774 
-00775 
-00776 void SWMgr::AddLocalOptions(SWModule *module, ConfigEntMap &section, ConfigEntMap::iterator start, ConfigEntMap::iterator end)
-00777 {
-00778         for (;start != end; start++) {
-00779                 FilterMap::iterator it;
-00780                 it = optionFilters.find((*start).second);
-00781                 if (it != optionFilters.end()) {
-00782                         module->AddOptionFilter((*it).second);  // add filter to module
-00783                 }
-00784         }
-00785 
-00786         if (filterMgr)
-00787                 filterMgr->AddLocalOptions(module, section, start, end);
-00788 }
-00789 
-00790 
-00791 void SWMgr::AddRawFilters(SWModule *module, ConfigEntMap &section) {
-00792         string sourceformat, cipherKey;
-00793         ConfigEntMap::iterator entry;
-00794 
-00795         cipherKey = ((entry = section.find("CipherKey")) != section.end()) ? (*entry).second : (string)"";
-00796         if (!cipherKey.empty()) {
-00797                 SWFilter *cipherFilter = new CipherFilter(cipherKey.c_str());
-00798                 cipherFilters.insert(FilterMap::value_type(module->Name(), cipherFilter));
-00799                 cleanupFilters.push_back(cipherFilter);
-00800                 module->AddRawFilter(cipherFilter);
-00801         }
-00802 
-00803         if (filterMgr)
-00804                 filterMgr->AddRawFilters(module, section);
-00805 }
-00806 
-00807 
-00808 void SWMgr::AddEncodingFilters(SWModule *module, ConfigEntMap &section) {
-00809 
-00810         if (filterMgr)
-00811                 filterMgr->AddEncodingFilters(module, section);
-00812 }
-00813 
-00814 
-00815 void SWMgr::AddRenderFilters(SWModule *module, ConfigEntMap &section) {
-00816         string sourceformat;
-00817         ConfigEntMap::iterator entry;
-00818 
-00819         sourceformat = ((entry = section.find("SourceType")) != section.end()) ? (*entry).second : (string)"";
-00820 
-00821         // Temporary: To support old module types
-00822         // TODO: Remove at 1.6.0 release?
-00823         if (sourceformat.empty()) {
-00824                 sourceformat = ((entry = section.find("ModDrv")) != section.end()) ? (*entry).second : (string)"";
-00825                 if (!stricmp(sourceformat.c_str(), "RawGBF"))
-00826                         sourceformat = "GBF";
-00827                 else sourceformat = "";
-00828         }
-00829 
-00830 // process module       - eg. follows
-00831 //      if (!stricmp(sourceformat.c_str(), "GBF")) {
-00832 //              module->AddRenderFilter(gbftortf);
-00833 //      }
-00834 
-00835         if (filterMgr)
-00836                 filterMgr->AddRenderFilters(module, section);
-00837 
-00838 }
-00839 
-00840 
-00841 void SWMgr::AddStripFilters(SWModule *module, ConfigEntMap &section)
-00842 {
-00843         string sourceformat;
-00844         ConfigEntMap::iterator entry;
-00845 
-00846         sourceformat = ((entry = section.find("SourceType")) != section.end()) ? (*entry).second : (string)"";
-00847         // Temporary: To support old module types
-00848         if (sourceformat.empty()) {
-00849                 sourceformat = ((entry = section.find("ModDrv")) != section.end()) ? (*entry).second : (string)"";
-00850                 if (!stricmp(sourceformat.c_str(), "RawGBF"))
-00851                         sourceformat = "GBF";
-00852                 else sourceformat = "";
-00853         }
-00854         
-00855         if (!stricmp(sourceformat.c_str(), "GBF")) {
-00856                 module->AddStripFilter(gbfplain);
-00857         }
-00858         else if (!stricmp(sourceformat.c_str(), "ThML")) {
-00859                 module->AddStripFilter(thmlplain);
-00860         }
-00861 
-00862         if (filterMgr)
-00863                 filterMgr->AddStripFilters(module, section);
-00864 
-00865 }
-00866 
-00867 
-00868 void SWMgr::CreateMods() {
-00869         SectionMap::iterator it;
-00870         ConfigEntMap::iterator start;
-00871         ConfigEntMap::iterator end;
-00872         ConfigEntMap::iterator entry;
-00873         SWModule *newmod;
-00874         string driver, misc1;
-00875         for (it = config->Sections.begin(); it != config->Sections.end(); it++) {
-00876                 ConfigEntMap &section = (*it).second;
-00877                 newmod = 0;
-00878                 
-00879                 driver = ((entry = section.find("ModDrv")) != section.end()) ? (*entry).second : (string)"";
-00880                 if (!driver.empty()) {
-00881                         newmod = CreateMod((*it).first, driver, section);
-00882                         if (newmod) {
-00883                                 start = (*it).second.lower_bound("GlobalOptionFilter");
-00884                                 end   = (*it).second.upper_bound("GlobalOptionFilter");
-00885                                 AddGlobalOptions(newmod, section, start, end);
-00886 
-00887                                 start = (*it).second.lower_bound("LocalOptionFilter");
-00888                                 end   = (*it).second.upper_bound("LocalOptionFilter");
-00889                                 AddLocalOptions(newmod, section, start, end);
-00890 
-00891                                 AddRawFilters(newmod, section);
-00892                                 AddStripFilters(newmod, section);
-00893                                 AddRenderFilters(newmod, section);
-00894                                 AddEncodingFilters(newmod, section);
-00895                                 
-00896                                 Modules.insert(ModMap::value_type(newmod->Name(), newmod));
-00897                         }
-00898                 }
-00899         }
-00900 }
-00901 
-00902 
-00903 void SWMgr::DeleteMods() {
-00904 
-00905         ModMap::iterator it;
-00906 
-00907         for (it = Modules.begin(); it != Modules.end(); it++)
-00908                 delete (*it).second;
-00909 
-00910         Modules.clear();
-00911 }
-00912 
-00913 
-00914 void SWMgr::InstallScan(const char *dirname)
-00915 {
-00916    DIR *dir;
-00917    struct dirent *ent;
-00918    int conffd = 0;
-00919    string newmodfile;
-00920    string targetName;
-00921  
-00922         if (!access(dirname, 04)) {
-00923           if ((dir = opendir(dirname))) {
-00924                rewinddir(dir);
-00925                while ((ent = readdir(dir))) {
-00926                     if ((strcmp(ent->d_name, ".")) && (strcmp(ent->d_name, ".."))) {
-00927                          newmodfile = dirname;
-00928                          if ((dirname[strlen(dirname)-1] != '\\') && (dirname[strlen(dirname)-1] != '/'))
-00929                               newmodfile += "/";
-00930                          newmodfile += ent->d_name;
-00931                          if (configType) {
-00932                               if (config > 0)
-00933                                    close(conffd);
-00934                               targetName = configPath;
-00935                               if ((configPath[strlen(configPath)-1] != '\\') && (configPath[strlen(configPath)-1] != '/'))
-00936                                    targetName += "/";
-00937                               targetName += ent->d_name;
-00938                               conffd = open(targetName.c_str(), O_WRONLY|O_CREAT, S_IREAD|S_IWRITE);
-00939                          }
-00940                          else {
-00941                               if (conffd < 1) {
-00942                                    conffd = open(config->filename.c_str(), O_WRONLY|O_APPEND);
-00943                                    if (conffd > 0)
-00944                                         lseek(conffd, 0L, SEEK_END);
-00945                               }
-00946                          }
-00947                          AddModToConfig(conffd, newmodfile.c_str());
-00948                          unlink(newmodfile.c_str());
-00949                     }
-00950                }
-00951                if (conffd > 0)
-00952                     close(conffd);
-00953                closedir(dir);
-00954           }
-00955      }
-00956 }
-00957 
-00958 
-00959 char SWMgr::AddModToConfig(int conffd, const char *fname)
-00960 {
-00961         int modfd;
-00962         char ch;
-00963 
-00964         SWLog::systemlog->LogTimedInformation("Found new module [%s]. Installing...", fname);
-00965         modfd = open(fname, O_RDONLY);
-00966         ch = '\n';
-00967         write(conffd, &ch, 1);
-00968         while (read(modfd, &ch, 1) == 1)
-00969                 write(conffd, &ch, 1);
-00970         ch = '\n';
-00971         write(conffd, &ch, 1);
-00972         close(modfd);
-00973         return 0;
-00974 }
-00975 
-00976 
-00977 void SWMgr::setGlobalOption(const char *option, const char *value)
-00978 {
-00979         for (FilterMap::iterator it = optionFilters.begin(); it != optionFilters.end(); it++) {
-00980                 if ((*it).second->getOptionName()) {
-00981                         if (!stricmp(option, (*it).second->getOptionName()))
-00982                                 (*it).second->setOptionValue(value);
-00983                 }
-00984         }
-00985 }
-00986 
-00987 
-00988 const char *SWMgr::getGlobalOption(const char *option)
-00989 {
-00990         for (FilterMap::iterator it = optionFilters.begin(); it != optionFilters.end(); it++) {
-00991                 if ((*it).second->getOptionName()) {
-00992                         if (!stricmp(option, (*it).second->getOptionName()))
-00993                                 return (*it).second->getOptionValue();
-00994                 }
-00995         }
-00996         return 0;
-00997 }
-00998 
-00999 
-01000 const char *SWMgr::getGlobalOptionTip(const char *option)
-01001 {
-01002         for (FilterMap::iterator it = optionFilters.begin(); it != optionFilters.end(); it++) {
-01003                 if ((*it).second->getOptionName()) {
-01004                         if (!stricmp(option, (*it).second->getOptionName()))
-01005                                 return (*it).second->getOptionTip();
-01006                 }
-01007         }
-01008         return 0;
-01009 }
-01010 
-01011 
-01012 OptionsList SWMgr::getGlobalOptions()
-01013 {
-01014         return options;
-01015 }
-01016 
-01017 
-01018 OptionsList SWMgr::getGlobalOptionValues(const char *option)
-01019 {
-01020         OptionsList options;
-01021         for (FilterMap::iterator it = optionFilters.begin(); it != optionFilters.end(); it++) {
-01022                 if ((*it).second->getOptionName()) {
-01023                         if (!stricmp(option, (*it).second->getOptionName())) {
-01024                                 options = (*it).second->getOptionValues();
-01025                                 break;  // just find the first one.  All option filters with the same option name should expect the same values
-01026                         }
-01027                 }
-01028         }
-01029         return options;
-01030 }
-01031 
-01032 
-01033 signed char SWMgr::setCipherKey(const char *modName, const char *key) {
-01034         FilterMap::iterator it;
-01035         ModMap::iterator it2;
-01036 
-01037         // check for filter that already exists
-01038         it = cipherFilters.find(modName);
-01039         if (it != cipherFilters.end()) {
-01040                 ((CipherFilter *)(*it).second)->getCipher()->setCipherKey(key);
-01041                 return 0;
-01042         }
-01043         // check if module exists
-01044         else {
-01045                 it2 = Modules.find(modName);
-01046                 if (it2 != Modules.end()) {
-01047                         SWFilter *cipherFilter = new CipherFilter(key);
-01048                         cipherFilters.insert(FilterMap::value_type(modName, cipherFilter));
-01049                         cleanupFilters.push_back(cipherFilter);
-01050                         (*it2).second->AddRawFilter(cipherFilter);
-01051                         return 0;
-01052                 }
-01053         }
-01054         return -1;
-01055 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swmgr_8h-source.html b/doc/api-documentation/html/swmgr_8h-source.html deleted file mode 100644 index b70e2c0..0000000 --- a/doc/api-documentation/html/swmgr_8h-source.html +++ /dev/null @@ -1,117 +0,0 @@ - - -swmgr.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swmgr.h

00001 /******************************************************************************
-00002  *  swmgr.h   - definition of class SWMgr used to interact with an install
-00003  *                              base of sword modules.
-00004  *
-00005  * $Id: swmgr_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00039 #ifndef SWMGR_H
-00040 #define SWMGR_H
-00041 
-00042 #include <sys/types.h>
-00043 #include <string>
-00044 #include <map>
-00045 #include <list>
-00046 #include <swmodule.h>
-00047 #include <swconfig.h>
-00048 #include <swlog.h>
-00049 #include <swfiltermgr.h>
-00050 
-00051 #include <defs.h>
-00052 
-00053 using namespace std;
-00054 
-00055 typedef map < string, SWModule *, less < string > >ModMap;
-00056 typedef list < string > OptionsList;
-00057 typedef map < string, SWFilter * >FilterMap;
-00058 
-00069 class SWDLLEXPORT SWMgr {
-00070 
-00071 private:
-00072   void commonInit(SWConfig * iconfig, SWConfig * isysconfig, bool autoload, SWFilterMgr *filterMgr);
-00073 
-00074 protected:
-00075   SWFilterMgr *filterMgr;               //made protected because because BibleTime needs it
-00076   SWConfig * myconfig;          //made protected because because BibleTime needs it
-00077   SWConfig *mysysconfig;
-00078   SWConfig *homeConfig;
-00079   void CreateMods ();
-00080   SWModule *CreateMod (string name, string driver, ConfigEntMap & section);
-00081   void DeleteMods ();
-00082   char configType;              // 0 = file; 1 = directory
-00083   FilterMap optionFilters;
-00084   FilterMap cipherFilters;
-00085   SWFilter *gbfplain;
-00086   SWFilter *thmlplain;
-00087   FilterList cleanupFilters;
-00088   OptionsList options;
-00089   virtual void init (); // use to initialize before loading modules
-00090   virtual char AddModToConfig (int conffd, const char *fname);
-00091   virtual void loadConfigDir (const char *ipath);
-00092   virtual void AddGlobalOptions (SWModule * module, ConfigEntMap & section,
-00093                                  ConfigEntMap::iterator start,
-00094                                  ConfigEntMap::iterator end);
-00095   virtual void AddLocalOptions (SWModule * module, ConfigEntMap & section,
-00096                                 ConfigEntMap::iterator start,
-00097                                 ConfigEntMap::iterator end);
-00098 
-00104   virtual void AddEncodingFilters (SWModule * module, ConfigEntMap & section);
-00110   virtual void AddRenderFilters (SWModule * module, ConfigEntMap & section);
-00116   virtual void AddStripFilters (SWModule * module, ConfigEntMap & section);
-00122   virtual void AddRawFilters (SWModule * module, ConfigEntMap & section);
-00123 
-00124 public:
-00125 
-00130   static bool debug;
-00131   static const char *globalConfPath;
-00135   static void findConfig (char *configType, char **prefixPath,
-00136                           char **configPath);
-00145   SWConfig *config;
-00149   SWConfig *sysconfig;
-00172   ModMap Modules;
-00176   char *prefixPath;
-00180   char *configPath;
-00181 
-00189   SWMgr (SWConfig * iconfig = 0, SWConfig * isysconfig = 0, bool autoload = true, SWFilterMgr *filterMgr = 0);
-00194   SWMgr (SWFilterMgr *filterMgr);
-00204   SWMgr (const char *iConfigPath, bool autoload = true, SWFilterMgr *filterMgr = 0);
-00210   virtual ~SWMgr ();
-00214   virtual void InstallScan (const char *dir);
-00219   virtual signed char Load ();
-00227   virtual void setGlobalOption (const char *option, const char *value);
-00232   virtual const char *getGlobalOption (const char *option);
-00238   virtual const char *getGlobalOptionTip (const char *option);
-00242   virtual OptionsList getGlobalOptions ();
-00246   virtual OptionsList getGlobalOptionValues (const char *option);
-00288   virtual signed char setCipherKey (const char *modName, const char *key);
-00289 };
-00290 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swmodule_8cpp-source.html b/doc/api-documentation/html/swmodule_8cpp-source.html deleted file mode 100644 index 39e2cd0..0000000 --- a/doc/api-documentation/html/swmodule_8cpp-source.html +++ /dev/null @@ -1,689 +0,0 @@ - - -swmodule.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swmodule.cpp

00001 /******************************************************************************
-00002  *  swmodule.cpp -code for base class 'module'.  Module is the basis for all
-00003  *                types of modules (e.g. texts, commentaries, maps, lexicons,
-00004  *                etc.)
-00005  */
-00006 
-00007 #include <string.h>
-00008 #include <swmodule.h>
-00009 #include <utilfuns.h>
-00010 #include <regex.h>      // GNU
-00011 #include <swfilter.h>
-00012 #include <versekey.h>   // KLUDGE for Search
-00013 #ifndef _MSC_VER
-00014 #include <iostream.h>
-00015 #endif
-00016 
-00017 SWDisplay SWModule::rawdisp;
-00018 void SWModule::nullPercent(char percent, void *percentUserData) {}
-00019 
-00020 /******************************************************************************
-00021  * SWModule Constructor - Initializes data for instance of SWModule
-00022  *
-00023  * ENT: imodname - Internal name for module
-00024  *      imoddesc - Name to display to user for module
-00025  *      idisp    - Display object to use for displaying
-00026  *      imodtype - Type of Module (All modules will be displayed with
-00027  *                      others of same type under their modtype heading
-00028  *      unicode  - if this module is unicode
-00029  */
-00030 
-00031 SWModule::SWModule(const char *imodname, const char *imoddesc, SWDisplay *idisp, char *imodtype, SWTextEncoding encoding, SWTextDirection direction, SWTextMarkup markup, const char* imodlang)
-00032 {
-00033         key       = CreateKey();
-00034         entrybuf  = new char [1];
-00035         *entrybuf = 0;
-00036         config    = &ownConfig;
-00037         entrybufallocsize = 0;
-00038         modname   = 0;
-00039         error     = 0;
-00040         moddesc   = 0;
-00041         modtype   = 0;
-00042         modlang   = 0;
-00043         this->encoding = encoding;
-00044         this->direction = direction;
-00045         this->markup  = markup;
-00046         entrySize= -1;
-00047         disp     = (idisp) ? idisp : &rawdisp;
-00048         stdstr(&modname, imodname);
-00049         stdstr(&moddesc, imoddesc);
-00050         stdstr(&modtype, imodtype);
-00051         stdstr(&modlang, imodlang);
-00052         stripFilters = new FilterList();
-00053         rawFilters = new FilterList();
-00054         renderFilters = new FilterList();
-00055         optionFilters = new FilterList();
-00056         encodingFilters = new FilterList();
-00057         skipConsecutiveLinks = true;
-00058         procEntAttr = true;
-00059 }
-00060 
-00061 
-00062 /******************************************************************************
-00063  * SWModule Destructor - Cleans up instance of SWModule
-00064  */
-00065 
-00066 SWModule::~SWModule()
-00067 {
-00068         if (entrybuf)
-00069                 delete [] entrybuf;
-00070         if (modname)
-00071                 delete [] modname;
-00072         if (moddesc)
-00073                 delete [] moddesc;
-00074         if (modtype)
-00075                 delete [] modtype;
-00076         if (modlang)
-00077                 delete [] modlang;
-00078 
-00079         if (key) {
-00080                 if (!key->Persist())
-00081                         delete key;
-00082         }
-00083 
-00084         stripFilters->clear();
-00085      rawFilters->clear();
-00086      renderFilters->clear();
-00087      optionFilters->clear();
-00088      encodingFilters->clear();
-00089         entryAttributes.clear();
-00090 
-00091      delete stripFilters;
-00092      delete rawFilters;
-00093      delete renderFilters;
-00094      delete optionFilters;
-00095      delete encodingFilters;
-00096 }
-00097 
-00098 
-00099 /******************************************************************************
-00100  * SWModule::CreateKey - Allocates a key of specific type for module
-00101  *
-00102  * RET: pointer to allocated key
-00103  */
-00104 
-00105 SWKey *SWModule::CreateKey()
-00106 {
-00107         return new SWKey();
-00108 }
-00109 
-00110 
-00111 /******************************************************************************
-00112  * SWModule::Error - Gets and clears error status
-00113  *
-00114  * RET: error status
-00115  */
-00116 
-00117 char SWModule::Error()
-00118 {
-00119         char retval = error;
-00120 
-00121         error = 0;
-00122         return retval;
-00123 }
-00124 
-00125 
-00126 /******************************************************************************
-00127  * SWModule::Name - Sets/gets module name
-00128  *
-00129  * ENT: imodname - value which to set modname
-00130  *              [0] - only get
-00131  *
-00132  * RET: pointer to modname
-00133  */
-00134 
-00135 char *SWModule::Name(const char *imodname)
-00136 {
-00137         return stdstr(&modname, imodname);
-00138 }
-00139 
-00140 
-00141 /******************************************************************************
-00142  * SWModule::Description - Sets/gets module description
-00143  *
-00144  * ENT: imoddesc - value which to set moddesc
-00145  *              [0] - only get
-00146  *
-00147  * RET: pointer to moddesc
-00148  */
-00149 
-00150 char *SWModule::Description(const char *imoddesc)
-00151 {
-00152         return stdstr(&moddesc, imoddesc);
-00153 }
-00154 
-00155 
-00156 /******************************************************************************
-00157  * SWModule::Type - Sets/gets module type
-00158  *
-00159  * ENT: imodtype - value which to set modtype
-00160  *              [0] - only get
-00161  *
-00162  * RET: pointer to modtype
-00163  */
-00164 
-00165 char *SWModule::Type(const char *imodtype)
-00166 {
-00167         return stdstr(&modtype, imodtype);
-00168 }
-00169 
-00170 /******************************************************************************
-00171  * SWModule::Direction - Sets/gets module direction
-00172  *
-00173  * ENT: newdir - value which to set direction
-00174  *              [-1] - only get
-00175  *
-00176  * RET: char direction
-00177  */
-00178 char SWModule::Direction(signed char newdir) {
-00179         if (newdir != -1)
-00180                 direction = newdir;
-00181         return direction;
-00182 }
-00183 
-00184 /******************************************************************************
-00185  * SWModule::Encoding - Sets/gets module encoding
-00186  *
-00187  * ENT: newdir - value which to set direction
-00188  *              [-1] - only get
-00189  *
-00190  * RET: char encoding
-00191  */
-00192 char SWModule::Encoding(signed char newenc) {
-00193         if (newenc != -1)
-00194                 encoding = newenc;
-00195         return encoding;
-00196 }
-00197 
-00198 /******************************************************************************
-00199  * SWModule::Markup - Sets/gets module markup
-00200  *
-00201  * ENT: newdir - value which to set direction
-00202  *              [-1] - only get
-00203  *
-00204  * RET: char markup
-00205  */
-00206 char SWModule::Markup(signed char newmark) {
-00207         if (newmark != -1)
-00208                 markup = newmark;
-00209         return markup;
-00210 }
-00211 
-00212 
-00213 /******************************************************************************
-00214  * SWModule::Lang - Sets/gets module language
-00215  *
-00216  * ENT: imodlang - value which to set modlang
-00217  *              [0] - only get
-00218  *
-00219  * RET: pointer to modname
-00220  */
-00221 
-00222 char *SWModule::Lang(const char *imodlang)
-00223 {
-00224         return stdstr(&modlang, imodlang);
-00225 }
-00226 
-00227 
-00228 /******************************************************************************
-00229  * SWModule::Disp - Sets/gets display driver
-00230  *
-00231  * ENT: idisp - value which to set disp
-00232  *              [0] - only get
-00233  *
-00234  * RET: pointer to disp
-00235  */
-00236 
-00237 SWDisplay *SWModule::Disp(SWDisplay *idisp)
-00238 {
-00239         if (idisp)
-00240                 disp = idisp;
-00241 
-00242         return disp;
-00243 }
-00244 
-00245 
-00246 /******************************************************************************
-00247  * SWModule::Display - Calls this modules display object and passes itself
-00248  *
-00249  * RET: error status
-00250  */
-00251 
-00252 char SWModule::Display()
-00253 {
-00254         disp->Display(*this);
-00255         return 0;
-00256 }
-00257 
-00258 
-00259 /******************************************************************************
-00260  * SWModule::SetKey - Sets a key to this module for position to a particular
-00261  *                      record or set of records
-00262  *
-00263  * ENT: ikey - key with which to set this module
-00264  *
-00265  * RET: error status
-00266  */
-00267 
-00268 char SWModule::SetKey(const SWKey &ikey) {
-00269         return SetKey(&ikey);
-00270 }
-00271 
-00272 char SWModule::SetKey(const SWKey *ikey)
-00273 {
-00274         SWKey *oldKey = 0;
-00275 
-00276         if (key) {
-00277                 if (!key->Persist())    // if we have our own copy
-00278                         oldKey = key;
-00279         }
-00280 
-00281         if (!ikey->Persist()) {         // if we are to keep our own copy
-00282                  key = CreateKey();
-00283                 *key = *ikey;
-00284         }
-00285         else     key = (SWKey *)ikey;           // if we are to just point to an external key
-00286 
-00287         if (oldKey)
-00288                 delete oldKey;
-00289 
-00290         return 0;
-00291 }
-00292 
-00293 
-00294 /******************************************************************************
-00295  * SWModule::KeyText - Sets/gets module KeyText
-00296  *
-00297  * ENT: ikeytext - value which to set keytext
-00298  *              [0] - only get
-00299  *
-00300  * RET: pointer to keytext
-00301  */
-00302 
-00303 const char *SWModule::KeyText(const char *ikeytext)
-00304 {
-00305         if (ikeytext)
-00306                 SetKey(ikeytext);
-00307 
-00308         return *key;
-00309 }
-00310 
-00311 
-00312 /******************************************************************************
-00313  * SWModule::operator =(SW_POSITION)    - Positions this modules to an entry
-00314  *
-00315  * ENT: p       - position (e.g. TOP, BOTTOM)
-00316  *
-00317  * RET: *this
-00318  */
-00319 
-00320 SWModule &SWModule::operator =(SW_POSITION p)
-00321 {
-00322         *key = p;
-00323         char saveError = key->Error();
-00324 
-00325         switch (p) {
-00326         case POS_TOP:
-00327                 (*this)++;
-00328                 (*this)--;
-00329                 break;
-00330 
-00331         case POS_BOTTOM:
-00332                 (*this)--;
-00333                 (*this)++;
-00334                 break;
-00335         }
-00336 
-00337         error = saveError;
-00338         return *this;
-00339 }
-00340 
-00341 
-00342 /******************************************************************************
-00343  * SWModule::operator +=        - Increments module key a number of entries
-00344  *
-00345  * ENT: increment       - Number of entries to jump forward
-00346  *
-00347  * RET: *this
-00348  */
-00349 
-00350 SWModule &SWModule::operator +=(int increment)
-00351 {
-00352         (*key) += increment;
-00353         error = key->Error();
-00354 
-00355         return *this;
-00356 }
-00357 
-00358 
-00359 /******************************************************************************
-00360  * SWModule::operator -=        - Decrements module key a number of entries
-00361  *
-00362  * ENT: decrement       - Number of entries to jump backward
-00363  *
-00364  * RET: *this
-00365  */
-00366 
-00367 SWModule &SWModule::operator -=(int increment)
-00368 {
-00369         (*key) -= increment;
-00370         error = key->Error();
-00371 
-00372         return *this;
-00373 }
-00374 
-00375 
-00376 /******************************************************************************
-00377  * SWModule::Search     - Searches a module for a string
-00378  *
-00379  * ENT: istr            - string for which to search
-00380  *      searchType      - type of search to perform
-00381  *                              >=0 - regex
-00382  *                              -1  - phrase
-00383  *                              -2  - multiword
-00384  *      flags           - options flags for search
-00385  *      justCheckIfSupported    - if set, don't search, only tell if this
-00386  *                                                      function supports requested search.
-00387  *
-00388  * RET: listkey set to verses that contain istr
-00389  */
-00390 
-00391 ListKey &SWModule::Search(const char *istr, int searchType, int flags, SWKey *scope, bool *justCheckIfSupported, void (*percent)(char, void *), void *percentUserData)
-00392 {
-00393         SWKey *savekey = 0;
-00394         SWKey *searchkey = 0;
-00395         regex_t preg;
-00396         SWKey textkey;
-00397         char **words = 0;
-00398         char *wordBuf = 0;
-00399         int wordCount = 0;
-00400         const char *sres;
-00401         terminateSearch = false;
-00402         char perc = 1;
-00403         bool savePEA = isProcessEntryAttributes();
-00404 
-00405         processEntryAttributes(false);
-00406         listkey.ClearList();
-00407 
-00408         if (!key->Persist()) {
-00409                 savekey = CreateKey();
-00410                 *savekey = *key;
-00411         }
-00412         else    savekey = key;
-00413 
-00414         searchkey = (scope)?scope->clone():(key->Persist())?key->clone():0;
-00415         if (searchkey) {
-00416                 searchkey->Persist(1);
-00417                 SetKey(*searchkey);
-00418         }
-00419 
-00420         (*percent)(perc, percentUserData);
-00421         // MAJOR KLUDGE: VerseKey::Index still return index within testament.
-00422         //      VerseKey::NewIndex should be moved to Index and Index should be some
-00423         //      VerseKey specific name
-00424         VerseKey *vkcheck = 0;
-00425 #ifndef _WIN32_WCE
-00426         try {
-00427 #endif
-00428                 vkcheck = SWDYNAMIC_CAST(VerseKey, key);
-00429 #ifndef _WIN32_WCE
-00430         }
-00431         catch (...) {}
-00432 #endif
-00433         // end MAJOR KLUDGE
-00434 
-00435         *this = BOTTOM;
-00436         // fix below when we find out the bug
-00437         long highIndex = (vkcheck)?32300/*vkcheck->NewIndex()*/:key->Index();
-00438         if (!highIndex)
-00439                 highIndex = 1;          // avoid division by zero errors.
-00440         *this = TOP;
-00441         if (searchType >= 0) {
-00442                 flags |=searchType|REG_NOSUB|REG_EXTENDED;
-00443                 regcomp(&preg, istr, flags);
-00444         }
-00445 
-00446         (*percent)(++perc, percentUserData);
-00447         if (searchType == -2) {
-00448                 wordBuf = (char *)calloc(sizeof(char), strlen(istr) + 1);
-00449                 strcpy(wordBuf, istr);
-00450                 words = (char **)calloc(sizeof(char *), 10);
-00451                 int allocWords = 10;
-00452                 words[wordCount] = strtok(wordBuf, " ");
-00453                 while (words[wordCount]) {
-00454                         wordCount++;
-00455                         if (wordCount == allocWords) {
-00456                                 allocWords+=10;
-00457                                 words = (char **)realloc(words, sizeof(char *)*allocWords);
-00458                         }
-00459                         words[wordCount] = strtok(NULL, " ");
-00460                 }
-00461         }
-00462 
-00463         perc = 5;
-00464         (*percent)(perc, percentUserData);
-00465 
-00466         while (!Error() && !terminateSearch) {
-00467 
-00468         
-00469                 long mindex = 0;
-00470                 if (vkcheck)
-00471                         mindex = vkcheck->NewIndex();
-00472                 else mindex = key->Index();
-00473                 float per = (float)mindex / highIndex;
-00474                 per *= 93;
-00475                 per += 5;
-00476                 char newperc = (char)per;
-00477 //              char newperc = (char)(5+(93*(((float)((vkcheck)?vkcheck->NewIndex():key->Index()))/highIndex)));
-00478                 if (newperc > perc) {
-00479                         perc = newperc;
-00480                         (*percent)(perc, percentUserData);
-00481                 }
-00482                 else if (newperc < perc) {
-00483 #ifndef _MSC_VER
-00484                         cerr << "Serious error: new percentage complete is less than previous value\n";
-00485                         cerr << "using vk? " << ((vkcheck)?"yes":"no") << "\n";
-00486                         cerr << "index: " << ((vkcheck)?vkcheck->NewIndex():key->Index()) << "\n";
-00487                         cerr << "highIndex: " << highIndex << "\n";
-00488                         cerr << "newperc ==" << (int)newperc << "%" << "is smaller than\n";
-00489                         cerr << "perc == "  << (int )perc << "% \n";
-00490 #endif
-00491                 }
-00492                 if (searchType >= 0) {
-00493                         if (!regexec(&preg,  StripText(), 0, 0, 0)) {
-00494                                 textkey = KeyText();
-00495                                 listkey << textkey;
-00496                         }
-00497                 }
-00498                 else {
-00499                         if (searchType == -1) {
-00500                                 sres = ((flags & REG_ICASE) == REG_ICASE) ? stristr(StripText(), istr) : strstr(StripText(), istr);
-00501                                 if (sres) {
-00502                                                 textkey = KeyText();
-00503                                                 listkey << textkey;
-00504                                 }
-00505                         }
-00506                         if (searchType == -2) {
-00507                                 int i;
-00508                                 const char *stripBuf = StripText();
-00509                                 for (i = 0; i < wordCount; i++) {
-00510                                         sres = ((flags & REG_ICASE) == REG_ICASE) ? stristr(stripBuf, words[i]) : strstr(stripBuf, words[i]);
-00511                                         if (!sres)
-00512                                                 break;
-00513                                 }
-00514                                 if (i == wordCount) {
-00515                                         textkey = KeyText();
-00516                                         listkey << textkey;
-00517                                 }
-00518 
-00519                         }
-00520                 }
-00521                 (*this)++;
-00522         }
-00523         if (searchType >= 0)
-00524                 regfree(&preg);
-00525 
-00526         if (searchType == -2) {
-00527                 free(words);
-00528                 free(wordBuf);
-00529         }
-00530 
-00531         SetKey(*savekey);
-00532 
-00533         if (!savekey->Persist())
-00534                 delete savekey;
-00535 
-00536         if (searchkey)
-00537                 delete searchkey;
-00538 
-00539         listkey = TOP;
-00540         processEntryAttributes(savePEA);
-00541         (*percent)(100, percentUserData);
-00542 
-00543         return listkey;
-00544 }
-00545 
-00546 
-00547 /******************************************************************************
-00548  * SWModule::StripText()        - calls all stripfilters on current text
-00549  *
-00550  * ENT: buf     - buf to massage instead of this modules current text
-00551  *      len     - max len of buf
-00552  *
-00553  * RET: this module's text at specified key location massaged by Strip filters
-00554  */
-00555 
-00556 const char *SWModule::StripText(char *buf, int len)
-00557 {
-00558         return RenderText(buf, len, false);
-00559 }
-00560 
-00561 
-00562 /******************************************************************************
-00563  * SWModule::RenderText         - calls all renderfilters on current text
-00564  *
-00565  * ENT: buf     - buffer to Render instead of current module position
-00566  *
-00567  * RET: listkey set to verses that contain istr
-00568  */
-00569 
-00570  const char *SWModule::RenderText(char *buf, int len, bool render) {
-00571         entryAttributes.clear();
-00572         char *tmpbuf = (buf) ? buf : getRawEntry();
-00573         SWKey *key = 0;
-00574         static char *null = "";
-00575 
-00576         if (tmpbuf) {
-00577                 unsigned long size = (len < 0) ? ((getEntrySize()<0) ? strlen(tmpbuf) : getEntrySize()) * FILTERPAD : len;
-00578                 if (size > 0) {
-00579                         key = (SWKey *)*this;
-00580 
-00581                         optionFilter(tmpbuf, size, key);
-00582         
-00583                         if (render) {
-00584                                 renderFilter(tmpbuf, size, key);
-00585                                 encodingFilter(tmpbuf, size, key);
-00586                         }
-00587                         else    stripFilter(tmpbuf, size, key);
-00588                 }
-00589         }
-00590         else {
-00591                 tmpbuf = null;
-00592         }
-00593 
-00594         return tmpbuf;
-00595 }
-00596 
-00597 
-00598 /******************************************************************************
-00599  * SWModule::RenderText         - calls all renderfilters on current text
-00600  *
-00601  * ENT: tmpKey  - key to use to grab text
-00602  *
-00603  * RET: this module's text at specified key location massaged by RenderFilers
-00604  */
-00605 
-00606  const char *SWModule::RenderText(SWKey *tmpKey)
-00607 {
-00608         SWKey *savekey;
-00609         const char *retVal;
-00610 
-00611         if (!key->Persist()) {
-00612                 savekey = CreateKey();
-00613                 *savekey = *key;
-00614         }
-00615         else    savekey = key;
-00616 
-00617         SetKey(*tmpKey);
-00618 
-00619         retVal = RenderText();
-00620 
-00621         SetKey(*savekey);
-00622 
-00623         if (!savekey->Persist())
-00624                 delete savekey;
-00625 
-00626         return retVal;
-00627 }
-00628 
-00629 
-00630 /******************************************************************************
-00631  * SWModule::StripText  - calls all StripTextFilters on current text
-00632  *
-00633  * ENT: tmpKey  - key to use to grab text
-00634  *
-00635  * RET: this module's text at specified key location massaged by Strip filters
-00636  */
-00637 
-00638 const char *SWModule::StripText(SWKey *tmpKey)
-00639 {
-00640         SWKey *savekey;
-00641         const char *retVal;
-00642 
-00643         if (!key->Persist()) {
-00644                 savekey = CreateKey();
-00645                 *savekey = *key;
-00646         }
-00647         else    savekey = key;
-00648 
-00649         SetKey(*tmpKey);
-00650 
-00651         retVal = StripText();
-00652 
-00653         SetKey(*savekey);
-00654 
-00655         if (!savekey->Persist())
-00656                 delete savekey;
-00657 
-00658         return retVal;
-00659 }
-00660 
-00661 
-00662 SWModule::operator const char*() {
-00663         return RenderText();
-00664 }
-00665 
-00666 
-00667 const char *SWModule::getConfigEntry(const char *key) const {
-00668         ConfigEntMap::iterator it = config->find(key);
-00669         return (it != config->end()) ? it->second.c_str() : 0;
-00670 }
-00671 
-00672 
-00673 void SWModule::setConfig(ConfigEntMap *config) {
-00674         this->config = config;
-00675 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swmodule_8h-source.html b/doc/api-documentation/html/swmodule_8h-source.html deleted file mode 100644 index 30dbe9e..0000000 --- a/doc/api-documentation/html/swmodule_8h-source.html +++ /dev/null @@ -1,283 +0,0 @@ - - -swmodule.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swmodule.h

00001 /******************************************************************************
-00002  *  swmodule.h  - code for base class 'module'.  Module is the basis for all
-00003  *                types of modules (e.g. texts, commentaries, maps, lexicons,
-00004  *                etc.)
-00005  *
-00006  * $Id: swmodule_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00007  *
-00008  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00009  *      CrossWire Bible Society
-00010  *      P. O. Box 2528
-00011  *      Tempe, AZ  85280-2528
-00012  *
-00013  * This program is free software; you can redistribute it and/or modify it
-00014  * under the terms of the GNU General Public License as published by the
-00015  * Free Software Foundation version 2.
-00016  *
-00017  * This program is distributed in the hope that it will be useful, but
-00018  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00020  * General Public License for more details.
-00021  *
-00022  */
-00023 
-00024 #ifndef SWMODULE_H
-00025 #define SWMODULE_H
-00026 
-00027 #include <swdisp.h>
-00028 #include <swkey.h>
-00029 #include <listkey.h>
-00030 #include <swfilter.h>
-00031 #include <swconfig.h>
-00032 #include <swcacher.h>
-00033 #include <list>
-00034 
-00035 #include <defs.h>
-00036 #include <multimapwdef.h>
-00037 
-00038 #define FILTERPAD 80
-00039 
-00040 using namespace std;
-00041 
-00042 typedef list < SWFilter * >FilterList;
-00043 
-00044 typedef map < string, string, less < string > > AttributeValue;
-00045 typedef map < string, AttributeValue, less < string > > AttributeList;
-00046 typedef map < string, AttributeList, less < string > > AttributeTypeList;
-00047 
-00048 #define SWTextDirection char
-00049 #define SWTextEncoding char
-00050 #define SWTextMarkup char
-00051 
-00052 enum {DIRECTION_LTR = 0, DIRECTION_RTL, DIRECTION_BIDI};
-00053 enum {FMT_UNKNOWN = 0, FMT_PLAIN, FMT_THML, FMT_GBF, FMT_HTML, FMT_HTMLHREF, FMT_RTF, FMT_OSIS};
-00054 enum {ENC_UNKNOWN = 0, ENC_LATIN1, ENC_UTF8, ENC_SCSU, ENC_UTF16, ENC_RTF, ENC_HTML};
-00055 
-00064 class SWDLLEXPORT SWModule : public SWCacher {
-00065 
-00066 protected:
-00067 
-00068   ConfigEntMap ownConfig;
-00069   ConfigEntMap *config;
-00070   mutable AttributeTypeList entryAttributes;
-00071   mutable bool procEntAttr;
-00072 
-00073   char error;
-00074   bool skipConsecutiveLinks;
-00075 
-00077   SWKey *key;
-00078 
-00079   ListKey listkey;
-00080   char *modname;
-00081   char *moddesc;
-00082   char *modtype;
-00083   char *modlang;  
-00084 
-00085   char direction;
-00086   char markup;
-00087   char encoding;
-00088 
-00090   SWDisplay *disp;
-00091 
-00092   static SWDisplay rawdisp;
-00093   char *entrybuf;
-00094   unsigned long entrybufallocsize;
-00095 
-00097   FilterList *stripFilters;
-00098 
-00100   FilterList *rawFilters;
-00101 
-00103   FilterList *renderFilters;
-00104 
-00106   FilterList *optionFilters;
-00107 
-00109   FilterList *encodingFilters;
-00110 
-00111   int entrySize;
-00112 
-00113 public:
-00120   static void nullPercent (char percent, void *userData);
-00125   bool terminateSearch;
-00138   SWModule (const char *imodname = 0, const char *imoddesc = 0, SWDisplay * idisp = 0, char *imodtype = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, const char* modlang = 0);
-00141   virtual ~ SWModule ();
-00146   virtual char Error ();
-00150   virtual const bool isUnicode() const {return (encoding == (char)ENC_UTF8 || encoding == (char)ENC_SCSU);}
-00151 
-00152   // These methods are useful for modules that come from a standard SWORD install (most do).
-00153   // SWMgr will call setConfig.  The user may use getConfig and getConfigEntry (if they
-00154   // are not comfortable with, or don't wish to use  stl maps).
-00155   virtual const ConfigEntMap &getConfig() const { return *config; }
-00156   virtual void setConfig(ConfigEntMap *config);
-00157   virtual const char *getConfigEntry(const char *key) const;
-00158 
-00162   virtual const int getEntrySize() const {return entrySize;}
-00170   virtual char SetKey (const SWKey *ikey);
-00176   virtual char SetKey (const SWKey &ikey);
-00180   virtual SWKey & Key () const {
-00181     return *key;
-00182   }
-00189   virtual char Key (const SWKey & ikey) {
-00190     return SetKey (ikey);
-00191   }
-00198   virtual const char *KeyText (const char *imodtype = 0);
-00203   virtual char Display ();
-00210   virtual SWDisplay *Disp (SWDisplay * idisp = 0);
-00217   virtual char *Name (const char *imodname = 0);
-00224   virtual char *Description (const char *imoddesc = 0);
-00231   virtual char *Type (const char *imodtype = 0);
-00238   virtual char Direction(signed char newdir = -1);
-00245   virtual char Encoding(signed char enc = -1);
-00252   virtual char Markup(signed char enc = -1);
-00259   virtual char *Lang (const char *imodlang = 0);
-00260 
-00261   // search methods
-00262 
-00274   virtual ListKey & Search (const char *istr, int searchType = 0, int flags = 0,
-00275                   SWKey * scope = 0,
-00276                   bool * justCheckIfSupported = 0,
-00277                   void (*percent) (char, void *) = &nullPercent,
-00278                   void *percentUserData = 0);
-00282   virtual signed char createSearchFramework () {
-00283     return 0;
-00284   }                             // special search framework
-00288   virtual bool hasSearchFramework () {
-00289     return false;
-00290   }                             // special search framework
-00295   virtual bool isSearchOptimallySupported (const char *istr, int searchType,
-00296                                            int flags, SWKey * scope) {
-00297       bool retVal = false;
-00298       Search (istr, searchType, flags, scope, &retVal);
-00299       return retVal;
-00300   }
-00307   virtual SWKey *CreateKey ();
-00311   virtual operator const char *();
-00316   virtual char *getRawEntry () = 0;
-00322   virtual operator SWKey & () {
-00323     return *key;
-00324   }
-00333   virtual operator SWKey *() {
-00334     return key;
-00335   }
-00336 
-00337 
-00338   // write interface ----------------------------
-00342   virtual bool isWritable () {
-00343     return false;
-00344   }
-00349   static signed char createModule (const char *) {
-00350     return -1;
-00351   }
-00356   virtual SWModule & setentry (const char *inbuf, long len) {
-00357     return *this;
-00358   }
-00363   virtual SWModule & operator << (const char *) {
-00364     return *this;
-00365   }
-00370   virtual SWModule & operator << (const SWKey *) {
-00371     return *this;
-00372   }
-00376   virtual void deleteEntry () {
-00377   }
-00378   // end write interface ------------------------
-00379 
-00385   virtual SWModule & operator -= (int decrement);
-00391   virtual SWModule & operator += (int increment);
-00395   virtual SWModule & operator++ (int) {
-00396     return *this += 1;
-00397   }
-00401   virtual SWModule & operator-- (int) {
-00402     return *this -= 1;
-00403   }
-00409   virtual SWModule & operator = (SW_POSITION p);
-00414   virtual SWModule & AddRenderFilter (SWFilter * newfilter) {
-00415     renderFilters->push_back (newfilter);
-00416     return *this;
-00417   }
-00422   virtual SWModule & RemoveRenderFilter (SWFilter * oldfilter) {
-00423     renderFilters->remove (oldfilter);
-00424     return *this;
-00425   }
-00431   virtual SWModule & ReplaceRenderFilter (SWFilter * oldfilter, SWFilter * newfilter) {
-00432     FilterList::iterator iter;
-00433     for (iter = renderFilters->begin(); iter != renderFilters->end(); iter++)
-00434         if (*iter == oldfilter)
-00435                 *iter = newfilter;
-00436     return *this;
-00437   }
-00444   virtual void renderFilter (char *buf, long size, SWKey *key) {
-00445         filterBuffer(renderFilters, buf, size, key);
-00446   }
-00451   virtual SWModule & AddEncodingFilter (SWFilter * newfilter) {
-00452     encodingFilters->push_back (newfilter);
-00453     return *this;
-00454   }
-00459   virtual SWModule & RemoveEncodingFilter (SWFilter * oldfilter) {
-00460     encodingFilters->remove (oldfilter);
-00461     return *this;
-00462   }
-00468   virtual SWModule & ReplaceEncodingFilter (SWFilter * oldfilter, SWFilter * newfilter) {
-00469     FilterList::iterator iter;
-00470     for (iter = encodingFilters->begin(); iter != encodingFilters->end(); iter++)
-00471         if (*iter == oldfilter)
-00472                 *iter = newfilter;
-00473     return *this;
-00474   }
-00481   virtual void encodingFilter (char *buf, long size, SWKey *key) {
-00482         filterBuffer(encodingFilters, buf, size, key);
-00483   }
-00488   virtual SWModule & AddStripFilter (SWFilter * newfilter) {
-00489     stripFilters->push_back (newfilter);
-00490     return *this;
-00491   }
-00498   virtual void stripFilter (char *buf, long size, SWKey *key) {
-00499         filterBuffer(stripFilters, buf, size, key);
-00500   }
-00505   virtual SWModule & AddRawFilter (SWFilter * newfilter) {
-00506     rawFilters->push_back (newfilter);
-00507     return *this;
-00508   }
-00516   virtual void filterBuffer (FilterList *filters, char *buf, long size, SWKey *key) {
-00517         FilterList::iterator it;
-00518         for (it = filters->begin(); it != filters->end(); it++) {
-00519                 (*it)->ProcessText(buf, size, key, this);
-00520         }
-00521   }
-00528   virtual void rawFilter (char *buf, long size, SWKey *key) {
-00529         buf[size] = 0;
-00530         filterBuffer(rawFilters, buf, size, key);
-00531   }
-00536   virtual SWModule & AddOptionFilter (SWFilter * newfilter) {
-00537     optionFilters->push_back (newfilter);
-00538     return *this;
-00539   }
-00546   virtual void optionFilter (char *buf, long size, SWKey *key) {
-00547         filterBuffer(optionFilters, buf, size, key);
-00548   }
-00556   virtual const char *StripText (char *buf = 0, int len = -1);
-00564   virtual const char *RenderText (char *buf = 0, int len = -1, bool render = true);
-00570   virtual const char *StripText (SWKey * tmpKey);
-00576   virtual const char *RenderText (SWKey * tmpKey);
-00577 
-00584   virtual void setSkipConsecutiveLinks(bool val) { skipConsecutiveLinks = val; }
-00585   virtual bool getSkipConsecutiveLinks() { return skipConsecutiveLinks; }
-00586   virtual AttributeTypeList &getEntryAttributes() const { return entryAttributes; }
-00587   virtual void processEntryAttributes(bool val) const { procEntAttr = val; }
-00588   virtual bool isProcessEntryAttributes() const { return procEntAttr; }
-00589 };
-00590 
-00591 
-00592 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swobject_8h-source.html b/doc/api-documentation/html/swobject_8h-source.html deleted file mode 100644 index 785840c..0000000 --- a/doc/api-documentation/html/swobject_8h-source.html +++ /dev/null @@ -1,57 +0,0 @@ - - -swobject.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swobject.h

00001 #ifndef SWOBJECT_H
-00002 #define SWOBJECT_H
-00003 
-00004 #include <utilfuns.h>
-00005 #if !defined(__GNUC__) && !defined(_WIN32_WCE)
-00006 #else
-00007 #include <unixstr.h>
-00008 #endif
-00009 
-00010 #include <defs.h>
-00011 #include <string.h>
-00012 
-00013 #define SWDYNAMIC_CAST(className, object) (className *)((object)?((object->getClass()->isAssignableFrom(#className))?object:0):0)
-00014 
-00018 class SWDLLEXPORT SWClass {
-00019 private:
-00020         const char **descends;
-00021 
-00022 public:
-00023         SWClass(const char **descends) {
-00024                 this->descends = descends;
-00025         }
-00026 
-00027         bool isAssignableFrom(const char *className) const {
-00028                 for (int i = 0; descends[i]; i++) {
-00029                         if (!stricmp(descends[i], className))
-00030                                 return true;
-00031                 }
-00032                 return false;
-00033         }
-00034 };
-00035 
-00041 class SWObject {
-00042 protected:
-00043         SWClass * myclass;
-00044      
-00045 public:
-00049         const SWClass *getClass () const {
-00050                 return myclass;
-00051         }
-00052 };
-00053 
-00054 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swtext_8cpp-source.html b/doc/api-documentation/html/swtext_8cpp-source.html deleted file mode 100644 index e70b58f..0000000 --- a/doc/api-documentation/html/swtext_8cpp-source.html +++ /dev/null @@ -1,53 +0,0 @@ - - -swtext.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swtext.cpp

00001 /******************************************************************************
-00002  *  swtext.cpp  - code for base class 'SWText'- The basis for all text modules
-00003  */
-00004 
-00005 #include <swtext.h>
-00006 #include <listkey.h>
-00007 
-00008 
-00009 /******************************************************************************
-00010  * SWText Constructor - Initializes data for instance of SWText
-00011  *
-00012  * ENT: imodname - Internal name for module
-00013  *      imoddesc - Name to display to user for module
-00014  *      idisp    - Display object to use for displaying
-00015  */
-00016 
-00017 SWText::SWText(const char *imodname, const char *imoddesc, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang): SWModule(imodname, imoddesc, idisp, "Biblical Texts", enc, dir, mark, ilang)
-00018 {
-00019         delete key;
-00020         key = CreateKey();
-00021 }
-00022 
-00023 
-00024 /******************************************************************************
-00025  * SWText Destructor - Cleans up instance of SWText
-00026  */
-00027 
-00028 SWText::~SWText() {
-00029 }
-00030 
-00031 
-00032 /******************************************************************************
-00033  * SWText CreateKey - Create the correct key (VerseKey) for use with SWText
-00034  */
-00035 
-00036 SWKey *SWText::CreateKey()
-00037 {
-00038         return new VerseKey();
-00039 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swtext_8h-source.html b/doc/api-documentation/html/swtext_8h-source.html deleted file mode 100644 index 0695cc7..0000000 --- a/doc/api-documentation/html/swtext_8h-source.html +++ /dev/null @@ -1,55 +0,0 @@ - - -swtext.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swtext.h

00001 /******************************************************************************
-00002  *  swtext.h   - code for base class 'SWText'.  SWText is the basis for all
-00003  *               types of text modules
-00004  *
-00005  * $Id: swtext_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #ifndef SWTEXT_H
-00024 #define SWTEXT_H
-00025 
-00026 #include <swmodule.h>
-00027 #include <versekey.h>
-00028 #include <listkey.h>
-00029 
-00030 #include <defs.h>
-00031 
-00034 class SWDLLEXPORT SWText:public SWModule
-00035 {
-00036 public:
-00043   SWText (const char *imodname = 0, const char *imoddesc = 0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0);
-00044   virtual ~ SWText ();
-00047   virtual SWKey *CreateKey ();
-00048 };
-00049 
-00050 
-00051 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swunicod_8cpp-source.html b/doc/api-documentation/html/swunicod_8cpp-source.html deleted file mode 100644 index 1cb64c1..0000000 --- a/doc/api-documentation/html/swunicod_8cpp-source.html +++ /dev/null @@ -1,149 +0,0 @@ - - -swunicod.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swunicod.cpp

00001 /*
-00002  *
-00003  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00004  *      CrossWire Bible Society
-00005  *      P. O. Box 2528
-00006  *      Tempe, AZ  85280-2528
-00007  *
-00008  * This program is free software; you can redistribute it and/or modify it
-00009  * under the terms of the GNU General Public License as published by the
-00010  * Free Software Foundation version 2.
-00011  *
-00012  * This program is distributed in the hope that it will be useful, but
-00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00015  * General Public License for more details.
-00016  *
-00017  */
-00018 
-00019 #include "swunicod.h"
-00020 unsigned char* UTF32to8 (unsigned long utf32, unsigned char * utf8) {
-00021   unsigned int i;
-00022   for (i = 0; i < 6; i++) utf8[i] = 0;
-00023 
-00024   if (utf32 < 0x80) {
-00025     utf8[0] = (char)utf32;
-00026   }
-00027   else if (utf32 < 0x800) {
-00028     i = utf32 & 0x3f;
-00029     utf8[1] = 0x80 | i;
-00030     utf32 >>= 6;
-00031    
-00032     i = utf32 & 0x1f;
-00033     utf8[0] = 0xc0 | i;
-00034   }
-00035   else if (utf32 < 0x10000) {
-00036     i = utf32 & 0x3f;
-00037     utf8[2] = 0x80 | i;
-00038     utf32 >>= 6;
-00039 
-00040     i = utf32 & 0x3f;
-00041     utf8[1] = 0x80 | i;
-00042     utf32 >>= 6;
-00043    
-00044     i = utf32 & 0x0f;
-00045     utf8[0] = 0xe0 | i;
-00046   }
-00047   else if (utf32 < 0x200000) {
-00048     i = utf32 & 0x3f;
-00049     utf8[3] = 0x80 | i;
-00050     utf32 >>= 6;
-00051 
-00052     i = utf32 & 0x3f;
-00053     utf8[2] = 0x80 | i;
-00054     utf32 >>= 6;
-00055 
-00056     i = utf32 & 0x3f;
-00057     utf8[1] = 0x80 | i;
-00058     utf32 >>= 6;
-00059    
-00060     i = utf32 & 0x07;
-00061     utf8[0] = 0xf0 | i;
-00062   }
-00063   else if (utf32 < 0x4000000) {
-00064     i = utf32 & 0x3f;
-00065     utf8[4] = 0x80 | i;
-00066     utf32 >>= 6;
-00067 
-00068     i = utf32 & 0x3f;
-00069     utf8[3] = 0x80 | i;
-00070     utf32 >>= 6;
-00071 
-00072     i = utf32 & 0x3f;
-00073     utf8[2] = 0x80 | i;
-00074     utf32 >>= 6;
-00075 
-00076     i = utf32 & 0x3f;
-00077     utf8[1] = 0x80 | i;
-00078     utf32 >>= 6;
-00079    
-00080     i = utf32 & 0x03;
-00081     utf8[0] = 0xf8 | i;
-00082   }
-00083   else if (utf32 < 0x80000000) {
-00084     i = utf32 & 0x3f;
-00085     utf8[5] = 0x80 | i;
-00086     utf32 >>= 6;
-00087 
-00088     i = utf32 & 0x3f;
-00089     utf8[4] = 0x80 | i;
-00090     utf32 >>= 6;
-00091 
-00092     i = utf32 & 0x3f;
-00093     utf8[3] = 0x80 | i;
-00094     utf32 >>= 6;
-00095 
-00096     i = utf32 & 0x3f;
-00097     utf8[2] = 0x80 | i;
-00098     utf32 >>= 6;
-00099 
-00100     i = utf32 & 0x3f;
-00101     utf8[1] = 0x80 | i;
-00102     utf32 >>= 6;
-00103    
-00104     i = utf32 & 0x01;
-00105     utf8[0] = 0xfc | i;
-00106   }
-00107   return utf8;
-00108 }
-00109 
-00114 unsigned long UTF8to32 (unsigned char * utf8) {
-00115 
-00116   unsigned char i = utf8[0];
-00117   unsigned char count;
-00118   unsigned long utf32 = 0;
-00119 
-00120   for (count = 0; i & 0x80; count++) i <<= 1;
-00121   if (!count) {
-00122     return utf8[0];
-00123   }
-00124   else if (count == 1) {
-00125     return 0xffff;
-00126   }
-00127   else {
-00128     count--;
-00129     utf32 = i >> count;
-00130     for (i = 1; i <= count; i++) {
-00131       if (0xc0 & utf8[i] != 0x80) {
-00132         return  0xffff;
-00133       }
-00134       utf32 <<= 6;
-00135       utf32 |= (utf8[i] & 0x3f);
-00136     }
-00137   }
-00138   return utf32;
-00139 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swunicod_8h-source.html b/doc/api-documentation/html/swunicod_8h-source.html deleted file mode 100644 index ebc5c9e..0000000 --- a/doc/api-documentation/html/swunicod_8h-source.html +++ /dev/null @@ -1,42 +0,0 @@ - - -swunicod.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swunicod.h

00001 /*
-00002  *
-00003  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00004  *      CrossWire Bible Society
-00005  *      P. O. Box 2528
-00006  *      Tempe, AZ  85280-2528
-00007  *
-00008  * This program is free software; you can redistribute it and/or modify it
-00009  * under the terms of the GNU General Public License as published by the
-00010  * Free Software Foundation version 2.
-00011  *
-00012  * This program is distributed in the hope that it will be useful, but
-00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00015  * General Public License for more details.
-00016  *
-00017  */
-00018 
-00019 
-00020 #ifndef SWUNICOD_H
-00021 #define SWUNICOD_H
-00022 
-00028 unsigned char* UTF32to8 (unsigned long utf32, unsigned char * utf8);
-00029 
-00030 
-00036 unsigned long UTF8to32 (unsigned char * utf8, unsigned long utf32);
-00037 
-00038 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swversion_8cpp-source.html b/doc/api-documentation/html/swversion_8cpp-source.html deleted file mode 100644 index 4ea0794..0000000 --- a/doc/api-documentation/html/swversion_8cpp-source.html +++ /dev/null @@ -1,92 +0,0 @@ - - -swversion.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swversion.cpp

00001 #include <swversion.h>
-00002 #include <string.h>
-00003 #include <stdio.h>
-00004 #include <stdlib.h>
-00005 
-00006 
-00007 SWVersion SWVersion::currentVersion(SWORDVER);
-00008 
-00009 /******************************************************************************
-00010  * SWVersion c-tor - Constructs a new SWVersion
-00011  *
-00012  * ENT: version - const version string
-00013  */
-00014 
-00015 SWVersion::SWVersion(const char *version) {
-00016         char *buf = new char[ strlen(version) + 1 ];
-00017         char *tok;
-00018         major = minor = minor2 = minor3 = -1;
-00019                 
-00020         strcpy(buf, version);
-00021         tok = strtok(buf, ".");
-00022         if (tok)
-00023                 major = atoi(tok);
-00024         tok = strtok(0, ".");
-00025         if (tok)
-00026                 minor = atoi(tok);
-00027         tok = strtok(0, ".");
-00028         if (tok)
-00029                 minor2 = atoi(tok);
-00030         tok = strtok(0, ".");
-00031         if (tok)
-00032                 minor3 = atoi(tok);
-00033         delete [] buf;
-00034 }
-00035 
-00036 
-00037 /******************************************************************************
-00038  * compare - compares this version to another version
-00039  *
-00040  * ENT: vi      - other version with which to compare
-00041  *
-00042  * RET: = 0 if equal;
-00043  *              < 0 if this version is less than other version;
-00044  *              > 0 if this version is greater than other version
-00045  */
-00046 
-00047 int SWVersion::compare(const SWVersion &vi) const {
-00048         if (major == vi.major)
-00049                 if (minor == vi.minor)
-00050                         if (minor2 == vi.minor2)
-00051                                 if (minor3 == vi.minor3)
-00052                                         return 0;
-00053                                 else return minor3 - vi.minor3;
-00054                         else    return minor2 - vi.minor2;
-00055                 else    return minor - vi.minor;
-00056         else    return major - vi.major;
-00057 }
-00058 
-00059 
-00060 SWVersion::operator const char *() const {
-00061 
-00062         // 255 is safe because there is no way 4 integers (plus 3 '.'s) can have
-00063         // a string representation that will overrun this buffer
-00064         static char buf[255];
-00065 
-00066         if (minor > -1) {
-00067                 if (minor2 > -1) {
-00068                         if (minor3 > -1) {
-00069                                 sprintf(buf, "%d.%d.%d.%d", major, minor, minor2, minor3);
-00070                         }
-00071                         else    sprintf(buf, "%d.%d.%d", major, minor, minor2);
-00072                 }
-00073                 else    sprintf(buf, "%d.%d", major, minor);
-00074         }
-00075         else    sprintf(buf, "%d", major);
-00076 
-00077         return buf;
-00078 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swversion_8h-source.html b/doc/api-documentation/html/swversion_8h-source.html deleted file mode 100644 index ec751f7..0000000 --- a/doc/api-documentation/html/swversion_8h-source.html +++ /dev/null @@ -1,59 +0,0 @@ - - -swversion.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swversion.h

00001 /******************************************************************************
-00002  *  swversion.h   - definition of class SWVersion used to compare version info
-00003  *
-00004  * $Id: swversion_8h-source.html,v 1.5 2002/06/20 20:23:10 mgruner Exp $
-00005  *
-00006  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00007  *      CrossWire Bible Society
-00008  *      P. O. Box 2528
-00009  *      Tempe, AZ  85280-2528
-00010  *
-00011  * This program is free software; you can redistribute it and/or modify it
-00012  * under the terms of the GNU General Public License as published by the
-00013  * Free Software Foundation version 2.
-00014  *
-00015  * This program is distributed in the hope that it will be useful, but
-00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00018  * General Public License for more details.
-00019  *
-00020  */
-00021 
-00022 #ifndef SWORDVER
-00023 #define SWORDVER "1.5.3"
-00024 #endif
-00025 
-00026 #ifndef SWVERSION_H
-00027 #define SWVERSION_H
-00028 
-00029 class SWVersion {
-00030         public:
-00031         int major, minor, minor2, minor3;
-00032         
-00033         SWVersion(const char *version = "0.0");
-00034         int compare(const SWVersion &vi) const;
-00035         operator const char *() const;
-00036         bool operator>(const SWVersion &vi) const {return (compare(vi) > 0);}
-00037         bool operator<(const SWVersion &vi) const {return (compare(vi) < 0);}
-00038         bool operator==(const SWVersion &vi) const {return (compare(vi) == 0);}
-00039 
-00040         // current sword library version
-00041         static SWVersion currentVersion;
-00042 };
-00043 
-00044 #endif
-00045 
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/swwinlog_8h-source.html b/doc/api-documentation/html/swwinlog_8h-source.html deleted file mode 100644 index 678d80f..0000000 --- a/doc/api-documentation/html/swwinlog_8h-source.html +++ /dev/null @@ -1,56 +0,0 @@ - - -swwinlog.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

swwinlog.h

00001 /******************************************************************************
-00002  *  swwinlog.h   - definition of SWWinLog-- a derivitive of SWLog used to
-00003  *                      handle logging in the MSWindows environment
-00004  *
-00005  * $Id: swwinlog_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 //---------------------------------------------------------------------------
-00024 #ifndef swwinlogH
-00025 #define swwinlogH
-00026 //---------------------------------------------------------------------------
-00027 
-00028 #include <swlog.h>
-00029 
-00030 class SWWinLog:public SWLog
-00031 {
-00032   HWND parent;
-00033 public:
-00034     SWWinLog (HWND iparent);
-00035   virtual void LogWarning (char *fmt, ...);
-00036   virtual void LogError (char *fmt, ...);
-00037   virtual void LogTimedInformation (char *fmt, ...);
-00038   virtual void LogInformation (char *fmt, ...);
-00039 };
-00040 
-00041 
-00042 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/sysdata_8h-source.html b/doc/api-documentation/html/sysdata_8h-source.html deleted file mode 100644 index 62f4c93..0000000 --- a/doc/api-documentation/html/sysdata_8h-source.html +++ /dev/null @@ -1,90 +0,0 @@ - - -sysdata.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

sysdata.h

00001 #ifndef SIZEDTYPES_H
-00002 #define SIZEDTYPES_H
-00003 /*
-00004  * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
-00005  * header files exported to user space
-00006  */
-00007 #ifdef USE_AUTOTOOLS
-00008 #include "config.h"
-00009 #endif
-00010 
-00011 typedef signed char __s8;
-00012 typedef unsigned char __u8;
-00013 
-00014 typedef signed short __s16;
-00015 typedef unsigned short __u16;
-00016 
-00017 typedef signed int __s32;
-00018 typedef unsigned int __u32;
-00019 
-00020 #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
-00021 //typedef __signed__ long long __s64;
-00022 //typedef unsigned long long __u64;
-00023 #endif
-00024 
-00025 
-00026 #define __swap16(x) \
-00027         ((__u16)( \
-00028                 (((__u16)(x) & (__u16)0x00ffU) << 8) | \
-00029                 (((__u16)(x) & (__u16)0xff00U) >> 8) ))
-00030 
-00031                 
-00032 #define __swap32(x) \
-00033         ((__u32)( \
-00034                 (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
-00035                 (((__u32)(x) & (__u32)0x0000ff00UL) <<  8) | \
-00036                 (((__u32)(x) & (__u32)0x00ff0000UL) >>  8) | \
-00037                 (((__u32)(x) & (__u32)0xff000000UL) >> 24) ))
-00038 
-00039                 
-00040 #define __swap64(x) \
-00041         ((__u64)( \
-00042                 (__u64)(((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \
-00043                 (__u64)(((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \
-00044                 (__u64)(((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \
-00045                 (__u64)(((__u64)(x) & (__u64)0x00000000ff000000ULL) <<  8) | \
-00046                    (__u64)(((__u64)(x) & (__u64)0x000000ff00000000ULL) >>  8) | \
-00047                 (__u64)(((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) | \
-00048                 (__u64)(((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | \
-00049                 (__u64)(((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56) ))
-00050                 
-00051 
-00052 
-00053 
-00054 #ifndef WORDS_BIGENDIAN
-00055 
-00056 #define swordtoarch16(x) (x)
-00057 #define swordtoarch32(x) (x)
-00058 #define swordtoarch64(x) (x)
-00059 #define archtosword16(x) (x)
-00060 #define archtosword32(x) (x)
-00061 #define archtosword64(x) (x)
-00062 
-00063 #else 
-00064 
-00065 #define swordtoarch16(x) __swap16(x)
-00066 #define swordtoarch32(x) __swap32(x)
-00067 #define swordtoarch64(x) __swap64(x)
-00068 #define archtosword16(x) __swap16(x)
-00069 #define archtosword32(x) __swap32(x)
-00070 #define archtosword64(x) __swap64(x)
-00071 
-00072 
-00073 #endif
-00074 
-00075 
-00076 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/tbdisp_8h-source.html b/doc/api-documentation/html/tbdisp_8h-source.html deleted file mode 100644 index 703e11e..0000000 --- a/doc/api-documentation/html/tbdisp_8h-source.html +++ /dev/null @@ -1,53 +0,0 @@ - - -tbdisp.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

tbdisp.h

00001 /******************************************************************************
-00002  *  tbdisp.cpp  - code for class 'tbdisp'.  tbdisp writes module output to a
-00003  *                      MSWindows TextBox (or any other control that takes a
-00004  *                      SetDialogItemText
-00005  *
-00006  * $Id: tbdisp_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00007  *
-00008  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00009  *      CrossWire Bible Society
-00010  *      P. O. Box 2528
-00011  *      Tempe, AZ  85280-2528
-00012  *
-00013  * This program is free software; you can redistribute it and/or modify it
-00014  * under the terms of the GNU General Public License as published by the
-00015  * Free Software Foundation version 2.
-00016  *
-00017  * This program is distributed in the hope that it will be useful, but
-00018  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00020  * General Public License for more details.
-00021  *
-00022  */
-00023 
-00024 #ifndef TBDISP_H
-00025 #define TBDISP_H
-00026 
-00027 #include <windows.h>
-00028 class SWModule;
-00029 
-00030 class TBDisp:public SWDisplay
-00031 {
-00032 protected:
-00033   HWND wnd;
-00034   int ctrlid;
-00035 public:
-00036     TBDisp (HWND iwnd, int ictrlid);
-00037   virtual char Display (SWModule & imodule);
-00038 };
-00039 #endif
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/texts_2rawtext_2rtfidx_8cpp-source.html b/doc/api-documentation/html/texts_2rawtext_2rtfidx_8cpp-source.html deleted file mode 100644 index c41c858..0000000 --- a/doc/api-documentation/html/texts_2rawtext_2rtfidx_8cpp-source.html +++ /dev/null @@ -1,178 +0,0 @@ - - -rtfidx.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rtfidx.cpp

00001 #include <stdio.h>
-00002 #include <fcntl.h>
-00003 #include <versekey.h>
-00004 
-00005 
-00006 char findbreak(int fp, int *offset, int *num1, int *num2, short *size);
-00007 
-00008 
-00009 main(int argc, char **argv)
-00010 {
-00011         int fp, vfp, cfp, bfp;
-00012         long pos;
-00013         short size, tmp;
-00014         int num1, num2, offset, curbook = 0, curchap = 0, curverse = 0;
-00015         char buf[127];
-00016         VerseKey mykey;
-00017 
-00018         if ((argc < 2) || (argc > 3)) {
-00019                 fprintf(stderr, "usage: %s <file to process> [nt]\n", argv[0]);
-00020                 exit(1);
-00021         }
-00022 
-00023         if ((fp = open(argv[1], O_RDONLY)) == -1) {
-00024                 fprintf(stderr, "Couldn't open file: %s\n", argv[1]);
-00025                 exit(1);
-00026         }
-00027 
-00028         sprintf(buf, "%s.vss", argv[1]);
-00029         if ((vfp = open(buf, O_CREAT|O_WRONLY)) == -1) {
-00030                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00031                 exit(1);
-00032         }
-00033 
-00034         sprintf(buf, "%s.cps", argv[1]);
-00035         if ((cfp = open(buf, O_CREAT|O_WRONLY)) == -1) {
-00036                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00037                 exit(1);
-00038         }
-00039 
-00040         sprintf(buf, "%s.bks", argv[1]);
-00041         if ((bfp = open(buf, O_CREAT|O_WRONLY)) == -1) {
-00042                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00043                 exit(1);
-00044         }
-00045 
-00046         pos  = 0;
-00047         write(bfp, &pos, 4);  /* Book    offset for testament intros */
-00048         pos = 4;
-00049         write(cfp, &pos, 4);  /* Chapter offset for testament intro */
-00050 
-00051 
-00052 /*      Right now just zero out intros until parsing correctly */
-00053         pos = 0;
-00054         size = 0;
-00055         write(vfp, &pos, 4);  /* Module intro */
-00056         write(vfp, &size, 2);
-00057         write(vfp, &pos, 4);  /* Testament intro */
-00058         write(vfp, &size, 2);
-00059 
-00060         mykey = (argc == 3) ? "Matthew 1:1" : "Genesis 1:1";
-00061 
-00062         while (!findbreak(fp, &offset, &num1, &num2, &size)) {
-00063                 num1 = mykey.Chapter();
-00064                 num2 = mykey.Verse();
-00065                 if (num2 == 1) {                /* if we're at a new chapter */
-00066                         if (num1 == 1) {        /* if we're at a new book */
-00067                                 pos = lseek(cfp, 0, SEEK_CUR);
-00068                                 write(bfp, &pos, 4);
-00069                                 pos = lseek(vfp, 0, SEEK_CUR); /* Book intro (cps) */
-00070                                 write(cfp, &pos, 4);
-00071                                 pos  = 0;
-00072                                 tmp = 0;
-00073                                 write(vfp, &pos, 4);  /* Book intro (vss) */
-00074                                 write(vfp, &tmp, 2);
-00075                                 curbook++;
-00076                                 curchap = 0;
-00077                         }
-00078                         pos = lseek(vfp, 0, SEEK_CUR);
-00079                         write(cfp, &pos, 4);
-00080                         curverse = 1;
-00081                         pos  = 0;
-00082                         tmp = 0;
-00083                         write(vfp, &pos, 4);  /* Chapter intro */
-00084                         write(vfp, &tmp, 2);
-00085                         curchap++;
-00086                 }
-00087                 else curverse++;
-00088         
-00089                 printf("%2d:%3d:%3d found at offset: %7d\n", curbook, num1, num2, offset);
-00090 
-00091                 if (num1 != curchap) {
-00092                         fprintf(stderr, "Error: Found chaptures out of sequence\n");
-00093                         break;
-00094                 }
-00095                 if (num2 != curverse) {
-00096                         fprintf(stderr, "Error: Found verses out of sequence\n");
-00097                         break;
-00098                 }
-00099                 write(vfp, &offset, 4);
-00100                 write(vfp, &size, 2);
-00101                 mykey++;
-00102         }
-00103         
-00104         close(vfp);
-00105         close(cfp);
-00106         close(bfp);
-00107         close(fp);
-00108 }
-00109 
-00110 
-00111 char findbreak(int fp, int *offset, int *num1, int *num2, short *size)
-00112 {
-00113         char buf[17];
-00114         char buf2[7];
-00115         char loop;
-00116         char offadj, inquotes, sizeadj;
-00117         int offset2, ch2, vs2;
-00118         
-00119         memset(buf, ' ', 17);
-00120 
-00121         while (1) {
-00122                 offadj = -10;
-00123                 inquotes = 0;
-00124                 sizeadj = 0;
-00125                 if (!memcmp(&buf[1], "\\f0\\fs16\\cf2\\up6", 15)) {
-00126                         offadj = 0;
-00127                         inquotes = 1;
-00128                         sizeadj = (*buf == 10) ? -19:-17;
-00129                 }
-00130                 if (!memcmp(buf, "\\fi200\\widctlpar", 16)) {
-00131                         offadj = -1;
-00132 //                      inquotes = 1;
-00133                         sizeadj = -18;
-00134                 }
-00135                 if (offadj > -10) {
-00136                         *offset = lseek(fp, 0, SEEK_CUR) + offadj;
-00137                         if (size) {
-00138                                 (*offset)++;
-00139                                 while (inquotes) {
-00140                                         while (read(fp, buf2, 1) == 1) {
-00141                                                 if (*buf2 == '}')
-00142                                                         break;
-00143                                                 (*offset)++;
-00144                                         }
-00145                                         inquotes--;
-00146                                 }
-00147                                 if (findbreak(fp, &offset2, &ch2, &vs2, 0)) {
-00148                                         *size = (short) (lseek(fp, 0, SEEK_END) - (*offset));
-00149                                 }
-00150                                 else {
-00151                                         sprintf(buf2, "%d:%d", ch2, vs2);
-00152                                         *size = (offset2 - (*offset));
-00153                                 }
-00154                                 lseek(fp, *offset+17, SEEK_SET);
-00155                         }
-00156                         else (*offset) += sizeadj;
-00157                         return 0;
-00158                 }
-00159                 memmove(buf, &buf[1], 16);
-00160                 if (read(fp, &buf[16], 1) != 1)
-00161                         return 1;
-00162         }
-00163 }
-00164 
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/texts_2ztext_2rawtxt2z_8cpp-source.html b/doc/api-documentation/html/texts_2ztext_2rawtxt2z_8cpp-source.html deleted file mode 100644 index 824b8e4..0000000 --- a/doc/api-documentation/html/texts_2ztext_2rawtxt2z_8cpp-source.html +++ /dev/null @@ -1,471 +0,0 @@ - - -rawtxt2z.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

rawtxt2z.cpp

00001 // Compression on variable granularity
-00002 
-00003 #include <fcntl.h>
-00004 #include <iostream>
-00005 #include <fstream>
-00006 #include <string>
-00007 
-00008 #ifndef __GNUC__
-00009 #include <io.h>
-00010 #else
-00011 #include <unistd.h>
-00012 #endif
-00013 
-00014 #include <zlib.h>
-00015 #include <versekey.h>
-00016 
-00017 int iBufSize, ulBuffNum;
-00018 ofstream cfile;
-00019 ofstream cfile2;
-00020 
-00021 int ofd[2], oxfd[2], ovxfd[2];
-00022 int ifd[2], ixfd[2];
-00023 int itestfd[2], itestxfd[2];
-00024 unsigned long ulIOff=0, ulCOff=0, ulFOff=0, ulNone=0;
-00025 string currbuff="";
-00026 
-00027 
-00028 int openreadfile(char *buffer, char *path, const char *filename)
-00029 {
-00030         int filenum;
-00031         sprintf(buffer, "%s/%s", path, filename);
-00032         cfile << buffer << "\n";
-00033         filenum =  open(buffer, O_RDONLY|O_BINARY);
-00034         if (filenum > 0)
-00035         {
-00036                 return filenum;
-00037         }
-00038         else
-00039         {
-00040                 cerr << "failed to open file to read\n";
-00041                 exit(-1);
-00042         }
-00043 }
-00044 
-00045 int openwritefile(char *buffer, char *path, const char *filename)
-00046 {
-00047         int filenum;
-00048         sprintf(buffer, "%s/%s", path, filename);
-00049         cfile << buffer << "\n";
-00050         filenum =  open(buffer, O_WRONLY|O_BINARY|O_CREAT|O_TRUNC);
-00051         if (filenum > 0)
-00052         {
-00053                 return filenum;
-00054         }
-00055         else
-00056         {
-00057                 cerr << "failed to open file to read\n";
-00058                 exit(-1);
-00059         }
-00060 }
-00061 
-00062 int bytebound(unsigned long offset, VerseKey &thekey)
-00063 {
-00064         unsigned long bufferoff;
-00065         cfile << "byteboundtest " << thekey << "\n";
-00066         bufferoff = iBufSize * (ulBuffNum+1);
-00067         if (offset > bufferoff)
-00068         {
-00069                 return 1;
-00070         }
-00071         else
-00072         {
-00073                 return 0;
-00074         }
-00075 }
-00076 
-00077 int versebound(unsigned long offset, VerseKey &thekey)
-00078 {
-00079         cfile << "verseboundtest " << thekey << "\n";
-00080         return 1;
-00081 }
-00082 
-00083 int chapterbound(unsigned long offset, VerseKey &thekey)
-00084 {
-00085         VerseKey testkey;
-00086         testkey = thekey;
-00087         testkey++;
-00088         //cfile << "chapterboundtest " << testkey;
-00089         if (testkey.Verse()==1 || (!thekey.compare("Revelation of John 22:21")))
-00090         {
-00091                 //cfile << " 1\n";
-00092                 return 1;
-00093         }
-00094         else
-00095         {
-00096                 //cfile << " 0\n";
-00097                 return 0;
-00098         }
-00099 }
-00100 
-00101 int bookbound(unsigned long offset, VerseKey &thekey)
-00102 {
-00103         VerseKey testkey;
-00104         testkey = thekey;
-00105         cfile << "bookboundtest " << testkey << "\n";
-00106         testkey++;
-00107         if (testkey.Chapter()==1 || (!thekey.compare("Revelation of John 22:21")))
-00108         {
-00109                 return 1;
-00110         }
-00111         else
-00112         {
-00113                 return 0;
-00114         }
-00115 }
-00116 
-00117 
-00118 typedef int (*boundfunc)(unsigned long offset, VerseKey &thekey);
-00119 
-00120 int writeblock(int i)
-00121 {
-00122         char *destbuff=NULL;
-00123         unsigned long compsize = 0, buffsize=0;
-00124 
-00125         cfile << "compressing block\n";
-00126         // compress current buffer
-00127         buffsize = currbuff.length();
-00128         write(itestfd[i], currbuff.c_str(), buffsize);
-00129         compsize = (unsigned long) (buffsize*1.01)+20;  // at least 1% bigger than buffer + 12 bytes
-00130         //cfile << "{" << compsize << "}";
-00131         //destbuff = (char *) calloc(compsize + 1, 1);
-00132         destbuff = new char[compsize];
-00133         if (compress((Bytef*)destbuff, &compsize, (const Bytef*)currbuff.c_str(), buffsize)!=Z_OK)
-00134         {
-00135                 cerr << "Could not compress buffer: exiting\n";
-00136                 delete[] destbuff;
-00137                 exit(-1);
-00138         }
-00139         //cout << "Compressed buffer{" << compsize << "}\n" << destbuff << "\n";
-00140         //cout.flush();
-00141         // write to compressed file index
-00142         ulCOff = lseek(ofd[i], 0, SEEK_END);
-00143         write(oxfd[i], &ulCOff, 4);    // offset in compressed file
-00144         write(oxfd[i], &compsize, 4);    // compressed size
-00145         write(oxfd[i], &buffsize, 4);    // uncompressed size
-00146         cfile << buffsize << " -> " << compsize << "\n";
-00147         cfile2 << "Compressed{" << compsize << "}\n" << destbuff << "\n";
-00148         cfile2.flush();
-00149 
-00150         //write compressed buffer to file
-00151         write(ofd[i], destbuff, compsize);
-00152 
-00153         //free(destbuff);
-00154         delete[] destbuff;
-00155 
-00156         currbuff = "";
-00157         ulBuffNum++;
-00158         ulIOff = 0;
-00159         return 1;
-00160 }
-00161 
-00162 
-00163 
-00164 int main(int argc, char **argv)
-00165 {
-00166         VerseKey key1, key2, key3;
-00167         int i;
-00168         char xbuff[64];
-00169         unsigned long offset;
-00170         unsigned short size=0;
-00171         unsigned long ulsize=0;
-00172         char *tmpbuf=NULL;
-00173         int iType;
-00174         boundfunc blockbound[4] = {bytebound, versebound, chapterbound, bookbound};
-00175         bool newbook=true, newchapter=true, newtestament = true, newmodule = true, lasttodo=true;
-00176 
-00177         if ((argc < 2) || (argc > 4)) {
-00178                 cerr << "usage: " << argv[0] << " datapath [compression type [buffer size]]\n";
-00179                 exit(1);
-00180         }
-00181 
-00182         if (argc>2)
-00183         {
-00184                 iType = atoi(argv[2]);
-00185                 if (argc==4)
-00186                 {
-00187                         iBufSize = atoi(argv[3]);
-00188                 }
-00189                 else
-00190                 {
-00191                         iBufSize = 1;
-00192                 }
-00193         }
-00194         else
-00195         {
-00196                 iType = 2;
-00197                 iBufSize = 1;
-00198         }
-00199 
-00200         cfile.open("raw2z.log", ios::out);
-00201         if (!cfile.is_open())
-00202         {
-00203                 cerr << "Failed to open log file\n";
-00204                 exit(-1);
-00205         }
-00206         cfile2.open("raw2z.lg2", ios::out);
-00207         if (!cfile2.is_open())
-00208         {
-00209                 cerr << "Failed to open log file\n";
-00210                 exit(-1);
-00211         }
-00212         cfile << iType << " " << iBufSize << "\n";
-00213 
-00214         if ((iType<=0) || (iType > 4) || !iBufSize || !strcmp(argv[1], "-h") || !strcmp(argv[1], "--help") || !strcmp(argv[1], "/?") || !strcmp(argv[1], "-help"))
-00215         {
-00216                 cfile << argv[0] << " - a tool to create compressed Sword modules\n";
-00217                 cfile << "version 0.1\n\n";
-00218                 cfile << "usage: "<< argv[0] << " datapath [compression type [buffer size]]\n\n";
-00219                 cfile << "datapath: the directory in which to find the raw module\n";
-00220                 cfile << "compression type: (default 2)\n" << "   1 - bytes\n" << "   2 - verses\n" << "   3 - chapters\n" << "   4 - books\n";
-00221                 cfile << "buffer size (default 1): the number of the compression type in each block\n";
-00222                 exit(1);
-00223         }
-00224 
-00225         //zobj = new SWCompress();
-00226         //rawdrv = new RawVerse(argv[1]);
-00227 
-00228 #ifndef O_BINARY
-00229 #define O_BINARY 0
-00230 #endif
-00231         cfile << "opening files\n";
-00232 
-00233         tmpbuf = new char [ strlen(argv[1]) + 11 ];
-00234 
-00235         //original files
-00236         ifd[0] = openreadfile(tmpbuf, argv[1], "ot");
-00237         ixfd[0] = openreadfile(tmpbuf, argv[1], "ot.vss");
-00238         ifd[1] = openreadfile(tmpbuf, argv[1], "nt");
-00239         ixfd[1] = openreadfile(tmpbuf, argv[1], "nt.vss");
-00240 
-00241 switch ( iType) {
-00242         case 1 :
-00243                 ofd[0] = openwritefile(tmpbuf, argv[1], "ot.rzz");
-00244                 oxfd[0] = openwritefile(tmpbuf, argv[1], "ot.rzs");
-00245                 ovxfd[0] = openwritefile(tmpbuf, argv[1], "ot.rzv");
-00246                 ofd[1] = openwritefile(tmpbuf, argv[1], "nt.rzz");
-00247                 oxfd[1] = openwritefile(tmpbuf, argv[1], "nt.rzs");
-00248                 ovxfd[1] = openwritefile(tmpbuf, argv[1], "nt.rzv");
-00249                 //boundfunc = bytebound;
-00250                 break;
-00251         case 2 :
-00252                 ofd[0] = openwritefile(tmpbuf, argv[1], "ot.vzz");
-00253                 oxfd[0] = openwritefile(tmpbuf, argv[1], "ot.vzs");
-00254                 ovxfd[0] = openwritefile(tmpbuf, argv[1], "ot.vzv");
-00255                 ofd[1] = openwritefile(tmpbuf, argv[1], "nt.vzz");
-00256                 oxfd[1] = openwritefile(tmpbuf, argv[1], "nt.vzs");
-00257                 ovxfd[1] = openwritefile(tmpbuf, argv[1], "nt.vzv");
-00258                 break;
-00259         case 3 :
-00260                 ofd[0] = openwritefile(tmpbuf, argv[1], "ot.czz");
-00261                 oxfd[0] = openwritefile(tmpbuf, argv[1], "ot.czs");
-00262                 ovxfd[0] = openwritefile(tmpbuf, argv[1], "ot.czv");
-00263                 ofd[1] = openwritefile(tmpbuf, argv[1], "nt.czz");
-00264                 oxfd[1] = openwritefile(tmpbuf, argv[1], "nt.czs");
-00265                 ovxfd[1] = openwritefile(tmpbuf, argv[1], "nt.czv");
-00266                 break;
-00267         case 4 :
-00268                 ofd[0] = openwritefile(tmpbuf, argv[1], "ot.bzz");
-00269                 oxfd[0] = openwritefile(tmpbuf, argv[1], "ot.bzs");
-00270                 ovxfd[0] = openwritefile(tmpbuf, argv[1], "ot.bzv");
-00271                 ofd[1] = openwritefile(tmpbuf, argv[1], "nt.bzz");
-00272                 oxfd[1] = openwritefile(tmpbuf, argv[1], "nt.bzs");
-00273                 ovxfd[1] = openwritefile(tmpbuf, argv[1], "nt.bzv");
-00274                 break;
-00275         default:
-00276                 cerr << "Unknown compression type\n";
-00277                 exit(-1);
-00278 }
-00279         itestfd[0] = openwritefile(tmpbuf, argv[1], "ot.tst");
-00280         itestfd[1] = openwritefile(tmpbuf, argv[1], "nt.tst");
-00281         itestxfd[0] = openwritefile(tmpbuf, argv[1], "ot.tdx");
-00282         itestxfd[1] = openwritefile(tmpbuf, argv[1], "nt.tdx");
-00283 
-00284 
-00285         delete [] tmpbuf;
-00286 
-00287         //cfile << "about to start\n";
-00288 
-00289 for ( i=0; i<2; i++)
-00290 {
-00291         ulIOff=0, ulBuffNum=0;
-00292         currbuff = "";
-00293         key1 = (i == 1) ? "Matthew 1:1" : "Genesis 1:1";
-00294         key2 = key3 = key1;
-00295         newtestament = true;
-00296 
-00297         cfile << "key: " << key1 << " Testament {" << key1.Testament()-1 << "}\n";
-00298         //cfile << "Chapter {" << key.Chapter() << "}\n";
-00299         //cfile << "Verse {" << key.Verse() << "}\n";
-00300         //cfile << key.compare("Revelation of John 22:21") << "\n";
-00301         //cfile << key.compare("Genesis 1:1") << "\n";
-00302         do
-00303         {
-00304                 //cfile << "ok";
-00305                 // read current verse offset
-00306                 if (read(ixfd[i], &offset, 4) != 4)
-00307                 {
-00308                         cfile << "Failed to read input verse offsets?\n";
-00309                         break;
-00310                 }
-00311                 if (read(ixfd[i], &size, 2) != 2)
-00312                 {
-00313                         cfile << "Failed to read input verse sizes?\n";
-00314                         break;
-00315                 }
-00316                 cfile << "key:" << key1 << " offset:" << offset << " size:" << size << "\n";
-00317                 sprintf(xbuff, "key{%s} offset{%ld} size{%d}\n", (const char *)key1, offset, size);
-00318                 write(itestxfd[i], &xbuff, strlen(xbuff));
-00319                 ulsize = size;
-00320                 if (!offset && !size)
-00321                 {
-00322                         //Check for module header
-00323                         if (read(ixfd[i], &ulIOff, 4) != 4)
-00324                         {
-00325                                 cfile << "Failed to read input verse offsets?\n";
-00326                                 break;
-00327                         }
-00328                         ulsize = ulIOff;
-00329                         ulIOff = 0;
-00330                         lseek(ixfd[i], 6, SEEK_SET);
-00331                 }
-00332 
-00333                 if (ulsize)
-00334                 {
-00335                         // read current verse and add to current buffer
-00336                         tmpbuf = (char *) calloc(ulsize + 1, 1);
-00337                         lseek(ifd[i], offset, SEEK_SET);
-00338                         read(ifd[i], tmpbuf, ulsize);
-00339                         currbuff += tmpbuf;
-00340                         //cfile << currbuff << "\n";
-00341 
-00342                         // write to verse index into compressed
-00343                         write(ovxfd[i], &ulBuffNum, 4);    // current buffer number
-00344                         write(ovxfd[i], &ulIOff, 4);    // offset within the buffer
-00345                         write(ovxfd[i], &size, 2);    // verse size
-00346 
-00347                         ulFOff = lseek(ofd[i], 0, SEEK_CUR) + size;
-00348                         if (key1.compare("Revelation of John 22:21")!=-1)
-00349                         {
-00350                                 lasttodo = false;
-00351                         }
-00352                         if (blockbound[iType-1](ulFOff, key1)/*at block boudary*/)
-00353                         {
-00354                                 writeblock(i);
-00355                                 /*
-00356                                 cfile << "compressing block\n";
-00357                                 // compress current buffer
-00358                                 buffsize = currbuff.length();
-00359                                 write(itestfd[i], currbuff.c_str(), buffsize);
-00360                                 compsize = (unsigned long) (buffsize*1.01)+20;  // at least 1% bigger than buffer + 12 bytes
-00361                                 //cfile << "{" << compsize << "}";
-00362                                 //destbuff = (char *) calloc(compsize + 1, 1);
-00363                                 destbuff = new char[compsize];
-00364                                 if (compress((Bytef*)destbuff, &compsize, (const Bytef*)currbuff.c_str(), buffsize)!=Z_OK)
-00365                                 {
-00366                                         cerr << "Could not compress buffer: exiting\n";
-00367                                         delete[] destbuff;
-00368                                         exit(-1);
-00369                                 }
-00370                                 //cout << "Compressed buffer{" << compsize << "}\n" << destbuff << "\n";
-00371                                 //cout.flush();
-00372                                 // write to compressed file index
-00373                                 ulCOff = lseek(ofd[i], 0, SEEK_END);
-00374                                 write(oxfd[i], &ulCOff, 4);    // offset in compressed file
-00375                                 write(oxfd[i], &compsize, 4);    // compressed size
-00376                                 write(oxfd[i], &buffsize, 4);    // uncompressed size
-00377                                 cfile << buffsize << " -> " << compsize << "\n";
-00378                                 cfile2 << "Compressed{" << compsize << "}\n" << destbuff << "\n";
-00379                                 cfile2.flush();
-00380 
-00381                                 //write compressed buffer to file
-00382                                 write(ofd[i], destbuff, compsize);
-00383 
-00384                                 //free(destbuff);
-00385                                 delete[] destbuff;
-00386 
-00387                                 currbuff = "";
-00388                                 ulBuffNum++;
-00389                                 ulIOff = 0;
-00390                                 */
-00391                         }
-00392                         else
-00393                         {
-00394                                 ulIOff += ulsize;
-00395                         }
-00396                         free(tmpbuf);
-00397 
-00398                         if (newmodule)
-00399                         {
-00400                                 newmodule = false;
-00401                                 cfile << "had a new module " << (const char *) key1 << "{" << offset << "}\n";
-00402                                 writeblock(i);
-00403                         }
-00404                         else if (newtestament)
-00405                         {
-00406                                 newtestament = false;
-00407                                 cfile << "had a new testament " << (const char *) key1 << "{" << offset << "}\n";
-00408                         }
-00409                         else if (newbook)
-00410                         {
-00411                                 newbook = false;
-00412                                 cfile << "had a new book " << (const char *) key1 << "{" << offset << "}\n";
-00413                         }
-00414                         else if (newchapter)
-00415                         {
-00416                                 newchapter = false;
-00417                                 cfile << "had a new chapter " << (const char *) key1 << "{" << offset << "}\n";
-00418                         }
-00419                         else
-00420                         {
-00421                                 key1++;
-00422                         }
-00423 
-00424                         if (key1.Chapter()!=key2.Chapter() || (key1.Book()!=key2.Book()))
-00425                         {
-00426                                 newchapter = true;
-00427                                 cfile << "got a new chapter " << (const char *) key1 << "\n";
-00428                         }
-00429                         if (key1.Book()!=key2.Book())
-00430                         {
-00431                                 newbook = true;
-00432                                 cfile << "got a new book " << (const char *) key1 << "\n";
-00433                         }
-00434                         key2 = key1;
-00435 
-00436                 }
-00437                 else
-00438                 {
-00439                         cfile << "empty offset\n";
-00440                         // write to verse index into compressed
-00441                         write(ovxfd[i], &ulNone, 4);    // current buffer number
-00442                         write(ovxfd[i], &size, 2);    // verse size
-00443                         write(ovxfd[i], &ulNone, 4);    // offset within the buffer
-00444                 }
-00445         }
-00446         while ( (key1.Testament()==i+1) && ((key1.compare("Revelation of John 22:21")==-1) || (lasttodo)));
-00447 
-00448         close(ifd[i]);
-00449         close(ofd[i]);
-00450         close(ixfd[i]);
-00451         close(oxfd[i]);
-00452         close(ovxfd[i]);
-00453         close(itestfd[i]);
-00454         close(itestxfd[i]);
-00455 }
-00456         return 1;
-00457 }
-

Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlfootnotes_8cpp-source.html b/doc/api-documentation/html/thmlfootnotes_8cpp-source.html deleted file mode 100644 index ae85a41..0000000 --- a/doc/api-documentation/html/thmlfootnotes_8cpp-source.html +++ /dev/null @@ -1,117 +0,0 @@ - - -thmlfootnotes.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlfootnotes.cpp

00001 /******************************************************************************
-00002  *
-00003  * thmlfootnotes -      SWFilter decendant to hide or show footnotes
-00004  *                      in a ThML module.
-00005  */
-00006 
-00007 
-00008 #include <stdlib.h>
-00009 #include <string.h>
-00010 #include <thmlfootnotes.h>
-00011 #ifndef __GNUC__
-00012 #else
-00013 #include <unixstr.h>
-00014 #endif
-00015 
-00016 
-00017 const char ThMLFootnotes::on[] = "On";
-00018 const char ThMLFootnotes::off[] = "Off";
-00019 const char ThMLFootnotes::optName[] = "Footnotes";
-00020 const char ThMLFootnotes::optTip[] = "Toggles Footnotes On and Off if they exist";
-00021 
-00022 
-00023 ThMLFootnotes::ThMLFootnotes() {
-00024         option = false;
-00025         options.push_back(on);
-00026         options.push_back(off);
-00027 }
-00028 
-00029 
-00030 ThMLFootnotes::~ThMLFootnotes() {
-00031 }
-00032 
-00033 void ThMLFootnotes::setOptionValue(const char *ival)
-00034 {
-00035         option = (!stricmp(ival, on));
-00036 }
-00037 
-00038 const char *ThMLFootnotes::getOptionValue()
-00039 {
-00040         return (option) ? on:off;
-00041 }
-00042 
-00043 char ThMLFootnotes::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00044 {
-00045         if (!option) {  // if we don't want footnotes
-00046                 char *to, *from, token[2048]; // cheese.  Fix.
-00047                 int tokpos = 0;
-00048                 bool intoken = false;
-00049                 int len;
-00050                 bool hide = false;
-00051 
-00052                 len = strlen(text) + 1; // shift string to right of buffer
-00053                 if (len < maxlen) {
-00054                         memmove(&text[maxlen - len], text, len);
-00055                         from = &text[maxlen - len];
-00056                 }
-00057                 else    from = text;    // -------------------------------
-00058 
-00059                 for (to = text; *from; from++) {
-00060                         if (*from == '<') {
-00061                                 intoken = true;
-00062                                 tokpos = 0;
-00063                                 token[0] = 0;
-00064                                 token[1] = 0;
-00065                                 token[2] = 0;
-00066                                 continue;
-00067                         }
-00068                         if (*from == '>') {     // process tokens
-00069                                 intoken = false;
-00070                                 if (!strncmp(token, "note", 4)) {
-00071                                   hide = true;
-00072                                   continue;
-00073                                 }
-00074                                 else if (!strncmp(token, "/note", 5)) {
-00075                                   hide = false;
-00076                                   continue;
-00077                                 }
-00078 
-00079                                 // if not a footnote token, keep token in text
-00080                                 if (!hide) {
-00081                                         *to++ = '<';
-00082                                         for (char *tok = token; *tok; tok++)
-00083                                                 *to++ = *tok;
-00084                                         *to++ = '>';
-00085                                 }
-00086                                 continue;
-00087                         }
-00088                         if (intoken) {
-00089                                 if (tokpos < 2045)
-00090                                         token[tokpos++] = *from;
-00091                                         token[tokpos+2] = 0;
-00092                         }
-00093                         else    {
-00094                                 if (!hide) {
-00095                                         *to++ = *from;
-00096                                 }
-00097                         }
-00098                 }
-00099                 *to++ = 0;
-00100                 *to = 0;
-00101         }
-00102         return 0;
-00103 }
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlfootnotes_8h-source.html b/doc/api-documentation/html/thmlfootnotes_8h-source.html deleted file mode 100644 index 7576f78..0000000 --- a/doc/api-documentation/html/thmlfootnotes_8h-source.html +++ /dev/null @@ -1,70 +0,0 @@ - - -thmlfootnotes.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlfootnotes.h

00001 /*
-00002  *
-00003  * $Id:
-00004  *
-00005  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00006  *      CrossWire Bible Society
-00007  *      P. O. Box 2528
-00008  *      Tempe, AZ  85280-2528
-00009  *
-00010  * This program is free software; you can redistribute it and/or modify it
-00011  * under the terms of the GNU General Public License as published by the
-00012  * Free Software Foundation version 2.
-00013  *
-00014  * This program is distributed in the hope that it will be useful, but
-00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00017  * General Public License for more details.
-00018  *
-00019  */
-00020 
-00021 #ifndef THMLFOOTNOTES_H
-00022 #define THMLFOOTNOTES_H
-00023 
-00024 #include <swfilter.h>
-00025 
-00026 #include <defs.h>
-00027 
-00030 class SWDLLEXPORT ThMLFootnotes:public SWFilter
-00031 {
-00032   bool option;
-00033   static const char on[];
-00034   static const char off[];
-00035   static const char optName[];
-00036   static const char optTip[];
-00037   OptionsList options;
-00038 public:
-00039   ThMLFootnotes ();
-00040   virtual ~ ThMLFootnotes ();
-00041   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00042   virtual const char *getOptionName ()
-00043   {
-00044     return optName;
-00045   }
-00046   virtual const char *getOptionTip ()
-00047   {
-00048     return optTip;
-00049   }
-00050   virtual void setOptionValue (const char *ival);
-00051   virtual const char *getOptionValue ();
-00052   virtual OptionsList getOptionValues ()
-00053   {
-00054     return options;
-00055   }
-00056 };
-00057 
-00058 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlgbf_8cpp-source.html b/doc/api-documentation/html/thmlgbf_8cpp-source.html deleted file mode 100644 index 21ac839..0000000 --- a/doc/api-documentation/html/thmlgbf_8cpp-source.html +++ /dev/null @@ -1,344 +0,0 @@ - - -thmlgbf.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlgbf.cpp

00001 /***************************************************************************
-00002                      thmlgbf.cpp  -  ThML to GBF filter
-00003                              -------------------
-00004     begin                : 1999-10-28
-00005     copyright            : 2001 by CrossWire Bible Society
-00006  ***************************************************************************/
-00007 
-00008 /***************************************************************************
-00009  *                                                                         *
-00010  *   This program is free software; you can redistribute it and/or modify  *
-00011  *   it under the terms of the GNU General Public License as published by  *
-00012  *   the Free Software Foundation; either version 2 of the License, or     *
-00013  *   (at your option) any later version.                                   *
-00014  *                                                                         *
-00015  ***************************************************************************/
-00016 
-00017 #include <stdlib.h>
-00018 #include <string.h>
-00019 #include <thmlgbf.h>
-00020 
-00021 
-00022 ThMLGBF::ThMLGBF()
-00023 {
-00024 }
-00025 
-00026 
-00027 char ThMLGBF::ProcessText(char *text, int maxlen)
-00028 {
-00029         char *to, *from, token[2048];
-00030         int tokpos = 0;
-00031         bool intoken    = false;
-00032         int len;
-00033         bool ampersand = false;
-00034         bool sechead = false;
-00035         bool title = false;  
-00036 
-00037         len = strlen(text) + 1;                                         // shift string to right of buffer
-00038         if (len < maxlen) {
-00039                 memmove(&text[maxlen - len], text, len);
-00040                 from = &text[maxlen - len];
-00041         }
-00042         else    from = text;                                                    // -------------------------------
-00043         for (to = text; *from; from++) {
-00044                 if (*from == '<') {
-00045                         intoken = true;
-00046                         tokpos = 0;
-00047                         token[0] = 0;
-00048                         token[1] = 0;
-00049                         token[2] = 0;
-00050                         ampersand = false;
-00051                         continue;
-00052                 }
-00053                 else if (*from == '&') {
-00054                         intoken = true;
-00055                         tokpos = 0;
-00056                         memset(token, 0, 2048);
-00057                         ampersand = true;
-00058                         continue;
-00059                 }
-00060                 if (*from == ';' && ampersand) {
-00061                         intoken = false;
-00062         
-00063                         if (!strncmp("nbsp", token, 4)) *to++ = ' ';
-00064                         else if (!strncmp("quot", token, 4)) *to++ = '"';
-00065                         else if (!strncmp("amp", token, 3)) *to++ = '&';
-00066                         else if (!strncmp("lt", token, 2)) *to++ = '<';
-00067                         else if (!strncmp("gt", token, 2)) *to++ = '>';
-00068                         else if (!strncmp("brvbar", token, 6)) *to++ = '|';
-00069                         else if (!strncmp("sect", token, 4)) *to++ = '§';
-00070                         else if (!strncmp("copy", token, 4)) *to++ = '©';
-00071                         else if (!strncmp("laquo", token, 5)) *to++ = '«';
-00072                         else if (!strncmp("reg", token, 3)) *to++ = '®';
-00073                         else if (!strncmp("acute", token, 5)) *to++ = '´';
-00074                         else if (!strncmp("para", token, 4)) *to++ = '¶';
-00075                         else if (!strncmp("raquo", token, 5)) *to++ = '»';
-00076                         
-00077                         else if (!strncmp("Aacute", token, 6)) *to++ = 'Á';
-00078                         else if (!strncmp("Agrave", token, 6)) *to++ = 'À';
-00079                         else if (!strncmp("Acirc", token, 5)) *to++ = 'Â';
-00080                         else if (!strncmp("Auml", token, 4)) *to++ = 'Ä';
-00081                         else if (!strncmp("Atilde", token, 6)) *to++ = 'Ã';
-00082                         else if (!strncmp("Aring", token, 5)) *to++ = 'Å';
-00083                         else if (!strncmp("aacute", token, 6)) *to++ = 'á';
-00084                         else if (!strncmp("agrave", token, 6)) *to++ = 'à';
-00085                         else if (!strncmp("acirc", token, 5)) *to++ = 'â';
-00086                         else if (!strncmp("auml", token, 4)) *to++ = 'ä';
-00087                         else if (!strncmp("atilde", token, 6)) *to++ = 'ã';
-00088                         else if (!strncmp("aring", token, 5)) *to++ = 'å';
-00089                         else if (!strncmp("Eacute", token, 6)) *to++ = 'É';
-00090                         else if (!strncmp("Egrave", token, 6)) *to++ = 'È';
-00091                         else if (!strncmp("Ecirc", token, 5)) *to++ = 'Ê';
-00092                         else if (!strncmp("Euml", token, 4)) *to++ = 'Ë';
-00093                         else if (!strncmp("eacute", token, 6)) *to++ = 'é';
-00094                         else if (!strncmp("egrave", token, 6)) *to++ = 'è';
-00095                         else if (!strncmp("ecirc", token, 5)) *to++ = 'ê';
-00096                         else if (!strncmp("euml", token, 4)) *to++ = 'ë';
-00097                         else if (!strncmp("Iacute", token, 6)) *to++ = 'Í';
-00098                         else if (!strncmp("Igrave", token, 6)) *to++ = 'Ì';
-00099                         else if (!strncmp("Icirc", token, 5)) *to++ = 'Î';
-00100                         else if (!strncmp("Iuml", token, 4)) *to++ = 'Ï';
-00101                         else if (!strncmp("iacute", token, 6)) *to++ = 'í';
-00102                         else if (!strncmp("igrave", token, 6)) *to++ = 'ì';
-00103                         else if (!strncmp("icirc", token, 5)) *to++ = 'î';
-00104                         else if (!strncmp("iuml", token, 4)) *to++ = 'ï';
-00105                         else if (!strncmp("Oacute", token, 6)) *to++ = 'Ó';
-00106                         else if (!strncmp("Ograve", token, 6)) *to++ = 'Ò';
-00107                         else if (!strncmp("Ocirc", token, 5)) *to++ = 'Ô';
-00108                         else if (!strncmp("Ouml", token, 4)) *to++ = 'Ö';
-00109                         else if (!strncmp("Otilde", token, 6)) *to++ = 'Õ';
-00110                         else if (!strncmp("oacute", token, 6)) *to++ = 'ó';
-00111                         else if (!strncmp("ograve", token, 6)) *to++ = 'ò';
-00112                         else if (!strncmp("ocirc", token, 5)) *to++ = 'ô';
-00113                         else if (!strncmp("ouml", token, 4)) *to++ = 'ö';
-00114                         else if (!strncmp("otilde", token, 6)) *to++ = 'õ';
-00115                         else if (!strncmp("Uacute", token, 6)) *to++ = 'Ú';
-00116                         else if (!strncmp("Ugrave", token, 6)) *to++ = 'Ù';
-00117                         else if (!strncmp("Ucirc", token, 5)) *to++ = 'Û';
-00118                         else if (!strncmp("Uuml", token, 4)) *to++ = 'Ü';
-00119                         else if (!strncmp("uacute", token, 6)) *to++ = 'ú';
-00120                         else if (!strncmp("ugrave", token, 6)) *to++ = 'ù';
-00121                         else if (!strncmp("ucirc", token, 5)) *to++ = 'û';
-00122                         else if (!strncmp("uuml", token, 4)) *to++ = 'ü';
-00123                         else if (!strncmp("Yacute", token, 6)) *to++ = 'Ý';
-00124                         else if (!strncmp("yacute", token, 6)) *to++ = 'ý';
-00125                         else if (!strncmp("yuml", token, 4)) *to++ = 'ÿ';
-00126                         
-00127                         else if (!strncmp("deg", token, 3)) *to++ = '°';
-00128                         else if (!strncmp("plusmn", token, 6)) *to++ = '±';
-00129                         else if (!strncmp("sup2", token, 4)) *to++ = '²';
-00130                         else if (!strncmp("sup3", token, 4)) *to++ = '³';
-00131                         else if (!strncmp("sup1", token, 4)) *to++ = '¹';
-00132                         else if (!strncmp("nbsp", token, 4)) *to++ = 'º';
-00133                         else if (!strncmp("pound", token, 5)) *to++ = '£';
-00134                         else if (!strncmp("cent", token, 4)) *to++ = '¢';
-00135                         else if (!strncmp("frac14", token, 6)) *to++ = '¼';
-00136                         else if (!strncmp("frac12", token, 6)) *to++ = '½';
-00137                         else if (!strncmp("frac34", token, 6)) *to++ = '¾';
-00138                         else if (!strncmp("iquest", token, 6)) *to++ = '¿';
-00139                         else if (!strncmp("iexcl", token, 5)) *to++ = '¡';
-00140                         else if (!strncmp("ETH", token, 3)) *to++ = 'Ð';
-00141                         else if (!strncmp("eth", token, 3)) *to++ = 'ð';
-00142                         else if (!strncmp("THORN", token, 5)) *to++ = 'Þ';
-00143                         else if (!strncmp("thorn", token, 5)) *to++ = 'þ';
-00144                         else if (!strncmp("AElig", token, 5)) *to++ = 'Æ';
-00145                         else if (!strncmp("aelig", token, 5)) *to++ = 'æ';
-00146                         else if (!strncmp("Oslash", token, 6)) *to++ = 'Ø';
-00147                         else if (!strncmp("curren", token, 6)) *to++ = '¤';
-00148                         else if (!strncmp("Ccedil", token, 6)) *to++ = 'Ç';
-00149                         else if (!strncmp("ccedil", token, 6)) *to++ = 'ç';
-00150                         else if (!strncmp("szlig", token, 5)) *to++ = 'ß';
-00151                         else if (!strncmp("Ntilde", token, 6)) *to++ = 'Ñ';
-00152                         else if (!strncmp("ntilde", token, 6)) *to++ = 'ñ';
-00153                         else if (!strncmp("yen", token, 3)) *to++ = '¥';
-00154                         else if (!strncmp("not", token, 3)) *to++ = '¬';
-00155                         else if (!strncmp("ordf", token, 4)) *to++ = 'ª';
-00156                         else if (!strncmp("uml", token, 3)) *to++ = '¨';
-00157                         else if (!strncmp("shy", token, 3)) *to++ = '­';
-00158                         else if (!strncmp("macr", token, 4)) *to++ = '¯';
-00159                         continue;
-00160                 
-00161                 }
-00162                 else if (*from == '>' && !ampersand) {
-00163                         intoken = false;
-00164                         // process desired tokens
-00165                         if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
-00166                                 *to++ = '<';
-00167                                 *to++ = 'W';
-00168                                 for (unsigned int i = 27; token[i] != '\"'; i++)
-00169                                         *to++ = token[i];
-00170                                 *to++ = '>';
-00171                                 continue;
-00172                         }
-00173                         if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
-00174                                 *to++ = '<';
-00175                                 *to++ = 'W';
-00176                                 *to++ = 'T';
-00177                                 for (unsigned int i = 25; token[i] != '\"'; i++)
-00178                                         *to++ = token[i];
-00179                                 *to++ = '>';
-00180                                 continue;
-00181                         }
-00182                         else if (!strncmp(token, "scripRef", 8)) {
-00183                                 *to++ = '<';
-00184                                 *to++ = 'R';
-00185                                 *to++ = 'X';
-00186                                 *to++ = '>';
-00187                                 continue;
-00188                         }
-00189                         else if (!strncmp(token, "/scripRef", 9)) {
-00190                                 *to++ = '<';
-00191                                 *to++ = 'R';
-00192                                 *to++ = 'x';
-00193                                 *to++ = '>';
-00194                                 continue;
-00195                         }
-00196                         else if (!strncmp(token, "note", 4)) {
-00197                                 *to++ = '<';
-00198                                 *to++ = 'R';
-00199                                 *to++ = 'F';
-00200                                 *to++ = '>';
-00201                                 continue;
-00202                         }
-00203                         else if (!strncmp(token, "/note", 5)) {
-00204                                 *to++ = '<';
-00205                                 *to++ = 'R';
-00206                                 *to++ = 'f';
-00207                                 *to++ = '>';
-00208                                 continue;
-00209                         }
-00210                         else if (!strncmp(token, "sup", 3)) {
-00211                                 *to++ = '<';
-00212                                 *to++ = 'F';
-00213                                 *to++ = 'S';
-00214                                 *to++ = '>';
-00215                         }
-00216                         else if (!strncmp(token, "/sup", 4)) {
-00217                                 *to++ = '<';
-00218                                 *to++ = 'F';
-00219                                 *to++ = 's';
-00220                                 *to++ = '>';
-00221                         }
-00222                         else if (!strnicmp(token, "font color=#ff0000", 18)) {
-00223                                 *to++ = '<';
-00224                                 *to++ = 'F';
-00225                                 *to++ = 'R';
-00226                                 *to++ = '>';
-00227                                 continue;
-00228                         }
-00229                         else if (!strnicmp(token, "/font", 5)) {
-00230                                 *to++ = '<';
-00231                                 *to++ = 'F';
-00232                                 *to++ = 'r';
-00233                                 *to++ = '>';
-00234                                 continue;
-00235                         }
-00236                         else if (!strncmp(token, "div class=\"sechead\"", 19)) {
-00237                                 *to++ = '<';
-00238                                 *to++ = 'T';
-00239                                 *to++ = 'S';
-00240                                 *to++ = '>';
-00241                                 sechead = true;
-00242                                 continue;
-00243                         }
-00244                         else if (sechead && !strncmp(token, "/div", 19)) {
-00245                                 *to++ = '<';
-00246                                 *to++ = 'T';
-00247                                 *to++ = 's';
-00248                                 *to++ = '>';
-00249                                 sechead = false;
-00250                                 continue;
-00251                         }
-00252                         else if (!strncmp(token, "div class=\"title\"", 19)) {
-00253                                 *to++ = '<';
-00254                                 *to++ = 'T';
-00255                                 *to++ = 'T';
-00256                                 *to++ = '>';
-00257                                 title = true;
-00258                                 continue;
-00259                         }
-00260                         else if (title && !strncmp(token, "/div", 19)) {
-00261                                 *to++ = '<';
-00262                                 *to++ = 'T';
-00263                                 *to++ = 't';
-00264                                 *to++ = '>';
-00265                                 title = false;
-00266                                 continue;
-00267                         }
-00268                         else if (!strnicmp(token, "br", 2)) {
-00269                                 *to++ = '<';
-00270                                 *to++ = 'C';
-00271                                 *to++ = 'L';
-00272                                 *to++ = '>';
-00273                                 continue;
-00274                         }
-00275                         else switch(*token) {
-00276                         case 'I':                       // font tags
-00277                         case 'i':
-00278                                 *to++ = '<';
-00279                                 *to++ = 'F';
-00280                                 *to++ = 'I';
-00281                                 *to++ = '>';
-00282                                 continue;
-00283                         case 'B':               // bold start
-00284                         case 'b':
-00285                                 *to++ = '<';
-00286                                 *to++ = 'F';
-00287                                 *to++ = 'B';
-00288                                 *to++ = '>';
-00289                                 continue;
-00290                         case '/':
-00291                                 switch(token[1]) {
-00292                                 case 'P':
-00293                                 case 'p':
-00294                                         *to++ = '<';
-00295                                         *to++ = 'C';
-00296                                         *to++ = 'M';
-00297                                         *to++ = '>';
-00298                                         continue;
-00299                                 case 'I':
-00300                                 case 'i':               // italic end
-00301                                         *to++ = '<';
-00302                                         *to++ = 'F';
-00303                                         *to++ = 'i';
-00304                                         *to++ = '>';
-00305                                         continue;
-00306                                 case 'B':               // bold start
-00307                                 case 'b':
-00308                                         *to++ = '<';
-00309                                         *to++ = 'F';
-00310                                         *to++ = 'b';
-00311                                         *to++ = '>';
-00312                                         continue;
-00313                                 }
-00314                         }
-00315                         continue;
-00316                 }
-00317                 if (intoken) {
-00318                         if (tokpos < 2045)
-00319                                 token[tokpos++] = *from;
-00320                                 token[tokpos+2] = 0;
-00321                 }
-00322                 else    *to++ = *from;
-00323         }
-00324         *to++ = 0;
-00325         *to = 0;          
-00326         return 0;
-00327 }
-00328 
-00329 
-00330 
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlgbf_8h-source.html b/doc/api-documentation/html/thmlgbf_8h-source.html deleted file mode 100644 index 9ba1622..0000000 --- a/doc/api-documentation/html/thmlgbf_8h-source.html +++ /dev/null @@ -1,49 +0,0 @@ - - -thmlgbf.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlgbf.h

00001 /*
-00002  *
-00003  * thmlgbf.h
-00004  *
-00005  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00006  *      CrossWire Bible Society
-00007  *      P. O. Box 2528
-00008  *      Tempe, AZ  85280-2528
-00009  *
-00010  * This program is free software; you can redistribute it and/or modify it
-00011  * under the terms of the GNU General Public License as published by the
-00012  * Free Software Foundation version 2.
-00013  *
-00014  * This program is distributed in the hope that it will be useful, but
-00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00017  * General Public License for more details.
-00018  *
-00019  */
-00020 
-00021 #ifndef THMLGBF_H
-00022 #define THMLGBF_H
-00023 
-00024 #include <swfilter.h>
-00025 
-00026 #include <defs.h>
-00027 
-00030 class SWDLLEXPORT ThMLGBF:public SWFilter
-00031 {
-00032 public:
-00033   ThMLGBF ();
-00034   virtual char ProcessText (char *text, int maxlen = -1);
-00035 };
-00036 
-00037 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlheadings_8cpp-source.html b/doc/api-documentation/html/thmlheadings_8cpp-source.html deleted file mode 100644 index a3ac50e..0000000 --- a/doc/api-documentation/html/thmlheadings_8cpp-source.html +++ /dev/null @@ -1,121 +0,0 @@ - - -thmlheadings.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlheadings.cpp

00001 /******************************************************************************
-00002  *
-00003  * thmlheadings -       SWFilter decendant to hide or show headings
-00004  *                      in a ThML module.
-00005  */
-00006 
-00007 
-00008 #include <stdlib.h>
-00009 #include <string.h>
-00010 #include <thmlheadings.h>
-00011 #ifndef __GNUC__
-00012 #else
-00013 #include <unixstr.h>
-00014 #endif
-00015 
-00016 
-00017 const char ThMLHeadings::on[] = "On";
-00018 const char ThMLHeadings::off[] = "Off";
-00019 const char ThMLHeadings::optName[] = "Headings";
-00020 const char ThMLHeadings::optTip[] = "Toggles Headings On and Off if they exist";
-00021 
-00022 
-00023 ThMLHeadings::ThMLHeadings() {
-00024         option = false;
-00025         options.push_back(on);
-00026         options.push_back(off);
-00027 }
-00028 
-00029 
-00030 ThMLHeadings::~ThMLHeadings() {
-00031 }
-00032 
-00033 void ThMLHeadings::setOptionValue(const char *ival)
-00034 {
-00035         option = (!stricmp(ival, on));
-00036 }
-00037 
-00038 const char *ThMLHeadings::getOptionValue()
-00039 {
-00040         return (option) ? on:off;
-00041 }
-00042 
-00043 char ThMLHeadings::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00044 {
-00045         if (!option) {  // if we don't want headings
-00046                 char *to, *from, token[2048]; // cheese.  Fix.
-00047                 int tokpos = 0;
-00048                 bool intoken = false;
-00049                 int len;
-00050                 bool hide = false;
-00051 
-00052                 len = strlen(text) + 1; // shift string to right of buffer
-00053                 if (len < maxlen) {
-00054                         memmove(&text[maxlen - len], text, len);
-00055                         from = &text[maxlen - len];
-00056                 }
-00057                 else    from = text;    // -------------------------------
-00058 
-00059                 for (to = text; *from; from++) {
-00060                         if (*from == '<') {
-00061                                 intoken = true;
-00062                                 tokpos = 0;
-00063                                 token[0] = 0;
-00064                                 token[1] = 0;
-00065                                 token[2] = 0;
-00066                                 continue;
-00067                         }
-00068                         if (*from == '>') {     // process tokens
-00069                                 intoken = false;
-00070                                 if (!strnicmp(token, "div class=\"sechead\"", 19)) {
-00071                                                 hide = true;
-00072                                                 continue;
-00073                                 }
-00074                                 if (!strnicmp(token, "div class=\"title\"", 17)) {
-00075                                                 hide = true;
-00076                                                 continue;
-00077                                 }
-00078                                 else if (hide && !strnicmp(token, "/div", 4)) {
-00079                                                 hide = false;
-00080                                                 continue;
-00081                                 }
-00082 
-00083                                 // if not a heading token, keep token in text
-00084                                 if (!hide) {
-00085                                         *to++ = '<';
-00086                                         for (char *tok = token; *tok; tok++)
-00087                                                 *to++ = *tok;
-00088                                         *to++ = '>';
-00089                                 }
-00090                                 continue;
-00091                         }
-00092                         if (intoken) {
-00093                                 if (tokpos < 2045)
-00094                                         token[tokpos++] = *from;
-00095                                         token[tokpos+2] = 0;
-00096                         }
-00097                         else    {
-00098                                 if (!hide) {
-00099                                         *to++ = *from;
-00100                                 }
-00101                         }
-00102                 }
-00103                 *to++ = 0;
-00104                 *to = 0;
-00105         }
-00106         return 0;
-00107 }
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlheadings_8h-source.html b/doc/api-documentation/html/thmlheadings_8h-source.html deleted file mode 100644 index 6a2df61..0000000 --- a/doc/api-documentation/html/thmlheadings_8h-source.html +++ /dev/null @@ -1,70 +0,0 @@ - - -thmlheadings.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlheadings.h

00001 /*
-00002  *
-00003  * $Id: 
-00004  *
-00005  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00006  *      CrossWire Bible Society
-00007  *      P. O. Box 2528
-00008  *      Tempe, AZ  85280-2528
-00009  *
-00010  * This program is free software; you can redistribute it and/or modify it
-00011  * under the terms of the GNU General Public License as published by the
-00012  * Free Software Foundation version 2.
-00013  *
-00014  * This program is distributed in the hope that it will be useful, but
-00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00017  * General Public License for more details.
-00018  *
-00019  */
-00020 
-00021 #ifndef THMLHEADINGS_H
-00022 #define THMLHEADINGS_H
-00023 
-00024 #include <swfilter.h>
-00025 
-00026 #include <defs.h>
-00027 
-00030 class SWDLLEXPORT ThMLHeadings:public SWFilter
-00031 {
-00032   bool option;
-00033   static const char on[];
-00034   static const char off[];
-00035   static const char optName[];
-00036   static const char optTip[];
-00037   OptionsList options;
-00038 public:
-00039   ThMLHeadings ();
-00040   virtual ~ ThMLHeadings ();
-00041   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00042   virtual const char *getOptionName ()
-00043   {
-00044     return optName;
-00045   }
-00046   virtual const char *getOptionTip ()
-00047   {
-00048     return optTip;
-00049   }
-00050   virtual void setOptionValue (const char *ival);
-00051   virtual const char *getOptionValue ();
-00052   virtual OptionsList getOptionValues ()
-00053   {
-00054     return options;
-00055   }
-00056 };
-00057 
-00058 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlhtml_8cpp-source.html b/doc/api-documentation/html/thmlhtml_8cpp-source.html deleted file mode 100644 index 6b1e37d..0000000 --- a/doc/api-documentation/html/thmlhtml_8cpp-source.html +++ /dev/null @@ -1,225 +0,0 @@ - - -thmlhtml.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlhtml.cpp

00001 /***************************************************************************
-00002                      thmlhtml.cpp  -  ThML to HTML filter
-00003                              -------------------
-00004     begin                : 1999-10-27
-00005     copyright            : 2001 by CrossWire Bible Society
-00006  ***************************************************************************/
-00007 
-00008 /***************************************************************************
-00009  *                                                                         *
-00010  *   This program is free software; you can redistribute it and/or modify  *
-00011  *   it under the terms of the GNU General Public License as published by  *
-00012  *   the Free Software Foundation; either version 2 of the License, or     *
-00013  *   (at your option) any later version.                                   *
-00014  *                                                                         *
-00015  ***************************************************************************/
-00016 
-00017 #include <stdlib.h>
-00018 #include <string.h>
-00019 #include <thmlhtml.h>
-00020 #include <swmodule.h>
-00021 
-00022 
-00023 ThMLHTML::ThMLHTML() {
-00024         setTokenStart("<");
-00025         setTokenEnd(">");
-00026 /*
-00027         setEscapeStart("&");
-00028         setEscapeEnd(";");
-00029 
-00030         setEscapeStringCaseSensitive(true);
-00031 
-00032         addEscapeStringSubstitute("nbsp", " ");
-00033         addEscapeStringSubstitute("quot", "\"");
-00034         addEscapeStringSubstitute("amp", "&");
-00035         addEscapeStringSubstitute("lt", "<");
-00036         addEscapeStringSubstitute("gt", ">");
-00037         addEscapeStringSubstitute("brvbar", "|");
-00038         addEscapeStringSubstitute("sect", "§");
-00039         addEscapeStringSubstitute("copy", "©");
-00040         addEscapeStringSubstitute("laquo", "«");
-00041         addEscapeStringSubstitute("reg", "®");
-00042         addEscapeStringSubstitute("acute", "´");
-00043         addEscapeStringSubstitute("para", "¶");
-00044         addEscapeStringSubstitute("raquo", "»");
-00045 
-00046         addEscapeStringSubstitute("Aacute", "Á");
-00047         addEscapeStringSubstitute("Agrave", "À");
-00048         addEscapeStringSubstitute("Acirc", "Â");
-00049         addEscapeStringSubstitute("Auml", "Ä");
-00050         addEscapeStringSubstitute("Atilde", "Ã");
-00051         addEscapeStringSubstitute("Aring", "Å");
-00052         addEscapeStringSubstitute("aacute", "á");
-00053         addEscapeStringSubstitute("agrave", "à");
-00054         addEscapeStringSubstitute("acirc", "â");
-00055         addEscapeStringSubstitute("auml", "ä");
-00056         addEscapeStringSubstitute("atilde", "ã");
-00057         addEscapeStringSubstitute("aring", "å");
-00058         addEscapeStringSubstitute("Eacute", "É");
-00059         addEscapeStringSubstitute("Egrave", "È");
-00060         addEscapeStringSubstitute("Ecirc", "Ê");
-00061         addEscapeStringSubstitute("Euml", "Ë");
-00062         addEscapeStringSubstitute("eacute", "é");
-00063         addEscapeStringSubstitute("egrave", "è");
-00064         addEscapeStringSubstitute("ecirc", "ê");
-00065         addEscapeStringSubstitute("euml", "ë");
-00066         addEscapeStringSubstitute("Iacute", "Í");
-00067         addEscapeStringSubstitute("Igrave", "Ì");
-00068         addEscapeStringSubstitute("Icirc", "Î");
-00069         addEscapeStringSubstitute("Iuml", "Ï");
-00070         addEscapeStringSubstitute("iacute", "í");
-00071         addEscapeStringSubstitute("igrave", "ì");
-00072         addEscapeStringSubstitute("icirc", "î");
-00073         addEscapeStringSubstitute("iuml", "ï");
-00074         addEscapeStringSubstitute("Oacute", "Ó");
-00075         addEscapeStringSubstitute("Ograve", "Ò");
-00076         addEscapeStringSubstitute("Ocirc", "Ô");
-00077         addEscapeStringSubstitute("Ouml", "Ö");
-00078         addEscapeStringSubstitute("Otilde", "Õ");
-00079         addEscapeStringSubstitute("oacute", "ó");
-00080         addEscapeStringSubstitute("ograve", "ò");
-00081         addEscapeStringSubstitute("ocirc", "ô");
-00082         addEscapeStringSubstitute("ouml", "ö");
-00083         addEscapeStringSubstitute("otilde", "õ");
-00084         addEscapeStringSubstitute("Uacute", "Ú");
-00085         addEscapeStringSubstitute("Ugrave", "Ù");
-00086         addEscapeStringSubstitute("Ucirc", "Û");
-00087         addEscapeStringSubstitute("Uuml", "Ü");
-00088         addEscapeStringSubstitute("uacute", "ú");
-00089         addEscapeStringSubstitute("ugrave", "ù");
-00090         addEscapeStringSubstitute("ucirc", "û");
-00091         addEscapeStringSubstitute("uuml", "ü");
-00092         addEscapeStringSubstitute("Yacute", "Ý");
-00093         addEscapeStringSubstitute("yacute", "ý");
-00094         addEscapeStringSubstitute("yuml", "ÿ");
-00095 
-00096         addEscapeStringSubstitute("deg", "°");
-00097         addEscapeStringSubstitute("plusmn", "±");
-00098         addEscapeStringSubstitute("sup2", "²");
-00099         addEscapeStringSubstitute("sup3", "³");
-00100         addEscapeStringSubstitute("sup1", "¹");
-00101         addEscapeStringSubstitute("nbsp", "º");
-00102         addEscapeStringSubstitute("pound", "£");
-00103         addEscapeStringSubstitute("cent", "¢");
-00104         addEscapeStringSubstitute("frac14", "¼");
-00105         addEscapeStringSubstitute("frac12", "½");
-00106         addEscapeStringSubstitute("frac34", "¾");
-00107         addEscapeStringSubstitute("iquest", "¿");
-00108         addEscapeStringSubstitute("iexcl", "¡");
-00109         addEscapeStringSubstitute("ETH", "Ð");
-00110         addEscapeStringSubstitute("eth", "ð");
-00111         addEscapeStringSubstitute("THORN", "Þ");
-00112         addEscapeStringSubstitute("thorn", "þ");
-00113         addEscapeStringSubstitute("AElig", "Æ");
-00114         addEscapeStringSubstitute("aelig", "æ");
-00115         addEscapeStringSubstitute("Oslash", "Ø");
-00116         addEscapeStringSubstitute("curren", "¤");
-00117         addEscapeStringSubstitute("Ccedil", "Ç");
-00118         addEscapeStringSubstitute("ccedil", "ç");
-00119         addEscapeStringSubstitute("szlig", "ß");
-00120         addEscapeStringSubstitute("Ntilde", "Ñ");
-00121         addEscapeStringSubstitute("ntilde", "ñ");
-00122         addEscapeStringSubstitute("yen", "¥");
-00123         addEscapeStringSubstitute("not", "¬");
-00124         addEscapeStringSubstitute("ordf", "ª");
-00125         addEscapeStringSubstitute("uml", "¨");
-00126         addEscapeStringSubstitute("shy", "­");
-00127         addEscapeStringSubstitute("macr", "¯");
-00128 */
-00129         setTokenCaseSensitive(true);
-00130 
-00131         addTokenSubstitute("/scripRef", " </a>");
-00132         addTokenSubstitute("note", " <font color=\"#800000\"><small>(");
-00133         addTokenSubstitute("/note", ")</small></font> ");
-00134 }
-00135 
-00136 
-00137 bool ThMLHTML::handleToken(char **buf, const char *token, DualStringMap &userData) {
-00138         if (!substituteToken(buf, token)) {
-00139         // manually process if it wasn't a simple substitution
-00140                 if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
-00141                         if (token[27] == 'H' || token[27] == 'G' || token[27] == 'A') {
-00142                                 pushString(buf, "<small><em>");
-00143                                 for (const char *tok = token + 5; *tok; tok++)
-00144                                         if(*tok != '\"')
-00145                                                 *(*buf)++ = *tok;
-00146                                 pushString(buf, "</em></small>");
-00147                         }
-00148                         else if (token[27] == 'T') {
-00149                                 pushString(buf, "<small><i>");
-00150                                 for (unsigned int i = 29; token[i] != '\"'; i++)
-00151                                         *(*buf)++ = token[i];
-00152                                 pushString(buf, "</i></small>");
-00153                         }
-00154                 }
-00155                 else if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
-00156                         pushString(buf, "<small><em>");
-00157                         for (unsigned int i = 25; token[i] != '\"'; i++)
-00158                                 *(*buf)++ = token[i];
-00159                         pushString(buf, "</em></small>");
-00160                 }
-00161                 else if (!strncmp(token, "sync type=\"lemma\" value=\"", 25)) {
-00162                         pushString(buf, "<small><em>(");
-00163                         for (unsigned int i = 25; token[i] != '\"'; i++)
-00164                                 *(*buf)++ = token[i];
-00165                         pushString(buf, ")</em></small>");
-00166                 }
-00167                 else if (!strncmp(token, "scripRef", 8)) {
-00168                         pushString(buf, "<a href=\"");
-00169                         for (const char *tok = token + 9; *tok; tok++)
-00170                                 if(*tok != '\"')
-00171                                         *(*buf)++ = *tok;
-00172                         *(*buf)++ = '\"';
-00173                         *(*buf)++ = '>';
-00174                 }
-00175                 else if (!strncmp(token, "img ", 4)) {
-00176                         const char *src = strstr(token, "src");
-00177                         if (!src)               // assert we have a src attribute
-00178                                 return false;
-00179 
-00180                         *(*buf)++ = '<';
-00181                         for (const char *c = token; *c; c++) {
-00182                                 if (c == src) {
-00183                                         for (;((*c) && (*c != '"')); c++)
-00184                                                 *(*buf)++ = *c;
-00185 
-00186                                         if (!*c) { c--; continue; }
-00187 
-00188                                         *(*buf)++ = '"';
-00189                                         if (*(c+1) == '/') {
-00190                                                 pushString(buf, "file:");
-00191                                                 pushString(buf, module->getConfigEntry("AbsoluteDataPath"));
-00192                                                 if (*((*buf)-1) == '/')
-00193                                                         c++;            // skip '/'
-00194                                         }
-00195                                         continue;
-00196                                 }
-00197                                 *(*buf)++ = *c;
-00198                         }
-00199                         *(*buf)++ = '>';
-00200                 }
-00201                 else if(!strncmp(token, "note", 4)) {
-00202                         pushString(buf, " <font color=\"#800000\"><small>(");
-00203                 }
-00204 
-00205                 else {
-00206                         return false;  // we still didn't handle token
-00207                 }
-00208         }
-00209         return true;
-00210 }
-00211 
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlhtml_8h-source.html b/doc/api-documentation/html/thmlhtml_8h-source.html deleted file mode 100644 index 184142b..0000000 --- a/doc/api-documentation/html/thmlhtml_8h-source.html +++ /dev/null @@ -1,47 +0,0 @@ - - -thmlhtml.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlhtml.h

00001 /***************************************************************************
-00002                           thmlhtml.h  -  description
-00003                              -------------------
-00004     begin                : 1999-10-28
-00005 
-00006     copyright            : 1999 by Chris Little
-00007     email                : chrislit@chiasma.org
-00008  ***************************************************************************/
-00009 
-00010 /***************************************************************************
-00011  *                                                                         *
-00012  *   This program is free software; you can redistribute it and/or modify  *
-00013  *   it under the terms of the GNU General Public License as published by  *
-00014  *   the Free Software Foundation; either version 2 of the License, or     *
-00015  *   (at your option) any later version.                                   *
-00016  *                                                                         *
-00017  ***************************************************************************/
-00018 
-00019 #ifndef THMLHTML_H
-00020 #define THMLHTML_H
-00021 
-00022 #include <swbasicfilter.h>
-00023 
-00024 #include <defs.h>
-00025 
-00028 class SWDLLEXPORT ThMLHTML : public SWBasicFilter {
-00029 protected:
-00030         virtual bool handleToken(char **buf, const char *token, DualStringMap &userData);
-00031 public:
-00032         ThMLHTML();
-00033 };
-00034 
-00035 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlhtmlhref_8cpp-source.html b/doc/api-documentation/html/thmlhtmlhref_8cpp-source.html deleted file mode 100644 index d40dd3c..0000000 --- a/doc/api-documentation/html/thmlhtmlhref_8cpp-source.html +++ /dev/null @@ -1,283 +0,0 @@ - - -thmlhtmlhref.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlhtmlhref.cpp

00001 /***************************************************************************
-00002                      thmlhtmlhref.cpp  -  ThML to HTML filter with hrefs  
-00003                              -------------------
-00004     begin                    : 2001-09-03
-00005     copyright            : 2001 by CrossWire Bible Society
-00006  ***************************************************************************/
-00007 
-00008 /***************************************************************************
-00009  *                                                                         *
-00010  *   This program is free software; you can redistribute it and/or modify  *
-00011  *   it under the terms of the GNU General Public License as published by  *
-00012  *   the Free Software Foundation; either version 2 of the License, or     *
-00013  *   (at your option) any later version.                                   *
-00014  *                                                                         *
-00015  ***************************************************************************/
-00016 
-00017 #include <stdlib.h>
-00018 #include <string.h>
-00019 #include <thmlhtmlhref.h>
-00020 #include <swmodule.h>
-00021 
-00022 
-00023 ThMLHTMLHREF::ThMLHTMLHREF() {
-00024         setTokenStart("<");
-00025         setTokenEnd(">");
-00026 /*        
-00027         setEscapeStart("&");
-00028         setEscapeEnd(";");
-00029 
-00030         setEscapeStringCaseSensitive(true);
-00031 
-00032         addEscapeStringSubstitute("nbsp", " ");
-00033         addEscapeStringSubstitute("quot", "\"");
-00034         addEscapeStringSubstitute("amp", "&");
-00035         addEscapeStringSubstitute("lt", "<");
-00036         addEscapeStringSubstitute("gt", ">");
-00037         addEscapeStringSubstitute("brvbar", "|");
-00038         addEscapeStringSubstitute("sect", "§");
-00039         addEscapeStringSubstitute("copy", "©");
-00040         addEscapeStringSubstitute("laquo", "«");
-00041         addEscapeStringSubstitute("reg", "®");
-00042         addEscapeStringSubstitute("acute", "´");
-00043         addEscapeStringSubstitute("para", "¶");
-00044         addEscapeStringSubstitute("raquo", "»");
-00045 
-00046         addEscapeStringSubstitute("Aacute", "Á");
-00047         addEscapeStringSubstitute("Agrave", "À");
-00048         addEscapeStringSubstitute("Acirc", "Â");
-00049         addEscapeStringSubstitute("Auml", "Ä");
-00050         addEscapeStringSubstitute("Atilde", "Ã");
-00051         addEscapeStringSubstitute("Aring", "Å");
-00052         addEscapeStringSubstitute("aacute", "á");
-00053         addEscapeStringSubstitute("agrave", "à");
-00054         addEscapeStringSubstitute("acirc", "â");
-00055         addEscapeStringSubstitute("auml", "ä");
-00056         addEscapeStringSubstitute("atilde", "ã");
-00057         addEscapeStringSubstitute("aring", "å");
-00058         addEscapeStringSubstitute("Eacute", "É");
-00059         addEscapeStringSubstitute("Egrave", "È");
-00060         addEscapeStringSubstitute("Ecirc", "Ê");
-00061         addEscapeStringSubstitute("Euml", "Ë");
-00062         addEscapeStringSubstitute("eacute", "é");
-00063         addEscapeStringSubstitute("egrave", "è");
-00064         addEscapeStringSubstitute("ecirc", "ê");
-00065         addEscapeStringSubstitute("euml", "ë");
-00066         addEscapeStringSubstitute("Iacute", "Í");
-00067         addEscapeStringSubstitute("Igrave", "Ì");
-00068         addEscapeStringSubstitute("Icirc", "Î");
-00069         addEscapeStringSubstitute("Iuml", "Ï");
-00070         addEscapeStringSubstitute("iacute", "í");
-00071         addEscapeStringSubstitute("igrave", "ì");
-00072         addEscapeStringSubstitute("icirc", "î");
-00073         addEscapeStringSubstitute("iuml", "ï");
-00074         addEscapeStringSubstitute("Oacute", "Ó");
-00075         addEscapeStringSubstitute("Ograve", "Ò");
-00076         addEscapeStringSubstitute("Ocirc", "Ô");
-00077         addEscapeStringSubstitute("Ouml", "Ö");
-00078         addEscapeStringSubstitute("Otilde", "Õ");
-00079         addEscapeStringSubstitute("oacute", "ó");
-00080         addEscapeStringSubstitute("ograve", "ò");
-00081         addEscapeStringSubstitute("ocirc", "ô");
-00082         addEscapeStringSubstitute("ouml", "ö");
-00083         addEscapeStringSubstitute("otilde", "õ");
-00084         addEscapeStringSubstitute("Uacute", "Ú");
-00085         addEscapeStringSubstitute("Ugrave", "Ù");
-00086         addEscapeStringSubstitute("Ucirc", "Û");
-00087         addEscapeStringSubstitute("Uuml", "Ü");
-00088         addEscapeStringSubstitute("uacute", "ú");
-00089         addEscapeStringSubstitute("ugrave", "ù");
-00090         addEscapeStringSubstitute("ucirc", "û");
-00091         addEscapeStringSubstitute("uuml", "ü");
-00092         addEscapeStringSubstitute("Yacute", "Ý");
-00093         addEscapeStringSubstitute("yacute", "ý");
-00094         addEscapeStringSubstitute("yuml", "ÿ");
-00095 
-00096         addEscapeStringSubstitute("deg", "°");
-00097         addEscapeStringSubstitute("plusmn", "±");
-00098         addEscapeStringSubstitute("sup2", "²");
-00099         addEscapeStringSubstitute("sup3", "³");
-00100         addEscapeStringSubstitute("sup1", "¹");
-00101         addEscapeStringSubstitute("nbsp", "º");
-00102         addEscapeStringSubstitute("pound", "£");
-00103         addEscapeStringSubstitute("cent", "¢");
-00104         addEscapeStringSubstitute("frac14", "¼");
-00105         addEscapeStringSubstitute("frac12", "½");
-00106         addEscapeStringSubstitute("frac34", "¾");
-00107         addEscapeStringSubstitute("iquest", "¿");
-00108         addEscapeStringSubstitute("iexcl", "¡");
-00109         addEscapeStringSubstitute("ETH", "Ð");
-00110         addEscapeStringSubstitute("eth", "ð");
-00111         addEscapeStringSubstitute("THORN", "Þ");
-00112         addEscapeStringSubstitute("thorn", "þ");
-00113         addEscapeStringSubstitute("AElig", "Æ");
-00114         addEscapeStringSubstitute("aelig", "æ");
-00115         addEscapeStringSubstitute("Oslash", "Ø");
-00116         addEscapeStringSubstitute("curren", "¤");
-00117         addEscapeStringSubstitute("Ccedil", "Ç");
-00118         addEscapeStringSubstitute("ccedil", "ç");
-00119         addEscapeStringSubstitute("szlig", "ß");
-00120         addEscapeStringSubstitute("Ntilde", "Ñ");
-00121         addEscapeStringSubstitute("ntilde", "ñ");
-00122         addEscapeStringSubstitute("yen", "¥");
-00123         addEscapeStringSubstitute("not", "¬");
-00124         addEscapeStringSubstitute("ordf", "ª");
-00125         addEscapeStringSubstitute("uml", "¨");
-00126         addEscapeStringSubstitute("shy", "­");
-00127         addEscapeStringSubstitute("macr", "¯");
-00128 */
-00129         setTokenCaseSensitive(true);
-00130 
-00131         addTokenSubstitute("note", " <font color=\"#800000\"><small>(");
-00132         addTokenSubstitute("/note", ")</small></font> ");
-00133         addTokenSubstitute("/scripture", "</i> ");
-00134 }
-00135 
-00136 
-00137 bool ThMLHTMLHREF::handleToken(char **buf, const char *token, DualStringMap &userData) {
-00138         const char *tok;
-00139         if (!substituteToken(buf, token)) {
-00140         // manually process if it wasn't a simple substitution
-00141                 if (!strncmp(token, "sync ", 5)) {
-00142                         pushString(buf, "<a href=\"");
-00143                         for (tok = token + 5; *(tok+1); tok++)
-00144                                 if(*tok != '\"')
-00145                                         *(*buf)++ = *tok;
-00146                         *(*buf)++ = '\"';
-00147                         *(*buf)++ = '>';
-00148 
-00149                         //scan for value and add it to the buffer
-00150                         for (tok = token + 5; *tok; tok++) {
-00151                                 if (!strncmp(tok, "value=\"", 7)) {
-00152                                         tok += 7;
-00153                                         for (;*tok != '\"'; tok++)
-00154                                                 *(*buf)++ = *tok;
-00155                                         break;
-00156                                 }
-00157                         }
-00158                         pushString(buf, "</a>");
-00159                 }
-00160                 
-00161                 else if (!strncmp(token, "scripture ", 10)) {
-00162                         userData["inscriptRef"] = "true";
-00163                         pushString(buf, "<i>");
-00164                 } 
-00165 
-00166                 else if (!strncmp(token, "scripRef p", 10) || !strncmp(token, "scripRef v", 10)) {
-00167                         userData["inscriptRef"] = "true";
-00168                         pushString(buf, "<a href=\"");
-00169                         for (const char *tok = token + 9; *(tok+1); tok++)                              
-00170                                 if(*tok != '\"')                        
-00171                                         *(*buf)++ = *tok;
-00172                         *(*buf)++ = '\"';
-00173                         *(*buf)++ = '>';
-00174                 } 
-00175 
-00176                 // we're starting a scripRef like "<scripRef>John 3:16</scripRef>"
-00177                 else if (!strcmp(token, "scripRef")) {
-00178                         userData["inscriptRef"] = "false";
-00179                         // let's stop text from going to output
-00180                         userData["suspendTextPassThru"] = "true";
-00181                 }
-00182 
-00183                 // we've ended a scripRef 
-00184                 else if (!strcmp(token, "/scripRef")) {
-00185                         if (userData["inscriptRef"] == "true") { // like  "<scripRef passage="John 3:16">John 3:16</scripRef>"
-00186                                 userData["inscriptRef"] = "false";
-00187                                 pushString(buf, "</a>");
-00188                         }
-00189                         
-00190                         else { // like "<scripRef>John 3:16</scripRef>"
-00191                                 pushString(buf, "<a href=\"passage=");
-00192                                 //char *strbuf = (char *)userData["lastTextNode"].c_str();
-00193                                 pushString(buf, userData["lastTextNode"].c_str());
-00194                                 *(*buf)++ = '\"';
-00195                                 *(*buf)++ = '>';
-00196                                 pushString(buf, userData["lastTextNode"].c_str());
-00197                                 // let's let text resume to output again
-00198                                 userData["suspendTextPassThru"] = "false";      
-00199                                 pushString(buf, "</a>");
-00200                         }
-00201                 }
-00202                         
-00203                 else if (!strncmp(token, "div class=\"sechead\"", 19)) {
-00204                         userData["SecHead"] = "true";
-00205                         pushString(buf, "<br /><b><i>");
-00206                 }
-00207                 else if (!strncmp(token, "div class=\"title\"", 19)) {
-00208                         userData["SecHead"] = "true";
-00209                         pushString(buf, "<br /><b><i>");
-00210                 }
-00211                 else if (!strncmp(token, "/div", 4)) {
-00212                         if (userData["SecHead"] == "true") {
-00213                                 pushString(buf, "</i></b><br />");
-00214                                 userData["SecHead"] = "false";
-00215                         }
-00216                 }
-00217 
-00218                 else if (!strncmp(token, "sync type=\"Strongs\" value=\"T", 28)) {
-00219                         pushString(buf, "<a href=\"");
-00220                         for (tok = token + 5; *(tok+1); tok++)                          
-00221                                 if(*tok != '\"')                        
-00222                                         *(*buf)++ = *tok;
-00223                         *(*buf)++ = '\"';
-00224                         *(*buf)++ = '>';
-00225                         for (tok = token + 29; *(tok+2); tok++)                         
-00226                                 if(*tok != '\"')                        
-00227                                         *(*buf)++ = *tok;               
-00228                         pushString(buf, "</a>");
-00229                 }
-00230                 else if (!strncmp(token, "img ", 4)) {
-00231                         const char *src = strstr(token, "src");
-00232                         if (!src)               // assert we have a src attribute
-00233                                 return false;
-00234 
-00235                         *(*buf)++ = '<';
-00236                         for (const char *c = token; *c; c++) {
-00237                                 if (c == src) {
-00238                                         for (;((*c) && (*c != '"')); c++)
-00239                                                 *(*buf)++ = *c;
-00240 
-00241                                         if (!*c) { c--; continue; }
-00242 
-00243                                         *(*buf)++ = '"';
-00244                                         if (*(c+1) == '/') {
-00245                                                 pushString(buf, "file:");
-00246                                                 pushString(buf, module->getConfigEntry("AbsoluteDataPath"));
-00247                                                 if (*((*buf)-1) == '/')
-00248                                                         c++;            // skip '/'
-00249                                         }
-00250                                         continue;
-00251                                 }
-00252                                 *(*buf)++ = *c;
-00253                         }
-00254                         *(*buf)++ = '>';
-00255                 }
-00256                 else if (!strncmp(token, "note", 4)) {
-00257                         pushString(buf, " <small><font color=\"#800000\">(");
-00258                 }                
-00259                 else {
-00260                         *(*buf)++ = '<';
-00261                         for (const char *tok = token; *tok; tok++)
-00262                                 *(*buf)++ = *tok;
-00263                         *(*buf)++ = '>';
-00264                         //return false;  // we still didn't handle token
-00265                 }
-00266         }
-00267         return true;
-00268 }
-00269 
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlhtmlhref_8h-source.html b/doc/api-documentation/html/thmlhtmlhref_8h-source.html deleted file mode 100644 index b151b17..0000000 --- a/doc/api-documentation/html/thmlhtmlhref_8h-source.html +++ /dev/null @@ -1,45 +0,0 @@ - - -thmlhtmlhref.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlhtmlhref.h

00001 /***************************************************************************
-00002                           thmlhtmlhref.h  -  description
-00003                              -------------------
-00004     begin                : 2001-09-03
-00005     copyright            : 2001 by CrossWire Bible Society
-00006  ***************************************************************************/
-00007 
-00008 /***************************************************************************
-00009  *                                                                         *
-00010  *   This program is free software; you can redistribute it and/or modify  *
-00011  *   it under the terms of the GNU General Public License as published by  *
-00012  *   the Free Software Foundation; either version 2 of the License, or     *
-00013  *   (at your option) any later version.                                   *
-00014  *                                                                         *
-00015  ***************************************************************************/
-00016 
-00017 #ifndef _THMLHTMLHREF_H
-00018 #define _THMLHTMLHREF_H
-00019 
-00020 #include <swbasicfilter.h>
-00021 
-00022 #include <defs.h>
-00023 
-00026 class SWDLLEXPORT ThMLHTMLHREF : public SWBasicFilter {
-00027 protected:
-00028         virtual bool handleToken(char **buf, const char *token, DualStringMap &userData);
-00029 public:
-00030         ThMLHTMLHREF();
-00031 };
-00032 
-00033 #endif /* _THMLHTMLHREF_H */
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmllemma_8cpp-source.html b/doc/api-documentation/html/thmllemma_8cpp-source.html deleted file mode 100644 index a5895e8..0000000 --- a/doc/api-documentation/html/thmllemma_8cpp-source.html +++ /dev/null @@ -1,111 +0,0 @@ - - -thmllemma.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmllemma.cpp

00001 /******************************************************************************
-00002  *
-00003  * thmllemma -  SWFilter decendant to hide or show lemmas
-00004  *                      in a ThML module.
-00005  */
-00006 
-00007 
-00008 #include <stdlib.h>
-00009 #include <string.h>
-00010 #include <thmllemma.h>
-00011 #ifndef __GNUC__
-00012 #else
-00013 #include <unixstr.h>
-00014 #endif
-00015 
-00016 
-00017 const char ThMLLemma::on[] = "On";
-00018 const char ThMLLemma::off[] = "Off";
-00019 const char ThMLLemma::optName[] = "Lemmas";
-00020 const char ThMLLemma::optTip[] = "Toggles Lemmas On and Off if they exist";
-00021 
-00022 ThMLLemma::ThMLLemma() {
-00023         option = false;
-00024         options.push_back(on);
-00025         options.push_back(off);
-00026 }
-00027 
-00028 
-00029 ThMLLemma::~ThMLLemma() {
-00030 }
-00031 
-00032 void ThMLLemma::setOptionValue(const char *ival)
-00033 {
-00034         option = (!stricmp(ival, on));
-00035 }
-00036 
-00037 const char *ThMLLemma::getOptionValue()
-00038 {
-00039         return (option) ? on:off;
-00040 }
-00041 
-00042 char ThMLLemma::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00043 {
-00044         if (!option) {  // if we don't want lemmas
-00045                 char *to, *from, token[2048]; // cheese.  Fix.
-00046                 int tokpos = 0;
-00047                 bool intoken = false;
-00048                 int len;
-00049                 bool lastspace = false;
-00050 
-00051                 len = strlen(text) + 1; // shift string to right of buffer
-00052                 if (len < maxlen) {
-00053                         memmove(&text[maxlen - len], text, len);
-00054                         from = &text[maxlen - len];
-00055                 }
-00056                 else    from = text;    // -------------------------------
-00057 
-00058                 for (to = text; *from; from++) {
-00059                         if (*from == '<') {
-00060                                 intoken = true;
-00061                                 tokpos = 0;
-00062                                 token[0] = 0;
-00063                                 token[1] = 0;
-00064                                 token[2] = 0;
-00065                                 continue;
-00066                         }
-00067                         if (*from == '>') {     // process tokens
-00068                                 intoken = false;
-00069                                 if (!strnicmp(token, "sync type=\"lemma\" ", 18)) {     // Lemma
-00070                                   if ((from[1] == ' ') || (from[1] == ',') || (from[1] == ';') || (from[1] == '.') || (from[1] == '?') || (from[1] == '!') || (from[1] == ')') || (from[1] == '\'') || (from[1] == '\"')) {
-00071                                     if (lastspace)
-00072                                       to--;
-00073                                   }
-00074                                   continue;
-00075                                 }
-00076                                 // if not a lemma token, keep token in text
-00077                                 *to++ = '<';
-00078                                 for (char *tok = token; *tok; tok++)
-00079                                         *to++ = *tok;
-00080                                 *to++ = '>';
-00081                                 continue;
-00082                         }
-00083                         if (intoken) {
-00084                                 if (tokpos < 2045)
-00085                                         token[tokpos++] = *from;
-00086                                         token[tokpos+2] = 0;
-00087                         }
-00088                         else    {
-00089                                 *to++ = *from;
-00090                                 lastspace = (*from == ' ');
-00091                         }
-00092                 }
-00093                 *to++ = 0;
-00094                 *to = 0;
-00095         }
-00096         return 0;
-00097 }
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmllemma_8h-source.html b/doc/api-documentation/html/thmllemma_8h-source.html deleted file mode 100644 index cff85fb..0000000 --- a/doc/api-documentation/html/thmllemma_8h-source.html +++ /dev/null @@ -1,70 +0,0 @@ - - -thmllemma.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmllemma.h

00001 /*
-00002  *
-00003  * $Id: 
-00004  *
-00005  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00006  *      CrossWire Bible Society
-00007  *      P. O. Box 2528
-00008  *      Tempe, AZ  85280-2528
-00009  *
-00010  * This program is free software; you can redistribute it and/or modify it
-00011  * under the terms of the GNU General Public License as published by the
-00012  * Free Software Foundation version 2.
-00013  *
-00014  * This program is distributed in the hope that it will be useful, but
-00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00017  * General Public License for more details.
-00018  *
-00019  */
-00020 
-00021 #ifndef THMLLEMMA_H
-00022 #define THMLLEMMA_H
-00023 
-00024 #include <swfilter.h>
-00025 
-00026 #include <defs.h>
-00027 
-00030 class SWDLLEXPORT ThMLLemma:public SWFilter
-00031 {
-00032   bool option;
-00033   static const char on[];
-00034   static const char off[];
-00035   static const char optName[];
-00036   static const char optTip[];
-00037   OptionsList options;
-00038 public:
-00039     ThMLLemma ();
-00040     virtual ~ ThMLLemma ();
-00041   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00042   virtual const char *getOptionName ()
-00043   {
-00044     return optName;
-00045   }
-00046   virtual const char *getOptionTip ()
-00047   {
-00048     return optTip;
-00049   }
-00050   virtual void setOptionValue (const char *ival);
-00051   virtual const char *getOptionValue ();
-00052   virtual OptionsList getOptionValues ()
-00053   {
-00054     return options;
-00055   }
-00056 };
-00057 
-00058 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlmorph_8cpp-source.html b/doc/api-documentation/html/thmlmorph_8cpp-source.html deleted file mode 100644 index 411f8d3..0000000 --- a/doc/api-documentation/html/thmlmorph_8cpp-source.html +++ /dev/null @@ -1,112 +0,0 @@ - - -thmlmorph.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlmorph.cpp

00001 /******************************************************************************
-00002  *
-00003  * thmlmorph -  SWFilter decendant to hide or show morph tags
-00004  *                      in a ThML module.
-00005  */
-00006 
-00007 
-00008 #include <stdlib.h>
-00009 #include <string.h>
-00010 #include <thmlmorph.h>
-00011 #ifndef __GNUC__
-00012 #else
-00013 #include <unixstr.h>
-00014 #endif
-00015 
-00016 
-00017 const char ThMLMorph::on[] = "On";
-00018 const char ThMLMorph::off[] = "Off";
-00019 const char ThMLMorph::optName[] = "Morphological Tags";
-00020 const char ThMLMorph::optTip[] = "Toggles Morphological Tags On and Off if they exist";
-00021 
-00022 
-00023 ThMLMorph::ThMLMorph() {
-00024         option = false;
-00025         options.push_back(on);
-00026         options.push_back(off);
-00027 }
-00028 
-00029 
-00030 ThMLMorph::~ThMLMorph() {
-00031 }
-00032 
-00033 void ThMLMorph::setOptionValue(const char *ival)
-00034 {
-00035         option = (!stricmp(ival, on));
-00036 }
-00037 
-00038 const char *ThMLMorph::getOptionValue()
-00039 {
-00040         return (option) ? on:off;
-00041 }
-00042 
-00043 char ThMLMorph::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00044 {
-00045         if (!option) {  // if we don't want morph tags
-00046                 char *to, *from, token[2048]; // cheese.  Fix.
-00047                 int tokpos = 0;
-00048                 bool intoken = false;
-00049                 int len;
-00050                 bool lastspace = false;
-00051 
-00052                 len = strlen(text) + 1; // shift string to right of buffer
-00053                 if (len < maxlen) {
-00054                         memmove(&text[maxlen - len], text, len);
-00055                         from = &text[maxlen - len];
-00056                 }
-00057                 else    from = text;    // -------------------------------
-00058 
-00059                 for (to = text; *from; from++) {
-00060                         if (*from == '<') {
-00061                                 intoken = true;
-00062                                 tokpos = 0;
-00063                                 token[0] = 0;
-00064                                 token[1] = 0;
-00065                                 token[2] = 0;
-00066                                 continue;
-00067                         }
-00068                         if (*from == '>') {     // process tokens
-00069                                 intoken = false;
-00070                                 if (!strnicmp(token, "sync type=\"morph\" ", 18)) {     // Morph
-00071                                   if ((from[1] == ' ') || (from[1] == ',') || (from[1] == ';') || (from[1] == '.') || (from[1] == '?') || (from[1] == '!') || (from[1] == ')') || (from[1] == '\'') || (from[1] == '\"')) {
-00072                                     if (lastspace)
-00073                                       to--;
-00074                                   }
-00075                                   continue;
-00076                                 }
-00077                                 // if not a morph tag token, keep token in text
-00078                                 *to++ = '<';
-00079                                 for (char *tok = token; *tok; tok++)
-00080                                         *to++ = *tok;
-00081                                 *to++ = '>';
-00082                                 continue;
-00083                         }
-00084                         if (intoken) {
-00085                                 if (tokpos < 2045)
-00086                                         token[tokpos++] = *from;
-00087                                         token[tokpos+2] = 0;
-00088                         }
-00089                         else    {
-00090                                 *to++ = *from;
-00091                                 lastspace = (*from == ' ');
-00092                         }
-00093                 }
-00094                 *to++ = 0;
-00095                 *to = 0;
-00096         }
-00097         return 0;
-00098 }
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlmorph_8h-source.html b/doc/api-documentation/html/thmlmorph_8h-source.html deleted file mode 100644 index 533af3c..0000000 --- a/doc/api-documentation/html/thmlmorph_8h-source.html +++ /dev/null @@ -1,69 +0,0 @@ - - -thmlmorph.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlmorph.h

00001 /*
-00002  * $Id:
-00003  *
-00004  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00005  *      CrossWire Bible Society
-00006  *      P. O. Box 2528
-00007  *      Tempe, AZ  85280-2528
-00008  *
-00009  * This program is free software; you can redistribute it and/or modify it
-00010  * under the terms of the GNU General Public License as published by the
-00011  * Free Software Foundation version 2.
-00012  *
-00013  * This program is distributed in the hope that it will be useful, but
-00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00016  * General Public License for more details.
-00017  *
-00018  */
-00019 
-00020 #ifndef THMLMORPH_H
-00021 #define THMLMORPH_H
-00022 
-00023 #include <swfilter.h>
-00024 
-00025 #include <defs.h>
-00026 
-00029 class SWDLLEXPORT ThMLMorph:public SWFilter
-00030 {
-00031   bool option;
-00032   static const char on[];
-00033   static const char off[];
-00034   static const char optName[];
-00035   static const char optTip[];
-00036   OptionsList options;
-00037 public:
-00038     ThMLMorph ();
-00039     virtual ~ ThMLMorph ();
-00040   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00041   virtual const char *getOptionName ()
-00042   {
-00043     return optName;
-00044   }
-00045   virtual const char *getOptionTip ()
-00046   {
-00047     return optTip;
-00048   }
-00049   virtual void setOptionValue (const char *ival);
-00050   virtual const char *getOptionValue ();
-00051   virtual OptionsList getOptionValues ()
-00052   {
-00053     return options;
-00054   }
-00055 };
-00056 
-00057 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlolb_8cpp-source.html b/doc/api-documentation/html/thmlolb_8cpp-source.html deleted file mode 100644 index fa78ebc..0000000 --- a/doc/api-documentation/html/thmlolb_8cpp-source.html +++ /dev/null @@ -1,257 +0,0 @@ - - -thmlolb.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlolb.cpp

00001 /***************************************************************************
-00002                      thmlolb.cpp  -  ThML to OLB filter
-00003                              -------------------
-00004     begin                : 2001-05-10
-00005     copyright            : 2001 by CrossWire Bible Society
-00006  ***************************************************************************/
-00007 
-00008 /***************************************************************************
-00009  *                                                                         *
-00010  *   This program is free software; you can redistribute it and/or modify  *
-00011  *   it under the terms of the GNU General Public License as published by  *
-00012  *   the Free Software Foundation; either version 2 of the License, or     *
-00013  *   (at your option) any later version.                                   *
-00014  *                                                                         *
-00015  ***************************************************************************/
-00016 
-00017 #include <stdlib.h>
-00018 #include <string.h>
-00019 #include <thmlolb.h>
-00020 
-00021 
-00022 ThMLOLB::ThMLOLB()
-00023 {
-00024 }
-00025 
-00026 
-00027 char ThMLOLB::ProcessText(char *text, int maxlen)
-00028 {
-00029   char *to, *from, token[2048];
-00030   int tokpos = 0;
-00031   bool intoken  = false;
-00032   int len;
-00033   bool ampersand = false;
-00034   int i;
-00035   
-00036   len = strlen(text) + 1;                                               // shift string to right of buffer
-00037   if (len < maxlen) {
-00038     memmove(&text[maxlen - len], text, len);
-00039     from = &text[maxlen - len];
-00040   }
-00041   else  from = text;                                                    // -------------------------------
-00042   for (to = text; *from; from++)
-00043     {
-00044       if (*from == '<') {
-00045         intoken = true;
-00046         tokpos = 0;
-00047         memset(token, 0, 2048);
-00048         ampersand = false;
-00049         continue;
-00050       }
-00051       else if (*from == '&') {
-00052         intoken = true;
-00053         tokpos = 0;
-00054         memset(token, 0, 2048);
-00055         ampersand = true;
-00056         continue;
-00057       }
-00058       if (*from == ';' && ampersand) {
-00059         intoken = false;
-00060         
-00061         if (!strncmp("nbsp", token, 4)) *to++ = ' ';
-00062         else if (!strncmp("quot", token, 4)) *to++ = '"';
-00063         else if (!strncmp("amp", token, 3)) *to++ = '&';
-00064         else if (!strncmp("lt", token, 2)) *to++ = '<';
-00065         else if (!strncmp("gt", token, 2)) *to++ = '>';
-00066         else if (!strncmp("brvbar", token, 6)) *to++ = '|';
-00067         else if (!strncmp("sect", token, 4)) *to++ = '§';
-00068         else if (!strncmp("copy", token, 4)) *to++ = '©';
-00069         else if (!strncmp("laquo", token, 5)) *to++ = '«';
-00070         else if (!strncmp("reg", token, 3)) *to++ = '®';
-00071         else if (!strncmp("acute", token, 5)) *to++ = '´';
-00072         else if (!strncmp("para", token, 4)) *to++ = '¶';
-00073         else if (!strncmp("raquo", token, 5)) *to++ = '»';
-00074         
-00075         else if (!strncmp("Aacute", token, 6)) *to++ = 'Á';
-00076         else if (!strncmp("Agrave", token, 6)) *to++ = 'À';
-00077         else if (!strncmp("Acirc", token, 5)) *to++ = 'Â';
-00078         else if (!strncmp("Auml", token, 4)) *to++ = 'Ä';
-00079         else if (!strncmp("Atilde", token, 6)) *to++ = 'Ã';
-00080         else if (!strncmp("Aring", token, 5)) *to++ = 'Å';
-00081         else if (!strncmp("aacute", token, 6)) *to++ = 'á';
-00082         else if (!strncmp("agrave", token, 6)) *to++ = 'à';
-00083         else if (!strncmp("acirc", token, 5)) *to++ = 'â';
-00084         else if (!strncmp("auml", token, 4)) *to++ = 'ä';
-00085         else if (!strncmp("atilde", token, 6)) *to++ = 'ã';
-00086         else if (!strncmp("aring", token, 5)) *to++ = 'å';
-00087         else if (!strncmp("Eacute", token, 6)) *to++ = 'É';
-00088         else if (!strncmp("Egrave", token, 6)) *to++ = 'È';
-00089         else if (!strncmp("Ecirc", token, 5)) *to++ = 'Ê';
-00090         else if (!strncmp("Euml", token, 4)) *to++ = 'Ë';
-00091         else if (!strncmp("eacute", token, 6)) *to++ = 'é';
-00092         else if (!strncmp("egrave", token, 6)) *to++ = 'è';
-00093         else if (!strncmp("ecirc", token, 5)) *to++ = 'ê';
-00094         else if (!strncmp("euml", token, 4)) *to++ = 'ë';
-00095         else if (!strncmp("Iacute", token, 6)) *to++ = 'Í';
-00096         else if (!strncmp("Igrave", token, 6)) *to++ = 'Ì';
-00097         else if (!strncmp("Icirc", token, 5)) *to++ = 'Î';
-00098         else if (!strncmp("Iuml", token, 4)) *to++ = 'Ï';
-00099         else if (!strncmp("iacute", token, 6)) *to++ = 'í';
-00100         else if (!strncmp("igrave", token, 6)) *to++ = 'ì';
-00101         else if (!strncmp("icirc", token, 5)) *to++ = 'î';
-00102         else if (!strncmp("iuml", token, 4)) *to++ = 'ï';
-00103         else if (!strncmp("Oacute", token, 6)) *to++ = 'Ó';
-00104         else if (!strncmp("Ograve", token, 6)) *to++ = 'Ò';
-00105         else if (!strncmp("Ocirc", token, 5)) *to++ = 'Ô';
-00106         else if (!strncmp("Ouml", token, 4)) *to++ = 'Ö';
-00107         else if (!strncmp("Otilde", token, 6)) *to++ = 'Õ';
-00108         else if (!strncmp("oacute", token, 6)) *to++ = 'ó';
-00109         else if (!strncmp("ograve", token, 6)) *to++ = 'ò';
-00110         else if (!strncmp("ocirc", token, 5)) *to++ = 'ô';
-00111         else if (!strncmp("ouml", token, 4)) *to++ = 'ö';
-00112         else if (!strncmp("otilde", token, 6)) *to++ = 'õ';
-00113         else if (!strncmp("Uacute", token, 6)) *to++ = 'Ú';
-00114         else if (!strncmp("Ugrave", token, 6)) *to++ = 'Ù';
-00115         else if (!strncmp("Ucirc", token, 5)) *to++ = 'Û';
-00116         else if (!strncmp("Uuml", token, 4)) *to++ = 'Ü';
-00117         else if (!strncmp("uacute", token, 6)) *to++ = 'ú';
-00118         else if (!strncmp("ugrave", token, 6)) *to++ = 'ù';
-00119         else if (!strncmp("ucirc", token, 5)) *to++ = 'û';
-00120         else if (!strncmp("uuml", token, 4)) *to++ = 'ü';
-00121         else if (!strncmp("Yacute", token, 6)) *to++ = 'Ý';
-00122         else if (!strncmp("yacute", token, 6)) *to++ = 'ý';
-00123         else if (!strncmp("yuml", token, 4)) *to++ = 'ÿ';
-00124         
-00125         else if (!strncmp("deg", token, 3)) *to++ = '°';
-00126         else if (!strncmp("plusmn", token, 6)) *to++ = '±';
-00127         else if (!strncmp("sup2", token, 4)) *to++ = '²';
-00128         else if (!strncmp("sup3", token, 4)) *to++ = '³';
-00129         else if (!strncmp("sup1", token, 4)) *to++ = '¹';
-00130         else if (!strncmp("nbsp", token, 4)) *to++ = 'º';
-00131         else if (!strncmp("pound", token, 5)) *to++ = '£';
-00132         else if (!strncmp("cent", token, 4)) *to++ = '¢';
-00133         else if (!strncmp("frac14", token, 6)) *to++ = '¼';
-00134         else if (!strncmp("frac12", token, 6)) *to++ = '½';
-00135         else if (!strncmp("frac34", token, 6)) *to++ = '¾';
-00136         else if (!strncmp("iquest", token, 6)) *to++ = '¿';
-00137         else if (!strncmp("iexcl", token, 5)) *to++ = '¡';
-00138         else if (!strncmp("ETH", token, 3)) *to++ = 'Ð';
-00139         else if (!strncmp("eth", token, 3)) *to++ = 'ð';
-00140         else if (!strncmp("THORN", token, 5)) *to++ = 'Þ';
-00141         else if (!strncmp("thorn", token, 5)) *to++ = 'þ';
-00142         else if (!strncmp("AElig", token, 5)) *to++ = 'Æ';
-00143         else if (!strncmp("aelig", token, 5)) *to++ = 'æ';
-00144         else if (!strncmp("Oslash", token, 6)) *to++ = 'Ø';
-00145         else if (!strncmp("curren", token, 6)) *to++ = '¤';
-00146         else if (!strncmp("Ccedil", token, 6)) *to++ = 'Ç';
-00147         else if (!strncmp("ccedil", token, 6)) *to++ = 'ç';
-00148         else if (!strncmp("szlig", token, 5)) *to++ = 'ß';
-00149         else if (!strncmp("Ntilde", token, 6)) *to++ = 'Ñ';
-00150         else if (!strncmp("ntilde", token, 6)) *to++ = 'ñ';
-00151         else if (!strncmp("yen", token, 3)) *to++ = '¥';
-00152         else if (!strncmp("not", token, 3)) *to++ = '¬';
-00153         else if (!strncmp("ordf", token, 4)) *to++ = 'ª';
-00154         else if (!strncmp("uml", token, 3)) *to++ = '¨';
-00155         else if (!strncmp("shy", token, 3)) *to++ = '­';
-00156         else if (!strncmp("macr", token, 4)) *to++ = '¯';
-00157         continue;
-00158         
-00159       }
-00160       else if (*from == '>' && !ampersand)
-00161         {
-00162           intoken = false;
-00163           // process desired tokens
-00164           if (!strncmp(token, "sync type=\"Strongs\" value=\"G", 27)) {
-00165                 *to++ = '<';
-00166                 for (i = 28; token[i] != '\"'; i++)
-00167                         *to++ = token[i];
-00168                 *to++ = '>';
-00169             continue;
-00170           }
-00171           else if (!strncmp(token, "sync type=\"Strongs\" value=\"H", 27)) {
-00172                 *to++ = '<';
-00173                 for (i = 28; token[i] != '\"'; i++)
-00174                         *to++ = token[i];
-00175                 *to++ = '>';
-00176             continue;
-00177           }
-00178           else if (!strncmp(token, "scripRef", 8)) {
-00179             *to++ = '#';
-00180             continue;
-00181           }
-00182           else if (!strncmp(token, "/scripRef", 9)) {
-00183             *to++ = ' ';
-00184             continue;
-00185           }
-00186           else if (!strncmp(token, "note ", 5)) {
-00187             *to++ = '{';
-00188             continue;
-00189           }
-00190           else if (!strncmp(token, "/note", 5)) {
-00191             *to++ = '}';
-00192             continue;
-00193           }
-00194           else if (!strnicmp(token, "font", 4)) {
-00195             *to++ = '\\';
-00196             *to++ = '\\';
-00197             continue;
-00198           }
-00199           else if (!strnicmp(token, "/font", 5)) {
-00200             *to++ = '\\';
-00201             *to++ = '\\';
-00202             continue;       
-00203           }
-00204           else switch(*token) {
-00205                   case 'I':                     // font tags
-00206                   case 'i':
-00207                     *to++ = '\\';
-00208                     *to++ = '@';
-00209                     continue;
-00210                   case 'B':             // bold start
-00211                   case 'b':
-00212                     *to++ = '\\';
-00213                     *to++ = '$';
-00214                     continue;
-00215                   case '/':
-00216                     switch(token[1]) {
-00217                     case 'I':
-00218                     case 'i':           // italic end
-00219                       *to++ = '\\';
-00220                       *to++ = '@';
-00221                       continue;
-00222                     case 'B':           // bold start
-00223                     case 'b':
-00224                       *to++ = '\\';
-00225                       *to++ = '$';
-00226                       continue;
-00227                     }
-00228                   }
-00229           continue;
-00230         }
-00231         if (intoken) {
-00232                 if (tokpos < 2047)
-00233                         token[tokpos++] = *from;
-00234      }
-00235         else    *to++ = *from;
-00236   }
-00237   *to++ = 0;
-00238   *to = 0;
-00239   return 0;
-00240 }
-00241 
-00242 
-00243 
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlolb_8h-source.html b/doc/api-documentation/html/thmlolb_8h-source.html deleted file mode 100644 index 0561fb6..0000000 --- a/doc/api-documentation/html/thmlolb_8h-source.html +++ /dev/null @@ -1,49 +0,0 @@ - - -thmlolb.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlolb.h

00001 /*
-00002  *
-00003  * thmlolb.h
-00004  *
-00005  * Copyright 2001 CrossWire Bible Society (http://www.crosswire.org)
-00006  *      CrossWire Bible Society
-00007  *      P. O. Box 2528
-00008  *      Tempe, AZ  85280-2528
-00009  *
-00010  * This program is free software; you can redistribute it and/or modify it
-00011  * under the terms of the GNU General Public License as published by the
-00012  * Free Software Foundation version 2.
-00013  *
-00014  * This program is distributed in the hope that it will be useful, but
-00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00017  * General Public License for more details.
-00018  *
-00019  */
-00020 
-00021 #ifndef THMLOLB_H
-00022 #define THMLOLB_H
-00023 
-00024 #include <swfilter.h>
-00025 
-00026 #include <defs.h>
-00027 
-00030 class SWDLLEXPORT ThMLOLB:public SWFilter
-00031 {
-00032 public:
-00033   ThMLOLB ();
-00034   virtual char ProcessText (char *text, int maxlen = -1);
-00035 };
-00036 
-00037 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlosis_8cpp-source.html b/doc/api-documentation/html/thmlosis_8cpp-source.html deleted file mode 100644 index 1fdebd0..0000000 --- a/doc/api-documentation/html/thmlosis_8cpp-source.html +++ /dev/null @@ -1,344 +0,0 @@ - - -thmlosis.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlosis.cpp

00001 /******************************************************************************
-00002  *
-00003  * thmlstrongs -        SWFilter decendant to hide or show strongs number
-00004  *                      in a ThML module.
-00005  */
-00006 
-00007 
-00008 #include <stdlib.h>
-00009 #include <stdio.h>
-00010 #include <string.h>
-00011 #include <thmlosis.h>
-00012 #include <swmodule.h>
-00013 #include <versekey.h>
-00014 #ifndef __GNUC__
-00015 #else
-00016 #include <unixstr.h>
-00017 #endif
-00018 
-00019 
-00020 ThMLOSIS::ThMLOSIS() {
-00021 }
-00022 
-00023 
-00024 ThMLOSIS::~ThMLOSIS() {
-00025 }
-00026 
-00027 
-00028 char ThMLOSIS::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module) {
-00029 
-00030         char *to, *from, token[2048]; // cheese.  Fix.
-00031         int tokpos = 0;
-00032         bool intoken = false;
-00033         int len;
-00034         bool lastspace = false;
-00035         int word = 1;
-00036         char val[128];
-00037         char buf[128];
-00038         char wordstr[5];
-00039         char *valto;
-00040         char *ch;
-00041         char *textStart, *textEnd;
-00042         char *wordStart, *wordEnd;
-00043         bool newText = false;
-00044         bool newWord = false;
-00045         string tmp;
-00046         bool suspendTextPassThru = false;
-00047         bool keepToken = false;
-00048 
-00049         len = strlen(text) + 1; // shift string to right of buffer
-00050         if (len < maxlen) {
-00051                 memmove(&text[maxlen - len], text, len);
-00052                 from = &text[maxlen - len];
-00053         }
-00054         else    from = text;
-00055         
-00056         textStart = from;
-00057         wordStart = text;
-00058 
-00059         // -------------------------------
-00060 
-00061         for (to = text; *from; from++) {
-00062                 if (*from == '<') {
-00063                         intoken = true;
-00064                         tokpos = 0;
-00065                         token[0] = 0;
-00066                         token[1] = 0;
-00067                         token[2] = 0;
-00068                         textEnd = from-1;
-00069                         wordEnd = to;
-00070                         continue;
-00071                 }
-00072                 if (*from == '>') {     // process tokens
-00073                         intoken = false;
-00074                         keepToken = false;
-00075                         suspendTextPassThru = false;
-00076                         newWord = true;
-00077 
-00078 
-00079                         while (wordStart < (text+maxlen)) {
-00080 //                              if (strchr(" ,;.?!()'\"", *wordStart))
-00081                                 if (strchr(";,: .?!()'\"", *wordStart))
-00082                                         wordStart++;
-00083                                 else break;
-00084                         }
-00085                         while (wordEnd > wordStart) {
-00086                                 if (strchr(" ,;:.?!()'\"", *wordEnd))
-00087                                         wordEnd--;
-00088                                 else break;
-00089                         }
-00090 
-00091                         // Scripture Reference
-00092                         if (!strncmp(token, "scripRef", 8)) {
-00093         //                      pushString(buf, "<reference work=\"Bible.KJV\" reference=\"");
-00094                                 suspendTextPassThru = true;
-00095                                 newText = true;
-00096                         }
-00097                         else    if (!strncmp(token, "/scripRef", 9)) {
-00098                                 tmp = "";
-00099                                 tmp.append(textStart, (int)(textEnd - textStart)+1);
-00100                                 pushString(&to, convertToOSIS(tmp.c_str(), key));
-00101                                 suspendTextPassThru = false;
-00102                         }
-00103 
-00104                         // Footnote
-00105                         if (!strcmp(token, "note")) {
-00106         //                      pushString(buf, "<reference work=\"Bible.KJV\" reference=\"");
-00107                                 suspendTextPassThru = true;
-00108                                 newText = true;
-00109                         }
-00110                         else    if (!strcmp(token, "/note")) {
-00111                                 tmp = "<note type=\"x-StudyNote\"><notePart type=\"x-MainText\">";
-00112                                 tmp.append(textStart, (int)(textEnd - textStart)+1);
-00113                                 tmp += "</notePart></note>";
-00114                                 pushString(&to, tmp.c_str());
-00115                                 suspendTextPassThru = false;
-00116                         }
-00117 
-00118                         // Figure
-00119                         else    if (!strncmp(token, "img ", 4)) {
-00120                                 const char *src = strstr(token, "src");
-00121                                 if (!src)               // assert we have a src attribute
-00122                                         return false;
-00123 
-00124                                 pushString(&to, "<figure src=\"");
-00125                                 const char *c;
-00126                                 for (c = src;((*c) && (*c != '"')); c++);
-00127 
-00128                                 /* uncomment for SWORD absolute path logic
-00129                                 if (*(c+1) == '/') {
-00130                                         pushString(buf, "file:");
-00131                                         pushString(buf, module->getConfigEntry("AbsoluteDataPath"));
-00132                                         if (*((*buf)-1) == '/')
-00133                                                 c++;            // skip '/'
-00134                                 }
-00135                                 end of uncomment for asolute path logic */
-00136 
-00137                                 for (c++;((*c) && (*c != '"')); c++)
-00138                                         *to++ = *c;
-00139 
-00140                                 pushString(&to, "\" />");
-00141                                 return true;
-00142                         }
-00143 
-00144                         // Strongs numbers
-00145                         else    if (!strnicmp(token, "sync type=\"Strongs\" ", 20)) {   // Strongs
-00146                                 if (module->isProcessEntryAttributes()) {
-00147                                         valto = val;
-00148                                         for (unsigned int i = 27; token[i] != '\"' && i < 150; i++)
-00149                                                 *valto++ = token[i];
-00150                                         *valto = 0;
-00151                                         if (atoi((!isdigit(*val))?val+1:val) < 5627) {
-00152                                                 // normal strongs number
-00153                                                 strstrip(val);
-00154                                                 sprintf(buf, "<w lemma=\"x-Strong:%s\">", val);
-00155                                                 memmove(wordStart+strlen(buf), wordStart, (to-wordStart)+1);
-00156                                                 memcpy(wordStart, buf, strlen(buf));
-00157                                                 to+=strlen(buf);
-00158                                                 pushString(&to, "</w>");
-00159                                                 module->getEntryAttributes()["Word"][wordstr]["Strongs"] = val;
-00160 //                                              tmp = "";
-00161 //                                              tmp.append(textStart, (int)(wordEnd - wordStart));
-00162 //                                              module->getEntryAttributes()["Word"][wordstr]["Text"] = tmp;
-00163                                         }
-00164                                         else {
-00165                                                 // verb morph
-00166                                                 sprintf(wordstr, "%03d", word-1);
-00167                                                 module->getEntryAttributes()["Word"][wordstr]["Morph"] = val;
-00168                                         }
-00169                                 }
-00170                         }
-00171 
-00172                         // Morphology
-00173                         else    if (!strncmp(token, "sync type=\"morph\"", 17)) {
-00174                                 for (ch = token+17; *ch; ch++) {
-00175                                         if (!strncmp(ch, "class=\"", 7)) {
-00176                                                 valto = val;
-00177                                                 for (unsigned int i = 7; ch[i] != '\"' && i < 127; i++)
-00178                                                         *valto++ = ch[i];
-00179                                                 *valto = 0;
-00180                                                 sprintf(wordstr, "%03d", word-1);
-00181                                                 strstrip(val);
-00182                                                 module->getEntryAttributes()["Word"][wordstr]["MorphClass"] = val;
-00183                                         }
-00184                                         if (!strncmp(ch, "value=\"", 7)) {
-00185                                                 valto = val;
-00186                                                 for (unsigned int i = 7; ch[i] != '\"' && i < 127; i++)
-00187                                                         *valto++ = ch[i];
-00188                                                 *valto = 0;
-00189                                                 sprintf(wordstr, "%03d", word-1);
-00190                                                 strstrip(val);
-00191                                                 module->getEntryAttributes()["Word"][wordstr]["Morph"] = val;
-00192                                         }
-00193                                 }
-00194                                 if (!strncmp(wordStart, "<w ", 3)) {
-00195 
-00196                                         const char *cls = "Unknown", *morph;
-00197 
-00198                                         if (module->getEntryAttributes()["Word"][wordstr]["Morph"].size() > 0) {
-00199                                                 if (module->getEntryAttributes()["Word"][wordstr]["MorphClass"].size() > 0)
-00200                                                         cls = module->getEntryAttributes()["Word"][wordstr]["MorphClass"].c_str();
-00201                                                 morph = module->getEntryAttributes()["Word"][wordstr]["Morph"].c_str();
-00202                                         
-00203                                                 sprintf(buf, "morph=\"x-%s:%s\" ", cls, morph);
-00204                                                 memmove(wordStart+3+strlen(buf), wordStart+3, (to-wordStart)+1);
-00205                                                 memcpy(wordStart+3, buf, strlen(buf));
-00206                                                 to+=strlen(buf);
-00207                                         }
-00208                                 }
-00209                         }
-00210 
-00211                         if (!keepToken) {       // if we don't want strongs
-00212                                 if (strchr(" ,:;.?!()'\"", from[1])) {
-00213                                         if (lastspace)
-00214                                                 to--;
-00215                                 }
-00216                                 if (newText) {textStart = from+1; newText = false; }
-00217 //                              if (newWord) {wordStart = to; newWord = false; }
-00218                                 continue;
-00219                         }
-00220                         // if not a strongs token, keep token in text
-00221                         *to++ = '<';
-00222                         for (char *tok = token; *tok; tok++)
-00223                                 *to++ = *tok;
-00224                         *to++ = '>';
-00225                         if (newText) {textStart = to; newWord = false; }
-00226 //                      if (newWord) {wordStart = to; newWord = false; }
-00227                         continue;
-00228                 }
-00229                 if (intoken) {
-00230                         if ((tokpos < 2045) && ((*from != 10)&&(*from != 13))) {
-00231                                 token[tokpos++] = *from;
-00232                                 token[tokpos+2] = 0;
-00233                         }
-00234                 }
-00235                 else    {
-00236                         if (newWord && (*from != ' ')) {wordStart = to; newWord = false; memset(to, 0, 10); }
-00237                         if (!suspendTextPassThru) {
-00238                                 *to++ = *from;
-00239                                 lastspace = (*from == ' ');
-00240                         }
-00241                 }
-00242         }
-00243 
-00244         VerseKey *vkey = SWDYNAMIC_CAST(VerseKey, key);
-00245         if (vkey) {
-00246                 char ref[254];
-00247                 if (vkey->Verse())
-00248                         sprintf(ref, "<verseStart ref=\"%s\" />", vkey->getOSISRef());
-00249                 else if (vkey->Chapter())
-00250                         sprintf(ref, "<chapterStart ref=\"%s\" />", vkey->getOSISRef());
-00251                 else if (vkey->Book())
-00252                         sprintf(ref, "<bookStart ref=\"%s\" />", vkey->getOSISRef());
-00253                 else *ref = 0;
-00254                 if (*ref) {
-00255                         memmove(text+strlen(ref), text, maxlen-strlen(ref)-1);
-00256                         memcpy(text, ref, strlen(ref));
-00257                         to+=strlen(ref);
-00258                         if (vkey->Verse()) {
-00259                                 VerseKey tmp;
-00260                                 tmp = *vkey;
-00261                                 tmp.AutoNormalize(0);
-00262                                 tmp.Headings(1);
-00263                                 sprintf(ref, "<verseEnd ref=\"%s\" />", vkey->getOSISRef());
-00264                                 pushString(&to, ref);
-00265                                 tmp = MAXVERSE;
-00266                                 if (*vkey == tmp) {
-00267                                         tmp.Verse(0);
-00268                                         sprintf(ref, "<chapterEnd ref=\"%s\" />", tmp.getOSISRef());
-00269                                         pushString(&to, ref);
-00270                                         tmp = MAXCHAPTER;
-00271                                         tmp = MAXVERSE;
-00272                                         if (*vkey == tmp) {
-00273                                                 tmp.Chapter(0);
-00274                                                 tmp.Verse(0);
-00275                                                 sprintf(ref, "<bookEnd ref=\"%s\" />", tmp.getOSISRef());
-00276                                                 pushString(&to, ref);
-00277                                         }
-00278                                 }
-00279                         }
-00280 
-00281                         else if (vkey->Chapter())
-00282                                 sprintf(ref, "<chapterStart ref=\"%s\" />", vkey->getOSISRef());
-00283                         else sprintf(ref, "<bookStart ref=\"%s\" />", vkey->getOSISRef());
-00284                 }
-00285         }
-00286         *to++ = 0;
-00287         *to = 0;
-00288         return 0;
-00289 }
-00290 
-00291 
-00292 void ThMLOSIS::pushString(char **buf, const char *format, ...) {
-00293   va_list argptr;
-00294 
-00295   va_start(argptr, format);
-00296   *buf += vsprintf(*buf, format, argptr);
-00297   va_end(argptr);
-00298 
-00299 //  *buf += strlen(*buf);
-00300 }
-00301 
-00302 
-00303 const char *ThMLOSIS::convertToOSIS(const char *inRef, const SWKey *key) {
-00304         static string outRef;
-00305 
-00306         outRef = "";
-00307 
-00308         VerseKey defLanguage;
-00309         ListKey verses = defLanguage.ParseVerseList(inRef, (*key), true);
-00310         const char *startFrag = inRef;
-00311         for (int i = 0; i < verses.Count(); i++) {
-00312                 VerseKey *element = SWDYNAMIC_CAST(VerseKey, verses.GetElement(i));
-00313                 char buf[5120];
-00314                 char frag[800];
-00315                 if (element) {
-00316                         memmove(frag, startFrag, ((const char *)element->userData - startFrag) + 1);
-00317                         frag[((const char *)element->userData - startFrag) + 1] = 0;
-00318                         startFrag = (const char *)element->userData + 1;
-00319                         sprintf(buf, "<reference refStart=\"KJV:%s\" refEnd=\"%s\">%s</reference>", element->LowerBound().getOSISRef(), element->UpperBound().getOSISRef(), frag);
-00320                 }
-00321                 else {
-00322                         memmove(frag, startFrag, ((const char *)verses.GetElement(i)->userData - startFrag) + 1);
-00323                         frag[((const char *)verses.GetElement(i)->userData - startFrag) + 1] = 0;
-00324                         startFrag = (const char *)verses.GetElement(i)->userData + 1;
-00325                         sprintf(buf, "<reference refStart=\"KJV:%s\">%s</reference>", VerseKey(*verses.GetElement(i)).getOSISRef(), frag);
-00326                 }
-00327                 outRef+=buf;
-00328         }
-00329         return outRef.c_str();
-00330 }
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlosis_8h-source.html b/doc/api-documentation/html/thmlosis_8h-source.html deleted file mode 100644 index 863d48e..0000000 --- a/doc/api-documentation/html/thmlosis_8h-source.html +++ /dev/null @@ -1,47 +0,0 @@ - - -thmlosis.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlosis.h

00001 /***************************************************************************
-00002                           thmlosis.h  -  description
-00003                              -------------------
-00004     begin                : 2001-09-03
-00005     copyright            : 2001 by CrossWire Bible Society
-00006  ***************************************************************************/
-00007 
-00008 /***************************************************************************
-00009  *                                                                         *
-00010  *   This program is free software; you can redistribute it and/or modify  *
-00011  *   it under the terms of the GNU General Public License as published by  *
-00012  *   the Free Software Foundation; either version 2 of the License, or     *
-00013  *   (at your option) any later version.                                   *
-00014  *                                                                         *
-00015  ***************************************************************************/
-00016 
-00017 #ifndef THMLOSIS_H
-00018 #define THMLOSIS_H
-00019 
-00020 #include <defs.h>
-00021 #include <swfilter.h>
-00022 
-00025 class SWDLLEXPORT ThMLOSIS : public SWFilter {
-00026 protected:
-00027         virtual const char *convertToOSIS(const char *, const SWKey *key);
-00028         void pushString(char **buf, const char *format, ...);
-00029 public:
-00030         ThMLOSIS();
-00031         virtual ~ThMLOSIS();
-00032         char ProcessText(char *text, int maxlen, const SWKey *, const SWModule * = 0);
-00033 };
-00034 
-00035 #endif /* THMLOSIS_H */
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlplain_8cpp-source.html b/doc/api-documentation/html/thmlplain_8cpp-source.html deleted file mode 100644 index a7b4dbe..0000000 --- a/doc/api-documentation/html/thmlplain_8cpp-source.html +++ /dev/null @@ -1,215 +0,0 @@ - - -thmlplain.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlplain.cpp

00001 /******************************************************************************
-00002  *
-00003  * thmlplain -  SWFilter decendant to strip out all ThML tags or convert to
-00004  *              ASCII rendered symbols.
-00005  */
-00006 
-00007 
-00008 #include <stdlib.h>
-00009 #include <string.h>
-00010 #include <thmlplain.h>
-00011 
-00012 
-00013 ThMLPlain::ThMLPlain() {
-00014 }
-00015 
-00016 
-00017 char ThMLPlain::ProcessText(char *text, int maxlen)
-00018 {
-00019         char *to, *from, token[2048];
-00020         int tokpos = 0;
-00021         bool intoken = false;
-00022         int len;
-00023         bool ampersand = false;
-00024 
-00025         len = strlen(text) + 1;                                         // shift string to right of buffer
-00026         if (len < maxlen) {
-00027                 memmove(&text[maxlen - len], text, len);
-00028                 from = &text[maxlen - len];
-00029         }
-00030         else    from = text;                                                    // -------------------------------
-00031 
-00032         for (to = text; *from; from++) {
-00033                 if (*from == 10 || *from == 13)
-00034                         from++;
-00035                 if (*from == '<') {
-00036                         intoken = true;
-00037                         tokpos = 0;
-00038                         token[0] = 0;
-00039                         token[1] = 0;
-00040                         token[2] = 0;
-00041                         ampersand = false;
-00042                         continue;
-00043                 }
-00044                 else if (*from == '&') {
-00045                         intoken = true;
-00046                         tokpos = 0;
-00047                         token[0] = 0;
-00048                         token[1] = 0;
-00049                         token[2] = 0;
-00050                         ampersand = true;
-00051                         continue;
-00052                 }
-00053                 if (*from == ';' && ampersand) {
-00054                         intoken = false;
-00055 
-00056                         if (!strncmp("nbsp", token, 4)) *to++ = ' ';
-00057                         else if (!strncmp("quot", token, 4)) *to++ = '"';
-00058                         else if (!strncmp("amp", token, 3)) *to++ = '&';
-00059                         else if (!strncmp("lt", token, 2)) *to++ = '<';
-00060                         else if (!strncmp("gt", token, 2)) *to++ = '>';
-00061                         else if (!strncmp("brvbar", token, 6)) *to++ = '|';
-00062                         else if (!strncmp("sect", token, 4)) *to++ = '§';
-00063                         else if (!strncmp("copy", token, 4)) *to++ = '©';
-00064                         else if (!strncmp("laquo", token, 5)) *to++ = '«';
-00065                         else if (!strncmp("reg", token, 3)) *to++ = '®';
-00066                         else if (!strncmp("acute", token, 5)) *to++ = '´';
-00067                         else if (!strncmp("para", token, 4)) *to++ = '¶';
-00068                         else if (!strncmp("raquo", token, 5)) *to++ = '»';
-00069 
-00070                         else if (!strncmp("Aacute", token, 6)) *to++ = 'Á';
-00071                         else if (!strncmp("Agrave", token, 6)) *to++ = 'À';
-00072                         else if (!strncmp("Acirc", token, 5)) *to++ = 'Â';
-00073                         else if (!strncmp("Auml", token, 4)) *to++ = 'Ä';
-00074                         else if (!strncmp("Atilde", token, 6)) *to++ = 'Ã';
-00075                         else if (!strncmp("Aring", token, 5)) *to++ = 'Å';
-00076                         else if (!strncmp("aacute", token, 6)) *to++ = 'á';
-00077                         else if (!strncmp("agrave", token, 6)) *to++ = 'à';
-00078                         else if (!strncmp("acirc", token, 5)) *to++ = 'â';
-00079                         else if (!strncmp("auml", token, 4)) *to++ = 'ä';
-00080                         else if (!strncmp("atilde", token, 6)) *to++ = 'ã';
-00081                         else if (!strncmp("aring", token, 5)) *to++ = 'å';
-00082                         else if (!strncmp("Eacute", token, 6)) *to++ = 'É';
-00083                         else if (!strncmp("Egrave", token, 6)) *to++ = 'È';
-00084                         else if (!strncmp("Ecirc", token, 5)) *to++ = 'Ê';
-00085                         else if (!strncmp("Euml", token, 4)) *to++ = 'Ë';
-00086                         else if (!strncmp("eacute", token, 6)) *to++ = 'é';
-00087                         else if (!strncmp("egrave", token, 6)) *to++ = 'è';
-00088                         else if (!strncmp("ecirc", token, 5)) *to++ = 'ê';
-00089                         else if (!strncmp("euml", token, 4)) *to++ = 'ë';
-00090                         else if (!strncmp("Iacute", token, 6)) *to++ = 'Í';
-00091                         else if (!strncmp("Igrave", token, 6)) *to++ = 'Ì';
-00092                         else if (!strncmp("Icirc", token, 5)) *to++ = 'Î';
-00093                         else if (!strncmp("Iuml", token, 4)) *to++ = 'Ï';
-00094                         else if (!strncmp("iacute", token, 6)) *to++ = 'í';
-00095                         else if (!strncmp("igrave", token, 6)) *to++ = 'ì';
-00096                         else if (!strncmp("icirc", token, 5)) *to++ = 'î';
-00097                         else if (!strncmp("iuml", token, 4)) *to++ = 'ï';
-00098                         else if (!strncmp("Oacute", token, 6)) *to++ = 'Ó';
-00099                         else if (!strncmp("Ograve", token, 6)) *to++ = 'Ò';
-00100                         else if (!strncmp("Ocirc", token, 5)) *to++ = 'Ô';
-00101                         else if (!strncmp("Ouml", token, 4)) *to++ = 'Ö';
-00102                         else if (!strncmp("Otilde", token, 6)) *to++ = 'Õ';
-00103                         else if (!strncmp("oacute", token, 6)) *to++ = 'ó';
-00104                         else if (!strncmp("ograve", token, 6)) *to++ = 'ò';
-00105                         else if (!strncmp("ocirc", token, 5)) *to++ = 'ô';
-00106                         else if (!strncmp("ouml", token, 4)) *to++ = 'ö';
-00107                         else if (!strncmp("otilde", token, 6)) *to++ = 'õ';
-00108                         else if (!strncmp("Uacute", token, 6)) *to++ = 'Ú';
-00109                         else if (!strncmp("Ugrave", token, 6)) *to++ = 'Ù';
-00110                         else if (!strncmp("Ucirc", token, 5)) *to++ = 'Û';
-00111                         else if (!strncmp("Uuml", token, 4)) *to++ = 'Ü';
-00112                         else if (!strncmp("uacute", token, 6)) *to++ = 'ú';
-00113                         else if (!strncmp("ugrave", token, 6)) *to++ = 'ù';
-00114                         else if (!strncmp("ucirc", token, 5)) *to++ = 'û';
-00115                         else if (!strncmp("uuml", token, 4)) *to++ = 'ü';
-00116                         else if (!strncmp("Yacute", token, 6)) *to++ = 'Ý';
-00117                         else if (!strncmp("yacute", token, 6)) *to++ = 'ý';
-00118                         else if (!strncmp("yuml", token, 4)) *to++ = 'ÿ';
-00119 
-00120                         else if (!strncmp("deg", token, 3)) *to++ = '°';
-00121                         else if (!strncmp("plusmn", token, 6)) *to++ = '±';
-00122                         else if (!strncmp("sup2", token, 4)) *to++ = '²';
-00123                         else if (!strncmp("sup3", token, 4)) *to++ = '³';
-00124                         else if (!strncmp("sup1", token, 4)) *to++ = '¹';
-00125                         else if (!strncmp("nbsp", token, 4)) *to++ = 'º';
-00126                         else if (!strncmp("pound", token, 5)) *to++ = '£';
-00127                         else if (!strncmp("cent", token, 4)) *to++ = '¢';
-00128                         else if (!strncmp("frac14", token, 6)) *to++ = '¼';
-00129                         else if (!strncmp("frac12", token, 6)) *to++ = '½';
-00130                         else if (!strncmp("frac34", token, 6)) *to++ = '¾';
-00131                         else if (!strncmp("iquest", token, 6)) *to++ = '¿';
-00132                         else if (!strncmp("iexcl", token, 5)) *to++ = '¡';
-00133                         else if (!strncmp("ETH", token, 3)) *to++ = 'Ð';
-00134                         else if (!strncmp("eth", token, 3)) *to++ = 'ð';
-00135                         else if (!strncmp("THORN", token, 5)) *to++ = 'Þ';
-00136                         else if (!strncmp("thorn", token, 5)) *to++ = 'þ';
-00137                         else if (!strncmp("AElig", token, 5)) *to++ = 'Æ';
-00138                         else if (!strncmp("aelig", token, 5)) *to++ = 'æ';
-00139                         else if (!strncmp("Oslash", token, 6)) *to++ = 'Ø';
-00140                         else if (!strncmp("curren", token, 6)) *to++ = '¤';
-00141                         else if (!strncmp("Ccedil", token, 6)) *to++ = 'Ç';
-00142                         else if (!strncmp("ccedil", token, 6)) *to++ = 'ç';
-00143                         else if (!strncmp("szlig", token, 5)) *to++ = 'ß';
-00144                         else if (!strncmp("Ntilde", token, 6)) *to++ = 'Ñ';
-00145                         else if (!strncmp("ntilde", token, 6)) *to++ = 'ñ';
-00146                         else if (!strncmp("yen", token, 3)) *to++ = '¥';
-00147                         else if (!strncmp("not", token, 3)) *to++ = '¬';
-00148                         else if (!strncmp("ordf", token, 4)) *to++ = 'ª';
-00149                         else if (!strncmp("uml", token, 3)) *to++ = '¨';
-00150                         else if (!strncmp("shy", token, 3)) *to++ = '­';
-00151                         else if (!strncmp("macr", token, 4)) *to++ = '¯';
-00152                         continue;
-00153 
-00154                 }
-00155                 else if (*from == '>' && !ampersand) {
-00156                         intoken = false;
-00157                         // process desired tokens
-00158                         if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
-00159                                 *to++ = ' ';
-00160                                 *to++ = '<';
-00161                                 for (unsigned int i = 27; token[i] != '\"'; i++)
-00162                                         *to++ = token[i];
-00163                                 *to++ = '>';
-00164                                 continue;
-00165                         }
-00166                         if (!strncmp(token, "sync type=\"morph\" value=\"", 25)) {
-00167                                 *to++ = ' ';
-00168                                 *to++ = '(';
-00169                                 for (unsigned int i = 25; token[i] != '\"'; i++)
-00170                                         *to++ = token[i];
-00171                                 *to++ = ')';
-00172                                 continue;
-00173                         }
-00174                         if (!strncmp("note", token, 4)) {
-00175                                 *to++ = ' ';
-00176                                 *to++ = '(';
-00177                         }
-00178                         else if (!strncmp("br", token, 2))
-00179                                 *to++ = '\n';
-00180                         else if (!strncmp("/p", token, 2))
-00181                                 *to++ = '\n';
-00182                         else if (!strncmp("/note", token, 5)) {
-00183                                 *to++ = ')';
-00184                                 *to++ = ' ';
-00185                         }
-00186                         continue;
-00187                 }
-00188                 if (intoken) {
-00189                         if (tokpos < 2045)
-00190                                 token[tokpos++] = *from;
-00191                                 token[tokpos+2] = 0;
-00192                 }
-00193                 else    *to++ = *from;
-00194         }
-00195         *to++ = 0;
-00196         *to = 0;
-00197 
-00198         return 0;
-00199 }
-00200 
-00201 
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlplain_8h-source.html b/doc/api-documentation/html/thmlplain_8h-source.html deleted file mode 100644 index a0abf92..0000000 --- a/doc/api-documentation/html/thmlplain_8h-source.html +++ /dev/null @@ -1,49 +0,0 @@ - - -thmlplain.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlplain.h

00001 /*
-00002  *
-00003  * thmlplain.h
-00004  *
-00005  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00006  *      CrossWire Bible Society
-00007  *      P. O. Box 2528
-00008  *      Tempe, AZ  85280-2528
-00009  *
-00010  * This program is free software; you can redistribute it and/or modify it
-00011  * under the terms of the GNU General Public License as published by the
-00012  * Free Software Foundation version 2.
-00013  *
-00014  * This program is distributed in the hope that it will be useful, but
-00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00017  * General Public License for more details.
-00018  *
-00019  */
-00020 
-00021 #ifndef THMLPLAIN_H
-00022 #define THMLPLAIN_H
-00023 
-00024 #include <swfilter.h>
-00025 
-00026 #include <defs.h>
-00027 
-00030 class SWDLLEXPORT ThMLPlain:public SWFilter
-00031 {
-00032 public:
-00033   ThMLPlain ();
-00034   virtual char ProcessText (char *text, int maxlen = -1);
-00035 };
-00036 
-00037 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlrtf_8cpp-source.html b/doc/api-documentation/html/thmlrtf_8cpp-source.html deleted file mode 100644 index 2db4b10..0000000 --- a/doc/api-documentation/html/thmlrtf_8cpp-source.html +++ /dev/null @@ -1,236 +0,0 @@ - - -thmlrtf.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlrtf.cpp

00001 /***************************************************************************
-00002                      thmlrtf.cpp  -  ThML to RTF filter
-00003                              -------------------
-00004     begin                : 1999-10-27
-00005     copyright            : 2001 by CrossWire Bible Society
-00006  ***************************************************************************/
-00007 
-00008 /***************************************************************************
-00009  *                                                                         *
-00010  *   This program is free software; you can redistribute it and/or modify  *
-00011  *   it under the terms of the GNU General Public License as published by  *
-00012  *   the Free Software Foundation; either version 2 of the License, or     *
-00013  *   (at your option) any later version.                                   *
-00014  *                                                                         *
-00015  ***************************************************************************/
-00016 
-00017 #include <stdlib.h>
-00018 #include <string.h>
-00019 #include <thmlrtf.h>
-00020 
-00021 
-00022 ThMLRTF::ThMLRTF()
-00023 {
-00024         setTokenStart("<");
-00025         setTokenEnd(">");
-00026 
-00027         setEscapeStart("&");
-00028         setEscapeEnd(";");
-00029 
-00030         setEscapeStringCaseSensitive(true);
-00031 
-00032         addEscapeStringSubstitute("nbsp", " ");
-00033         addEscapeStringSubstitute("quot", "\"");
-00034         addEscapeStringSubstitute("amp", "&");
-00035         addEscapeStringSubstitute("lt", "<");
-00036         addEscapeStringSubstitute("gt", ">");
-00037         addEscapeStringSubstitute("brvbar", "|");
-00038         addEscapeStringSubstitute("sect", "§");
-00039         addEscapeStringSubstitute("copy", "©");
-00040         addEscapeStringSubstitute("laquo", "«");
-00041         addEscapeStringSubstitute("reg", "®");
-00042         addEscapeStringSubstitute("acute", "´");
-00043         addEscapeStringSubstitute("para", "¶");
-00044         addEscapeStringSubstitute("raquo", "»");
-00045 
-00046         addEscapeStringSubstitute("Aacute", "Á");
-00047         addEscapeStringSubstitute("Agrave", "À");
-00048         addEscapeStringSubstitute("Acirc", "Â");
-00049         addEscapeStringSubstitute("Auml", "Ä");
-00050         addEscapeStringSubstitute("Atilde", "Ã");
-00051         addEscapeStringSubstitute("Aring", "Å");
-00052         addEscapeStringSubstitute("aacute", "á");
-00053         addEscapeStringSubstitute("agrave", "à");
-00054         addEscapeStringSubstitute("acirc", "â");
-00055         addEscapeStringSubstitute("auml", "ä");
-00056         addEscapeStringSubstitute("atilde", "ã");
-00057         addEscapeStringSubstitute("aring", "å");
-00058         addEscapeStringSubstitute("Eacute", "É");
-00059         addEscapeStringSubstitute("Egrave", "È");
-00060         addEscapeStringSubstitute("Ecirc", "Ê");
-00061         addEscapeStringSubstitute("Euml", "Ë");
-00062         addEscapeStringSubstitute("eacute", "é");
-00063         addEscapeStringSubstitute("egrave", "è");
-00064         addEscapeStringSubstitute("ecirc", "ê");
-00065         addEscapeStringSubstitute("euml", "ë");
-00066         addEscapeStringSubstitute("Iacute", "Í");
-00067         addEscapeStringSubstitute("Igrave", "Ì");
-00068         addEscapeStringSubstitute("Icirc", "Î");
-00069         addEscapeStringSubstitute("Iuml", "Ï");
-00070         addEscapeStringSubstitute("iacute", "í");
-00071         addEscapeStringSubstitute("igrave", "ì");
-00072         addEscapeStringSubstitute("icirc", "î");
-00073         addEscapeStringSubstitute("iuml", "ï");
-00074         addEscapeStringSubstitute("Oacute", "Ó");
-00075         addEscapeStringSubstitute("Ograve", "Ò");
-00076         addEscapeStringSubstitute("Ocirc", "Ô");
-00077         addEscapeStringSubstitute("Ouml", "Ö");
-00078         addEscapeStringSubstitute("Otilde", "Õ");
-00079         addEscapeStringSubstitute("oacute", "ó");
-00080         addEscapeStringSubstitute("ograve", "ò");
-00081         addEscapeStringSubstitute("ocirc", "ô");
-00082         addEscapeStringSubstitute("ouml", "ö");
-00083         addEscapeStringSubstitute("otilde", "õ");
-00084         addEscapeStringSubstitute("Uacute", "Ú");
-00085         addEscapeStringSubstitute("Ugrave", "Ù");
-00086         addEscapeStringSubstitute("Ucirc", "Û");
-00087         addEscapeStringSubstitute("Uuml", "Ü");
-00088         addEscapeStringSubstitute("uacute", "ú");
-00089         addEscapeStringSubstitute("ugrave", "ù");
-00090         addEscapeStringSubstitute("ucirc", "û");
-00091         addEscapeStringSubstitute("uuml", "ü");
-00092         addEscapeStringSubstitute("Yacute", "Ý");
-00093         addEscapeStringSubstitute("yacute", "ý");
-00094         addEscapeStringSubstitute("yuml", "ÿ");
-00095 
-00096         addEscapeStringSubstitute("deg", "°");
-00097         addEscapeStringSubstitute("plusmn", "±");
-00098         addEscapeStringSubstitute("sup2", "²");
-00099         addEscapeStringSubstitute("sup3", "³");
-00100         addEscapeStringSubstitute("sup1", "¹");
-00101         addEscapeStringSubstitute("nbsp", "º");
-00102         addEscapeStringSubstitute("pound", "£");
-00103         addEscapeStringSubstitute("cent", "¢");
-00104         addEscapeStringSubstitute("frac14", "¼");
-00105         addEscapeStringSubstitute("frac12", "½");
-00106         addEscapeStringSubstitute("frac34", "¾");
-00107         addEscapeStringSubstitute("iquest", "¿");
-00108         addEscapeStringSubstitute("iexcl", "¡");
-00109         addEscapeStringSubstitute("ETH", "Ð");
-00110         addEscapeStringSubstitute("eth", "ð");
-00111         addEscapeStringSubstitute("THORN", "Þ");
-00112         addEscapeStringSubstitute("thorn", "þ");
-00113         addEscapeStringSubstitute("AElig", "Æ");
-00114         addEscapeStringSubstitute("aelig", "æ");
-00115         addEscapeStringSubstitute("Oslash", "Ø");
-00116         addEscapeStringSubstitute("curren", "¤");
-00117         addEscapeStringSubstitute("Ccedil", "Ç");
-00118         addEscapeStringSubstitute("ccedil", "ç");
-00119         addEscapeStringSubstitute("szlig", "ß");
-00120         addEscapeStringSubstitute("Ntilde", "Ñ");
-00121         addEscapeStringSubstitute("ntilde", "ñ");
-00122         addEscapeStringSubstitute("yen", "¥");
-00123         addEscapeStringSubstitute("not", "¬");
-00124         addEscapeStringSubstitute("ordf", "ª");
-00125         addEscapeStringSubstitute("uml", "¨");
-00126         addEscapeStringSubstitute("shy", "­");
-00127         addEscapeStringSubstitute("macr", "¯");
-00128 
-00129         setTokenCaseSensitive(true);
-00130 
-00131         addTokenSubstitute("/note", ") }");
-00132 
-00133         addTokenSubstitute("br", "\\line ");
-00134         addTokenSubstitute("br /", "\\line ");
-00135         addTokenSubstitute("i", "{\\i1 ");
-00136         addTokenSubstitute("/i", "}");
-00137         addTokenSubstitute("b", "{\\b1 ");
-00138         addTokenSubstitute("/b", "}");
-00139         addTokenSubstitute("p", "\\par ");
-00140 
-00141         //we need uppercase forms for the moment to support a few early ThML modules that aren't XHTML compliant
-00142         addTokenSubstitute("BR", "\\line ");
-00143         addTokenSubstitute("I", "{\\i1 ");
-00144         addTokenSubstitute("/I", "}");
-00145         addTokenSubstitute("B", "{\\b1 ");
-00146         addTokenSubstitute("/B", "}");
-00147         addTokenSubstitute("P", "\\par ");
-00148 }
-00149 
-00150 bool ThMLRTF::handleToken(char **buf, const char *token, DualStringMap &userData) {
-00151         if (!substituteToken(buf, token)) {
-00152         // manually process if it wasn't a simple substitution
-00153                 if (!strncmp(token, "sync type=\"Strongs\" value=\"", 27)) {
-00154                         if (token[27] == 'H' || token[27] == 'G' || token[27] == 'A') {
-00155                                 pushString(buf, " {\\fs15 <");
-00156                                 for (unsigned int i = 28; token[i] != '\"'; i++)
-00157                                         *(*buf)++ = token[i];
-00158                                 pushString(buf, ">}");
-00159                                     }
-00160                                     else if (token[27] == 'T') {
-00161                                                   pushString(buf, " {\\fs15 (");
-00162                                 for (unsigned int i = 28; token[i] != '\"'; i++)
-00163                                         *(*buf)++ = token[i];
-00164                                 pushString(buf, ")}");
-00165                                     }
-00166                 }
-00167                 else if (!strncmp(token, "sync type=\"morph\" ", 18)) {
-00168                         pushString(buf, " {\\fs15 (");
-00169                         for (const char *tok = token + 5; *tok; tok++) {
-00170                                 if (!strncmp(tok, "value=\"", 7)) {
-00171                                         tok += 7;
-00172                                         for (;*tok != '\"'; tok++)
-00173                                                 *(*buf)++ = *tok;
-00174                                         break;
-00175                                 }
-00176                         }
-00177 
-00178                         pushString(buf, ")}");
-00179                 }
-00180                 else if (!strncmp(token, "sync type=\"lemma\" value=\"", 25)) {
-00181                         pushString(buf, "{\\fs15 (");
-00182                         for (unsigned int i = 25; token[i] != '\"'; i++)
-00183                                 *(*buf)++ = token[i];
-00184                         pushString(buf, ")}");
-00185                 }
-00186                 else if (!strncmp(token, "scripRef", 8)) {
-00187 //                      pushString(buf, "{\\cf2 #");
-00188                         pushString(buf, "<a href=\"\">");
-00189                 }
-00190                 else if (!strncmp(token, "/scripRef", 9)) {
-00191                         pushString(buf, "</a>");
-00192                 }
-00193                 else if (!strncmp(token, "div", 3)) {
-00194                         *(*buf)++ = '{';
-00195                         if (!strncmp(token, "div class=\"title\"", 17)) {
-00196                                 pushString(buf, "\\par\\i1\\b1 ");
-00197                                 userData["sechead"] = "true";
-00198                         }
-00199                         else if (!strncmp(token, "div class=\"sechead\"", 19)) {
-00200                                 pushString(buf, "\\par\\i1\\b1 ");
-00201                                 userData["sechead"] = "true";
-00202                         }
-00203                 }
-00204                 else if (!strncmp(token, "/div", 4)) {
-00205                         *(*buf)++ = '}';
-00206                         if (userData["sechead"] == "true") {
-00207                                 pushString(buf, "\\par ");
-00208                                 userData["sechead"] == "false";
-00209                         }
-00210                 }
-00211                 else if (!strncmp(token, "note", 4)) {
-00212                         pushString(buf, " {\\i1\\fs15 (");
-00213                 }
-00214 
-00215                 else {
-00216                         return false;  // we still didn't handle token
-00217                 }
-00218         }
-00219         return true;
-00220 }
-00221 
-00222 
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlrtf_8h-source.html b/doc/api-documentation/html/thmlrtf_8h-source.html deleted file mode 100644 index b98c878..0000000 --- a/doc/api-documentation/html/thmlrtf_8h-source.html +++ /dev/null @@ -1,50 +0,0 @@ - - -thmlrtf.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlrtf.h

00001 /*
-00002  *
-00003  * thmlrtf.h
-00004  *
-00005  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00006  *      CrossWire Bible Society
-00007  *      P. O. Box 2528
-00008  *      Tempe, AZ  85280-2528
-00009  *
-00010  * This program is free software; you can redistribute it and/or modify it
-00011  * under the terms of the GNU General Public License as published by the
-00012  * Free Software Foundation version 2.
-00013  *
-00014  * This program is distributed in the hope that it will be useful, but
-00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00017  * General Public License for more details.
-00018  *
-00019  */
-00020 
-00021 #ifndef THMLRTF_H
-00022 #define THMLRTF_H
-00023 
-00024 #include <swbasicfilter.h>
-00025 
-00026 #include <defs.h>
-00027 
-00030 class SWDLLEXPORT ThMLRTF:public SWBasicFilter
-00031 {
-00032 protected:
-00033   virtual bool handleToken(char **buf, const char *token, DualStringMap &userData);
-00034 public:
-00035   ThMLRTF ();
-00036 };
-00037 
-00038 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlscripref_8cpp-source.html b/doc/api-documentation/html/thmlscripref_8cpp-source.html deleted file mode 100644 index 154fff9..0000000 --- a/doc/api-documentation/html/thmlscripref_8cpp-source.html +++ /dev/null @@ -1,117 +0,0 @@ - - -thmlscripref.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlscripref.cpp

00001 /******************************************************************************
-00002  *
-00003  * thmlscripref -       SWFilter decendant to hide or show scripture references
-00004  *                      in a ThML module.
-00005  */
-00006 
-00007 
-00008 #include <stdlib.h>
-00009 #include <string.h>
-00010 #include <thmlscripref.h>
-00011 #ifndef __GNUC__
-00012 #else
-00013 #include <unixstr.h>
-00014 #endif
-00015 
-00016 
-00017 const char ThMLScripref::on[] = "On";
-00018 const char ThMLScripref::off[] = "Off";
-00019 const char ThMLScripref::optName[] = "Scripture Cross-references";
-00020 const char ThMLScripref::optTip[] = "Toggles Scripture Cross-references On and Off if they exist";
-00021 
-00022 
-00023 ThMLScripref::ThMLScripref() {
-00024         option = false;
-00025         options.push_back(on);
-00026         options.push_back(off);
-00027 }
-00028 
-00029 
-00030 ThMLScripref::~ThMLScripref() {
-00031 }
-00032 
-00033 void ThMLScripref::setOptionValue(const char *ival)
-00034 {
-00035         option = (!stricmp(ival, on));
-00036 }
-00037 
-00038 const char *ThMLScripref::getOptionValue()
-00039 {
-00040         return (option) ? on:off;
-00041 }
-00042 
-00043 char ThMLScripref::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00044 {
-00045         if (!option) {  // if we don't want scriprefs
-00046                 char *to, *from, token[2048]; // cheese.  Fix.
-00047                 int tokpos = 0;
-00048                 bool intoken = false;
-00049                 int len;
-00050                 bool hide = false;
-00051 
-00052                 len = strlen(text) + 1; // shift string to right of buffer
-00053                 if (len < maxlen) {
-00054                         memmove(&text[maxlen - len], text, len);
-00055                         from = &text[maxlen - len];
-00056                 }
-00057                 else    from = text;    // -------------------------------
-00058 
-00059                 for (to = text; *from; from++) {
-00060                         if (*from == '<') {
-00061                                 intoken = true;
-00062                                 tokpos = 0;
-00063                                 token[0] = 0;
-00064                                 token[1] = 0;
-00065                                 token[2] = 0;
-00066                                 continue;
-00067                         }
-00068                         if (*from == '>') {     // process tokens
-00069                                 intoken = false;
-00070                                 if (!strnicmp(token, "scripRef", 8)) {
-00071                                   hide = true;
-00072                                   continue;
-00073                                 }
-00074                                 else if (!strnicmp(token, "/scripRef", 9)) {
-00075                                   hide = false;
-00076                                   continue;
-00077                                 }
-00078 
-00079                                 // if not a scripref token, keep token in text
-00080                                 if (!hide) {
-00081                                         *to++ = '<';
-00082                                         for (char *tok = token; *tok; tok++)
-00083                                                 *to++ = *tok;
-00084                                         *to++ = '>';
-00085                                 }
-00086                                 continue;
-00087                         }
-00088                         if (intoken) {
-00089                                 if (tokpos < 2045)
-00090                                         token[tokpos++] = *from;
-00091                                         token[tokpos+2] = 0;
-00092                         }
-00093                         else    {
-00094                                 if (!hide) {
-00095                                         *to++ = *from;
-00096                                 }
-00097                         }
-00098                 }
-00099                 *to++ = 0;
-00100                 *to = 0;
-00101         }
-00102         return 0;
-00103 }
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlscripref_8h-source.html b/doc/api-documentation/html/thmlscripref_8h-source.html deleted file mode 100644 index d7effc5..0000000 --- a/doc/api-documentation/html/thmlscripref_8h-source.html +++ /dev/null @@ -1,70 +0,0 @@ - - -thmlscripref.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlscripref.h

00001 /*
-00002  *
-00003  * $Id: 
-00004  *
-00005  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00006  *      CrossWire Bible Society
-00007  *      P. O. Box 2528
-00008  *      Tempe, AZ  85280-2528
-00009  *
-00010  * This program is free software; you can redistribute it and/or modify it
-00011  * under the terms of the GNU General Public License as published by the
-00012  * Free Software Foundation version 2.
-00013  *
-00014  * This program is distributed in the hope that it will be useful, but
-00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00017  * General Public License for more details.
-00018  *
-00019  */
-00020 
-00021 #ifndef THMLSCRIPREF_H
-00022 #define THMLSCRIPREF_H
-00023 
-00024 #include <swfilter.h>
-00025 
-00026 #include <defs.h>
-00027 
-00030 class SWDLLEXPORT ThMLScripref:public SWFilter
-00031 {
-00032   bool option;
-00033   static const char on[];
-00034   static const char off[];
-00035   static const char optName[];
-00036   static const char optTip[];
-00037   OptionsList options;
-00038 public:
-00039   ThMLScripref ();
-00040   virtual ~ ThMLScripref ();
-00041   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00042   virtual const char *getOptionName ()
-00043   {
-00044     return optName;
-00045   }
-00046   virtual const char *getOptionTip ()
-00047   {
-00048     return optTip;
-00049   }
-00050   virtual void setOptionValue (const char *ival);
-00051   virtual const char *getOptionValue ();
-00052   virtual OptionsList getOptionValues ()
-00053   {
-00054     return options;
-00055   }
-00056 };
-00057 
-00058 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlstrongs_8cpp-source.html b/doc/api-documentation/html/thmlstrongs_8cpp-source.html deleted file mode 100644 index 0f02970..0000000 --- a/doc/api-documentation/html/thmlstrongs_8cpp-source.html +++ /dev/null @@ -1,170 +0,0 @@ - - -thmlstrongs.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlstrongs.cpp

00001 /******************************************************************************
-00002  *
-00003  * thmlstrongs -        SWFilter decendant to hide or show strongs number
-00004  *                      in a ThML module.
-00005  */
-00006 
-00007 
-00008 #include <stdlib.h>
-00009 #include <stdio.h>
-00010 #include <string.h>
-00011 #include <thmlstrongs.h>
-00012 #include <swmodule.h>
-00013 #ifndef __GNUC__
-00014 #else
-00015 #include <unixstr.h>
-00016 #endif
-00017 
-00018 
-00019 const char ThMLStrongs::on[] = "On";
-00020 const char ThMLStrongs::off[] = "Off";
-00021 const char ThMLStrongs::optName[] = "Strong's Numbers";
-00022 const char ThMLStrongs::optTip[] = "Toggles Strong's Numbers On and Off if they exist";
-00023 
-00024 
-00025 ThMLStrongs::ThMLStrongs() {
-00026         option = false;
-00027         options.push_back(on);
-00028         options.push_back(off);
-00029 }
-00030 
-00031 
-00032 ThMLStrongs::~ThMLStrongs() {
-00033 }
-00034 
-00035 void ThMLStrongs::setOptionValue(const char *ival)
-00036 {
-00037         option = (!stricmp(ival, on));
-00038 }
-00039 
-00040 const char *ThMLStrongs::getOptionValue()
-00041 {
-00042         return (option) ? on:off;
-00043 }
-00044 
-00045 char ThMLStrongs::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00046 {
-00047         char *to, *from, token[2048]; // cheese.  Fix.
-00048         int tokpos = 0;
-00049         bool intoken = false;
-00050         int len;
-00051         bool lastspace = false;
-00052         int word = 1;
-00053         char val[128];
-00054         char wordstr[5];
-00055         char *valto;
-00056         char *ch;
-00057         char *textStart = text, *textEnd = 0;
-00058         string tmp;
-00059         bool newText = false;
-00060 
-00061         len = strlen(text) + 1; // shift string to right of buffer
-00062         if (len < maxlen) {
-00063                 memmove(&text[maxlen - len], text, len);
-00064                 from = &text[maxlen - len];
-00065         }
-00066         else    from = text;
-00067         
-00068         // -------------------------------
-00069 
-00070         for (to = text; *from; from++) {
-00071                 if (*from == '<') {
-00072                         intoken = true;
-00073                         tokpos = 0;
-00074                         token[0] = 0;
-00075                         token[1] = 0;
-00076                         token[2] = 0;
-00077                         textEnd = to;
-00078                         continue;
-00079                 }
-00080                 if (*from == '>') {     // process tokens
-00081                         intoken = false;
-00082                         if (!strnicmp(token, "sync type=\"Strongs\" ", 20)) {   // Strongs
-00083                                 if (module->isProcessEntryAttributes()) {
-00084                                         valto = val;
-00085                                         for (unsigned int i = 27; token[i] != '\"' && i < 150; i++)
-00086                                                 *valto++ = token[i];
-00087                                         *valto = 0;
-00088                                         if (atoi((!isdigit(*val))?val+1:val) < 5627) {
-00089                                                 // normal strongs number
-00090                                                 sprintf(wordstr, "%03d", word++);
-00091                                                 module->getEntryAttributes()["Word"][wordstr]["Strongs"] = val;
-00092                                                 tmp = "";
-00093                                                 tmp.append(textStart, (int)(textEnd - textStart));
-00094                                                 module->getEntryAttributes()["Word"][wordstr]["Text"] = tmp;
-00095                                                 newText = true;
-00096                                         }
-00097                                         else {
-00098                                                 // verb morph
-00099                                                 sprintf(wordstr, "%03d", word-1);
-00100                                                 module->getEntryAttributes()["Word"][wordstr]["Morph"] = val;
-00101                                         }
-00102                                 }
-00103 
-00104                                 if (!option) {  // if we don't want strongs
-00105                                         if ((from[1] == ' ') || (from[1] == ',') || (from[1] == ';') || (from[1] == '.') || (from[1] == '?') || (from[1] == '!') || (from[1] == ')') || (from[1] == '\'') || (from[1] == '\"')) {
-00106                                                 if (lastspace)
-00107                                                         to--;
-00108                                         }
-00109                                         if (newText) {textStart = to; newText = false; }
-00110                                         continue;
-00111                                 }
-00112                         }
-00113                         if (module->isProcessEntryAttributes()) {
-00114                                 if (!strncmp(token, "sync type=\"morph\"", 17)) {
-00115                                         for (ch = token+17; *ch; ch++) {
-00116                                                 if (!strncmp(ch, "class=\"", 7)) {
-00117                                                         valto = val;
-00118                                                         for (unsigned int i = 7; ch[i] != '\"' && i < 127; i++)
-00119                                                                 *valto++ = ch[i];
-00120                                                         *valto = 0;
-00121                                                         sprintf(wordstr, "%03d", word-1);
-00122                                                         module->getEntryAttributes()["Word"][wordstr]["MorphClass"] = val;
-00123                                                 }
-00124                                                 if (!strncmp(ch, "value=\"", 7)) {
-00125                                                         valto = val;
-00126                                                         for (unsigned int i = 7; ch[i] != '\"' && i < 127; i++)
-00127                                                                 *valto++ = ch[i];
-00128                                                         *valto = 0;
-00129                                                         sprintf(wordstr, "%03d", word-1);
-00130                                                         module->getEntryAttributes()["Word"][wordstr]["Morph"] = val;
-00131                                                 }
-00132                                         }
-00133                                 }
-00134                         }
-00135                         // if not a strongs token, keep token in text
-00136                         *to++ = '<';
-00137                         for (char *tok = token; *tok; tok++)
-00138                                 *to++ = *tok;
-00139                         *to++ = '>';
-00140                         if (newText) {textStart = to; newText = false; }
-00141                         continue;
-00142                 }
-00143                 if (intoken) {
-00144                         if (tokpos < 2045)
-00145                                 token[tokpos++] = *from;
-00146                                 token[tokpos+2] = 0;
-00147                 }
-00148                 else    {
-00149                         *to++ = *from;
-00150                         lastspace = (*from == ' ');
-00151                 }
-00152         }
-00153         *to++ = 0;
-00154         *to = 0;
-00155         return 0;
-00156 }
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlstrongs_8h-source.html b/doc/api-documentation/html/thmlstrongs_8h-source.html deleted file mode 100644 index 6f24332..0000000 --- a/doc/api-documentation/html/thmlstrongs_8h-source.html +++ /dev/null @@ -1,70 +0,0 @@ - - -thmlstrongs.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlstrongs.h

00001 /*
-00002  *
-00003  * $Id:
-00004  *
-00005  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00006  *      CrossWire Bible Society
-00007  *      P. O. Box 2528
-00008  *      Tempe, AZ  85280-2528
-00009  *
-00010  * This program is free software; you can redistribute it and/or modify it
-00011  * under the terms of the GNU General Public License as published by the
-00012  * Free Software Foundation version 2.
-00013  *
-00014  * This program is distributed in the hope that it will be useful, but
-00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00017  * General Public License for more details.
-00018  *
-00019  */
-00020 
-00021 #ifndef THMLSTRONGS_H
-00022 #define THMLSTRONGS_H
-00023 
-00024 #include <swfilter.h>
-00025 
-00026 #include <defs.h>
-00027 
-00030 class SWDLLEXPORT ThMLStrongs:public SWFilter
-00031 {
-00032   bool option;
-00033   static const char on[];
-00034   static const char off[];
-00035   static const char optName[];
-00036   static const char optTip[];
-00037   OptionsList options;
-00038 public:
-00039     ThMLStrongs ();
-00040     virtual ~ ThMLStrongs ();
-00041   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00042   virtual const char *getOptionName ()
-00043   {
-00044     return optName;
-00045   }
-00046   virtual const char *getOptionTip ()
-00047   {
-00048     return optTip;
-00049   }
-00050   virtual void setOptionValue (const char *ival);
-00051   virtual const char *getOptionValue ();
-00052   virtual OptionsList getOptionValues ()
-00053   {
-00054     return options;
-00055   }
-00056 };
-00057 
-00058 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlvariants_8cpp-source.html b/doc/api-documentation/html/thmlvariants_8cpp-source.html deleted file mode 100644 index 1f5d6ba..0000000 --- a/doc/api-documentation/html/thmlvariants_8cpp-source.html +++ /dev/null @@ -1,199 +0,0 @@ - - -thmlvariants.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlvariants.cpp

00001 /******************************************************************************
-00002  *
-00003  * thmlvariants -       SWFilter decendant to hide or show textual variants
-00004  *                      in a ThML module.
-00005  */
-00006 
-00007 
-00008 #include <stdlib.h>
-00009 #include <string.h>
-00010 #include <thmlvariants.h>
-00011 #ifndef __GNUC__
-00012 #else
-00013 #include <unixstr.h>
-00014 #endif
-00015 
-00016 
-00017 const char ThMLVariants::primary[] = "Primary Reading";
-00018 const char ThMLVariants::secondary[] = "Secondary Reading";
-00019 const char ThMLVariants::all[] = "All Readings";
-00020 
-00021 const char ThMLVariants::optName[] = "Textual Variants";
-00022 const char ThMLVariants::optTip[] = "Switch between Textual Variants modes";
-00023 
-00024 
-00025 ThMLVariants::ThMLVariants() {
-00026         option = false;
-00027         options.push_back(primary);
-00028         options.push_back(secondary);
-00029         options.push_back(all);
-00030 }
-00031 
-00032 
-00033 ThMLVariants::~ThMLVariants() {
-00034 }
-00035 
-00036 void ThMLVariants::setOptionValue(const char *ival)
-00037 {
-00038         if (!stricmp(ival, primary)) option = 0;
-00039         else if (!stricmp(ival, secondary)) option = 1;
-00040         else option = 2;
-00041 }
-00042 
-00043 const char *ThMLVariants::getOptionValue()
-00044 {
-00045         if (option == 0) {
-00046                 return primary;
-00047         }
-00048         else if (option == 1) {
-00049                 return secondary;
-00050         }
-00051         else {
-00052                 return all;
-00053         }
-00054 }
-00055 
-00056 char ThMLVariants::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00057 {
-00058         if (option == 0) { //we want primary only
-00059                 char *to, *from, token[2048]; // cheese.  Fix.
-00060                 int tokpos = 0;
-00061                 bool intoken = false;
-00062                 int len;
-00063                 bool hide = false;
-00064 
-00065                 len = strlen(text) + 1; // shift string to right of buffer
-00066                 if (len < maxlen) {
-00067                         memmove(&text[maxlen - len], text, len);
-00068                         from = &text[maxlen - len];
-00069                 }
-00070                 else    from = text;
-00071                 
-00072                 // -------------------------------
-00073 
-00074                 for (to = text; *from; from++) {
-00075                         if (*from == '<') {
-00076                                 intoken = true;
-00077                                 tokpos = 0;
-00078                                 token[0] = 0;
-00079                                 token[1] = 0;
-00080                                 token[2] = 0;
-00081                                 continue;
-00082                         }
-00083                         if (*from == '>') {     // process tokens
-00084                                 intoken = false;
-00085                                 if (!strncmp(token, "div type=\"variant\" class=\"2\"", 28)) {
-00086                                   hide = true;
-00087                                   continue;
-00088                                 }
-00089                                 else if (!strncmp(token, "/div", 4)) {
-00090                                   hide = false;
-00091                                   continue;
-00092                                 }
-00093 
-00094                                 // if not a footnote token, keep token in text
-00095                                 if (!hide) {
-00096                                         *to++ = '<';
-00097                                         for (char *tok = token; *tok; tok++)
-00098                                                 *to++ = *tok;
-00099                                         *to++ = '>';
-00100                                 }
-00101                                 continue;
-00102                         }
-00103                         if (intoken) {
-00104                                 if (tokpos < 2045)
-00105                                         token[tokpos++] = *from;
-00106                                         token[tokpos+2] = 0;
-00107                         }
-00108                         else    {
-00109                                 if (!hide) {
-00110                                         *to++ = *from;
-00111                                 }
-00112                         }
-00113                 }
-00114                 *to++ = 0;
-00115                 *to = 0;
-00116 
-00117         }
-00118         else if (option == 1) { //we want variant only
-00119                 char *to, *from, token[2048]; // cheese.  Fix.
-00120                 int tokpos = 0;
-00121                 bool intoken = false;
-00122                 int len;
-00123                 bool hide = false;
-00124 
-00125                 len = strlen(text) + 1; // shift string to right of buffer
-00126                 if (len < maxlen) {
-00127                         memmove(&text[maxlen - len], text, len);
-00128                         from = &text[maxlen - len];
-00129                 }
-00130                 else    from = text;
-00131 
-00132                 // -------------------------------
-00133 
-00134                 for (to = text; *from; from++) {
-00135                         if (*from == '<') {
-00136                                 intoken = true;
-00137                                 tokpos = 0;
-00138                                 token[0] = 0;
-00139                                 token[1] = 0;
-00140                                 token[2] = 0;
-00141                                 continue;
-00142                         }
-00143                         if (*from == '>') {     // process tokens
-00144                                 intoken = false;
-00145                                 if (!strncmp(token, "div type=\"variant\" class=\"1\"", 28)) {
-00146                                   hide = true;
-00147                                   continue;
-00148                                 }
-00149                                 else if (!strncmp(token, "/div", 4)) {
-00150                                   hide = false;
-00151                                   continue;
-00152                                 }
-00153 
-00154                                 // if not a footnote token, keep token in text
-00155                                 if (!hide) {
-00156                                         *to++ = '<';
-00157                                         for (char *tok = token; *tok; tok++)
-00158                                                 *to++ = *tok;
-00159                                         *to++ = '>';
-00160                                 }
-00161                                 continue;
-00162                         }
-00163                         if (intoken) {
-00164                                 if (tokpos < 2045)
-00165                                         token[tokpos++] = *from;
-00166                                         token[tokpos+2] = 0;
-00167                         }
-00168                         else    {
-00169                                 if (!hide) {
-00170                                         *to++ = *from;
-00171                                 }
-00172                         }
-00173                 }
-00174                 *to++ = 0;
-00175                 *to = 0;
-00176 
-00177         }
-00178         return 0;
-00179 }
-00180 
-00181 
-00182 
-00183 
-00184 
-00185 
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/thmlvariants_8h-source.html b/doc/api-documentation/html/thmlvariants_8h-source.html deleted file mode 100644 index 3f06bbd..0000000 --- a/doc/api-documentation/html/thmlvariants_8h-source.html +++ /dev/null @@ -1,73 +0,0 @@ - - -thmlvariants.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

thmlvariants.h

00001 /*
-00002  *
-00003  * Copyright 2001 CrossWire Bible Society (http://www.crosswire.org)
-00004  *      CrossWire Bible Society
-00005  *      P. O. Box 2528
-00006  *      Tempe, AZ  85280-2528
-00007  *
-00008  * This program is free software; you can redistribute it and/or modify it
-00009  * under the terms of the GNU General Public License as published by the
-00010  * Free Software Foundation version 2.
-00011  *
-00012  * This program is distributed in the hope that it will be useful, but
-00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00015  * General Public License for more details.
-00016  *
-00017  */
-00018 
-00019 #ifndef THMLVARIANTS_H
-00020 #define THMLVARIANTS_H
-00021 
-00022 #include <swfilter.h>
-00023 #include <swmodule.h>
-00024 
-00025 #include <defs.h>
-00026 
-00029 class SWDLLEXPORT ThMLVariants : public SWFilter
-00030 {
-00031   char option;
-00032 
-00033   static const char primary[];
-00034   static const char secondary[];
-00035   static const char all[];
-00036 
-00037   static const char optName[];
-00038   static const char optTip[];
-00039   OptionsList options;
-00040 
-00041  public:
-00042   ThMLVariants ();
-00043   virtual ~ ThMLVariants ();
-00044   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00045   virtual const char *getOptionName ()
-00046     {
-00047       return optName;
-00048     }
-00049   virtual const char *getOptionTip ()
-00050     {
-00051       return optTip;
-00052     }
-00053   virtual void setOptionValue (const char *ival);
-00054   virtual const char *getOptionValue ();
-00055   virtual OptionsList getOptionValues ()
-00056     {
-00057       return options;
-00058     }
-00059 };
-00060 
-00061 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/treekey_8cpp-source.html b/doc/api-documentation/html/treekey_8cpp-source.html deleted file mode 100644 index 6232476..0000000 --- a/doc/api-documentation/html/treekey_8cpp-source.html +++ /dev/null @@ -1,44 +0,0 @@ - - -treekey.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

treekey.cpp

00001 /******************************************************************************
-00002  *  versekey.h - code for class 'versekey'- a standard Biblical verse key
-00003  *
-00004  * $Id: treekey_8cpp-source.html,v 1.3 2002/06/20 20:23:10 mgruner Exp $
-00005  *
-00006  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00007  *      CrossWire Bible Society
-00008  *      P. O. Box 2528
-00009  *      Tempe, AZ  85280-2528
-00010  *
-00011  * This program is free software; you can redistribute it and/or modify it
-00012  * under the terms of the GNU General Public License as published by the
-00013  * Free Software Foundation version 2.
-00014  *
-00015  * This program is distributed in the hope that it will be useful, but
-00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00018  * General Public License for more details.
-00019  *
-00020  */
-00021 
-00022 
-00023 #include <treekey.h>
-00024 
-00025 static const char *classes[] = {"TreeKey", "SWKey", "SWObject", 0};
-00026 SWClass TreeKey::classdef(classes);
-00027 
-00028 void TreeKey::init() {
-00029         myclass = &classdef;
-00030 }
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/treekey_8h-source.html b/doc/api-documentation/html/treekey_8h-source.html deleted file mode 100644 index d7d6da7..0000000 --- a/doc/api-documentation/html/treekey_8h-source.html +++ /dev/null @@ -1,99 +0,0 @@ - - -treekey.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

treekey.h

00001 /******************************************************************************
-00002  *  versekey.h - code for class 'versekey'- a standard Biblical verse key
-00003  *
-00004  * $Id: treekey_8h-source.html,v 1.3 2002/06/20 20:23:10 mgruner Exp $
-00005  *
-00006  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00007  *      CrossWire Bible Society
-00008  *      P. O. Box 2528
-00009  *      Tempe, AZ  85280-2528
-00010  *
-00011  * This program is free software; you can redistribute it and/or modify it
-00012  * under the terms of the GNU General Public License as published by the
-00013  * Free Software Foundation version 2.
-00014  *
-00015  * This program is distributed in the hope that it will be useful, but
-00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00018  * General Public License for more details.
-00019  *
-00020  */
-00021 
-00022 
-00023 #ifndef TREEKEY_H
-00024 #define TREEKEY_H
-00025 
-00026 #include <swkey.h>
-00027 #include <swmacs.h>
-00028 
-00029 #include <defs.h>
-00030 
-00031 
-00036 class SWDLLEXPORT TreeKey : public SWKey {
-00037         static SWClass classdef;
-00038         void init();
-00039 
-00040 public:
-00041 //      TreeKey (const char *ikey = 0);
-00042 //      TreeKey (const SWKey * ikey);
-00043 //      TreeKey (TreeKey const &k);
-00044         TreeKey () { init(); };
-00045         ~TreeKey () {};
-00046 
-00047 
-00048         virtual const char *getLocalName() = 0;
-00049         virtual const char *setLocalName(const char *) = 0;
-00050 
-00051         virtual const char *getUserData(int *size = 0) = 0;
-00052         virtual void setUserData(const char *userData, int size = 0) = 0;
-00053 
-00054         virtual const char *getFullName() const = 0;
-00055 
-00056         virtual void root() = 0;
-00057         virtual bool parent() = 0;
-00058 
-00059         virtual bool firstChild() = 0;
-00060         virtual bool nextSibling() = 0;
-00061         virtual bool previousSibling() = 0;
-00062 
-00063         virtual bool hasChildren() = 0;
-00064 
-00065         virtual void append() = 0;
-00066         virtual void appendChild() = 0;
-00067         virtual void insertBefore() = 0;
-00068 
-00069         virtual void remove() = 0;
-00070 
-00071         virtual void setOffset(unsigned long offset) = 0;
-00072         virtual unsigned long getOffset() const = 0;
-00073 
-00074         virtual void setText(const char *ikey) = 0;
-00075         virtual void setPosition(SW_POSITION p) = 0;
-00076         virtual const char *getText() const = 0;
-00077         virtual int compare(const SWKey &ikey) = 0;
-00078         virtual void decrement(int steps = 1) = 0;
-00079         virtual void increment(int steps = 1) = 0;
-00080         virtual char Traversable () { return 1; }
-00081         virtual long Index () const { return getOffset(); }
-00082         virtual long Index (long iindex) { setOffset(iindex); return getOffset(); }
-00083 
-00084         SWKEY_OPERATORS
-00085 
-00086         };
-00087 
-00088 
-00089 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/treekeyidx_8cpp-source.html b/doc/api-documentation/html/treekeyidx_8cpp-source.html deleted file mode 100644 index bb88f5b..0000000 --- a/doc/api-documentation/html/treekeyidx_8cpp-source.html +++ /dev/null @@ -1,604 +0,0 @@ - - -treekeyidx.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

treekeyidx.cpp

00001 /******************************************************************************
-00002  *  versekey.h - code for class 'versekey'- a standard Biblical verse key
-00003  *
-00004  * $Id: treekeyidx_8cpp-source.html,v 1.3 2002/06/20 20:23:10 mgruner Exp $
-00005  *
-00006  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00007  *      CrossWire Bible Society
-00008  *      P. O. Box 2528
-00009  *      Tempe, AZ  85280-2528
-00010  *
-00011  * This program is free software; you can redistribute it and/or modify it
-00012  * under the terms of the GNU General Public License as published by the
-00013  * Free Software Foundation version 2.
-00014  *
-00015  * This program is distributed in the hope that it will be useful, but
-00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00018  * General Public License for more details.
-00019  *
-00020  */
-00021 
-00022 
-00023 #include <treekeyidx.h>
-00024 #include <fcntl.h>
-00025 #include <stdio.h>
-00026 #include <errno.h>
-00027 #include <string>
-00028 
-00029 #ifndef __GNUC__
-00030 #include <io.h>
-00031 #else
-00032 #include <unistd.h>
-00033 #endif
-00034 
-00035 using namespace std;
-00036 static const char nl = '\n';
-00037 static const char *classes[] = {"TreeKeyIdx", "TreeKey", "SWKey", "SWObject", 0};
-00038 SWClass TreeKeyIdx::classdef(classes);
-00039 
-00040 
-00041 TreeKeyIdx::TreeKeyIdx(const TreeKeyIdx &ikey) : currentNode() {
-00042         init();
-00043         path = 0;
-00044         idxfd = 0;
-00045         datfd = 0;
-00046         copyFrom(ikey);
-00047 }
-00048 
-00049 TreeKeyIdx::TreeKeyIdx(const char *idxPath, int fileMode) : currentNode() {
-00050         char buf[127];
-00051 
-00052         init();
-00053         path = 0;
-00054         stdstr(&path, idxPath);
-00055 
-00056 #ifndef O_BINARY                // O_BINARY is needed in Borland C++ 4.53
-00057 #define O_BINARY 0              // If it hasn't been defined than we probably
-00058 #endif                          // don't need it.
-00059 
-00060         if (fileMode == -1) { // try read/write if possible
-00061                 fileMode = O_RDWR;
-00062         }
-00063                 
-00064         sprintf(buf, "%s.idx", path);
-00065         idxfd = FileMgr::systemFileMgr.open(buf, fileMode|O_BINARY, true);
-00066         sprintf(buf, "%s.dat", path);
-00067         datfd = FileMgr::systemFileMgr.open(buf, fileMode|O_BINARY, true);
-00068 
-00069         if (datfd <= 0) {
-00070                 sprintf(buf, "Error: %d", errno);
-00071                 perror(buf);
-00072                 error = errno;
-00073         }
-00074         else {
-00075                 root();
-00076         }
-00077 }
-00078 
-00079 
-00080 void TreeKeyIdx::init() {
-00081         myclass = &classdef;
-00082 }
-00083 
-00084 
-00085 TreeKeyIdx::~TreeKeyIdx () {
-00086         if (path)
-00087                 delete [] path;
-00088 
-00089         FileMgr::systemFileMgr.close(idxfd);
-00090         FileMgr::systemFileMgr.close(datfd);
-00091 }
-00092 
-00093 
-00094 const char *TreeKeyIdx::getLocalName() {
-00095         return currentNode.name;
-00096 }
-00097 
-00098 
-00099 const char *TreeKeyIdx::getUserData(int *size) {
-00100         if (size)
-00101                 *size = (int)currentNode.dsize;
-00102         return currentNode.userData;
-00103 }
-00104 
-00105 
-00106 void TreeKeyIdx::setUserData(const char *userData, int size) {
-00107         if (currentNode.userData)
-00108                 delete currentNode.userData;
-00109 
-00110         if (!size)
-00111                 size = strlen(userData) + 1;
-00112 
-00113         currentNode.userData = new char [ size ];
-00114         memcpy(currentNode.userData, userData, size);
-00115         currentNode.dsize = size;
-00116 }
-00117 
-00118 const char *TreeKeyIdx::setLocalName(const char *newName) {
-00119         stdstr(&(currentNode.name), newName);
-00120         return currentNode.name;
-00121 }
-00122 
-00123 
-00124 void TreeKeyIdx::save() {
-00125         saveTreeNode(&currentNode);
-00126 }
-00127 
-00128 
-00129 const char *TreeKeyIdx::getFullName() const {
-00130         TreeNode parent;
-00131         static string fullPath;
-00132         fullPath = currentNode.name;
-00133         parent.parent = currentNode.parent;
-00134         while (parent.parent > -1) {
-00135                 getTreeNodeFromIdxOffset(parent.parent, &parent);
-00136                 fullPath = ((string)parent.name) + (string) "/" + fullPath;
-00137         }
-00138         return fullPath.c_str();
-00139 }
-00140 
-00141 
-00142 void TreeKeyIdx::root() {
-00143         error = getTreeNodeFromIdxOffset(0, &currentNode);
-00144 }
-00145 
-00146 
-00147 bool TreeKeyIdx::parent() {
-00148         if (currentNode.parent > -1) {
-00149                 error = getTreeNodeFromIdxOffset(currentNode.parent, &currentNode);
-00150                 return true;
-00151         }
-00152         return false;
-00153 }
-00154 
-00155 
-00156 bool TreeKeyIdx::firstChild() {
-00157         if (currentNode.firstChild > -1) {
-00158                 error = getTreeNodeFromIdxOffset(currentNode.firstChild, &currentNode);
-00159                 return true;
-00160         }
-00161         return false;
-00162 }
-00163 
-00164 
-00165 bool TreeKeyIdx::nextSibling() {
-00166         if (currentNode.next > -1) {
-00167                 error = getTreeNodeFromIdxOffset(currentNode.next, &currentNode);
-00168                 return true;
-00169         }
-00170         return false;
-00171 }
-00172 
-00173 
-00174 bool TreeKeyIdx::previousSibling() {
-00175         TreeNode iterator;
-00176         __u32 target = currentNode.offset;
-00177         if (currentNode.parent > -1) {
-00178                 getTreeNodeFromIdxOffset(currentNode.parent, &iterator);
-00179                 getTreeNodeFromIdxOffset(iterator.firstChild, &iterator);
-00180                 if (iterator.offset != target) {
-00181                         while ((iterator.next != target) && (iterator.next > -1))
-00182                                 getTreeNodeFromIdxOffset(iterator.next, &iterator);
-00183                         if (iterator.next > -1) {
-00184                                 error = getTreeNodeFromIdxOffset(iterator.offset, &currentNode);
-00185                                 return true;
-00186                         }
-00187                 }
-00188         }
-00189         return false;
-00190 }
-00191 
-00192 
-00193 bool TreeKeyIdx::hasChildren() {
-00194         return (currentNode.firstChild > -1);
-00195 }
-00196 
-00197 
-00198 void TreeKeyIdx::append() {
-00199         TreeNode lastSib;
-00200         if (currentNode.offset) {
-00201                 getTreeNodeFromIdxOffset(currentNode.offset, &lastSib);
-00202                 while (lastSib.next > -1) {
-00203                         getTreeNodeFromIdxOffset(lastSib.next, &lastSib);
-00204                 }
-00205                 __u32 idxOffset = lseek(idxfd->getFd(), 0, SEEK_END);
-00206                 lastSib.next = idxOffset;
-00207                 saveTreeNodeOffsets(&lastSib);
-00208                 __u32 parent = currentNode.parent;
-00209                 currentNode.clear();
-00210                 currentNode.offset = idxOffset;
-00211                 currentNode.parent = parent;
-00212         }
-00213 }
-00214 
-00215 
-00216 void TreeKeyIdx::appendChild() {
-00217         if (firstChild()) {
-00218                 append();
-00219         }
-00220         else {
-00221                 __u32 idxOffset = lseek(idxfd->getFd(), 0, SEEK_END);
-00222                 currentNode.firstChild = idxOffset;
-00223                 saveTreeNodeOffsets(&currentNode);
-00224                 __u32 parent = currentNode.offset;
-00225                 currentNode.clear();
-00226                 currentNode.offset = idxOffset;
-00227                 currentNode.parent = parent;
-00228         }
-00229 }
-00230 
-00231 
-00232 void TreeKeyIdx::insertBefore() {
-00233 }
-00234 
-00235 
-00236 void TreeKeyIdx::remove() {
-00237 }
-00238 
-00239 
-00240 /******************************************************************************
-00241  * TreeKeyIdx::Create   - Creates new key idx/dat files
-00242  *
-00243  * ENT: path    - directory to store module files
-00244  * RET: error status
-00245  */
-00246 
-00247 signed char TreeKeyIdx::create(const char *ipath) {
-00248         char *path = 0;
-00249         char *buf = new char [ strlen (ipath) + 20 ];
-00250         FileDesc *fd, *fd2;
-00251 
-00252         stdstr(&path, ipath);
-00253 
-00254         if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\'))
-00255                 path[strlen(path)-1] = 0;
-00256 
-00257         sprintf(buf, "%s.dat", path);
-00258         unlink(buf);
-00259         fd = FileMgr::systemFileMgr.open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-00260         fd->getFd();
-00261         FileMgr::systemFileMgr.close(fd);
-00262 
-00263         sprintf(buf, "%s.idx", path);
-00264         unlink(buf);
-00265         fd2 = FileMgr::systemFileMgr.open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-00266         fd2->getFd();
-00267         FileMgr::systemFileMgr.close(fd2);
-00268 
-00269         TreeKeyIdx newTree(path);
-00270         TreeKeyIdx::TreeNode root;
-00271         stdstr(&(root.name), "");
-00272         newTree.saveTreeNode(&root);
-00273 
-00274         delete [] path;
-00275         
-00276         return 0;
-00277 }
-00278 
-00279 
-00280 /******************************************************************************
-00281  * zStr::getidxbufdat   - Gets the index string at the given dat offset
-00282  *                              NOTE: buf is calloc'd, or if not null, realloc'd and must
-00283  *                                      be free'd by calling function
-00284  *
-00285  * ENT: ioffset - offset in dat file to lookup
-00286  *              node            - address of pointer to allocate for storage of string
-00287  */
-00288 
-00289 void TreeKeyIdx::getTreeNodeFromDatOffset(long ioffset, TreeNode *node) const {
-00290         char ch;
-00291         __s32  tmp;
-00292         __u16  tmp2;
-00293 
-00294         if (datfd > 0) {
-00295 
-00296                 lseek(datfd->getFd(), ioffset, SEEK_SET);
-00297 
-00298                 read(datfd->getFd(), &tmp, 4);
-00299                 node->parent = swordtoarch32(tmp);
-00300 
-00301                 read(datfd->getFd(), &tmp, 4);
-00302                 node->next = swordtoarch32(tmp);
-00303 
-00304                 read(datfd->getFd(), &tmp, 4);
-00305                 node->firstChild = swordtoarch32(tmp);
-00306 
-00307                 string name;
-00308                 do {
-00309                         read(datfd->getFd(), &ch, 1);
-00310                         name += ch;
-00311                 } while (ch);
-00312 
-00313                 stdstr(&(node->name), name.c_str());
-00314 
-00315                 read(datfd->getFd(), &tmp2, 2);
-00316                 node->dsize = swordtoarch16(tmp2);
-00317 
-00318                 if (node->dsize) {
-00319                         if (node->userData)
-00320                                 delete [] node->userData;
-00321                         node->userData = new char [node->dsize];
-00322                         read(datfd->getFd(), node->userData, node->dsize);
-00323                 }
-00324         }
-00325 }
-00326 
-00327 
-00328 /******************************************************************************
-00329  * zStr::getidxbuf      - Gets the index string at the given idx offset
-00330  *                                              NOTE: buf is calloc'd, or if not null, realloc'd
-00331  *                                                      and must be freed by calling function
-00332  *
-00333  * ENT: ioffset - offset in idx file to lookup
-00334  *              buf             - address of pointer to allocate for storage of string
-00335  */
-00336 
-00337 char TreeKeyIdx::getTreeNodeFromIdxOffset(long ioffset, TreeNode *node) const {
-00338         __u32 offset;
-00339         char error = 0;
-00340         
-00341         if (ioffset < 0) {
-00342                 ioffset = 0;
-00343                 error = KEYERR_OUTOFBOUNDS;
-00344         }
-00345 
-00346         node->offset = ioffset;
-00347         if (idxfd > 0) {
-00348                 lseek(idxfd->getFd(), ioffset, SEEK_SET);
-00349                 if (read(idxfd->getFd(), &offset, 4) == 4) {
-00350                         offset = swordtoarch32(offset);
-00351                         getTreeNodeFromDatOffset(offset, node);
-00352                 }
-00353                 else {
-00354                         lseek(idxfd->getFd(), -4, SEEK_END);
-00355                         if (read(idxfd->getFd(), &offset, 4) == 4) {
-00356                                 offset = swordtoarch32(offset);
-00357                                 getTreeNodeFromDatOffset(offset, node);
-00358                         }
-00359                         error = KEYERR_OUTOFBOUNDS;
-00360                 }
-00361         }
-00362         return error;
-00363 }
-00364 
-00365 
-00366 unsigned long TreeKeyIdx::getOffset() const {
-00367         return currentNode.offset;
-00368 }
-00369 
-00370 void TreeKeyIdx::setOffset(unsigned long offset) {
-00371         error = getTreeNodeFromIdxOffset(offset, &currentNode);
-00372 }
-00373 
-00374 
-00375 void TreeKeyIdx::saveTreeNodeOffsets(TreeNode *node) {
-00376         long datOffset = 0;
-00377         __s32 tmp;
-00378 
-00379         if (idxfd > 0) {
-00380                 lseek(idxfd->getFd(), node->offset, SEEK_SET);
-00381                 if (read(idxfd->getFd(), &tmp, 4) != 4) {
-00382                         datOffset = lseek(datfd->getFd(), 0, SEEK_END);
-00383                         tmp = archtosword32(datOffset);
-00384                         write(idxfd->getFd(), &tmp, 4);
-00385                 }
-00386                 else {
-00387                         datOffset = swordtoarch32(tmp);
-00388                         lseek(datfd->getFd(), datOffset, SEEK_SET);
-00389                 }
-00390 
-00391                 tmp = archtosword32(node->parent);
-00392                 write(datfd->getFd(), &tmp, 4);
-00393 
-00394                 tmp = archtosword32(node->next);
-00395                 write(datfd->getFd(), &tmp, 4);
-00396 
-00397                 tmp = archtosword32(node->firstChild);
-00398                 write(datfd->getFd(), &tmp, 4);
-00399         }
-00400 }
-00401 
-00402 
-00403 void TreeKeyIdx::copyFrom(const TreeKeyIdx &ikey) {
-00404 
-00405         SWKey::copyFrom(ikey);
-00406 
-00407         currentNode.offset = ikey.currentNode.offset;
-00408         currentNode.parent = ikey.currentNode.parent;
-00409         currentNode.next = ikey.currentNode.next;
-00410         currentNode.firstChild = ikey.currentNode.firstChild;
-00411         stdstr(&(currentNode.name), ikey.currentNode.name);
-00412         currentNode.dsize = ikey.currentNode.dsize;
-00413 
-00414         if (currentNode.userData)
-00415                 delete [] currentNode.userData;
-00416         if (currentNode.dsize) {
-00417                 currentNode.userData = new char [ currentNode.dsize ];
-00418                 memcpy(currentNode.userData, ikey.currentNode.userData, currentNode.dsize);
-00419         }
-00420         else currentNode.userData = 0;
-00421 
-00422         bool newFiles = true;
-00423 
-00424         if (path && ikey.path)
-00425                 newFiles = strcmp(path, ikey.path);
-00426 
-00427         if (newFiles) {
-00428                 stdstr(&path, ikey.path);
-00429 
-00430                 if (idxfd) {
-00431                         FileMgr::systemFileMgr.close(idxfd);
-00432                         FileMgr::systemFileMgr.close(datfd);
-00433                 }
-00434                 idxfd = FileMgr::systemFileMgr.open(ikey.idxfd->path, ikey.idxfd->mode, ikey.idxfd->perms);
-00435                 datfd = FileMgr::systemFileMgr.open(ikey.datfd->path, ikey.datfd->mode, ikey.datfd->perms);
-00436         }
-00437 }
-00438 
-00439 
-00440 void TreeKeyIdx::saveTreeNode(TreeNode *node) {
-00441         long datOffset = 0;
-00442         __s32 tmp;
-00443         if (idxfd > 0) {
-00444 
-00445                 lseek(idxfd->getFd(), node->offset, SEEK_SET);
-00446                 datOffset = lseek(datfd->getFd(), 0, SEEK_END);
-00447                 tmp = archtosword32(datOffset);
-00448                 write(idxfd->getFd(), &tmp, 4);
-00449 
-00450                 saveTreeNodeOffsets(node);
-00451 
-00452                 write(datfd->getFd(), node->name, strlen(node->name));
-00453                 char null = 0;
-00454                 write(datfd->getFd(), &null, 1);
-00455 
-00456                 __u16 tmp2 = archtosword16(node->dsize);
-00457                 write(datfd->getFd(), &tmp2, 2);
-00458 
-00459                 if (node->dsize) {
-00460                         write(datfd->getFd(), node->userData, node->dsize);
-00461                 }
-00462         }
-00463 }
-00464 
-00465 
-00466 void TreeKeyIdx::setText(const char *ikey) {
-00467         char *buf = 0;
-00468         stdstr(&buf, ikey);
-00469         char *leaf = strtok(buf, "/");
-00470         root();
-00471         while ((leaf) && (!Error())) {
-00472                 bool ok, inChild = false;
-00473                 for (ok = firstChild(); ok; ok = nextSibling()) {
-00474                         inChild = true;
-00475                         if (!stricmp(leaf, getLocalName()))
-00476                                 break;
-00477                 }
-00478                 leaf = strtok(0, "/");
-00479                 if (!ok) {
-00480                         if (inChild) {  // if we didn't find a matching child node, default to first child
-00481                                 parent();
-00482                                 firstChild();
-00483                         }
-00484                         if (leaf)
-00485                                 error = KEYERR_OUTOFBOUNDS;
-00486                         break;
-00487                 }
-00488         }
-00489         delete [] buf;
-00490 }
-00491 
-00492 
-00493 
-00494 void TreeKeyIdx::copyFrom(const SWKey &ikey) {
-00495         SWKey::copyFrom(ikey);
-00496 }
-00497 
-00498 void TreeKeyIdx::setPosition(SW_POSITION p) {
-00499         switch (p) {
-00500         case POS_TOP:
-00501                 root();
-00502                 break;
-00503         case POS_BOTTOM:
-00504                 error = getTreeNodeFromIdxOffset(lseek(idxfd->getFd(), -4, SEEK_END), &currentNode);
-00505                 break;
-00506         } 
-00507         Error();        // clear error from normalize
-00508 }
-00509 
-00510 const char *TreeKeyIdx::getText() const {
-00511         return getFullName();
-00512 }
-00513 
-00514 
-00515 int TreeKeyIdx::_compare (const TreeKeyIdx & ikey) {
-00516                 return (getOffset() - ikey.getOffset());
-00517 }
-00518 
-00519 
-00520 int TreeKeyIdx::compare(const SWKey &ikey) {
-00521         TreeKeyIdx *treeKey = SWDYNAMIC_CAST(TreeKeyIdx, (&ikey));
-00522         if (treeKey)
-00523                 return _compare(*treeKey);
-00524         return SWKey::compare(ikey);
-00525 }
-00526 
-00527 
-00528 void TreeKeyIdx::decrement(int steps) {
-00529         error = getTreeNodeFromIdxOffset(currentNode.offset - (4*steps), &currentNode);
-00530 }
-00531 
-00532 void TreeKeyIdx::increment(int steps) {
-00533         error = getTreeNodeFromIdxOffset(currentNode.offset + (4*steps), &currentNode);
-00534 
-00535 /*
-00536         // assert positive
-00537         if (steps < 0) {
-00538                 decrement(steps * -1);
-00539                 return;
-00540         }
-00541 
-00542         while (steps > 0) {
-00543                 if (!firstChild()) {
-00544                         if (!nextSibbling() {
-00545                                 error = KEYERR_OUTOFBOUNDS;
-00546                                 return;
-00547                         }
-00548                 }
-00549                 steps--;
-00550         }
-00551 */
-00552 }
-00553 
-00554 
-00555 
-00556 TreeKeyIdx::TreeNode::TreeNode() {
-00557 
-00558         name       = 0;
-00559         stdstr(&name, "");
-00560         userData   = 0;
-00561 
-00562         clear();
-00563 }
-00564 
-00565 
-00566 void TreeKeyIdx::TreeNode::clear() {
-00567         offset     = 0;
-00568         parent     = -1;
-00569         next       = -1;
-00570         firstChild = -1;
-00571         dsize      = 0;
-00572 
-00573         if (name)
-00574                 delete [] name;
-00575         name = 0;
-00576         stdstr(&name, "");
-00577 
-00578         if (userData)
-00579                 delete [] userData;
-00580         userData   = 0;
-00581 }
-00582 
-00583 
-00584 TreeKeyIdx::TreeNode::~TreeNode() {
-00585         if (name)
-00586                 delete [] name;
-00587         
-00588         if (userData)
-00589                 delete [] userData;
-00590 }
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/treekeyidx_8h-source.html b/doc/api-documentation/html/treekeyidx_8h-source.html deleted file mode 100644 index 997f9c2..0000000 --- a/doc/api-documentation/html/treekeyidx_8h-source.html +++ /dev/null @@ -1,126 +0,0 @@ - - -treekeyidx.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

treekeyidx.h

00001 /******************************************************************************
-00002  *  versekey.h - code for class 'versekey'- a standard Biblical verse key
-00003  *
-00004  * $Id: treekeyidx_8h-source.html,v 1.3 2002/06/20 20:23:10 mgruner Exp $
-00005  *
-00006  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00007  *      CrossWire Bible Society
-00008  *      P. O. Box 2528
-00009  *      Tempe, AZ  85280-2528
-00010  *
-00011  * This program is free software; you can redistribute it and/or modify it
-00012  * under the terms of the GNU General Public License as published by the
-00013  * Free Software Foundation version 2.
-00014  *
-00015  * This program is distributed in the hope that it will be useful, but
-00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00018  * General Public License for more details.
-00019  *
-00020  */
-00021 
-00022 
-00023 #ifndef TREEKEYIDX_H
-00024 #define TREEKEYIDX_H
-00025 
-00026 #include <treekey.h>
-00027 #include <sysdata.h>
-00028 #include <filemgr.h>
-00029 
-00030 
-00035 class SWDLLEXPORT TreeKeyIdx : public TreeKey {
-00036 
-00037         class TreeNode {
-00038         public:
-00039                 TreeNode();
-00040                 ~TreeNode();
-00041                 void clear();
-00042                 __u32 offset;
-00043                 __s32 parent;
-00044                 __s32 next;
-00045                 __s32 firstChild;
-00046                 char *name;
-00047                 __u16 dsize;
-00048                 char *userData;
-00049         } currentNode;
-00050 
-00051         static SWClass classdef;
-00052 
-00053         char *path;
-00054 
-00055         FileDesc *idxfd;
-00056         FileDesc *datfd;
-00057 
-00058         void getTreeNodeFromDatOffset(long ioffset, TreeNode *buf) const;
-00059         char getTreeNodeFromIdxOffset(long ioffset, TreeNode *node) const;
-00060         void saveTreeNode(TreeNode *node);
-00061         void saveTreeNodeOffsets(TreeNode *node);
-00062         void init();
-00063 
-00064 public:
-00065         TreeKeyIdx(const TreeKeyIdx &ikey);
-00066         TreeKeyIdx (const char *idxPath, int fileMode = -1);
-00067         ~TreeKeyIdx ();
-00068 
-00069 
-00070         virtual const char *getLocalName();
-00071         virtual const char *setLocalName(const char *);
-00072 
-00073         virtual const char *getUserData(int *size = 0);
-00074         virtual void setUserData(const char *userData, int size = 0);
-00075 
-00076         virtual const char *getFullName() const;
-00077 
-00078         virtual void root();
-00079         virtual bool parent();
-00080 
-00081         virtual bool firstChild();
-00082         virtual bool nextSibling();
-00083         virtual bool previousSibling();
-00084 
-00085         virtual bool hasChildren();
-00086 
-00087         virtual void append();
-00088         virtual void appendChild();
-00089         virtual void insertBefore();
-00090 
-00091         virtual void remove();
-00092         virtual void save();
-00093 
-00094         virtual void copyFrom(const TreeKeyIdx &ikey);
-00095         virtual void copyFrom(const SWKey & ikey);
-00096 
-00097         virtual SWKey &operator = (const TreeKeyIdx &ikey) { copyFrom(ikey); return *this; }
-00098         void setOffset(unsigned long offset);
-00099         unsigned long getOffset() const;
-00100 
-00101         SWKEY_OPERATORS
-00102 
-00103         virtual void setText(const char *ikey);
-00104         virtual void setPosition(SW_POSITION p);
-00105         virtual const char *getText() const;
-00106         virtual int _compare (const TreeKeyIdx & ikey);
-00107         virtual int compare(const SWKey &ikey);
-00108         virtual void decrement(int steps = 1);
-00109         virtual void increment(int steps = 1);
-00110         virtual char Traversable () { return 1; }
-00111 
-00112         static signed char create(const char *path);
-00113 };
-00114 
-00115 
-00116 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/trees_8h-source.html b/doc/api-documentation/html/trees_8h-source.html deleted file mode 100644 index 813d5ef..0000000 --- a/doc/api-documentation/html/trees_8h-source.html +++ /dev/null @@ -1,142 +0,0 @@ - - -trees.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

trees.h

00001 /* header created automatically with -DGEN_TREES_H */
-00002 
-00003 local const ct_data static_ltree[L_CODES+2] = {
-00004 {{ 12},{  8}}, {{140},{  8}}, {{ 76},{  8}}, {{204},{  8}}, {{ 44},{  8}},
-00005 {{172},{  8}}, {{108},{  8}}, {{236},{  8}}, {{ 28},{  8}}, {{156},{  8}},
-00006 {{ 92},{  8}}, {{220},{  8}}, {{ 60},{  8}}, {{188},{  8}}, {{124},{  8}},
-00007 {{252},{  8}}, {{  2},{  8}}, {{130},{  8}}, {{ 66},{  8}}, {{194},{  8}},
-00008 {{ 34},{  8}}, {{162},{  8}}, {{ 98},{  8}}, {{226},{  8}}, {{ 18},{  8}},
-00009 {{146},{  8}}, {{ 82},{  8}}, {{210},{  8}}, {{ 50},{  8}}, {{178},{  8}},
-00010 {{114},{  8}}, {{242},{  8}}, {{ 10},{  8}}, {{138},{  8}}, {{ 74},{  8}},
-00011 {{202},{  8}}, {{ 42},{  8}}, {{170},{  8}}, {{106},{  8}}, {{234},{  8}},
-00012 {{ 26},{  8}}, {{154},{  8}}, {{ 90},{  8}}, {{218},{  8}}, {{ 58},{  8}},
-00013 {{186},{  8}}, {{122},{  8}}, {{250},{  8}}, {{  6},{  8}}, {{134},{  8}},
-00014 {{ 70},{  8}}, {{198},{  8}}, {{ 38},{  8}}, {{166},{  8}}, {{102},{  8}},
-00015 {{230},{  8}}, {{ 22},{  8}}, {{150},{  8}}, {{ 86},{  8}}, {{214},{  8}},
-00016 {{ 54},{  8}}, {{182},{  8}}, {{118},{  8}}, {{246},{  8}}, {{ 14},{  8}},
-00017 {{142},{  8}}, {{ 78},{  8}}, {{206},{  8}}, {{ 46},{  8}}, {{174},{  8}},
-00018 {{110},{  8}}, {{238},{  8}}, {{ 30},{  8}}, {{158},{  8}}, {{ 94},{  8}},
-00019 {{222},{  8}}, {{ 62},{  8}}, {{190},{  8}}, {{126},{  8}}, {{254},{  8}},
-00020 {{  1},{  8}}, {{129},{  8}}, {{ 65},{  8}}, {{193},{  8}}, {{ 33},{  8}},
-00021 {{161},{  8}}, {{ 97},{  8}}, {{225},{  8}}, {{ 17},{  8}}, {{145},{  8}},
-00022 {{ 81},{  8}}, {{209},{  8}}, {{ 49},{  8}}, {{177},{  8}}, {{113},{  8}},
-00023 {{241},{  8}}, {{  9},{  8}}, {{137},{  8}}, {{ 73},{  8}}, {{201},{  8}},
-00024 {{ 41},{  8}}, {{169},{  8}}, {{105},{  8}}, {{233},{  8}}, {{ 25},{  8}},
-00025 {{153},{  8}}, {{ 89},{  8}}, {{217},{  8}}, {{ 57},{  8}}, {{185},{  8}},
-00026 {{121},{  8}}, {{249},{  8}}, {{  5},{  8}}, {{133},{  8}}, {{ 69},{  8}},
-00027 {{197},{  8}}, {{ 37},{  8}}, {{165},{  8}}, {{101},{  8}}, {{229},{  8}},
-00028 {{ 21},{  8}}, {{149},{  8}}, {{ 85},{  8}}, {{213},{  8}}, {{ 53},{  8}},
-00029 {{181},{  8}}, {{117},{  8}}, {{245},{  8}}, {{ 13},{  8}}, {{141},{  8}},
-00030 {{ 77},{  8}}, {{205},{  8}}, {{ 45},{  8}}, {{173},{  8}}, {{109},{  8}},
-00031 {{237},{  8}}, {{ 29},{  8}}, {{157},{  8}}, {{ 93},{  8}}, {{221},{  8}},
-00032 {{ 61},{  8}}, {{189},{  8}}, {{125},{  8}}, {{253},{  8}}, {{ 19},{  9}},
-00033 {{275},{  9}}, {{147},{  9}}, {{403},{  9}}, {{ 83},{  9}}, {{339},{  9}},
-00034 {{211},{  9}}, {{467},{  9}}, {{ 51},{  9}}, {{307},{  9}}, {{179},{  9}},
-00035 {{435},{  9}}, {{115},{  9}}, {{371},{  9}}, {{243},{  9}}, {{499},{  9}},
-00036 {{ 11},{  9}}, {{267},{  9}}, {{139},{  9}}, {{395},{  9}}, {{ 75},{  9}},
-00037 {{331},{  9}}, {{203},{  9}}, {{459},{  9}}, {{ 43},{  9}}, {{299},{  9}},
-00038 {{171},{  9}}, {{427},{  9}}, {{107},{  9}}, {{363},{  9}}, {{235},{  9}},
-00039 {{491},{  9}}, {{ 27},{  9}}, {{283},{  9}}, {{155},{  9}}, {{411},{  9}},
-00040 {{ 91},{  9}}, {{347},{  9}}, {{219},{  9}}, {{475},{  9}}, {{ 59},{  9}},
-00041 {{315},{  9}}, {{187},{  9}}, {{443},{  9}}, {{123},{  9}}, {{379},{  9}},
-00042 {{251},{  9}}, {{507},{  9}}, {{  7},{  9}}, {{263},{  9}}, {{135},{  9}},
-00043 {{391},{  9}}, {{ 71},{  9}}, {{327},{  9}}, {{199},{  9}}, {{455},{  9}},
-00044 {{ 39},{  9}}, {{295},{  9}}, {{167},{  9}}, {{423},{  9}}, {{103},{  9}},
-00045 {{359},{  9}}, {{231},{  9}}, {{487},{  9}}, {{ 23},{  9}}, {{279},{  9}},
-00046 {{151},{  9}}, {{407},{  9}}, {{ 87},{  9}}, {{343},{  9}}, {{215},{  9}},
-00047 {{471},{  9}}, {{ 55},{  9}}, {{311},{  9}}, {{183},{  9}}, {{439},{  9}},
-00048 {{119},{  9}}, {{375},{  9}}, {{247},{  9}}, {{503},{  9}}, {{ 15},{  9}},
-00049 {{271},{  9}}, {{143},{  9}}, {{399},{  9}}, {{ 79},{  9}}, {{335},{  9}},
-00050 {{207},{  9}}, {{463},{  9}}, {{ 47},{  9}}, {{303},{  9}}, {{175},{  9}},
-00051 {{431},{  9}}, {{111},{  9}}, {{367},{  9}}, {{239},{  9}}, {{495},{  9}},
-00052 {{ 31},{  9}}, {{287},{  9}}, {{159},{  9}}, {{415},{  9}}, {{ 95},{  9}},
-00053 {{351},{  9}}, {{223},{  9}}, {{479},{  9}}, {{ 63},{  9}}, {{319},{  9}},
-00054 {{191},{  9}}, {{447},{  9}}, {{127},{  9}}, {{383},{  9}}, {{255},{  9}},
-00055 {{511},{  9}}, {{  0},{  7}}, {{ 64},{  7}}, {{ 32},{  7}}, {{ 96},{  7}},
-00056 {{ 16},{  7}}, {{ 80},{  7}}, {{ 48},{  7}}, {{112},{  7}}, {{  8},{  7}},
-00057 {{ 72},{  7}}, {{ 40},{  7}}, {{104},{  7}}, {{ 24},{  7}}, {{ 88},{  7}},
-00058 {{ 56},{  7}}, {{120},{  7}}, {{  4},{  7}}, {{ 68},{  7}}, {{ 36},{  7}},
-00059 {{100},{  7}}, {{ 20},{  7}}, {{ 84},{  7}}, {{ 52},{  7}}, {{116},{  7}},
-00060 {{  3},{  8}}, {{131},{  8}}, {{ 67},{  8}}, {{195},{  8}}, {{ 35},{  8}},
-00061 {{163},{  8}}, {{ 99},{  8}}, {{227},{  8}}
-00062 };
-00063 
-00064 local const ct_data static_dtree[D_CODES] = {
-00065 {{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}},
-00066 {{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}},
-00067 {{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}},
-00068 {{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}},
-00069 {{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}},
-00070 {{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}}
-00071 };
-00072 
-00073 const uch _dist_code[DIST_CODE_LEN] = {
-00074  0,  1,  2,  3,  4,  4,  5,  5,  6,  6,  6,  6,  7,  7,  7,  7,  8,  8,  8,  8,
-00075  8,  8,  8,  8,  9,  9,  9,  9,  9,  9,  9,  9, 10, 10, 10, 10, 10, 10, 10, 10,
-00076 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
-00077 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
-00078 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13,
-00079 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
-00080 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-00081 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-00082 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14,
-00083 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15,
-00084 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
-00085 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
-00086 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,  0,  0, 16, 17,
-00087 18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22,
-00088 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-00089 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-00090 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
-00091 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27,
-00092 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-00093 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-00094 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-00095 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28,
-00096 28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
-00097 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
-00098 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
-00099 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29
-00100 };
-00101 
-00102 const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {
-00103  0,  1,  2,  3,  4,  5,  6,  7,  8,  8,  9,  9, 10, 10, 11, 11, 12, 12, 12, 12,
-00104 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16,
-00105 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19,
-00106 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
-00107 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22,
-00108 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23,
-00109 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-00110 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
-00111 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
-00112 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26,
-00113 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
-00114 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
-00115 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28
-00116 };
-00117 
-00118 local const int base_length[LENGTH_CODES] = {
-00119 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56,
-00120 64, 80, 96, 112, 128, 160, 192, 224, 0
-00121 };
-00122 
-00123 local const int base_dist[D_CODES] = {
-00124     0,     1,     2,     3,     4,     6,     8,    12,    16,    24,
-00125    32,    48,    64,    96,   128,   192,   256,   384,   512,   768,
-00126  1024,  1536,  2048,  3072,  4096,  6144,  8192, 12288, 16384, 24576
-00127 };
-00128 
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/unicodertf_8cpp-source.html b/doc/api-documentation/html/unicodertf_8cpp-source.html deleted file mode 100644 index 6b2fd2c..0000000 --- a/doc/api-documentation/html/unicodertf_8cpp-source.html +++ /dev/null @@ -1,89 +0,0 @@ - - -unicodertf.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

unicodertf.cpp

00001 /******************************************************************************
-00002  *
-00003  * unicodertf - SWFilter decendant to convert a double byte unicode file
-00004  *                               to RTF tags
-00005  */
-00006 
-00007 
-00008 #include <stdlib.h>
-00009 #include <stdio.h>
-00010 #include <unicodertf.h>
-00011 
-00012 UnicodeRTF::UnicodeRTF() {
-00013 }
-00014 
-00015 
-00016 char UnicodeRTF::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00017 {
-00018         unsigned char *to, *from, *maxto;
-00019         int len;
-00020         char digit[10];
-00021         short ch;       // must be signed per unicode spec (negative is ok for big numbers > 32768)
-00022 
-00023         len = strlenw(text) + 2;                                                // shift string to right of buffer
-00024         if (len < maxlen) {
-00025                 memmove(&text[maxlen - len], text, len);
-00026                 from = (unsigned char*)&text[maxlen - len];
-00027         }
-00028         else    from = (unsigned char*)text;
-00029         maxto =(unsigned char*)text + maxlen;
-00030 
-00031         // -------------------------------
-00032         bool lastUni = false;
-00033         for (to = (unsigned char*)text; *from && (to <= maxto); from++) {
-00034                 ch = 0;
-00035                 if ((*from & 128) != 128) {
-00036 //                      if ((*from == ' ') && (lastUni))
-00037 //                              *to++ = ' ';
-00038                         *to++ = *from;
-00039                         lastUni = false;
-00040                         continue;
-00041                 }
-00042                 if ((*from & 128) && ((*from & 64) != 64)) {
-00043             // error
-00044                         *from = 'x';
-00045                         continue;
-00046                 }
-00047                 *from <<= 1;
-00048                 int subsequent;
-00049                 for (subsequent = 1; (*from & 128); subsequent++) {
-00050                         *from <<= 1;
-00051                         from[subsequent] &= 63;
-00052                         ch <<= 6;
-00053                         ch |= from[subsequent];
-00054                 }
-00055                 subsequent--;
-00056                 *from <<=1;
-00057                 char significantFirstBits = 8 - (2+subsequent);
-00058                 
-00059                 ch |= (((short)*from) << (((6*subsequent)+significantFirstBits)-8));
-00060                 from += subsequent;
-00061                 *to++ = '\\';
-00062                 *to++ = 'u';
-00063                 sprintf(digit, "%d", ch);
-00064                 for (char *dig = digit; *dig; dig++)
-00065                         *to++ = *dig;
-00066                 *to++ = '?';
-00067                 lastUni = true;
-00068         }
-00069            
-00070         if (to != maxto) {
-00071                 *to++ = 0;
-00072         }
-00073         *to = 0;
-00074         return 0;
-00075 }
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/unicodertf_8h-source.html b/doc/api-documentation/html/unicodertf_8h-source.html deleted file mode 100644 index 9bad1ef..0000000 --- a/doc/api-documentation/html/unicodertf_8h-source.html +++ /dev/null @@ -1,48 +0,0 @@ - - -unicodertf.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

unicodertf.h

00001 /*
-00002  *
-00003  * $Id: unicodertf_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00004  *
-00005  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00006  *      CrossWire Bible Society
-00007  *      P. O. Box 2528
-00008  *      Tempe, AZ  85280-2528
-00009  *
-00010  * This program is free software; you can redistribute it and/or modify it
-00011  * under the terms of the GNU General Public License as published by the
-00012  * Free Software Foundation version 2.
-00013  *
-00014  * This program is distributed in the hope that it will be useful, but
-00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00017  * General Public License for more details.
-00018  *
-00019  */
-00020 
-00021 #ifndef UNICODERTF_H
-00022 #define UNICODERTF_H
-00023 
-00024 #include <swfilter.h>
-00025 
-00026 #include <defs.h>
-00027 
-00030 class SWDLLEXPORT UnicodeRTF:public SWFilter {
-00031 public:
-00032   UnicodeRTF();
-00033   virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule * = 0);
-00034 };
-00035 
-00036 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/unixstr_8cpp-source.html b/doc/api-documentation/html/unixstr_8cpp-source.html deleted file mode 100644 index 809821c..0000000 --- a/doc/api-documentation/html/unixstr_8cpp-source.html +++ /dev/null @@ -1,21 +0,0 @@ - - -unixstr.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

unixstr.cpp

00001 // Include only if your UNIX compiler does not include stricmp but does include strcasecmp
-00002 
-00003 #include <unixstr.h>
-00004 
-00005 int stricmp(const char *s1, const char *s2) {
-00006         return strcasecmp(s1, s2);
-00007 }
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/unixstr_8h-source.html b/doc/api-documentation/html/unixstr_8h-source.html deleted file mode 100644 index 2536d91..0000000 --- a/doc/api-documentation/html/unixstr_8h-source.html +++ /dev/null @@ -1,42 +0,0 @@ - - -unixstr.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

unixstr.h

00001 // Include only if your UNIX compiler does not include stricmp but does include strcasecmp
-00002 /*
-00003  *
-00004  * $Id: unixstr_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00005  *
-00006  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00007  *      CrossWire Bible Society
-00008  *      P. O. Box 2528
-00009  *      Tempe, AZ  85280-2528
-00010  *
-00011  * This program is free software; you can redistribute it and/or modify it
-00012  * under the terms of the GNU General Public License as published by the
-00013  * Free Software Foundation version 2.
-00014  *
-00015  * This program is distributed in the hope that it will be useful, but
-00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00018  * General Public License for more details.
-00019  *
-00020  */
-00021 
-00022 #ifndef UNIXSTR_H
-00023 #define UNIXSTR_H
-00024 #include <string.h>
-00025 
-00026 int stricmp (const char *s1, const char *s2);
-00027 
-00028 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/untgz_8h-source.html b/doc/api-documentation/html/untgz_8h-source.html deleted file mode 100644 index a209cf7..0000000 --- a/doc/api-documentation/html/untgz_8h-source.html +++ /dev/null @@ -1,23 +0,0 @@ - - -untgz.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

untgz.h

00001 #ifndef UNTGZ_H
-00002 #define UNTGZ_H
-00003 
-00004 #include "zlib.h"
-00005 
-00006 int untargz(int fd, const char *dest);
-00007 int untar(gzFile in, const char *dest);
-00008 
-00009 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utf16utf8_8cpp-source.html b/doc/api-documentation/html/utf16utf8_8cpp-source.html deleted file mode 100644 index 2578fd9..0000000 --- a/doc/api-documentation/html/utf16utf8_8cpp-source.html +++ /dev/null @@ -1,109 +0,0 @@ - - -utf16utf8.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utf16utf8.cpp

00001 /******************************************************************************
-00002  *
-00003  * UTF16UTF8 -  SWFilter decendant to convert UTF-16 to UTF-8
-00004  *
-00005  */
-00006 
-00007 #include <stdlib.h>
-00008 #include <stdio.h>
-00009 
-00010 #include <utf16utf8.h>
-00011 
-00012 UTF16UTF8::UTF16UTF8() {
-00013 }
-00014 
-00015 
-00016 char UTF16UTF8::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00017 {
-00018   unsigned short *from;
-00019   unsigned char *to;
-00020 
-00021   int len;
-00022   unsigned long uchar;
-00023   unsigned short schar;
-00024 
-00025   len = 0;
-00026   from = (unsigned short*) text;
-00027   while (*from) {
-00028         len += 2;
-00029         from++;
-00030   }
-00031 
-00032   // shift string to right of buffer
-00033   if (len < maxlen) {
-00034     memmove(&text[maxlen - len], text, len);
-00035     from = (unsigned short*)&text[maxlen - len];
-00036   }
-00037   else
-00038     from = (unsigned short*)text;
-00039   
-00040 
-00041   // -------------------------------
-00042 
-00043   for (to = (unsigned char*)text; *from; from++) {
-00044     uchar = 0;
-00045 
-00046     if (*from < 0xD800 || *from > 0xDFFF) {
-00047       uchar = *from;
-00048     }
-00049     else if (*from >= 0xD800 && *from <= 0xDBFF) {
-00050       uchar = *from;
-00051       schar = *(from+1);
-00052       if (uchar < 0xDC00 || uchar > 0xDFFF) {
-00053         //error, do nothing
-00054         continue;
-00055       }
-00056       uchar &= 0x03ff;
-00057       schar &= 0x03ff;
-00058       uchar <<= 10;
-00059       uchar |= schar;
-00060       uchar += 0x10000;
-00061       from++;
-00062     }
-00063     else {
-00064       //error, do nothing
-00065       continue;
-00066     }
-00067     
-00068     if (uchar < 0x80) { 
-00069       *to++ = uchar; 
-00070     }
-00071     else if (uchar < 0x800) { 
-00072       *to++ = 0xc0 | (uchar >> 6); 
-00073       *to++ = 0x80 | (uchar & 0x3f);
-00074     }
-00075     else if (uchar < 0x10000) {
-00076       *to++ = 0xe0 | (uchar >> 12); 
-00077       *to++ = 0x80 | (uchar >> 6) & 0x3f; 
-00078       *to++ = 0x80 | uchar & 0x3f;
-00079     }
-00080     else if (uchar < 0x200000) {
-00081       *to++ = 0xF0 | (uchar >> 18);
-00082       *to++ = 0x80 | (uchar >> 12) & 0x3F; 
-00083       *to++ = 0x80 | (uchar >> 6) & 0x3F; 
-00084       *to++ = 0x80 | uchar & 0x3F;
-00085     }
-00086   }
-00087   *to++ = 0;
-00088   *to = 0;
-00089   
-00090   return 0;
-00091 }
-00092 
-00093 
-00094 
-00095 
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utf16utf8_8h-source.html b/doc/api-documentation/html/utf16utf8_8h-source.html deleted file mode 100644 index b858631..0000000 --- a/doc/api-documentation/html/utf16utf8_8h-source.html +++ /dev/null @@ -1,47 +0,0 @@ - - -utf16utf8.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utf16utf8.h

00001 /*
-00002  *
-00003  *
-00004  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00005  *      CrossWire Bible Society
-00006  *      P. O. Box 2528
-00007  *      Tempe, AZ  85280-2528
-00008  *
-00009  * This program is free software; you can redistribute it and/or modify it
-00010  * under the terms of the GNU General Public License as published by the
-00011  * Free Software Foundation version 2.
-00012  *
-00013  * This program is distributed in the hope that it will be useful, but
-00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00016  * General Public License for more details.
-00017  *
-00018  */
-00019 
-00020 #ifndef UTF16UTF8_H
-00021 #define UTF16UTF8_H
-00022 
-00023 #include <swfilter.h>
-00024 
-00025 #include <defs.h>
-00026 
-00029 class SWDLLEXPORT UTF16UTF8:public SWFilter {
-00030 public:
-00031   UTF16UTF8();
-00032   virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule * = 0);
-00033 };
-00034 
-00035 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utf8arshaping_8cpp-source.html b/doc/api-documentation/html/utf8arshaping_8cpp-source.html deleted file mode 100644 index 93254de..0000000 --- a/doc/api-documentation/html/utf8arshaping_8cpp-source.html +++ /dev/null @@ -1,62 +0,0 @@ - - -utf8arshaping.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utf8arshaping.cpp

00001 /******************************************************************************
-00002 *
-00003 * utf8arshaping - SWFilter decendant to perform Arabic shaping on
-00004 *                   UTF-8 text
-00005 */
-00006 
-00007 #ifdef _ICU_
-00008 
-00009 #include <stdlib.h>
-00010 #include <string.h>
-00011 
-00012 #ifdef __GNUC__
-00013 #include <unixstr.h>
-00014 #endif
-00015 
-00016 #include <utf8arshaping.h>
-00017 
-00018 UTF8arShaping::UTF8arShaping() {
-00019 
-00020         conv = ucnv_open("UTF-8", &err);
-00021 
-00022 }
-00023 
-00024 UTF8arShaping::~UTF8arShaping() {
-00025         ucnv_close(conv);
-00026 }
-00027 
-00028 char UTF8arShaping::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00029 {
-00030         UChar *ustr, *ustr2;
-00031 
-00032         int32_t len = strlen(text);
-00033         ustr = new UChar[len];
-00034         ustr2 = new UChar[len];
-00035 
-00036         // Convert UTF-8 string to UTF-16 (UChars)
-00037         len = ucnv_toUChars(conv, ustr, len, text, -1, &err);
-00038 
-00039         len = u_shapeArabic(ustr, len, ustr2, len, U_SHAPE_LETTERS_SHAPE | U_SHAPE_DIGITS_EN2AN, &err);
-00040 
-00041         ucnv_fromUChars(conv, text, maxlen, ustr2, len, &err);
-00042 
-00043         delete [] ustr2;
-00044         delete [] ustr;
-00045         return 0;
-00046 }
-00047 
-00048 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utf8arshaping_8h-source.html b/doc/api-documentation/html/utf8arshaping_8h-source.html deleted file mode 100644 index 24fcb47..0000000 --- a/doc/api-documentation/html/utf8arshaping_8h-source.html +++ /dev/null @@ -1,60 +0,0 @@ - - -utf8arshaping.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utf8arshaping.h

00001 /*
-00002  *
-00003  * Copyright 2001 CrossWire Bible Society (http://www.crosswire.org)
-00004  *      CrossWire Bible Society
-00005  *      P. O. Box 2528
-00006  *      Tempe, AZ  85280-2528
-00007  *
-00008  * This program is free software; you can redistribute it and/or modify it
-00009  * under the terms of the GNU General Public License as published by the
-00010  * Free Software Foundation version 2.
-00011  *
-00012  * This program is distributed in the hope that it will be useful, but
-00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00015  * General Public License for more details.
-00016  *
-00017  */
-00018 #ifdef _ICU_
-00019 
-00020 #ifndef UTF8ARSHAPING_H
-00021 #define UTF8ARSHAPING_H
-00022 
-00023 #include <swfilter.h>
-00024 
-00025 #include <unicode/utypes.h>
-00026 #include <unicode/ucnv.h>
-00027 #include <unicode/uchar.h>
-00028 #include <unicode/ushape.h>
-00029 
-00030 #include <defs.h>
-00031 
-00034 class SWDLLEXPORT UTF8arShaping : public SWFilter
-00035 {
-00036  private:
-00037   UConverter* conv;
-00038   UErrorCode err;
-00039  public:
-00040   UTF8arShaping();
-00041   ~UTF8arShaping();  
-00042   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00043 };
-00044 
-00045 #endif
-00046 
-00047 #endif
-00048 
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utf8bidireorder_8cpp-source.html b/doc/api-documentation/html/utf8bidireorder_8cpp-source.html deleted file mode 100644 index dc861ec..0000000 --- a/doc/api-documentation/html/utf8bidireorder_8cpp-source.html +++ /dev/null @@ -1,69 +0,0 @@ - - -utf8bidireorder.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utf8bidireorder.cpp

00001 /******************************************************************************
-00002 *
-00003 * utf8cnormalizer - SWFilter decendant to perform reordering of UTF-8
-00004 *                   text to visual order according to Unicode BiDi
-00005 */
-00006 
-00007 #ifdef _ICU_
-00008 
-00009 #include <stdlib.h>
-00010 #include <string.h>
-00011 
-00012 #ifdef __GNUC__
-00013 #include <unixstr.h>
-00014 #endif
-00015 
-00016 #include <utf8bidireorder.h>
-00017 
-00018 UTF8BiDiReorder::UTF8BiDiReorder() {
-00019 
-00020         conv = ucnv_open("UTF-8", &err);
-00021 
-00022 }
-00023 
-00024 UTF8BiDiReorder::~UTF8BiDiReorder() {
-00025         ucnv_close(conv);
-00026 }
-00027 
-00028 char UTF8BiDiReorder::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00029 {
-00030         UChar *ustr, *ustr2;
-00031         
-00032         int32_t len = strlen(text);
-00033         ustr = new UChar[len]; //each char could become a surrogate pair
-00034 
-00035         // Convert UTF-8 string to UTF-16 (UChars)
-00036         len = ucnv_toUChars(conv, ustr, len, text, -1, &err);
-00037         ustr2 = new UChar[len];
-00038 
-00039         UBiDi* bidi = ubidi_openSized(len + 1, 0, &err);
-00040         ubidi_setPara(bidi, ustr, len, UBIDI_DEFAULT_RTL, NULL, &err);
-00041         len = ubidi_writeReordered(bidi, ustr2, len,
-00042                 UBIDI_DO_MIRRORING | UBIDI_REMOVE_BIDI_CONTROLS, &err);
-00043         ubidi_close(bidi);
-00044 
-00045 //        len = ubidi_writeReverse(ustr, len, ustr2, len,
-00046 //                UBIDI_DO_MIRRORING | UBIDI_REMOVE_BIDI_CONTROLS, &err);
-00047 
-00048         ucnv_fromUChars(conv, text, maxlen, ustr2, len, &err);
-00049 
-00050         delete [] ustr2;
-00051         delete [] ustr;
-00052         return 0;
-00053 }
-00054 
-00055 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utf8bidireorder_8h-source.html b/doc/api-documentation/html/utf8bidireorder_8h-source.html deleted file mode 100644 index 4afc19c..0000000 --- a/doc/api-documentation/html/utf8bidireorder_8h-source.html +++ /dev/null @@ -1,60 +0,0 @@ - - -utf8bidireorder.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utf8bidireorder.h

00001 /*
-00002  *
-00003  * Copyright 2001 CrossWire Bible Society (http://www.crosswire.org)
-00004  *      CrossWire Bible Society
-00005  *      P. O. Box 2528
-00006  *      Tempe, AZ  85280-2528
-00007  *
-00008  * This program is free software; you can redistribute it and/or modify it
-00009  * under the terms of the GNU General Public License as published by the
-00010  * Free Software Foundation version 2.
-00011  *
-00012  * This program is distributed in the hope that it will be useful, but
-00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00015  * General Public License for more details.
-00016  *
-00017  */
-00018 #ifdef _ICU_
-00019 
-00020 #ifndef UTF8BIDIREORDER_H
-00021 #define UTF8BIDIREORDER_H
-00022 
-00023 #include <swfilter.h>
-00024 
-00025 #include <unicode/utypes.h>
-00026 #include <unicode/ucnv.h>
-00027 #include <unicode/uchar.h>
-00028 #include <unicode/bidi.h>
-00029 
-00030 #include <defs.h>
-00031 
-00034 class SWDLLEXPORT UTF8BiDiReorder : public SWFilter
-00035 {
-00036  private:
-00037   UConverter* conv;
-00038   UErrorCode err;
-00039  public:
-00040   UTF8BiDiReorder();
-00041   ~UTF8BiDiReorder();  
-00042   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00043 };
-00044 
-00045 #endif
-00046 
-00047 #endif
-00048 
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utf8cantillation_8cpp-source.html b/doc/api-documentation/html/utf8cantillation_8cpp-source.html deleted file mode 100644 index ff77961..0000000 --- a/doc/api-documentation/html/utf8cantillation_8cpp-source.html +++ /dev/null @@ -1,78 +0,0 @@ - - -utf8cantillation.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utf8cantillation.cpp

00001 /******************************************************************************
-00002  *
-00003  * UTF8Cantillation - SWFilter decendant to remove UTF-8 Hebrew cantillation
-00004  *
-00005  */
-00006 
-00007 
-00008 #include <stdlib.h>
-00009 #include <stdio.h>
-00010 #include <utf8cantillation.h>
-00011 
-00012 
-00013 const char UTF8Cantillation::on[] = "On";
-00014 const char UTF8Cantillation::off[] = "Off";
-00015 const char UTF8Cantillation::optName[] = "Hebrew Cantillation";
-00016 const char UTF8Cantillation::optTip[] = "Toggles Hebrew Cantillation Marks";
-00017 
-00018 UTF8Cantillation::UTF8Cantillation() {
-00019         option = false;
-00020         options.push_back(on);
-00021         options.push_back(off);
-00022 }
-00023 
-00024 UTF8Cantillation::~UTF8Cantillation(){};
-00025 
-00026 void UTF8Cantillation::setOptionValue(const char *ival)
-00027 {
-00028         option = (!stricmp(ival, on));
-00029 }
-00030 
-00031 const char *UTF8Cantillation::getOptionValue()
-00032 {
-00033         return (option) ? on:off;
-00034 }
-00035 
-00036 char UTF8Cantillation::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00037 {
-00038         if (!option) {
-00039         unsigned char *to, *from;
-00040         to = (unsigned char*)text;
-00041         //The UTF-8 range 0xD6 0x90 to 0xD6 0xAF and 0xD7 0x84 consist of Hebrew cantillation marks so block those out.
-00042         for (from = (unsigned char*)text; *from; from++) {
-00043           if (*from != 0xD6) {
-00044             if (*from == 0xD7 && *(from + 1) == 0x84) {
-00045               from++;
-00046             }
-00047             else {
-00048               *to++ = *from;
-00049             }
-00050           }
-00051           else if (*(from + 1) < 0x90 || *(from + 1) > 0xAF) {
-00052             *to++ = *from;
-00053             from++;
-00054             *to++ = *from;
-00055           }
-00056           else {
-00057                 from++;
-00058           }
-00059         }
-00060         *to++ = 0;
-00061         *to = 0;
-00062      }
-00063         return 0;
-00064 }
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utf8cantillation_8h-source.html b/doc/api-documentation/html/utf8cantillation_8h-source.html deleted file mode 100644 index 8bf7e06..0000000 --- a/doc/api-documentation/html/utf8cantillation_8h-source.html +++ /dev/null @@ -1,69 +0,0 @@ - - -utf8cantillation.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utf8cantillation.h

00001 /*
-00002  *
-00003  *
-00004  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00005  *      CrossWire Bible Society
-00006  *      P. O. Box 2528
-00007  *      Tempe, AZ  85280-2528
-00008  *
-00009  * This program is free software; you can redistribute it and/or modify it
-00010  * under the terms of the GNU General Public License as published by the
-00011  * Free Software Foundation version 2.
-00012  *
-00013  * This program is distributed in the hope that it will be useful, but
-00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00016  * General Public License for more details.
-00017  *
-00018  */
-00019 
-00020 #ifndef UTF8CANTILLATION_H
-00021 #define UTF8CANTILLATION_H
-00022 
-00023 #include <swfilter.h>
-00024 
-00025 #include <defs.h>
-00026 
-00029 class SWDLLEXPORT UTF8Cantillation:public SWFilter
-00030 {
-00031   bool option;
-00032   static const char on[];
-00033   static const char off[];
-00034   static const char optName[];
-00035   static const char optTip[];
-00036   OptionsList options;
-00037 public:
-00038     UTF8Cantillation ();
-00039     virtual ~ UTF8Cantillation ();
-00040   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00041   virtual const char *getOptionName ()
-00042   {
-00043     return optName;
-00044   }
-00045   virtual const char *getOptionTip ()
-00046   {
-00047     return optTip;
-00048   }
-00049   virtual void setOptionValue (const char *ival);
-00050   virtual const char *getOptionValue ();
-00051   virtual OptionsList getOptionValues ()
-00052   {
-00053     return options;
-00054   }
-00055 };
-00056 
-00057 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utf8greekaccents_8cpp-source.html b/doc/api-documentation/html/utf8greekaccents_8cpp-source.html deleted file mode 100644 index 578e0ba..0000000 --- a/doc/api-documentation/html/utf8greekaccents_8cpp-source.html +++ /dev/null @@ -1,266 +0,0 @@ - - -utf8greekaccents.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utf8greekaccents.cpp

00001 /******************************************************************************
-00002  *
-00003  * UTF8GreekAccents - SWFilter decendant to remove UTF-8 Greek accents
-00004  *
-00005  */
-00006 
-00007 
-00008 #include <stdlib.h>
-00009 #include <stdio.h>
-00010 #include <utf8greekaccents.h>
-00011 
-00012 
-00013 const char UTF8GreekAccents::on[] = "On";
-00014 const char UTF8GreekAccents::off[] = "Off";
-00015 const char UTF8GreekAccents::optName[] = "Greek Accents";
-00016 const char UTF8GreekAccents::optTip[] = "Toggles Greek Accents";
-00017 
-00018 UTF8GreekAccents::UTF8GreekAccents() {
-00019         option = true;
-00020         options.push_back(on);
-00021         options.push_back(off);
-00022 }
-00023 
-00024 UTF8GreekAccents::~UTF8GreekAccents(){};
-00025 
-00026 void UTF8GreekAccents::setOptionValue(const char *ival)
-00027 {
-00028         option = (!stricmp(ival, on));
-00029 }
-00030 
-00031 const char *UTF8GreekAccents::getOptionValue()
-00032 {
-00033         return (option) ? on:off;
-00034 }
-00035 
-00036 char UTF8GreekAccents::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00037 {
-00038         if (!option) {
-00039     unsigned char *to, *from;
-00040 
-00041         to = (unsigned char*)text;
-00042         for (from = (unsigned char*)text; *from; from++) {
-00043           //first just remove combining characters
-00044           if (*from == 0xE2 && *(from + 1) == 0x80 && *(from + 2) == 0x99)
-00045             from += 2;
-00046           else if (*from == 0xCC && *(from + 1)) {
-00047             if (*(from + 1) == 0x80 || *(from + 1) == 0x81 || *(from + 1) == 0x82 || *(from + 1) == 0x88 || *(from + 1) == 0x93 || *(from + 1) == 0x94)
-00048               from++;
-00049           }
-00050           else if (*from == 0xCD && *(from + 1) == 0xBA)
-00051             from++;
-00052           //now converted pre-composed characters to their alphabetic bases, discarding the accents
-00053 
-00054           //Greek
-00055           //capital alpha
-00056           else if ((*from == 0xCE && *(from + 1) == 0x86)) {
-00057             *to++ = 0xCE;
-00058             *to++ = 0x91;
-00059             from++;
-00060           }
-00061           //capital epsilon
-00062           else if ((*from == 0xCE && *(from + 1) == 0x88)) {
-00063             *to++ = 0xCE;
-00064             *to++ = 0x95;
-00065             from++;
-00066           }
-00067           //capital eta
-00068           else if ((*from == 0xCE && *(from + 1) == 0x89)) {
-00069             *to++ = 0xCE;
-00070             *to++ = 0x97;
-00071             from++;
-00072           }
-00073           //capital iota
-00074           else if ((*from == 0xCE && (*(from + 1) == 0x8A || *(from + 1) == 0xAA))) {
-00075             *to++ = 0xCE;
-00076             *to++ = 0x99;
-00077             from++;
-00078           }
-00079           //capital omicron
-00080           else if ((*from == 0xCE && *(from + 1) == 0x8C)) {
-00081             *to++ = 0xCE;
-00082             *to++ = 0x9F;
-00083             from++;
-00084           }
-00085           //capital upsilon
-00086           else if ((*from == 0xCE && (*(from + 1) == 0x8E || *(from + 1) == 0xAB))) {
-00087             *to++ = 0xCE;
-00088             *to++ = 0xA5;
-00089             from++;
-00090           }
-00091           //capital omega
-00092           else if ((*from == 0xCE && *(from + 1) == 0x8F)) {
-00093             *to++ = 0xCE;
-00094             *to++ = 0xA9;
-00095             from++;
-00096           }
-00097 
-00098           //alpha
-00099           else if ((*from == 0xCE && *(from + 1) == 0xAC)) {
-00100             *to++ = 0xCE;
-00101             *to++ = 0xB1;
-00102             from++;
-00103           }
-00104           //epsilon
-00105           else if ((*from == 0xCE && *(from + 1) == 0xAD)) {
-00106             *to++ = 0xCE;
-00107             *to++ = 0xB5;
-00108             from++;
-00109           }
-00110           //eta
-00111           else if ((*from == 0xCE && *(from + 1) == 0xAE)) {
-00112             *to++ = 0xCE;
-00113             *to++ = 0xB7;
-00114             from++;
-00115           }
-00116           //iota
-00117           else if ((*from == 0xCE && *(from + 1) == 0xAF) || (*from == 0xCF && *(from + 1) == 0x8A)) {
-00118             *to++ = 0xCE;
-00119             *to++ = 0xB9;
-00120             from++;
-00121           }
-00122           //omicron
-00123           else if ((*from == 0xCF && *(from + 1) == 0x8C)) {
-00124             *to++ = 0xCE;
-00125             *to++ = 0xBF;
-00126             from++;
-00127           }
-00128           //upsilon
-00129           else if ((*from == 0xCE && *(from + 1) == 0x88) || (*from == 0xCF && (*(from + 1) == 0x8B || *(from + 1) == 0x8D))) {
-00130             *to++ = 0xCF;
-00131             *to++ = 0x85;
-00132             from++;
-00133           }
-00134           //omega
-00135           else if ((*from == 0xCF && *(from + 1) == 0x8E)) {
-00136             *to++ = 0xCF;
-00137             *to++ = 0x89;
-00138             from++;
-00139           }
-00140 
-00141           //Extended Greek
-00142           //capital alpha
-00143           else if (*from == 0xE1 && ((*(from + 1) == 0xBC || *(from + 1) == 0xBE) && *(from + 2) >= 0x88 && *(from + 2) <= 0x8F) || (*(from + 1) == 0xBE && *(from + 2) >= 0xB8 && *(from + 2) <= 0xBC)) {
-00144             *to++ = 0xCE;
-00145             *to++ = 0x91;
-00146             from+=2;
-00147           }
-00148           //capital epsilon
-00149           else if (*from == 0xE1 && ((*(from + 1) == 0xBC && *(from + 2) >= 0x98 && *(from + 2) <= 0x9D) || (*(from + 1) == 0xBF && (*(from + 2) == 0x88 || *(from + 2) == 0x89)))) {
-00150             *to++ = 0xCE;
-00151             *to++ = 0x95;
-00152             from+=2;
-00153           }
-00154           //capital eta
-00155           else if (*from == 0xE1 && ((*(from + 1) == 0xBC && *(from + 2) >= 0xA8 && *(from + 2) <= 0xAF) || (*(from + 1) == 0xBE && *(from + 2) >= 0x98 && *(from + 2) <= 0x9F) || (*(from + 1) == 0xBF && *(from + 2) >= 0x8A && *(from + 2) <= 0x8C))) {
-00156             *to++ = 0xCE;
-00157             *to++ = 0x97;
-00158             from+=2;
-00159           }
-00160           //capital iota
-00161           else if (*from == 0xE1 && ((*(from + 1) == 0xBC && *(from + 2) >= 0xB8 && *(from + 2) <= 0xBF) || (*(from + 1) == 0xBF && *(from + 2) >= 0x98 && *(from + 2) <= 0x9B))) {
-00162             *to++ = 0xCE;
-00163             *to++ = 0x99;
-00164             from+=2;
-00165           }
-00166           //capital omicron
-00167           else if (*from == 0xE1 && ((*(from + 1) == 0xBD && *(from + 2) >= 0x88 && *(from + 2) <= 0x8D) || (*(from + 1) == 0xBF && *(from + 2) == 0xB8 || *(from + 2) == 0xB9))) {
-00168             *to++ = 0xCE;
-00169             *to++ = 0x9F;
-00170             from+=2;
-00171           }
-00172           //capital upsilon
-00173           else if (*from == 0xE1 && ((*(from + 1) == 0xBD && *(from + 2) >= 0x99 && *(from + 2) <= 0x9F) || (*(from + 1) == 0xBF && *(from + 2) >= 0xA8 && *(from + 2) <= 0xAB))) {
-00174             *to++ = 0xCE;
-00175             *to++ = 0xA5;
-00176             from+=2;
-00177           }
-00178           //capital omega
-00179           else if (*from == 0xE1 && (((*(from + 1) == 0xBD || *(from + 1) == 0xBE) && *(from + 2) >= 0xA8 && *(from + 2) <= 0xAF) || (*(from + 1) == 0xBF && *(from + 2) >= 0xBA && *(from + 2) <= 0xBC))) {
-00180             *to++ = 0xCE;
-00181             *to++ = 0xA9;
-00182             from+=2;
-00183           }
-00184           //capital rho
-00185           else if (*from == 0xE1 && *(from + 1) == 0xBF && *(from + 2) == 0xAC) {
-00186             *to++ = 0xCE;
-00187             *to++ = 0xA1;
-00188             from+=2;
-00189           }
-00190 
-00191           //alpha
-00192           else if (*from == 0xE1 && ((*(from + 1) == 0xBC || *(from + 1) == 0xBE) && *(from + 2) >= 0x80 && *(from + 2) <= 0x87) || (*(from + 1) == 0xBD && (*(from + 2) == 0xB0 || *(from + 2) == 0xB1)) || (*(from + 1) == 0xBE && *(from + 2) >= 0xB0 && *(from + 2) <= 0xB7)) {
-00193             *to++ = 0xCE;
-00194             *to++ = 0xB1;
-00195             from+=2;
-00196           }
-00197           //epsilon
-00198           else if (*from == 0xE1 && ((*(from + 1) == 0xBC && *(from + 2) >= 0x90 && *(from + 2) <= 0x95) || (*(from + 1) == 0xBD && (*(from + 2) == 0xB2 || *(from + 2) == 0xB3)))) {
-00199             *to++ = 0xCE;
-00200             *to++ = 0xB5;
-00201             from+=2;
-00202           }
-00203           //eta
-00204           else if (*from == 0xE1 && ((*(from + 1) == 0xBE && *(from + 2) >= 0x90 && *(from + 2) <= 0x97) || (*(from + 1) == 0xBC && *(from + 2) >= 0xA0 && *(from + 2) <= 0xA7) || (*(from + 1) == 0xBF && *(from + 2) >= 0x82 && *(from + 2) <= 0x87) || (*(from + 1) == 0xBD && (*(from + 2) == 0xB4 || *(from + 2) == 0xB5)))) {
-00205             *to++ = 0xCE;
-00206             *to++ = 0xB7;
-00207             from+=2;
-00208           }
-00209           //iota
-00210           else if (*from == 0xE1 && ((*(from + 1) == 0xBC && *(from + 2) >= 0xB0 && *(from + 2) <= 0xB7) || (*(from + 1) == 0xBD && (*(from + 2) == 0xB6 || *(from + 2) == 0xB7)) || (*(from + 1) == 0xBF && *(from + 2) >= 0x90 && *(from + 2) <= 0x97))) {
-00211             *to++ = 0xCE;
-00212             *to++ = 0xB9;
-00213             from+=2;
-00214           }
-00215           //omicron
-00216           else if (*from == 0xE1 && (*(from + 1) == 0xBD && ((*(from + 2) >= 0x80 && *(from + 2) <= 0x85) || (*(from + 2) == 0xB8 || *(from + 2) == 0xB9)))) {
-00217             *to++ = 0xCE;
-00218             *to++ = 0xBF;
-00219             from+=2;
-00220           }
-00221           //upsilon
-00222           else if (*from == 0xE1 && ((*(from + 1) == 0xBD && ((*(from + 2) >= 0x90 && *(from + 2) <= 0x97) || *(from + 2) == 0xBA || *(from + 2) == 0xBB)) || (*(from + 1) == 0xBF && ((*(from + 2) >= 0xA0 && *(from + 2) <= 0xA3) || *(from + 2) == 0xA6 || *(from + 2) == 0xA7)))) {
-00223             *to++ = 0xCF;
-00224             *to++ = 0x85;
-00225             from+=2;
-00226           }
-00227           //omega
-00228           else if (*from == 0xE1 && ((*(from + 1) == 0xBD && ((*(from + 2) >= 0xA0 && *(from + 2) <= 0xA7) || (*(from + 2) == 0xBC || *(from + 2) == 0xBD))) || (*(from + 1) == 0xBE && (*(from + 2) >= 0xA0 && *(from + 2) <= 0xA7)) || (*(from + 1) == 0xBF && *(from + 2) >= 0xB2 && *(from + 2) <= 0xB7))) {
-00229             *to++ = 0xCF;
-00230             *to++ = 0x89;
-00231             from+=2;
-00232           }
-00233           //rho
-00234           else if (*from == 0xE1 && *(from + 1) == 0xBF && (*(from + 2) == 0xA4 && *(from + 2) == 0xA5)) {
-00235             *to++ = 0xCF;
-00236             *to++ = 0x81;
-00237             from+=2;
-00238           }
-00239           else
-00240             *to++ = *from;
-00241         }
-00242         *to++ = 0;
-00243         *to = 0;
-00244      }
-00245         return 0;
-00246 }
-00247 
-00248 
-00249 
-00250 
-00251 
-00252 
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utf8greekaccents_8h-source.html b/doc/api-documentation/html/utf8greekaccents_8h-source.html deleted file mode 100644 index c9ac492..0000000 --- a/doc/api-documentation/html/utf8greekaccents_8h-source.html +++ /dev/null @@ -1,69 +0,0 @@ - - -utf8greekaccents.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utf8greekaccents.h

00001 /*
-00002  *
-00003  *
-00004  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00005  *      CrossWire Bible Society
-00006  *      P. O. Box 2528
-00007  *      Tempe, AZ  85280-2528
-00008  *
-00009  * This program is free software; you can redistribute it and/or modify it
-00010  * under the terms of the GNU General Public License as published by the
-00011  * Free Software Foundation version 2.
-00012  *
-00013  * This program is distributed in the hope that it will be useful, but
-00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00016  * General Public License for more details.
-00017  *
-00018  */
-00019 
-00020 #ifndef UTF8GREEKACCENTS_H
-00021 #define UTF8GREEKACCENTS_H
-00022 
-00023 #include <swfilter.h>
-00024 
-00025 #include <defs.h>
-00026 
-00029 class SWDLLEXPORT UTF8GreekAccents:public SWFilter
-00030 {
-00031   bool option;
-00032   static const char on[];
-00033   static const char off[];
-00034   static const char optName[];
-00035   static const char optTip[];
-00036   OptionsList options;
-00037 public:
-00038     UTF8GreekAccents ();
-00039     virtual ~ UTF8GreekAccents ();
-00040   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00041   virtual const char *getOptionName ()
-00042   {
-00043     return optName;
-00044   }
-00045   virtual const char *getOptionTip ()
-00046   {
-00047     return optTip;
-00048   }
-00049   virtual void setOptionValue (const char *ival);
-00050   virtual const char *getOptionValue ();
-00051   virtual OptionsList getOptionValues ()
-00052   {
-00053     return options;
-00054   }
-00055 };
-00056 
-00057 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utf8hebrewpoints_8cpp-source.html b/doc/api-documentation/html/utf8hebrewpoints_8cpp-source.html deleted file mode 100644 index a14509c..0000000 --- a/doc/api-documentation/html/utf8hebrewpoints_8cpp-source.html +++ /dev/null @@ -1,69 +0,0 @@ - - -utf8hebrewpoints.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utf8hebrewpoints.cpp

00001 /******************************************************************************
-00002  *
-00003  * UTF8HebrewPoints - SWFilter decendant to remove UTF-8 Hebrew vowel points
-00004  *
-00005  */
-00006 
-00007 
-00008 #include <stdlib.h>
-00009 #include <stdio.h>
-00010 #include <utf8hebrewpoints.h>
-00011 
-00012 
-00013 const char UTF8HebrewPoints::on[] = "On";
-00014 const char UTF8HebrewPoints::off[] = "Off";
-00015 const char UTF8HebrewPoints::optName[] = "Hebrew Vowel Points";
-00016 const char UTF8HebrewPoints::optTip[] = "Toggles Hebrew Vowel Points";
-00017 
-00018 UTF8HebrewPoints::UTF8HebrewPoints() {
-00019         option = true;
-00020         options.push_back(on);
-00021         options.push_back(off);
-00022 }
-00023 
-00024 UTF8HebrewPoints::~UTF8HebrewPoints(){};
-00025 
-00026 void UTF8HebrewPoints::setOptionValue(const char *ival)
-00027 {
-00028         option = (!stricmp(ival, on));
-00029 }
-00030 
-00031 const char *UTF8HebrewPoints::getOptionValue()
-00032 {
-00033         return (option) ? on:off;
-00034 }
-00035 
-00036 char UTF8HebrewPoints::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00037 {
-00038         if (!option) {
-00039                 unsigned char *to, *from;
-00040 
-00041                 to = (unsigned char*)text;      
-00042                 //The UTF-8 range 0xD6 0xB0 to 0xD6 0xBF excluding 0xD6 0x consist of Hebrew cantillation marks so block those out.
-00043                 for (from = (unsigned char*)text; *from; from++) {
-00044                         if ((*from == 0xD6) && (*(from + 1) >= 0xB0 && *(from + 1) <= 0xBF) && (*(from + 1) != 0xBE)) {
-00045                                 from++;
-00046                         }
-00047                         else {
-00048                                 *to++ = *from;
-00049                         }
-00050                 }
-00051                 *to++ = 0;
-00052                 *to = 0;
-00053      }
-00054         return 0;
-00055 }
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utf8hebrewpoints_8h-source.html b/doc/api-documentation/html/utf8hebrewpoints_8h-source.html deleted file mode 100644 index 26459cc..0000000 --- a/doc/api-documentation/html/utf8hebrewpoints_8h-source.html +++ /dev/null @@ -1,69 +0,0 @@ - - -utf8hebrewpoints.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utf8hebrewpoints.h

00001 /*
-00002  *
-00003  *
-00004  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00005  *      CrossWire Bible Society
-00006  *      P. O. Box 2528
-00007  *      Tempe, AZ  85280-2528
-00008  *
-00009  * This program is free software; you can redistribute it and/or modify it
-00010  * under the terms of the GNU General Public License as published by the
-00011  * Free Software Foundation version 2.
-00012  *
-00013  * This program is distributed in the hope that it will be useful, but
-00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00016  * General Public License for more details.
-00017  *
-00018  */
-00019 
-00020 #ifndef UTF8HEBREWPOINTS_H
-00021 #define UTF8HEBREWPOINTS_H
-00022 
-00023 #include <swfilter.h>
-00024 
-00025 #include <defs.h>
-00026 
-00029 class SWDLLEXPORT UTF8HebrewPoints:public SWFilter
-00030 {
-00031   bool option;
-00032   static const char on[];
-00033   static const char off[];
-00034   static const char optName[];
-00035   static const char optTip[];
-00036   OptionsList options;
-00037 public:
-00038     UTF8HebrewPoints ();
-00039     virtual ~ UTF8HebrewPoints ();
-00040   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00041   virtual const char *getOptionName ()
-00042   {
-00043     return optName;
-00044   }
-00045   virtual const char *getOptionTip ()
-00046   {
-00047     return optTip;
-00048   }
-00049   virtual void setOptionValue (const char *ival);
-00050   virtual const char *getOptionValue ();
-00051   virtual OptionsList getOptionValues ()
-00052   {
-00053     return options;
-00054   }
-00055 };
-00056 
-00057 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utf8html_8cpp-source.html b/doc/api-documentation/html/utf8html_8cpp-source.html deleted file mode 100644 index bb703ab..0000000 --- a/doc/api-documentation/html/utf8html_8cpp-source.html +++ /dev/null @@ -1,80 +0,0 @@ - - -utf8html.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utf8html.cpp

00001 /******************************************************************************
-00002  *
-00003  * utf8html -   SWFilter decendant to convert a UTF-8 stream to HTML escapes
-00004  *
-00005  */
-00006 
-00007 
-00008 #include <stdlib.h>
-00009 #include <stdio.h>
-00010 #include <utf8html.h>
-00011 
-00012 UTF8HTML::UTF8HTML() {
-00013 }
-00014 
-00015 
-00016 char UTF8HTML::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00017 {
-00018         unsigned char *to, *from;
-00019         int len;
-00020         char digit[10];
-00021         unsigned long ch;
-00022 
-00023         len = strlenw(text) + 2;                                                // shift string to right of buffer
-00024         if (len < maxlen) {
-00025                 memmove(&text[maxlen - len], text, len);
-00026                 from = (unsigned char*)&text[maxlen - len];
-00027         }
-00028         else    from = (unsigned char*)text;
-00029         // -------------------------------
-00030         for (to = (unsigned char*)text; *from; from++) {
-00031           ch = 0;
-00032           if ((*from & 128) != 128) {
-00033 //              if (*from != ' ')
-00034                *to++ = *from;
-00035                continue;
-00036           }
-00037           if ((*from & 128) && ((*from & 64) != 64)) {
-00038             // error
-00039                *from = 'x';
-00040                continue;
-00041           }
-00042           *from <<= 1;
-00043           int subsequent;
-00044           for (subsequent = 1; (*from & 128); subsequent++) {
-00045                 *from <<= 1;
-00046                from[subsequent] &= 63;
-00047                ch <<= 6;
-00048                ch |= from[subsequent];
-00049           }
-00050           subsequent--;
-00051           *from <<=1;
-00052           char significantFirstBits = 8 - (2+subsequent);
-00053           
-00054           ch |= (((short)*from) << (((6*subsequent)+significantFirstBits)-8));
-00055           from += subsequent;
-00056           *to++ = '&';
-00057           *to++ = '#';
-00058           sprintf(digit, "%d", ch);
-00059                 for (char *dig = digit; *dig; dig++)
-00060                         *to++ = *dig;
-00061                 *to++ = ';';
-00062         }
-00063         *to++ = 0;
-00064         *to = 0;
-00065         return 0;
-00066 }
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utf8html_8h-source.html b/doc/api-documentation/html/utf8html_8h-source.html deleted file mode 100644 index 7552d51..0000000 --- a/doc/api-documentation/html/utf8html_8h-source.html +++ /dev/null @@ -1,47 +0,0 @@ - - -utf8html.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utf8html.h

00001 /*
-00002  *
-00003  *
-00004  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00005  *      CrossWire Bible Society
-00006  *      P. O. Box 2528
-00007  *      Tempe, AZ  85280-2528
-00008  *
-00009  * This program is free software; you can redistribute it and/or modify it
-00010  * under the terms of the GNU General Public License as published by the
-00011  * Free Software Foundation version 2.
-00012  *
-00013  * This program is distributed in the hope that it will be useful, but
-00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00016  * General Public License for more details.
-00017  *
-00018  */
-00019 
-00020 #ifndef UTF8HTML_H
-00021 #define UTF8HTML_H
-00022 
-00023 #include <swfilter.h>
-00024 
-00025 #include <defs.h>
-00026 
-00029 class SWDLLEXPORT UTF8HTML:public SWFilter {
-00030 public:
-00031   UTF8HTML();
-00032   virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule * = 0);
-00033 };
-00034 
-00035 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utf8latin1_8cpp-source.html b/doc/api-documentation/html/utf8latin1_8cpp-source.html deleted file mode 100644 index cf89e04..0000000 --- a/doc/api-documentation/html/utf8latin1_8cpp-source.html +++ /dev/null @@ -1,88 +0,0 @@ - - -utf8latin1.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utf8latin1.cpp

00001 /******************************************************************************
-00002  *
-00003  * UTF8Latin1 - SWFilter decendant to convert UTF-8 to Latin-1
-00004  *
-00005  */
-00006 
-00007 #include <stdlib.h>
-00008 #include <stdio.h>
-00009 
-00010 #include <utf8latin1.h>
-00011 
-00012 UTF8Latin1::UTF8Latin1(char rchar) : replacementChar(rchar) {
-00013 }
-00014 
-00015 
-00016 char UTF8Latin1::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00017 {
-00018   unsigned char *from;
-00019   unsigned short *to;
-00020 
-00021   int len;
-00022   unsigned long uchar;
-00023   unsigned char significantFirstBits, subsequent;
-00024   
-00025   len = strlen(text) + 1;                                               // shift string to right of buffer
-00026   if (len < maxlen) {
-00027     memmove(&text[maxlen - len], text, len);
-00028     from = (unsigned char*)&text[maxlen - len];
-00029   }
-00030   else
-00031     from = (unsigned char*)text;
-00032   
-00033   
-00034   // -------------------------------
-00035   
-00036   for (to = (unsigned short*)text; *from; from++) {
-00037     uchar = 0;
-00038     if ((*from & 128) != 128) {
-00039       //                if (*from != ' ')
-00040       uchar = *from;
-00041     }
-00042     else if ((*from & 128) && ((*from & 64) != 64)) {
-00043       // error, do nothing
-00044       continue;
-00045     }
-00046     else {
-00047       *from <<= 1;
-00048       for (subsequent = 1; (*from & 128); subsequent++) {
-00049         *from <<= 1;
-00050         from[subsequent] &= 63;
-00051         uchar <<= 6;
-00052         uchar |= from[subsequent];
-00053       }
-00054       subsequent--;
-00055       *from <<=1;
-00056       significantFirstBits = 8 - (2+subsequent);
-00057       
-00058       uchar |= (((short)*from) << (((6*subsequent)+significantFirstBits)-8));
-00059       from += subsequent;
-00060     }
-00061 
-00062     if (uchar < 0xff) {
-00063         *to++ = (unsigned char)uchar;
-00064     }
-00065     else {
-00066         *to++ = replacementChar;
-00067     }
-00068   }
-00069   *to++ = 0;
-00070   *to = 0;
-00071 
-00072   return 0;
-00073 }
-00074 
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utf8latin1_8h-source.html b/doc/api-documentation/html/utf8latin1_8h-source.html deleted file mode 100644 index 9799eb7..0000000 --- a/doc/api-documentation/html/utf8latin1_8h-source.html +++ /dev/null @@ -1,48 +0,0 @@ - - -utf8latin1.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utf8latin1.h

00001 /*
-00002  *
-00003  *
-00004  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00005  *      CrossWire Bible Society
-00006  *      P. O. Box 2528
-00007  *      Tempe, AZ  85280-2528
-00008  *
-00009  * This program is free software; you can redistribute it and/or modify it
-00010  * under the terms of the GNU General Public License as published by the
-00011  * Free Software Foundation version 2.
-00012  *
-00013  * This program is distributed in the hope that it will be useful, but
-00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00016  * General Public License for more details.
-00017  *
-00018  */
-00019 
-00020 #ifndef UTF8Latin1_H
-00021 #define UTF8Latin1_H
-00022 
-00023 #include <swfilter.h>
-00024 
-00025 #include <defs.h>
-00026 
-00029 class SWDLLEXPORT UTF8Latin1:public SWFilter {
-00030   char replacementChar;
-00031 public:
-00032   UTF8Latin1(char rchar = '?');
-00033   virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule * = 0);
-00034 };
-00035 
-00036 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utf8nfc_8cpp-source.html b/doc/api-documentation/html/utf8nfc_8cpp-source.html deleted file mode 100644 index 6451121..0000000 --- a/doc/api-documentation/html/utf8nfc_8cpp-source.html +++ /dev/null @@ -1,60 +0,0 @@ - - -utf8nfc.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utf8nfc.cpp

00001 /******************************************************************************
-00002 *
-00003 * utf8nfc - SWFilter decendant to perform NFC (canonical composition
-00004 *                   normalization) on UTF-8 text
-00005 */
-00006 
-00007 #ifdef _ICU_
-00008 
-00009 #include <stdlib.h>
-00010 #include <string.h>
-00011 
-00012 #ifdef __GNUC__
-00013 #include <unixstr.h>
-00014 #endif
-00015 
-00016 #include <utf8nfc.h>
-00017 
-00018 UTF8NFC::UTF8NFC() {
-00019         conv = ucnv_open("UTF-8", &err);
-00020 }
-00021 
-00022 UTF8NFC::~UTF8NFC() {
-00023          ucnv_close(conv);
-00024 }
-00025 
-00026 char UTF8NFC::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00027 {
-00028         int32_t len = strlen(text) * 2;
-00029         source = new UChar[len + 1]; //each char could become a surrogate pair
-00030 
-00031         // Convert UTF-8 string to UTF-16 (UChars)
-00032         len = ucnv_toUChars(conv, source, len, text, -1, &err);
-00033         target = new UChar[len + 1];
-00034 
-00035         //canonical composition
-00036         unorm_normalize(source, len, UNORM_NFC, 0, target, len, &err);
-00037 
-00038         ucnv_fromUChars(conv, text, maxlen, target, -1, &err);
-00039 
-00040         delete [] source;
-00041         delete [] target;
-00042 
-00043         return 0;
-00044 }
-00045 
-00046 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utf8nfc_8h-source.html b/doc/api-documentation/html/utf8nfc_8h-source.html deleted file mode 100644 index da2c7eb..0000000 --- a/doc/api-documentation/html/utf8nfc_8h-source.html +++ /dev/null @@ -1,60 +0,0 @@ - - -utf8nfc.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utf8nfc.h

00001 /*
-00002  *
-00003  * Copyright 2001 CrossWire Bible Society (http://www.crosswire.org)
-00004  *      CrossWire Bible Society
-00005  *      P. O. Box 2528
-00006  *      Tempe, AZ  85280-2528
-00007  *
-00008  * This program is free software; you can redistribute it and/or modify it
-00009  * under the terms of the GNU General Public License as published by the
-00010  * Free Software Foundation version 2.
-00011  *
-00012  * This program is distributed in the hope that it will be useful, but
-00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00015  * General Public License for more details.
-00016  *
-00017  */
-00018 #ifdef _ICU_
-00019 
-00020 #ifndef UTF8NFC_H
-00021 #define UTF8NFC_H
-00022 
-00023 #include <swfilter.h>
-00024 
-00025 #include <unicode/utypes.h>
-00026 #include <unicode/ucnv.h>
-00027 #include <unicode/uchar.h>
-00028 #include <unicode/unorm.h>
-00029 
-00030 #include <defs.h>
-00031 
-00032 class SWDLLEXPORT UTF8NFC : public SWFilter
-00033 {
-00034  private:
-00035   UConverter* conv;
-00036   UChar *source, *target;
-00037   UErrorCode err;
-00038  public:
-00039   UTF8NFC();
-00040   ~UTF8NFC();  
-00041   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00042 };
-00043 
-00044 #endif
-00045 
-00046 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utf8nfkd_8cpp-source.html b/doc/api-documentation/html/utf8nfkd_8cpp-source.html deleted file mode 100644 index b01fd27..0000000 --- a/doc/api-documentation/html/utf8nfkd_8cpp-source.html +++ /dev/null @@ -1,60 +0,0 @@ - - -utf8nfkd.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utf8nfkd.cpp

00001 /******************************************************************************
-00002 *
-00003 * utf8nfkd - SWFilter decendant to perform NFKD (compatability decomposition
-00004 *                   normalization) on UTF-8 text
-00005 */
-00006 
-00007 #ifdef _ICU_
-00008 
-00009 #include <stdlib.h>
-00010 #include <string.h>
-00011 
-00012 #ifdef __GNUC__
-00013 #include <unixstr.h>
-00014 #endif
-00015 
-00016 #include <utf8nfkd.h>
-00017 
-00018 UTF8NFKD::UTF8NFKD() {
-00019         conv = ucnv_open("UTF-8", &err);
-00020 }
-00021 
-00022 UTF8NFKD::~UTF8NFKD() {
-00023          ucnv_close(conv);
-00024 }
-00025 
-00026 char UTF8NFKD::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00027 {
-00028         int32_t len = strlen(text) * 2;
-00029         source = new UChar[len + 1]; //each char could become a surrogate pair
-00030 
-00031         // Convert UTF-8 string to UTF-16 (UChars)
-00032         len = ucnv_toUChars(conv, source, len, text, -1, &err);
-00033         target = new UChar[len + 1];
-00034 
-00035         //compatability decomposition
-00036         unorm_normalize(source, len, UNORM_NFKD, 0, target, len, &err);
-00037 
-00038         ucnv_fromUChars(conv, text, maxlen, target, -1, &err);
-00039 
-00040         delete [] source;
-00041         delete [] target;
-00042 
-00043         return 0;
-00044 }
-00045 
-00046 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utf8nfkd_8h-source.html b/doc/api-documentation/html/utf8nfkd_8h-source.html deleted file mode 100644 index f07bd90..0000000 --- a/doc/api-documentation/html/utf8nfkd_8h-source.html +++ /dev/null @@ -1,60 +0,0 @@ - - -utf8nfkd.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utf8nfkd.h

00001 /*
-00002  *
-00003  * Copyright 2001 CrossWire Bible Society (http://www.crosswire.org)
-00004  *      CrossWire Bible Society
-00005  *      P. O. Box 2528
-00006  *      Tempe, AZ  85280-2528
-00007  *
-00008  * This program is free software; you can redistribute it and/or modify it
-00009  * under the terms of the GNU General Public License as published by the
-00010  * Free Software Foundation version 2.
-00011  *
-00012  * This program is distributed in the hope that it will be useful, but
-00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00015  * General Public License for more details.
-00016  *
-00017  */
-00018 #ifdef _ICU_
-00019 
-00020 #ifndef UTF8NFKD_H
-00021 #define UTF8NFKD_H
-00022 
-00023 #include <swfilter.h>
-00024 
-00025 #include <unicode/utypes.h>
-00026 #include <unicode/ucnv.h>
-00027 #include <unicode/uchar.h>
-00028 #include <unicode/unorm.h>
-00029 
-00030 #include <defs.h>
-00031 
-00032 class SWDLLEXPORT UTF8NFKD : public SWFilter
-00033 {
-00034  private:
-00035   UConverter* conv;
-00036   UChar *source, *target;
-00037   UErrorCode err;
-00038  public:
-00039   UTF8NFKD();
-00040   ~UTF8NFKD();  
-00041   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00042 };
-00043 
-00044 #endif
-00045 
-00046 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utf8transliterator_8cpp-source.html b/doc/api-documentation/html/utf8transliterator_8cpp-source.html deleted file mode 100644 index 1583384..0000000 --- a/doc/api-documentation/html/utf8transliterator_8cpp-source.html +++ /dev/null @@ -1,493 +0,0 @@ - - -utf8transliterator.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utf8transliterator.cpp

00001 /******************************************************************************
-00002 *
-00003 * utf8transliterators - SWFilter decendant to transliterate between
-00004 *                        ICU-supported scripts.
-00005 */
-00006 
-00007 #ifdef _ICU_
-00008 
-00009 #include <stdlib.h>
-00010 #include <string.h>
-00011 
-00012 #ifdef __GNUC__
-00013 #include <unixstr.h>
-00014 #endif
-00015 
-00016 #include <utf8transliterator.h>
-00017 
-00018 const char UTF8Transliterator::optionstring[NUMTARGETSCRIPTS][16] = {
-00019         "Off",
-00020         "Latin",
-00021         "Basic Latin",
-00022         "Beta",
-00023         "BGreek",
-00024 /*
-00025         "Greek",
-00026         "Hebrew",
-00027         "Cyrillic",
-00028         "Arabic",
-00029         "Syriac",
-00030         "Katakana",
-00031         "Hiragana",
-00032         "Jamo",
-00033         "Hangul",
-00034         "Devanagari",
-00035         "Tamil",
-00036         "Bengali",
-00037         "Gurmukhi",
-00038         "Gujarati",
-00039         "Oriya",
-00040         "Telugu",
-00041         "Kannada",
-00042         "Malayalam",
-00043         "Thai",
-00044         "Georgian",
-00045         "Armenian",
-00046         "Ethiopic",
-00047         "Gothic",
-00048         "Ugaritic",
-00049         "Coptic"
-00050         */
-00051 };
-00052 
-00053 const char UTF8Transliterator::optName[] = "Transliteration";
-00054 const char UTF8Transliterator::optTip[] = "Transliterates between scripts";
-00055 
-00056 UTF8Transliterator::UTF8Transliterator() {
-00057         option = 0;
-00058         unsigned long i;
-00059         for (i = 0; i < NUMTARGETSCRIPTS; i++) {
-00060                 options.push_back(optionstring[i]);
-00061         }
-00062 }
-00063 
-00064 void UTF8Transliterator::setOptionValue(const char *ival)
-00065 {
-00066         unsigned char i = option = NUMTARGETSCRIPTS;
-00067         while (i && stricmp(ival, optionstring[i])) {
-00068                 i--;
-00069                 option = i;
-00070         }
-00071 }
-00072 
-00073 const char *UTF8Transliterator::getOptionValue()
-00074 {
-00075         return (NUMTARGETSCRIPTS > option) ? optionstring[option] : 0;
-00076 }
-00077 
-00078 char UTF8Transliterator::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00079 {
-00080         if (option) {   // if we want transliteration
-00081                 unsigned long i, j;
-00082                 UErrorCode err = U_ZERO_ERROR;
-00083                 UConverter * conv = NULL;
-00084                 conv = ucnv_open("UTF-8", &err);
-00085 
-00086                 bool compat = false;
-00087                 bool noNFC = false;
-00088 
-00089                 if (option == SE_JAMO) {
-00090                         noNFC = true;
-00091                 }
-00092 
-00093                 // Convert UTF-8 string to UTF-16 (UChars)
-00094                 j = strlen(text);
-00095                 int32_t len = (j * 2) + 1;
-00096                 UChar *source = new UChar[len];
-00097                 err = U_ZERO_ERROR;
-00098                 len = ucnv_toUChars(conv, source, len, text, j, &err);
-00099                 source[len] = 0;
-00100 
-00101                 // Figure out which scripts are used in the string
-00102                 unsigned char scripts[NUMSCRIPTS];
-00103 
-00104                 for (i = 0; i < NUMSCRIPTS; i++) {
-00105                         scripts[i] = false;
-00106                 }
-00107 
-00108                 for (i = 0; i < len; i++) {
-00109                         j = ublock_getCode(source[i]);
-00110                         switch (j) {
-00111                         case UBLOCK_BASIC_LATIN: scripts[SE_LATIN] = true; break;
-00112                         case UBLOCK_GREEK: scripts[SE_GREEK] = true; break;
-00113                         case UBLOCK_HEBREW: scripts[SE_HEBREW] = true; break;
-00114                         case UBLOCK_CYRILLIC: scripts[SE_CYRILLIC] = true; break;
-00115                         case UBLOCK_ARABIC: scripts[SE_ARABIC] = true; break;
-00116                         case UBLOCK_SYRIAC: scripts[SE_SYRIAC] = true; break;
-00117                         case UBLOCK_KATAKANA: scripts[SE_KATAKANA] = true; break;
-00118                         case UBLOCK_HIRAGANA: scripts[SE_HIRAGANA] = true; break;
-00119                         case UBLOCK_HANGUL_SYLLABLES: scripts[SE_HANGUL] = true; break;
-00120                         case UBLOCK_HANGUL_JAMO: scripts[SE_JAMO] = true; break;
-00121                         case UBLOCK_DEVANAGARI: scripts[SE_DEVANAGARI] = true; break;
-00122                         case UBLOCK_TAMIL: scripts[SE_TAMIL] = true; break;
-00123                         case UBLOCK_BENGALI: scripts[SE_BENGALI] = true; break;
-00124                         case UBLOCK_GURMUKHI: scripts[SE_GURMUKHI] = true; break;
-00125                         case UBLOCK_GUJARATI: scripts[SE_GUJARATI] = true; break;
-00126                         case UBLOCK_ORIYA: scripts[SE_ORIYA] = true; break;
-00127                         case UBLOCK_TELUGU: scripts[SE_TELUGU] = true; break;
-00128                         case UBLOCK_KANNADA: scripts[SE_KANNADA] = true; break;
-00129                         case UBLOCK_MALAYALAM: scripts[SE_MALAYALAM] = true; break;
-00130                         case UBLOCK_THAI: scripts[SE_THAI] = true; break;
-00131                         case UBLOCK_GEORGIAN: scripts[SE_GEORGIAN] = true; break;
-00132                         case UBLOCK_ARMENIAN: scripts[SE_ARMENIAN] = true; break;
-00133                         case UBLOCK_ETHIOPIC: scripts[SE_ETHIOPIC] = true; break;
-00134                         case UBLOCK_GOTHIC: scripts[SE_GOTHIC] = true; break;
-00135                         // needs Unicode 3.2? or 4.0? support from ICU
-00136                         //case UBLOCK_UGARITIC: scripts[SE_UGARITIC] = true; break;
-00137                         case UBLOCK_CJK_RADICALS_SUPPLEMENT:
-00138                         case UBLOCK_KANGXI_RADICALS:
-00139                         case UBLOCK_IDEOGRAPHIC_DESCRIPTION_CHARACTERS:
-00140                         case UBLOCK_CJK_SYMBOLS_AND_PUNCTUATION:
-00141                         case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A:
-00142                         case UBLOCK_CJK_UNIFIED_IDEOGRAPHS:
-00143                                 scripts[SE_HAN] = true;
-00144                                 break;
-00145                         case UBLOCK_CJK_COMPATIBILITY:
-00146                         case UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS:
-00147                         case UBLOCK_CJK_COMPATIBILITY_FORMS:
-00148                                 scripts[SE_HAN] = true;
-00149                                 compat = true;
-00150                                 break;
-00151                         case UBLOCK_HANGUL_COMPATIBILITY_JAMO:
-00152                                 scripts[SE_HANGUL] = true;
-00153                                 compat = true;
-00154                                 break;
-00155 
-00156                         default: scripts[SE_LATIN] = true;
-00157                         }
-00158                 } 
-00159                 scripts[option] = false; //turn off the reflexive transliteration
-00160                 
-00161                 //return if we have no transliteration to do for this text
-00162                 j = 0;
-00163                 for (i = 0; !j && i < NUMSCRIPTS; i++) {
-00164                         if (scripts[i]) j++;
-00165                 }
-00166                 if (!j) {
-00167                         ucnv_close(conv);
-00168                         return 0;
-00169                 }
-00170 
-00171                 UnicodeString id;
-00172                 if (compat) {
-00173                         id = UnicodeString("NFKD");
-00174                 }
-00175                 else {
-00176                         id = UnicodeString("NFD");
-00177                 }
-00178 
-00179                 //Simple X to Latin transliterators
-00180                 if (scripts[SE_GREEK]) {
-00181                         if (option == SE_BETA)
-00182                                 id += UnicodeString(";Greek-Beta");
-00183                         else if (option == SE_BGREEK)
-00184                                 id += UnicodeString(";Greek-BGreek");
-00185                         else {
-00186                     if (!strnicmp (((SWModule*)module)->Lang(), "cop", 3)) {
-00187                                         id += UnicodeString(";Coptic-Latin");
-00188                 }
-00189                 else {
-00190                                                 id += UnicodeString(";Greek-Latin");
-00191                 }
-00192                                 scripts[SE_LATIN] = true;
-00193                         }
-00194                 }
-00195                 if (scripts[SE_HEBREW]) {
-00196                         if (option == SE_BETA)
-00197                                 id += UnicodeString(";Hebrew-CCAT");
-00198                         else if (option == SE_SYRIAC)
-00199                                 id += UnicodeString(";Hebrew-Syriac");
-00200                         else {
-00201                                 id += UnicodeString(";Hebrew-Latin");
-00202                                 scripts[SE_LATIN] = true;
-00203                         }
-00204                 }
-00205                 if (scripts[SE_CYRILLIC]) {
-00206                         id += UnicodeString(";Cyrillic-Latin");
-00207                         scripts[SE_LATIN] = true;
-00208                 }
-00209                 if (scripts[SE_ARABIC]) {
-00210                         id += UnicodeString(";Arabic-Latin");
-00211                         scripts[SE_LATIN] = true;
-00212                 }
-00213                 if (scripts[SE_SYRIAC]) {
-00214                         if (option == SE_BETA)
-00215                                 id += UnicodeString(";Syriac-CCAT");
-00216                         else if (option == SE_HEBREW)
-00217                                 id += UnicodeString(";Syriac-Hebrew");
-00218                         else {
-00219                                 id += UnicodeString(";Syriac-Latin");
-00220                                 scripts[SE_LATIN] = true;
-00221                         }
-00222                 }
-00223                 if (scripts[SE_THAI]) {
-00224                         id += UnicodeString(";Thai-Latin");
-00225                         scripts[SE_LATIN] = true;
-00226                 }
-00227                 if (scripts[SE_GEORGIAN]) {
-00228                         id += UnicodeString(";Georgian-Latin");
-00229                         scripts[SE_LATIN] = true;
-00230                 }
-00231                 if (scripts[SE_ARMENIAN]) {
-00232                         id += UnicodeString(";Armenian-Latin");
-00233                         scripts[SE_LATIN] = true;
-00234                 }                
-00235                 if (scripts[SE_ETHIOPIC]) {
-00236                         id += UnicodeString(";Ethiopic-Latin");
-00237                         scripts[SE_LATIN] = true;
-00238                 }
-00239                 if (scripts[SE_GOTHIC]) {
-00240                         id += UnicodeString(";Gothic-Latin");
-00241                         scripts[SE_LATIN] = true;
-00242                 }
-00243                 if (scripts[SE_UGARITIC]) {
-00244                         id += UnicodeString(";Ugaritic-Latin");
-00245                         scripts[SE_LATIN] = true;
-00246                 }
-00247         if (scripts[SE_HAN]) {
-00248                 if (!strnicmp (((SWModule*)module)->Lang(), "ja", 2)) {
-00249                         id += UnicodeString(";Kanji-OnRomaji");
-00250             }
-00251             else {
-00252                         id += UnicodeString(";Han-Pinyin");
-00253             }
-00254                         scripts[SE_LATIN] = true;
-00255                 }
-00256 
-00257                 // Inter-Kana and Kana to Latin transliterators
-00258                 if (option == SE_HIRAGANA && scripts[SE_KATAKANA]) {
-00259                         id += UnicodeString(";Katakana-Hiragana");
-00260                         scripts[SE_HIRAGANA] = true;
-00261                 }
-00262                 else if (option == SE_KATAKANA && scripts[SE_HIRAGANA]) {
-00263                         id += UnicodeString(";Hiragana-Katakana");
-00264                         scripts[SE_KATAKANA] = true;
-00265                 }
-00266                 else {
-00267                         if (scripts[SE_KATAKANA]) {
-00268                                 id += UnicodeString(";Katakana-Latin");
-00269                                 scripts[SE_LATIN] = true;
-00270                         }
-00271                         if (scripts[SE_HIRAGANA]) {
-00272                                 id += UnicodeString(";Hiragana-Latin");
-00273                                 scripts[SE_LATIN] = true;
-00274                         }
-00275                 }
-00276 
-00277                 // Inter-Korean and Korean to Latin transliterators
-00278                 if (option == SE_HANGUL && scripts[SE_JAMO]) {
-00279                         noNFC = false;
-00280                         scripts[SE_HANGUL] = true;
-00281                 }
-00282                 else if (option == SE_JAMO && scripts[SE_HANGUL]) {
-00283                         noNFC = true;
-00284                         scripts[SE_JAMO] = true;
-00285                 }
-00286                 else {
-00287                         if (scripts[SE_HANGUL]) {
-00288                                 id += UnicodeString(";Hangul-Latin");
-00289                                 scripts[SE_LATIN] = true;
-00290                         }
-00291                         if (scripts[SE_JAMO]) {
-00292                                 id += UnicodeString(";Jamo-Latin");
-00293                                 scripts[SE_LATIN] = true;
-00294                         }
-00295                 }
-00296 
-00297                 // Indic-Latin
-00298                 if (option < SE_DEVANAGARI || option > SE_MALAYALAM) {
-00299                         // Indic to Latin
-00300                         if (scripts[SE_TAMIL]) {
-00301                                 id += UnicodeString(";Tamil-Latin");
-00302                                 scripts[SE_LATIN] = true;
-00303                         }
-00304                         if (scripts[SE_BENGALI]) {
-00305                                 id += UnicodeString(";Bengali-Latin");
-00306                                 scripts[SE_LATIN] = true;
-00307                         }
-00308                         if (scripts[SE_GURMUKHI]) {
-00309                                 id += UnicodeString(";Gurmukhi-Latin");
-00310                                 scripts[SE_LATIN] = true;
-00311                         }
-00312                         if (scripts[SE_GUJARATI]) {
-00313                                 id += UnicodeString(";Gujarati-Latin");
-00314                                 scripts[SE_LATIN] = true;
-00315                         }
-00316                         if (scripts[SE_ORIYA]) {
-00317                                 id += UnicodeString(";Oriya-Latin");
-00318                                 scripts[SE_LATIN] = true;
-00319                         }
-00320                         if (scripts[SE_TELUGU]) {
-00321                                 id += UnicodeString(";Telugu-Latin");
-00322                                 scripts[SE_LATIN] = true;
-00323                         }
-00324                         if (scripts[SE_KANNADA]) {
-00325                                 id += UnicodeString(";Kannada-Latin");
-00326                                 scripts[SE_LATIN] = true;
-00327                         }
-00328                         if (scripts[SE_MALAYALAM]) {
-00329                                 id += UnicodeString(";Malayalam-Latin");
-00330                                 scripts[SE_LATIN] = true;
-00331                         }
-00332                 }
-00333                 else {
-00334                         if (scripts[SE_LATIN]) {
-00335                                 id += UnicodeString(";Latin-InterIndic");
-00336                         }
-00337                         if (scripts[SE_DEVANAGARI]) {
-00338                                 id += UnicodeString(";Devanagari-InterIndic");
-00339                         }
-00340                         if (scripts[SE_TAMIL]) {
-00341                                 id += UnicodeString(";Tamil-InterIndic");
-00342                         }
-00343                         if (scripts[SE_BENGALI]) {
-00344                                 id += UnicodeString(";Bengali-InterIndic");
-00345                         }
-00346                         if (scripts[SE_GURMUKHI]) {
-00347                                 id += UnicodeString(";Gurmurkhi-InterIndic");
-00348                         }
-00349                         if (scripts[SE_GUJARATI]) {
-00350                                 id += UnicodeString(";Gujarati-InterIndic");
-00351                         }
-00352                         if (scripts[SE_ORIYA]) {
-00353                                 id += UnicodeString(";Oriya-InterIndic");
-00354                         }
-00355                         if (scripts[SE_TELUGU]) {
-00356                                 id += UnicodeString(";Telugu-InterIndic");
-00357                         }
-00358                         if (scripts[SE_KANNADA]) {
-00359                                 id += UnicodeString(";Kannada-InterIndic");
-00360                         }
-00361                         if (scripts[SE_MALAYALAM]) {
-00362                                 id += UnicodeString(";Malayalam-InterIndic");
-00363                         }
-00364 
-00365                         switch(option) {
-00366                         case SE_DEVANAGARI:
-00367                                 id += UnicodeString(";InterIndic-Devanagari");
-00368                                 break;
-00369                         case SE_TAMIL:
-00370                                 id += UnicodeString(";InterIndic-Tamil");
-00371                                 break;
-00372                         case SE_BENGALI:
-00373                                 id += UnicodeString(";InterIndic-Bengali");
-00374                                 break;
-00375                         case SE_GURMUKHI:
-00376                                 id += UnicodeString(";InterIndic-Gurmukhi");
-00377                                 break;
-00378                         case SE_GUJARATI:
-00379                                 id += UnicodeString(";InterIndic-Gujarati");
-00380                                 break;
-00381                         case SE_ORIYA:
-00382                                 id += UnicodeString(";InterIndic-Oriya");
-00383                                 break;
-00384                         case SE_TELUGU:
-00385                                 id += UnicodeString(";InterIndic-Telugu");
-00386                                 break;
-00387                         case SE_KANNADA:
-00388                                 id += UnicodeString(";InterIndic-Kannada");
-00389                                 break;
-00390                         case SE_MALAYALAM:
-00391                                 id += UnicodeString(";InterIndic-Malayalam");
-00392                                 break;
-00393                         default:
-00394                                 id += UnicodeString(";InterIndic-Latin");
-00395                                 scripts[SE_LATIN] = true;
-00396                                 break;
-00397                         }
-00398                 }
-00399 
-00400                 if (scripts[SE_LATIN]) {
-00401                 switch (option) {
-00402                         case SE_GREEK:
-00403                                 id += UnicodeString(";Latin-Greek");
-00404                                 break;
-00405                         case SE_HEBREW:
-00406                                 id += UnicodeString(";Latin-Hebrew");
-00407                                 break;
-00408                         case SE_CYRILLIC:
-00409                                 id += UnicodeString(";Latin-Cyrillic");
-00410                                 break;
-00411                         case SE_ARABIC:
-00412                                 id += UnicodeString(";Latin-Arabic");
-00413                                 break;
-00414                         case SE_SYRIAC:
-00415                                 id += UnicodeString(";Latin-Syriac");
-00416                                 break;
-00417                         case SE_THAI:
-00418                                 id += UnicodeString(";Latin-Thai");
-00419                                 break;
-00420                         case SE_GEORGIAN:
-00421                                 id += UnicodeString(";Latin-Georgian");
-00422                                 break;
-00423                         case SE_ARMENIAN:
-00424                                 id += UnicodeString(";Latin-Armenian");
-00425                                 break;
-00426                         case SE_ETHIOPIC:
-00427                                 id += UnicodeString(";Latin-Ethiopic");
-00428                                 break;
-00429                         case SE_GOTHIC:
-00430                                 id += UnicodeString(";Latin-Gothic");
-00431                                 break;
-00432                         case SE_UGARITIC:
-00433                                 id += UnicodeString(";Latin-Ugaritic");
-00434                                 break;
-00435                         case SE_COPTIC:
-00436                                 id += UnicodeString(";Latin-Coptic");
-00437                                 break;
-00438                         case SE_KATAKANA:
-00439                                 id += UnicodeString(";Latin-Katakana");
-00440                                 break;
-00441                         case SE_HIRAGANA:
-00442                                 id += UnicodeString(";Latin-Hiragana");
-00443                                 break;
-00444                         case SE_JAMO:
-00445                                 id += UnicodeString(";Latin-Jamo");
-00446                                 break;
-00447                         case SE_HANGUL:
-00448                                 id += UnicodeString(";Latin-Hangul");
-00449                                 break;
-00450                         }
-00451                 }
-00452 
-00453                 if (option == SE_BASICLATIN) {
-00454                         id += UnicodeString(";Any-Latin1");
-00455                 }
-00456                                 
-00457                 if (noNFC) {
-00458                         id += UnicodeString(";NFD");
-00459                 } else {
-00460                         id += UnicodeString(";NFC");
-00461                 }
-00462 
-00463                 UParseError perr;
-00464 
-00465                 err = U_ZERO_ERROR;
-00466                 Transliterator * trans = Transliterator::createInstance(id, UTRANS_FORWARD, perr, err);
-00467                 if (trans) {
-00468                         UnicodeString target = UnicodeString(source);
-00469                         trans->transliterate(target);
-00470                         len = ucnv_fromUChars(conv, text, maxlen, target.getBuffer(), target.length(), &err);
-00471                         if (len < maxlen) *(text + len) = 0;
-00472                         else *(text + maxlen) = 0;
-00473                         delete trans;
-00474                 }
-00475                 ucnv_close(conv);
-00476         }
-00477         return 0;
-00478 }
-00479 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utf8transliterator_8h-source.html b/doc/api-documentation/html/utf8transliterator_8h-source.html deleted file mode 100644 index 4b377f1..0000000 --- a/doc/api-documentation/html/utf8transliterator_8h-source.html +++ /dev/null @@ -1,85 +0,0 @@ - - -utf8transliterator.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utf8transliterator.h

00001 /*
-00002  *
-00003  * Copyright 2001 CrossWire Bible Society (http://www.crosswire.org)
-00004  *      CrossWire Bible Society
-00005  *      P. O. Box 2528
-00006  *      Tempe, AZ  85280-2528
-00007  *
-00008  * This program is free software; you can redistribute it and/or modify it
-00009  * under the terms of the GNU General Public License as published by the
-00010  * Free Software Foundation version 2.
-00011  *
-00012  * This program is distributed in the hope that it will be useful, but
-00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00015  * General Public License for more details.
-00016  *
-00017  */
-00018 #ifdef _ICU_
-00019 
-00020 #ifndef UTF8TRANSLITERATOR_H
-00021 #define UTF8TRANSLITERATOR_H
-00022 
-00023 enum scriptEnum {SE_OFF, SE_LATIN, /*one-way (to) transliterators*/ SE_BASICLATIN, SE_BETA, SE_BGREEK, /*two-way transliterators*/ SE_GREEK, SE_HEBREW, SE_CYRILLIC, SE_ARABIC, SE_SYRIAC, SE_KATAKANA, SE_HIRAGANA, SE_JAMO, SE_HANGUL, SE_DEVANAGARI, SE_TAMIL, SE_BENGALI, SE_GURMUKHI, SE_GUJARATI, SE_ORIYA, SE_TELUGU, SE_KANNADA, SE_MALAYALAM, SE_THAI, SE_GEORGIAN, SE_ARMENIAN, SE_ETHIOPIC, SE_GOTHIC, SE_UGARITIC, SE_COPTIC, /*one-way (from) transliterators*/ SE_HAN, SE_KANJI};
-00024 #define NUMSCRIPTS 32
-00025 #define NUMTARGETSCRIPTS 5
-00026 
-00027 #include <swfilter.h>
-00028 #include <swmodule.h>
-00029 
-00030 #include <unicode/utypes.h>
-00031 #include <unicode/ucnv.h>
-00032 #include <unicode/ustring.h>
-00033 #include <unicode/uchar.h>
-00034 
-00035 #include <unicode/unistr.h>
-00036 #include <unicode/translit.h>
-00037 
-00038 #include <defs.h>
-00039 
-00042 class SWDLLEXPORT UTF8Transliterator : public SWFilter
-00043 {
-00044   char option;
-00045 
-00046   static const char optionstring[NUMTARGETSCRIPTS][16];
-00047 
-00048   static const char optName[];
-00049   static const char optTip[];
-00050   OptionsList options;
-00051 
-00052  public:
-00053   UTF8Transliterator ();
-00054   virtual char ProcessText (char *text, int maxlen, const SWKey * key, const SWModule * = 0);
-00055   virtual const char *getOptionName ()
-00056     {
-00057       return optName;
-00058     }
-00059   virtual const char *getOptionTip ()
-00060     {
-00061       return optTip;
-00062     }
-00063   virtual void setOptionValue (const char *ival);
-00064   virtual const char *getOptionValue ();
-00065   virtual OptionsList getOptionValues ()
-00066     {
-00067       return options;
-00068     }
-00069 };
-00070 
-00071 #endif
-00072 
-00073 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utf8utf16_8cpp-source.html b/doc/api-documentation/html/utf8utf16_8cpp-source.html deleted file mode 100644 index d8048c7..0000000 --- a/doc/api-documentation/html/utf8utf16_8cpp-source.html +++ /dev/null @@ -1,93 +0,0 @@ - - -utf8utf16.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utf8utf16.cpp

00001 /******************************************************************************
-00002  *
-00003  * UTF8UTF16 -  SWFilter decendant to convert UTF-8 to UTF-16
-00004  *
-00005  */
-00006 
-00007 #include <stdlib.h>
-00008 #include <stdio.h>
-00009 
-00010 #include <utf8utf16.h>
-00011 
-00012 UTF8UTF16::UTF8UTF16() {
-00013 }
-00014 
-00015 
-00016 char UTF8UTF16::ProcessText(char *text, int maxlen, const SWKey *key, const SWModule *module)
-00017 {
-00018   unsigned char *from;
-00019   unsigned short *to;
-00020 
-00021   int len;
-00022   unsigned long uchar;
-00023   unsigned char significantFirstBits, subsequent;
-00024   unsigned short schar;
-00025   
-00026   len = strlen(text) + 1;                                               // shift string to right of buffer
-00027   if (len < maxlen) {
-00028     memmove(&text[maxlen - len], text, len);
-00029     from = (unsigned char*)&text[maxlen - len];
-00030   }
-00031   else
-00032     from = (unsigned char*)text;
-00033   
-00034   
-00035   // -------------------------------
-00036   
-00037   for (to = (unsigned short*)text; *from; from++) {
-00038     uchar = 0;
-00039     if ((*from & 128) != 128) {
-00040       //                if (*from != ' ')
-00041       uchar = *from;
-00042     }
-00043     else if ((*from & 128) && ((*from & 64) != 64)) {
-00044       // error, do nothing
-00045       continue;
-00046     }
-00047     else {
-00048       *from <<= 1;
-00049       for (subsequent = 1; (*from & 128); subsequent++) {
-00050         *from <<= 1;
-00051         from[subsequent] &= 63;
-00052         uchar <<= 6;
-00053         uchar |= from[subsequent];
-00054       }
-00055       subsequent--;
-00056       *from <<=1;
-00057       significantFirstBits = 8 - (2+subsequent);
-00058       
-00059       uchar |= (((short)*from) << (((6*subsequent)+significantFirstBits)-8));
-00060       from += subsequent;
-00061     }
-00062 
-00063     if (uchar < 0x1ffff) {
-00064       *to++ = (unsigned short)uchar;
-00065     }
-00066     else {
-00067       uchar -= 0x10000;
-00068       schar = 0xD800 | (uchar & 0x03ff);
-00069       uchar >>= 10;
-00070       uchar |= 0xDC00;
-00071       *to++ = (unsigned short)schar;
-00072       *to++ = (unsigned short)uchar;
-00073     }
-00074   }
-00075   *to = (unsigned short)0;
-00076 
-00077   return 0;
-00078 }
-00079 
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utf8utf16_8h-source.html b/doc/api-documentation/html/utf8utf16_8h-source.html deleted file mode 100644 index 367fed1..0000000 --- a/doc/api-documentation/html/utf8utf16_8h-source.html +++ /dev/null @@ -1,47 +0,0 @@ - - -utf8utf16.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utf8utf16.h

00001 /*
-00002  *
-00003  *
-00004  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00005  *      CrossWire Bible Society
-00006  *      P. O. Box 2528
-00007  *      Tempe, AZ  85280-2528
-00008  *
-00009  * This program is free software; you can redistribute it and/or modify it
-00010  * under the terms of the GNU General Public License as published by the
-00011  * Free Software Foundation version 2.
-00012  *
-00013  * This program is distributed in the hope that it will be useful, but
-00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00016  * General Public License for more details.
-00017  *
-00018  */
-00019 
-00020 #ifndef UTF8UTF16_H
-00021 #define UTF8UTF16_H
-00022 
-00023 #include <swfilter.h>
-00024 
-00025 #include <defs.h>
-00026 
-00029 class SWDLLEXPORT UTF8UTF16:public SWFilter {
-00030 public:
-00031   UTF8UTF16();
-00032   virtual char ProcessText (char *text, int maxlen, const SWKey *key, const SWModule * = 0);
-00033 };
-00034 
-00035 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utilconf_8cpp-source.html b/doc/api-documentation/html/utilconf_8cpp-source.html deleted file mode 100644 index dfa9b37..0000000 --- a/doc/api-documentation/html/utilconf_8cpp-source.html +++ /dev/null @@ -1,33 +0,0 @@ - - -utilconf.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utilconf.cpp

00001 #include <string.h>
-00002 #include <utilstr.h>
-00003 
-00004 
-00005 /******************************************************************************
-00006  * getconfent - Get the value of an entry in a configuration file
-00007  *
-00008  * ENT: filename        - File name in which to look for entry
-00009  *              entryname       - Entry of which to obtain value
-00010  *              buf             - Buffer to store entry value
-00011  *              len             - Maximum length to write into buffer
-00012  *
-00013  * RET: error status
-00014  */
-00015 
-00016 char getconfent(char *filename, char *entryname, char *buf, int len)
-00017 {
-00018         return 0;
-00019 }
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utilconf_8h-source.html b/doc/api-documentation/html/utilconf_8h-source.html deleted file mode 100644 index 235dcd2..0000000 --- a/doc/api-documentation/html/utilconf_8h-source.html +++ /dev/null @@ -1,22 +0,0 @@ - - -utilconf.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utilconf.h

00001 #ifndef UTILCONF_H
-00002 #define UTILCONF_H
-00003 
-00004 
-00005 char getconfent (char *filename, char *entryname, char *buf, int len);
-00006 
-00007 
-00008 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utilfuns_8h-source.html b/doc/api-documentation/html/utilfuns_8h-source.html deleted file mode 100644 index d5d569a..0000000 --- a/doc/api-documentation/html/utilfuns_8h-source.html +++ /dev/null @@ -1,43 +0,0 @@ - - -utilfuns.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utilfuns.h

00001 /******************************************************************************
-00002  *  utilfuns.h  - utility function prototypes
-00003  *
-00004  * $Id: utilfuns_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00005  *
-00006  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00007  *      CrossWire Bible Society
-00008  *      P. O. Box 2528
-00009  *      Tempe, AZ  85280-2528
-00010  *
-00011  * This program is free software; you can redistribute it and/or modify it
-00012  * under the terms of the GNU General Public License as published by the
-00013  * Free Software Foundation version 2.
-00014  *
-00015  * This program is distributed in the hope that it will be useful, but
-00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00018  * General Public License for more details.
-00019  *
-00020  */
-00021 #ifndef UTILFUNS_H
-00022 #define UTILFUNS_H
-00023 
-00024 
-00025 #include <utilstr.h>
-00026 #include <utilconf.h>
-00027 
-00028 
-00029 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utilstr_8cpp-source.html b/doc/api-documentation/html/utilstr_8cpp-source.html deleted file mode 100644 index c2b5d84..0000000 --- a/doc/api-documentation/html/utilstr_8cpp-source.html +++ /dev/null @@ -1,166 +0,0 @@ - - -utilstr.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utilstr.cpp

00001 #include <string.h>
-00002 #include <utilstr.h>
-00003 #include <ctype.h>
-00004 
-00005 /******************************************************************************
-00006  * stdstr - Sets/gets a string
-00007  *
-00008  * ENT: ipstr   - pointer to a string pointer to set if necessary
-00009  *      istr    - string to set to *ipstr
-00010  *                      0 - only get
-00011  *
-00012  * RET: *ipstr
-00013  */
-00014 
-00015 char *stdstr(char **ipstr, const char *istr) {
-00016         if (istr) {
-00017                 if (*ipstr)
-00018                         delete [] *ipstr;
-00019                 int len = strlen(istr) + 1;
-00020                 *ipstr = new char [ len ];
-00021                 memcpy(*ipstr, istr, len);
-00022         }
-00023         return *ipstr;
-00024 }
-00025 
-00026 
-00027 /******************************************************************************
-00028  * strstrip - Removes leading and trailing spaces from a string
-00029  *
-00030  * ENT: istr    - string pointer to strip
-00031  *
-00032  * RET: *istr
-00033  */
-00034 
-00035 char *strstrip(char *istr) {
-00036         char *tmp = istr;
-00037         char *rtmp;
-00038 
-00039         int len = strlen(istr);
-00040         if (len < 1)
-00041                 return istr;
-00042         rtmp = istr + (len - 1);
-00043         
-00044         while ((*rtmp == ' ')||(*rtmp == '\t')||(*rtmp == 10)||(*rtmp == 13)) *(rtmp--) = 0;
-00045         while ((*tmp == ' ')||(*tmp == '\t')||(*tmp == 10)||(*tmp == 13)) tmp++;
-00046         memmove(istr, tmp, (rtmp - tmp) + 1);
-00047         istr[(rtmp - tmp) + 1] = 0;
-00048 
-00049         return istr;
-00050 }
-00051 
-00052 
-00053 /******************************************************************************
-00054  * stristr - Scans a string for the occurrence of a given substring, no case
-00055  *
-00056  * ENT: scans s1 for the first occurrence of the substring s2, ingnoring case
-00057  *
-00058  * RET: a pointer to the element in s1, where s2 begins (points to s2 in s1).
-00059  *                      If s2 does not occur in s1, returns null.
-00060  */
-00061 
-00062 const char *stristr(const char *s1, const char *s2) {
-00063         int tLen = strlen(s2);
-00064         int cLen = strlen(s1);
-00065         char *target = new char [ tLen + 1 ];
-00066         int i, j;
-00067         const char *retVal = 0;
-00068 
-00069         strcpy(target, s2);
-00070         for (i = 0; i < tLen; i++)
-00071                 target[i] = SW_toupper(target[i]);
-00072 
-00073         for (i = 0; i < (cLen - tLen)+1; i++) {
-00074                 if (SW_toupper(s1[i]) == (unsigned char)*target) {
-00075                         for (j = 1; j < tLen; j++) {
-00076                                 if (SW_toupper(s1[i+j]) != (unsigned char)target[j])
-00077                                         break;
-00078                         }
-00079                         if (j == tLen) {
-00080                                 retVal = s1+i;
-00081                                 break;
-00082                         }
-00083                 }
-00084         }
-00085         delete [] target;
-00086         return retVal;
-00087 }
-00088 
-00089 /******************************************************************************
-00090  * strnicmp - compares the first n bytes of 2 string ignoring case
-00091  *
-00092  * ENT: compares s1 to s2 comparing the first n byte ingnoring case
-00093  *
-00094  * RET: same as strcmp
-00095  */
-00096 
-00097 const char strnicmp(const char *s1, const char *s2, int len) {
-00098 
-00099      int tLen = strlen(s2);
-00100      int cLen = strlen(s1);
-00101      char diff;
-00102      int i;
-00103      for (i = 0; ((i < len) && (i < tLen) && (i < cLen)); i++) {
-00104         if ((diff = SW_toupper(*s1) - SW_toupper(*s2)))
-00105                 return diff;
-00106         s1++;
-00107         s2++;
-00108      }
-00109      return (i < len) ? cLen - tLen : 0;
-00110 }
-00111 
-00112 /******************************************************************************
-00113  * strlenw - Scans a string for trailing 0x0000 and return size in BYTES
-00114  *
-00115  * ENT: target - string for which to determine size
-00116  *
-00117  * RET: length in BYTES 
-00118  *                      If s2 does not occur in s1, returns null.
-00119  */
-00120 
-00121 unsigned int strlenw(const char *s1) {
-00122         return strlen(s1);
-00123 // utf8 says no null in string except terminator, so below code is overkill
-00124 /*
-00125         const char *ch = s1;
-00126         if (!*ch)
-00127                 ch++;
-00128         while (*ch) {
-00129                 ch++;
-00130                 if (!*ch)
-00131                         ch++;
-00132         }
-00133         return (unsigned int)(ch - s1) - 1;
-00134 */
-00135 }
-00136 
-00137 
-00138 /******************************************************************************
-00139  * toupperstr - converts a string to uppercase string
-00140  *
-00141  * ENT: target - string to convert
-00142  *
-00143  * RET: target
-00144  */
-00145 
-00146 char *toupperstr(char *buf) {
-00147         char *ret = buf;
-00148         while (*buf)
-00149                 *buf = SW_toupper(*buf++);
-00150 
-00151         return ret;
-00152 }
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/utilstr_8h-source.html b/doc/api-documentation/html/utilstr_8h-source.html deleted file mode 100644 index d274f7b..0000000 --- a/doc/api-documentation/html/utilstr_8h-source.html +++ /dev/null @@ -1,95 +0,0 @@ - - -utilstr.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

utilstr.h

00001 /******************************************************************************
-00002  *  utilstr.h   - prototypes for string utility functions
-00003  *
-00004  * $Id: utilstr_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00005  *
-00006  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00007  *      CrossWire Bible Society
-00008  *      P. O. Box 2528
-00009  *      Tempe, AZ  85280-2528
-00010  *
-00011  * This program is free software; you can redistribute it and/or modify it
-00012  * under the terms of the GNU General Public License as published by the
-00013  * Free Software Foundation version 2.
-00014  *
-00015  * This program is distributed in the hope that it will be useful, but
-00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00018  * General Public License for more details.
-00019  *
-00020  */
-00021 
-00022 #ifndef UTILSTR_H
-00023 #define UTILSTR_H
-00024 
-00027 char *stdstr (char **iistr, const char *istr);
-00028 char *strstrip (char *istr);
-00029 const char *stristr (const char *s1, const char *s2);
-00030 const char strnicmp(const char *s1, const char *s2, int len);
-00031 unsigned int strlenw(const char *s1);
-00032 char *toupperstr(char *buf);
-00033 
-00034 /*
-00035 extern "C" {
-00036 int stricmp(const char *s1, const char *s2);
-00037 }
-00038 */
-00039 
-00040 /******************************************************************************
-00041  * SW_toupper - array of uppercase values for any given Latin-1 value
-00042  *
-00043  * use this instead of toupper() for fast lookups on accented characters
-00044  */
-00045 static const unsigned char SW_toupper_array[256] =
-00046         {
-00047                 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-00048                 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
-00049                 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
-00050                 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
-00051                 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
-00052                 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
-00053                 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37,
-00054                 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
-00055                 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
-00056                 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
-00057                 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
-00058                 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
-00059                 0x60, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
-00060                 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
-00061                 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57,
-00062                 0x58, 0x59, 0x5a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f,
-00063                 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
-00064                 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
-00065                 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
-00066                 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
-00067                 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
-00068                 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
-00069                 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
-00070                 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
-00071                 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
-00072                 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
-00073                 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
-00074                 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
-00075                 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
-00076                 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
-00077                 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xf7,
-00078                 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xff
-00079         };
-00080 
-00081 #define SW_toupper(c) SW_toupper_array[(unsigned char)c]
-00082 
-00083 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/versekey_8cpp-source.html b/doc/api-documentation/html/versekey_8cpp-source.html deleted file mode 100644 index 7a5266b..0000000 --- a/doc/api-documentation/html/versekey_8cpp-source.html +++ /dev/null @@ -1,1464 +0,0 @@ - - -versekey.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

versekey.cpp

00001 /******************************************************************************
-00002  *  VerseKey.cpp - code for class 'VerseKey'- a standard Biblical verse key
-00003  */
-00004 
-00005 #include <swmacs.h>
-00006 #include <utilfuns.h>
-00007 #include <string.h>
-00008 #include <stdio.h>
-00009 #include <fcntl.h>
-00010 #include <stdlib.h>
-00011 
-00012 #ifndef __GNUC__
-00013 #include <io.h>
-00014 #else
-00015 #include <unistd.h>
-00016 #endif
-00017 
-00018 #include <utilstr.h>
-00019 #include <swkey.h>
-00020 #include <swlog.h>
-00021 #include <versekey.h>
-00022 #include <localemgr.h>
-00023 extern "C" {
-00024 #include <roman.h>
-00025 }
-00026 
-00027 
-00028 static const char *classes[] = {"VerseKey", "SWKey", "SWObject", 0};
-00029 SWClass VerseKey::classdef(classes);
-00030 
-00031 /******************************************************************************
-00032  *  Initialize static members of VerseKey
-00033  */
-00034 
-00035 #include <canon.h>      // Initialize static members of canonical books structure
-00036 
-00037 struct sbook *VerseKey::builtin_books[2]       = {0,0};
-00038 const char    VerseKey::builtin_BMAX[2]        = {39, 27};
-00039 long         *VerseKey::offsets[2][2]  = {{VerseKey::otbks, VerseKey::otcps}, {VerseKey::ntbks, VerseKey::ntcps}};
-00040 int           VerseKey::instance       = 0;
-00041 VerseKey::LocaleCache   VerseKey::localeCache;
-00042 
-00043 
-00044 /******************************************************************************
-00045  * VerseKey::init - initializes instance of VerseKey
-00046  */
-00047 
-00048 void VerseKey::init() {
-00049         myclass = &classdef;
-00050         if (!instance)
-00051                 initstatics();
-00052 
-00053         instance++;
-00054         autonorm = 1;           // default auto normalization to true
-00055         headings = 0;           // default display headings option is false
-00056         upperBound = 0;
-00057         lowerBound = 0;
-00058         testament = 0;
-00059         book = 0;
-00060         chapter = 0;
-00061         verse = 0;
-00062         locale = 0;
-00063 
-00064         setLocale(LocaleMgr::systemLocaleMgr.getDefaultLocaleName());
-00065 }
-00066 
-00067 /******************************************************************************
-00068  * VerseKey Constructor - initializes instance of VerseKey
-00069  *
-00070  * ENT: ikey - base key (will take various forms of 'BOOK CH:VS'.  See
-00071  *              VerseKey::parse for more detailed information)
-00072  */
-00073 
-00074 VerseKey::VerseKey(const SWKey *ikey) : SWKey(*ikey)
-00075 {
-00076         init();
-00077         if (ikey)
-00078                 parse();
-00079 }
-00080 
-00081 
-00082 /******************************************************************************
-00083  * VerseKey Constructor - initializes instance of VerseKey
-00084  *
-00085  * ENT: ikey - text key (will take various forms of 'BOOK CH:VS'.  See
-00086  *              VerseKey::parse for more detailed information)
-00087  */
-00088 
-00089 VerseKey::VerseKey(const char *ikey) : SWKey(ikey)
-00090 {
-00091         init();
-00092         if (ikey)
-00093                 parse();
-00094 }
-00095 
-00096 
-00097 VerseKey::VerseKey(VerseKey const &k) : SWKey(k)
-00098 {
-00099         init();
-00100         autonorm = k.autonorm;
-00101         headings = k.headings;
-00102         testament = k.Testament();
-00103         book = k.Book();
-00104         chapter = k.Chapter();
-00105         verse = k.Verse();
-00106         LowerBound(k.LowerBound());
-00107         UpperBound(k.UpperBound());
-00108 }
-00109 
-00110 
-00111 VerseKey::VerseKey(const char *min, const char *max) : SWKey()
-00112 {
-00113         init();
-00114         LowerBound(min);
-00115         UpperBound(max);
-00116         setPosition(TOP);
-00117 }
-00118 
-00119 
-00120 SWKey *VerseKey::clone() const
-00121 {
-00122         return new VerseKey(*this);
-00123 }
-00124 
-00125 
-00126 /******************************************************************************
-00127  * VerseKey Destructor - cleans up instance of VerseKey
-00128  *
-00129  * ENT: ikey - text key
-00130  */
-00131 
-00132 VerseKey::~VerseKey() {
-00133         if (upperBound)
-00134                 delete upperBound;
-00135         if (lowerBound)
-00136                 delete lowerBound;
-00137         if (locale)
-00138                 delete [] locale;
-00139 
-00140         --instance;
-00141 }
-00142 
-00143 
-00144 void VerseKey::setLocale(const char *name) {
-00145         char *BMAX;
-00146         struct sbook **books;
-00147         bool useCache = false;
-00148 
-00149         if (localeCache.name)
-00150                 useCache = (!strcmp(localeCache.name, name));
-00151 
-00152         if (!useCache)  {       // if we're setting params for a new locale
-00153                 stdstr(&(localeCache.name), name);
-00154                 localeCache.abbrevsCnt = 0;
-00155         }
-00156 
-00157         SWLocale *locale = (useCache) ? localeCache.locale : LocaleMgr::systemLocaleMgr.getLocale(name);
-00158         localeCache.locale = locale;
-00159 
-00160         if (locale) {
-00161                 locale->getBooks(&BMAX, &books);
-00162                 setBooks(BMAX, books);
-00163                 setBookAbbrevs(locale->getBookAbbrevs(), localeCache.abbrevsCnt);
-00164                 localeCache.abbrevsCnt = abbrevsCnt;
-00165         }
-00166         else {
-00167                 setBooks(builtin_BMAX, builtin_books);
-00168                 setBookAbbrevs(builtin_abbrevs, localeCache.abbrevsCnt);
-00169                 localeCache.abbrevsCnt = abbrevsCnt;
-00170         }
-00171         stdstr(&(this->locale), localeCache.name);
-00172 }
-00173 
-00174 
-00175 void VerseKey::setBooks(const char *iBMAX, struct sbook **ibooks) {
-00176         BMAX = iBMAX;
-00177         books = ibooks;
-00178 }
-00179 
-00180 
-00181 void VerseKey::setBookAbbrevs(const struct abbrev *bookAbbrevs, unsigned int size) {
-00182         abbrevs = bookAbbrevs;
-00183         if (!size) {
-00184                 for (abbrevsCnt = 1; *abbrevs[abbrevsCnt].ab; abbrevsCnt++) {
-00185                         /*
-00186                         if (strcmp(abbrevs[abbrevsCnt-1].ab, abbrevs[abbrevsCnt].ab) > 0) {
-00187                                 fprintf(stderr, "ERROR: book abbreviation (canon.h or locale) misordered at entry: %s\n", abbrevs[abbrevsCnt].ab);
-00188                                 exit(-1);
-00189                         }
-00190                         */
-00191                 }
-00192         for (int t = 0; t < 2; t++) {
-00193             for (int i = 0; i < BMAX[t]; i++) {
-00194                 int bn = getBookAbbrev(books[t][i].name);
-00195                 if ((bn-1)%39 != i) {
-00196                     SWLog::systemlog->LogError("Book: %s does not have a matching toupper abbrevs entry! book number returned was: %d", books[t][i].name, bn);
-00197                 }
-00198             }
-00199         }
-00200     }
-00201         else abbrevsCnt = size;
-00202 }
-00203 
-00204 
-00205 /******************************************************************************
-00206  * VerseKey::initstatics - initializes statics.  Performed only when first
-00207  *                                              instance on VerseKey (or descendent) is created.
-00208  */
-00209 
-00210 void VerseKey::initstatics() {
-00211         int l1, l2, chaptmp = 0;
-00212 
-00213         builtin_books[0] = otbooks;
-00214         builtin_books[1] = ntbooks;
-00215 
-00216         for (l1 = 0; l1 < 2; l1++) {
-00217                 for (l2 = 0; l2 < builtin_BMAX[l1]; l2++) {
-00218                         builtin_books[l1][l2].versemax = &vm[chaptmp];
-00219                         chaptmp += builtin_books[l1][l2].chapmax;
-00220                 }
-00221         }
-00222 }
-00223 
-00224 
-00225 /******************************************************************************
-00226  * VerseKey::parse - parses keytext into testament|book|chapter|verse
-00227  *
-00228  * RET: error status
-00229  */
-00230 
-00231 char VerseKey::parse()
-00232 {
-00233 
-00234         
-00235         testament = 1;
-00236         book      = 1;
-00237         chapter   = 1;
-00238         verse     = 1;
-00239 
-00240         error     = 0;
-00241 
-00242         if (keytext) {
-00243                 ListKey tmpListKey = VerseKey::ParseVerseList(keytext);
-00244                 if (tmpListKey.Count()) {
-00245                         SWKey::setText((const char *)tmpListKey);
-00246                         for (testament = 1; testament < 3; testament++) {
-00247                                 for (book = 1; book <= BMAX[testament-1]; book++) {
-00248                                         if (!strncmp(keytext, books[testament-1][book-1].name, strlen(books[testament-1][book-1].name)))
-00249                                                 break;
-00250                                 }
-00251                                 if (book <= BMAX[testament-1])
-00252                                         break;
-00253                         }
-00254 
-00255                         if (testament < 3) {
-00256                                 sscanf(&keytext[strlen(books[testament-1][book-1].name)], "%d:%d", &chapter, &verse);
-00257                         }
-00258                         else    error = 1;
-00259                 }
-00260         }
-00261         Normalize(1);
-00262         freshtext();
-00263 
-00264         return error;
-00265 }
-00266 
-00267 
-00268 /******************************************************************************
-00269  * VerseKey::freshtext - refreshes keytext based on
-00270  *                              testament|book|chapter|verse
-00271  */
-00272 
-00273 void VerseKey::freshtext() const
-00274 {
-00275         char buf[2024];
-00276         int realtest = testament;
-00277         int realbook = book;
-00278 
-00279         if (book < 1) {
-00280                 if (testament < 1)
-00281                         sprintf(buf, "[ Module Heading ]");
-00282                 else sprintf(buf, "[ Testament %d Heading ]", (int)testament);
-00283         }
-00284         else {
-00285                 if (realbook > BMAX[realtest-1]) {
-00286                         realbook -= BMAX[realtest-1];
-00287                         if (realtest < 2)
-00288                                 realtest++;
-00289                         if (realbook > BMAX[realtest-1])
-00290                                 realbook = BMAX[realtest-1];
-00291                 }
-00292                 sprintf(buf, "%s %d:%d", books[realtest-1][realbook-1].name, chapter, verse);
-00293         }
-00294 
-00295         stdstr((char **)&keytext, buf);
-00296 }
-00297 
-00298 
-00299 
-00300 /******************************************************************************
-00301  * VerseKey::getBookAbbrev - Attempts to find a book abbreviation for a buffer
-00302  *
-00303  * ENT: abbr - key for which to search;
-00304  * RET: book number or < 0 = not valid
-00305  */
-00306 
-00307 int VerseKey::getBookAbbrev(const char *iabbr)
-00308 {
-00309     int loop, diff, abLen, min, max, target, retVal = -1;
-00310 
-00311     char *abbr = 0;
-00312 
-00313         stdstr(&abbr, iabbr);
-00314         strstrip(abbr);
-00315         abLen = strlen(abbr);
-00316         for (loop = 0; loop < abLen; loop++)
-00317                 abbr[loop] = SW_toupper(abbr[loop]);
-00318 
-00319         if (abLen) {
-00320                 min = 0;
-00321 //              max = abbrevsCnt - 1;
-00322                 max = abbrevsCnt;
-00323                 while(1) {
-00324                         target = min + ((max - min) / 2);
-00325                         diff = strncmp(abbr, abbrevs[target].ab, abLen);
-00326                         if ((!diff)||(target >= max)||(target <= min))
-00327                                 break;
-00328                         if (diff > 0)
-00329                                 min = target;
-00330                         else    max = target;
-00331                 }
-00332                 for (; target > 0; target--) {
-00333                         if (strncmp(abbr, abbrevs[target-1].ab, abLen))
-00334                                 break;
-00335                 }
-00336                         
-00337                 retVal = (!diff) ? abbrevs[target].book : -1;
-00338         }
-00339         delete [] abbr;
-00340         return retVal;
-00341 }
-00342 
-00343 /******************************************************************************
-00344  * VerseKey::ParseVerseList - Attempts to parse a buffer into separate
-00345  *                              verse entries returned in a ListKey
-00346  *
-00347  * ENT: buf             - buffer to parse;
-00348  *      defaultKey      - if verse, chap, book, or testament is left off,
-00349  *                              pull info from this key (ie. Gen 2:3; 4:5;
-00350  *                              Gen would be used when parsing the 4:5 section)
-00351  *      expandRange     - whether or not to expand eg. John 1:10-12 or just
-00352  *                              save John 1:10
-00353  *
-00354  * RET: ListKey reference filled with verse entries contained in buf
-00355  *
-00356  * COMMENT: This code works but wreaks.  Rewrite to make more maintainable.
-00357  */
-00358 
-00359 ListKey VerseKey::ParseVerseList(const char *buf, const char *defaultKey, bool expandRange) {
-00360         SWKey textkey;
-00361 
-00362         char book[255];
-00363         char number[255];
-00364         int tobook = 0;
-00365         int tonumber = 0;
-00366         int chap = -1, verse = -1;
-00367         int bookno = 0;
-00368         VerseKey curkey, lBound;
-00369         curkey.setLocale(getLocale());
-00370         lBound.setLocale(getLocale());
-00371         int loop;
-00372         char comma = 0;
-00373         char dash = 0;
-00374         const char *orig = buf;
-00375         ListKey tmpListKey;
-00376         ListKey internalListKey;
-00377         SWKey tmpDefaultKey = defaultKey;
-00378         char lastPartial = 0;
-00379 
-00380         curkey.AutoNormalize(0);
-00381         tmpListKey << tmpDefaultKey;
-00382         tmpListKey.GetElement()->userData = (void *)buf;
-00383         
-00384         while (*buf) {
-00385                 switch (*buf) {
-00386                 case ':':
-00387                         number[tonumber] = 0;
-00388                         tonumber = 0;
-00389                         if (*number)
-00390                                 chap = atoi(number);
-00391                         *number = 0;
-00392                         break;
-00393 
-00394                 case '-': 
-00395                 case ',': // on number new verse
-00396                 case ';': // on number new chapter
-00397                         number[tonumber] = 0;
-00398                         tonumber = 0;
-00399                         if (*number) {
-00400                                 if (chap >= 0)
-00401                                         verse = atoi(number);
-00402                                 else    chap = atoi(number);
-00403                         }
-00404                         *number = 0;
-00405                         book[tobook] = 0;
-00406                         tobook = 0;
-00407                         bookno = -1;
-00408                         if (*book) {
-00409                                 for (loop = strlen(book) - 1; loop+1; loop--) {
-00410                                         if ((isdigit(book[loop])) || (book[loop] == ' ')) {
-00411                                                 book[loop] = 0;
-00412                                                 continue;
-00413                                         }
-00414                                         else {
-00415                                                 if ((SW_toupper(book[loop])=='F')&&(loop)) {
-00416                                                         if ((isdigit(book[loop-1])) || (book[loop-1] == ' ') || (SW_toupper(book[loop-1]) == 'F')) {
-00417                                                                 book[loop] = 0;
-00418                                                                 continue;
-00419                                                         }
-00420                                                 }
-00421                                         }
-00422                                         break;
-00423                                 }
-00424 
-00425                     for (loop = strlen(book) - 1; loop+1; loop--) {
-00426                          if (book[loop] == ' ') {
-00427                                                 if (isroman(&book[loop+1])) {
-00428                                    if (verse == -1) {
-00429                                         verse = chap;
-00430                                                                 chap = from_rom(&book[loop+1]);
-00431                                                                 book[loop] = 0;
-00432                                                         }
-00433                                                 }
-00434                                                 break;
-00435                                         }
-00436                                 }
-00437 
-00438                                 if ((!stricmp(book, "V")) || (!stricmp(book, "VER"))) { // Verse abbrev
-00439                          if (verse == -1) {
-00440                               verse = chap;
-00441                                                 chap = VerseKey(tmpListKey).Chapter();
-00442                               *book = 0;
-00443                          }
-00444                     }
-00445                                 bookno = getBookAbbrev(book);
-00446                         }
-00447                         if (((bookno > -1) || (!*book)) && ((*book) || (chap >= 0) || (verse >= 0))) {
-00448                                 char partial = 0;
-00449                                 curkey.Verse(1);
-00450                                 curkey.Chapter(1);
-00451                                 curkey.Book(1);
-00452 
-00453                                 if (bookno < 0) {
-00454                                         curkey.Testament(VerseKey(tmpListKey).Testament());
-00455                                         curkey.Book(VerseKey(tmpListKey).Book());
-00456                                 }
-00457                                 else {
-00458                                         curkey.Testament(1);
-00459                                         curkey.Book(bookno);
-00460                                 }
-00461 
-00462                                 if (((comma)||((verse < 0)&&(bookno < 0)))&&(!lastPartial)) {
-00463 //                              if (comma) {
-00464                                         curkey.Chapter(VerseKey(tmpListKey).Chapter());
-00465                                         curkey.Verse(chap);  // chap because this is the first number captured
-00466                                 }
-00467                                 else {
-00468                                         if (chap >= 0) {
-00469                                                 curkey.Chapter(chap);
-00470                                         }
-00471                                         else {
-00472                                                 partial++;
-00473                                                 curkey.Chapter(1);
-00474                                         }
-00475                                         if (verse >= 0) {
-00476                                                 curkey.Verse(verse);
-00477                                         }
-00478                                         else {
-00479                                                 partial++;
-00480                                                 curkey.Verse(1);
-00481                                         }
-00482                                 }
-00483 
-00484                                 if ((*buf == '-') && (expandRange)) {   // if this is a dash save lowerBound and wait for upper
-00485                                         VerseKey newElement;
-00486                                         newElement.LowerBound(curkey);
-00487                                         newElement.setPosition(TOP);
-00488                                         tmpListKey << newElement;
-00489                                         tmpListKey.GetElement()->userData = (void *)buf;
-00490                                 }
-00491                                 else {
-00492                                         if (!dash) {    // if last separator was not a dash just add
-00493                                                 if (expandRange && partial) {
-00494                                                         VerseKey newElement;
-00495                                                         newElement.LowerBound(curkey);
-00496                                                         if (partial > 1)
-00497                                                                 curkey.setPosition(MAXCHAPTER);
-00498                                                         if (partial > 0)
-00499                                                                 curkey = MAXVERSE;
-00500                                                         newElement.UpperBound(curkey);
-00501                                                         newElement = TOP;
-00502                                                         tmpListKey << newElement;
-00503                                                         tmpListKey.GetElement()->userData = (void *)buf;
-00504                                                 }
-00505                                                 else {
-00506                                                         tmpListKey << (const SWKey &)(const SWKey)(const char *)curkey;
-00507                                                         tmpListKey.GetElement()->userData = (void *)buf;
-00508                                                 }
-00509                                         }
-00510                                         else    if (expandRange) {
-00511                                                 VerseKey *newElement = SWDYNAMIC_CAST(VerseKey, tmpListKey.GetElement());
-00512                                                 if (newElement) {
-00513                                                         if (partial > 1)
-00514                                                                 curkey = MAXCHAPTER;
-00515                                                         if (partial > 0)
-00516                                                                 curkey = MAXVERSE;
-00517                                                         newElement->UpperBound(curkey);
-00518                                                         *newElement = TOP;
-00519                                                         tmpListKey.GetElement()->userData = (void *)buf;
-00520                                                 }
-00521                                         }
-00522                                 }
-00523                                 lastPartial = partial;
-00524                         }
-00525                         *book = 0;
-00526                         chap = -1;
-00527                         verse = -1;
-00528                         if (*buf == ',')
-00529                                 comma = 1;
-00530                         else    comma = 0;
-00531                         if (*buf == '-')
-00532                                 dash = 1;
-00533                         else    dash = 0;
-00534                         break;
-00535                 case 10:        // ignore these
-00536                 case 13: 
-00537                         break;
-00538                 case '.':
-00539                         if (buf > orig)                 // ignore (break) if preceeding char is not a digit
-00540                                 if (!isdigit(*(buf-1)))
-00541                                         break;
-00542                         
-00543                 default:
-00544                         if (isdigit(*buf)) {
-00545                                 number[tonumber++] = *buf;
-00546                         }
-00547                         else {
-00548                                 switch (*buf) {
-00549                                 case ' ':    // ignore these and don't reset number
-00550                                 case 'f':
-00551                                 case 'F':
-00552                                         break;
-00553                                 default:
-00554                                         number[tonumber] = 0;
-00555                                         tonumber = 0;
-00556                                         break;
-00557                                 }
-00558                         }
-00559                         if (chap == -1)
-00560                                 book[tobook++] = SW_toupper(*buf);
-00561                 }
-00562                 buf++;
-00563         }
-00564         number[tonumber] = 0;
-00565         tonumber = 0;
-00566         if (*number) {
-00567                 if (chap >= 0)
-00568                         verse = atoi(number);
-00569                 else    chap = atoi(number);
-00570         }
-00571         *number = 0;
-00572         book[tobook] = 0;
-00573         tobook = 0;
-00574         if (*book) {
-00575                 for (loop = strlen(book) - 1; loop+1; loop--) {
-00576                         if ((isdigit(book[loop])) || (book[loop] == ' ')) {
-00577                                 book[loop] = 0;
-00578                                 continue;
-00579                         }
-00580                         else {
-00581                                 if ((SW_toupper(book[loop])=='F')&&(loop)) {
-00582                                         if ((isdigit(book[loop-1])) || (book[loop-1] == ' ') || (SW_toupper(book[loop-1]) == 'F')) {
-00583                                                 book[loop] = 0;
-00584                                                 continue;
-00585                                         }
-00586                                 }
-00587                         }
-00588                         break;
-00589                 }
-00590 
-00591                 for (loop = strlen(book) - 1; loop+1; loop--) {
-00592                 if (book[loop] == ' ') {
-00593                 if (isroman(&book[loop+1])) {
-00594                         if (verse == -1) {
-00595                                 verse = chap;
-00596                               chap = from_rom(&book[loop+1]);
-00597                               book[loop] = 0;
-00598                          }
-00599                     }
-00600                 break;
-00601                         }
-00602           }
-00603                
-00604                 if ((!stricmp(book, "V")) || (!stricmp(book, "VER"))) { // Verse abbrev.
-00605                         if (verse == -1) {
-00606                                 verse = chap;
-00607                                 chap = VerseKey(tmpListKey).Chapter();
-00608                                 *book = 0;
-00609                         }
-00610                 }
-00611                         
-00612                 bookno = getBookAbbrev(book);
-00613         }
-00614         if (((bookno > -1) || (!*book)) && ((*book) || (chap >= 0) || (verse >= 0))) {
-00615                 char partial = 0;
-00616                 curkey.Verse(1);
-00617                 curkey.Chapter(1);
-00618                 curkey.Book(1);
-00619 
-00620                 if (bookno < 0) {
-00621                         curkey.Testament(VerseKey(tmpListKey).Testament());
-00622                         curkey.Book(VerseKey(tmpListKey).Book());
-00623                 }
-00624                 else {
-00625                         curkey.Testament(1);
-00626                         curkey.Book(bookno);
-00627                 }
-00628 
-00629                 if (((comma)||((verse < 0)&&(bookno < 0)))&&(!lastPartial)) {
-00630 //              if (comma) {
-00631                         curkey.Chapter(VerseKey(tmpListKey).Chapter());
-00632                         curkey.Verse(chap);  // chap because this is the first number captured
-00633                 }
-00634                 else {
-00635                         if (chap >= 0) {
-00636                                 curkey.Chapter(chap);
-00637                         }
-00638                         else {
-00639                                 partial++;
-00640                                 curkey.Chapter(1);
-00641                         }
-00642                         if (verse >= 0) {
-00643                                 curkey.Verse(verse);
-00644                         }
-00645                         else {
-00646                                 partial++;
-00647                                 curkey.Verse(1);
-00648                         }
-00649                 }
-00650 
-00651                 if ((*buf == '-') && (expandRange)) {   // if this is a dash save lowerBound and wait for upper
-00652                         VerseKey newElement;
-00653                         newElement.LowerBound(curkey);
-00654                         newElement = TOP;
-00655                         tmpListKey << newElement;
-00656                         tmpListKey.GetElement()->userData = (void *)buf;
-00657                 }
-00658                 else {
-00659                         if (!dash) {    // if last separator was not a dash just add
-00660                                 if (expandRange && partial) {
-00661                                         VerseKey newElement;
-00662                                         newElement.LowerBound(curkey);
-00663                                         if (partial > 1)
-00664                                                 curkey = MAXCHAPTER;
-00665                                         if (partial > 0)
-00666                                                 curkey = MAXVERSE;
-00667                                         newElement.UpperBound(curkey);
-00668                                         newElement = TOP;
-00669                                         tmpListKey << newElement;
-00670                                         tmpListKey.GetElement()->userData = (void *)buf;
-00671                                 }
-00672                                 else {
-00673                                         tmpListKey << (const SWKey &)(const SWKey)(const char *)curkey;
-00674                                         tmpListKey.GetElement()->userData = (void *)buf;
-00675                                 }
-00676                         }
-00677                         else if (expandRange) {
-00678                                 VerseKey *newElement = SWDYNAMIC_CAST(VerseKey, tmpListKey.GetElement());
-00679                                 if (newElement) {
-00680                                         if (partial > 1)
-00681                                                 curkey = MAXCHAPTER;
-00682                                         if (partial > 0)
-00683                                                 curkey = MAXVERSE;
-00684                                         newElement->UpperBound(curkey);
-00685                                         *newElement = TOP;
-00686                                         tmpListKey.GetElement()->userData = (void *)buf;
-00687                                 }
-00688                         }
-00689                 }
-00690         }
-00691         *book = 0;
-00692         tmpListKey = TOP;
-00693         tmpListKey.Remove();    // remove defaultKey
-00694         internalListKey = tmpListKey;
-00695         internalListKey = TOP;  // Align internalListKey to first element before passing back;
-00696 
-00697         return internalListKey;
-00698 }
-00699 
-00700 
-00701 /******************************************************************************
-00702  * VerseKey::LowerBound - sets / gets the lower boundary for this key
-00703  */
-00704 
-00705 VerseKey &VerseKey::LowerBound(const char *lb)
-00706 {
-00707         if (!lowerBound) 
-00708                 initBounds();
-00709 
-00710         (*lowerBound) = lb;
-00711         lowerBound->Normalize();
-00712 
-00713         return (*lowerBound);
-00714 }
-00715 
-00716 
-00717 /******************************************************************************
-00718  * VerseKey::UpperBound - sets / gets the upper boundary for this key
-00719  */
-00720 
-00721 VerseKey &VerseKey::UpperBound(const char *ub)
-00722 {
-00723         if (!upperBound) 
-00724                 initBounds();
-00725 
-00726 // need to set upperbound parsing to resolve to max verse/chap if not specified
-00727            (*upperBound) = ub;
-00728         if (*upperBound < *lowerBound)
-00729                 *upperBound = *lowerBound;
-00730         upperBound->Normalize();
-00731 
-00732 // until we have a proper method to resolve max verse/chap use this kludge
-00733         int len = strlen(ub);
-00734         bool alpha = false;
-00735         bool versespec = false;
-00736         bool chapspec = false;
-00737         for (int i = 0; i < len; i++) {
-00738                 if (isalpha(ub[i]))
-00739                         alpha = true;
-00740                 if (ub[i] == ':')       // if we have a : we assume verse spec
-00741                         versespec = true;
-00742                 if ((isdigit(ub[i])) && (alpha))        // if digit after alpha assume chap spec
-00743                         chapspec = true;
-00744         }
-00745         if (!chapspec)
-00746                 *upperBound = MAXCHAPTER;
-00747         if (!versespec)
-00748                 *upperBound = MAXVERSE;
-00749         
-00750 
-00751 // -- end kludge
-00752 
-00753         return (*upperBound);
-00754 }
-00755 
-00756 
-00757 /******************************************************************************
-00758  * VerseKey::LowerBound - sets / gets the lower boundary for this key
-00759  */
-00760 
-00761 VerseKey &VerseKey::LowerBound() const
-00762 {
-00763         if (!lowerBound) 
-00764                 initBounds();
-00765 
-00766         return (*lowerBound);
-00767 }
-00768 
-00769 
-00770 /******************************************************************************
-00771  * VerseKey::UpperBound - sets / gets the upper boundary for this key
-00772  */
-00773 
-00774 VerseKey &VerseKey::UpperBound() const
-00775 {
-00776         if (!upperBound) 
-00777                 initBounds();
-00778 
-00779         return (*upperBound);
-00780 }
-00781 
-00782 
-00783 /******************************************************************************
-00784  * VerseKey::ClearBounds        - clears bounds for this VerseKey
-00785  */
-00786 
-00787 void VerseKey::ClearBounds()
-00788 {
-00789         initBounds();
-00790 }
-00791 
-00792 
-00793 void VerseKey::initBounds() const
-00794 {
-00795         if (!upperBound) {
-00796                 upperBound = new VerseKey();
-00797                 upperBound->AutoNormalize(0);
-00798                 upperBound->Headings(1);
-00799         }
-00800         if (!lowerBound) {
-00801                 lowerBound = new VerseKey();
-00802                 lowerBound->AutoNormalize(0);
-00803                 lowerBound->Headings(1);
-00804         }
-00805 
-00806         lowerBound->Testament(0);
-00807         lowerBound->Book(0);
-00808         lowerBound->Chapter(0);
-00809         lowerBound->Verse(0);
-00810 
-00811         upperBound->Testament(2);
-00812         upperBound->Book(BMAX[1]);
-00813         upperBound->Chapter(books[1][BMAX[1]-1].chapmax);
-00814         upperBound->Verse(books[1][BMAX[1]-1].versemax[upperBound->Chapter()-1]);
-00815 }
-00816 
-00817 
-00818 /******************************************************************************
-00819  * VerseKey::copyFrom - Equates this VerseKey to another VerseKey
-00820  */
-00821 
-00822 void VerseKey::copyFrom(const VerseKey &ikey) {
-00823         SWKey::copyFrom(ikey);
-00824 
-00825         parse();
-00826 }
-00827 
-00828 
-00829 /******************************************************************************
-00830  * VerseKey::copyFrom - Equates this VerseKey to another SWKey
-00831  */
-00832 
-00833 void VerseKey::copyFrom(const SWKey &ikey) {
-00834         SWKey::copyFrom(ikey);
-00835 
-00836         parse();
-00837 }
-00838 
-00839 
-00840 /******************************************************************************
-00841  * VerseKey::getText - refreshes keytext before returning if cast to
-00842  *                              a (char *) is requested
-00843  */
-00844 
-00845 const char *VerseKey::getText() const {
-00846         freshtext();
-00847         return keytext;
-00848 }
-00849 
-00850 
-00851 const char *VerseKey::getShortText() const {
-00852         static char *stext = 0;
-00853         char buf[2047];
-00854         freshtext();
-00855         if (book < 1) {
-00856                 if (testament < 1)
-00857                         sprintf(buf, "[ Module Heading ]");
-00858                 else sprintf(buf, "[ Testament %d Heading ]", (int)testament);
-00859         }
-00860         else {
-00861                 sprintf(buf, "%s %d:%d", books[testament-1][book-1].prefAbbrev, chapter, verse);
-00862         }
-00863         stdstr(&stext, buf);
-00864         return stext;
-00865 }
-00866 
-00867 
-00868 const char *VerseKey::getBookName() const {
-00869         return books[testament-1][book-1].name;
-00870 }
-00871 
-00872 
-00873 const char *VerseKey::getBookAbbrev() const {
-00874         return books[testament-1][book-1].prefAbbrev;
-00875 }
-00876 /******************************************************************************
-00877  * VerseKey::setPosition(SW_POSITION)   - Positions this key
-00878  *
-00879  * ENT: p       - position
-00880  *
-00881  * RET: *this
-00882  */
-00883 
-00884 void VerseKey::setPosition(SW_POSITION p) {
-00885         switch (p) {
-00886         case POS_TOP:
-00887                 testament = LowerBound().Testament();
-00888                 book      = LowerBound().Book();
-00889                 chapter   = LowerBound().Chapter();
-00890                 verse     = LowerBound().Verse();
-00891                 break;
-00892         case POS_BOTTOM:
-00893                 testament = UpperBound().Testament();
-00894                 book      = UpperBound().Book();
-00895                 chapter   = UpperBound().Chapter();
-00896                 verse     = UpperBound().Verse();
-00897                 break;
-00898         case POS_MAXVERSE:
-00899                 Normalize();
-00900                 verse     = books[testament-1][book-1].versemax[chapter-1];
-00901                 break;
-00902         case POS_MAXCHAPTER:
-00903                 verse     = 1;
-00904                 Normalize();
-00905                 chapter   = books[testament-1][book-1].chapmax;
-00906                 break;
-00907         } 
-00908         Normalize(1);
-00909         Error();        // clear error from normalize
-00910 }
-00911 
-00912 
-00913 /******************************************************************************
-00914  * VerseKey::increment  - Increments key a number of verses
-00915  *
-00916  * ENT: step    - Number of verses to jump forward
-00917  *
-00918  * RET: *this
-00919  */
-00920 
-00921 void VerseKey::increment(int step) {
-00922         char ierror = 0;
-00923         Index(Index() + step);
-00924         while ((!verse) && (!headings) && (!ierror)) {
-00925                 Index(Index() + 1);
-00926                 ierror = Error();
-00927         }
-00928 
-00929         error = (ierror) ? ierror : error;
-00930 }
-00931 
-00932 
-00933 /******************************************************************************
-00934  * VerseKey::decrement  - Decrements key a number of verses
-00935  *
-00936  * ENT: step    - Number of verses to jump backward
-00937  *
-00938  * RET: *this
-00939  */
-00940 
-00941 void VerseKey::decrement(int step) {
-00942         char ierror = 0;
-00943 
-00944         Index(Index() - step);
-00945         while ((!verse) && (!headings) && (!ierror)) {
-00946                 Index(Index() - 1);
-00947                 ierror = Error();
-00948         }
-00949         if ((ierror) && (!headings))
-00950                 (*this)++;
-00951 
-00952         error = (ierror) ? ierror : error;
-00953 }
-00954 
-00955 
-00956 /******************************************************************************
-00957  * VerseKey::Normalize  - checks limits and normalizes if necessary (e.g.
-00958  *                              Matthew 29:47 = Mark 2:2).  If last verse is
-00959  *                              exceeded, key is set to last Book CH:VS
-00960  * RET: *this
-00961  */
-00962 
-00963 void VerseKey::Normalize(char autocheck)
-00964 {
-00965         error = 0;
-00966 
-00967         if ((autocheck) && (!autonorm)) // only normalize if we were explicitely called or if autonorm is turned on
-00968                 return;
-00969 
-00970         if ((headings) && (!verse))             // this is cheeze and temporary until deciding what actions should be taken.
-00971                 return;                                 // so headings should only be turned on when positioning with Index() or incrementors
-00972 
-00973         while ((testament < 3) && (testament > 0)) {
-00974 
-00975                 if (book > BMAX[testament-1]) {
-00976                         book -= BMAX[testament-1];
-00977                         testament++;
-00978                         continue;
-00979                 }
-00980 
-00981                 if (book < 1) {
-00982                         if (--testament > 0) {
-00983                                 book += BMAX[testament-1];
-00984                         }
-00985                         continue;
-00986                 }
-00987 
-00988                 if (chapter > books[testament-1][book-1].chapmax) {
-00989                         chapter -= books[testament-1][book-1].chapmax;
-00990                         book++;
-00991                         continue;
-00992                 }
-00993 
-00994                 if (chapter < 1) {
-00995                         if (--book > 0) {
-00996                                 chapter += books[testament-1][book-1].chapmax;
-00997                         }
-00998                         else    {
-00999                                 if (testament > 1) {
-01000                                         chapter += books[0][BMAX[0]-1].chapmax;
-01001                                 }
-01002                         }
-01003                         continue;
-01004                 }
-01005 
-01006                 if (verse > books[testament-1][book-1].versemax[chapter-1]) { // -1 because e.g chapter 1 of Matthew is books[1][0].versemax[0]
-01007                         verse -= books[testament-1][book-1].versemax[chapter++ - 1];
-01008                         continue;
-01009                 }
-01010 
-01011                 if (verse < 1) {
-01012                         if (--chapter > 0) {
-01013                                 verse += books[testament-1][book-1].versemax[chapter-1];
-01014                         }
-01015                         else    {
-01016                                 if (book > 1) {
-01017                                         verse += books[testament-1][book-2].versemax[books[testament-1][book-2].chapmax-1];
-01018                                 }
-01019                                 else    {
-01020                                         if (testament > 1) {
-01021                                                 verse += books[0][BMAX[0]-1].versemax[books[0][BMAX[0]-1].chapmax-1];
-01022                                         }
-01023                                 }
-01024                         }
-01025                         continue;
-01026                 }
-01027 
-01028                 break;  // If we've made it this far (all failure checks continue) we're ok
-01029         }
-01030 
-01031         if (testament > 2) {
-01032                 testament = 2;
-01033                 book      = BMAX[testament-1];
-01034                 chapter   = books[testament-1][book-1].chapmax;
-01035                 verse     = books[testament-1][book-1].versemax[chapter-1];
-01036                 error     = KEYERR_OUTOFBOUNDS;
-01037         }
-01038 
-01039         if (testament < 1) {
-01040                 error     = ((!headings) || (testament < 0) || (book < 0)) ? KEYERR_OUTOFBOUNDS : 0;
-01041                 testament = ((headings) ? 0 : 1);
-01042                 book      = ((headings) ? 0 : 1);
-01043                 chapter   = ((headings) ? 0 : 1);
-01044                 verse     = ((headings) ? 0 : 1);
-01045         }
-01046         if (_compare(UpperBound()) > 0) {
-01047                 *this = UpperBound();
-01048                 error = KEYERR_OUTOFBOUNDS;
-01049         }
-01050         if (_compare(LowerBound()) < 0) {
-01051                 *this = LowerBound();
-01052                 error = KEYERR_OUTOFBOUNDS;
-01053         }
-01054 }
-01055 
-01056 
-01057 /******************************************************************************
-01058  * VerseKey::Testament - Gets testament
-01059  *
-01060  * RET: value of testament
-01061  */
-01062 
-01063 char VerseKey::Testament() const
-01064 {
-01065         return testament;
-01066 }
-01067 
-01068 
-01069 /******************************************************************************
-01070  * VerseKey::Book - Gets book
-01071  *
-01072  * RET: value of book
-01073  */
-01074 
-01075 char VerseKey::Book() const
-01076 {
-01077         return book;
-01078 }
-01079 
-01080 
-01081 /******************************************************************************
-01082  * VerseKey::Chapter - Gets chapter
-01083  *
-01084  * RET: value of chapter
-01085  */
-01086 
-01087 int VerseKey::Chapter() const
-01088 {
-01089         return chapter;
-01090 }
-01091 
-01092 
-01093 /******************************************************************************
-01094  * VerseKey::Verse - Gets verse
-01095  *
-01096  * RET: value of verse
-01097  */
-01098 
-01099 int VerseKey::Verse() const
-01100 {
-01101         return verse;
-01102 }
-01103 
-01104 
-01105 /******************************************************************************
-01106  * VerseKey::Testament - Sets/gets testament
-01107  *
-01108  * ENT: itestament - value which to set testament
-01109  *              [MAXPOS(char)] - only get
-01110  *
-01111  * RET: if unchanged ->          value of testament
-01112  *      if   changed -> previous value of testament
-01113  */
-01114 
-01115 char VerseKey::Testament(char itestament)
-01116 {
-01117         char retval = testament;
-01118 
-01119         if (itestament != MAXPOS(char)) {
-01120                 testament = itestament;
-01121                 Normalize(1);
-01122         }
-01123         return retval;
-01124 }
-01125 
-01126 
-01127 /******************************************************************************
-01128  * VerseKey::Book - Sets/gets book
-01129  *
-01130  * ENT: ibook - value which to set book
-01131  *              [MAXPOS(char)] - only get
-01132  *
-01133  * RET: if unchanged ->          value of book
-01134  *      if   changed -> previous value of book
-01135  */
-01136 
-01137 char VerseKey::Book(char ibook)
-01138 {
-01139         char retval = book;
-01140 
-01141         Chapter(1);
-01142         book = ibook;
-01143         Normalize(1);
-01144 
-01145         return retval;
-01146 }
-01147 
-01148 
-01149 /******************************************************************************
-01150  * VerseKey::Chapter - Sets/gets chapter
-01151  *
-01152  * ENT: ichapter - value which to set chapter
-01153  *              [MAXPOS(int)] - only get
-01154  *
-01155  * RET: if unchanged ->          value of chapter
-01156  *      if   changed -> previous value of chapter
-01157  */
-01158 
-01159 int VerseKey::Chapter(int ichapter)
-01160 {
-01161         int retval = chapter;
-01162 
-01163         Verse(1);
-01164         chapter = ichapter;
-01165         Normalize(1);
-01166 
-01167         return retval;
-01168 }
-01169 
-01170 
-01171 /******************************************************************************
-01172  * VerseKey::Verse - Sets/gets verse
-01173  *
-01174  * ENT: iverse - value which to set verse
-01175  *              [MAXPOS(int)] - only get
-01176  *
-01177  * RET: if unchanged ->          value of verse
-01178  *      if   changed -> previous value of verse
-01179  */
-01180 
-01181 int VerseKey::Verse(int iverse)
-01182 {
-01183         int retval = verse;
-01184 
-01185         verse = iverse;
-01186         Normalize(1);
-01187 
-01188         return retval;
-01189 }
-01190 
-01191 
-01192 /******************************************************************************
-01193  * VerseKey::AutoNormalize - Sets/gets flag that tells VerseKey to auto-
-01194  *                              matically normalize itself when modified
-01195  *
-01196  * ENT: iautonorm - value which to set autonorm
-01197  *              [MAXPOS(char)] - only get
-01198  *
-01199  * RET: if unchanged ->          value of autonorm
-01200  *              if   changed -> previous value of autonorm
-01201  */
-01202 
-01203 char VerseKey::AutoNormalize(char iautonorm)
-01204 {
-01205         char retval = autonorm;
-01206 
-01207         if (iautonorm != MAXPOS(char)) {
-01208                 autonorm = iautonorm;
-01209                 Normalize(1);
-01210         }
-01211         return retval;
-01212 }
-01213 
-01214 
-01215 /******************************************************************************
-01216  * VerseKey::Headings - Sets/gets flag that tells VerseKey to include
-01217  *                                      chap/book/testmnt/module headings
-01218  *
-01219  * ENT: iheadings - value which to set headings
-01220  *              [MAXPOS(char)] - only get
-01221  *
-01222  * RET: if unchanged ->          value of headings
-01223  *              if   changed -> previous value of headings
-01224  */
-01225 
-01226 char VerseKey::Headings(char iheadings)
-01227 {
-01228         char retval = headings;
-01229 
-01230         if (iheadings != MAXPOS(char)) {
-01231                 headings = iheadings;
-01232                 Normalize(1);
-01233         }
-01234         return retval;
-01235 }
-01236 
-01237 
-01238 /******************************************************************************
-01239  * VerseKey::findindex - binary search to find the index closest, but less
-01240  *                                              than the given value.
-01241  *
-01242  * ENT: array   - long * to array to search
-01243  *              size            - number of elements in the array
-01244  *              value   - value to find
-01245  *
-01246  * RET: the index into the array that is less than but closest to value
-01247  */
-01248 
-01249 int VerseKey::findindex(long *array, int size, long value)
-01250 {
-01251         int lbound, ubound, tval;
-01252 
-01253         lbound = 0;
-01254         ubound = size - 1;
-01255         while ((ubound - lbound) > 1) {
-01256                 tval = lbound + (ubound-lbound)/2;
-01257                 if (array[tval] <= value)
-01258                         lbound = tval;
-01259                 else ubound = tval;
-01260         }
-01261         return (array[ubound] <= value) ? ubound : lbound;
-01262 }
-01263 
-01264 
-01265 /******************************************************************************
-01266  * VerseKey::Index - Gets index based upon current verse
-01267  *
-01268  * RET: offset
-01269  */
-01270 
-01271 long VerseKey::Index() const
-01272 {
-01273         long  offset;
-01274 
-01275         if (!testament) { // if we want module heading
-01276                 offset = 0;
-01277                 verse  = 0;
-01278         }
-01279         else {
-01280                 if (!book)
-01281                         chapter = 0;
-01282                 if (!chapter)
-01283                         verse   = 0;
-01284 
-01285                 offset = offsets[testament-1][0][book];
-01286                 offset = offsets[testament-1][1][(int)offset + chapter];
-01287                 if (!(offset|verse)) // if we have a testament but nothing else.
-01288                         offset = 1;
-01289         }
-01290         return (offset + verse);
-01291 }
-01292 
-01293 
-01294 /******************************************************************************
-01295  * VerseKey::Index - Gets index based upon current verse
-01296  *
-01297  * RET: offset
-01298  */
-01299 
-01300 long VerseKey::NewIndex() const
-01301 {
-01302         static long otMaxIndex = 32300 - 8245;  // total positions - new testament positions
-01303 //      static long otMaxIndex = offsets[0][1][(int)offsets[0][0][BMAX[0]] + books[0][BMAX[0]].chapmax];
-01304         return ((testament-1) * otMaxIndex) + Index();
-01305 }
-01306 
-01307 
-01308 /******************************************************************************
-01309  * VerseKey::Index - Sets index based upon current verse
-01310  *
-01311  * ENT: iindex - value to set index to
-01312  *
-01313  * RET: offset
-01314  */
-01315 
-01316 long VerseKey::Index(long iindex)
-01317 {
-01318         long  offset;
-01319 
-01320 // This is the dirty stuff --------------------------------------------
-01321 
-01322         if (!testament)
-01323                 testament = 1;
-01324 
-01325         if (iindex < 1) {                               // if (-) or module heading
-01326                 if (testament < 2) {
-01327                         if (iindex < 0) {
-01328                                 testament = 0;  // previously we changed 0 -> 1
-01329                                 error     = KEYERR_OUTOFBOUNDS;
-01330                         }
-01331                         else testament = 0;             // we want module heading
-01332                 }
-01333                 else {
-01334                         testament--;
-01335                         iindex = (offsets[testament-1][1][offsize[testament-1][1]-1] + books[testament-1][BMAX[testament-1]-1].versemax[books[testament-1][BMAX[testament-1]-1].chapmax-1]) + iindex; // What a doozy! ((offset of last chapter + number of verses in the last chapter) + iindex)
-01336                 }
-01337         }
-01338 
-01339 // --------------------------------------------------------------------
-01340 
-01341 
-01342         if (testament) {
-01343                 if ((!error) && (iindex)) {
-01344                         offset  = findindex(offsets[testament-1][1], offsize[testament-1][1], iindex);
-01345                         verse   = iindex - offsets[testament-1][1][offset];
-01346                         book    = findindex(offsets[testament-1][0], offsize[testament-1][0], offset);
-01347                         chapter = offset - offsets[testament-1][0][VerseKey::book];
-01348                         verse   = (chapter) ? verse : 0;  // funny check. if we are index=1 (testmt header) all gets set to 0 exept verse.  Don't know why.  Fix if you figure out.  Think its in the offsets table.
-01349                         if (verse) {            // only check if -1 won't give negative
-01350                                 if (verse > books[testament-1][book-1].versemax[chapter-1]) {
-01351                                         if (testament > 1) {
-01352                                                 verse = books[testament-1][book-1].versemax[chapter-1];
-01353                                                 error = KEYERR_OUTOFBOUNDS;
-01354                                         }
-01355                                         else {
-01356                                                 testament++;
-01357                                                 Index(verse - books[testament-2][book-1].versemax[chapter-1]);
-01358                                         }
-01359                                 }
-01360                         }
-01361                 }
-01362         }
-01363         if (_compare(UpperBound()) > 0) {
-01364                 *this = UpperBound();
-01365                 error = KEYERR_OUTOFBOUNDS;
-01366         }
-01367         if (_compare(LowerBound()) < 0) {
-01368                 *this = LowerBound();
-01369                 error = KEYERR_OUTOFBOUNDS;
-01370         }
-01371         return Index();
-01372 }
-01373 
-01374 
-01375 /******************************************************************************
-01376  * VerseKey::compare    - Compares another SWKey object
-01377  *
-01378  * ENT: ikey - key to compare with this one
-01379  *
-01380  * RET: >0 if this versekey is greater than compare versekey
-01381  *      <0 <
-01382  *       0 =
-01383  */
-01384 
-01385 int VerseKey::compare(const SWKey &ikey)
-01386 {
-01387         VerseKey ivkey = (const char *)ikey;
-01388         return _compare(ivkey);
-01389 }
-01390 
-01391 
-01392 /******************************************************************************
-01393  * VerseKey::_compare   - Compares another VerseKey object
-01394  *
-01395  * ENT: ikey - key to compare with this one
-01396  *
-01397  * RET: >0 if this versekey is greater than compare versekey
-01398  *      <0 <
-01399  *       0 =
-01400  */
-01401 
-01402 int VerseKey::_compare(const VerseKey &ivkey)
-01403 {
-01404         long keyval1 = 0;
-01405         long keyval2 = 0;
-01406 
-01407         keyval1 += Testament() * 1000000000;
-01408         keyval2 += ivkey.Testament() * 1000000000;
-01409         keyval1 += Book() * 1000000;
-01410         keyval2 += ivkey.Book() * 1000000;
-01411         keyval1 += Chapter() * 1000;
-01412         keyval2 += ivkey.Chapter() * 1000;
-01413         keyval1 += Verse();
-01414         keyval2 += ivkey.Verse();
-01415         keyval1 -= keyval2;
-01416         keyval1 = (keyval1) ? ((keyval1 > 0) ? 1 : -1) /*keyval1/labs(keyval1)*/:0; // -1 | 0 | 1
-01417         return keyval1;
-01418 }
-01419 
-01420 
-01421 const char *VerseKey::getOSISRef() const {
-01422         static char buf[5][254];
-01423         static char loop = 0;
-01424 
-01425         if (loop > 4)
-01426                 loop = 0;
-01427 
-01428         static char *osisotbooks[] = {
-01429                         "Gen","Exod","Lev","Num","Deut","Josh","Judg","Ruth","_1Sam","_2Sam",
-01430                         "_1Kgs","_2Kgs","_1Chr","_2Chr","Ezra","Neh","Esth","Job","Ps",
-01431                         "Prov",         // added this.  Was not in OSIS spec
-01432                         "Eccl",
-01433                         "Song","Isa","Jer","Lam","Ezek","Dan","Hos","Joel","Amos","Obad",
-01434                         "Jonah","Mic","Nah","Hab","Zeph","Hag","Zech","Mal","Bar","PrAzar",
-01435                         "Bel","Sus","_1Esd","_2Esd","AddEsth","EpJer","Jdt","_1Macc","_2Macc","_3Macc",
-01436                         "_4Macc","PrMan","Ps151","Sir","Tob","Wis"};
-01437         static char *osisntbooks[] = {
-01438                         "Matt","Mark","Luke","John","Acts","Rom","_1Cor","_2Cor","Gal","Eph",
-01439                         "Phil","Col","_1Thess","_2Thess","_1Tim","_2Tim","Titus","Phlm","Heb","Jas",
-01440                         "_1Pet","_2Pet","_1John","_2John","_3John","Jude","Rev"};
-01441         static char **osisbooks[] = { osisotbooks, osisntbooks };
-01442         if (Verse())
-01443                 sprintf(buf[loop], "%s.%d.%d", osisbooks[Testament()-1][Book()-1], (int)Chapter(), (int)Verse());
-01444         else if (Chapter())
-01445                 sprintf(buf[loop], "%s.%d", osisbooks[Testament()-1][Book()-1], (int)Chapter());
-01446         else if (Book())
-01447                 sprintf(buf[loop], "%s", osisbooks[Testament()-1][Book()-1]);
-01448         else    sprintf(buf[loop], "");
-01449         return buf[loop++];
-01450 }
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/versekey_8h-source.html b/doc/api-documentation/html/versekey_8h-source.html deleted file mode 100644 index 2b41b3e..0000000 --- a/doc/api-documentation/html/versekey_8h-source.html +++ /dev/null @@ -1,220 +0,0 @@ - - -versekey.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

versekey.h

00001 /******************************************************************************
-00002  *      versekey.h - code for class 'versekey'- a standard Biblical verse key
-00003  *
-00004  * $Id: versekey_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00005  *
-00006  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00007  *      CrossWire Bible Society
-00008  *      P. O. Box 2528
-00009  *      Tempe, AZ       85280-2528
-00010  *
-00011  * This program is free software; you can redistribute it and/or modify it
-00012  * under the terms of the GNU General Public License as published by the
-00013  * Free Software Foundation version 2.
-00014  *
-00015  * This program is distributed in the hope that it will be useful, but
-00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-00018  * General Public License for more details.
-00019  *
-00020  */
-00021 
-00022 
-00023 #ifndef VERSEKEY_H
-00024 #define VERSEKEY_H
-00025 
-00026 #include <swkey.h>
-00027 #include <swmacs.h>
-00028 #include <listkey.h>
-00029 #include <ctype.h>
-00030 
-00031 #include <defs.h>
-00032 
-00033 #define POS_MAXVERSE ((char)3)
-00034 #define POS_MAXCHAPTER ((char)4)
-00035 #define POS_MAXBOOK ((char)5)
-00036 
-00037 #define MAXVERSE SW_POSITION(POS_MAXVERSE)
-00038 #define MAXCHAPTER SW_POSITION(POS_MAXCHAPTER)
-00039 #define MAXBOOK SW_POSITION(POS_MAXBOOK)
-00040 
-00041 struct sbook
-00042 {
-00045         const char *name;
-00046 
-00049         const char *prefAbbrev;
-00050 
-00053         unsigned char chapmax;
-00056         int *versemax;
-00057 };
-00058 
-00059 struct abbrev
-00060 {
-00061         const char *ab;
-00062         int book;
-00063 };
-00064 
-00065 
-00066 class SWLocale;
-00067 
-00072 class SWDLLEXPORT VerseKey:public SWKey
-00073 {
-00074         class LocaleCache
-00075         {
-00076         public:
-00077                 char *name;
-00078                 unsigned int abbrevsCnt;
-00079                 SWLocale *locale;
-00080                         LocaleCache()
-00081                 {
-00082                         name = 0;
-00083                         abbrevsCnt = 0;
-00084                         locale = 0;
-00085                 }
-00086                  virtual ~LocaleCache()
-00087                 {
-00088                         if (name)
-00089         delete[]name;
-00090                 }
-00091         };
-00092 
-00093         static SWClass classdef;
-00094 
-00095         static long *offsets[2][2];
-00096         static int offsize[2][2];
-00099         static int instance;
-00100         static struct sbook otbooks[];
-00101         static struct sbook ntbooks[];
-00102         static long otbks[];
-00103         static long otcps[];
-00104         static long ntbks[];
-00105         static long ntcps[];
-00106         static int vm[];
-00107         static LocaleCache localeCache;
-00108         ListKey internalListKey;
-00109 
-00110         const struct abbrev *abbrevs;
-00111         char *locale;
-00112         int abbrevsCnt;
-00115         signed char testament;
-00116         mutable signed char book;
-00117         mutable signed int chapter;
-00118         mutable signed int verse;
-00121         char autonorm;
-00124         char headings;
-00125 
-00126         int getBookAbbrev(const char *abbr);
-00127         void initBounds() const;
-00130         void initstatics();
-00133         void init();
-00138         void freshtext() const;
-00142         virtual char parse();
-00151         int findindex(long *array, int size, long value);
-00152         mutable VerseKey *lowerBound, *upperBound;
-00153 
-00154 public:
-00155         static const char builtin_BMAX[2];
-00156         static struct sbook *builtin_books[2];
-00157         static const struct abbrev builtin_abbrevs[];
-00158         const char *BMAX;
-00159         struct sbook **books;
-00160 
-00167         VerseKey(const char *ikey = 0);
-00168         
-00175         VerseKey(const SWKey * ikey);
-00176         
-00183         VerseKey(const char *min, const char *max);
-00184         
-00190         VerseKey(const VerseKey &k);
-00191         
-00195         virtual ~ VerseKey();
-00196 
-00203         VerseKey & LowerBound(const char *lb);
-00204         
-00210         VerseKey & UpperBound(const char *ub);
-00211         
-00215         VerseKey & LowerBound() const;
-00216         
-00220         VerseKey & UpperBound() const;
-00221         
-00224         void ClearBounds();
-00225         
-00229         virtual SWKey *clone() const;
-00230         
-00234         virtual const char *getText() const;
-00235         virtual const char *getShortText() const;
-00236         virtual void setText(const char *ikey) { SWKey::setText(ikey); parse (); }
-00237         virtual void copyFrom(const SWKey & ikey);
-00238         
-00241         virtual void copyFrom(const VerseKey & ikey);
-00242         
-00248         virtual void setPosition(SW_POSITION);
-00249         
-00255         virtual void decrement(int step);
-00256         
-00262         virtual void increment(int step);
-00263         virtual char Traversable() { return 1; }
-00264 
-00265         virtual const char *getBookName() const;
-00266         virtual const char *getBookAbbrev() const;
-00271         virtual char Testament() const;
-00272         
-00277         virtual char Book() const;
-00278         
-00283         virtual int Chapter() const;
-00284         
-00289         virtual int Verse() const;
-00290         
-00298         virtual char Testament(char itestament);
-00299         
-00307         virtual char Book(char ibook);
-00308         
-00316         virtual int Chapter(int ichapter);
-00317         
-00325         virtual int Verse(int iverse);
-00326         
-00333         virtual void Normalize(char autocheck = 0);
-00334         
-00343         virtual char AutoNormalize(char iautonorm = MAXPOS (char));
-00344         
-00353         virtual char Headings(char iheadings = MAXPOS (char));
-00354         
-00355         virtual long NewIndex() const;
-00356         
-00361         virtual long Index() const;
-00362         
-00368         virtual long Index(long iindex);
-00369 
-00370         virtual const char *getOSISRef() const;
-00371 
-00372         virtual ListKey ParseVerseList(const char *buf, const char *defaultKey = "Genesis 1:1", bool expandRange = false);
-00380         virtual int compare(const SWKey & ikey);
-00381         
-00389         virtual int _compare(const VerseKey & ikey);
-00390         
-00391         virtual void setBookAbbrevs(const struct abbrev *bookAbbrevs, unsigned int size = 0 /* default determine size */ );
-00392         virtual void setBooks(const char *iBMAX, struct sbook **ibooks);
-00393         virtual void setLocale(const char *name);
-00394         virtual const char *getLocale() const { return locale; }
-00395 
-00396         SWKEY_OPERATORS
-00397 
-00398         virtual SWKey & operator = (const VerseKey & ikey) { copyFrom(ikey); return *this; }
-00399 };
-00400 
-00401 
-00402 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/vntidx_8cpp-source.html b/doc/api-documentation/html/vntidx_8cpp-source.html deleted file mode 100644 index 8813465..0000000 --- a/doc/api-documentation/html/vntidx_8cpp-source.html +++ /dev/null @@ -1,199 +0,0 @@ - - -vntidx.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

vntidx.cpp

00001 #include <stdio.h>
-00002 #include <fcntl.h>
-00003 #include <versekey.h>
-00004 
-00005 
-00006 char findbreak(int fp, int *offset, int *num1, int *num2, short *size);
-00007 
-00008 
-00009 main(int argc, char **argv)
-00010 {
-00011         int fp, vfp, cfp, bfp;
-00012         long pos;
-00013         short size, tmp;
-00014         int num1, num2, offset, curbook = 0, curchap = 0, curverse = 0;
-00015         char buf[127];
-00016         VerseKey mykey;
-00017 
-00018         if ((argc < 2) || (argc > 3)) {
-00019                 fprintf(stderr, "usage: %s <file to process> [nt]\n", argv[0]);
-00020                 exit(1);
-00021         }
-00022 
-00023         if ((fp = open(argv[1], O_RDONLY)) == -1) {
-00024                 fprintf(stderr, "Couldn't open file: %s\n", argv[1]);
-00025                 exit(1);
-00026         }
-00027 
-00028         sprintf(buf, "%s.vss", argv[1]);
-00029         if ((vfp = open(buf, O_CREAT|O_WRONLY)) == -1) {
-00030                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00031                 exit(1);
-00032         }
-00033 
-00034         sprintf(buf, "%s.cps", argv[1]);
-00035         if ((cfp = open(buf, O_CREAT|O_WRONLY)) == -1) {
-00036                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00037                 exit(1);
-00038         }
-00039 
-00040         sprintf(buf, "%s.bks", argv[1]);
-00041         if ((bfp = open(buf, O_CREAT|O_WRONLY)) == -1) {
-00042                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00043                 exit(1);
-00044         }
-00045 
-00046         pos  = 0;
-00047         write(bfp, &pos, 4);  /* Book    offset for testament intros */
-00048         pos = 4;
-00049         write(cfp, &pos, 4);  /* Chapter offset for testament intro */
-00050 
-00051 
-00052 /*      Right now just zero out intros until parsing correctly */
-00053         pos = 0;
-00054         size = 0;
-00055         write(vfp, &pos, 4);  /* Module intro */
-00056         write(vfp, &size, 2);
-00057         write(vfp, &pos, 4);  /* Testament intro */
-00058         write(vfp, &size, 2);
-00059 
-00060         mykey = (argc == 3) ? "Matthew 1:1" : "Genesis 1:1";
-00061 
-00062         while (!findbreak(fp, &offset, &num1, &num2, &size)) {
-00063                 num1 = mykey.Chapter();
-00064                 num2 = mykey.Verse();
-00065                 if (num2 == 1) {                /* if we're at a new chapter */
-00066                         if (num1 == 1) {        /* if we're at a new book */
-00067                                 pos = lseek(cfp, 0, SEEK_CUR);
-00068                                 write(bfp, &pos, 4);
-00069                                 pos = lseek(vfp, 0, SEEK_CUR); /* Book intro (cps) */
-00070                                 write(cfp, &pos, 4);
-00071                                 pos  = 0;
-00072                                 tmp = 0;
-00073                                 write(vfp, &pos, 4);  /* Book intro (vss) */
-00074                                 write(vfp, &tmp, 2);
-00075                                 curbook++;
-00076                                 curchap = 0;
-00077                         }
-00078                         pos = lseek(vfp, 0, SEEK_CUR);
-00079                         write(cfp, &pos, 4);
-00080                         curverse = 1;
-00081                         pos  = 0;
-00082                         tmp = 0;
-00083                         write(vfp, &pos, 4);  /* Chapter intro */
-00084                         write(vfp, &tmp, 2);
-00085                         curchap++;
-00086                 }
-00087                 else curverse++;
-00088         
-00089                 printf("%2d:%3d:%3d found at offset: %7d\n", curbook, num1, num2, offset);
-00090 
-00091                 if (num1 != curchap) {
-00092                         fprintf(stderr, "Error: Found chaptures out of sequence\n");
-00093                         break;
-00094                 }
-00095                 if (num2 != curverse) {
-00096                         fprintf(stderr, "Error: Found verses out of sequence\n");
-00097                         break;
-00098                 }
-00099                 write(vfp, &offset, 4);
-00100                 write(vfp, &size, 2);
-00101                 mykey++;
-00102         }
-00103         
-00104         close(vfp);
-00105         close(cfp);
-00106         close(bfp);
-00107         close(fp);
-00108 }
-00109 
-00110 
-00111 char findbreak(int fp, int *offset, int *num1, int *num2, short *size)
-00112 {
-00113         char buf[17];
-00114         char buf2[7];
-00115         char buf3[7];
-00116         char loop;
-00117         char offadj, inquotes, sizeadj;
-00118         int offset2, ch2, vs2;
-00119         
-00120         strcpy (buf3, "\\par  ");
-00121         buf3[5] = 10;
-00122         memset(buf, ' ', 17);
-00123 
-00124         while (1) {
-00125                 offadj = -100;
-00126                 inquotes = 0;
-00127                 sizeadj = 0;
-00128                 if (!memcmp(buf, "\\par FIN DEL NUEVO TESTAMENTO", 16)) {
-00129                         offadj = -11;
-00130 //                      inquotes = 1;
-00131                         sizeadj = -7;
-00132                 }
-00133                 
-00134                 if ((!memcmp(buf, buf3, 6)) && (!size)) {
-00135                         offadj = -11;
-00136 //                      inquotes = 1;
-00137                         sizeadj = -7;
-00138                 }
-00139                 if (!memcmp(buf, "\\par  ", 6)) {
-00140                         if (isdigit(buf[6])) {
-00141                                 for (loop = 7; loop < 10; loop++) {
-00142                                         if (!isdigit(buf[loop]))
-00143                                                 break;
-00144                                 }
-00145                                 offadj = -(11 - (loop - 6));
-00146         //                      inquotes = 1;
-00147                                 sizeadj = -7;
-00148                         }
-00149                 }
-00150 /*
-00151                 if (!memcmp(buf, "\\fi200\\widctlpar", 16)) {
-00152                         offadj = -1;
-00153 //                      inquotes = 1;
-00154                         sizeadj = -18;
-00155                 }
-00156 */
-00157                 if (offadj > -100) {
-00158                         *offset = lseek(fp, 0, SEEK_CUR) + offadj;
-00159                         if (size) {
-00160                                 (*offset)++;
-00161                                 while (inquotes) {
-00162                                         while (read(fp, buf2, 1) == 1) {
-00163                                                 if (*buf2 == '}')
-00164                                                         break;
-00165                                                 (*offset)++;
-00166                                         }
-00167                                         inquotes--;
-00168                                 }
-00169                                 if (findbreak(fp, &offset2, &ch2, &vs2, 0)) {
-00170                                         *size = (short) (lseek(fp, 0, SEEK_END) - (*offset));
-00171                                 }
-00172                                 else {
-00173                                         *size = (offset2 - (*offset));
-00174                                 }
-00175                                 lseek(fp, *offset-sizeadj, SEEK_SET);
-00176                         }
-00177                         else (*offset) += sizeadj;
-00178                         return 0;
-00179                 }
-00180                 memmove(buf, &buf[1], 16);
-00181                 if (read(fp, &buf[16], 1) != 1)
-00182                         return 1;
-00183         }
-00184 }
-00185 
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/zcom_8cpp-source.html b/doc/api-documentation/html/zcom_8cpp-source.html deleted file mode 100644 index bc0713d..0000000 --- a/doc/api-documentation/html/zcom_8cpp-source.html +++ /dev/null @@ -1,304 +0,0 @@ - - -zcom.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

zcom.cpp

00001 /******************************************************************************
-00002  *  rawcom.cpp - code for class 'zCom'- a module that reads raw commentary
-00003  *                      files:  ot and nt using indexs ??.bks ??.cps ??.vss
-00004  */
-00005 
-00006 
-00007 #include <ctype.h>
-00008 #include <stdio.h>
-00009 #include <fcntl.h>
-00010 
-00011 #ifndef __GNUC__
-00012 #include <io.h>
-00013 #else
-00014 #include <unistd.h>
-00015 #endif
-00016 
-00017 #include <string.h>
-00018 #include <utilfuns.h>
-00019 #include <zverse.h>
-00020 #include <zcom.h>
-00021 
-00022 
-00023 /******************************************************************************
-00024  * zCom Constructor - Initializes data for instance of zCom
-00025  *
-00026  * ENT: ipath - path to data files
-00027  *              iname - Internal name for module
-00028  *              idesc - Name to display to user for module
-00029  *              iblockType - verse, chapter, book, etc. of index chunks
-00030  *              icomp - Compressor object
-00031  *              idisp - Display object to use for displaying
-00032  */
-00033 
-00034 zCom::zCom(const char *ipath, const char *iname, const char *idesc, int iblockType, SWCompress *icomp, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang) : zVerse(ipath, -1, iblockType, icomp), SWCom(iname, idesc, idisp, enc, dir, mark, ilang)/*, SWCompress()*/
-00035 {
-00036         blockType = iblockType;
-00037         lastWriteKey = 0;
-00038 }
-00039 
-00040 /******************************************************************************
-00041  * zCom Destructor - Cleans up instance of zCom
-00042  */
-00043 
-00044 zCom::~zCom() {
-00045         flushCache();
-00046 
-00047         if (lastWriteKey)
-00048                 delete lastWriteKey;
-00049 }
-00050 
-00051 /******************************************************************************
-00052  * zCom::operator char *        - Returns the correct verse when char * cast
-00053  *                                      is requested
-00054  *
-00055  * RET: string buffer with verse
-00056  */
-00057 char *zCom::getRawEntry() {
-00058         long  start = 0;
-00059         unsigned short size = 0;
-00060         VerseKey *key = 0;
-00061 
-00062 #ifndef _WIN32_WCE
-00063         try {
-00064 #endif
-00065                 key = SWDYNAMIC_CAST(VerseKey, this->key);
-00066 #ifndef _WIN32_WCE
-00067         }
-00068         catch ( ... ) {}
-00069 #endif
-00070         // if we don't have a VerseKey * decendant, create our own
-00071         if (!key)
-00072                 key = new VerseKey(this->key);
-00073 
-00074         findoffset(key->Testament(), key->Index(), &start, &size);
-00075         entrySize = size;        // support getEntrySize call
-00076 
-00077         unsigned long newsize = (size + 2) * FILTERPAD;
-00078         if (newsize > entrybufallocsize) {
-00079                 if (entrybuf)
-00080                         delete [] entrybuf;
-00081                 entrybuf = new char [ newsize ];
-00082                 entrybufallocsize = newsize;
-00083         }
-00084         *entrybuf = 0;
-00085 
-00086         swgettext(key->Testament(), start, (size + 2), entrybuf);
-00087 
-00088         rawFilter(entrybuf, size, key);
-00089 
-00090         if (!isUnicode())
-00091                 preptext(entrybuf);
-00092 
-00093         if (this->key != key) // free our key if we created a VerseKey
-00094                 delete key;
-00095 
-00096         return entrybuf;
-00097 }
-00098 
-00099 
-00100 bool zCom::sameBlock(VerseKey *k1, VerseKey *k2) {
-00101         if (k1->Testament() != k2->Testament())
-00102                 return false;
-00103 
-00104         switch (blockType) {
-00105         case VERSEBLOCKS:
-00106                 if (k1->Verse() != k2->Verse())
-00107                         return false;
-00108         case CHAPTERBLOCKS:
-00109                 if (k1->Chapter() != k2->Chapter())
-00110                         return false;
-00111         case BOOKBLOCKS:
-00112                 if (k1->Book() != k2->Book())
-00113                         return false;
-00114         }
-00115         return true;
-00116 }
-00117 
-00118 SWModule &zCom::setentry(const char *inbuf, long len) {
-00119         VerseKey *key = 0;
-00120         // see if we have a VerseKey * or decendant
-00121 #ifndef _WIN32_WCE
-00122         try {
-00123 #endif
-00124                 key = SWDYNAMIC_CAST(VerseKey, this->key);
-00125 #ifndef _WIN32_WCE
-00126         }
-00127         catch ( ... ) {}
-00128 #endif
-00129         // if we don't have a VerseKey * decendant, create our own
-00130         if (!key)
-00131                 key = new VerseKey(this->key);
-00132 
-00133 
-00134         // see if we've jumped across blocks since last write
-00135         if (lastWriteKey) {
-00136                 if (!sameBlock(lastWriteKey, key)) {
-00137                         flushCache();
-00138                 }
-00139                 delete lastWriteKey;
-00140         }
-00141 
-00142         settext(key->Testament(), key->Index(), inbuf, len);
-00143 
-00144         lastWriteKey = (VerseKey *)key->clone();        // must delete
-00145 
-00146         if (this->key != key) // free our key if we created a VerseKey
-00147                 delete key;
-00148 
-00149         return *this;
-00150 }
-00151 
-00152 SWModule &zCom::operator <<(const char *inbuf) {
-00153         return setentry(inbuf, 0);
-00154 }
-00155 
-00156 
-00157 SWModule &zCom::operator <<(const SWKey *inkey) {
-00158         VerseKey *destkey = 0;
-00159         const VerseKey *srckey = 0;
-00160         // see if we have a VerseKey * or decendant
-00161 #ifndef _WIN32_WCE
-00162         try {
-00163 #endif
-00164                 destkey = SWDYNAMIC_CAST(VerseKey, this->key);
-00165 #ifndef _WIN32_WCE
-00166         }
-00167         catch ( ... ) {}
-00168 #endif
-00169         // if we don't have a VerseKey * decendant, create our own
-00170         if (!destkey)
-00171                 destkey = new VerseKey(this->key);
-00172 
-00173         // see if we have a VerseKey * or decendant
-00174 #ifndef _WIN32_WCE
-00175         try {
-00176 #endif
-00177                 srckey = (const VerseKey *) SWDYNAMIC_CAST(VerseKey, inkey);
-00178 #ifndef _WIN32_WCE
-00179         }
-00180         catch ( ... ) {
-00181         }
-00182 #endif
-00183         // if we don't have a VerseKey * decendant, create our own
-00184         if (!srckey)
-00185                 srckey = new VerseKey(inkey);
-00186 
-00187         linkentry(destkey->Testament(), destkey->Index(), srckey->Index());
-00188 
-00189         if (this->key != destkey) // free our key if we created a VerseKey
-00190                 delete destkey;
-00191 
-00192         if (inkey != srckey) // free our key if we created a VerseKey
-00193                 delete srckey;
-00194 
-00195         return *this;
-00196 }
-00197 
-00198 /******************************************************************************
-00199  * zCom::deleteEntry    - deletes this entry
-00200  *
-00201  * RET: *this
-00202  */
-00203 
-00204 void zCom::deleteEntry() {
-00205 
-00206         VerseKey *key = 0;
-00207 
-00208 #ifndef _WIN32_WCE
-00209         try {
-00210 #endif
-00211                 key = SWDYNAMIC_CAST(VerseKey, this->key);
-00212 #ifndef _WIN32_WCE
-00213         }
-00214         catch ( ... ) {}
-00215 #endif
-00216         if (!key)
-00217                 key = new VerseKey(this->key);
-00218 
-00219         settext(key->Testament(), key->Index(), "");
-00220 
-00221         if (key != this->key)
-00222                 delete key;
-00223 }
-00224 
-00225 
-00226 /******************************************************************************
-00227  * zCom::operator +=    - Increments module key a number of entries
-00228  *
-00229  * ENT: increment       - Number of entries to jump forward
-00230  *
-00231  * RET: *this
-00232  */
-00233 
-00234 SWModule &zCom::operator +=(int increment) {
-00235         long  start;
-00236         unsigned short size;
-00237         VerseKey *tmpkey = 0;
-00238 
-00239 #ifndef _WIN32_WCE
-00240         try {
-00241 #endif
-00242                 tmpkey = SWDYNAMIC_CAST(VerseKey, key);
-00243 #ifndef _WIN32_WCE
-00244         }
-00245         catch ( ... ) {}
-00246 #endif
-00247         if (!tmpkey)
-00248                 tmpkey = new VerseKey(key);
-00249 
-00250         findoffset(tmpkey->Testament(), tmpkey->Index(), &start, &size);
-00251 
-00252         SWKey lastgood = *tmpkey;
-00253         while (increment) {
-00254                 long laststart = start;
-00255                 unsigned short lastsize = size;
-00256                 SWKey lasttry = *tmpkey;
-00257                 (increment > 0) ? (*key)++ : (*key)--;
-00258                 if (tmpkey != key)
-00259                         delete tmpkey;
-00260                 tmpkey = 0;
-00261 #ifndef _WIN32_WCE
-00262                 try {
-00263 #endif
-00264                         tmpkey = SWDYNAMIC_CAST(VerseKey, key);
-00265 #ifndef _WIN32_WCE
-00266                 }
-00267                 catch ( ... ) {}
-00268 #endif
-00269                 if (!tmpkey)
-00270                         tmpkey = new VerseKey(key);
-00271 
-00272                 if ((error = key->Error())) {
-00273                         *key = lastgood;
-00274                         break;
-00275                 }
-00276                 long index = tmpkey->Index();
-00277                 findoffset(tmpkey->Testament(), index, &start, &size);
-00278                 if ((((laststart != start) || (lastsize != size))||(!skipConsecutiveLinks)) && (start >= 0) && (size)) {
-00279                         increment += (increment < 0) ? 1 : -1;
-00280                         lastgood = *tmpkey;
-00281                 }
-00282         }
-00283         error = (error) ? KEYERR_OUTOFBOUNDS : 0;
-00284 
-00285         if (tmpkey != key)
-00286                 delete tmpkey;
-00287 
-00288         return *this;
-00289 }
-00290 
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/zcom_8h-source.html b/doc/api-documentation/html/zcom_8h-source.html deleted file mode 100644 index 3f79593..0000000 --- a/doc/api-documentation/html/zcom_8h-source.html +++ /dev/null @@ -1,83 +0,0 @@ - - -zcom.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

zcom.h

00001 /******************************************************************************
-00002  *  zcom.h   - code for class 'zCom'- a module that reads compressed text
-00003  *                              files: ot and nt using indexs ??.vss
-00004  *
-00005  * $Id: zcom_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #ifndef ZCOM_H
-00024 #define ZCOM_H
-00025 
-00026 #include <rawverse.h>
-00027 #include <swcom.h>
-00028 #include <swcomprs.h>
-00029 
-00030 #include <defs.h>
-00031 
-00032 class SWDLLEXPORT zCom:public zVerse, public SWCom {
-00033   VerseKey *lastWriteKey;
-00034   bool sameBlock (VerseKey * lastWriteKey, VerseKey * key);
-00035   int blockType;
-00036 public:
-00037   
-00038     
-00039     zCom (const char *ipath, const char *iname = 0, const char *idesc =
-00040            0, int blockType = CHAPTERBLOCKS, SWCompress * icomp =
-00041            0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN,
-00042            const char* ilang = 0);
-00043     virtual ~ zCom ();
-00044   virtual char *getRawEntry ();
-00045   virtual SWModule & operator += (int increment);
-00046   virtual SWModule & operator -= (int decrement)
-00047   {
-00048     return this->operator += (-decrement);
-00049   }
-00050 
-00051   // write interface ----------------------------
-00052         virtual bool isWritable () { return ((idxfp[0]->getFd() > 0) && ((idxfp[0]->mode & O_RDWR) == O_RDWR)); }
-00053   static char createModule (const char *path, int blockBound)
-00054   {
-00055     return zVerse::createModule (path, blockBound);
-00056   }
-00057   virtual SWModule & setentry (const char *inbuf, long len);    // Modify current module entry
-00058   virtual SWModule & operator << (const char *inbuf);   // Modify current module entry
-00059   virtual SWModule & operator << (const SWKey * linkKey);       // Link current module entry to other module entry
-00060   virtual void deleteEntry ();  // Delete current module entry
-00061   // end write interface ------------------------
-00062   
-00063   // swcacher interface ----------------------
-00064         virtual void flush() { flushCache(); }
-00065   // end swcacher interface ----------------------
-00066 };
-00067 
-00068 
-00069 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/zconf_8h-source.html b/doc/api-documentation/html/zconf_8h-source.html deleted file mode 100644 index be43e7a..0000000 --- a/doc/api-documentation/html/zconf_8h-source.html +++ /dev/null @@ -1,293 +0,0 @@ - - -zconf.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

zconf.h

00001 /* zconf.h -- configuration of the zlib compression library
-00002  * Copyright (C) 1995-1998 Jean-loup Gailly.
-00003  * For conditions of distribution and use, see copyright notice in zlib.h 
-00004  */
-00005 
-00006 /* @(#) $Id: zconf_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $ */
-00007 
-00008 #ifndef _ZCONF_H
-00009 #define _ZCONF_H
-00010 
-00011 /*
-00012  * If you *really* need a unique prefix for all types and library functions,
-00013  * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
-00014  */
-00015 #ifdef Z_PREFIX
-00016 #  define deflateInit_  z_deflateInit_
-00017 #  define deflate       z_deflate
-00018 #  define deflateEnd    z_deflateEnd
-00019 #  define inflateInit_  z_inflateInit_
-00020 #  define inflate       z_inflate
-00021 #  define inflateEnd    z_inflateEnd
-00022 #  define deflateInit2_ z_deflateInit2_
-00023 #  define deflateSetDictionary z_deflateSetDictionary
-00024 #  define deflateCopy   z_deflateCopy
-00025 #  define deflateReset  z_deflateReset
-00026 #  define deflateParams z_deflateParams
-00027 #  define inflateInit2_ z_inflateInit2_
-00028 #  define inflateSetDictionary z_inflateSetDictionary
-00029 #  define inflateSync   z_inflateSync
-00030 #  define inflateSyncPoint z_inflateSyncPoint
-00031 #  define inflateReset  z_inflateReset
-00032 #  define compress      z_compress
-00033 #  define compress2     z_compress2
-00034 #  define uncompress    z_uncompress
-00035 #  define adler32       z_adler32
-00036 #  define crc32         z_crc32
-00037 #  define get_crc_table z_get_crc_table
-00038 
-00039 #  define Byte          z_Byte
-00040 #  define uInt          z_uInt
-00041 #  define uLong         z_uLong
-00042 #  define Bytef         z_Bytef
-00043 #  define charf         z_charf
-00044 #  define intf          z_intf
-00045 #  define uIntf         z_uIntf
-00046 #  define uLongf        z_uLongf
-00047 #  define voidpf        z_voidpf
-00048 #  define voidp         z_voidp
-00049 #endif
-00050 
-00051 #if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
-00052 #  define WIN32
-00053 #endif
-00054 #if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386)
-00055 #  ifndef __32BIT__
-00056 #    define __32BIT__
-00057 #  endif
-00058 #endif
-00059 #if defined(__MSDOS__) && !defined(MSDOS)
-00060 #  define MSDOS
-00061 #endif
-00062 
-00063 /*
-00064  * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
-00065  * than 64k bytes at a time (needed on systems with 16-bit int).
-00066  */
-00067 #if defined(MSDOS) && !defined(__32BIT__)
-00068 #  define MAXSEG_64K
-00069 #endif
-00070 #ifdef MSDOS
-00071 #  define UNALIGNED_OK
-00072 #endif
-00073 
-00074 #if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32))  && !defined(STDC)
-00075 #  define STDC
-00076 #endif
-00077 #if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__)
-00078 #  ifndef STDC
-00079 #    define STDC
-00080 #  endif
-00081 #endif
-00082 
-00083 #ifndef STDC
-00084 #  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
-00085 #    define const
-00086 #  endif
-00087 #endif
-00088 
-00089 /* Some Mac compilers merge all .h files incorrectly: */
-00090 #if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)
-00091 #  define NO_DUMMY_DECL
-00092 #endif
-00093 
-00094 /* Old Borland C incorrectly complains about missing returns: */
-00095 #if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
-00096 #  define NEED_DUMMY_RETURN
-00097 #endif
-00098 
-00099 
-00100 /* Maximum value for memLevel in deflateInit2 */
-00101 #ifndef MAX_MEM_LEVEL
-00102 #  ifdef MAXSEG_64K
-00103 #    define MAX_MEM_LEVEL 8
-00104 #  else
-00105 #    define MAX_MEM_LEVEL 9
-00106 #  endif
-00107 #endif
-00108 
-00109 /* Maximum value for windowBits in deflateInit2 and inflateInit2.
-00110  * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
-00111  * created by gzip. (Files created by minigzip can still be extracted by
-00112  * gzip.)
-00113  */
-00114 #ifndef MAX_WBITS
-00115 #  define MAX_WBITS   15 /* 32K LZ77 window */
-00116 #endif
-00117 
-00118 /* The memory requirements for deflate are (in bytes):
-00119             (1 << (windowBits+2)) +  (1 << (memLevel+9))
-00120  that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
-00121  plus a few kilobytes for small objects. For example, if you want to reduce
-00122  the default memory requirements from 256K to 128K, compile with
-00123      make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
-00124  Of course this will generally degrade compression (there's no free lunch).
-00125 
-00126    The memory requirements for inflate are (in bytes) 1 << windowBits
-00127  that is, 32K for windowBits=15 (default value) plus a few kilobytes
-00128  for small objects.
-00129 */
-00130 
-00131                         /* Type declarations */
-00132 
-00133 #ifndef OF /* function prototypes */
-00134 #  ifdef STDC
-00135 #    define OF(args)  args
-00136 #  else
-00137 #    define OF(args)  ()
-00138 #  endif
-00139 #endif
-00140 
-00141 /* The following definitions for FAR are needed only for MSDOS mixed
-00142  * model programming (small or medium model with some far allocations).
-00143  * This was tested only with MSC; for other MSDOS compilers you may have
-00144  * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
-00145  * just define FAR to be empty.
-00146  */
-00147 #if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__)
-00148    /* MSC small or medium model */
-00149 #  define SMALL_MEDIUM
-00150 #  ifdef _MSC_VER
-00151 #    define FAR _far
-00152 #  else
-00153 #    define FAR far
-00154 #  endif
-00155 #endif
-00156 #if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))
-00157 #  ifndef __32BIT__
-00158 #    define SMALL_MEDIUM
-00159 #    define FAR _far
-00160 #  endif
-00161 #endif
-00162 
-00163 /* Compile with -DZLIB_DLL for Windows DLL support */
-00164 #if defined(ZLIB_DLL)
-00165 #  if defined(_WINDOWS) || defined(WINDOWS)
-00166 #    ifdef FAR
-00167 #      undef FAR
-00168 #    endif
-00169 #    include <windows.h>
-00170 #    define ZEXPORT  WINAPI
-00171 #    ifdef WIN32
-00172 #      define ZEXPORTVA  WINAPIV
-00173 #    else
-00174 #      define ZEXPORTVA  FAR _cdecl _export
-00175 #    endif
-00176 #  endif
-00177 #  if defined (__BORLANDC__)
-00178 #    if (__BORLANDC__ >= 0x0500) && defined (WIN32)
-00179 #      include <windows.h>
-00180 #      define ZEXPORT __declspec(dllexport) WINAPI
-00181 #      define ZEXPORTRVA __declspec(dllexport) WINAPIV
-00182 #    else
-00183 #      if defined (_Windows) && defined (__DLL__)
-00184 #        define ZEXPORT _export
-00185 #        define ZEXPORTVA _export
-00186 #      endif
-00187 #    endif
-00188 #  endif
-00189 #endif
-00190 
-00191 #if defined (__BEOS__)
-00192 #  if defined (ZLIB_DLL)
-00193 #    define ZEXTERN extern __declspec(dllexport)
-00194 #  else
-00195 #    define ZEXTERN extern __declspec(dllimport)
-00196 #  endif
-00197 #endif
-00198 
-00199 #ifndef ZEXPORT
-00200 #  define ZEXPORT
-00201 #endif
-00202 #ifndef ZEXPORTVA
-00203 #  define ZEXPORTVA
-00204 #endif
-00205 #ifndef ZEXTERN
-00206 #  define ZEXTERN extern
-00207 #endif
-00208 
-00209 #ifndef FAR
-00210 #   define FAR
-00211 #endif
-00212 
-00213 #if !defined(MACOS) && !defined(TARGET_OS_MAC) && !defined(VCL)
-00214 typedef unsigned char  Byte;  /* 8 bits */
-00215 #endif
-00216 typedef unsigned int   uInt;  /* 16 bits or more */
-00217 typedef unsigned long  uLong; /* 32 bits or more */
-00218 
-00219 #ifdef SMALL_MEDIUM
-00220    /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
-00221 #  define Bytef Byte FAR
-00222 #else
-00223    typedef Byte  FAR Bytef;
-00224 #endif
-00225 typedef char  FAR charf;
-00226 typedef int   FAR intf;
-00227 typedef uInt  FAR uIntf;
-00228 typedef uLong FAR uLongf;
-00229 
-00230 #ifdef STDC
-00231    typedef void FAR *voidpf;
-00232    typedef void     *voidp;
-00233 #else
-00234    typedef Byte FAR *voidpf;
-00235    typedef Byte     *voidp;
-00236 #endif
-00237 
-00238 #ifdef HAVE_UNISTD_H
-00239 #  include <sys/types.h> /* for off_t */
-00240 #  include <unistd.h>    /* for SEEK_* and off_t */
-00241 #  define z_off_t  off_t
-00242 #endif
-00243 #ifndef SEEK_SET
-00244 #  define SEEK_SET        0       /* Seek from beginning of file.  */
-00245 #  define SEEK_CUR        1       /* Seek from current position.  */
-00246 #  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
-00247 #endif
-00248 #ifndef z_off_t
-00249 #  define  z_off_t long
-00250 #endif
-00251 
-00252 /* MVS linker does not support external names larger than 8 bytes */
-00253 #if defined(__MVS__)
-00254 #   pragma map(deflateInit_,"DEIN")
-00255 #   pragma map(deflateInit2_,"DEIN2")
-00256 #   pragma map(deflateEnd,"DEEND")
-00257 #   pragma map(inflateInit_,"ININ")
-00258 #   pragma map(inflateInit2_,"ININ2")
-00259 #   pragma map(inflateEnd,"INEND")
-00260 #   pragma map(inflateSync,"INSY")
-00261 #   pragma map(inflateSetDictionary,"INSEDI")
-00262 #   pragma map(inflate_blocks,"INBL")
-00263 #   pragma map(inflate_blocks_new,"INBLNE")
-00264 #   pragma map(inflate_blocks_free,"INBLFR")
-00265 #   pragma map(inflate_blocks_reset,"INBLRE")
-00266 #   pragma map(inflate_codes_free,"INCOFR")
-00267 #   pragma map(inflate_codes,"INCO")
-00268 #   pragma map(inflate_fast,"INFA")
-00269 #   pragma map(inflate_flush,"INFLU")
-00270 #   pragma map(inflate_mask,"INMA")
-00271 #   pragma map(inflate_set_dictionary,"INSEDI2")
-00272 #   pragma map(inflate_copyright,"INCOPY")
-00273 #   pragma map(inflate_trees_bits,"INTRBI")
-00274 #   pragma map(inflate_trees_dynamic,"INTRDY")
-00275 #   pragma map(inflate_trees_fixed,"INTRFI")
-00276 #   pragma map(inflate_trees_free,"INTRFR")
-00277 #endif
-00278 
-00279 #endif /* _ZCONF_H */
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/zipcomprs_8cpp-source.html b/doc/api-documentation/html/zipcomprs_8cpp-source.html deleted file mode 100644 index 91e157e..0000000 --- a/doc/api-documentation/html/zipcomprs_8cpp-source.html +++ /dev/null @@ -1,172 +0,0 @@ - - -zipcomprs.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

zipcomprs.cpp

00001 /******************************************************************************
-00002  *  swcomprs.cpp   - code for class 'ZipCompress'- a driver class that provides
-00003  *                              compression utilities. - using zlib
-00004  */
-00005 
-00006 #include <string.h>
-00007 #include <string>
-00008 #include <stdlib.h>
-00009 #include <stdio.h>
-00010 #include <zipcomprs.h>
-00011 #include <zlib.h>
-00012 
-00013 /******************************************************************************
-00014  * ZipCompress Constructor - Initializes data for instance of ZipCompress
-00015  *
-00016  */
-00017 
-00018 ZipCompress::ZipCompress() : SWCompress()
-00019 {
-00020 //      fprintf(stderr, "init compress\n");
-00021 }
-00022 
-00023 
-00024 /******************************************************************************
-00025  * ZipCompress Destructor - Cleans up instance of ZipCompress
-00026  */
-00027 
-00028 ZipCompress::~ZipCompress() {
-00029 }
-00030 
-00031 
-00032 /******************************************************************************
-00033  * ZipCompress::Encode  - This function "encodes" the input stream into the
-00034  *                                              output stream.
-00035  *                                              The GetChars() and SendChars() functions are
-00036  *                                              used to separate this method from the actual
-00037  *                                              i/o.
-00038  *              NOTE:                   must set zlen for parent class to know length of
-00039  *                                              compressed buffer.
-00040  */
-00041 
-00042 void ZipCompress::Encode(void)
-00043 {
-00044 /*
-00045 ZEXTERN int ZEXPORT compress OF((Bytef *dest,   uLongf *destLen,
-00046                                  const Bytef *source, uLong sourceLen));
-00047      Compresses the source buffer into the destination buffer.  sourceLen is
-00048    the byte length of the source buffer. Upon entry, destLen is the total
-00049    size of the destination buffer, which must be at least 0.1% larger than
-00050    sourceLen plus 12 bytes. Upon exit, destLen is the actual size of the
-00051    compressed buffer.
-00052      This function can be used to compress a whole file at once if the
-00053    input file is mmap'ed.
-00054      compress returns Z_OK if success, Z_MEM_ERROR if there was not
-00055    enough memory, Z_BUF_ERROR if there was not enough room in the output
-00056    buffer.
-00057 */
-00058         direct = 0;     // set direction needed by parent [Get|Send]Chars()
-00059 
-00060         // get buffer
-00061         char chunk[1024];
-00062         char *buf = (char *)calloc(1, 1024);
-00063         char *chunkbuf = buf;
-00064         unsigned long chunklen;
-00065         unsigned long len = 0;
-00066         while((chunklen = GetChars(chunk, 1023))) {
-00067                 memcpy(chunkbuf, chunk, chunklen);
-00068                 len += chunklen;
-00069                 if (chunklen < 1023)
-00070                         break;
-00071                 else    buf = (char *)realloc(buf, len + 1024);
-00072                 chunkbuf = buf+len;
-00073         }
-00074 
-00075 
-00076         zlen = (long) (len*1.001)+15;
-00077         char *zbuf = new char[zlen+1];
-00078         if (len)
-00079         {
-00080                 //printf("Doing compress\n");
-00081                 if (compress((Bytef*)zbuf, &zlen, (const Bytef*)buf, len)!=Z_OK)
-00082                 {
-00083                         printf("ERROR in compression\n");
-00084                 }
-00085                 else {
-00086                         SendChars(zbuf, zlen);
-00087                 }
-00088         }
-00089         else
-00090         {
-00091                 fprintf(stderr, "No buffer to compress\n");
-00092         }
-00093         delete [] zbuf;
-00094         free (buf);
-00095 }
-00096 
-00097 
-00098 /******************************************************************************
-00099  * ZipCompress::Decode  - This function "decodes" the input stream into the
-00100  *                                              output stream.
-00101  *                                              The GetChars() and SendChars() functions are
-00102  *                                              used to separate this method from the actual
-00103  *                                              i/o.
-00104  */
-00105 
-00106 void ZipCompress::Decode(void)
-00107 {
-00108 /*
-00109 ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
-00110                                    const Bytef *source, uLong sourceLen));
-00111      Decompresses the source buffer into the destination buffer.  sourceLen is
-00112    the byte length of the source buffer. Upon entry, destLen is the total
-00113    size of the destination buffer, which must be large enough to hold the
-00114    entire uncompressed data. (The size of the uncompressed data must have
-00115    been saved previously by the compressor and transmitted to the decompressor
-00116    by some mechanism outside the scope of this compression library.)
-00117    Upon exit, destLen is the actual size of the compressed buffer.
-00118      This function can be used to decompress a whole file at once if the
-00119    input file is mmap'ed.
-00120 
-00121      uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
-00122    enough memory, Z_BUF_ERROR if there was not enough room in the output
-00123    buffer, or Z_DATA_ERROR if the input data was corrupted.
-00124 */
-00125 
-00126         // get buffer
-00127         char chunk[1024];
-00128         char *zbuf = (char *)calloc(1, 1024);
-00129         char *chunkbuf = zbuf;
-00130         int chunklen;
-00131         unsigned long zlen = 0;
-00132         while((chunklen = GetChars(chunk, 1023))) {
-00133                 memcpy(chunkbuf, chunk, chunklen);
-00134                 zlen += chunklen;
-00135                 if (chunklen < 1023)
-00136                         break;
-00137                 else    zbuf = (char *)realloc(zbuf, zlen + 1024);
-00138                 chunkbuf = zbuf + zlen;
-00139         }
-00140 
-00141         //printf("Decoding complength{%ld} uncomp{%ld}\n", zlen, blen);
-00142         if (zlen) {
-00143                 unsigned long blen = zlen*20;   // trust compression is less than 1000%
-00144                 char *buf = new char[blen]; 
-00145                 //printf("Doing decompress {%s}\n", zbuf);
-00146                 if (uncompress((Bytef*)buf, &blen, (Bytef*)zbuf, zlen) != Z_OK) {
-00147                         fprintf(stderr, "no room in outbuffer to during decompression. see zipcomp.cpp\n");
-00148                 }
-00149                 SendChars(buf, blen);
-00150                 delete [] buf;
-00151                 slen = blen;
-00152         }
-00153         else {
-00154                 fprintf(stderr, "No buffer to decompress!\n");
-00155         }
-00156         //printf("Finished decoding\n");
-00157         free (zbuf);
-00158 }
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/zipcomprs_8h-source.html b/doc/api-documentation/html/zipcomprs_8h-source.html deleted file mode 100644 index 04fdcdb..0000000 --- a/doc/api-documentation/html/zipcomprs_8h-source.html +++ /dev/null @@ -1,53 +0,0 @@ - - -zipcomprs.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

zipcomprs.h

00001 /******************************************************************************
-00002  *  swcomprs.h   - definition of Class SWCompress used for data compression
-00003  *
-00004  * $Id: zipcomprs_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00005  *
-00006  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00007  *      CrossWire Bible Society
-00008  *      P. O. Box 2528
-00009  *      Tempe, AZ  85280-2528
-00010  *
-00011  * This program is free software; you can redistribute it and/or modify it
-00012  * under the terms of the GNU General Public License as published by the
-00013  * Free Software Foundation version 2.
-00014  *
-00015  * This program is distributed in the hope that it will be useful, but
-00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00018  * General Public License for more details.
-00019  *
-00020  */
-00021 
-00022 #ifndef ZIPCOMPRS_H
-00023 #define ZIPCOMPRS_H
-00024 
-00025 #include <swcomprs.h>
-00026 
-00027 #include <defs.h>
-00028 
-00029 class SWDLLEXPORT ZipCompress:public SWCompress
-00030 {
-00031 protected:
-00032 public:
-00033   ZipCompress ();
-00034   virtual ~ ZipCompress ();
-00035   virtual void Encode (void);
-00036   virtual void Decode (void);
-00037 };
-00038 
-00039 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/zld_8cpp-source.html b/doc/api-documentation/html/zld_8cpp-source.html deleted file mode 100644 index d069c6b..0000000 --- a/doc/api-documentation/html/zld_8cpp-source.html +++ /dev/null @@ -1,219 +0,0 @@ - - -zld.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

zld.cpp

00001 /******************************************************************************
-00002  *  rawld.cpp - code for class 'RawLD'- a module that reads raw lexicon and
-00003  *                              dictionary files: *.dat *.idx
-00004  */
-00005 
-00006 
-00007 #include <ctype.h>
-00008 #include <stdio.h>
-00009 #include <fcntl.h>
-00010 
-00011 #ifndef __GNUC__
-00012 #include <io.h>
-00013 #else
-00014 #include <unistd.h>
-00015 #endif
-00016 
-00017 #include <string.h>
-00018 #include <utilfuns.h>
-00019 #include <zstr.h>
-00020 #include <zld.h>
-00021 
-00022 
-00023  /******************************************************************************
-00024  * RawLD Constructor - Initializes data for instance of RawLD
-00025  *
-00026  * ENT: ipath   - path and filename of files (no extension)
-00027  *              iname   - Internal name for module
-00028  *              idesc   - Name to display to user for module
-00029  *              idisp   - Display object to use for displaying
-00030  */
-00031 
-00032 zLD::zLD(const char *ipath, const char *iname, const char *idesc, long blockCount, SWCompress *icomp, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang) : zStr(ipath, -1, blockCount, icomp), SWLD(iname, idesc, idisp, enc, dir, mark, ilang)
-00033 {
-00034 }
-00035 
-00036 
-00037 /******************************************************************************
-00038  * RawLD Destructor - Cleans up instance of RawLD
-00039  */
-00040 
-00041 zLD::~zLD()
-00042 {
-00043 }
-00044 
-00045 
-00046 /******************************************************************************
-00047  * zLD::strongsPad      - Pads a key if it is 100% digits to 5 places
-00048  *
-00049  * ENT: buf -   buffer to check and pad
-00050  */
-00051 
-00052 void zLD::strongsPad(char *buf)
-00053 {
-00054         const char *check;
-00055         long size = 0;
-00056         int len = strlen(buf);
-00057         if ((len < 5) && (len > 0)) {
-00058                 for (check = buf; *check; check++) {
-00059                         if (!isdigit(*check))
-00060                                 break;
-00061                         else size++;
-00062                 }
-00063 
-00064                 if ((size == len) && size) 
-00065                         sprintf(buf, "%.5d", atoi(buf));
-00066         }
-00067 }
-00068 
-00069 
-00070 /******************************************************************************
-00071  * zLD::getEntry        - Looks up entry from data file.  'Snaps' to closest
-00072  *                              entry and sets 'entrybuf'.
-00073  *
-00074  * ENT: away - number of entries offset from key (default = 0)
-00075  *
-00076  * RET: error status
-00077  */
-00078 
-00079 char zLD::getEntry(long away)
-00080 {
-00081         char *idxbuf = 0;
-00082         char *ebuf = 0;
-00083         char retval = 0;
-00084         long index;
-00085         unsigned long size;
-00086         char *buf = new char [ strlen(*key) + 6 ];
-00087         strcpy(buf, *key);
-00088 
-00089         strongsPad(buf);
-00090 
-00091         *entrybuf = 0;
-00092         if (!(retval = findKeyIndex(buf, &index, away))) {
-00093                 getText(index, &idxbuf, &ebuf);
-00094                 size = strlen(ebuf) + 1;
-00095                 entrybuf = new char [ size * FILTERPAD ];
-00096                 strcpy(entrybuf, ebuf);
-00097 
-00098                 entrySize = size;        // support getEntrySize call
-00099                 if (!key->Persist())                    // If we have our own key
-00100                         *key = idxbuf;                          // reset it to entry index buffer
-00101 
-00102                 stdstr(&entkeytxt, idxbuf);     // set entry key text that module 'snapped' to.
-00103                 free(idxbuf);
-00104                 free(ebuf);
-00105         }
-00106         else {
-00107                 entrybuf = new char [ 5 ];
-00108                 entrybuf[0] = 0;
-00109                 entrybuf[1] = 0;
-00110         }
-00111                 
-00112         delete [] buf;
-00113         return retval;
-00114 }
-00115 
-00116 
-00117 /******************************************************************************
-00118  * zLD::operator char * - Returns the correct entry when char * cast
-00119  *                                                      is requested
-00120  *
-00121  * RET: string buffer with entry
-00122  */
-00123 
-00124 char *zLD::getRawEntry() {
-00125         if (!getEntry() && !isUnicode()) {
-00126                 prepText(entrybuf);
-00127         }
-00128 
-00129         return entrybuf;
-00130 }
-00131 
-00132 
-00133 /******************************************************************************
-00134  * zLD::operator +=     - Increments module key a number of entries
-00135  *
-00136  * ENT: increment       - Number of entries to jump forward
-00137  *
-00138  * RET: *this
-00139  */
-00140 
-00141 SWModule &zLD::operator +=(int increment)
-00142 {
-00143         char tmperror;
-00144 
-00145         if (key->Traversable()) {
-00146                 *key += increment;
-00147                 error = key->Error();
-00148                 increment = 0;
-00149         }
-00150         
-00151         tmperror = (getEntry(increment)) ? KEYERR_OUTOFBOUNDS : 0;
-00152         error = (error)?error:tmperror;
-00153         *key = entkeytxt;
-00154         return *this;
-00155 }
-00156 
-00157 
-00158 /******************************************************************************
-00159  * zLD::operator =(SW_POSITION) - Positions this key if applicable
-00160  */
-00161 
-00162 SWModule &zLD::operator =(SW_POSITION p)
-00163 {
-00164         if (!key->Traversable()) {
-00165                 switch (p) {
-00166                 case POS_TOP:
-00167                         *key = "";
-00168                         break;
-00169                 case POS_BOTTOM:
-00170                         *key = "zzzzzzzzz";
-00171                         break;
-00172                 } 
-00173         }
-00174         else    *key = p;
-00175         return *this;
-00176 }
-00177 
-00178 
-00179 SWModule &zLD::setentry(const char *inbuf, long len) {
-00180         setText(*key, inbuf, len);
-00181 
-00182         return *this;
-00183 }
-00184 
-00185 SWModule &zLD::operator <<(const char *inbuf) {
-00186         return setentry(inbuf, 0);
-00187 }
-00188 
-00189 
-00190 SWModule &zLD::operator <<(const SWKey *inkey) {
-00191         linkEntry(*key, *inkey);
-00192 
-00193         return *this;
-00194 }
-00195 
-00196 
-00197 /******************************************************************************
-00198  * RawFiles::deleteEntry        - deletes this entry
-00199  *
-00200  * RET: *this
-00201  */
-00202 
-00203 void zLD::deleteEntry() {
-00204         setText(*key, "");
-00205 }
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/zld_8h-source.html b/doc/api-documentation/html/zld_8h-source.html deleted file mode 100644 index 59646d1..0000000 --- a/doc/api-documentation/html/zld_8h-source.html +++ /dev/null @@ -1,81 +0,0 @@ - - -zld.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

zld.h

00001 /******************************************************************************
-00002  *  zld.cpp - code for class 'zLD'- a module that reads compressed lexicon and
-00003  *                              dictionary files.
-00004  *
-00005  * $Id: zld_8h-source.html,v 1.3 2002/06/20 20:23:10 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #ifndef ZLD_H
-00024 #define ZLD_H
-00025 
-00026 #include <zstr.h>
-00027 #include <swld.h>
-00028 
-00029 #include <defs.h>
-00030 
-00031 class SWDLLEXPORT zLD:public zStr, public SWLD {
-00032 
-00033         void strongsPad (char *buf);
-00034         char getEntry (long away = 0);
-00035 
-00036 public:
-00037 
-00038 
-00039         zLD(const char *ipath, const char *iname = 0, const char *idesc = 0, long blockCount = 200, SWCompress *icomp = 0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN,
-00040         const char* ilang = 0);
-00041         virtual ~zLD();
-00042         virtual char *getRawEntry();
-00043 
-00044         virtual SWModule & operator =(SW_POSITION pos);
-00045         virtual SWModule & operator +=(int increment);
-00046         virtual SWModule & operator -=(int decrement) {
-00047                 return this->operator +=(-decrement);
-00048         }
-00049         // write interface ----------------------------
-00050         virtual bool isWritable () { return ((idxfd->getFd() > 0) && ((idxfd->mode & O_RDWR) == O_RDWR)); }
-00051         static char createModule (const char *path) {
-00052                 return zStr::createModule (path);
-00053         }
-00054 
-00055         virtual SWModule & setentry (const char *inbuf, long len);      // Modify current module entry
-00056         virtual SWModule & operator << (const char *inbuf);     // Modify current module entry
-00057         virtual SWModule & operator << (const SWKey * linkKey); // Link current module entry to other module entry
-00058         virtual void deleteEntry ();    // Delete current module entry
-00059         // end write interface ------------------------
-00060   
-00061         // swcacher interface ----------------------
-00062         virtual void flush() { flushCache(); }
-00063         // end swcacher interface ----------------------
-00064 };
-00065 
-00066 
-00067 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/zlib_8h-source.html b/doc/api-documentation/html/zlib_8h-source.html deleted file mode 100644 index 39ecb6b..0000000 --- a/doc/api-documentation/html/zlib_8h-source.html +++ /dev/null @@ -1,907 +0,0 @@ - - -zlib.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

zlib.h

00001 /* zlib.h -- interface of the 'zlib' general purpose compression library
-00002   version 1.1.3, July 9th, 1998
-00003 
-00004   Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler
-00005 
-00006   This software is provided 'as-is', without any express or implied
-00007   warranty.  In no event will the authors be held liable for any damages
-00008   arising from the use of this software.
-00009 
-00010   Permission is granted to anyone to use this software for any purpose,
-00011   including commercial applications, and to alter it and redistribute it
-00012   freely, subject to the following restrictions:
-00013 
-00014   1. The origin of this software must not be misrepresented; you must not
-00015      claim that you wrote the original software. If you use this software
-00016      in a product, an acknowledgment in the product documentation would be
-00017      appreciated but is not required.
-00018   2. Altered source versions must be plainly marked as such, and must not be
-00019      misrepresented as being the original software.
-00020   3. This notice may not be removed or altered from any source distribution.
-00021 
-00022   Jean-loup Gailly        Mark Adler
-00023   jloup@gzip.org          madler@alumni.caltech.edu
-00024 
-00025 
-00026   The data format used by the zlib library is described by RFCs (Request for
-00027   Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt
-00028   (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
-00029 */
-00030 
-00031 #ifndef _ZLIB_H
-00032 #define _ZLIB_H
-00033 
-00034 #include "zconf.h"
-00035 
-00036 #ifdef __cplusplus
-00037 extern "C" {
-00038 #endif
-00039 
-00040 #define ZLIB_VERSION "1.1.3"
-00041 
-00042 /* 
-00043      The 'zlib' compression library provides in-memory compression and
-00044   decompression functions, including integrity checks of the uncompressed
-00045   data.  This version of the library supports only one compression method
-00046   (deflation) but other algorithms will be added later and will have the same
-00047   stream interface.
-00048 
-00049      Compression can be done in a single step if the buffers are large
-00050   enough (for example if an input file is mmap'ed), or can be done by
-00051   repeated calls of the compression function.  In the latter case, the
-00052   application must provide more input and/or consume the output
-00053   (providing more output space) before each call.
-00054 
-00055      The library also supports reading and writing files in gzip (.gz) format
-00056   with an interface similar to that of stdio.
-00057 
-00058      The library does not install any signal handler. The decoder checks
-00059   the consistency of the compressed data, so the library should never
-00060   crash even in case of corrupted input.
-00061 */
-00062 
-00063 typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
-00064 typedef void   (*free_func)  OF((voidpf opaque, voidpf address));
-00065 
-00066 struct internal_state;
-00067 
-00068 typedef struct z_stream_s {
-00069     Bytef    *next_in;  /* next input byte */
-00070     uInt     avail_in;  /* number of bytes available at next_in */
-00071     uLong    total_in;  /* total nb of input bytes read so far */
-00072 
-00073     Bytef    *next_out; /* next output byte should be put there */
-00074     uInt     avail_out; /* remaining free space at next_out */
-00075     uLong    total_out; /* total nb of bytes output so far */
-00076 
-00077     char     *msg;      /* last error message, NULL if no error */
-00078     struct internal_state FAR *state; /* not visible by applications */
-00079 
-00080     alloc_func zalloc;  /* used to allocate the internal state */
-00081     free_func  zfree;   /* used to free the internal state */
-00082     voidpf     opaque;  /* private data object passed to zalloc and zfree */
-00083 
-00084     int     data_type;  /* best guess about the data type: ascii or binary */
-00085     uLong   adler;      /* adler32 value of the uncompressed data */
-00086     uLong   reserved;   /* reserved for future use */
-00087 } z_stream;
-00088 
-00089 typedef z_stream FAR *z_streamp;
-00090 
-00091 /*
-00092    The application must update next_in and avail_in when avail_in has
-00093    dropped to zero. It must update next_out and avail_out when avail_out
-00094    has dropped to zero. The application must initialize zalloc, zfree and
-00095    opaque before calling the init function. All other fields are set by the
-00096    compression library and must not be updated by the application.
-00097 
-00098    The opaque value provided by the application will be passed as the first
-00099    parameter for calls of zalloc and zfree. This can be useful for custom
-00100    memory management. The compression library attaches no meaning to the
-00101    opaque value.
-00102 
-00103    zalloc must return Z_NULL if there is not enough memory for the object.
-00104    If zlib is used in a multi-threaded application, zalloc and zfree must be
-00105    thread safe.
-00106 
-00107    On 16-bit systems, the functions zalloc and zfree must be able to allocate
-00108    exactly 65536 bytes, but will not be required to allocate more than this
-00109    if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
-00110    pointers returned by zalloc for objects of exactly 65536 bytes *must*
-00111    have their offset normalized to zero. The default allocation function
-00112    provided by this library ensures this (see zutil.c). To reduce memory
-00113    requirements and avoid any allocation of 64K objects, at the expense of
-00114    compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
-00115 
-00116    The fields total_in and total_out can be used for statistics or
-00117    progress reports. After compression, total_in holds the total size of
-00118    the uncompressed data and may be saved for use in the decompressor
-00119    (particularly if the decompressor wants to decompress everything in
-00120    a single step).
-00121 */
-00122 
-00123                         /* constants */
-00124 
-00125 #define Z_NO_FLUSH      0
-00126 #define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */
-00127 #define Z_SYNC_FLUSH    2
-00128 #define Z_FULL_FLUSH    3
-00129 #define Z_FINISH        4
-00130 /* Allowed flush values; see deflate() below for details */
-00131 
-00132 #define Z_OK            0
-00133 #define Z_STREAM_END    1
-00134 #define Z_NEED_DICT     2
-00135 #define Z_ERRNO        (-1)
-00136 #define Z_STREAM_ERROR (-2)
-00137 #define Z_DATA_ERROR   (-3)
-00138 #define Z_MEM_ERROR    (-4)
-00139 #define Z_BUF_ERROR    (-5)
-00140 #define Z_VERSION_ERROR (-6)
-00141 /* Return codes for the compression/decompression functions. Negative
-00142  * values are errors, positive values are used for special but normal events.
-00143  */
-00144 
-00145 #define Z_NO_COMPRESSION         0
-00146 #define Z_BEST_SPEED             1
-00147 #define Z_BEST_COMPRESSION       9
-00148 #define Z_DEFAULT_COMPRESSION  (-1)
-00149 /* compression levels */
-00150 
-00151 #define Z_FILTERED            1
-00152 #define Z_HUFFMAN_ONLY        2
-00153 #define Z_DEFAULT_STRATEGY    0
-00154 /* compression strategy; see deflateInit2() below for details */
-00155 
-00156 #define Z_BINARY   0
-00157 #define Z_ASCII    1
-00158 #define Z_UNKNOWN  2
-00159 /* Possible values of the data_type field */
-00160 
-00161 #define Z_DEFLATED   8
-00162 /* The deflate compression method (the only one supported in this version) */
-00163 
-00164 #define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
-00165 
-00166 #define zlib_version zlibVersion()
-00167 /* for compatibility with versions < 1.0.2 */
-00168 
-00169                         /* basic functions */
-00170 
-00171 ZEXTERN const char * ZEXPORT zlibVersion OF((void));
-00172 /* The application can compare zlibVersion and ZLIB_VERSION for consistency.
-00173    If the first character differs, the library code actually used is
-00174    not compatible with the zlib.h header file used by the application.
-00175    This check is automatically made by deflateInit and inflateInit.
-00176  */
-00177 
-00178 /* 
-00179 ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
-00180 
-00181      Initializes the internal stream state for compression. The fields
-00182    zalloc, zfree and opaque must be initialized before by the caller.
-00183    If zalloc and zfree are set to Z_NULL, deflateInit updates them to
-00184    use default allocation functions.
-00185 
-00186      The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
-00187    1 gives best speed, 9 gives best compression, 0 gives no compression at
-00188    all (the input data is simply copied a block at a time).
-00189    Z_DEFAULT_COMPRESSION requests a default compromise between speed and
-00190    compression (currently equivalent to level 6).
-00191 
-00192      deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not
-00193    enough memory, Z_STREAM_ERROR if level is not a valid compression level,
-00194    Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
-00195    with the version assumed by the caller (ZLIB_VERSION).
-00196    msg is set to null if there is no error message.  deflateInit does not
-00197    perform any compression: this will be done by deflate().
-00198 */
-00199 
-00200 
-00201 ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
-00202 /*
-00203     deflate compresses as much data as possible, and stops when the input
-00204   buffer becomes empty or the output buffer becomes full. It may introduce some
-00205   output latency (reading input without producing any output) except when
-00206   forced to flush.
-00207 
-00208     The detailed semantics are as follows. deflate performs one or both of the
-00209   following actions:
-00210 
-00211   - Compress more input starting at next_in and update next_in and avail_in
-00212     accordingly. If not all input can be processed (because there is not
-00213     enough room in the output buffer), next_in and avail_in are updated and
-00214     processing will resume at this point for the next call of deflate().
-00215 
-00216   - Provide more output starting at next_out and update next_out and avail_out
-00217     accordingly. This action is forced if the parameter flush is non zero.
-00218     Forcing flush frequently degrades the compression ratio, so this parameter
-00219     should be set only when necessary (in interactive applications).
-00220     Some output may be provided even if flush is not set.
-00221 
-00222   Before the call of deflate(), the application should ensure that at least
-00223   one of the actions is possible, by providing more input and/or consuming
-00224   more output, and updating avail_in or avail_out accordingly; avail_out
-00225   should never be zero before the call. The application can consume the
-00226   compressed output when it wants, for example when the output buffer is full
-00227   (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK
-00228   and with zero avail_out, it must be called again after making room in the
-00229   output buffer because there might be more output pending.
-00230 
-00231     If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
-00232   flushed to the output buffer and the output is aligned on a byte boundary, so
-00233   that the decompressor can get all input data available so far. (In particular
-00234   avail_in is zero after the call if enough output space has been provided
-00235   before the call.)  Flushing may degrade compression for some compression
-00236   algorithms and so it should be used only when necessary.
-00237 
-00238     If flush is set to Z_FULL_FLUSH, all output is flushed as with
-00239   Z_SYNC_FLUSH, and the compression state is reset so that decompression can
-00240   restart from this point if previous compressed data has been damaged or if
-00241   random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
-00242   the compression.
-00243 
-00244     If deflate returns with avail_out == 0, this function must be called again
-00245   with the same value of the flush parameter and more output space (updated
-00246   avail_out), until the flush is complete (deflate returns with non-zero
-00247   avail_out).
-00248 
-00249     If the parameter flush is set to Z_FINISH, pending input is processed,
-00250   pending output is flushed and deflate returns with Z_STREAM_END if there
-00251   was enough output space; if deflate returns with Z_OK, this function must be
-00252   called again with Z_FINISH and more output space (updated avail_out) but no
-00253   more input data, until it returns with Z_STREAM_END or an error. After
-00254   deflate has returned Z_STREAM_END, the only possible operations on the
-00255   stream are deflateReset or deflateEnd.
-00256   
-00257     Z_FINISH can be used immediately after deflateInit if all the compression
-00258   is to be done in a single step. In this case, avail_out must be at least
-00259   0.1% larger than avail_in plus 12 bytes.  If deflate does not return
-00260   Z_STREAM_END, then it must be called again as described above.
-00261 
-00262     deflate() sets strm->adler to the adler32 checksum of all input read
-00263   so far (that is, total_in bytes).
-00264 
-00265     deflate() may update data_type if it can make a good guess about
-00266   the input data type (Z_ASCII or Z_BINARY). In doubt, the data is considered
-00267   binary. This field is only for information purposes and does not affect
-00268   the compression algorithm in any manner.
-00269 
-00270     deflate() returns Z_OK if some progress has been made (more input
-00271   processed or more output produced), Z_STREAM_END if all input has been
-00272   consumed and all output has been produced (only when flush is set to
-00273   Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
-00274   if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible
-00275   (for example avail_in or avail_out was zero).
-00276 */
-00277 
-00278 
-00279 ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
-00280 /*
-00281      All dynamically allocated data structures for this stream are freed.
-00282    This function discards any unprocessed input and does not flush any
-00283    pending output.
-00284 
-00285      deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
-00286    stream state was inconsistent, Z_DATA_ERROR if the stream was freed
-00287    prematurely (some input or output was discarded). In the error case,
-00288    msg may be set but then points to a static string (which must not be
-00289    deallocated).
-00290 */
-00291 
-00292 
-00293 /* 
-00294 ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
-00295 
-00296      Initializes the internal stream state for decompression. The fields
-00297    next_in, avail_in, zalloc, zfree and opaque must be initialized before by
-00298    the caller. If next_in is not Z_NULL and avail_in is large enough (the exact
-00299    value depends on the compression method), inflateInit determines the
-00300    compression method from the zlib header and allocates all data structures
-00301    accordingly; otherwise the allocation will be deferred to the first call of
-00302    inflate.  If zalloc and zfree are set to Z_NULL, inflateInit updates them to
-00303    use default allocation functions.
-00304 
-00305      inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
-00306    memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
-00307    version assumed by the caller.  msg is set to null if there is no error
-00308    message. inflateInit does not perform any decompression apart from reading
-00309    the zlib header if present: this will be done by inflate().  (So next_in and
-00310    avail_in may be modified, but next_out and avail_out are unchanged.)
-00311 */
-00312 
-00313 
-00314 ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
-00315 /*
-00316     inflate decompresses as much data as possible, and stops when the input
-00317   buffer becomes empty or the output buffer becomes full. It may some
-00318   introduce some output latency (reading input without producing any output)
-00319   except when forced to flush.
-00320 
-00321   The detailed semantics are as follows. inflate performs one or both of the
-00322   following actions:
-00323 
-00324   - Decompress more input starting at next_in and update next_in and avail_in
-00325     accordingly. If not all input can be processed (because there is not
-00326     enough room in the output buffer), next_in is updated and processing
-00327     will resume at this point for the next call of inflate().
-00328 
-00329   - Provide more output starting at next_out and update next_out and avail_out
-00330     accordingly.  inflate() provides as much output as possible, until there
-00331     is no more input data or no more space in the output buffer (see below
-00332     about the flush parameter).
-00333 
-00334   Before the call of inflate(), the application should ensure that at least
-00335   one of the actions is possible, by providing more input and/or consuming
-00336   more output, and updating the next_* and avail_* values accordingly.
-00337   The application can consume the uncompressed output when it wants, for
-00338   example when the output buffer is full (avail_out == 0), or after each
-00339   call of inflate(). If inflate returns Z_OK and with zero avail_out, it
-00340   must be called again after making room in the output buffer because there
-00341   might be more output pending.
-00342 
-00343     If the parameter flush is set to Z_SYNC_FLUSH, inflate flushes as much
-00344   output as possible to the output buffer. The flushing behavior of inflate is
-00345   not specified for values of the flush parameter other than Z_SYNC_FLUSH
-00346   and Z_FINISH, but the current implementation actually flushes as much output
-00347   as possible anyway.
-00348 
-00349     inflate() should normally be called until it returns Z_STREAM_END or an
-00350   error. However if all decompression is to be performed in a single step
-00351   (a single call of inflate), the parameter flush should be set to
-00352   Z_FINISH. In this case all pending input is processed and all pending
-00353   output is flushed; avail_out must be large enough to hold all the
-00354   uncompressed data. (The size of the uncompressed data may have been saved
-00355   by the compressor for this purpose.) The next operation on this stream must
-00356   be inflateEnd to deallocate the decompression state. The use of Z_FINISH
-00357   is never required, but can be used to inform inflate that a faster routine
-00358   may be used for the single inflate() call.
-00359 
-00360      If a preset dictionary is needed at this point (see inflateSetDictionary
-00361   below), inflate sets strm-adler to the adler32 checksum of the
-00362   dictionary chosen by the compressor and returns Z_NEED_DICT; otherwise 
-00363   it sets strm->adler to the adler32 checksum of all output produced
-00364   so far (that is, total_out bytes) and returns Z_OK, Z_STREAM_END or
-00365   an error code as described below. At the end of the stream, inflate()
-00366   checks that its computed adler32 checksum is equal to that saved by the
-00367   compressor and returns Z_STREAM_END only if the checksum is correct.
-00368 
-00369     inflate() returns Z_OK if some progress has been made (more input processed
-00370   or more output produced), Z_STREAM_END if the end of the compressed data has
-00371   been reached and all uncompressed output has been produced, Z_NEED_DICT if a
-00372   preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
-00373   corrupted (input stream not conforming to the zlib format or incorrect
-00374   adler32 checksum), Z_STREAM_ERROR if the stream structure was inconsistent
-00375   (for example if next_in or next_out was NULL), Z_MEM_ERROR if there was not
-00376   enough memory, Z_BUF_ERROR if no progress is possible or if there was not
-00377   enough room in the output buffer when Z_FINISH is used. In the Z_DATA_ERROR
-00378   case, the application may then call inflateSync to look for a good
-00379   compression block.
-00380 */
-00381 
-00382 
-00383 ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
-00384 /*
-00385      All dynamically allocated data structures for this stream are freed.
-00386    This function discards any unprocessed input and does not flush any
-00387    pending output.
-00388 
-00389      inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
-00390    was inconsistent. In the error case, msg may be set but then points to a
-00391    static string (which must not be deallocated).
-00392 */
-00393 
-00394                         /* Advanced functions */
-00395 
-00396 /*
-00397     The following functions are needed only in some special applications.
-00398 */
-00399 
-00400 /*   
-00401 ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
-00402                                      int  level,
-00403                                      int  method,
-00404                                      int  windowBits,
-00405                                      int  memLevel,
-00406                                      int  strategy));
-00407 
-00408      This is another version of deflateInit with more compression options. The
-00409    fields next_in, zalloc, zfree and opaque must be initialized before by
-00410    the caller.
-00411 
-00412      The method parameter is the compression method. It must be Z_DEFLATED in
-00413    this version of the library.
-00414 
-00415      The windowBits parameter is the base two logarithm of the window size
-00416    (the size of the history buffer).  It should be in the range 8..15 for this
-00417    version of the library. Larger values of this parameter result in better
-00418    compression at the expense of memory usage. The default value is 15 if
-00419    deflateInit is used instead.
-00420 
-00421      The memLevel parameter specifies how much memory should be allocated
-00422    for the internal compression state. memLevel=1 uses minimum memory but
-00423    is slow and reduces compression ratio; memLevel=9 uses maximum memory
-00424    for optimal speed. The default value is 8. See zconf.h for total memory
-00425    usage as a function of windowBits and memLevel.
-00426 
-00427      The strategy parameter is used to tune the compression algorithm. Use the
-00428    value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
-00429    filter (or predictor), or Z_HUFFMAN_ONLY to force Huffman encoding only (no
-00430    string match).  Filtered data consists mostly of small values with a
-00431    somewhat random distribution. In this case, the compression algorithm is
-00432    tuned to compress them better. The effect of Z_FILTERED is to force more
-00433    Huffman coding and less string matching; it is somewhat intermediate
-00434    between Z_DEFAULT and Z_HUFFMAN_ONLY. The strategy parameter only affects
-00435    the compression ratio but not the correctness of the compressed output even
-00436    if it is not set appropriately.
-00437 
-00438       deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-00439    memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid
-00440    method). msg is set to null if there is no error message.  deflateInit2 does
-00441    not perform any compression: this will be done by deflate().
-00442 */
-00443                             
-00444 ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
-00445                                              const Bytef *dictionary,
-00446                                              uInt  dictLength));
-00447 /*
-00448      Initializes the compression dictionary from the given byte sequence
-00449    without producing any compressed output. This function must be called
-00450    immediately after deflateInit, deflateInit2 or deflateReset, before any
-00451    call of deflate. The compressor and decompressor must use exactly the same
-00452    dictionary (see inflateSetDictionary).
-00453 
-00454      The dictionary should consist of strings (byte sequences) that are likely
-00455    to be encountered later in the data to be compressed, with the most commonly
-00456    used strings preferably put towards the end of the dictionary. Using a
-00457    dictionary is most useful when the data to be compressed is short and can be
-00458    predicted with good accuracy; the data can then be compressed better than
-00459    with the default empty dictionary.
-00460 
-00461      Depending on the size of the compression data structures selected by
-00462    deflateInit or deflateInit2, a part of the dictionary may in effect be
-00463    discarded, for example if the dictionary is larger than the window size in
-00464    deflate or deflate2. Thus the strings most likely to be useful should be
-00465    put at the end of the dictionary, not at the front.
-00466 
-00467      Upon return of this function, strm->adler is set to the Adler32 value
-00468    of the dictionary; the decompressor may later use this value to determine
-00469    which dictionary has been used by the compressor. (The Adler32 value
-00470    applies to the whole dictionary even if only a subset of the dictionary is
-00471    actually used by the compressor.)
-00472 
-00473      deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
-00474    parameter is invalid (such as NULL dictionary) or the stream state is
-00475    inconsistent (for example if deflate has already been called for this stream
-00476    or if the compression method is bsort). deflateSetDictionary does not
-00477    perform any compression: this will be done by deflate().
-00478 */
-00479 
-00480 ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
-00481                                     z_streamp source));
-00482 /*
-00483      Sets the destination stream as a complete copy of the source stream.
-00484 
-00485      This function can be useful when several compression strategies will be
-00486    tried, for example when there are several ways of pre-processing the input
-00487    data with a filter. The streams that will be discarded should then be freed
-00488    by calling deflateEnd.  Note that deflateCopy duplicates the internal
-00489    compression state which can be quite large, so this strategy is slow and
-00490    can consume lots of memory.
-00491 
-00492      deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
-00493    enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
-00494    (such as zalloc being NULL). msg is left unchanged in both source and
-00495    destination.
-00496 */
-00497 
-00498 ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
-00499 /*
-00500      This function is equivalent to deflateEnd followed by deflateInit,
-00501    but does not free and reallocate all the internal compression state.
-00502    The stream will keep the same compression level and any other attributes
-00503    that may have been set by deflateInit2.
-00504 
-00505       deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
-00506    stream state was inconsistent (such as zalloc or state being NULL).
-00507 */
-00508 
-00509 ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
-00510                                       int level,
-00511                                       int strategy));
-00512 /*
-00513      Dynamically update the compression level and compression strategy.  The
-00514    interpretation of level and strategy is as in deflateInit2.  This can be
-00515    used to switch between compression and straight copy of the input data, or
-00516    to switch to a different kind of input data requiring a different
-00517    strategy. If the compression level is changed, the input available so far
-00518    is compressed with the old level (and may be flushed); the new level will
-00519    take effect only at the next call of deflate().
-00520 
-00521      Before the call of deflateParams, the stream state must be set as for
-00522    a call of deflate(), since the currently available input may have to
-00523    be compressed and flushed. In particular, strm->avail_out must be non-zero.
-00524 
-00525      deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
-00526    stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR
-00527    if strm->avail_out was zero.
-00528 */
-00529 
-00530 /*   
-00531 ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
-00532                                      int  windowBits));
-00533 
-00534      This is another version of inflateInit with an extra parameter. The
-00535    fields next_in, avail_in, zalloc, zfree and opaque must be initialized
-00536    before by the caller.
-00537 
-00538      The windowBits parameter is the base two logarithm of the maximum window
-00539    size (the size of the history buffer).  It should be in the range 8..15 for
-00540    this version of the library. The default value is 15 if inflateInit is used
-00541    instead. If a compressed stream with a larger window size is given as
-00542    input, inflate() will return with the error code Z_DATA_ERROR instead of
-00543    trying to allocate a larger window.
-00544 
-00545       inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-00546    memory, Z_STREAM_ERROR if a parameter is invalid (such as a negative
-00547    memLevel). msg is set to null if there is no error message.  inflateInit2
-00548    does not perform any decompression apart from reading the zlib header if
-00549    present: this will be done by inflate(). (So next_in and avail_in may be
-00550    modified, but next_out and avail_out are unchanged.)
-00551 */
-00552 
-00553 ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
-00554                                              const Bytef *dictionary,
-00555                                              uInt  dictLength));
-00556 /*
-00557      Initializes the decompression dictionary from the given uncompressed byte
-00558    sequence. This function must be called immediately after a call of inflate
-00559    if this call returned Z_NEED_DICT. The dictionary chosen by the compressor
-00560    can be determined from the Adler32 value returned by this call of
-00561    inflate. The compressor and decompressor must use exactly the same
-00562    dictionary (see deflateSetDictionary).
-00563 
-00564      inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
-00565    parameter is invalid (such as NULL dictionary) or the stream state is
-00566    inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
-00567    expected one (incorrect Adler32 value). inflateSetDictionary does not
-00568    perform any decompression: this will be done by subsequent calls of
-00569    inflate().
-00570 */
-00571 
-00572 ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
-00573 /* 
-00574     Skips invalid compressed data until a full flush point (see above the
-00575   description of deflate with Z_FULL_FLUSH) can be found, or until all
-00576   available input is skipped. No output is provided.
-00577 
-00578     inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
-00579   if no more input was provided, Z_DATA_ERROR if no flush point has been found,
-00580   or Z_STREAM_ERROR if the stream structure was inconsistent. In the success
-00581   case, the application may save the current current value of total_in which
-00582   indicates where valid compressed data was found. In the error case, the
-00583   application may repeatedly call inflateSync, providing more input each time,
-00584   until success or end of the input data.
-00585 */
-00586 
-00587 ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
-00588 /*
-00589      This function is equivalent to inflateEnd followed by inflateInit,
-00590    but does not free and reallocate all the internal decompression state.
-00591    The stream will keep attributes that may have been set by inflateInit2.
-00592 
-00593       inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
-00594    stream state was inconsistent (such as zalloc or state being NULL).
-00595 */
-00596 
-00597 
-00598                         /* utility functions */
-00599 
-00600 /*
-00601      The following utility functions are implemented on top of the
-00602    basic stream-oriented functions. To simplify the interface, some
-00603    default options are assumed (compression level and memory usage,
-00604    standard memory allocation functions). The source code of these
-00605    utility functions can easily be modified if you need special options.
-00606 */
-00607 
-00608 ZEXTERN int ZEXPORT compress OF((Bytef *dest,   uLongf *destLen,
-00609                                  const Bytef *source, uLong sourceLen));
-00610 /*
-00611      Compresses the source buffer into the destination buffer.  sourceLen is
-00612    the byte length of the source buffer. Upon entry, destLen is the total
-00613    size of the destination buffer, which must be at least 0.1% larger than
-00614    sourceLen plus 12 bytes. Upon exit, destLen is the actual size of the
-00615    compressed buffer.
-00616      This function can be used to compress a whole file at once if the
-00617    input file is mmap'ed.
-00618      compress returns Z_OK if success, Z_MEM_ERROR if there was not
-00619    enough memory, Z_BUF_ERROR if there was not enough room in the output
-00620    buffer.
-00621 */
-00622 
-00623 ZEXTERN int ZEXPORT compress2 OF((Bytef *dest,   uLongf *destLen,
-00624                                   const Bytef *source, uLong sourceLen,
-00625                                   int level));
-00626 /*
-00627      Compresses the source buffer into the destination buffer. The level
-00628    parameter has the same meaning as in deflateInit.  sourceLen is the byte
-00629    length of the source buffer. Upon entry, destLen is the total size of the
-00630    destination buffer, which must be at least 0.1% larger than sourceLen plus
-00631    12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
-00632 
-00633      compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-00634    memory, Z_BUF_ERROR if there was not enough room in the output buffer,
-00635    Z_STREAM_ERROR if the level parameter is invalid.
-00636 */
-00637 
-00638 ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
-00639                                    const Bytef *source, uLong sourceLen));
-00640 /*
-00641      Decompresses the source buffer into the destination buffer.  sourceLen is
-00642    the byte length of the source buffer. Upon entry, destLen is the total
-00643    size of the destination buffer, which must be large enough to hold the
-00644    entire uncompressed data. (The size of the uncompressed data must have
-00645    been saved previously by the compressor and transmitted to the decompressor
-00646    by some mechanism outside the scope of this compression library.)
-00647    Upon exit, destLen is the actual size of the compressed buffer.
-00648      This function can be used to decompress a whole file at once if the
-00649    input file is mmap'ed.
-00650 
-00651      uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
-00652    enough memory, Z_BUF_ERROR if there was not enough room in the output
-00653    buffer, or Z_DATA_ERROR if the input data was corrupted.
-00654 */
-00655 
-00656 
-00657 typedef voidp gzFile;
-00658 
-00659 ZEXTERN gzFile ZEXPORT gzopen  OF((const char *path, const char *mode));
-00660 /*
-00661      Opens a gzip (.gz) file for reading or writing. The mode parameter
-00662    is as in fopen ("rb" or "wb") but can also include a compression level
-00663    ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for
-00664    Huffman only compression as in "wb1h". (See the description
-00665    of deflateInit2 for more information about the strategy parameter.)
-00666 
-00667      gzopen can be used to read a file which is not in gzip format; in this
-00668    case gzread will directly read from the file without decompression.
-00669 
-00670      gzopen returns NULL if the file could not be opened or if there was
-00671    insufficient memory to allocate the (de)compression state; errno
-00672    can be checked to distinguish the two cases (if errno is zero, the
-00673    zlib error is Z_MEM_ERROR).  */
-00674 
-00675 ZEXTERN gzFile ZEXPORT gzdopen  OF((int fd, const char *mode));
-00676 /*
-00677      gzdopen() associates a gzFile with the file descriptor fd.  File
-00678    descriptors are obtained from calls like open, dup, creat, pipe or
-00679    fileno (in the file has been previously opened with fopen).
-00680    The mode parameter is as in gzopen.
-00681      The next call of gzclose on the returned gzFile will also close the
-00682    file descriptor fd, just like fclose(fdopen(fd), mode) closes the file
-00683    descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode).
-00684      gzdopen returns NULL if there was insufficient memory to allocate
-00685    the (de)compression state.
-00686 */
-00687 
-00688 ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
-00689 /*
-00690      Dynamically update the compression level or strategy. See the description
-00691    of deflateInit2 for the meaning of these parameters.
-00692      gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
-00693    opened for writing.
-00694 */
-00695 
-00696 ZEXTERN int ZEXPORT    gzread  OF((gzFile file, voidp buf, unsigned len));
-00697 /*
-00698      Reads the given number of uncompressed bytes from the compressed file.
-00699    If the input file was not in gzip format, gzread copies the given number
-00700    of bytes into the buffer.
-00701      gzread returns the number of uncompressed bytes actually read (0 for
-00702    end of file, -1 for error). */
-00703 
-00704 ZEXTERN int ZEXPORT    gzwrite OF((gzFile file, 
-00705                                    const voidp buf, unsigned len));
-00706 /*
-00707      Writes the given number of uncompressed bytes into the compressed file.
-00708    gzwrite returns the number of uncompressed bytes actually written
-00709    (0 in case of error).
-00710 */
-00711 
-00712 ZEXTERN int ZEXPORTVA   gzprintf OF((gzFile file, const char *format, ...));
-00713 /*
-00714      Converts, formats, and writes the args to the compressed file under
-00715    control of the format string, as in fprintf. gzprintf returns the number of
-00716    uncompressed bytes actually written (0 in case of error).
-00717 */
-00718 
-00719 ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
-00720 /*
-00721       Writes the given null-terminated string to the compressed file, excluding
-00722    the terminating null character.
-00723       gzputs returns the number of characters written, or -1 in case of error.
-00724 */
-00725 
-00726 ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
-00727 /*
-00728       Reads bytes from the compressed file until len-1 characters are read, or
-00729    a newline character is read and transferred to buf, or an end-of-file
-00730    condition is encountered.  The string is then terminated with a null
-00731    character.
-00732       gzgets returns buf, or Z_NULL in case of error.
-00733 */
-00734 
-00735 ZEXTERN int ZEXPORT    gzputc OF((gzFile file, int c));
-00736 /*
-00737       Writes c, converted to an unsigned char, into the compressed file.
-00738    gzputc returns the value that was written, or -1 in case of error.
-00739 */
-00740 
-00741 ZEXTERN int ZEXPORT    gzgetc OF((gzFile file));
-00742 /*
-00743       Reads one byte from the compressed file. gzgetc returns this byte
-00744    or -1 in case of end of file or error.
-00745 */
-00746 
-00747 ZEXTERN int ZEXPORT    gzflush OF((gzFile file, int flush));
-00748 /*
-00749      Flushes all pending output into the compressed file. The parameter
-00750    flush is as in the deflate() function. The return value is the zlib
-00751    error number (see function gzerror below). gzflush returns Z_OK if
-00752    the flush parameter is Z_FINISH and all output could be flushed.
-00753      gzflush should be called only when strictly necessary because it can
-00754    degrade compression.
-00755 */
-00756 
-00757 ZEXTERN z_off_t ZEXPORT    gzseek OF((gzFile file,
-00758                                       z_off_t offset, int whence));
-00759 /* 
-00760       Sets the starting position for the next gzread or gzwrite on the
-00761    given compressed file. The offset represents a number of bytes in the
-00762    uncompressed data stream. The whence parameter is defined as in lseek(2);
-00763    the value SEEK_END is not supported.
-00764      If the file is opened for reading, this function is emulated but can be
-00765    extremely slow. If the file is opened for writing, only forward seeks are
-00766    supported; gzseek then compresses a sequence of zeroes up to the new
-00767    starting position.
-00768 
-00769       gzseek returns the resulting offset location as measured in bytes from
-00770    the beginning of the uncompressed stream, or -1 in case of error, in
-00771    particular if the file is opened for writing and the new starting position
-00772    would be before the current position.
-00773 */
-00774 
-00775 ZEXTERN int ZEXPORT    gzrewind OF((gzFile file));
-00776 /*
-00777      Rewinds the given file. This function is supported only for reading.
-00778 
-00779    gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
-00780 */
-00781 
-00782 ZEXTERN z_off_t ZEXPORT    gztell OF((gzFile file));
-00783 /*
-00784      Returns the starting position for the next gzread or gzwrite on the
-00785    given compressed file. This position represents a number of bytes in the
-00786    uncompressed data stream.
-00787 
-00788    gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
-00789 */
-00790 
-00791 ZEXTERN int ZEXPORT gzeof OF((gzFile file));
-00792 /*
-00793      Returns 1 when EOF has previously been detected reading the given
-00794    input stream, otherwise zero.
-00795 */
-00796 
-00797 ZEXTERN int ZEXPORT    gzclose OF((gzFile file));
-00798 /*
-00799      Flushes all pending output if necessary, closes the compressed file
-00800    and deallocates all the (de)compression state. The return value is the zlib
-00801    error number (see function gzerror below).
-00802 */
-00803 
-00804 ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
-00805 /*
-00806      Returns the error message for the last error which occurred on the
-00807    given compressed file. errnum is set to zlib error number. If an
-00808    error occurred in the file system and not in the compression library,
-00809    errnum is set to Z_ERRNO and the application may consult errno
-00810    to get the exact error code.
-00811 */
-00812 
-00813                         /* checksum functions */
-00814 
-00815 /*
-00816      These functions are not related to compression but are exported
-00817    anyway because they might be useful in applications using the
-00818    compression library.
-00819 */
-00820 
-00821 ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
-00822 
-00823 /*
-00824      Update a running Adler-32 checksum with the bytes buf[0..len-1] and
-00825    return the updated checksum. If buf is NULL, this function returns
-00826    the required initial value for the checksum.
-00827    An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
-00828    much faster. Usage example:
-00829 
-00830      uLong adler = adler32(0L, Z_NULL, 0);
-00831 
-00832      while (read_buffer(buffer, length) != EOF) {
-00833        adler = adler32(adler, buffer, length);
-00834      }
-00835      if (adler != original_adler) error();
-00836 */
-00837 
-00838 ZEXTERN uLong ZEXPORT crc32   OF((uLong crc, const Bytef *buf, uInt len));
-00839 /*
-00840      Update a running crc with the bytes buf[0..len-1] and return the updated
-00841    crc. If buf is NULL, this function returns the required initial value
-00842    for the crc. Pre- and post-conditioning (one's complement) is performed
-00843    within this function so it shouldn't be done by the application.
-00844    Usage example:
-00845 
-00846      uLong crc = crc32(0L, Z_NULL, 0);
-00847 
-00848      while (read_buffer(buffer, length) != EOF) {
-00849        crc = crc32(crc, buffer, length);
-00850      }
-00851      if (crc != original_crc) error();
-00852 */
-00853 
-00854 
-00855                         /* various hacks, don't look :) */
-00856 
-00857 /* deflateInit and inflateInit are macros to allow checking the zlib version
-00858  * and the compiler's view of z_stream:
-00859  */
-00860 ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
-00861                                      const char *version, int stream_size));
-00862 ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
-00863                                      const char *version, int stream_size));
-00864 ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int  level, int  method,
-00865                                       int windowBits, int memLevel,
-00866                                       int strategy, const char *version,
-00867                                       int stream_size));
-00868 ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,
-00869                                       const char *version, int stream_size));
-00870 #define deflateInit(strm, level) \
-00871         deflateInit_((strm), (level),       ZLIB_VERSION, sizeof(z_stream))
-00872 #define inflateInit(strm) \
-00873         inflateInit_((strm),                ZLIB_VERSION, sizeof(z_stream))
-00874 #define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
-00875         deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
-00876                       (strategy),           ZLIB_VERSION, sizeof(z_stream))
-00877 #define inflateInit2(strm, windowBits) \
-00878         inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
-00879 
-00880 
-00881 #if !defined(_Z_UTIL_H) && !defined(NO_DUMMY_DECL)
-00882     struct internal_state {int dummy;}; /* hack for buggy compilers */
-00883 #endif
-00884 
-00885 ZEXTERN const char   * ZEXPORT zError           OF((int err));
-00886 ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp z));
-00887 ZEXTERN const uLongf * ZEXPORT get_crc_table    OF((void));
-00888 
-00889 #ifdef __cplusplus
-00890 }
-00891 #endif
-00892 
-00893 #endif /* _ZLIB_H */
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/zstr_8cpp-source.html b/doc/api-documentation/html/zstr_8cpp-source.html deleted file mode 100644 index 6366986..0000000 --- a/doc/api-documentation/html/zstr_8cpp-source.html +++ /dev/null @@ -1,719 +0,0 @@ - - -zstr.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

zstr.cpp

00001 /******************************************************************************
-00002  *  zstr.cpp   - code for class 'zStr'- a module that reads compressed text
-00003  *              files and provides lookup and parsing functions based on
-00004  *              class StrKey
-00005  */
-00006 
-00007 #include <stdio.h>
-00008 #include <fcntl.h>
-00009 #include <errno.h>
-00010 
-00011 #ifndef __GNUC__
-00012 #include <io.h>
-00013 #else
-00014 #include <unistd.h>
-00015 #endif
-00016 
-00017 #include <string.h>
-00018 #include <stdlib.h>
-00019 #include <utilfuns.h>
-00020 #include <zstr.h>
-00021 #include <swcomprs.h>
-00022 
-00023 #include <sysdata.h>
-00024 #include <entriesblk.h>
-00025 
-00026 /******************************************************************************
-00027  * zStr Statics
-00028  */
-00029 
-00030 int zStr::instance = 0;
-00031 const int zStr::IDXENTRYSIZE = 8;
-00032 const int zStr::ZDXENTRYSIZE = 8;
-00033 
-00034 
-00035 /******************************************************************************
-00036  * zStr Constructor - Initializes data for instance of zStr
-00037  *
-00038  * ENT: ipath - path of the directory where data and index files are located.
-00039  */
-00040 
-00041 zStr::zStr(const char *ipath, int fileMode, long blockCount, SWCompress *icomp) {
-00042         char buf[127];
-00043 
-00044         nl = '\n';
-00045         lastoff = -1;
-00046         path = 0;
-00047         stdstr(&path, ipath);
-00048 
-00049         compressor = (icomp) ? icomp : new SWCompress();
-00050         this->blockCount = blockCount;
-00051 #ifndef O_BINARY                // O_BINARY is needed in Borland C++ 4.53
-00052 #define O_BINARY 0              // If it hasn't been defined than we probably
-00053 #endif                          // don't need it.
-00054 
-00055         if (fileMode == -1) { // try read/write if possible
-00056                 fileMode = O_RDWR;
-00057         }
-00058                 
-00059         sprintf(buf, "%s.idx", path);
-00060         idxfd = FileMgr::systemFileMgr.open(buf, fileMode|O_BINARY, true);
-00061 
-00062         sprintf(buf, "%s.dat", path);
-00063         datfd = FileMgr::systemFileMgr.open(buf, fileMode|O_BINARY, true);
-00064 
-00065         sprintf(buf, "%s.zdx", path);
-00066         zdxfd = FileMgr::systemFileMgr.open(buf, fileMode|O_BINARY, true);
-00067 
-00068         sprintf(buf, "%s.zdt", path);
-00069         zdtfd = FileMgr::systemFileMgr.open(buf, fileMode|O_BINARY, true);
-00070 
-00071         if (datfd <= 0) {
-00072                 sprintf(buf, "Error: %d", errno);
-00073                 perror(buf);
-00074         }
-00075 
-00076         cacheBlock = 0;
-00077         cacheBlockIndex = -1;
-00078         cacheDirty = false;
-00079 
-00080         instance++;
-00081 }
-00082 
-00083 
-00084 /******************************************************************************
-00085  * zStr Destructor - Cleans up instance of zStr
-00086  */
-00087 
-00088 zStr::~zStr() {
-00089 
-00090         flushCache();
-00091 
-00092         if (path)
-00093                 delete [] path;
-00094 
-00095         --instance;
-00096 
-00097         FileMgr::systemFileMgr.close(idxfd);
-00098         FileMgr::systemFileMgr.close(datfd);
-00099         FileMgr::systemFileMgr.close(zdxfd);
-00100         FileMgr::systemFileMgr.close(zdtfd);
-00101 
-00102 
-00103         if (compressor)
-00104                 delete compressor;
-00105 
-00106 }
-00107 
-00108 
-00109 /******************************************************************************
-00110  * zStr::getidxbufdat   - Gets the index string at the given dat offset
-00111  *                              NOTE: buf is calloc'd, or if not null, realloc'd and must
-00112  *                                      be free'd by calling function
-00113  *
-00114  * ENT: ioffset - offset in dat file to lookup
-00115  *              buf             - address of pointer to allocate for storage of string
-00116  */
-00117 
-00118 void zStr::getKeyFromDatOffset(long ioffset, char **buf) {
-00119         int size;
-00120         char ch;
-00121         if (datfd > 0) {
-00122                 lseek(datfd->getFd(), ioffset, SEEK_SET);
-00123                 for (size = 0; read(datfd->getFd(), &ch, 1) == 1; size++) {
-00124                         if ((ch == '\\') || (ch == 10) || (ch == 13))
-00125                                 break;
-00126                 }
-00127                 *buf = (*buf) ? (char *)realloc(*buf, size + 1) : (char *)malloc(size + 1);
-00128                 if (size) {
-00129                         lseek(datfd->getFd(), ioffset, SEEK_SET);
-00130                         read(datfd->getFd(), *buf, size);
-00131                 }
-00132                 (*buf)[size] = 0;
-00133                 for (size--; size > 0; size--)
-00134                         (*buf)[size] = SW_toupper((*buf)[size]);
-00135         }
-00136         else {
-00137                 *buf = (*buf) ? (char *)realloc(*buf, 1) : (char *)malloc(1);
-00138                 **buf = 0;
-00139         }
-00140 }
-00141 
-00142 
-00143 /******************************************************************************
-00144  * zStr::getidxbuf      - Gets the index string at the given idx offset
-00145  *                                              NOTE: buf is calloc'd, or if not null, realloc'd
-00146  *                                                      and must be freed by calling function
-00147  *
-00148  * ENT: ioffset - offset in idx file to lookup
-00149  *              buf             - address of pointer to allocate for storage of string
-00150  */
-00151 
-00152 void zStr::getKeyFromIdxOffset(long ioffset, char **buf) {
-00153         __u32 offset;
-00154         
-00155         if (idxfd > 0) {
-00156                 lseek(idxfd->getFd(), ioffset, SEEK_SET);
-00157                 read(idxfd->getFd(), &offset, sizeof(__u32));
-00158                 offset = swordtoarch32(offset);
-00159                 getKeyFromDatOffset(offset, buf);
-00160         }
-00161 }
-00162 
-00163 
-00164 /******************************************************************************
-00165  * zStr::findoffset     - Finds the offset of the key string from the indexes
-00166  *
-00167  * ENT: key             - key string to lookup
-00168  *              offset  - address to store the starting offset
-00169  *              size            - address to store the size of the entry
-00170  *              away            - number of entries before of after to jump
-00171  *                                      (default = 0)
-00172  *
-00173  * RET: error status
-00174  */
-00175 
-00176 signed char zStr::findKeyIndex(const char *ikey, long *idxoff, long away) {
-00177         char *trybuf = 0, *key = 0, quitflag = 0;
-00178         signed char retval = 0;
-00179         __s32 headoff, tailoff, tryoff = 0, maxoff = 0;
-00180         __u32 start, size;
-00181 
-00182         if (idxfd->getFd() >= 0) {
-00183                 tailoff = maxoff = lseek(idxfd->getFd(), 0, SEEK_END) - IDXENTRYSIZE;
-00184                 if (*ikey) {
-00185                         headoff = 0;
-00186                         stdstr(&key, ikey);
-00187                         toupperstr(key);
-00188 
-00189                         while (headoff < tailoff) {
-00190                                 tryoff = (lastoff == -1) ? headoff + (((((tailoff / IDXENTRYSIZE) - (headoff / IDXENTRYSIZE))) / 2) * IDXENTRYSIZE) : lastoff;
-00191                                 lastoff = -1;
-00192 
-00193                                 getKeyFromIdxOffset(tryoff, &trybuf);
-00194 
-00195                                 if (!*trybuf && tryoff) {               // In case of extra entry at end of idx (not first entry)
-00196                                         tryoff += (tryoff > (maxoff / 2))?-IDXENTRYSIZE:IDXENTRYSIZE;
-00197                                         retval = -1;
-00198                                         break;
-00199                                 }
-00200 
-00201                                 int diff = strcmp(key, trybuf);
-00202                                 if (!diff)
-00203                                         break;
-00204 
-00205                                 if (diff < 0)
-00206                                         tailoff = (tryoff == headoff) ? headoff : tryoff;
-00207                                 else headoff = tryoff;
-00208                                 if (tailoff == headoff + IDXENTRYSIZE) {
-00209                                         if (quitflag++)
-00210                                                 headoff = tailoff;
-00211                                 }
-00212                         }
-00213                         if (headoff >= tailoff)
-00214                                 tryoff = headoff;
-00215                         if (trybuf)
-00216                                 free(trybuf);
-00217                         delete [] key;
-00218                 }
-00219                 else    { tryoff = 0; }
-00220 
-00221                 lseek(idxfd->getFd(), tryoff, SEEK_SET);
-00222 
-00223                 start = size = 0;
-00224                 retval = (read(idxfd->getFd(), &start, sizeof(__u32))==sizeof(__u32)) ? retval : -1;
-00225                 retval = (read(idxfd->getFd(), &size, sizeof(__u32))==sizeof(__u32)) ? retval : -1;
-00226                 start = swordtoarch32(start);
-00227                 size  = swordtoarch32(size);
-00228 
-00229                 if (idxoff)
-00230                         *idxoff = tryoff;
-00231 
-00232                 while (away) {
-00233                         __u32 laststart = start;
-00234                         __u32 lastsize = size;
-00235                         __s32 lasttry = tryoff;
-00236                         tryoff += (away > 0) ? IDXENTRYSIZE : -IDXENTRYSIZE;
-00237 
-00238                         bool bad = false;
-00239                         if (((long)(tryoff + (away*IDXENTRYSIZE)) < -IDXENTRYSIZE) || (tryoff + (away*IDXENTRYSIZE) > (maxoff+IDXENTRYSIZE)))
-00240                                 bad = true;
-00241                         else    if (lseek(idxfd->getFd(), tryoff, SEEK_SET) < 0)
-00242                                 bad = true;
-00243                         if (bad) {
-00244                                 retval = -1;
-00245                                 start = laststart;
-00246                                 size = lastsize;
-00247                                 tryoff = lasttry;
-00248                                 if (idxoff)
-00249                                         *idxoff = tryoff;
-00250                                 break;
-00251                         }
-00252                         read(idxfd->getFd(), &start, sizeof(__u32));
-00253                         read(idxfd->getFd(), &size, sizeof(__u32));
-00254                         start = swordtoarch32(start);
-00255                         size  = swordtoarch32(size);
-00256 
-00257                         if (idxoff)
-00258                                 *idxoff = tryoff;
-00259 
-00260 
-00261                         if (((laststart != start) || (lastsize != size)) && (start >= 0) && (size)) 
-00262                                 away += (away < 0) ? 1 : -1;
-00263                 }
-00264         
-00265                 lastoff = tryoff;
-00266         }
-00267         else {
-00268                 if (idxoff)
-00269                         *idxoff = 0;
-00270                 retval = -1;
-00271         }
-00272         return retval;
-00273 }
-00274 
-00275 
-00276 /******************************************************************************
-00277  * zStr::preptext       - Prepares the text before returning it to external
-00278  *                                      objects
-00279  *
-00280  * ENT: buf     - buffer where text is stored and where to store the prep'd
-00281  *                              text.
-00282  */
-00283 
-00284 void zStr::prepText(char *buf) {
-00285         char *to, *from, space = 0, cr = 0, realdata = 0, nlcnt = 0;
-00286 
-00287         for (to = from = buf; *from; from++) {
-00288                 switch (*from) {
-00289                 case 10:
-00290                         if (!realdata)
-00291                                 continue;
-00292                         space = (cr) ? 0 : 1;
-00293                         cr = 0;
-00294                         nlcnt++;
-00295                         if (nlcnt > 1) {
-00296 //                              *to++ = nl;
-00297                                 *to++ = nl;
-00298 //                              nlcnt = 0;
-00299                         }
-00300                         continue;
-00301                 case 13:
-00302                         if (!realdata)
-00303                                 continue;
-00304                         *to++ = nl;
-00305                         space = 0;
-00306                         cr = 1;
-00307                         continue;
-00308                 }
-00309                 realdata = 1;
-00310                 nlcnt = 0;
-00311                 if (space) {
-00312                         space = 0;
-00313                         if (*from != ' ') {
-00314                                 *to++ = ' ';
-00315                                 from--;
-00316                                 continue;
-00317                         }
-00318                 }
-00319                 *to++ = *from;
-00320         }
-00321         *to = 0;
-00322 
-00323         while (to > (buf+1)) {                  // remove trailing excess
-00324                 to--;
-00325                 if ((*to == 10) || (*to == ' '))
-00326                         *to = 0;
-00327                 else break;
-00328         }
-00329 }
-00330 
-00331 
-00332 /******************************************************************************
-00333  * zStr::gettext        - gets text at a given offset
-00334  *
-00335  * ENT:
-00336  *      offset  - idxoffset where the key is located.
-00337  *      buf             - buffer to store text
-00338  *      idxbuf  - buffer to store index key
-00339  *                      NOTE: buffer will be alloc'd / realloc'd and 
-00340  *                      should be free'd by the client
-00341  *
-00342  */
-00343 
-00344 void zStr::getText(long offset, char **idxbuf, char **buf) {
-00345         char *ch;
-00346         char *idxbuflocal = 0;
-00347         getKeyFromIdxOffset(offset, &idxbuflocal);
-00348         __u32 start;
-00349         __u32 size;
-00350 
-00351         do {
-00352                 lseek(idxfd->getFd(), offset, SEEK_SET);
-00353                 read(idxfd->getFd(), &start, sizeof(__u32));
-00354                 read(idxfd->getFd(), &size, sizeof(__u32));
-00355                 start = swordtoarch32(start);
-00356                 size = swordtoarch32(size);
-00357 
-00358                 *buf = (*buf) ? (char *)realloc(*buf, size + 1) : (char *)malloc(size + 1);
-00359                 *idxbuf = (*idxbuf) ? (char *)realloc(*idxbuf, size + 1) : (char *)malloc(size + 1);
-00360                 memset(*buf, 0, size + 1);
-00361                 memset(*idxbuf, 0, size + 1);
-00362                 lseek(datfd->getFd(), start, SEEK_SET);
-00363                 read(datfd->getFd(), *buf, (int)(size));
-00364 
-00365                 for (ch = *buf; *ch; ch++) {            // skip over index string
-00366                         if (*ch == 10) {
-00367                                 ch++;
-00368                                 break;
-00369                         }
-00370                 }
-00371                 memmove(*buf, ch, size - (unsigned long)(ch-*buf));
-00372 
-00373                 // resolve link
-00374                 if (!strncmp(*buf, "@LINK", 5)) {
-00375                         for (ch = *buf; *ch; ch++) {            // null before nl
-00376                                 if (*ch == 10) {
-00377                                         *ch = 0;
-00378                                         break;
-00379                                 }
-00380                         }
-00381                         findKeyIndex(*buf + IDXENTRYSIZE, &offset);
-00382                 }
-00383                 else break;
-00384         }
-00385         while (true);   // while we're resolving links
-00386 
-00387         if (idxbuflocal) {
-00388                 __u32 localsize = strlen(idxbuflocal);
-00389                 localsize = (localsize < (size - 1)) ? localsize : (size - 1);
-00390                 strncpy(*idxbuf, idxbuflocal, localsize);
-00391                 (*idxbuf)[localsize] = 0;
-00392                 free(idxbuflocal);
-00393         }
-00394         __u32 block = 0;
-00395         __u32 entry = 0;
-00396         memmove(&block, *buf, sizeof(__u32));
-00397         memmove(&entry, *buf + sizeof(__u32), sizeof(__u32));
-00398         block = swordtoarch32(block);
-00399         entry = swordtoarch32(entry);
-00400         getCompressedText(block, entry, buf);
-00401 }
-00402 
-00403 
-00404 /******************************************************************************
-00405  * zStr::getCompressedText - Get text entry from a compressed index / zdata
-00406  *              file.
-00407  */
-00408 
-00409 void zStr::getCompressedText(long block, long entry, char **buf) {
-00410 
-00411         __u32 size = 0;
-00412 
-00413         if (cacheBlockIndex != block) {
-00414                 __u32 start = 0;
-00415 
-00416                 lseek(zdxfd->getFd(), block * ZDXENTRYSIZE, SEEK_SET);
-00417                 read(zdxfd->getFd(), &start, sizeof(__u32));
-00418                 read(zdxfd->getFd(), &size, sizeof(__u32));
-00419                 start = swordtoarch32(start);
-00420                 size = swordtoarch32(size);
-00421 
-00422                 *buf = (*buf) ? (char *)realloc(*buf, size + 1) : (char *)malloc(size + 1);
-00423 
-00424                 lseek(zdtfd->getFd(), start, SEEK_SET);
-00425                 read(zdtfd->getFd(), *buf, size);
-00426 
-00427                 flushCache();
-00428 
-00429                 unsigned long len = size;
-00430                 compressor->zBuf(&len, *buf);
-00431                 char * rawBuf = compressor->Buf(0, &len);
-00432                 cacheBlock = new EntriesBlock(rawBuf, len);
-00433                 cacheBlockIndex = block;
-00434         }
-00435         size = cacheBlock->getEntrySize(entry);
-00436         *buf = (*buf) ? (char *)realloc(*buf, size + 1) : (char *)malloc(size + 1);
-00437         strcpy(*buf, cacheBlock->getEntry(entry));
-00438 }
-00439 
-00440 
-00441 /******************************************************************************
-00442  * zLD::settext - Sets text for current offset
-00443  *
-00444  * ENT: key     - key for this entry
-00445  *      buf     - buffer to store
-00446  *      len     - length of buffer (0 - null terminated)
-00447  */
-00448 
-00449 void zStr::setText(const char *ikey, const char *buf, long len) {
-00450 
-00451         __u32 start, outstart;
-00452         __u32 size, outsize;
-00453         __s32 endoff;
-00454         long idxoff = 0;
-00455         __s32 shiftSize;
-00456         static const char nl[] = {13, 10};
-00457         char *tmpbuf = 0;
-00458         char *key = 0;
-00459         char *dbKey = 0;
-00460         char *idxBytes = 0;
-00461         char *outbuf = 0;
-00462         char *ch = 0;
-00463 
-00464         stdstr(&key, ikey);
-00465         toupperstr(key);
-00466 
-00467         char notFound = findKeyIndex(ikey, &idxoff, 0);
-00468         if (!notFound) {
-00469                 getKeyFromIdxOffset(idxoff, &dbKey);
-00470                 int diff = strcmp(key, dbKey);
-00471                 if (diff < 0) {
-00472                 }
-00473                 else if (diff > 0) {
-00474                         idxoff += IDXENTRYSIZE;
-00475                 }
-00476                 else if ((!diff) && (len || strlen(buf) /*we're not deleting*/)) { // got absolute entry
-00477                         do {
-00478                                 lseek(idxfd->getFd(), idxoff, SEEK_SET);
-00479                                 read(idxfd->getFd(), &start, sizeof(__u32));
-00480                                 read(idxfd->getFd(), &size, sizeof(__u32));
-00481                                 start = swordtoarch32(start);
-00482                                 size = swordtoarch32(size);
-00483 
-00484                                 tmpbuf = new char [ size + 2 ];
-00485                                 memset(tmpbuf, 0, size + 2);
-00486                                 lseek(datfd->getFd(), start, SEEK_SET);
-00487                                 read(datfd->getFd(), tmpbuf, size);
-00488 
-00489                                 for (ch = tmpbuf; *ch; ch++) {          // skip over index string
-00490                                         if (*ch == 10) {
-00491                                                 ch++;
-00492                                                 break;
-00493                                         }
-00494                                 }
-00495                                 memmove(tmpbuf, ch, size - (unsigned long)(ch-tmpbuf));
-00496 
-00497                                 // resolve link
-00498                                 if (!strncmp(tmpbuf, "@LINK", 5) && (len ? len : strlen(buf))) {
-00499                                         for (ch = tmpbuf; *ch; ch++) {          // null before nl
-00500                                                 if (*ch == 10) {
-00501                                                         *ch = 0;
-00502                                                         break;
-00503                                                 }
-00504                                         }
-00505                                         findKeyIndex(tmpbuf + IDXENTRYSIZE, &idxoff);
-00506                                         delete [] tmpbuf;
-00507                                 }
-00508                                 else break;
-00509                         }
-00510                         while (true);   // while we're resolving links
-00511                 }
-00512         }
-00513 
-00514         endoff = lseek(idxfd->getFd(), 0, SEEK_END);
-00515 
-00516         shiftSize = endoff - idxoff;
-00517 
-00518         if (shiftSize > 0) {
-00519                 idxBytes = new char [ shiftSize ];
-00520                 lseek(idxfd->getFd(), idxoff, SEEK_SET);
-00521                 read(idxfd->getFd(), idxBytes, shiftSize);
-00522         }
-00523 
-00524         outbuf = new char [ (len ? len : strlen(buf)) + strlen(key) + 5 ];
-00525         sprintf(outbuf, "%s%c%c", key, 13, 10);
-00526         size = strlen(outbuf);
-00527         if (len ? len : strlen(buf)) {  // NOT a link
-00528                 if (!cacheBlock) {
-00529                         flushCache();
-00530                         cacheBlock = new EntriesBlock();
-00531                         cacheBlockIndex = (lseek(zdxfd->getFd(), 0, SEEK_END) / ZDXENTRYSIZE);
-00532                 }
-00533                 else if (cacheBlock->getCount() >= blockCount) {
-00534                         flushCache();
-00535                         cacheBlock = new EntriesBlock();
-00536                         cacheBlockIndex = (lseek(zdxfd->getFd(), 0, SEEK_END) / ZDXENTRYSIZE);
-00537                 }
-00538                 __u32 entry = cacheBlock->addEntry(buf);
-00539                 cacheDirty = true;
-00540                 outstart = archtosword32(cacheBlockIndex);
-00541                 outsize = archtosword32(entry);
-00542                 memcpy (outbuf + size, &outstart, sizeof(__u32));
-00543                 memcpy (outbuf + size + sizeof(__u32), &outsize, sizeof(__u32));
-00544                 size += (sizeof(__u32) * 2);
-00545         }
-00546         else {  // link
-00547                 memcpy(outbuf + size, buf, len ? len : strlen(buf));
-00548                 size += (len ? len : strlen(buf));
-00549         }
-00550 
-00551         start = lseek(datfd->getFd(), 0, SEEK_END);
-00552 
-00553         outstart = archtosword32(start);
-00554         outsize  = archtosword32(size);
-00555 
-00556         lseek(idxfd->getFd(), idxoff, SEEK_SET);
-00557         if (len ? len : strlen(buf)) {
-00558                 lseek(datfd->getFd(), start, SEEK_SET);
-00559                 write(datfd->getFd(), outbuf, size);
-00560 
-00561                 // add a new line to make data file easier to read in an editor
-00562                 write(datfd->getFd(), &nl, 2);
-00563                 
-00564                 write(idxfd->getFd(), &outstart, sizeof(__u32));
-00565                 write(idxfd->getFd(), &outsize, sizeof(__u32));
-00566                 if (idxBytes) {
-00567                         write(idxfd->getFd(), idxBytes, shiftSize);
-00568                 }
-00569         }
-00570         else {  // delete entry
-00571                 if (idxBytes) {
-00572                         write(idxfd->getFd(), idxBytes+IDXENTRYSIZE, shiftSize-IDXENTRYSIZE);
-00573                         lseek(idxfd->getFd(), -1, SEEK_CUR);    // last valid byte
-00574                         FileMgr::systemFileMgr.trunc(idxfd);    // truncate index
-00575                 }
-00576         }
-00577 
-00578         if (idxBytes)
-00579                 delete [] idxBytes;
-00580         delete [] key;
-00581         delete [] outbuf;
-00582         free(dbKey);
-00583 }
-00584 
-00585 
-00586 /******************************************************************************
-00587  * zLD::linkentry       - links one entry to another
-00588  *
-00589  * ENT: testmt  - testament to find (0 - Bible/module introduction)
-00590  *      destidxoff      - dest offset into .vss
-00591  *      srcidxoff               - source offset into .vss
-00592  */
-00593 
-00594 void zStr::linkEntry(const char *destkey, const char *srckey) {
-00595         char *text = new char [ strlen(destkey) + 7 ];
-00596         sprintf(text, "@LINK %s", destkey);
-00597         setText(srckey, text);
-00598         delete [] text;
-00599 }
-00600 
-00601 
-00602 void zStr::flushCache() {
-00603         if (cacheBlock) {
-00604                 if (cacheDirty) {
-00605                         __u32 start = 0;
-00606                         unsigned long size = 0;
-00607                         __u32 outstart = 0, outsize = 0;
-00608 
-00609                         const char *rawBuf = cacheBlock->getRawData(&size);
-00610                         compressor->Buf(rawBuf, &size);
-00611                         compressor->zBuf(&size);
-00612 
-00613                         long zdxSize = lseek(zdxfd->getFd(), 0, SEEK_END);
-00614                         long zdtSize = lseek(zdtfd->getFd(), 0, SEEK_END);
-00615 
-00616                         if ((cacheBlockIndex * ZDXENTRYSIZE) > (zdxSize - ZDXENTRYSIZE)) {      // New Block
-00617                                 start = zdtSize;
-00618                         }
-00619                         else {
-00620                                 lseek(zdxfd->getFd(), cacheBlockIndex * ZDXENTRYSIZE, SEEK_SET);
-00621                                 read(zdxfd->getFd(), &start, sizeof(__u32));
-00622                                 read(zdxfd->getFd(), &outsize, sizeof(__u32));
-00623                                 start = swordtoarch32(start);
-00624                                 outsize = swordtoarch32(outsize);
-00625                                 if (start + outsize >= zdtSize) {       // last entry, just overwrite
-00626                                         // start is already set
-00627                                 }
-00628                                 else    if (size < outsize) {   // middle entry, but smaller, that's fine and let's preserve bigger size
-00629                                         size = outsize;
-00630                                 }
-00631                                 else {  // middle and bigger-- we have serious problems, for now let's put it at the end = lots of wasted space
-00632                                         start = zdtSize;
-00633                                 }
-00634                         }
-00635 
-00636 
-00637 
-00638                         outstart = archtosword32(start);
-00639                         outsize  = archtosword32((__u32)size);
-00640 
-00641                         lseek(zdxfd->getFd(), cacheBlockIndex * ZDXENTRYSIZE, SEEK_SET);
-00642                         lseek(zdtfd->getFd(), start, SEEK_SET);
-00643                         rawBuf = compressor->zBuf(&size);
-00644                         write(zdtfd->getFd(), rawBuf, size);
-00645 
-00646                         // add a new line to make data file easier to read in an editor
-00647                         write(zdtfd->getFd(), &nl, 2);
-00648                         
-00649                         write(zdxfd->getFd(), &outstart, sizeof(__u32));
-00650                         write(zdxfd->getFd(), &outsize, sizeof(__u32));
-00651 
-00652                         delete cacheBlock;
-00653                 }
-00654         }
-00655         cacheBlockIndex = -1;
-00656         cacheBlock = 0;
-00657         cacheDirty = false;
-00658 }
-00659 
-00660 
-00661 /******************************************************************************
-00662  * zLD::CreateModule    - Creates new module files
-00663  *
-00664  * ENT: path    - directory to store module files
-00665  * RET: error status
-00666  */
-00667 
-00668 signed char zStr::createModule(const char *ipath) {
-00669         char *path = 0;
-00670         char *buf = new char [ strlen (ipath) + 20 ];
-00671         FileDesc *fd, *fd2;
-00672 
-00673         stdstr(&path, ipath);
-00674 
-00675         if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\'))
-00676                 path[strlen(path)-1] = 0;
-00677 
-00678         sprintf(buf, "%s.dat", path);
-00679         unlink(buf);
-00680         fd = FileMgr::systemFileMgr.open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-00681         fd->getFd();
-00682         FileMgr::systemFileMgr.close(fd);
-00683 
-00684         sprintf(buf, "%s.idx", path);
-00685         unlink(buf);
-00686         fd2 = FileMgr::systemFileMgr.open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-00687         fd2->getFd();
-00688         FileMgr::systemFileMgr.close(fd2);
-00689 
-00690         sprintf(buf, "%s.zdt", path);
-00691         unlink(buf);
-00692         fd2 = FileMgr::systemFileMgr.open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-00693         fd2->getFd();
-00694         FileMgr::systemFileMgr.close(fd2);
-00695 
-00696         sprintf(buf, "%s.zdx", path);
-00697         unlink(buf);
-00698         fd2 = FileMgr::systemFileMgr.open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-00699         fd2->getFd();
-00700         FileMgr::systemFileMgr.close(fd2);
-00701 
-00702         delete [] path;
-00703         
-00704         return 0;
-00705 }
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/zstr_8h-source.html b/doc/api-documentation/html/zstr_8h-source.html deleted file mode 100644 index 47bf10b..0000000 --- a/doc/api-documentation/html/zstr_8h-source.html +++ /dev/null @@ -1,86 +0,0 @@ - - -zstr.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

zstr.h

00001 /*****************************************************************************
-00002  * zstr.h   - code for class 'zStr'- a module that reads compressed text
-00003  *                      files.
-00004  *                      and provides lookup and parsing functions based on
-00005  *                      class StrKey
-00006  *
-00007  * $Id: zstr_8h-source.html,v 1.3 2002/06/20 20:23:10 mgruner Exp $
-00008  *
-00009  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00010  *      CrossWire Bible Society
-00011  *      P. O. Box 2528
-00012  *      Tempe, AZ  85280-2528
-00013  *
-00014  * This program is free software; you can redistribute it and/or modify it
-00015  * under the terms of the GNU General Public License as published by the
-00016  * Free Software Foundation version 2.
-00017  *
-00018  * This program is distributed in the hope that it will be useful, but
-00019  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00021  * General Public License for more details.
-00022  *
-00023  */
-00024 
-00025 #ifndef ZSTR_H
-00026 #define ZSTR_H
-00027 
-00028 #include <filemgr.h>
-00029 
-00030 #include <defs.h>
-00031 
-00032 class SWCompress;
-00033 class EntriesBlock;
-00034 
-00035 class SWDLLEXPORT zStr {
-00036 
-00037 private:
-00038         static int instance;            // number of instantiated zStr objects or derivitives
-00039         EntriesBlock *cacheBlock;
-00040         long cacheBlockIndex;
-00041         bool cacheDirty;
-00042         char *path;
-00043         long lastoff;
-00044         long blockCount;
-00045         SWCompress *compressor;
-00046 
-00047 protected:
-00048         FileDesc *idxfd;
-00049         FileDesc *datfd;
-00050         FileDesc *zdxfd;
-00051         FileDesc *zdtfd;
-00052         static const int IDXENTRYSIZE;
-00053         static const int ZDXENTRYSIZE;
-00054 
-00055         void getCompressedText(long block, long entry, char **buf);
-00056         void flushCache();
-00057         void prepText(char *buf);
-00058         void getKeyFromDatOffset(long ioffset, char **buf);
-00059         void getKeyFromIdxOffset(long ioffset, char **buf);
-00060 
-00061 public:
-00062         char nl;
-00063         zStr(const char *ipath, int fileMode = -1, long blockCount = 100, SWCompress *icomp = 0);
-00064         virtual ~zStr();
-00065         signed char findKeyIndex(const char *ikey, long *idxoff, long away = 0);
-00066         void getText(long index, char **idxbuf, char **buf);
-00067         void setText(const char *ikey, const char *buf, long len = 0);
-00068         void linkEntry(const char *destkey, const char *srckey);
-00069         static signed char createModule (const char *path);
-00070 };
-00071 
-00072 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/ztext_2gbfidx_8cpp-source.html b/doc/api-documentation/html/ztext_2gbfidx_8cpp-source.html deleted file mode 100644 index cd962aa..0000000 --- a/doc/api-documentation/html/ztext_2gbfidx_8cpp-source.html +++ /dev/null @@ -1,675 +0,0 @@ - - -gbfidx.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

gbfidx.cpp

00001 /*****************************************************************************
-00002  *
-00003  *      This code reeks but works (sometimes).  Good luck!
-00004  * Modified for zText purposes
-00005  */
-00006 
-00007 //#include <stdio.h>
-00008 #include <iostream>
-00009 #include <fstream>
-00010 #include <stdlib.h>
-00011 #include <string.h>
-00012 #include <ctype.h>
-00013 #include <assert.h>
-00014 
-00015 //#ifndef __GNUC__
-00016 #include <io.h>
-00017 //#else
-00018 //#include <unistd.h>
-00019 //#endif
-00020 
-00021 #include <fcntl.h>
-00022 #include <versekey.h>
-00023 
-00024 
-00025 void writeidx(VerseKey &key1, VerseKey &key2, VerseKey &key3, long offset, short size);
-00026 char findbreak(int fp, long *offset, int *num1, int *num2, int *rangemax, unsigned short *size);
-00027 void openfiles(char *fname);
-00028 void checkparams(int argc, char **argv);
-00029 
-00030 
-00031 VerseKey key1, key2, key3;
-00032 int fp=0, vfp=0, cfp=0, bfp=0;
-00033 long chapoffset=0;
-00034 unsigned short chapsize=0;
-00035 long bookoffset=0;
-00036 unsigned short booksize=0;
-00037 long testoffset=0;
-00038 unsigned short testsize=0;
-00039 long verseoffset=0;
-00040 unsigned short versesize=0;
-00041 long nextoffset=0;
-00042 char testmnt=0;
-00043 int deadcount = 0;
-00044 int chapmark=-4, bookmark=-1;
-00045 ofstream cfile;
-00046 
-00047 
-00048 int main(int argc, char **argv)
-00049 {
-00050         long pos, offset;
-00051         int num1, num2, rangemax;//, curbook = 0, curchap = 0, curverse = 0;
-00052         //char buf[127],
-00053         char startflag = 0;
-00054         unsigned short size;//, tmp;
-00055 
-00056         checkparams(argc, argv);
-00057 
-00058         openfiles(argv[1]);
-00059         //key1 = "Matthew 1:1";
-00060         //key2 = "Matthew 1:1";
-00061         //key3 = "Matthew 1:1";
-00062 
-00063         testmnt = key1.Testament();
-00064         cfile << "testament" << (int) testmnt << "\n";
-00065         num1 = key1.Chapter();
-00066         num2 = key1.Verse();
-00067         pos  = 0;
-00068         write(bfp, &pos, 4);  /* Book    offset for testament intros */
-00069         pos = 4;
-00070         write(cfp, &pos, 4);  /* Chapter offset for testament intro */
-00071 
-00072 
-00073 /*      Right now just zero out intros until parsing correctly */
-00074         /*pos = 0;
-00075         size = 0;
-00076         write(vfp, &pos, 4);  // Module intro
-00077         write(vfp, &size, 2);
-00078         cfile << "modintro pos{" << pos << "} size{" << size << "}\n";
-00079         write(vfp, &pos, 4);  // Testament intro
-00080         write(vfp, &size, 2);
-00081         cfile << "test intro pos{" << pos << "} size{" << size << "}\n";
-00082         */
-00083         cout << "GBFIDX Running\n";
-00084         cout.flush();
-00085         while(!findbreak(fp, &offset, &num1, &num2, &rangemax, &size)) {
-00086                 if (!startflag) {
-00087                         startflag = 1;
-00088                 }
-00089                 else {
-00090                         if (num2 < key2.Verse()) {            // new chapter
-00091                                 if (num1 <= key2.Chapter()) { // new book
-00092                                         key2.Verse(1);
-00093                                         key2.Chapter(1);
-00094                                         key2.Book(key2.Book()+1);
-00095                                 }
-00096                                 cfile << "Found Chapter Break: " << num1 << " ('" << (const char *)key2 << "')\n";
-00097                                 //chapoffset = offset;
-00098                                 //chapsize = chapsize - size;
-00099 //                              continue;
-00100                         }
-00101                 }
-00102                 key2.Verse(1);
-00103                 key2.Chapter(num1);
-00104                 key2.Verse(num2);
-00105 
-00106                 key3 = key2;
-00107 //              key3 += (rangemax - key3.Verse());
-00108 
-00109                 writeidx(key1, key2, key3, offset, size);
-00110         }
-00111         close(vfp);
-00112         close(cfp);
-00113         close(bfp);
-00114         close(fp);
-00115 
-00116         return 1;
-00117 }
-00118 
-00119 
-00120 /**************************************************************************
-00121  * writeidx:    key1    - current location of index
-00122  *      key2    - minimum keyval for which this offset is valid
-00123  *      key3    - maximum keyval for which this offset is valid
-00124  */
-00125 
-00126 void writeidx(VerseKey &key1, VerseKey &key2, VerseKey &key3, long offset, short size)
-00127 {
-00128         long pos;
-00129         unsigned short tmp;
-00130 
-00131         for (; ((key1 <= key3) && (key1.Error() != KEYERR_OUTOFBOUNDS) && (key1.Testament() == testmnt)); key1+=1) {
-00132                 if (chapmark>=2)
-00133                 {
-00134                         if (bookmark==2)
-00135                         {
-00136                                 //booksize = booksize - chapsize + 7;
-00137                                 cfile << "versesize " << versesize << " booksize " << booksize << " chapsize " << chapsize << " size " << size << "\n";
-00138                                 //cfile.flush();
-00139                                 //assert(chapsize < size);
-00140                                 //if (chapsize > size)           // At start of Psalms gets chapsize rather than chapsize+size ???
-00141                                 //{
-00142                                 //      versesize = versesize - (booksize - (chapsize - size) + 7);
-00143                                 //}
-00144                                 //else
-00145                                 //{
-00146                                 versesize = versesize - (booksize - (chapsize) + 7);
-00147                                 //}
-00148                                         cfile << "Last verse in book\n";
-00149                         }
-00150                         //chapsize = chapsize - size;
-00151                         cfile << "versesize " << versesize << " chapsize " << chapsize << " size " << size<< "\n";
-00152                         cfile.flush();
-00153                         //assert(chapsize > size);
-00154                         //if (chapsize > size)           // At start of Psalms gets chapsize rather than chapsize+size ???
-00155                         //{
-00156                         //      versesize = versesize - (chapsize - size);
-00157                         //}
-00158                         //else
-00159                         //{
-00160                         versesize = versesize - (chapsize);
-00161                         //}
-00162                         cfile << "Last verse in chapter\n";
-00163                 }
-00164                 if (chapmark>=2 && bookmark!=1)
-00165                 {
-00166                         cfile << "prev verse pos{" << verseoffset << "} size{" << versesize << "} nextoffset{" << nextoffset << "}\n";
-00167                         cfile.flush();
-00168                         assert(verseoffset==nextoffset);
-00169                         write(vfp, &verseoffset, 4);
-00170                         write(vfp, &versesize, 2);
-00171                         nextoffset = verseoffset+versesize;
-00172                         bookmark = 0;
-00173                         chapmark = 0;
-00174                 }
-00175                 if (key1.Verse() == 1) {        // new chapter
-00176                         cfile << "size??? " << size << "\n";
-00177                         cfile.flush();
-00178                         //assert(chapsize > size || key1.Chapter()==1);
-00179                         //assert(chapsize > size);
-00180                         //if (chapsize > size)           // At start of books gets chapsize rather than chapsize+size
-00181                         //{
-00182                         //      chapsize = chapsize - size;
-00183                         //}
-00184                         if (key1.Chapter() == 1) {      // new book
-00185                                 booksize = booksize - chapsize + 7;
-00186                                 if (key1.Book() == 1)
-00187                                 {
-00188                                         pos = 0;
-00189                                         //tmp = testoffset;
-00190                                         tmp = 0;                // better just remember that it goes up to the testament intro to avoid 64k limit
-00191                                                                                                 // AV exceeds that anyway!
-00192                                         write(vfp, &pos, 4);  /* Module intro */
-00193                                         write(vfp, &tmp, 2);
-00194                                         assert(nextoffset==0);
-00195                                         cfile << "modintro pos{" << pos << "} size{" << tmp << "}\n";
-00196                                         testsize = testsize - booksize - chapsize + 7;
-00197                                         if (testsize > 10000)
-00198                                         {
-00199                                                 cerr << "Error: testament too big " << testsize << "\n";
-00200                                                 exit(-1);
-00201                                         }
-00202                                         //assert(testoffset==nextoffset);
-00203                                         write(vfp, &testoffset, 4);  /* Testament intro (vss)  */
-00204                                         write(vfp, &testsize, 2);
-00205                                         nextoffset = testoffset+testsize;
-00206                                         cfile << "test intro pos{" << testoffset << "} size{" << testsize << "}\n";
-00207                                 }
-00208                                 pos = lseek(cfp, 0, SEEK_CUR);
-00209                                 write(bfp, &pos, 4);
-00210                                 pos = lseek(vfp, 0, SEEK_CUR); /* Book intro (cps) */
-00211                                 write(cfp, &pos, 4);
-00212                                 if (booksize > 10000)
-00213                                 {
-00214                                         cerr << "Error: book too big " << booksize << "\n";
-00215                                         exit(-1);
-00216                                 }
-00217                                 assert(bookoffset==nextoffset);
-00218                                 write(vfp, &bookoffset, 4);  /* Book intro (vss)  */
-00219                                 write(vfp, &booksize, 2);
-00220                                 nextoffset = bookoffset+booksize;
-00221                                 cfile << "book intro pos{" << bookoffset << "} size{" << booksize << "}\n";
-00222                                 //offset += booksize;
-00223                                 //bookmark = false;
-00224                         }
-00225                         pos = lseek(vfp, 0, SEEK_CUR);
-00226                         write(cfp, &pos, 4);
-00227                         assert(chapsize < 10000);
-00228                         write(vfp, &chapoffset, 4);  /* Chapter intro */
-00229                         write(vfp, &chapsize, 2);
-00230                         nextoffset = chapoffset+chapsize;
-00231                         cfile << "chapter intro pos{" << chapoffset << "} size{" << chapsize << "}\n";
-00232                         //offset += chapsize;
-00233                         //size -= chapsize;
-00234                         //chapmark = false;
-00235                 }
-00236                 if (key1 >= key2) {
-00237                         if (size > 10000)
-00238                         {
-00239                                 cerr << "Error: verse too big " << size << "\n";
-00240                                 exit(-1);
-00241                         }
-00242                         if (!chapmark && !bookmark)
-00243                         {
-00244                                 write(vfp, &offset, 4);
-00245                                 write(vfp, &size, 2);
-00246                                 cfile << "verse pos{" << offset << "} size{" << size << "}\n";
-00247                                 cfile.flush();
-00248                                 assert(offset==nextoffset);
-00249                                 nextoffset = offset+size;
-00250                                 //cfile << "bookmark " << bookmark << " chapmark " << chapmark << "\n";
-00251                         }
-00252                         else
-00253                         {
-00254                                 verseoffset = offset;
-00255                                 versesize = size;
-00256                                 cfile << "saving verse pos{" << offset << "} size{" << size << "}\n";
-00257                                 cfile << "bookmark " << bookmark << " chapmark " << chapmark << "\n";
-00258                         }
-00259                 }
-00260                 else    {
-00261                         pos = 0;
-00262                         tmp = 0;
-00263                         write(vfp, &pos, 4);
-00264                         write(vfp, &tmp, 2);
-00265                         cfile << "blank pos{" << pos << "} size{" << tmp << "}\n";
-00266                 }
-00267         }
-00268 }
-00269 
-00270 char startmod(char *buf)
-00271 {
-00272         //char loop;
-00273 
-00274         if (buf[0] != '<')
-00275                 return 0;
-00276         if (buf[1] != 'H')
-00277                 return 0;
-00278         if (buf[2] != '0')
-00279                 return 0;
-00280 /*
-00281         if (!isdigit(buf[2]))
-00282                 return 0;
-00283         for (loop = 3; loop < 7; loop++) {
-00284                 if (buf[loop] == ' ')
-00285                         break;
-00286                 if ((!isdigit(buf[loop])) && (buf[loop] != ',') && (buf[loop] != '-'))
-00287                         return 0;
-00288         }
-00289 */
-00290         return 1;
-00291 }
-00292 
-00293 
-00294 char starttest(char *buf)
-00295 {
-00296         //char loop;
-00297 
-00298         if (buf[0] != '<')
-00299                 return 0;
-00300         if (buf[1] != 'B')
-00301                 return 0;
-00302         if (testmnt==2)
-00303         {
-00304                 if (buf[2] != 'N')
-00305                         return 0;
-00306         }
-00307         else
-00308         {
-00309                 if (buf[2] != 'O')
-00310                         return 0;
-00311         }
-00312         //if (buf[3] != '>')
-00313         //      return 0;
-00314 /*
-00315         if (!isdigit(buf[2]))
-00316                 return 0;
-00317         for (loop = 3; loop < 7; loop++) {
-00318                 if (buf[loop] == ' ')
-00319                         break;
-00320                 if ((!isdigit(buf[loop])) && (buf[loop] != ',') && (buf[loop] != '-'))
-00321                         return 0;
-00322         }
-00323 */
-00324         return 1;
-00325 }
-00326 
-00327 
-00328 char startbook(char *buf)
-00329 {
-00330         //char loop;
-00331 
-00332         if (buf[0] != '<')
-00333                 return 0;
-00334         if (buf[1] != 'S')
-00335                 return 0;
-00336         if (buf[2] != 'B')
-00337                 return 0;
-00338 /*
-00339         if (!isdigit(buf[2]))
-00340                 return 0;
-00341         for (loop = 3; loop < 7; loop++) {
-00342                 if (buf[loop] == ' ')
-00343                         break;
-00344                 if ((!isdigit(buf[loop])) && (buf[loop] != ',') && (buf[loop] != '-'))
-00345                         return 0;
-00346         }
-00347 */
-00348         return 1;
-00349 }
-00350 
-00351 
-00352 char startchap(char *buf)
-00353 {
-00354         //char loop;
-00355 
-00356         if (buf[0] != '<')
-00357                 return 0;
-00358         if (buf[1] != 'S')
-00359                 return 0;
-00360         if (buf[2] != 'C')
-00361                 return 0;
-00362 /*
-00363         if (!isdigit(buf[2]))
-00364                 return 0;
-00365         for (loop = 3; loop < 7; loop++) {
-00366                 if (buf[loop] == ' ')
-00367                         break;
-00368                 if ((!isdigit(buf[loop])) && (buf[loop] != ',') && (buf[loop] != '-'))
-00369                         return 0;
-00370         }
-00371 */
-00372         return 1;
-00373 }
-00374 
-00375 
-00376 char startentry(char *buf)
-00377 {
-00378         //char loop;
-00379         //cfile << "{SV}";
-00380 
-00381         if (buf[0] != '<')
-00382         {
-00383                 //cfile << "{no<}";
-00384                 return 0;
-00385         }
-00386         if (buf[1] != 'S')
-00387         {
-00388                 //cfile << "\n{noS}\n";
-00389                 return 0;
-00390         }
-00391         if (buf[2] != 'V')
-00392         {
-00393                 //cfile << "\n{noV}\n";
-00394                 return 0;
-00395         }
-00396 /*
-00397         if (!isdigit(buf[2]))
-00398                 return 0;
-00399         for (loop = 3; loop < 7; loop++) {
-00400                 if (buf[loop] == ' ')
-00401                         break;
-00402                 if ((!isdigit(buf[loop])) && (buf[loop] != ',') && (buf[loop] != '-'))
-00403                         return 0;
-00404         }
-00405 */
-00406         return 1;
-00407 }
-00408 
-00409 
-00410 char findbreak(int fp, long *offset, int *num1, int *num2, int *rangemax, unsigned short *size)
-00411 {
-00412         char buf[8];
-00413         //char buf2[20];
-00414         //char ch;
-00415         char loop=0;
-00416         long offset2;
-00417         int ch2, vs2, rm2;
-00418         bool flag;
-00419         long versestart = 0;
-00420         long chapstart = 0;
-00421         long bookstart = 0;
-00422         long teststart = 0;
-00423 
-00424         memset(buf, ' ', 8);
-00425 
-00426         while (1) {
-00427                 //cfile << "#" << buf << "#";
-00428                 //if (lseek(fp, 0, SEEK_CUR) > 2000000)
-00429                 //{
-00430                 //      cfile << lseek(fp, 0, SEEK_CUR) << "\n";
-00431                 //}
-00432                 if (starttest(buf)) {
-00433                         cfile << "\n{start of testament}\n";
-00434                         //chapstart = lseek(fp, 0, SEEK_CUR) - 7;
-00435                         teststart = lseek(fp, 0, SEEK_CUR) - 7;
-00436                         testoffset = teststart;
-00437                         memset(buf, ' ', 3);
-00438                         flag = false;
-00439                         for (loop = 3; loop < 6; loop++) {
-00440                                 if (buf[loop]!='>')
-00441                                         flag = true;
-00442                                 else {
-00443                                         buf[loop] = 0;
-00444                                         break;
-00445                                 }
-00446                         }
-00447                         ch2 = *num1;
-00448                         vs2 = 1;
-00449                         if (size) {
-00450                                 if (findbreak(fp, &offset2, &ch2, &vs2, &rm2, 0)) {
-00451                                         testsize = (unsigned short) (lseek(fp, 0, SEEK_END) - teststart-7);
-00452                                 }
-00453                                 else {
-00454                                         if (vs2) {
-00455                                                 testsize = (offset2 - teststart - 7);
-00456                                         }
-00457                                 }
-00458                                 lseek(fp, teststart+7, SEEK_SET);
-00459                                 cfile << "\nGot testsize " << testsize << "\n";
-00460                         }
-00461                 }
-00462 
-00463 
-00464                 if (startbook(buf)) {
-00465                         cfile << "\n{start of book}\n";
-00466                         bookmark++;
-00467                         //chapstart = lseek(fp, 0, SEEK_CUR) - 7;
-00468                         bookstart = lseek(fp, 0, SEEK_CUR) - 7;
-00469                         bookoffset = bookstart;
-00470                         memset(buf, ' ', 3);
-00471                         flag = false;
-00472                         for (loop = 3; loop < 6; loop++) {
-00473                                 if (buf[loop]!='>')
-00474                                         flag = true;
-00475                                 else {
-00476                                         buf[loop] = 0;
-00477                                         break;
-00478                                 }
-00479                         }
-00480                         if (size) {
-00481                                 ch2 = *num1;
-00482                                 vs2 = 1;
-00483                                 if (findbreak(fp, &offset2, &ch2, &vs2, &rm2, 0)) {
-00484                                         booksize = (unsigned short) (lseek(fp, 0, SEEK_END) - bookstart - 7);
-00485                                 }
-00486                                 else {
-00487                                         if (vs2) {
-00488                                                 booksize = (offset2 - bookstart - 7);
-00489                                         }
-00490                                 }
-00491                                 lseek(fp, bookstart+7, SEEK_SET);
-00492                                 cfile << "\nGot booksize " << booksize << "\n";
-00493                         }
-00494                 }
-00495 
-00496                 if (startchap(buf)) {
-00497                         cfile << "{start of chapter}";
-00498                         chapmark++;
-00499                         //chapstart = lseek(fp, 0, SEEK_CUR) - 7;
-00500                         chapstart = lseek(fp, 0, SEEK_CUR) - 7;
-00501                         chapoffset = chapstart;
-00502                         memset(buf, ' ', 3);
-00503                         flag = false;
-00504                         for (loop = 3; loop < 6; loop++) {
-00505                                 if (isdigit(buf[loop]))
-00506                                         flag = true;
-00507                                 else {
-00508                                         buf[loop] = 0;
-00509                                         break;
-00510                                 }
-00511                         }
-00512                         if (flag)
-00513                                 *num1 = atoi(buf);
-00514                         else    (*num1)++;
-00515 
-00516                         if (size) {
-00517                                 ch2 = *num1;
-00518                                 vs2 = 1;
-00519                                 lseek(fp, chapstart, SEEK_SET);
-00520                                 if (findbreak(fp, &offset2, &ch2, &vs2, &rm2, 0)) {
-00521                                         chapsize = (unsigned short) (lseek(fp, 0, SEEK_END) - chapstart);
-00522                                         cfile << "getting chapsizeend{" << chapsize << "} = " << lseek(fp, 0, SEEK_END) << " - " << chapstart << "\n";
-00523                                 }
-00524                                 else {
-00525                                         if (vs2) {
-00526                                                 chapsize = (offset2 - chapstart);
-00527                                                 cfile << "getting chapsize{" << chapsize << "} = " << offset2 << " - " << chapstart << "\n";
-00528                                         }
-00529                                 }
-00530                                 lseek(fp, chapstart + 7, SEEK_SET);
-00531                                 cfile << "\nGot chapsize " << chapsize << " loop{" << (int) loop << "}\n";
-00532                         }
-00533                         //return 0;
-00534 
-00535                 }
-00536                 if (startentry(buf)) {
-00537                         //cfile << "{start of verse}";
-00538                         memset(buf, ' ', 3);
-00539                         flag = false;
-00540                         for (loop = 3; loop < 6; loop++) {
-00541                                 if (isdigit(buf[loop]))
-00542                                         flag = true;
-00543                                 else {
-00544                                         buf[loop] = 0;
-00545                                         break;
-00546                                 }
-00547                         if (flag)
-00548                                 *num2 = atoi(buf);
-00549                         else    (*num2)++;
-00550                         }
-00551                         loop++;
-00552                         /*
-00553                         if (size)
-00554                         {
-00555                                 // *offset = lseek(fp, 0, SEEK_CUR) - (7 - loop);
-00556                                  *offset = lseek(fp, 0, SEEK_CUR) - 7;
-00557                         }
-00558                         //else  *offset = (chapstart) ? chapstart : lseek(fp, 0, SEEK_CUR) - 7;
-00559                         else    *offset = (chapstart) ? chapstart : lseek(fp, 0, SEEK_CUR) - 7;
-00560                         */
-00561                         /*if (chapstart)
-00562                         {
-00563                                 chapsize = *offset-chapstart;
-00564                         }
-00565                         else
-00566                         {
-00567                                 chapsize = 0;
-00568                         }*/
-00569                         *offset = lseek(fp, 0, SEEK_CUR) - 7;
-00570                         versestart = *offset;
-00571                         if (size) {
-00572                                 ch2 = *num1;
-00573                                 vs2 = *num2;
-00574                                 if (findbreak(fp, &offset2, &ch2, &vs2, &rm2, 0)) {
-00575                                         *size = (unsigned short) (lseek(fp, 0, SEEK_END) - versestart);
-00576                                         cfile << "getting sizeend{" << *size << "} = " << lseek(fp, 0, SEEK_END) << " - " << versestart << "\n";
-00577                                 }
-00578                                 else {
-00579                                         if (vs2) {
-00580                                                 *size = (offset2 - versestart);
-00581                                                 cfile << "getting size{" << *size << "} = " << offset2 << " - " << versestart << "\n";
-00582                                         }
-00583                                 }
-00584                                 lseek(fp, *offset+1, SEEK_SET);
-00585                         }
-00586                         else
-00587                         {
-00588                                 cfile << "got offset{" << *offset << "}\n";
-00589                         }
-00590                         return 0;
-00591                 }
-00592                 //cfile << "{ng}";
-00593                 //deadcount++;
-00594                 //if (deadcount==1000) exit(-1);
-00595                 //if (!size)
-00596                 //{
-00597                 //      cfile << "not bound offset{" << *offset << "}\n";
-00598                 //}
-00599                 memmove(buf, &buf[1], 6);
-00600                 if (read(fp, &buf[6], 1) != 1)
-00601                         return 1;
-00602         }
-00603 }
-00604 
-00605 
-00606 void openfiles(char *fname)
-00607 {
-00608 #ifndef O_BINARY                // O_BINARY is needed in Borland C++ 4.53
-00609 #define O_BINARY 0              // If it hasn't been defined than we probably
-00610 #endif                          // don't need it.
-00611         char buf[255];
-00612 
-00613         if ((fp = open(fname, O_RDONLY|O_BINARY)) == -1) {
-00614                 fprintf(stderr, "Couldn't open file: %s\n", fname);
-00615                 exit(1);
-00616         }
-00617 
-00618         sprintf(buf, "%s.vss", fname);
-00619         if ((vfp = open(buf, O_CREAT|O_WRONLY|O_BINARY|O_TRUNC)) == -1) {
-00620                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00621                 exit(1);
-00622         }
-00623 
-00624         sprintf(buf, "%s.cps", fname);
-00625         if ((cfp = open(buf, O_CREAT|O_WRONLY|O_BINARY|O_TRUNC)) == -1) {
-00626                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00627                 exit(1);
-00628         }
-00629 
-00630         sprintf(buf, "%s.bks", fname);
-00631         if ((bfp = open(buf, O_CREAT|O_WRONLY|O_BINARY|O_TRUNC)) == -1) {
-00632                 fprintf(stderr, "Couldn't open file: %s\n", buf);
-00633                 exit(1);
-00634         }
-00635         cfile.open("gbfidx.log", ios::out);
-00636         if (!cfile.is_open())
-00637         {
-00638                 cerr << "Failed to open log file\n";
-00639                 exit(-1);
-00640         }
-00641 }
-00642 
-00643 
-00644 void checkparams(int argc, char **argv)
-00645 {
-00646         if (argc < 2) {
-00647                 fprintf(stderr, "usage: %s <file to process> [nt - for new testmt file]\n", argv[0]);
-00648                 exit(1);
-00649         }
-00650         if (!strcmp(argv[1], "nt"))
-00651                 key1 = key2 = key3 = "Matthew 1:1";
-00652         else if (!strcmp(argv[1], "ot"))
-00653         {
-00654                         key1 = key2 = key3 = "Genesis 1:1";
-00655         }
-00656         else
-00657         {
-00658                 cerr << "File must be ot or nt\n";
-00659                 exit(-1);
-00660         }
-00661 }
-

Generated on Thu Jun 20 22:12:59 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/ztext_8cpp-source.html b/doc/api-documentation/html/ztext_8cpp-source.html deleted file mode 100644 index db219a0..0000000 --- a/doc/api-documentation/html/ztext_8cpp-source.html +++ /dev/null @@ -1,361 +0,0 @@ - - -ztext.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ztext.cpp

00001 /******************************************************************************
-00002  *  ztext.cpp - code for class 'zText'- a module that reads compressed text
-00003  *                              files: ot and nt using indexs ??.vss
-00004  */
-00005 
-00006 
-00007 #include <ctype.h>
-00008 #include <stdio.h>
-00009 #include <fcntl.h>
-00010 
-00011 #ifndef __GNUC__
-00012 #include <io.h>
-00013 #else
-00014 #include <unistd.h>
-00015 #endif
-00016 
-00017 #include <iostream.h>
-00018 #include <string.h>
-00019 #include <utilfuns.h>
-00020 //#include <rawverse.h>
-00021 #include <ztext.h>
-00022 //#include <zlib.h>
-00023 
-00024 
-00025 /******************************************************************************
-00026  * zText Constructor - Initializes data for instance of zText
-00027  *
-00028  * ENT: ipath - path to data files
-00029  *              iname - Internal name for module
-00030  *              idesc - Name to display to user for module
-00031  *              iblockType - verse, chapter, book, etc. of index chunks
-00032  *              icomp - Compressor object
-00033  *              idisp - Display object to use for displaying
-00034  */
-00035 
-00036 zText::zText(const char *ipath, const char *iname, const char *idesc, int iblockType, SWCompress *icomp, SWDisplay *idisp, SWTextEncoding enc, SWTextDirection dir, SWTextMarkup mark, const char* ilang) : zVerse(ipath, -1, iblockType, icomp), SWText(iname, idesc, idisp, enc, dir, mark, ilang)/*, SWCompress()*/
-00037 {
-00038         blockType = iblockType;
-00039         lastWriteKey = 0;
-00040 }
-00041 
-00042 
-00043 /******************************************************************************
-00044  * zText Destructor - Cleans up instance of zText
-00045  */
-00046 
-00047 zText::~zText()
-00048 {
-00049         flushCache();
-00050 
-00051         if (lastWriteKey)
-00052                 delete lastWriteKey;
-00053 }
-00054 
-00055 
-00056 /******************************************************************************
-00057  * zText::getRawEntry   - Returns the current verse buffer
-00058  *
-00059  * RET: buffer with verse
-00060  */
-00061 
-00062 char *zText::getRawEntry()
-00063 {
-00064 /*
-00065         long  start;
-00066         unsigned long size;
-00067         unsigned long destsize;
-00068         char *tmpbuf;
-00069         char *dest;
-00070         VerseKey *lkey = (VerseKey *) SWModule::key;
-00071         char sizebuf[3];
-00072 
-00073         lkey->Verse(0);
-00074         if (chapcache != lkey->Index()) {
-00075                 findoffset(lkey->Testament(), lkey->Index(), &start, &((unsigned short) size));
-00076                 gettext(lkey->Testament(), start, 3, sizebuf);
-00077                 memcpy(&size, sizebuf, 2);
-00078                 tmpbuf = new char [ size + 1 ];
-00079                 gettext(lkey->Testament(), start + 2, size + 1 , tmpbuf);
-00080                 //zBuf(&size, tmpbuf);
-00081                 dest = new char [ (size*4) + 1 ];
-00082                 uncompress((Bytef *)dest, &destsize, (Bytef *) tmpbuf, size);
-00083                 chapcache = lkey->Index();
-00084                 delete [] tmpbuf;
-00085         }
-00086 
-00087         //findoffset(key->Testament(), key->Index(), &start, &size);
-00088         findoffset(lkey->Testament(), lkey->Index(), &start, &((unsigned short) size));
-00089 
-00090         if (versebuf)
-00091                 delete [] versebuf;
-00092         versebuf = new char [ size + 1 ];
-00093         //memcpy(versebuf, Buf(), size);
-00094         memcpy(versebuf, dest, destsize);
-00095         delete [] dest;
-00096 
-00097         preptext(versebuf);
-00098 
-00099         return versebuf;
-00100 */
-00101 
-00102         long  start = 0;
-00103         unsigned short size = 0;
-00104         VerseKey *key = 0;
-00105 
-00106         //printf ("zText char *\n");
-00107 
-00108         // see if we have a VerseKey * or decendant
-00109 #ifndef _WIN32_WCE
-00110         try {
-00111 #endif
-00112                 key = SWDYNAMIC_CAST(VerseKey, this->key);
-00113 #ifndef _WIN32_WCE
-00114         }
-00115         catch ( ... ) {}
-00116 #endif
-00117         // if we don't have a VerseKey * decendant, create our own
-00118         if (!key)
-00119                 key = new VerseKey(this->key);
-00120 
-00121         //printf ("checking cache\n");
-00122         //printf ("finding offset\n");
-00123         findoffset(key->Testament(), key->Index(), &start, &size);
-00124         entrySize = size;        // support getEntrySize call
-00125 
-00126         //printf ("deleting previous buffer\n");
-00127         unsigned long newsize = (size + 2) * FILTERPAD;
-00128         if (newsize > entrybufallocsize) {
-00129                 if (entrybuf)
-00130                         delete [] entrybuf;
-00131                 entrybuf = new char [ newsize ];
-00132                 entrybufallocsize = newsize;
-00133         }
-00134         *entrybuf = 0;
-00135 
-00136         //printf ("getting text\n");
-00137         swgettext(key->Testament(), start, (size + 2), entrybuf);
-00138         //printf ("got text\n");
-00139 
-00140         rawFilter(entrybuf, size, key);
-00141 
-00142         //printf ("preparing text\n");
-00143         if (!isUnicode())
-00144                 preptext(entrybuf);
-00145 
-00146         if (this->key != key) // free our key if we created a VerseKey
-00147                 delete key;
-00148 
-00149         //printf ("returning text\n");
-00150         return entrybuf;
-00151 
-00152 }
-00153 
-00154 
-00155 bool zText::sameBlock(VerseKey *k1, VerseKey *k2) {
-00156         if (k1->Testament() != k2->Testament())
-00157                 return false;
-00158 
-00159         switch (blockType) {
-00160         case VERSEBLOCKS:
-00161                 if (k1->Verse() != k2->Verse())
-00162                         return false;
-00163         case CHAPTERBLOCKS:
-00164                 if (k1->Chapter() != k2->Chapter())
-00165                         return false;
-00166         case BOOKBLOCKS:
-00167                 if (k1->Book() != k2->Book())
-00168                         return false;
-00169         }
-00170         return true;
-00171 }
-00172 
-00173 
-00174 SWModule &zText::setentry(const char *inbuf, long len) {
-00175         VerseKey *key = 0;
-00176         // see if we have a VerseKey * or decendant
-00177 #ifndef _WIN32_WCE
-00178         try {
-00179 #endif
-00180                 key = SWDYNAMIC_CAST(VerseKey, this->key);
-00181 #ifndef _WIN32_WCE
-00182         }
-00183         catch ( ... ) {}
-00184 #endif
-00185         // if we don't have a VerseKey * decendant, create our own
-00186         if (!key)
-00187                 key = new VerseKey(this->key);
-00188 
-00189 
-00190         // see if we've jumped across blocks since last write
-00191         if (lastWriteKey) {
-00192                 if (!sameBlock(lastWriteKey, key)) {
-00193                         flushCache();
-00194                 }
-00195                 delete lastWriteKey;
-00196         }
-00197 
-00198         settext(key->Testament(), key->Index(), inbuf, len);
-00199 
-00200         lastWriteKey = (VerseKey *)key->clone();        // must delete
-00201 
-00202         if (this->key != key) // free our key if we created a VerseKey
-00203                 delete key;
-00204 
-00205         return *this;
-00206 }
-00207 
-00208 SWModule &zText::operator <<(const char *inbuf) {
-00209         return setentry(inbuf, 0);
-00210 }
-00211 
-00212 
-00213 SWModule &zText::operator <<(const SWKey *inkey) {
-00214         VerseKey *destkey = 0;
-00215         const VerseKey *srckey = 0;
-00216         // see if we have a VerseKey * or decendant
-00217 #ifndef _WIN32_WCE
-00218         try {
-00219 #endif
-00220                 destkey = SWDYNAMIC_CAST(VerseKey, this->key);
-00221 #ifndef _WIN32_WCE
-00222         }
-00223         catch ( ... ) {}
-00224 #endif
-00225         // if we don't have a VerseKey * decendant, create our own
-00226         if (!destkey)
-00227                 destkey = new VerseKey(this->key);
-00228 
-00229         // see if we have a VerseKey * or decendant
-00230 #ifndef _WIN32_WCE
-00231         try {
-00232 #endif
-00233                 srckey = (const VerseKey *) SWDYNAMIC_CAST(VerseKey, inkey);
-00234 #ifndef _WIN32_WCE
-00235         }
-00236         catch ( ... ) {
-00237         }
-00238 #endif
-00239         // if we don't have a VerseKey * decendant, create our own
-00240         if (!srckey)
-00241                 srckey = new VerseKey(inkey);
-00242 
-00243         linkentry(destkey->Testament(), destkey->Index(), srckey->Index());
-00244 
-00245         if (this->key != destkey) // free our key if we created a VerseKey
-00246                 delete destkey;
-00247 
-00248         if (inkey != srckey) // free our key if we created a VerseKey
-00249                 delete srckey;
-00250 
-00251         return *this;
-00252 }
-00253 
-00254 
-00255 /******************************************************************************
-00256  * zFiles::deleteEntry  - deletes this entry
-00257  *
-00258  * RET: *this
-00259  */
-00260 
-00261 void zText::deleteEntry() {
-00262 
-00263         VerseKey *key = 0;
-00264 
-00265 #ifndef _WIN32_WCE
-00266         try {
-00267 #endif
-00268                 key = SWDYNAMIC_CAST(VerseKey, this->key);
-00269 #ifndef _WIN32_WCE
-00270         }
-00271         catch ( ... ) {}
-00272 #endif
-00273         if (!key)
-00274                 key = new VerseKey(this->key);
-00275 
-00276         settext(key->Testament(), key->Index(), "");
-00277 
-00278         if (key != this->key)
-00279                 delete key;
-00280 }
-00281 
-00282 
-00283 /******************************************************************************
-00284  * zText::operator +=   - Increments module key a number of entries
-00285  *
-00286  * ENT: increment       - Number of entries to jump forward
-00287  *
-00288  * RET: *this
-00289  */
-00290 
-00291 SWModule &zText::operator +=(int increment)
-00292 {
-00293         long  start;
-00294         unsigned short size;
-00295         VerseKey *tmpkey = 0;
-00296 
-00297 #ifndef _WIN32_WCE
-00298         try {
-00299 #endif
-00300                 tmpkey = SWDYNAMIC_CAST(VerseKey, key);
-00301 #ifndef _WIN32_WCE
-00302         }
-00303         catch ( ... ) {}
-00304 #endif
-00305         if (!tmpkey)
-00306                 tmpkey = new VerseKey(key);
-00307 
-00308         findoffset(tmpkey->Testament(), tmpkey->Index(), &start, &size);
-00309 
-00310         SWKey lastgood = *tmpkey;
-00311         while (increment) {
-00312                 long laststart = start;
-00313                 unsigned short lastsize = size;
-00314                 SWKey lasttry = *tmpkey;
-00315                 (increment > 0) ? (*key)++ : (*key)--;
-00316                 if (tmpkey != key)
-00317                         delete tmpkey;
-00318                 tmpkey = 0;
-00319 #ifndef _WIN32_WCE
-00320                 try {
-00321 #endif
-00322                         tmpkey = SWDYNAMIC_CAST(VerseKey, key);
-00323 #ifndef _WIN32_WCE
-00324                 }
-00325                 catch ( ... ) {}
-00326 #endif
-00327                 if (!tmpkey)
-00328                         tmpkey = new VerseKey(key);
-00329 
-00330                 if ((error = key->Error())) {
-00331                         *key = lastgood;
-00332                         break;
-00333                 }
-00334                 long index = tmpkey->Index();
-00335                 findoffset(tmpkey->Testament(), index, &start, &size);
-00336                 if ((((laststart != start) || (lastsize != size))||(!skipConsecutiveLinks)) && (start >= 0) && (size)) {
-00337                         increment += (increment < 0) ? 1 : -1;
-00338                         lastgood = *tmpkey;
-00339                 }
-00340         }
-00341         error = (error) ? KEYERR_OUTOFBOUNDS : 0;
-00342 
-00343         if (tmpkey != key)
-00344                 delete tmpkey;
-00345 
-00346         return *this;
-00347 }
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/ztext_8h-source.html b/doc/api-documentation/html/ztext_8h-source.html deleted file mode 100644 index 255a71f..0000000 --- a/doc/api-documentation/html/ztext_8h-source.html +++ /dev/null @@ -1,84 +0,0 @@ - - -ztext.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

ztext.h

00001 /******************************************************************************
-00002  *  ztext.h   - code for class 'zText'- a module that reads compressed text
-00003  *                              files: ot and nt using indexs ??.vss
-00004  *
-00005  * $Id: ztext_8h-source.html,v 1.7 2002/06/20 20:23:10 mgruner Exp $
-00006  *
-00007  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
-00008  *      CrossWire Bible Society
-00009  *      P. O. Box 2528
-00010  *      Tempe, AZ  85280-2528
-00011  *
-00012  * This program is free software; you can redistribute it and/or modify it
-00013  * under the terms of the GNU General Public License as published by the
-00014  * Free Software Foundation version 2.
-00015  *
-00016  * This program is distributed in the hope that it will be useful, but
-00017  * WITHOUT ANY WARRANTY; without even the implied warranty of
-00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-00019  * General Public License for more details.
-00020  *
-00021  */
-00022 
-00023 #ifndef ZTEXT_H
-00024 #define ZTEXT_H
-00025 
-00026 #include <zverse.h>
-00027 #include <swtext.h>
-00028 //#include <swcomprs.h>
-00029 
-00030 #include <defs.h>
-00031 
-00032 /*** SWModule implementation for compressed modules
-00033 * This class handles compressed modules.
-00034 * It should not be used in frontends, unless you are doing very special things.
-00035 */
-00036 class SWDLLEXPORT zText:public zVerse, public SWText {
-00037      VerseKey *lastWriteKey;
-00038      bool sameBlock (VerseKey * lastWriteKey, VerseKey * key);
-00039         int blockType;
-00040 public:
-00041   
-00042     
-00043         zText(const char *ipath, const char *iname = 0, const char *idesc =
-00044            0, int blockType = CHAPTERBLOCKS, SWCompress * icomp =
-00045            0, SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN,
-00046            const char* ilang = 0);
-00047         virtual ~zText ();
-00048         virtual char *getRawEntry();
-00049 
-00050      virtual SWModule & operator += (int increment);
-00051      virtual SWModule & operator -= (int decrement) { return this->operator += (-decrement); }
-00052 
-00053   // write interface ----------------------------
-00054         virtual bool isWritable () { return ((idxfp[0]->getFd() > 0) && ((idxfp[0]->mode & O_RDWR) == O_RDWR)); }
-00055         static char createModule (const char *path, int blockBound) {
-00056                 return zVerse::createModule (path, blockBound);
-00057         }
-00058 
-00059      virtual SWModule & setentry (const char *inbuf, long len); // Modify current module entry
-00060      virtual SWModule & operator << (const char *inbuf);        // Modify current module entry
-00061      virtual SWModule & operator << (const SWKey * linkKey);    // Link current module entry to other module entry
-00062      virtual void deleteEntry ();       // Delete current module entry
-00063   // end write interface ------------------------
-00064   
-00065         // swcacher interface ----------------------
-00066         virtual void flush() { flushCache(); }
-00067         // end swcacher interface ----------------------
-00068 };
-00069 
-00070 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/zutil_8h-source.html b/doc/api-documentation/html/zutil_8h-source.html deleted file mode 100644 index 58ed594..0000000 --- a/doc/api-documentation/html/zutil_8h-source.html +++ /dev/null @@ -1,234 +0,0 @@ - - -zutil.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

zutil.h

00001 /* zutil.h -- internal interface and configuration of the compression library
-00002  * Copyright (C) 1995-1998 Jean-loup Gailly.
-00003  * For conditions of distribution and use, see copyright notice in zlib.h
-00004  */
-00005 
-00006 /* WARNING: this file should *not* be used by applications. It is
-00007    part of the implementation of the compression library and is
-00008    subject to change. Applications should only use zlib.h.
-00009  */
-00010 
-00011 /* @(#) $Id: zutil_8h-source.html,v 1.3 2002/06/20 20:23:10 mgruner Exp $ */
-00012 
-00013 #ifndef _Z_UTIL_H
-00014 #define _Z_UTIL_H
-00015 
-00016 #include "zlib.h"
-00017 
-00018 #ifdef STDC
-00019 #  include <stddef.h>
-00020 #  include <string.h>
-00021 #  include <stdlib.h>
-00022 #endif
-00023 #ifdef NO_ERRNO_H
-00024     extern int errno;
-00025 #else
-00026 #   include <errno.h>
-00027 #endif
-00028 
-00029 #ifndef local
-00030 #  define local static
-00031 #endif
-00032 /* compile with -Dlocal if your debugger can't find static symbols */
-00033 
-00034 typedef unsigned char  uch;
-00035 typedef uch FAR uchf;
-00036 typedef unsigned short ush;
-00037 typedef ush FAR ushf;
-00038 typedef unsigned long  ulg;
-00039 
-00040 extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */
-00041 /* (size given to avoid silly warnings with Visual C++) */
-00042 
-00043 #define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
-00044 
-00045 #define ERR_RETURN(strm,err) \
-00046   return (strm->msg = (char*)ERR_MSG(err), (err))
-00047 /* To be used only when the state is known to be valid */
-00048 
-00049         /* common constants */
-00050 
-00051 #ifndef DEF_WBITS
-00052 #  define DEF_WBITS MAX_WBITS
-00053 #endif
-00054 /* default windowBits for decompression. MAX_WBITS is for compression only */
-00055 
-00056 #if MAX_MEM_LEVEL >= 8
-00057 #  define DEF_MEM_LEVEL 8
-00058 #else
-00059 #  define DEF_MEM_LEVEL  MAX_MEM_LEVEL
-00060 #endif
-00061 /* default memLevel */
-00062 
-00063 #define STORED_BLOCK 0
-00064 #define STATIC_TREES 1
-00065 #define DYN_TREES    2
-00066 /* The three kinds of block type */
-00067 
-00068 #define MIN_MATCH  3
-00069 #define MAX_MATCH  258
-00070 /* The minimum and maximum match lengths */
-00071 
-00072 #define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
-00073 
-00074         /* target dependencies */
-00075 
-00076 #ifdef MSDOS
-00077 #  define OS_CODE  0x00
-00078 #  if defined(__TURBOC__) || defined(__BORLANDC__)
-00079 #    if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
-00080        /* Allow compilation with ANSI keywords only enabled */
-00081        void _Cdecl farfree( void *block );
-00082        void *_Cdecl farmalloc( unsigned long nbytes );
-00083 #    else
-00084 #     include <alloc.h>
-00085 #    endif
-00086 #  else /* MSC or DJGPP */
-00087 #    include <malloc.h>
-00088 #  endif
-00089 #endif
-00090 
-00091 #ifdef OS2
-00092 #  define OS_CODE  0x06
-00093 #endif
-00094 
-00095 #ifdef WIN32 /* Window 95 & Windows NT */
-00096 #  define OS_CODE  0x0b
-00097 #endif
-00098 
-00099 #if defined(VAXC) || defined(VMS)
-00100 #  define OS_CODE  0x02
-00101 #  define F_OPEN(name, mode) \
-00102      fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
-00103 #endif
-00104 
-00105 #ifdef AMIGA
-00106 #  define OS_CODE  0x01
-00107 #endif
-00108 
-00109 #if defined(ATARI) || defined(atarist)
-00110 #  define OS_CODE  0x05
-00111 #endif
-00112 
-00113 #if defined(MACOS) || defined(TARGET_OS_MAC)
-00114 #  define OS_CODE  0x07
-00115 #  if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
-00116 #    include <unix.h> /* for fdopen */
-00117 #  else
-00118 #    ifndef fdopen
-00119 #      define fdopen(fd,mode) NULL /* No fdopen() */
-00120 #    endif
-00121 #  endif
-00122 #endif
-00123 
-00124 #ifdef __50SERIES /* Prime/PRIMOS */
-00125 #  define OS_CODE  0x0F
-00126 #endif
-00127 
-00128 #ifdef TOPS20
-00129 #  define OS_CODE  0x0a
-00130 #endif
-00131 
-00132 #if defined(_BEOS_) || defined(RISCOS)
-00133 #  define fdopen(fd,mode) NULL /* No fdopen() */
-00134 #endif
-00135 
-00136 #if (defined(_MSC_VER) && (_MSC_VER > 600))
-00137 #  define fdopen(fd,type)  _fdopen(fd,type)
-00138 #endif
-00139 
-00140 
-00141         /* Common defaults */
-00142 
-00143 #ifndef OS_CODE
-00144 #  define OS_CODE  0x03  /* assume Unix */
-00145 #endif
-00146 
-00147 #ifndef F_OPEN
-00148 #  define F_OPEN(name, mode) fopen((name), (mode))
-00149 #endif
-00150 
-00151          /* functions */
-00152 
-00153 #ifdef HAVE_STRERROR
-00154    extern char *strerror OF((int));
-00155 #  define zstrerror(errnum) strerror(errnum)
-00156 #else
-00157 #  define zstrerror(errnum) ""
-00158 #endif
-00159 
-00160 #if defined(pyr)
-00161 #  define NO_MEMCPY
-00162 #endif
-00163 #if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
-00164  /* Use our own functions for small and medium model with MSC <= 5.0.
-00165   * You may have to use the same strategy for Borland C (untested).
-00166   * The __SC__ check is for Symantec.
-00167   */
-00168 #  define NO_MEMCPY
-00169 #endif
-00170 #if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY)
-00171 #  define HAVE_MEMCPY
-00172 #endif
-00173 #ifdef HAVE_MEMCPY
-00174 #  ifdef SMALL_MEDIUM /* MSDOS small or medium model */
-00175 #    define zmemcpy _fmemcpy
-00176 #    define zmemcmp _fmemcmp
-00177 #    define zmemzero(dest, len) _fmemset(dest, 0, len)
-00178 #  else
-00179 #    define zmemcpy memcpy
-00180 #    define zmemcmp memcmp
-00181 #    define zmemzero(dest, len) memset(dest, 0, len)
-00182 #  endif
-00183 #else
-00184    extern void zmemcpy  OF((Bytef* dest, const Bytef* source, uInt len));
-00185    extern int  zmemcmp  OF((const Bytef* s1, const Bytef* s2, uInt len));
-00186    extern void zmemzero OF((Bytef* dest, uInt len));
-00187 #endif
-00188 
-00189 /* Diagnostic functions */
-00190 #ifdef DEBUG
-00191 #  include <stdio.h>
-00192    extern int z_verbose;
-00193    extern void z_error    OF((char *m));
-00194 #  define Assert(cond,msg) {if(!(cond)) z_error(msg);}
-00195 #  define Trace(x) {if (z_verbose>=0) fprintf x ;}
-00196 #  define Tracev(x) {if (z_verbose>0) fprintf x ;}
-00197 #  define Tracevv(x) {if (z_verbose>1) fprintf x ;}
-00198 #  define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;}
-00199 #  define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;}
-00200 #else
-00201 #  define Assert(cond,msg)
-00202 #  define Trace(x)
-00203 #  define Tracev(x)
-00204 #  define Tracevv(x)
-00205 #  define Tracec(c,x)
-00206 #  define Tracecv(c,x)
-00207 #endif
-00208 
-00209 
-00210 typedef uLong (ZEXPORT *check_func) OF((uLong check, const Bytef *buf,
-00211                                        uInt len));
-00212 voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));
-00213 void   zcfree  OF((voidpf opaque, voidpf ptr));
-00214 
-00215 #define ZALLOC(strm, items, size) \
-00216            (*((strm)->zalloc))((strm)->opaque, (items), (size))
-00217 #define ZFREE(strm, addr)  (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
-00218 #define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
-00219 
-00220 #endif /* _Z_UTIL_H */
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/zverse_8cpp-source.html b/doc/api-documentation/html/zverse_8cpp-source.html deleted file mode 100644 index 737b9db..0000000 --- a/doc/api-documentation/html/zverse_8cpp-source.html +++ /dev/null @@ -1,529 +0,0 @@ - - -zverse.cpp Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

zverse.cpp

00001 /******************************************************************************
-00002  *  zverse.h   - code for class 'zVerse'- a module that reads raw text
-00003  *                              files:  ot and nt using indexs ??.bks ??.cps ??.vss
-00004  *                              and provides lookup and parsing functions based on
-00005  *                              class VerseKey for compressed modules
-00006  */
-00007 
-00008 
-00009 #include <ctype.h>
-00010 #include <stdio.h>
-00011 #include <fcntl.h>
-00012 #include <errno.h>
-00013 #include <stdlib.h>
-00014 
-00015 #ifndef __GNUC__
-00016 #include <io.h>
-00017 #else
-00018 #include <unistd.h>
-00019 #endif
-00020 
-00021 #include <string.h>
-00022 #include <utilfuns.h>
-00023 #include <versekey.h>
-00024 #include <zverse.h>
-00025 #include <sysdata.h>
-00026 
-00027 
-00028 #ifndef O_BINARY
-00029 #define O_BINARY 0
-00030 #endif
-00031 
-00032 
-00033 /******************************************************************************
-00034  * zVerse Statics
-00035  */
-00036 
-00037 int zVerse::instance = 0;
-00038 
-00039 const char zVerse::uniqueIndexID[] = {'X', 'r', 'v', 'c', 'b'};
-00040 
-00041 /******************************************************************************
-00042  * zVerse Constructor - Initializes data for instance of zVerse
-00043  *
-00044  * ENT: ipath - path of the directory where data and index files are located.
-00045  *              be sure to include the trailing separator (e.g. '/' or '\')
-00046  *              (e.g. 'modules/texts/rawtext/webster/')
-00047  *              fileMode - open mode for the files (O_RDONLY, etc.)
-00048  *              blockType - verse, chapter, book, etc.
-00049  */
-00050 
-00051 zVerse::zVerse(const char *ipath, int fileMode, int blockType, SWCompress *icomp)
-00052 {
-00053         char buf[127];
-00054 
-00055         nl = '\n';
-00056         path = 0;
-00057         cacheBufIdx = -1;
-00058         cacheTestament = 0;
-00059         cacheBuf = 0;
-00060         dirtyCache = false;
-00061         stdstr(&path, ipath);
-00062 
-00063         if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\'))
-00064                 path[strlen(path)-1] = 0;
-00065 
-00066         compressor = (icomp) ? icomp : new SWCompress();
-00067 
-00068         if (fileMode == -1) { // try read/write if possible
-00069                 fileMode = O_RDWR;
-00070         }
-00071                 
-00072         sprintf(buf, "%s/ot.%czs", path, uniqueIndexID[blockType]);
-00073         idxfp[0] = FileMgr::systemFileMgr.open(buf, fileMode|O_BINARY, true);
-00074 
-00075         sprintf(buf, "%s/nt.%czs", path, uniqueIndexID[blockType]);
-00076         idxfp[1] = FileMgr::systemFileMgr.open(buf, fileMode|O_BINARY, true);
-00077 
-00078         sprintf(buf, "%s/ot.%czz", path, uniqueIndexID[blockType]);
-00079         textfp[0] = FileMgr::systemFileMgr.open(buf, fileMode|O_BINARY, true);
-00080 
-00081         sprintf(buf, "%s/nt.%czz", path, uniqueIndexID[blockType]);
-00082         textfp[1] = FileMgr::systemFileMgr.open(buf, fileMode|O_BINARY, true);
-00083 
-00084         sprintf(buf, "%s/ot.%czv", path, uniqueIndexID[blockType]);
-00085         compfp[0] = FileMgr::systemFileMgr.open(buf, fileMode|O_BINARY, true);
-00086 
-00087         sprintf(buf, "%s/nt.%czv", path, uniqueIndexID[blockType]);
-00088         compfp[1] = FileMgr::systemFileMgr.open(buf, fileMode|O_BINARY, true);
-00089         
-00090         instance++;
-00091 }
-00092 
-00093 
-00094 /******************************************************************************
-00095  * zVerse Destructor - Cleans up instance of zVerse
-00096  */
-00097 
-00098 zVerse::~zVerse()
-00099 {
-00100         int loop1;
-00101 
-00102         if (cacheBuf) {
-00103                 flushCache();
-00104                 free(cacheBuf);
-00105         }
-00106 
-00107         if (path)
-00108                 delete [] path;
-00109 
-00110         if (compressor)
-00111                 delete compressor;
-00112 
-00113         --instance;
-00114 
-00115         for (loop1 = 0; loop1 < 2; loop1++) {
-00116                 FileMgr::systemFileMgr.close(idxfp[loop1]);
-00117                 FileMgr::systemFileMgr.close(textfp[loop1]);
-00118                 FileMgr::systemFileMgr.close(compfp[loop1]);
-00119         }
-00120 }
-00121 
-00122 
-00123 /******************************************************************************
-00124  * zVerse::findoffset   - Finds the offset of the key verse from the indexes
-00125  *
-00126  *
-00127  *
-00128  * ENT: testmt  - testament to find (0 - Bible/module introduction)
-00129  *      book    - book      to find (0 - testament    introduction)
-00130  *      chapter - chapter   to find (0 - book         introduction)
-00131  *      verse   - verse     to find (0 - chapter      introduction)
-00132  *      start   - address to store the starting offset
-00133  *      size    - address to store the size of the entry
-00134  */
-00135 
-00136 void zVerse::findoffset(char testmt, long idxoff, long *start, unsigned short *size)
-00137 {
-00138         // set start to offset in
-00139         // set size to
-00140         // set
-00141         unsigned long ulBuffNum=0;                // buffer number
-00142         unsigned long ulVerseStart=0;          // verse offset within buffer
-00143         unsigned short usVerseSize=0;          // verse size
-00144         unsigned long ulCompOffset=0;          // compressed buffer start
-00145         unsigned long ulCompSize=0;                  // buffer size compressed
-00146         unsigned long ulUnCompSize=0;             // buffer size uncompressed
-00147         char *pcCompText=NULL;                                   // compressed text
-00148 
-00149         *start = *size = 0;
-00150         //printf ("Finding offset %ld\n", idxoff);
-00151         idxoff *= 10;
-00152         if (!testmt) {
-00153                 testmt = ((idxfp[0]) ? 1:2);
-00154         }
-00155         
-00156         // assert we have and valid file descriptor
-00157         if (compfp[testmt-1]->getFd() < 1)
-00158                 return;
-00159                 
-00160         long newOffset = lseek(compfp[testmt-1]->getFd(), idxoff, SEEK_SET);
-00161         if (newOffset == idxoff) {
-00162                 if (read(compfp[testmt-1]->getFd(), &ulBuffNum, 4) != 4) {
-00163                         printf ("Error reading ulBuffNum\n");
-00164                         return;
-00165                 }
-00166         }
-00167         else return;
-00168 
-00169         ulBuffNum = swordtoarch32(ulBuffNum);
-00170 
-00171         if (read(compfp[testmt-1]->getFd(), &ulVerseStart, 4) < 2)
-00172         {
-00173                 printf ("Error reading ulVerseStart\n");
-00174                 return;
-00175         }
-00176         if (read(compfp[testmt-1]->getFd(), &usVerseSize, 2) < 2)
-00177         {
-00178                 printf ("Error reading usVerseSize\n");
-00179                 return;
-00180         }
-00181 
-00182         *start = swordtoarch32(ulVerseStart);
-00183         *size = swordtoarch16(usVerseSize);
-00184 
-00185         if (*size) {
-00186                 if (((long) ulBuffNum == cacheBufIdx) && (testmt == cacheTestament) && (cacheBuf)) {
-00187                         // have the text buffered
-00188                         return;
-00189                 }
-00190 
-00191                 //printf ("Got buffer number{%ld} versestart{%ld} versesize{%d}\n", ulBuffNum, ulVerseStart, usVerseSize);
-00192 
-00193 
-00194                 if (lseek(idxfp[testmt-1]->getFd(), ulBuffNum*12, SEEK_SET)!=(long) ulBuffNum*12)
-00195                 {
-00196                         printf ("Error seeking compressed file index\n");
-00197                         return;
-00198                 }
-00199                 if (read(idxfp[testmt-1]->getFd(), &ulCompOffset, 4)<4)
-00200                 {
-00201                         printf ("Error reading ulCompOffset\n");
-00202                         return;
-00203                 }
-00204                 if (read(idxfp[testmt-1]->getFd(), &ulCompSize, 4)<4)
-00205                 {
-00206                         printf ("Error reading ulCompSize\n");
-00207                         return;
-00208                 }
-00209                 if (read(idxfp[testmt-1]->getFd(), &ulUnCompSize, 4)<4)
-00210                 {
-00211                         printf ("Error reading ulUnCompSize\n");
-00212                         return;
-00213                 }
-00214 
-00215                 ulCompOffset  = swordtoarch32(ulCompOffset);
-00216                 ulCompSize  = swordtoarch32(ulCompSize);
-00217                 ulUnCompSize  = swordtoarch32(ulUnCompSize);
-00218 
-00219                 if (lseek(textfp[testmt-1]->getFd(), ulCompOffset, SEEK_SET)!=(long)ulCompOffset)
-00220                 {
-00221                         printf ("Error: could not seek to right place in compressed text\n");
-00222                         return;
-00223                 }
-00224                 pcCompText = new char[ulCompSize];
-00225 
-00226                 if (read(textfp[testmt-1]->getFd(), pcCompText, ulCompSize)<(long)ulCompSize)
-00227                 {
-00228                         printf ("Error reading compressed text\n");
-00229                         return;
-00230                 }
-00231                 compressor->zBuf(&ulCompSize, pcCompText);
-00232 
-00233                 if (cacheBuf) {
-00234                         flushCache();
-00235                         free(cacheBuf);
-00236                 }
-00237                 
-00238                 unsigned long len = 0;
-00239                 compressor->Buf(0, &len);
-00240                 cacheBuf = (char *)calloc(len + 1, 1);
-00241                 memcpy(cacheBuf, compressor->Buf(), len);
-00242 
-00243                 cacheTestament = testmt;
-00244                 cacheBufIdx = ulBuffNum;
-00245         }
-00246 }
-00247 
-00248 
-00249 /******************************************************************************
-00250  * zVerse::swgettext    - gets text at a given offset
-00251  *
-00252  * ENT: testmt  - testament file to search in (0 - Old; 1 - New)
-00253  *      start   - starting offset where the text is located in the file
-00254  *      size    - size of text entry + 1 (null)
-00255  *      buf     - buffer to store text
-00256  *
-00257  */
-00258 
-00259 void zVerse::swgettext(char testmt, long start, unsigned short size, char *inbuf)
-00260 {
-00261         memset(inbuf, 0, size);
-00262         if (size > 2) {
-00263                 strncpy(inbuf, &(cacheBuf[start]), size-2);
-00264         }
-00265 }
-00266 
-00267 
-00268 /******************************************************************************
-00269  * zVerse::settext      - Sets text for current offset
-00270  *
-00271  * ENT: testmt  - testament to find (0 - Bible/module introduction)
-00272  *      idxoff  - offset into .vss
-00273  *      buf     - buffer to store
-00274  *      len     - length of buffer (0 - null terminated)
-00275  */
-00276 
-00277 void zVerse::settext(char testmt, long idxoff, const char *buf, long len)
-00278 {
-00279         if (!testmt) 
-00280                 testmt = ((idxfp[0]) ? 1:2);
-00281         if ((!dirtyCache) || (cacheBufIdx < 0)) {
-00282                 cacheBufIdx = lseek(idxfp[testmt-1]->getFd(), 0, SEEK_END) / 12;
-00283                 cacheTestament = testmt;
-00284                 if (cacheBuf)
-00285                         free(cacheBuf);
-00286                 cacheBuf = (char *)calloc(len ? len : strlen(buf)+1, 1);
-00287         }
-00288         else cacheBuf = (char *)((cacheBuf)?realloc(cacheBuf, strlen(cacheBuf)+(len ? len : strlen(buf)+1)):calloc((len ? len : strlen(buf)+1), 1));
-00289 
-00290         dirtyCache = true;
-00291 
-00292         unsigned long start, outstart;
-00293         unsigned long outBufIdx = cacheBufIdx;
-00294         unsigned short size;
-00295         unsigned short outsize;
-00296 
-00297         idxoff *= 10;
-00298         size = outsize = len ? len : strlen(buf);
-00299 
-00300         start = strlen(cacheBuf);
-00301 
-00302         if (!size)
-00303                 start = outBufIdx = 0;
-00304 
-00305         outBufIdx = archtosword32(outBufIdx);
-00306         outstart  = archtosword32(start);
-00307         outsize   = archtosword16(size);
-00308 
-00309         lseek(compfp[testmt-1]->getFd(), idxoff, SEEK_SET);
-00310         write(compfp[testmt-1]->getFd(), &outBufIdx, 4);
-00311         write(compfp[testmt-1]->getFd(), &outstart, 4);
-00312         write(compfp[testmt-1]->getFd(), &outsize, 2);
-00313         strcat(cacheBuf, buf);
-00314 }
-00315 
-00316 
-00317 void zVerse::flushCache() {
-00318         if (dirtyCache) {
-00319                 unsigned long idxoff;
-00320                 unsigned long start, outstart;
-00321                 unsigned long size, outsize;
-00322                 unsigned long zsize, outzsize;
-00323 
-00324                 idxoff = cacheBufIdx * 12;
-00325                 size = outsize = zsize = outzsize = strlen(cacheBuf);
-00326                 if (size) {
-00327 //                      if (compressor) {
-00328 //                              delete compressor;
-00329 //                              compressor = new LZSSCompress();
-00330 //                      }
-00331                         compressor->Buf(cacheBuf);
-00332                         compressor->zBuf(&zsize);
-00333                         outzsize = zsize;
-00334 
-00335                         start = outstart = lseek(textfp[cacheTestament-1]->getFd(), 0, SEEK_END);
-00336 
-00337                         outstart  = archtosword32(start);
-00338                         outsize   = archtosword32(size);
-00339                         outzsize  = archtosword32(zsize);
-00340 
-00341                         write(textfp[cacheTestament-1]->getFd(), compressor->zBuf(&zsize), zsize);
-00342 
-00343                         lseek(idxfp[cacheTestament-1]->getFd(), idxoff, SEEK_SET);
-00344                         write(idxfp[cacheTestament-1]->getFd(), &outstart, 4);
-00345                         write(idxfp[cacheTestament-1]->getFd(), &outzsize, 4);
-00346                         write(idxfp[cacheTestament-1]->getFd(), &outsize, 4);
-00347                 }
-00348                 dirtyCache = false;
-00349         }
-00350 }
-00351 
-00352 /******************************************************************************
-00353  * RawVerse::linkentry  - links one entry to another
-00354  *
-00355  * ENT: testmt  - testament to find (0 - Bible/module introduction)
-00356  *      destidxoff      - dest offset into .vss
-00357  *      srcidxoff               - source offset into .vss
-00358  */
-00359 
-00360 void zVerse::linkentry(char testmt, long destidxoff, long srcidxoff) {
-00361         long bufidx;
-00362         long start;
-00363         unsigned short size;
-00364 
-00365         destidxoff *= 10;
-00366         srcidxoff  *= 10;
-00367 
-00368         if (!testmt)
-00369                 testmt = ((idxfp[1]) ? 1:2);
-00370 
-00371         // get source
-00372         lseek(compfp[testmt-1]->getFd(), srcidxoff, SEEK_SET);
-00373         read(compfp[testmt-1]->getFd(), &bufidx, 4);
-00374         read(compfp[testmt-1]->getFd(), &start, 4);
-00375         read(compfp[testmt-1]->getFd(), &size, 2);
-00376 
-00377         // write dest
-00378         lseek(compfp[testmt-1]->getFd(), destidxoff, SEEK_SET);
-00379         write(compfp[testmt-1]->getFd(), &bufidx, 4);
-00380         write(compfp[testmt-1]->getFd(), &start, 4);
-00381         write(compfp[testmt-1]->getFd(), &size, 2);
-00382 }
-00383 
-00384 
-00385 /******************************************************************************
-00386  * RawVerse::CreateModule       - Creates new module files
-00387  *
-00388  * ENT: path    - directory to store module files
-00389  * RET: error status
-00390  */
-00391 
-00392 char zVerse::createModule(const char *ipath, int blockBound)
-00393 {
-00394         char *path = 0;
-00395         char *buf = new char [ strlen (ipath) + 20 ];
-00396         FileDesc *fd, *fd2;
-00397 
-00398         stdstr(&path, ipath);
-00399 
-00400         if ((path[strlen(path)-1] == '/') || (path[strlen(path)-1] == '\\'))
-00401                 path[strlen(path)-1] = 0;
-00402 
-00403         sprintf(buf, "%s/ot.%czs", path, uniqueIndexID[blockBound]);
-00404         unlink(buf);
-00405         fd = FileMgr::systemFileMgr.open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-00406         fd->getFd();
-00407         FileMgr::systemFileMgr.close(fd);
-00408 
-00409         sprintf(buf, "%s/nt.%czs", path, uniqueIndexID[blockBound]);
-00410         unlink(buf);
-00411         fd = FileMgr::systemFileMgr.open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-00412         fd->getFd();
-00413         FileMgr::systemFileMgr.close(fd);
-00414 
-00415         sprintf(buf, "%s/ot.%czz", path, uniqueIndexID[blockBound]);
-00416         unlink(buf);
-00417         fd = FileMgr::systemFileMgr.open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-00418         fd->getFd();
-00419         FileMgr::systemFileMgr.close(fd);
-00420 
-00421         sprintf(buf, "%s/nt.%czz", path, uniqueIndexID[blockBound]);
-00422         unlink(buf);
-00423         fd2 = FileMgr::systemFileMgr.open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-00424         fd2->getFd();
-00425         FileMgr::systemFileMgr.close(fd);
-00426 
-00427         sprintf(buf, "%s/ot.%czv", path, uniqueIndexID[blockBound]);
-00428         unlink(buf);
-00429         fd = FileMgr::systemFileMgr.open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-00430         fd->getFd();
-00431 
-00432         sprintf(buf, "%s/nt.%czv", path, uniqueIndexID[blockBound]);
-00433         unlink(buf);
-00434         fd2 = FileMgr::systemFileMgr.open(buf, O_CREAT|O_WRONLY|O_BINARY, S_IREAD|S_IWRITE);
-00435         fd2->getFd();
-00436 
-00437         VerseKey vk;
-00438         vk.Headings(1);
-00439         long offset = 0;
-00440         short size = 0;
-00441         for (vk = TOP; !vk.Error(); vk++) {
-00442                 write((vk.Testament() == 1) ? fd->getFd() : fd2->getFd(), &offset, 4);  //compBufIdxOffset
-00443                 write((vk.Testament() == 1) ? fd->getFd() : fd2->getFd(), &offset, 4);
-00444                 write((vk.Testament() == 1) ? fd->getFd() : fd2->getFd(), &size, 2);
-00445         }
-00446 
-00447         FileMgr::systemFileMgr.close(fd);
-00448         FileMgr::systemFileMgr.close(fd2);
-00449 
-00450         delete [] path;
-00451 /*
-00452         RawVerse rv(path);
-00453         VerseKey mykey("Rev 22:21");
-00454 */
-00455         
-00456         return 0;
-00457 }
-00458 
-00459 
-00460 /******************************************************************************
-00461  * zVerse::preptext     - Prepares the text before returning it to external
-00462  *                              objects
-00463  *
-00464  * ENT: buf     - buffer where text is stored and where to store the prep'd
-00465  *                      text.
-00466  */
-00467 
-00468 void zVerse::preptext(char *buf)
-00469 {
-00470         char *to, *from, space = 0, cr = 0, realdata = 0, nlcnt = 0;
-00471 
-00472         for (to = from = buf; *from; from++) {
-00473                 switch (*from) {
-00474                 case 10:
-00475                         if (!realdata)
-00476                                 continue;
-00477                         space = (cr) ? 0 : 1;
-00478                         cr = 0;
-00479                         nlcnt++;
-00480                         if (nlcnt > 1) {
-00481 //                              *to++ = nl;
-00482                                 *to++ = nl;
-00483 //                              nlcnt = 0;
-00484                         }
-00485                         continue;
-00486                 case 13:
-00487                         if (!realdata)
-00488                                 continue;
-00489                         *to++ = nl;
-00490                         space = 0;
-00491                         cr = 1;
-00492                         continue;
-00493                 }
-00494                 realdata = 1;
-00495                 nlcnt = 0;
-00496                 if (space) {
-00497                         space = 0;
-00498                         if (*from != ' ') {
-00499                                 *to++ = ' ';
-00500                                 from--;
-00501                                 continue;
-00502                         }
-00503                 }
-00504                 *to++ = *from;
-00505         }
-00506         *to = 0;
-00507 
-00508      if (to > buf) {
-00509           for (to--; to > buf; to--) {                  // remove trailing excess
-00510                if ((*to == 10) || (*to == ' '))
-00511                     *to = 0;
-00512                else break;
-00513           }
-00514      }
-00515 }
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - diff --git a/doc/api-documentation/html/zverse_8h-source.html b/doc/api-documentation/html/zverse_8h-source.html deleted file mode 100644 index 5620f71..0000000 --- a/doc/api-documentation/html/zverse_8h-source.html +++ /dev/null @@ -1,70 +0,0 @@ - - -zverse.h Source File - - - -
-Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  
-

zverse.h

00001 /******************************************************************************
-00002  *  rawverse.h   - code for class 'RawVerse'- a module that reads raw text
-00003  *                      files:  ot and nt using indexs ??.bks ??.cps ??.vss
-00004  *                      and provides lookup and parsing functions based on
-00005  *                      class VerseKey
-00006  */
-00007 
-00008 #ifndef ZVERSE_H
-00009 #define ZVERSE_H
-00010 
-00011 #include <filemgr.h>
-00012 #include <fcntl.h>
-00013 #include <rawverse.h>
-00014 #include <swcomprs.h>
-00015 
-00016 #include <defs.h>
-00017 
-00018 class SWDLLEXPORT zVerse {
-00019         SWCompress *compressor;
-00020 
-00021 protected:
-00022         static int instance;            // number of instantiated RawVerse objects or derivitives
-00023 
-00024         FileDesc *idxfp[2];
-00025         FileDesc *textfp[2];
-00026         FileDesc *compfp[2];
-00027         char *path;
-00028         void preptext (char *buf);
-00029         void settext (char testmt, long idxoff, const char *buf, long len = 0);
-00030         void linkentry (char testmt, long destidxoff, long srcidxoff);
-00031         void flushCache ();
-00032         //RawVerse();
-00033         char *cacheBuf;
-00034         char cacheTestament;
-00035         long cacheBufIdx;
-00036         bool dirtyCache;
-00037 
-00038 public:
-00039 
-00040 #define VERSEBLOCKS 2
-00041 #define CHAPTERBLOCKS 3
-00042 #define BOOKBLOCKS 4
-00043 
-00044         static const char uniqueIndexID[];
-00045         char nl;
-00046 
-00047 
-00048         zVerse (const char *ipath, int fileMode = O_RDONLY, int blockType = CHAPTERBLOCKS, SWCompress * icomp = 0);
-00049         virtual ~ zVerse ();
-00050         void findoffset (char testmt, long idxoff, long *start, unsigned short *end);
-00051         void swgettext (char testmt, long start, unsigned short size, char *buf);
-00052         static char createModule (const char *path, int blockBound);
-00053 };
-00054 
-00055 
-00056 #endif
-

Generated on Thu Jun 20 22:13:01 2002 for The Sword Project by - -doxygen1.2.15
- - -- cgit