/[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 41 Revision 56
32static psiconv_all_tabs clone_all_tabs(psiconv_all_tabs all_tabs); 32static psiconv_all_tabs clone_all_tabs(psiconv_all_tabs all_tabs);
33static void psiconv_free_style_aux(void *style); 33static void psiconv_free_style_aux(void *style);
34static void psiconv_free_in_line_layout_aux(void * layout); 34static void psiconv_free_in_line_layout_aux(void * layout);
35static void psiconv_free_paragraph_aux(void * paragraph); 35static void psiconv_free_paragraph_aux(void * paragraph);
36static void psiconv_free_paint_data_section_aux(void * section); 36static void psiconv_free_paint_data_section_aux(void * section);
37static void psiconv_free_clipart_section_aux(psiconv_clipart_section section); 37static void psiconv_free_clipart_section_aux(void * section);
38 38
39psiconv_character_layout psiconv_basic_character_layout(void) 39psiconv_character_layout psiconv_basic_character_layout(void)
40{ 40{
41 /* Make the structures static, to oblige IRIX */ 41 /* Make the structures static, to oblige IRIX */
42 static struct psiconv_color black = 42 static struct psiconv_color_s black =
43 { 43 {
44 0x00, /* red */ 44 0x00, /* red */
45 0x00, /* green */ 45 0x00, /* green */
46 0x00, /* blue */ 46 0x00, /* blue */
47 }; 47 };
48 static struct psiconv_color white = 48 static struct psiconv_color_s white =
49 { 49 {
50 0xff, /* red */ 50 0xff, /* red */
51 0xff, /* green */ 51 0xff, /* green */
52 0xff, /* blue */ 52 0xff, /* blue */
53 }; 53 };
54 static struct psiconv_font font = 54 static struct psiconv_font_s font =
55 { 55 {
56 "Times New Roman", /* name */ 56 "Times New Roman", /* name */
57 3 /* screenfont */ 57 3 /* screenfont */
58 }; 58 };
59 struct psiconv_character_layout cl = 59 struct psiconv_character_layout_s cl =
60 { 60 {
61 &black, /* color */ 61 &black, /* color */
62 &white, /* back_color */ 62 &white, /* back_color */
63 10.0, /* font_size */ 63 10.0, /* font_size */
64 psiconv_bool_false, /* italic */ 64 psiconv_bool_false, /* italic */
72 return psiconv_clone_character_layout(&cl); 72 return psiconv_clone_character_layout(&cl);
73} 73}
74 74
75psiconv_paragraph_layout psiconv_basic_paragraph_layout(void) 75psiconv_paragraph_layout psiconv_basic_paragraph_layout(void)
76{ 76{
77 static struct psiconv_font font = 77 static struct psiconv_font_s font =
78 { 78 {
79 "Times New Roman", /* name */ 79 "Times New Roman", /* name */
80 2 /* screenfont */ 80 2 /* screenfont */
81 }; 81 };
82 static struct psiconv_color black = 82 static struct psiconv_color_s black =
83 { 83 {
84 0x00, /* red */ 84 0x00, /* red */
85 0x00, /* green */ 85 0x00, /* green */
86 0x00, /* blue */ 86 0x00, /* blue */
87 }; 87 };
88 static struct psiconv_color white = 88 static struct psiconv_color_s white =
89 { 89 {
90 0xff, /* red */ 90 0xff, /* red */
91 0xff, /* green */ 91 0xff, /* green */
92 0xff, /* blue */ 92 0xff, /* blue */
93 }; 93 };
94 static struct psiconv_border no_border = 94 static struct psiconv_border_s no_border =
95 { 95 {
96 psiconv_border_none, /* kind */ 96 psiconv_border_none, /* kind */
97 1, /* thickness */ 97 1, /* thickness */
98 &black /* color */ 98 &black /* color */
99 }; 99 };
100 static struct psiconv_bullet bullet = 100 static struct psiconv_bullet_s bullet =
101 { 101 {
102 psiconv_bool_false, /* on */ 102 psiconv_bool_false, /* on */
103 10.0, /* font_size */ 103 10.0, /* font_size */
104 0x95, /* character */ 104 0x95, /* character */
105 psiconv_bool_true, /* indent */ 105 psiconv_bool_true, /* indent */
106 &black, /* color */ 106 &black, /* color */
107 &font, /* font */ 107 &font, /* font */
108 }; 108 };
109 static struct psiconv_all_tabs tabs = 109 static struct psiconv_all_tabs_s tabs =
110 { 110 {
111 0.64, /* normal */ 111 0.64, /* normal */
112 NULL /* kind */ 112 NULL /* kind */
113 }; 113 };
114 struct psiconv_paragraph_layout pl = 114 struct psiconv_paragraph_layout_s pl =
115 { 115 {
116 &white, /* back_color */ 116 &white, /* back_color */
117 0.0, /* indent_left */ 117 0.0, /* indent_left */
118 0.0, /* indent_right */ 118 0.0, /* indent_right */
119 0.0, /* indent_first */ 119 0.0, /* indent_first */
135 &no_border, /* bottom_border */ 135 &no_border, /* bottom_border */
136 &tabs, /* tabs */ 136 &tabs, /* tabs */
137 }; 137 };
138 psiconv_paragraph_layout res; 138 psiconv_paragraph_layout res;
139 139
140 pl.tabs->extras = psiconv_list_new(sizeof(struct psiconv_tab)); 140 pl.tabs->extras = psiconv_list_new(sizeof(struct psiconv_tab_s));
141 res = psiconv_clone_paragraph_layout(&pl); 141 res = psiconv_clone_paragraph_layout(&pl);
142 psiconv_list_free(pl.tabs->extras); 142 psiconv_list_free(pl.tabs->extras);
143 return res; 143 return res;
144} 144}
145 145
482{ 482{
483 if (section) 483 if (section)
484 psiconv_list_free_el(section,&psiconv_free_paint_data_section_aux); 484 psiconv_list_free_el(section,&psiconv_free_paint_data_section_aux);
485} 485}
486 486
487void psiconv_free_mbm_jumptable_section (psiconv_mbm_jumptable_section section) 487void psiconv_free_jumptable_section (psiconv_jumptable_section section)
488{ 488{
489 if (section) 489 if (section)
490 psiconv_list_free(section); 490 psiconv_list_free(section);
491} 491}
492 492
512 psiconv_free_sketch_section(file->sketch_sec); 512 psiconv_free_sketch_section(file->sketch_sec);
513 free(file); 513 free(file);
514 } 514 }
515} 515}
516 516
517void psiconv_free_clipart_section_aux(psiconv_clipart_section section) 517void psiconv_free_clipart_section_aux(void *section)
518{ 518{
519 if (section) 519 if (section)
520 free(section->picture); 520 free(((psiconv_clipart_section ) section)->picture);
521} 521}
522 522
523void psiconv_free_clipart_section(psiconv_clipart_section section) 523void psiconv_free_clipart_section(psiconv_clipart_section section)
524{ 524{
525 if (section) { 525 if (section) {
552 else if (file->type == psiconv_mbm_file) 552 else if (file->type == psiconv_mbm_file)
553 psiconv_free_mbm_f((psiconv_mbm_f) file->file); 553 psiconv_free_mbm_f((psiconv_mbm_f) file->file);
554 else if (file->type == psiconv_sketch_file) 554 else if (file->type == psiconv_sketch_file)
555 psiconv_free_sketch_f((psiconv_sketch_f) file->file); 555 psiconv_free_sketch_f((psiconv_sketch_f) file->file);
556 else if (file->type == psiconv_clipart_file) 556 else if (file->type == psiconv_clipart_file)
557 psiconv_free_sketch_f((psiconv_clipart_f) file->file); 557 psiconv_free_clipart_f((psiconv_clipart_f) file->file);
558 free(file); 558 free(file);
559 } 559 }
560} 560}

Legend:
Removed from v.41  
changed lines
  Added in v.56

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