blob: 3d77e0881f438d212c935fa7e93ee28ae7b6ac26 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
|
/************************************************************/
/* Windows Write, Copyright 1985-1992 Microsoft Corporation */
/************************************************************/
/* propdefs.h - MW defsfor char/para properties */
#define hpsNegMin 128
/* NOTE - "hpsNormal" is used for incremental encoding/decoding of chps in doc
files, hpsDefault is the size the guy starts typing into a new doc with */
#define hpsNormal 24
#ifdef KOREA
#define hpsDefault 24
#else
#define hpsDefault 20
#endif
struct TBD /* Tab Descriptor */
{
unsigned dxa; /* distance from left margin of tab stop */
unsigned char jc : 3; /* justification code */
unsigned char tlc : 3; /* leader dot code */
unsigned char opcode : 2; /* operation code for Format Tabs */
CHAR chAlign; /* ASCII code of char to align on
if jcTab=3, or 0 to align on '.' */
};
#define cchTBD (sizeof (struct TBD))
#define cwTBD (sizeof (struct TBD) / sizeof (int))
#define itbdMax 13
#define itbdMaxWord 20
#define cchMaxNum 10
struct CHP /* Character properties */
{
unsigned fStyled : 1; /* BYTE 0 */
unsigned stc : 7; /* style */
unsigned fBold : 1; /* BYTE 1 */
unsigned fItalic : 1;
unsigned ftc : 6; /* Font code */
unsigned hps : 8; /* Size in half pts */ /* BYTE 2 */
unsigned fUline : 1; /* BYTE 3 */
unsigned fStrike : 1;
unsigned fDline: 1;
unsigned fOverset : 1;
unsigned csm : 2; /* Case modifier */
unsigned fSpecial : 1;
unsigned : 1;
unsigned ftcXtra : 3; /* BYTE 4 */
unsigned fOutline : 1;
unsigned fShadow : 1;
unsigned : 3;
unsigned hpsPos : 8; /* BYTE 5 */
unsigned fFixedPitch : 1; /* used internally only */
unsigned psWidth : 7;
unsigned chLeader : 8;
unsigned ichRun : 8;
unsigned cchRun : 8;
};
#define cchCHP (sizeof (struct CHP))
#define cwCHP (cchCHP / sizeof (int))
#define cchCHPUsed (cchCHP - 3)
#define csmNormal 0
#define csmUpper 1
#define csmSmallCaps 3
/* Justification codes: must agree with menu.mod */
#define jcLeft 0
#define jcCenter 1
#define jcRight 2
#define jcBoth 3
#define jcTabMin 4
#define jcTabLeft 4
#define jcTabCenter 5
#define jcTabRight 6
#define jcTabDecimal 7
/* nice, safe invalid jc value */
#define jcNil -1
/* Tab leader codes: must agree with menu.mod */
#define tlcWhite 0
#define tlcDot 1
#define tlcHyphen 2
#define tlcUline 3
struct PAP /* Paragraph properties */
{
unsigned fStyled : 1; /* BYTE 0 */
unsigned stc : 7;
unsigned jc : 2; /* BYTE 1 */
unsigned fKeep : 1;
unsigned fKeepFollow : 1;
unsigned : 4;
unsigned stcNormChp : 7; /* BYTE 2 */
unsigned : 9; /* BYTE 3 */
unsigned dxaRight; /* BYTE 4-5 */
unsigned dxaLeft; /* BYTE 6-7 */
unsigned dxaLeft1; /* BYTE 8-9 */
unsigned dyaLine; /* 10-11 */
unsigned dyaBefore; /* 12-13 */
unsigned dyaAfter; /* 14-15 */
unsigned rhc : 4; /* Running hd code */
unsigned fGraphics : 1; /* Graphics bit */
unsigned wUnused1 : 11;
int wUnused2;
int wUnused3;
struct TBD rgtbd[itbdMaxWord];
};
#define cchPAP (sizeof (struct PAP))
#define cwPAP (cchPAP / sizeof (int))
#define cwPAPBase (cwPAP - cwTBD * itbdMaxWord)
struct SEP
{ /* Section properties */
unsigned fStyled : 1; /* BYTE 0 */
unsigned stc : 7;
unsigned bkc : 3; /* Break code */ /* BYTE 1 */
unsigned nfcPgn : 3; /* Pgn format code */
unsigned :2;
unsigned yaMac; /* Page height */ /* BYTE 2-3 */
unsigned xaMac; /* Page width */ /* BYTE 4-5 */
unsigned pgnStart; /* Starting pgn */ /* BYTE 6-7 */
unsigned yaTop; /* Start of text */ /* BYTE 8-9 */
unsigned dyaText; /* Height of text */ /* 10-11 */
unsigned xaLeft; /* Left text margin */ /* 12-13 */
unsigned dxaText; /* Width of text */ /* 14-15 */
unsigned rhc : 4; /* *** RESERVED *** */ /* 16 */
/* (Must be same as PAP) */
unsigned : 2;
unsigned fAutoPgn : 1; /* Print pgns without hdr */
unsigned fEndFtns : 1; /* Footnotes at end of doc */
unsigned cColumns : 8; /* # of columns */ /* BYTE 17 */
unsigned yaRH1; /* Pos of top hdr */ /* 18-19 */
unsigned yaRH2; /* Pos of bottom hdr */ /* 20-21 */
unsigned dxaColumns; /* Intercolumn gap */ /* 22-23 */
unsigned dxaGutter; /* Gutter width */ /* 24-25 */
unsigned yaPgn; /* Y pos of page nos */ /* 26-27 */
unsigned xaPgn; /* X pos of page nos */ /* 28-29 */
CHAR rgbJunk[cchPAP - 30]; /* Pad to cchPAP */
};
#define cchSEP (sizeof (struct SEP))
#define cwSEP (cchSEP / sizeof (int))
struct PROP
{ /* A CHP, PAP, or SEP. */
unsigned char fStyled : 1;
unsigned char stc : 7;
CHAR rgb[cchPAP - 1]; /* Variable size */
};
#define cchPROP (sizeof (struct PROP))
typedef struct
{ /* tri-state value for character/paragraph properties */
unsigned wTsv; /* 16 bit value */
unsigned char fGray;
}TSV;
#define cchTSV (sizeof (TSV))
#define itsvMax 6
#define itsvchMax 6
#define itsvparaMax 5
/* character index values */
#define itsvBold 0
#define itsvItalic 1
#define itsvUline 2
#define itsvPosition 3 /* 0 = normal; >0 = superscript; <0 = subscript */
#define itsvFfn 4 /* font name and family */
#define itsvSize 5 /* font size */
/* paragraph index values */
#define itsvJust 0 /* justification (left, center, right, both) */
#define itsvSpacing 1
#define itsvLIndent 2 /* left indent */
#define itsvFIndent 3 /* first line indent */
#define itsvRIndent 4 /* right indent */
#define cyaInch czaInch
#define cxaInch czaInch
#define cyaTl czaLine
#define dxaNest 720
extern int cxaTc;
#define yaNil 0xffff
#define xaNil 0xffff
#define ypNil 0xffff
#define xpNil 0xffff
#define dyaMinUseful cyaInch
#define dxaMinUseful (cxaInch / 2)
#define cColumnsMax (10)
#define bkcLine 0
#define bkcColumn 1
#define bkcPage 2
#define bkcRecto 3
#define bkcVerso 4
#define nfcArabic 0
#define nfcUCRoman 1
#define nfcLCRoman 2
#define nfcUCLetter 3
#define nfcLCLetter 4
#define pgnNil (-1)
struct PROP *PpropXlate();
/* Running head codes */
#define RHC_fBottom 1
#define RHC_fOdd 2
#define RHC_fEven 4
#define RHC_fFirst 8
#define rhcDefault (RHC_fOdd + RHC_fEven)
|