1 | /* |
1 | /* |
2 | generate_layout.c - Part of psiconv, a PSION 5 file formats converter |
2 | generate_layout.c - Part of psiconv, a PSION 5 file formats converter |
3 | Copyright (c) 2000 Frodo Looijaard <frodol@dds.nl> |
3 | Copyright (c) 2000-2004 Frodo Looijaard <frodol@dds.nl> |
4 | |
4 | |
5 | This program is free software; you can redistribute it and/or modify |
5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by |
6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or |
7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. |
8 | (at your option) any later version. |
… | |
… | |
93 | (value->kind == psiconv_border_double) ? |
93 | (value->kind == psiconv_border_double) ? |
94 | value->thickness:1.0/20.0))) |
94 | value->thickness:1.0/20.0))) |
95 | return res; |
95 | return res; |
96 | if ((res = psiconv_write_color(config,buf,lev+1,value->color))) |
96 | if ((res = psiconv_write_color(config,buf,lev+1,value->color))) |
97 | return res; |
97 | return res; |
98 | // Unknown byte |
98 | /* Unknown byte */ |
99 | return psiconv_write_u8(config,buf,lev+1,1); |
99 | return psiconv_write_u8(config,buf,lev+1,1); |
100 | } |
100 | } |
101 | |
101 | |
102 | int psiconv_write_bullet(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_bullet value) |
102 | int psiconv_write_bullet(const psiconv_config config, psiconv_buffer buf,int lev, const psiconv_bullet value) |
103 | { |
103 | { |
… | |
… | |
113 | |
113 | |
114 | if (!(extra_buf = psiconv_buffer_new())) |
114 | if (!(extra_buf = psiconv_buffer_new())) |
115 | return -PSICONV_E_NOMEM; |
115 | return -PSICONV_E_NOMEM; |
116 | if ((res = psiconv_write_size(config,extra_buf,lev+1,value->font_size))) |
116 | if ((res = psiconv_write_size(config,extra_buf,lev+1,value->font_size))) |
117 | goto ERROR; |
117 | goto ERROR; |
118 | if ((res = psiconv_write_u8(config,extra_buf,lev+1, |
118 | if ((res = psiconv_unicode_write_char(config,extra_buf,lev+1, |
119 | psiconv_unicode_to_char(config,value->character)))) |
119 | value->character))) |
120 | goto ERROR; |
120 | goto ERROR; |
121 | if ((res = psiconv_write_bool(config,extra_buf,lev+1,value->indent))) |
121 | if ((res = psiconv_write_bool(config,extra_buf,lev+1,value->indent))) |
122 | goto ERROR; |
122 | goto ERROR; |
123 | if ((res = psiconv_write_color(config,extra_buf,lev+1,value->color))) |
123 | if ((res = psiconv_write_color(config,extra_buf,lev+1,value->color))) |
124 | goto ERROR; |
124 | goto ERROR; |