Commit 55b127a0 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

Bugfixes from the stable branch:

2001-07-10  Sven Neumann  <sven@gimp.org>

	Bugfixes from the stable branch:

	* plug-ins/common/bz2.c
	* plug-ins/common/gz.c: a fix for bug #57217 based on a patch from
	Raphael Quinet.

	* plug-ins/gap/gap_lib.c (p_file_copy): open files in binary mode.
	A patch from Wolfgang Hofer that possibly fixes bug #52890.

	* tools/Makefile.am: added gimppath2svg.py to EXTRA_DIST.
parent 24190680
2001-07-10 Sven Neumann <sven@gimp.org>
Bugfixes from the stable branch:
* plug-ins/common/bz2.c
* plug-ins/common/gz.c: a fix for bug #57217 based on a patch from
Raphael Quinet.
* plug-ins/gap/gap_lib.c (p_file_copy): open files in binary mode.
A patch from Wolfgang Hofer that possibly fixes bug #52890.
* tools/Makefile.am: added gimppath2svg.py to EXTRA_DIST.
2001-07-10 Michael Natterer <mitch@gimp.org>
* app/app_procs.[ch]: removed the gimp_busy boolean, check whether
......@@ -7,7 +20,7 @@
many other cleanups.
* app/appenums.h: added MessageHandlerType and StackTraceMode.
* app/appenv.h: removed MessageHandlerType, declare all global
variables from main.c (no more hidden global stuff please).
......
......@@ -452,30 +452,29 @@ find_extension (gchar* filename)
gchar *ext;
/* we never free this copy - aren't we evil! */
filename_copy = g_malloc (strlen (filename) + 1);
strcpy (filename_copy, filename);
filename_copy = g_strdup (filename);
/* find the extension, boy! */
ext = strrchr (filename_copy, '.');
while (1)
while (TRUE)
{
if (!ext || ext[1] == 0 || strchr (ext, '/'))
if (!ext || ext[1] == '\0' || strchr (ext, '/'))
{
return NULL;
}
if (0 == strcmp (ext, ".xcfbz2"))
if (0 == g_strcasecmp (ext, ".xcfbz2"))
{
return ".xcf"; /* we've found it */
}
if (0 != strcmp (ext, ".bz2"))
if (0 != g_strcasecmp (ext, ".bz2"))
{
return ext;
}
else
{
/* we found ".bz2" so strip it, loop back, and look again */
*ext = 0;
*ext = '\0';
ext = strrchr (filename_copy, '.');
}
}
......
......@@ -575,30 +575,29 @@ find_extension (gchar *filename)
gchar *ext;
/* we never free this copy - aren't we evil! */
filename_copy = g_malloc (strlen (filename) + 1);
strcpy (filename_copy, filename);
filename_copy = g_strdup (filename);
/* find the extension, boy! */
ext = strrchr (filename_copy, '.');
while (1)
while (TRUE)
{
if (!ext || ext[1] == 0 || strchr (ext, '/'))
if (!ext || ext[1] == '\0' || strchr (ext, '/'))
{
return NULL;
}
if (0 == strcmp (ext, ".xcfgz"))
if (0 == g_strcasecmp (ext, ".xcfgz"))
{
return ".xcf"; /* we've found it */
}
if (0 != strcmp (ext,".gz"))
if (0 != g_strcasecmp (ext,".gz"))
{
return ext;
}
else
{
/* we found ".gz" so strip it, loop back, and look again */
*ext = 0;
*ext = '\0';
ext = strrchr (filename_copy, '.');
}
}
......
......@@ -575,30 +575,29 @@ find_extension (gchar *filename)
gchar *ext;
/* we never free this copy - aren't we evil! */
filename_copy = g_malloc (strlen (filename) + 1);
strcpy (filename_copy, filename);
filename_copy = g_strdup (filename);
/* find the extension, boy! */
ext = strrchr (filename_copy, '.');
while (1)
while (TRUE)
{
if (!ext || ext[1] == 0 || strchr (ext, '/'))
if (!ext || ext[1] == '\0' || strchr (ext, '/'))
{
return NULL;
}
if (0 == strcmp (ext, ".xcfgz"))
if (0 == g_strcasecmp (ext, ".xcfgz"))
{
return ".xcf"; /* we've found it */
}
if (0 != strcmp (ext,".gz"))
if (0 != g_strcasecmp (ext,".gz"))
{
return ext;
}
else
{
/* we found ".gz" so strip it, loop back, and look again */
*ext = 0;
*ext = '\0';
ext = strrchr (filename_copy, '.');
}
}
......
......@@ -28,6 +28,7 @@
*/
/* revision history:
* 1.2.1a; 2001/07/07 hof: p_file_copy use binary modes in fopen (hope that fixes bug #52890 in video/duplicate)
* 1.1.29a; 2000/11/23 hof: gap locking (changed to procedures and placed here)
* 1.1.28a; 2000/11/05 hof: check for GIMP_PDB_SUCCESS (not for FALSE)
* 1.1.20a; 2000/04/25 hof: new: p_get_video_paste_name p_vid_edit_clear
......@@ -316,7 +317,6 @@ int p_file_copy(char *fname, char *fname_copy)
struct stat l_stat_buf;
long l_len;
if(gap_debug) printf("p_file_copy src:%s dst:%s\n", fname, fname_copy);
/* File Laenge ermitteln */
......@@ -336,7 +336,7 @@ int p_file_copy(char *fname, char *fname_copy)
}
/* load File into Buffer */
l_fp = fopen(fname, "r"); /* open read */
l_fp = fopen(fname, "rb"); /* open read */
if(l_fp == NULL)
{
fprintf (stderr, "open(read) error on '%s'\n", fname);
......@@ -346,7 +346,7 @@ int p_file_copy(char *fname, char *fname_copy)
fread(l_buffer, 1, (size_t)l_len, l_fp);
fclose(l_fp);
l_fp = fopen(fname_copy, "w"); /* open write */
l_fp = fopen(fname_copy, "wb"); /* open write */
if(l_fp == NULL)
{
fprintf (stderr, "file_copy: open(write) error on '%s' \n", fname_copy);
......
......@@ -35,3 +35,4 @@ INCLUDES = @STRIP_BEGIN@ \
-I$(includedir) \
@STRIP_END@
EXTRA_DIST = gimppath2svg.py
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment