Subversion Repositories Kolibri OS

Rev

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 = "";
116
117
 
118
	wpml_op->paragraph_end = "\n";
119
120
 
121
	wpml_op->center_end = "";
122
123
 
124
	wpml_op->justify_end = "";
125
126
 
127
	wpml_op->align_left_end = "";
128
129
 
130
	wpml_op->align_right_end = "";
131
132
 
133
	wpml_op->line_break = "\n";
134
	wpml_op->page_break = "\n";
135
136
 
137
	wpml_op->hyperlink_end = "";
138
139
 
140
	wpml_op->imagelink_end = "";
141
142
 
143
	wpml_op->table_end = "
\n"; 144

        
        
           
           
           145
           
 
146
	wpml_op->table_row_end = "\n";
147

        
        
           
           
           148
           
 
149
	wpml_op->table_cell_end = "";
150

        
        
           
           
           151
           
 
152

        
        
           
           
           153
           
 
154
	 * character attribute strings be converted to functions,
155
	 * so that a complete font description can be written
156
	 * each time an attribute begins or ends.
157
	 */
158

        
        
           
           
           159
           
 
160
	wpml_op->font_end = "";
161

        
        
           
           
           162
           
 
163
	wpml_op->fontsize_end = "";
164

        
        
           
           
           165
           
 
166
	wpml_op->fontsize8_end = "";
167
	wpml_op->fontsize10_begin = "";
168
	wpml_op->fontsize10_end = "";
169
	wpml_op->fontsize12_begin = "";
170
	wpml_op->fontsize12_end = "";
171
	wpml_op->fontsize14_begin = "";
172
	wpml_op->fontsize14_end = "";
173
	wpml_op->fontsize18_begin = "";
174
	wpml_op->fontsize18_end = "";
175
	wpml_op->fontsize24_begin = "";
176
	wpml_op->fontsize24_end = "";
177

        
        
           
           
           178
           
 
179
	wpml_op->smaller_end = "";
180

        
        
           
           
           181
           
 
182
	wpml_op->bigger_end = "";
183

        
        
           
           
           184
           
 
185
	wpml_op->foreground_end = "";
186

        
        
           
           
           187
           
 
188
	wpml_op->background_end = "";
189

        
        
           
           
           190
           
 
191
	wpml_op->bold_end = "";
192

        
        
           
           
           193
           
 
194
	wpml_op->italic_end = "";
195

        
        
           
           
           196
           
 
197
	wpml_op->underline_end = "";
198

        
        
           
           
           199
           
 
200
	wpml_op->dbl_underline_end = "";
201

        
        
           
           
           202
           
 
203
	wpml_op->superscript_end = "";
204

        
        
           
           
           205
           
 
206
	wpml_op->subscript_end = "";
207

        
        
           
           
           208
           
 
209
	wpml_op->strikethru_end = "";
210

        
        
           
           
           211
           
 
212
	wpml_op->dbl_strikethru_end = "";
213

        
        
           
           
           214
           
 
215
	wpml_op->emboss_end = "";
216

        
        
           
           
           217
           
 
218
	wpml_op->engrave_end = "";
219

        
        
           
           
           220
           
 
221
	wpml_op->shadow_end= "";
222

        
        
           
           
           223
           
 
224
	wpml_op->outline_end= "";
225

        
        
           
           
           226
           
 
227
	wpml_op->expand_end = "";
228

        
        
           
           
           229
           
 
230
	wpml_op->pointlist_end = "\n";
231
	wpml_op->pointlist_item_begin = "";
232
	wpml_op->pointlist_item_end = "\n";
233

        
        
           
           
           234
           
 
235
	wpml_op->numericlist_end = "\n";
236
	wpml_op->numericlist_item_begin = "";
237
	wpml_op->numericlist_item_end = "\n";
238

        
        
           
           
           239
           
 
240
	wpml_op->simulate_all_caps = TRUE;
241
	wpml_op->simulate_word_underline = TRUE;
242

        
        
           
           
           243
           
 
244

        
        
           
           
           245
           
 
246
	wpml_op->ansi_first_char = 0x80;
247
	wpml_op->ansi_last_char = 0xff;
248

        
        
           
           
           249
           
 
250
	wpml_op->cp437_first_char = 0x80;
251
	wpml_op->cp437_last_char = 0xff;
252

        
        
           
           
           253
           
 
254
	wpml_op->cp850_first_char = 0x80;
255
	wpml_op->cp850_last_char = 0xff;
256

        
        
           
           
           257
           
 
258
	wpml_op->mac_first_char = 0x80;
259
	wpml_op->mac_last_char = 0xff;
260

        
        
           
           
           261
           
 
262
	wpml_op->chars.left_quote = "`";
263
	wpml_op->chars.right_dbl_quote = "''";
264
	wpml_op->chars.left_dbl_quote = "``";
265

        
        
           
           
           266
           
 
267
}
        
        
           
           
           268
           
>
269