app/config/gimpconfig-file.c app/file/file-utils.c app/gui/themes.c

2005-02-07  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfig-file.c
	* app/file/file-utils.c
	* app/gui/themes.c
	* app/tools/gimpimagemaptool.c
	* app/vectors/gimpvectors-export.c
	* app/widgets/gimpwidgets-utils.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/procedural_db.pdb: use gstdio wrappers.

	* app/pdb/procedural_db_cmds.c: regenerated.
This commit is contained in:
Sven Neumann
2005-02-07 01:38:18 +00:00
committed by Sven Neumann
parent 648cccde5e
commit 47c35a6ebf
10 changed files with 36 additions and 21 deletions

View File

@ -1,3 +1,16 @@
2005-02-07 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig-file.c
* app/file/file-utils.c
* app/gui/themes.c
* app/tools/gimpimagemaptool.c
* app/vectors/gimpvectors-export.c
* app/widgets/gimpwidgets-utils.c
* app/xcf/xcf.c
* tools/pdbgen/pdb/procedural_db.pdb: use gstdio wrappers.
* app/pdb/procedural_db_cmds.c: regenerated.
2005-02-07 Sven Neumann <sven@gimp.org> 2005-02-07 Sven Neumann <sven@gimp.org>
* app/base/base.c * app/base/base.c

View File

@ -50,7 +50,7 @@ gimp_config_file_copy (const gchar *source,
struct stat stat_buf; struct stat stat_buf;
gint nbytes; gint nbytes;
sfile = fopen (source, "rb"); sfile = g_fopen (source, "rb");
if (sfile == NULL) if (sfile == NULL)
{ {
g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno), g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
@ -59,7 +59,7 @@ gimp_config_file_copy (const gchar *source,
return FALSE; return FALSE;
} }
dfile = fopen (dest, "wb"); dfile = g_fopen (dest, "wb");
if (dfile == NULL) if (dfile == NULL)
{ {
g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno), g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),

View File

@ -21,19 +21,21 @@
#include "config.h" #include "config.h"
#include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#ifdef HAVE_SYS_PARAM_H #ifdef HAVE_SYS_PARAM_H
#include <sys/param.h> #include <sys/param.h>
#endif #endif
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h>
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
#endif #endif
#include <glib-object.h> #include <glib-object.h>
#include <glib/gstdio.h>
#include "libgimpmath/gimpmath.h" #include "libgimpmath/gimpmath.h"
@ -215,7 +217,7 @@ file_utils_find_proc (GSList *procs,
if (head_size == -2) if (head_size == -2)
{ {
head_size = 0; head_size = 0;
if ((ifp = fopen (filename, "rb")) != NULL) if ((ifp = g_fopen (filename, "rb")) != NULL)
head_size = fread ((gchar *) head, 1, sizeof (head), ifp); head_size = fread ((gchar *) head, 1, sizeof (head), ifp);
} }

View File

@ -20,8 +20,8 @@
#include <errno.h> #include <errno.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdio.h>
#include <glib/gstdio.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h" #include "libgimpbase/gimpbase.h"
@ -231,7 +231,7 @@ themes_apply_theme (Gimp *gimp,
g_print (_("Writing '%s'\n"), g_print (_("Writing '%s'\n"),
gimp_filename_to_utf8 (themerc)); gimp_filename_to_utf8 (themerc));
file = fopen (themerc, "w"); file = g_fopen (themerc, "w");
if (! file) if (! file)
{ {

View File

@ -20,7 +20,7 @@
#include "config.h" #include "config.h"
#include <stdio.h> #include <glib/gstdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -392,7 +392,7 @@ procedural_db_dump_invoker (Gimp *gimp,
if (success) if (success)
{ {
if ((file = fopen (filename, "w"))) if ((file = g_fopen (filename, "w")))
{ {
g_hash_table_foreach (gimp->procedural_ht, g_hash_table_foreach (gimp->procedural_ht,
procedural_db_print_entry, file); procedural_db_print_entry, file);

View File

@ -18,9 +18,9 @@
#include "config.h" #include "config.h"
#include <stdio.h>
#include <errno.h> #include <errno.h>
#include <glib/gstdio.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h> #include <gdk/gdkkeysyms.h>
@ -598,7 +598,7 @@ gimp_image_map_tool_load_save (GimpImageMapTool *tool,
const gchar *filename, const gchar *filename,
gboolean save) gboolean save)
{ {
FILE *file = fopen (filename, save ? "wt" : "rt"); FILE *file = g_fopen (filename, save ? "wt" : "rt");
if (! file) if (! file)
{ {

View File

@ -18,11 +18,11 @@
#include "config.h" #include "config.h"
#include <stdio.h>
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
#include <glib-object.h> #include <glib-object.h>
#include <glib/gstdio.h>
#include "libgimpbase/gimpbase.h" #include "libgimpbase/gimpbase.h"
@ -77,7 +77,7 @@ gimp_vectors_export_file (const GimpImage *image,
g_return_val_if_fail (filename != NULL, FALSE); g_return_val_if_fail (filename != NULL, FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE); g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
file = fopen (filename, "w"); file = g_fopen (filename, "w");
if (!file) if (!file)
{ {
g_set_error (error, 0, 0, _("Could not open '%s' for writing: %s"), g_set_error (error, 0, 0, _("Could not open '%s' for writing: %s"),

View File

@ -23,15 +23,15 @@
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdio.h>
#include <string.h> #include <string.h>
#include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
#endif #endif
#include <glib.h> #include <glib.h>
#include <glib/gstdio.h>
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
#include "libgimpbase/gimpwin32-io.h" #include "libgimpbase/gimpwin32-io.h"
@ -759,7 +759,7 @@ gimp_text_buffer_load (GtkTextBuffer *buffer,
g_return_val_if_fail (filename != NULL, FALSE); g_return_val_if_fail (filename != NULL, FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE); g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
file = fopen (filename, "r"); file = g_fopen (filename, "r");
if (! file) if (! file)
{ {

View File

@ -19,11 +19,11 @@
#include "config.h" #include "config.h"
#include <errno.h> #include <errno.h>
#include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <glib-object.h> #include <glib-object.h>
#include <glib/gstdio.h>
#include "libgimpbase/gimpbase.h" #include "libgimpbase/gimpbase.h"
@ -231,7 +231,7 @@ xcf_load_invoker (Gimp *gimp,
filename = args[1].value.pdb_pointer; filename = args[1].value.pdb_pointer;
info.fp = fopen (filename, "rb"); info.fp = g_fopen (filename, "rb");
if (info.fp) if (info.fp)
{ {
@ -319,7 +319,7 @@ xcf_save_invoker (Gimp *gimp,
gimage = gimp_image_get_by_ID (gimp, args[1].value.pdb_int); gimage = gimp_image_get_by_ID (gimp, args[1].value.pdb_int);
filename = args[3].value.pdb_pointer; filename = args[3].value.pdb_pointer;
info.fp = fopen (filename, "wb"); info.fp = g_fopen (filename, "wb");
if (info.fp) if (info.fp)
{ {

View File

@ -149,11 +149,11 @@ HELP
); );
%invoke = ( %invoke = (
headers => [ qw(<stdio.h> "core/gimp.h") ], headers => [ qw(<glib/gstdio.h> "core/gimp.h") ],
vars => [ "FILE *file" ], vars => [ "FILE *file" ],
code => <<'CODE' code => <<'CODE'
{ {
if ((file = fopen (filename, "w"))) if ((file = g_fopen (filename, "w")))
{ {
g_hash_table_foreach (gimp->procedural_ht, g_hash_table_foreach (gimp->procedural_ht,
procedural_db_print_entry, file); procedural_db_print_entry, file);