--- psiconv/trunk/lib/psiconv/parse_layout.c 2004/01/04 22:20:43 183 +++ psiconv/trunk/lib/psiconv/parse_layout.c 2004/01/06 20:15:01 184 @@ -64,7 +64,7 @@ ERROR2: free(*result); ERROR1: - psiconv_warn(config,lev+1,off,"Reading of Color failed"); + psiconv_error(config,lev+1,off,"Reading of Color failed"); if (length) *length = 0; if (res == 0) @@ -82,23 +82,27 @@ int res = 0; char *str_copy; int len=0; - int leng; + int fontlen; psiconv_progress(config,lev+1,off,"Going to parse font"); if (!(*result = malloc(sizeof(**result)))) goto ERROR1; - (*result)->name = psiconv_read_short_string(config,buf,lev+2,off+len, - &leng,&res); + fontlen = psiconv_read_u8(config,buf,lev+2,off,&res); if (res) goto ERROR2; - len += leng; + len = 1; + + (*result)->name = psiconv_read_charlist(config,buf,lev+2,off, fontlen-1,&res); + if (res) + goto ERROR2; + len += fontlen - 1; (*result)->screenfont = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR3; - if (!(str_copy = psiconv_make_printable((*result)->name))) + if (!(str_copy = psiconv_make_printable(config,(*result)->name))) goto ERROR3; psiconv_debug(config,lev+2,off+len, @@ -119,7 +123,7 @@ ERROR2: free (*result); ERROR1: - psiconv_warn(config,lev+1,off,"Reading of Font failed"); + psiconv_error(config,lev+1,off,"Reading of Font failed"); if (length) *length = 0; if (!res) @@ -214,7 +218,7 @@ ERROR2: free (result); ERROR1: - psiconv_warn(config,lev+1,off,"Reading of Border failed"); + psiconv_error(config,lev+1,off,"Reading of Border failed"); if (length) *length = 0; if (!res) @@ -231,6 +235,7 @@ int len = 0; int leng; int bullet_length; + psiconv_u8 temp; if (!(*result = malloc(sizeof(**result)))) goto ERROR1; @@ -251,9 +256,10 @@ len +=leng; psiconv_progress(config,lev+2,off+len,"Going to read bullet character"); - (*result)->character = psiconv_read_u8(config,buf,lev+2,off+len,&res); + temp = psiconv_read_u8(config,buf,lev+2,off+len,&res); if (res) goto ERROR2; + (*result)->character = psiconv_unicode_from_char(config,temp); psiconv_debug(config,lev+2,off+len,"Character: %02x",(*result)->character); len ++; @@ -291,7 +297,7 @@ ERROR2: free (result); ERROR1: - psiconv_warn(config,lev+1,off,"Reading of Bullet failed"); + psiconv_error(config,lev+1,off,"Reading of Bullet failed"); if (length) *length = 0; if (!res) @@ -347,7 +353,7 @@ ERROR2: free (result); ERROR1: - psiconv_warn(config,lev+1,off,"Reading of Tab failed"); + psiconv_error(config,lev+1,off,"Reading of Tab failed"); if (length) *length = 0; if (!res) @@ -602,8 +608,8 @@ } if (len - 4 != list_length) { - psiconv_warn(config,lev+2,off+len, - "Read past end of paragraph layout codes list. I probably lost track" + psiconv_error(config,lev+2,off+len, + "Read past end of paragraph layout codes list. I probably lost track " "somewhere!"); psiconv_debug(config,lev+2,off+len,"Read %d characters instead of %d", len-4,list_length); @@ -621,7 +627,7 @@ return 0; ERROR1: - psiconv_warn(config,lev+1,off,"Reading of paragraph_layout_list failed"); + psiconv_error(config,lev+1,off,"Reading of paragraph_layout_list failed"); if (length) *length = 0; if (!res) @@ -771,8 +777,8 @@ } if (len - 4 != list_length) { - psiconv_warn(config,lev+2,off+len, - "Read past end of character layout codes list. I probably lost track" + psiconv_error(config,lev+2,off+len, + "Read past end of character layout codes list. I probably lost track " "somewhere!"); psiconv_debug(config,lev+2,off+len,"Read %d characters instead of %d", len-4,list_length); @@ -790,7 +796,7 @@ return res; ERROR1: - psiconv_warn(config,lev+1,off,"Reading of character_layout_list failed"); + psiconv_error(config,lev+1,off,"Reading of character_layout_list failed"); if (length) *length = 0; if (!res)