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

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

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

Revision 76 Revision 79
29 psiconv_word_status_section value) 29 psiconv_word_status_section value)
30{ 30{
31 int res; 31 int res;
32 32
33 if (!value) { 33 if (!value) {
34 psiconv_warn(0,psiconv_list_length(buf),"Null word status section"); 34 psiconv_warn(0,psiconv_buffer_length(buf),"Null word status section");
35 return -PSICONV_E_GENERATE; 35 return -PSICONV_E_GENERATE;
36 } 36 }
37 37
38 if ((res = psiconv_write_u8(buf,0x02))) 38 if ((res = psiconv_write_u8(buf,0x02)))
39 return res; 39 return res;
66 psiconv_paragraph_layout basepara; 66 psiconv_paragraph_layout basepara;
67 psiconv_character_layout basechar; 67 psiconv_character_layout basechar;
68 68
69 69
70 if (!value || !value->normal || !value->styles) { 70 if (!value || !value->normal || !value->styles) {
71 psiconv_warn(0,psiconv_list_length(buf),"Null word styles section"); 71 psiconv_warn(0,psiconv_buffer_length(buf),"Null word styles section");
72 res = -PSICONV_E_GENERATE; 72 res = -PSICONV_E_GENERATE;
73 goto ERROR1; 73 goto ERROR1;
74 } 74 }
75 75
76 if (!(basepara=psiconv_basic_paragraph_layout())) { 76 if (!(basepara=psiconv_basic_paragraph_layout())) {
97 97
98 98
99 99
100 for (i = 0; i < psiconv_list_length(value->styles); i++) { 100 for (i = 0; i < psiconv_list_length(value->styles); i++) {
101 if (!(style = psiconv_list_get(value->styles,i))) { 101 if (!(style = psiconv_list_get(value->styles,i))) {
102 psiconv_warn(0,psiconv_list_length(buf),"Massive memory corruption"); 102 psiconv_warn(0,psiconv_buffer_length(buf),"Massive memory corruption");
103 res = -PSICONV_E_OTHER; 103 res = -PSICONV_E_OTHER;
104 goto ERROR3; 104 goto ERROR3;
105 } 105 }
106 if ((res = psiconv_write_u32(buf,style->hotkey))) 106 if ((res = psiconv_write_u32(buf,style->hotkey)))
107 goto ERROR3; 107 goto ERROR3;
108 } 108 }
109 if ((res = psiconv_write_u8(buf,psiconv_list_length(value->styles)))) 109 if ((res = psiconv_write_u8(buf,psiconv_list_length(value->styles))))
110 goto ERROR3; 110 goto ERROR3;
111 for (i = 0; i < psiconv_list_length(value->styles); i++) { 111 for (i = 0; i < psiconv_list_length(value->styles); i++) {
112 if (!(style = psiconv_list_get(value->styles,i))) { 112 if (!(style = psiconv_list_get(value->styles,i))) {
113 psiconv_warn(0,psiconv_list_length(buf),"Massive memory corruption"); 113 psiconv_warn(0,psiconv_buffer_length(buf),"Massive memory corruption");
114 res = -PSICONV_E_OTHER; 114 res = -PSICONV_E_OTHER;
115 goto ERROR3; 115 goto ERROR3;
116 } 116 }
117 if (!style->name) { 117 if (!style->name) {
118 psiconv_warn(0,psiconv_list_length(buf),"Null style name"); 118 psiconv_warn(0,psiconv_buffer_length(buf),"Null style name");
119 res = -PSICONV_E_GENERATE; 119 res = -PSICONV_E_GENERATE;
120 goto ERROR3; 120 goto ERROR3;
121 } 121 }
122 if ((res = psiconv_write_string(buf,style->name))) 122 if ((res = psiconv_write_string(buf,style->name)))
123 goto ERROR3; 123 goto ERROR3;

Legend:
Removed from v.76  
changed lines
  Added in v.79

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