… | |
… | |
17 | * along with this program; if not, write to the Free Software |
17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | */ |
19 | */ |
20 | |
20 | |
21 | #include "config.h" |
21 | #include "config.h" |
|
|
22 | #include "compat.h" |
22 | #include <stdio.h> |
23 | #include <stdio.h> |
23 | #include <string.h> |
24 | #include <string.h> |
24 | #include "data.h" |
25 | #include "data.h" |
25 | #include "list.h" |
26 | #include "list.h" |
26 | #include "gen.h" |
27 | #include "gen.h" |
… | |
… | |
325 | static psiconv_character_layout |
326 | static psiconv_character_layout |
326 | gen_base_char(psiconv_list colors, psiconv_list fonts) |
327 | gen_base_char(psiconv_list colors, psiconv_list fonts) |
327 | { |
328 | { |
328 | struct psiconv_color white = { 0,0,0 }; |
329 | struct psiconv_color white = { 0,0,0 }; |
329 | struct psiconv_color black = { 0xff,0xff,0xff }; |
330 | struct psiconv_color black = { 0xff,0xff,0xff }; |
330 | struct psiconv_font font = { strdup(""),-1 }; /* Pseudo - not added! */ |
331 | struct psiconv_font font = { NULL,-1 }; /* Pseudo - not added! */ |
331 | |
332 | |
332 | struct psiconv_character_layout base_char_struct = |
333 | struct psiconv_character_layout base_char_struct = |
333 | { |
334 | { |
334 | &black, /* color */ |
335 | &black, /* color */ |
335 | &white, /* back_color */ |
336 | &white, /* back_color */ |
… | |
… | |
340 | psiconv_bool_false, /* underline */ |
341 | psiconv_bool_false, /* underline */ |
341 | psiconv_bool_false, /* strike_out */ |
342 | psiconv_bool_false, /* strike_out */ |
342 | &font, /* font */ |
343 | &font, /* font */ |
343 | }; |
344 | }; |
344 | |
345 | |
|
|
346 | font.name = strdup(""); |
345 | add_color(colors,&white); |
347 | add_color(colors,&white); |
346 | add_color(colors,&black); |
348 | add_color(colors,&black); |
347 | |
349 | |
348 | return psiconv_clone_character_layout(&base_char_struct); |
350 | return psiconv_clone_character_layout(&base_char_struct); |
349 | } |
351 | } |
350 | |
352 | |
351 | void diff_char(FILE *of,psiconv_list colors, psiconv_list fonts, |
353 | static void diff_char(FILE *of,psiconv_list colors, psiconv_list fonts, |
352 | const psiconv_character_layout old, |
354 | const psiconv_character_layout old, |
353 | const psiconv_character_layout new) |
355 | const psiconv_character_layout new) |
354 | { |
356 | { |
355 | if ((old->font->screenfont != new->font->screenfont) || |
357 | if ((old->font->screenfont != new->font->screenfont) || |
356 | strcmp(old->font->name,new->font->name)) |
358 | strcmp(old->font->name,new->font->name)) |