Commit 74002a72 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

app/dialogs/user-install-dialog.c app/file/gimprecentlist.c

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

	* app/dialogs/user-install-dialog.c
	* app/file/gimprecentlist.c
	* app/widgets/gimpwidgets-utils.c
	* modules/controller_linux_input.c
	* modules/controller_midi.c
	* plug-ins/common/compressor.c
	* plug-ins/common/mail.c
	* plug-ins/common/psp.c
	* plug-ins/common/raw.c
	* plug-ins/helpbrowser/dialog.c
	* plug-ins/imagemap/imap_cern.y
	* plug-ins/imagemap/imap_cern_parse.[ch]
	* plug-ins/imagemap/imap_csim.y
	* plug-ins/imagemap/imap_csim_parse.[ch]
	* plug-ins/imagemap/imap_main.c
	* plug-ins/imagemap/imap_ncsa.y
	* plug-ins/imagemap/imap_ncsa_parse.[ch]
	* plug-ins/uri/uri.c
	* plug-ins/xjt/xjt.c: ported the remaining functions to gstdio.
parent 1870b5d5
2005-03-04 Sven Neumann <sven@gimp.org>
* app/dialogs/user-install-dialog.c
* app/file/gimprecentlist.c
* app/widgets/gimpwidgets-utils.c
* modules/controller_linux_input.c
* modules/controller_midi.c
* plug-ins/common/compressor.c
* plug-ins/common/mail.c
* plug-ins/common/psp.c
* plug-ins/common/raw.c
* plug-ins/helpbrowser/dialog.c
* plug-ins/imagemap/imap_cern.y
* plug-ins/imagemap/imap_cern_parse.[ch]
* plug-ins/imagemap/imap_csim.y
* plug-ins/imagemap/imap_csim_parse.[ch]
* plug-ins/imagemap/imap_main.c
* plug-ins/imagemap/imap_ncsa.y
* plug-ins/imagemap/imap_ncsa_parse.[ch]
* plug-ins/uri/uri.c
* plug-ins/xjt/xjt.c: ported the remaining functions to gstdio.
2005-03-04 Michael Natterer <mitch@gimp.org>
* app/tools/gimptoolcontrol.[ch]: in the spirit of the fix for bug
......
......@@ -32,7 +32,6 @@
#include <gtk/gtk.h>
#ifdef G_OS_WIN32
#include <direct.h> /* _mkdir() */
#include <libgimpbase/gimpwin32-io.h>
#endif
......@@ -53,11 +52,6 @@
#include "gimp-intl.h"
#ifdef G_OS_WIN32
# include <io.h>
# define mkdir(path, mode) _mkdir(path)
#endif
#define PAGE_STYLE(widget) gtk_widget_modify_style (widget, page_style)
#define TITLE_STYLE(widget) gtk_widget_modify_style (widget, title_style)
......
......@@ -30,13 +30,17 @@
#include <string.h>
#include <errno.h>
#include <time.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <glib/gstdio.h>
#include <glib-object.h>
#ifndef G_OS_WIN32 /* This code doesn't compile on win32 and the use of
......@@ -536,7 +540,7 @@ gimp_recent_list_add_item (GimpRecentItem *item)
filename = g_build_filename (home, GIMP_RECENT_LIST_FILE_NAME, NULL);
fd = open (filename, O_RDWR);
fd = g_open (filename, O_RDWR, 0);
if (fd < 0)
{
......
......@@ -30,9 +30,10 @@
#include <unistd.h>
#endif
#include <glib.h>
#include <glib/gstdio.h>
#include <glib.h>
#ifdef G_OS_WIN32
#include "libgimpbase/gimpwin32-io.h"
#endif
......@@ -813,7 +814,8 @@ gimp_text_buffer_save (GtkTextBuffer *buffer,
g_return_val_if_fail (filename != NULL, FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
fd = open (filename, O_WRONLY | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR);
fd = g_open (filename,
O_WRONLY | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR, 0600);
if (fd == -1)
{
......
......@@ -30,6 +30,8 @@
#include <linux/input.h>
#include <glib/gstdio.h>
#include <gtk/gtk.h>
#include "libgimpconfig/gimpconfig.h"
......@@ -353,7 +355,7 @@ linux_input_set_device (ControllerLinuxInput *controller,
gchar *state;
gint fd;
fd = open (controller->device, O_RDONLY);
fd = g_open (controller->device, O_RDONLY, 0);
if (fd >= 0)
{
......
......@@ -29,6 +29,8 @@
#include <sys/types.h>
#include <time.h>
#include <glib/gstdio.h>
#ifdef HAVE_ALSA
#include <alsa/asoundlib.h>
#endif
......@@ -491,9 +493,9 @@ midi_set_device (ControllerMidi *midi,
#endif /* HAVE_ALSA */
#ifdef G_OS_WIN32
fd = open (midi->device, O_RDONLY);
fd = g_open (midi->device, O_RDONLY, 0);
#else
fd = open (midi->device, O_RDONLY | O_NONBLOCK);
fd = g_open (midi->device, O_RDONLY | O_NONBLOCK, 0);
#endif
if (fd >= 0)
......
......@@ -652,7 +652,7 @@ valid_file (const gchar *filename)
{
struct stat buf;
return stat (filename, &buf) == 0 && buf.st_size > 0;
return g_stat (filename, &buf) == 0 && buf.st_size > 0;
}
static const gchar *
......
......@@ -636,7 +636,7 @@ valid_file (const gchar *filename)
int stat_res;
struct stat buf;
stat_res = stat (filename, &buf);
stat_res = g_stat (filename, &buf);
if ((0 == stat_res) && (buf.st_size > 0))
return TRUE;
......
......@@ -1445,7 +1445,7 @@ load_image (const gchar *filename)
gint32 image_ID = -1;
if (stat (filename, &st) == -1)
if (g_stat (filename, &st) == -1)
return -1;
f = g_fopen (filename, "rb");
......
......@@ -316,7 +316,7 @@ get_file_info (gchar *filename)
{
struct stat status;
stat (filename, &status);
g_stat (filename, &status);
return status.st_size;
}
......
......@@ -30,7 +30,10 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <glib/gstdio.h>
#include <gtk/gtk.h>
#include <libgtkhtml/gtkhtml.h>
#include "libgimpwidgets/gimpwidgets.h"
......@@ -557,7 +560,7 @@ request_url (HtmlDocument *doc,
{
gint fd;
fd = open (filename, O_RDONLY);
fd = g_open (filename, O_RDONLY, 0);
if (fd != -1)
{
......
......@@ -25,6 +25,8 @@
#include <math.h>
#include <glib/gstdio.h>
#include <gtk/gtk.h>
#include "imap_circle.h"
......@@ -166,7 +168,7 @@ load_cern(const char* filename)
{
gboolean status;
extern FILE *cern_in;
cern_in = fopen(filename, "r");
cern_in = g_fopen(filename, "r");
if (cern_in) {
status = !cern_parse();
fclose(cern_in);
......
......@@ -49,6 +49,8 @@
#include <math.h>
#include <glib/gstdio.h>
#include <gtk/gtk.h>
#include "imap_circle.h"
......@@ -1269,7 +1271,7 @@ load_cern(const char* filename)
{
gboolean status;
extern FILE *cern_in;
cern_in = fopen(filename, "r");
cern_in = g_fopen(filename, "r");
if (cern_in) {
status = !cern_parse();
fclose(cern_in);
......
/* A Bison parser, made by GNU Bison 1.875a. */
/* A Bison parser, made by GNU Bison 1.875d. */
/* Skeleton parser for Yacc-like parsing with Bison,
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -56,13 +56,13 @@
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
#line 45 "imap_cern.y"
#line 47 "imap_cern.y"
typedef union YYSTYPE {
int val;
double value;
char id[256];
} YYSTYPE;
/* Line 1240 of yacc.c. */
/* Line 1285 of yacc.c. */
#line 67 "y.tab.h"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
......
......@@ -25,6 +25,8 @@
#include <stdlib.h>
#include <string.h>
#include <glib/gstdio.h>
#include <gtk/gtk.h>
#include "imap_circle.h"
......@@ -320,7 +322,7 @@ load_csim (const char* filename)
{
gboolean status;
extern FILE *csim_in;
csim_in = fopen(filename, "r");
csim_in = g_fopen(filename, "r");
if (csim_in) {
_map_info = get_map_info();
status = !csim_parse();
......
......@@ -65,6 +65,8 @@
#include <stdlib.h>
#include <string.h>
#include <glib/gstdio.h>
#include <gtk/gtk.h>
#include "imap_circle.h"
......@@ -1467,7 +1469,7 @@ load_csim (const char* filename)
{
gboolean status;
extern FILE *csim_in;
csim_in = fopen(filename, "r");
csim_in = g_fopen(filename, "r");
if (csim_in) {
_map_info = get_map_info();
status = !csim_parse();
......
#ifndef BISON_Y_TAB_H
# define BISON_Y_TAB_H
/* A Bison parser, made by GNU Bison 1.875d. */
#ifndef YYSTYPE
typedef union {
/* Skeleton parser for Yacc-like parsing with Bison,
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
This special exception was added by the Free Software Foundation
in version 1.24 of Bison. */
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
IMG = 258,
SRC = 259,
WIDTH = 260,
HEIGHT = 261,
BORDER = 262,
USEMAP = 263,
START_MAP = 264,
END_MAP = 265,
NAME = 266,
AREA = 267,
SHAPE = 268,
COORDS = 269,
ALT = 270,
HREF = 271,
NOHREF = 272,
TARGET = 273,
ONMOUSEOVER = 274,
ONMOUSEOUT = 275,
ONFOCUS = 276,
ONBLUR = 277,
AUTHOR = 278,
DESCRIPTION = 279,
BEGIN_COMMENT = 280,
END_COMMENT = 281,
FLOAT = 282,
STRING = 283
};
#endif
#define IMG 258
#define SRC 259
#define WIDTH 260
#define HEIGHT 261
#define BORDER 262
#define USEMAP 263
#define START_MAP 264
#define END_MAP 265
#define NAME 266
#define AREA 267
#define SHAPE 268
#define COORDS 269
#define ALT 270
#define HREF 271
#define NOHREF 272
#define TARGET 273
#define ONMOUSEOVER 274
#define ONMOUSEOUT 275
#define ONFOCUS 276
#define ONBLUR 277
#define AUTHOR 278
#define DESCRIPTION 279
#define BEGIN_COMMENT 280
#define END_COMMENT 281
#define FLOAT 282
#define STRING 283
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
#line 49 "imap_csim.y"
typedef union YYSTYPE {
int val;
double value;
char id[256];
} yystype;
# define YYSTYPE yystype
} YYSTYPE;
/* Line 1285 of yacc.c. */
#line 99 "y.tab.h"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif
# define IMG 257
# define SRC 258
# define WIDTH 259
# define HEIGHT 260
# define BORDER 261
# define USEMAP 262
# define START_MAP 263
# define END_MAP 264
# define NAME 265
# define AREA 266
# define SHAPE 267
# define COORDS 268
# define ALT 269
# define HREF 270
# define NOHREF 271
# define TARGET 272
# define ONMOUSEOVER 273
# define ONMOUSEOUT 274
# define ONFOCUS 275
# define ONBLUR 276
# define AUTHOR 277
# define DESCRIPTION 278
# define BEGIN_COMMENT 279
# define END_COMMENT 280
# define FLOAT 281
# define STRING 282
extern YYSTYPE csim_lval;
#endif /* not BISON_Y_TAB_H */
......@@ -25,9 +25,10 @@
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <glib/gstdio.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h> /* for keyboard values */
......@@ -948,7 +949,7 @@ dump_output(gpointer param, OutputFunc_t output)
void
save_as(const gchar *filename)
{
FILE *out = fopen(filename, "w");
FILE *out = g_fopen(filename, "w");
if (out) {
dump_output(out, save_to_file);
fclose(out);
......
......@@ -24,6 +24,8 @@
#include <math.h>
#include <glib/gstdio.h>
#include <gtk/gtk.h>
#include "imap_circle.h"
......@@ -175,7 +177,7 @@ load_ncsa(const char* filename)
{
gboolean status;
extern FILE *ncsa_in;
ncsa_in = fopen(filename, "r");
ncsa_in = g_fopen(filename, "r");
if (ncsa_in) {
status = !ncsa_parse();
fclose(ncsa_in);
......
......@@ -49,6 +49,8 @@
#include <math.h>
#include <glib/gstdio.h>
#include <gtk/gtk.h>
#include "imap_circle.h"
......@@ -1276,7 +1278,7 @@ load_ncsa(const char* filename)
{
gboolean status;
extern FILE *ncsa_in;
ncsa_in = fopen(filename, "r");
ncsa_in = g_fopen(filename, "r");
if (ncsa_in) {
status = !ncsa_parse();
fclose(ncsa_in);
......
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