1 /* wvWare
2 * Copyright (C) Caolan McNamara, Dom Lachowicz, and others
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
17 * 02111-1307, USA.
18 */
19
20 #ifdef HAVE_CONFIG_H
21 #include "config.h"
22 #endif
23
24 #include <stdlib.h>
25 #include <stdio.h>
26 #include <string.h>
27 #include "wv.h"
28
29 void
wvCopyTAP(TAP * dest,TAP * src)30 wvCopyTAP (TAP * dest, TAP * src)
31 {
32 memcpy (dest, src, sizeof (TAP));
33 }
34
35 void
wvInitTAP(TAP * item)36 wvInitTAP (TAP * item)
37 {
38 int i;
39 static TAP cache;
40 static int test = 0;
41 if (!test)
42 {
43 cache.jc = 0;
44 cache.dxaGapHalf = 0;
45 cache.dyaRowHeight = 0;
46 cache.fCantSplit = 0;
47 cache.fTableHeader = 0;
48
49 wvInitTLP (&cache.tlp);
50
51 cache.lwHTMLProps = 0;
52 cache.fCaFull = 0;
53 cache.fFirstRow = 0;
54 cache.fLastRow = 0;
55 cache.fOutline = 0;
56 cache.reserved = 0;
57 cache.itcMac = 0;
58 cache.dxaAdjust = 0;
59 cache.dxaScale = 0;
60 cache.dxsInch = 0;
61
62 for (i = 0; i < itcMax + 1; i++)
63 cache.rgdxaCenter[i] = 0;
64 for (i = 0; i < itcMax + 1; i++)
65 cache.rgdxaCenterPrint[i] = 0;
66 for (i = 0; i < itcMax; i++)
67 wvInitTC (&(cache.rgtc[i]));
68 for (i = 0; i < itcMax; i++)
69 wvInitSHD (&(cache.rgshd[i]));
70 for (i = 0; i < 6; i++)
71 wvInitBRC (&(cache.rgbrcTable[i]));
72 test++;
73 }
74 wvCopyTAP (item, &cache);
75 }
76