Commit 793f96f6 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

plug-ins/common/CEL.c plug-ins/common/gbr.c plug-ins/common/gih.c

2005-03-04  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/CEL.c
	* plug-ins/common/gbr.c
	* plug-ins/common/gih.c
	* plug-ins/common/gqbist.c
	* plug-ins/common/pat.c
	* plug-ins/common/pnm.c
	* plug-ins/common/postscript.c
	* plug-ins/common/raw.c
	* plug-ins/common/sample_colorize.c
	* plug-ins/faxg3/faxg3.c
	* plug-ins/imagemap/imap_preferences.c
	* plug-ins/print/print.c: added missing parameter to g_open() calls,
	ported some functions I missed earlier.
parent c991c487
2005-03-04 Sven Neumann <sven@gimp.org>
* plug-ins/common/CEL.c
* plug-ins/common/gbr.c
* plug-ins/common/gih.c
* plug-ins/common/gqbist.c
* plug-ins/common/pat.c
* plug-ins/common/pnm.c
* plug-ins/common/postscript.c
* plug-ins/common/raw.c
* plug-ins/common/sample_colorize.c
* plug-ins/faxg3/faxg3.c
* plug-ins/imagemap/imap_preferences.c
* plug-ins/print/print.c: added missing parameter to g_open() calls,
ported some functions I missed earlier.
2005-03-04 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpimage.c
......
......@@ -258,7 +258,7 @@ need_palette (const gchar *file)
FILE *fp;
guchar header[32];
fp = fopen (file, "rb");
fp = g_fopen (file, "rb");
if (!fp)
return FALSE;
......@@ -457,7 +457,7 @@ load_image (const gchar *file,
}
else
{
fp = fopen (palette_file, "r");
fp = g_fopen (palette_file, "r");
}
if (fp != NULL)
......
......@@ -318,7 +318,7 @@ load_image (const gchar *filename)
GimpImageType image_type;
gssize size;
fd = g_open (filename, O_RDONLY | _O_BINARY);
fd = g_open (filename, O_RDONLY | _O_BINARY, 0);
if (fd == -1)
{
......
......@@ -640,7 +640,7 @@ gih_load_image (const gchar *filename)
gchar *paramstring;
GimpParasite *pipe_parasite;
fd = g_open (filename, O_RDONLY | _O_BINARY);
fd = g_open (filename, O_RDONLY | _O_BINARY, 0);
if (fd == -1)
{
......
......@@ -615,7 +615,7 @@ load_data (gchar *name)
FILE *f;
guint8 buf[288];
f = fopen (name, "rb");
f = g_fopen (name, "rb");
if (f == NULL)
{
return FALSE;
......@@ -650,7 +650,7 @@ save_data (gchar *name)
FILE *f;
guint8 buf[288];
f = fopen (name, "wb");
f = g_fopen (name, "wb");
if (f == NULL)
{
return FALSE;
......
......@@ -15,6 +15,10 @@
#include <sys/stat.h>
#include <fcntl.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <glib/gstdio.h>
#include <libgimp/gimp.h>
......@@ -291,7 +295,7 @@ load_image (const gchar *filename)
GimpImageBaseType base_type;
GimpImageType image_type;
fd = g_open (filename, O_RDONLY | _O_BINARY);
fd = g_open (filename, O_RDONLY | _O_BINARY, 0);
if (fd == -1)
{
......
......@@ -427,7 +427,7 @@ load_image (const gchar *filename)
int ctr;
/* open the file */
fd = g_open (filename, O_RDONLY | _O_BINARY);
fd = g_open (filename, O_RDONLY | _O_BINARY, 0);
if (fd == -1)
{
......
......@@ -1377,7 +1377,7 @@ get_bbox (const gchar *filename,
FILE *ifp;
int retval = -1;
ifp = fopen (filename, "rb");
ifp = g_fopen (filename, "rb");
if (ifp == NULL)
return -1;
......
......@@ -228,7 +228,7 @@ run (const gchar *name,
{
gimp_get_data ("file_raw_load", runtime);
preview_fd = g_open (param[1].data.d_string, O_RDONLY);
preview_fd = g_open (param[1].data.d_string, O_RDONLY, 0);
if (preview_fd < 0)
{
......@@ -431,7 +431,7 @@ raw_load_palette (RawGimpData *data,
if (palette_file)
{
fd = g_open (palette_file, O_RDONLY);
fd = g_open (palette_file, O_RDONLY, 0);
if (! fd)
return FALSE;
......@@ -827,7 +827,7 @@ preview_update (GimpPreviewArea *preview)
{
gint fd;
fd = g_open (palfile, O_RDONLY);
fd = g_open (palfile, O_RDONLY, 0);
lseek (fd, runtime->palette_offset, SEEK_SET);
read (fd, preview_cmap,
(runtime->palette_type == RAW_PALETTE_RGB) ? 768 : 1024);
......
......@@ -25,6 +25,8 @@
#include <stdlib.h>
#include <string.h>
#include <glib/gstdio.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......@@ -1712,7 +1714,7 @@ p_print_ppm (const gchar *ppm_name)
if (ppm_name == NULL)
return;
fp = fopen (ppm_name, "w");
fp = g_fopen (ppm_name, "w");
if(fp)
{
fprintf(fp, "P3\n# CREATOR: Gimp sample coloros\n256 256\n255\n");
......@@ -1838,7 +1840,7 @@ p_get_filevalues (void)
*/
g_values.tol_col_err = 5.5;
l_fp = fopen("sample_colorize.values", "r");
l_fp = g_fopen("sample_colorize.values", "r");
if (l_fp != NULL)
{
fgets(&l_buf[0], 999, l_fp);
......@@ -2636,7 +2638,7 @@ p_sample_analyze (t_GDRW *sample_gdrw)
if(g_show_progress) gimp_progress_init (_("Sample Analyze..."));
prot_fp = NULL;
if(g_Sdebug) prot_fp = fopen("sample_colors.dump", "w");
if(g_Sdebug) prot_fp = g_fopen ("sample_colors.dump", "w");
p_print_values(prot_fp);
/* ------------------------------------------------
......
......@@ -212,7 +212,7 @@ load_image (const gchar *filename)
init_byte_tab( 0, byte_tab );
fd = g_open (filename, O_RDONLY | _O_BINARY);
fd = g_open (filename, O_RDONLY | _O_BINARY, 0);
if (fd < 0)
{
......
......@@ -23,14 +23,13 @@
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <glib/gstdio.h>
#include "libgimp/gimp.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "libgimp/gimpui.h"
#include "imap_command.h"
#include "imap_file.h"
......@@ -166,9 +165,9 @@ preferences_load(PreferencesData_t *data)
char buf[256];
gchar *filename;
filename = g_build_filename (gimp_directory (), "imagemaprc", NULL);
filename = gimp_personal_rc_file ("imagemaprc");
in = fopen(filename, "r");
in = g_fopen(filename, "r");
g_free(filename);
if (in) {
while (fgets(buf, sizeof(buf), in)) {
......@@ -189,9 +188,9 @@ preferences_save(PreferencesData_t *data)
gchar *filename;
ColorSelData_t *colors = &data->colors;
filename = g_build_filename (gimp_directory (), "imagemaprc", NULL);
filename = gimp_personal_rc_file ("imagemaprc");
out = fopen(filename, "w");
out = g_fopen(filename, "w");
if (out) {
fprintf(out, "# Imagemap plug-in resource file\n\n");
if (data->default_map_type == NCSA)
......
......@@ -34,6 +34,8 @@
#include <unistd.h>
#endif
#include <glib/gstdio.h>
#include "libgimp/gimp.h"
#include "libgimp/gimpui.h"
......@@ -477,7 +479,7 @@ run (const gchar *name,
}
}
else
prn = fopen (stp_get_output_to(vars), "wb");
prn = g_fopen (stp_get_output_to(vars), "wb");
if (prn != NULL)
{
......@@ -776,7 +778,7 @@ printrc_load (void)
filename = gimp_personal_rc_file ("printrc");
if ((fp = fopen(filename, "r")) != NULL)
if ((fp = g_fopen(filename, "r")) != NULL)
{
/*
* File exists - read the contents and update the printer list...
......@@ -1018,7 +1020,7 @@ printrc_save (void)
filename = gimp_personal_rc_file ("printrc");
if ((fp = fopen(filename, "w")) != NULL)
if ((fp = g_fopen(filename, "w")) != NULL)
{
/*
* Write the contents of the printer list...
......
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