Rozdiely pre cpdf/parse.c medzi verziami 1.18 a 1.19
| verzia 1.18, 2002/11/30 19:38:09 |
verzia 1.19, 2002/12/19 00:16:44 |
| Riadok 469 struct page *fill_page(char *dictionary) |
|
| Riadok 469 struct page *fill_page(char *dictionary) |
|
| struct contents *fill_contents(char *dictionary) |
struct contents *fill_contents(char *dictionary) |
| { |
{ |
| struct contents *content; |
struct contents *content; |
| char *p; |
char *p,*endstream; |
| |
int i = 0; |
| content = (struct contents *) xcalloc(sizeof(struct contents), 1); |
content = (struct contents *) xcalloc(sizeof(struct contents), 1); |
| p = strstr(dictionary, "Length"); |
p = strstr(dictionary, "Length"); |
| if (!p) { |
if (!p) { |
| Riadok 492 struct contents *fill_contents(char *dic |
|
| Riadok 493 struct contents *fill_contents(char *dic |
|
| return NULL; |
return NULL; |
| } |
} |
| content->filter = get_filternum(&p[8]); |
content->filter = get_filternum(&p[8]); |
| p = strstr(dictionary, "stream"); |
p = strstr(dictionary, "stream") + sizeof("stream"); |
| if (!p) { |
if (!p) { |
| /* error */ |
/* error */ |
| free(content); |
free(content); |
| return NULL; |
return NULL; |
| } |
} |
| content->stream = (unsigned char *) xmalloc(content->length); |
content->stream = (unsigned char *) xcalloc(content->length,1); |
| strncpy((char *) content->stream, &p[7], content->length); |
memcpy(content->stream,p,content->length); |
| return content; |
return content; |
| } |
} |
| |
|
Platon Group <platon@platon.sk> http://platon.sk/
|
|