Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
8335 | maxcodehac | 1 | |
2 | GNU UnRTF, a command-line program to convert RTF documents to other formats. |
||
3 | Copyright (C) 2000,2001 Zachary Thayer Smith |
||
4 | |||
5 | |||
6 | it under the terms of the GNU General Public License as published by |
||
7 | the Free Software Foundation; either version 2 of the License, or |
||
8 | (at your option) any later version. |
||
9 | |||
10 | |||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
13 | GNU General Public License for more details. |
||
14 | |||
15 | |||
16 | along with this program; if not, write to the Free Software |
||
17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
||
18 | |||
19 | |||
20 | =============================================================================*/ |
||
21 | |||
22 | |||
23 | |||
24 | * Module name: wpml |
||
25 | * Author name: Zach Smith |
||
26 | * Create date: 19 Sep 01 |
||
27 | * Purpose: WPML output module |
||
28 | * Note: WPML is my own format; it is a work-in-progress |
||
29 | *---------------------------------------------------------------------- |
||
30 | * Changes: |
||
31 | * 22 Sep 01, tuorfa@yahoo.com: added function-level comment blocks |
||
32 | *--------------------------------------------------------------------*/ |
||
33 | |||
34 | |||
35 | |||
36 | #include |
||
37 | #include "malloc.h" |
||
38 | #include "defs.h" |
||
39 | #include "error.h" |
||
40 | #include "main.h" |
||
41 | #include "output.h" |
||
42 | |||
43 | |||
44 | |||
45 | ascii_translation_table [96] = { |
||
46 | /* 0x20 */ " ", "!", "\"", "#", "$", "%", "&", "'", |
||
47 | /* 0x28 */ "(", ")", "*", "+", ",", "-", ".", "/", |
||
48 | /* 0x30 */ "0", "1", "2", "3", "4", "5", "6", "7", |
||
49 | /* 0x38 */ "8", "9", ":", ";", "<", "=", ">", "?", |
||
50 | /* 0x40 */ "@", "A", "B", "C", "D", "E", "F", "G", |
||
51 | /* 0x48 */ "H", "I", "J", "K", "L", "M", "N", "O", |
||
52 | /* 0x50 */ "P", "Q", "R", "S", "T", "U", "V", "W", |
||
53 | /* 0x58 */ "X", "Y", "Z", "[", "\\", "]", "^", "_", |
||
54 | /* 0x60 */ "`", "a", "b", "c", "d", "e", "f", "g", |
||
55 | /* 0x68 */ "h", "i", "j", "k", "l", "m", "n", "o", |
||
56 | /* 0x70 */ "p", "q", "r", "s", "t", "u", "v", "w", |
||
57 | /* 0x78 */ "x", "y", "z", "{", "|", "}", "~", "", |
||
58 | }; |
||
59 | |||
60 | |||
61 | upper_translation_table [128] = { |
||
62 | "?", "?", "?", "?", "?", "?", "?", "?", |
||
63 | "?", "?", "?", "?", "?", "?", "?", "?", |
||
64 | "?", "?", "?", "?", "?", "?", "?", "?", |
||
65 | "?", "?", "?", "?", "?", "?", "?", "?", |
||
66 | "?", "?", "?", "?", "?", "?", "?", "?", |
||
67 | "?", "?", "?", "?", "?", "?", "?", "?", |
||
68 | "?", "?", "?", "?", "?", "?", "?", "?", |
||
69 | "?", "?", "?", "?", "?", "?", "?", "?", |
||
70 | "?", "?", "?", "?", "?", "?", "?", "?", |
||
71 | "?", "?", "?", "?", "?", "?", "?", "?", |
||
72 | "?", "?", "?", "?", "?", "?", "?", "?", |
||
73 | "?", "?", "?", "?", "?", "?", "?", "?", |
||
74 | "?", "?", "?", "?", "?", "?", "?", "?", |
||
75 | "?", "?", "?", "?", "?", "?", "?", "?", |
||
76 | "?", "?", "?", "?", "?", "?", "?", "?", |
||
77 | "?", "?", "?", "?", "?", "?", "?", "?", |
||
78 | }; |
||
79 | |||
80 | |||
81 | |||
82 | |||
83 | * Name: wpml_init |
||
84 | * Purpose: Generates an output personality for the WPML format. |
||
85 | * Args: None. |
||
86 | * Returns: OutputPersonality. |
||
87 | *=======================================================================*/ |
||
88 | |||
89 | |||
90 | wpml_init (void) |
||
91 | { |
||
92 | OutputPersonality* wpml_op; |
||
93 | |||
94 | |||
95 | |||
96 | |||
97 | wpml_op->comment_end = "-->\n"; |
||
98 | |||
99 | |||
100 | wpml_op->document_end = ""; |
||
101 | |||
102 | |||
103 | wpml_op->header_end = ""; |
||
104 | |||
105 | |||
106 | wpml_op->document_title_end = ""; |
||
107 | |||
108 | |||
109 | wpml_op->document_author_end = "\n"; |
||
110 | |||
111 | |||
112 | wpml_op->document_changedate_end = "\n"; |
||
113 | |||
114 | |||
115 | wpml_op->body_end = " |
";
wpml_op->paragraph_end = "\n";
wpml_op->center_end = "";
wpml_op->justify_end = "";
wpml_op->align_left_end = "";
wpml_op->align_right_end = "";
wpml_op->line_break = "\n";
wpml_op->page_break = "\n";
wpml_op->hyperlink_end = "";
wpml_op->imagelink_end = "";
wpml_op->table_end = "\n";
wpml_op->table_row_end = "\n";
wpml_op->table_cell_end = "";
* character attribute strings be converted to functions,
* so that a complete font description can be written
* each time an attribute begins or ends.
*/
wpml_op->font_end = "";
wpml_op->fontsize_end = "";
wpml_op->fontsize8_end = "";
wpml_op->fontsize10_begin = "";
wpml_op->fontsize10_end = "";
wpml_op->fontsize12_begin = "";
wpml_op->fontsize12_end = "";
wpml_op->fontsize14_begin = "";
wpml_op->fontsize14_end = "";
wpml_op->fontsize18_begin = "";
wpml_op->fontsize18_end = "";
wpml_op->fontsize24_begin = "";
wpml_op->fontsize24_end = "";
wpml_op->smaller_end = "";
wpml_op->bigger_end = "";
wpml_op->foreground_end = "";
wpml_op->background_end = "";
wpml_op->bold_end = "";
wpml_op->italic_end = "";
wpml_op->underline_end = "";
wpml_op->dbl_underline_end = "";
wpml_op->superscript_end = "";
wpml_op->subscript_end = "";
wpml_op->strikethru_end = "";
wpml_op->dbl_strikethru_end = "";
wpml_op->emboss_end = "";
wpml_op->engrave_end = "";
wpml_op->shadow_end= "";
wpml_op->outline_end= "";
wpml_op->expand_end = "";
wpml_op->pointlist_end = "\n";
wpml_op->pointlist_item_begin = "";
wpml_op->pointlist_item_end = "\n";
wpml_op->numericlist_end = "\n";
wpml_op->numericlist_item_begin = "";
wpml_op->numericlist_item_end = "\n";
wpml_op->simulate_all_caps = TRUE;
wpml_op->simulate_word_underline = TRUE;
wpml_op->ansi_first_char = 0x80;
wpml_op->ansi_last_char = 0xff;
wpml_op->cp437_first_char = 0x80;
wpml_op->cp437_last_char = 0xff;
wpml_op->cp850_first_char = 0x80;
wpml_op->cp850_last_char = 0xff;
wpml_op->mac_first_char = 0x80;
wpml_op->mac_last_char = 0xff;
wpml_op->chars.left_quote = "`";
wpml_op->chars.right_dbl_quote = "''";
wpml_op->chars.left_dbl_quote = "``";
}!--";
>",>