+2006-01-07 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
+
+ * ps/ps.c: (psscan):
+
+ Commit workaround Mozilla problem. Fix for the bug #325919
+
+ * shell/ev-metadata-manager.c: (parse_value), (parseItem),
+ (save_item):
+
+ Fix for year 2038 problem.
+
2006-01-06 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
* shell/ev-window.c: (setup_document_from_metadata),
if(!DSCcomment(line)) {
/* Do nothing */
}
- else if(doc->default_page_orientation == NONE &&
+ else if(doc->default_page_orientation == GTK_GS_ORIENTATION_NONE &&
iscomment(line + 2, "PageOrientation:")) {
sscanf(line + length("%%PageOrientation:"), "%256s", text);
if(strcmp(text, "Portrait") == 0) {
if(!DSCcomment(line)) {
/* Do nothing */
}
- else if(doc->default_page_orientation == NONE &&
+ else if(doc->default_page_orientation == GTK_GS_ORIENTATION_NONE &&
iscomment(line + 2, "PageOrientation:")) {
sscanf(line + length("%%PageOrientation:"), "%256s", text);
if(strcmp(text, "Portrait") == 0) {
doc->lensetup = section_len - line_len;
}
- /* Added this (Nov. 2, 1999) when I noticed that
- a Postscript file would load in gv but not in ggv
-
- dmg@csg.uwaterloo.ca */
+ /* HACK: Mozilla 1.8 Workaround.
+
+ It seems that Mozilla 1.8 generates important postscript code
+ after the '%%EndProlog' and before the first page comment '%%Page: x y'.
+ See comment below also.
+ */
+
+ if(doc->beginprolog && !doc->beginsetup) {
+ doc->lenprolog += section_len - line_len;
+ doc->endprolog = position;
+ }
+
+ /* HACK: Windows NT Workaround
- /* BEGIN Windows NT fix ###jp###
- Mark Pfeifer (pfeiferm%ppddev@comet.cmis.abbott.com) told me
+ Mark Pfeifer (pfeiferm%ppddev@comet.cmis.abbott.com) noticed
about problems when viewing Windows NT 3.51 generated postscript
files with gv. He found that the relevant postscript files
show important postscript code after the '%%EndSetup' and before
doc->endsetup = position;
}
}
- /* END Windows NT fix ###jp## */
/* Individual Pages */
g_value_set_string (ret, (char *)value);
break;
case G_TYPE_INT:
- g_value_set_int (ret, atoi ((char *)value));
+ g_value_set_int (ret, g_ascii_strtoull ((char *)value, NULL, 0));
break;
case G_TYPE_DOUBLE:
g_value_set_double (ret, g_ascii_strtod ((char *)value, NULL));
break;
case G_TYPE_BOOLEAN:
- g_value_set_boolean (ret, atoi ((char *)value));
+ g_value_set_boolean (ret, g_ascii_strtoull ((char *)value, NULL, 0));
break;
}
item = g_new0 (Item, 1);
- item->atime = atol ((char *)atime);
+ item->atime = g_ascii_strtoull((char*)atime, NULL, 0);
item->values = g_hash_table_new_full (g_str_hash,
g_str_equal,
xmlSetProp (xml_node, (const xmlChar *)"uri", (const xmlChar *)key);
- /* FIXME: is the cast right? - Paolo */
- atime = g_strdup_printf ("%d", (int)item->atime);
- xmlSetProp (xml_node, (const xmlChar *)"atime", (const xmlChar *)atime);
-
+ atime = g_strdup_printf ("%ld", item->atime);
+ xmlSetProp (xml_node, (const xmlChar *)"atime", (const xmlChar *)atime);
g_free (atime);
g_hash_table_foreach (item->values,