/[public]/psiconv/trunk/lib/psiconv/data.c
ViewVC logotype

Diff of /psiconv/trunk/lib/psiconv/data.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 13 Revision 20
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18*/ 18*/
19 19
20#include "config.h" 20#include "config.h"
21#include "compat.h"
21#include <stdlib.h> 22#include <stdlib.h>
22#include <string.h> 23#include <string.h>
23#include "data.h" 24#include "data.h"
24#include "list.h" 25#include "list.h"
25#include "general.h" 26#include "general.h"
34static void psiconv_free_paragraph_aux(void * paragraph); 35static void psiconv_free_paragraph_aux(void * paragraph);
35static void psiconv_free_paint_data_section_aux(void * section); 36static void psiconv_free_paint_data_section_aux(void * section);
36 37
37psiconv_character_layout psiconv_basic_character_layout(void) 38psiconv_character_layout psiconv_basic_character_layout(void)
38{ 39{
40 /* Make the structures static, to oblige IRIX */
39 struct psiconv_color black = 41 static struct psiconv_color black =
40 { 42 {
41 0x00, /* red */ 43 0x00, /* red */
42 0x00, /* green */ 44 0x00, /* green */
43 0x00, /* blue */ 45 0x00, /* blue */
44 }; 46 };
45 struct psiconv_color white = 47 static struct psiconv_color white =
46 { 48 {
47 0xff, /* red */ 49 0xff, /* red */
48 0xff, /* green */ 50 0xff, /* green */
49 0xff, /* blue */ 51 0xff, /* blue */
52 };
53 static struct psiconv_font font =
54 {
55 "Times New Roman", /* name */
56 3 /* screenfont */
50 }; 57 };
51 struct psiconv_character_layout cl = 58 struct psiconv_character_layout cl =
52 { 59 {
53 &black, /* color */ 60 &black, /* color */
54 &white, /* back_color */ 61 &white, /* back_color */
59 psiconv_bool_false, /* underline */ 66 psiconv_bool_false, /* underline */
60 psiconv_bool_false, /* strike_out */ 67 psiconv_bool_false, /* strike_out */
61 NULL, /* font */ 68 NULL, /* font */
62 }; 69 };
63 70
64 cl.color = malloc(sizeof(*cl.color));
65 cl.color->red = 0x00;
66 cl.color->green = 0x00;
67 cl.color->blue = 0x00;
68 cl.back_color = malloc(sizeof(*cl.color));
69 cl.back_color->red = 0xff;
70 cl.back_color->green = 0xff;
71 cl.back_color->blue = 0xff;
72 cl.font = malloc(sizeof(*cl.font));
73 cl.font->name = strdup("Times New Roman");
74 cl.font->screenfont = 3;
75 return psiconv_clone_character_layout(&cl); 71 return psiconv_clone_character_layout(&cl);
76} 72}
77 73
78psiconv_paragraph_layout psiconv_basic_paragraph_layout(void) 74psiconv_paragraph_layout psiconv_basic_paragraph_layout(void)
79{ 75{
80 char base_font[] = "Times New Roman";
81
82 struct psiconv_font font = 76 static struct psiconv_font font =
83 { 77 {
84 base_font, /* name */ 78 "Times New Roman", /* name */
85 2 /* screenfont */ 79 2 /* screenfont */
86 }; 80 };
87 struct psiconv_color black = 81 static struct psiconv_color black =
88 { 82 {
89 0x00, /* red */ 83 0x00, /* red */
90 0x00, /* green */ 84 0x00, /* green */
91 0x00, /* blue */ 85 0x00, /* blue */
92 }; 86 };
93 struct psiconv_color white = 87 static struct psiconv_color white =
94 { 88 {
95 0xff, /* red */ 89 0xff, /* red */
96 0xff, /* green */ 90 0xff, /* green */
97 0xff, /* blue */ 91 0xff, /* blue */
98 }; 92 };
99 struct psiconv_border no_border = 93 static struct psiconv_border no_border =
100 { 94 {
101 psiconv_border_none, /* kind */ 95 psiconv_border_none, /* kind */
102 1, /* thickness */ 96 1, /* thickness */
103 &black /* color */ 97 &black /* color */
104 }; 98 };
105 struct psiconv_bullet bullet = 99 static struct psiconv_bullet bullet =
106 { 100 {
107 psiconv_bool_false, /* on */ 101 psiconv_bool_false, /* on */
108 10.0, /* font_size */ 102 10.0, /* font_size */
109 0x95, /* character */ 103 0x95, /* character */
110 psiconv_bool_true, /* indent */ 104 psiconv_bool_true, /* indent */
111 &black, /* color */ 105 &black, /* color */
112 &font, /* font */ 106 &font, /* font */
113 }; 107 };
114 struct psiconv_all_tabs tabs = 108 static struct psiconv_all_tabs tabs =
115 { 109 {
116 0.64, /* normal */ 110 0.64, /* normal */
117 NULL /* kind */ 111 NULL /* kind */
118 }; 112 };
119 struct psiconv_paragraph_layout pl = 113 struct psiconv_paragraph_layout pl =

Legend:
Removed from v.13  
changed lines
  Added in v.20

frodo@frodo.looijaard.name
ViewVC Help
Powered by ViewVC 1.1.26