--- psiconv/trunk/lib/psiconv/data.c 1999/10/27 14:29:40 19 +++ psiconv/trunk/lib/psiconv/data.c 1999/10/27 15:05:03 20 @@ -18,6 +18,7 @@ */ #include "config.h" +#include "compat.h" #include #include #include "data.h" @@ -36,18 +37,24 @@ psiconv_character_layout psiconv_basic_character_layout(void) { - struct psiconv_color black = + /* Make the structures static, to oblige IRIX */ + static struct psiconv_color black = { 0x00, /* red */ 0x00, /* green */ 0x00, /* blue */ }; - struct psiconv_color white = + static struct psiconv_color white = { 0xff, /* red */ 0xff, /* green */ 0xff, /* blue */ }; + static struct psiconv_font font = + { + "Times New Roman", /* name */ + 3 /* screenfont */ + }; struct psiconv_character_layout cl = { &black, /* color */ @@ -61,48 +68,35 @@ NULL, /* font */ }; - cl.color = malloc(sizeof(*cl.color)); - cl.color->red = 0x00; - cl.color->green = 0x00; - cl.color->blue = 0x00; - cl.back_color = malloc(sizeof(*cl.color)); - cl.back_color->red = 0xff; - cl.back_color->green = 0xff; - cl.back_color->blue = 0xff; - cl.font = malloc(sizeof(*cl.font)); - cl.font->name = strdup("Times New Roman"); - cl.font->screenfont = 3; return psiconv_clone_character_layout(&cl); } psiconv_paragraph_layout psiconv_basic_paragraph_layout(void) { - char base_font[] = "Times New Roman"; - - struct psiconv_font font = + static struct psiconv_font font = { - base_font, /* name */ + "Times New Roman", /* name */ 2 /* screenfont */ }; - struct psiconv_color black = + static struct psiconv_color black = { 0x00, /* red */ 0x00, /* green */ 0x00, /* blue */ }; - struct psiconv_color white = + static struct psiconv_color white = { 0xff, /* red */ 0xff, /* green */ 0xff, /* blue */ }; - struct psiconv_border no_border = + static struct psiconv_border no_border = { psiconv_border_none, /* kind */ 1, /* thickness */ &black /* color */ }; - struct psiconv_bullet bullet = + static struct psiconv_bullet bullet = { psiconv_bool_false, /* on */ 10.0, /* font_size */ @@ -111,7 +105,7 @@ &black, /* color */ &font, /* font */ }; - struct psiconv_all_tabs tabs = + static struct psiconv_all_tabs tabs = { 0.64, /* normal */ NULL /* kind */