fixed error messages.

2002-05-14  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig.c: fixed error messages.

	* plug-ins/common/ps.c: applied a patch from Raphael Quinet that
	fixes bug #81606 (special-case recent Illustrator EPS brain damage).
This commit is contained in:
Sven Neumann 2002-05-14 12:33:11 +00:00 committed by Sven Neumann
parent c3b9790ba7
commit c347f14848
5 changed files with 41 additions and 20 deletions

View File

@ -1,3 +1,10 @@
2002-05-14 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig.c: fixed error messages.
* plug-ins/common/ps.c: applied a patch from Raphael Quinet that
fixes bug #81606 (special-case recent Illustrator EPS brain damage).
2002-05-14 Sven Neumann <sven@gimp.org>
* themes/Default/images/stock-wilber-eek-64.png: tweaked so the

View File

@ -211,7 +211,7 @@ gimp_config_serialize (GObject *object,
{
g_set_error (error,
GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_FILE,
_("Failed to open file '%s' to '%s': %s"),
_("Failed to rename temporary file '%s' to '%s': %s"),
tmpname, filename, g_strerror (errno));
unlink (tmpname);
@ -270,15 +270,15 @@ gimp_config_deserialize (GObject *object,
scanner = g_scanner_new (NULL);
scanner->user_data = error;
g_scanner_input_file (scanner, fd);
scanner->user_data = error;
scanner->msg_handler = gimp_config_scanner_message;
scanner->input_name = filename;
scanner->config->cset_identifier_first = ( G_CSET_a_2_z );
scanner->config->cset_identifier_nth = ( G_CSET_a_2_z "-_" );
g_scanner_input_file (scanner, fd);
scanner->input_name = filename;
success = gimp_config_iface->deserialize (object, scanner);
g_scanner_destroy (scanner);

View File

@ -211,7 +211,7 @@ gimp_config_serialize (GObject *object,
{
g_set_error (error,
GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_FILE,
_("Failed to open file '%s' to '%s': %s"),
_("Failed to rename temporary file '%s' to '%s': %s"),
tmpname, filename, g_strerror (errno));
unlink (tmpname);
@ -270,15 +270,15 @@ gimp_config_deserialize (GObject *object,
scanner = g_scanner_new (NULL);
scanner->user_data = error;
g_scanner_input_file (scanner, fd);
scanner->user_data = error;
scanner->msg_handler = gimp_config_scanner_message;
scanner->input_name = filename;
scanner->config->cset_identifier_first = ( G_CSET_a_2_z );
scanner->config->cset_identifier_nth = ( G_CSET_a_2_z "-_" );
g_scanner_input_file (scanner, fd);
scanner->input_name = filename;
success = gimp_config_iface->deserialize (object, scanner);
g_scanner_destroy (scanner);

View File

@ -1297,20 +1297,27 @@ ps_open (gchar *filename,
is_pdf = (strncmp (hdr, "%PDF", 4) == 0);
if (!is_pdf) /* Check for EPSF */
{char *adobe, *epsf;
int ds = 0;
static unsigned char doseps[5] = { 0xc5, 0xd0, 0xd3, 0xc6, 0 };
{
char *adobe, *epsf;
int ds = 0;
static unsigned char doseps[5] = { 0xc5, 0xd0, 0xd3, 0xc6, 0 };
hdr[sizeof(hdr)-1] = '\0';
adobe = strstr (hdr, "PS-Adobe-");
epsf = strstr (hdr, "EPSF-");
if ((adobe != NULL) && (epsf != NULL))
ds = epsf - adobe;
*is_epsf = ((ds >= 11) && (ds <= 15));
/* Check DOS EPS binary file */
/* Check DOS EPS binary file (bug #75667) */
if ((!*is_epsf) && (strncmp (hdr, (char *)doseps, 4) == 0))
*is_epsf = 1;
*is_epsf = TRUE;
/* special case for Illustrator brain damage (bug #81606) */
if ((!*is_epsf) && strstr (hdr, "%%Creator: Adobe Illustrator(R) 8.0"))
*is_epsf = TRUE;
}
fclose (fd_popen);
}

View File

@ -1297,20 +1297,27 @@ ps_open (gchar *filename,
is_pdf = (strncmp (hdr, "%PDF", 4) == 0);
if (!is_pdf) /* Check for EPSF */
{char *adobe, *epsf;
int ds = 0;
static unsigned char doseps[5] = { 0xc5, 0xd0, 0xd3, 0xc6, 0 };
{
char *adobe, *epsf;
int ds = 0;
static unsigned char doseps[5] = { 0xc5, 0xd0, 0xd3, 0xc6, 0 };
hdr[sizeof(hdr)-1] = '\0';
adobe = strstr (hdr, "PS-Adobe-");
epsf = strstr (hdr, "EPSF-");
if ((adobe != NULL) && (epsf != NULL))
ds = epsf - adobe;
*is_epsf = ((ds >= 11) && (ds <= 15));
/* Check DOS EPS binary file */
/* Check DOS EPS binary file (bug #75667) */
if ((!*is_epsf) && (strncmp (hdr, (char *)doseps, 4) == 0))
*is_epsf = 1;
*is_epsf = TRUE;
/* special case for Illustrator brain damage (bug #81606) */
if ((!*is_epsf) && strstr (hdr, "%%Creator: Adobe Illustrator(R) 8.0"))
*is_epsf = TRUE;
}
fclose (fd_popen);
}