plug-ins/imagemap/imap_preferences.c plug-ins/gflare/gflare.c

2007-04-27  Mukund Sivaraman  <muks@mukund.org>

        * plug-ins/imagemap/imap_preferences.c
        * plug-ins/gflare/gflare.c
        * plug-ins/Lighting/lighting_ui.c
        * plug-ins/xjt/xjt.c
        * plug-ins/metadata/xmp-parse.c
        * plug-ins/flame/flame.c
        * plug-ins/common/curve_bend.c
        * plug-ins/common/compressor.c
        * plug-ins/common/channel_mixer.c
        * plug-ins/common/mail.c
        * plug-ins/common/CML_explorer.c
        * plug-ins/ifscompose/ifscompose.c: Open files in binary mode
        ("rb" and "wb").


svn path=/trunk/; revision=22351
This commit is contained in:
Mukund Sivaraman 2007-04-26 20:31:01 +00:00 committed by Mukund Sivaraman
parent ff8ba7ea78
commit 93a7fc76a5
13 changed files with 37 additions and 21 deletions

View file

@ -1,3 +1,19 @@
2007-04-27 Mukund Sivaraman <muks@mukund.org>
* plug-ins/imagemap/imap_preferences.c
* plug-ins/gflare/gflare.c
* plug-ins/Lighting/lighting_ui.c
* plug-ins/xjt/xjt.c
* plug-ins/metadata/xmp-parse.c
* plug-ins/flame/flame.c
* plug-ins/common/curve_bend.c
* plug-ins/common/compressor.c
* plug-ins/common/channel_mixer.c
* plug-ins/common/mail.c
* plug-ins/common/CML_explorer.c
* plug-ins/ifscompose/ifscompose.c: Open files in binary mode
("rb" and "wb").
2007-04-26 Michael Natterer <mitch@gimp.org>
* app/core/gimpparamspecs.[ch]: renamed GimpParamSpecString's

View file

@ -1173,7 +1173,7 @@ save_preset_response (GtkFileChooser *chooser,
{
gchar *filename = gtk_file_chooser_get_filename (chooser);
fp = g_fopen (filename, "w");
fp = g_fopen (filename, "wb");
if (!fp)
{
@ -1316,7 +1316,7 @@ load_preset_response (GtkFileChooser *chooser,
{
gchar *filename = gtk_file_chooser_get_filename (chooser);
fp = g_fopen (filename, "r");
fp = g_fopen (filename, "rb");
if (!fp)
{

View file

@ -1997,7 +1997,7 @@ CML_save_to_file_response (GtkWidget *dialog,
if (! filename)
return;
file = g_fopen (filename, "w");
file = g_fopen (filename, "wb");
if (! file)
{
@ -2170,7 +2170,7 @@ CML_load_parameter_file (const gchar *filename,
gint seed = 0;
gint old2new_function_id[] = { 3, 4, 5, 6, 7, 9, 10, 11, 1, 2 };
file = g_fopen (filename, "r");
file = g_fopen (filename, "rb");
if (!file)
{

View file

@ -913,7 +913,7 @@ cm_load_file_response_callback (GtkWidget *dialog,
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
fp = g_fopen (filename, "r");
fp = g_fopen (filename, "rb");
if (fp)
{
@ -1047,7 +1047,7 @@ cm_save_file_response_callback (GtkWidget *dialog,
if (! filename)
return;
file = g_fopen (filename, "w");
file = g_fopen (filename, "wb");
if (! file)
{

View file

@ -405,7 +405,7 @@ save_image (const Compressor *compressor,
{
FILE *f;
if (!(f = g_fopen (filename, "w")))
if (!(f = g_fopen (filename, "wb")))
{
g_message (_("Could not open '%s' for writing: %s"),
gimp_filename_to_utf8 (filename), g_strerror (errno));
@ -558,7 +558,7 @@ load_image (const Compressor *compressor,
{
FILE *f;
if (! (f = g_fopen (tmpname, "w")))
if (! (f = g_fopen (tmpname, "wb")))
{
g_message (_("Could not open '%s' for writing: %s"),
gimp_filename_to_utf8 (tmpname), g_strerror (errno));

View file

@ -812,7 +812,7 @@ p_save_pointfile (BenderDialog *cd,
gint j;
FILE *l_fp;
l_fp = g_fopen(filename, "w+");
l_fp = g_fopen(filename, "wb+");
if (!l_fp)
{
g_message (_("Could not open '%s' for writing: %s"),
@ -864,7 +864,7 @@ p_load_pointfile (BenderDialog *cd,
float l_fux, l_fuy, l_flx, l_fly;
gint l_iuy, l_ily ;
l_fp = g_fopen(filename, "r");
l_fp = g_fopen(filename, "rb");
if (!l_fp)
{
g_message (_("Could not open '%s' for reading: %s"),

View file

@ -907,5 +907,5 @@ sendmail_pipe (gchar **cmd,
return NULL;
}
return fdopen (fd, "w");
return fdopen (fd, "wb");
}

View file

@ -404,7 +404,7 @@ file_response_callback (GtkFileChooser *chooser,
return;
}
f = g_fopen (filename, "r");
f = g_fopen (filename, "rb");
if (f == NULL)
{
@ -435,7 +435,7 @@ file_response_callback (GtkFileChooser *chooser,
}
else
{
FILE *f = g_fopen (filename, "w");
FILE *f = g_fopen (filename, "wb");
if (NULL == f)
{

View file

@ -1249,7 +1249,7 @@ gflare_load (const gchar *filename,
g_return_val_if_fail (filename != NULL, NULL);
fp = g_fopen (filename, "r");
fp = g_fopen (filename, "rb");
if (!fp)
{
g_message (_("Failed to open GFlare file '%s': %s"),
@ -1469,7 +1469,7 @@ gflare_save (GFlare *gflare)
g_free (path);
}
fp = g_fopen (gflare->filename, "w");
fp = g_fopen (gflare->filename, "wb");
if (!fp)
{
g_message (_("Failed to write GFlare file '%s': %s"),

View file

@ -2370,7 +2370,7 @@ ifsfile_save_response (GtkWidget *dialog,
str = ifsvals_stringify (&ifsvals, elements);
fh = g_fopen (filename, "w");
fh = g_fopen (filename, "wb");
if (! fh)
{
gchar *message =

View file

@ -167,7 +167,7 @@ preferences_load(PreferencesData_t *data)
filename = gimp_personal_rc_file ("imagemaprc");
in = g_fopen(filename, "r");
in = g_fopen(filename, "rb");
g_free(filename);
if (in) {
while (fgets(buf, sizeof(buf), in)) {
@ -190,7 +190,7 @@ preferences_save(PreferencesData_t *data)
filename = gimp_personal_rc_file ("imagemaprc");
out = g_fopen(filename, "w");
out = g_fopen(filename, "wb");
if (out) {
fprintf(out, "# Image map plug-in resource file\n\n");
if (data->default_map_type == NCSA)

View file

@ -1056,7 +1056,7 @@ text_handler (GMarkupParseContext *markup_context,
/*
FILE *ttt;
ttt = fopen ("/tmp/xmp-thumb.jpg", "w");
ttt = fopen ("/tmp/xmp-thumb.jpg", "wb");
fwrite (decoded, decoded_size, 1, ttt);
fclose (ttt);
*/

View file

@ -1706,7 +1706,7 @@ save_xjt_image (const gchar *filename,
}
/* create property file PRP */
l_fp_prp = g_fopen (l_prop_file, "w");
l_fp_prp = g_fopen (l_prop_file, "wb");
if (l_fp_prp == NULL)
{
g_message (_("Could not open '%s' for writing: %s"),
@ -3151,7 +3151,7 @@ p_load_linefile (const gchar *filename,
l_file_buff = g_malloc0(*len +1);
/* read file into buffer */
l_fp = g_fopen(filename, "r");
l_fp = g_fopen(filename, "rb");
if(l_fp == NULL)
{
return(NULL);