Commit 86681c8d authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

ported to gstdio, removed unnecessary includes.

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

	* plug-ins/common/*: ported to gstdio, removed unnecessary includes.
parent 56d285db
2005-03-04 Sven Neumann <sven@gimp.org>
* plug-ins/common/*: ported to gstdio, removed unnecessary includes.
2005-03-04 Sven Neumann <sven@gimp.org>
* plug-ins/FractalExplorer
......
......@@ -53,8 +53,6 @@
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -28,14 +28,13 @@
#include <glib/gstdio.h>
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include "bmp.h"
#include "libgimp/stdplugins-intl.h"
#if !defined(WIN32) || defined(__MINGW32__)
#define BI_RGB 0
#define BI_RLE8 1
......
......@@ -34,8 +34,6 @@
#include <glib/gstdio.h>
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......@@ -43,6 +41,7 @@
#include "libgimp/stdplugins-intl.h"
static gint cur_progress = 0;
static gint max_progress = 0;
static gint encoded = 0;
......
......@@ -27,11 +27,6 @@
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -22,17 +22,13 @@
* Possible future additions:
* + Save (perhaps optionally?) the palette in a KCF
*/
#include "config.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <gtk/gtk.h>
#include <glib/gstdio.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......@@ -298,7 +294,7 @@ load_image (const gchar *file,
/* Open the file for reading */
fp = fopen (file, "r");
fp = g_fopen (file, "r");
if (fp == NULL)
{
......@@ -570,7 +566,7 @@ save_image (const gchar *file,
drawable = gimp_drawable_get (layer);
/* Open the file for writing */
fp = fopen (file, "w");
fp = g_fopen (file, "w");
if (fp == NULL)
{
......
......@@ -72,11 +72,10 @@
#include "config.h"
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <glib/gstdio.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......@@ -1999,7 +1998,7 @@ CML_save_to_file_response (GtkWidget *dialog,
! force_overwrite (filename, dialog))
return;
file = fopen (filename, "w");
file = g_fopen (filename, "w");
if (! file)
{
......@@ -2214,7 +2213,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 = fopen (filename, "r");
file = g_fopen (filename, "r");
if (!file)
{
......
......@@ -29,9 +29,8 @@
#include "config.h"
#include <string.h>
#include <aalib.h>
#include <gtk/gtk.h>
#include <aalib.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -21,8 +21,6 @@
#include "config.h"
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -46,12 +46,8 @@
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......@@ -604,7 +600,7 @@ render_frame (gint32 whichframe)
{
printf( "playback: Asked for frame number %d in a %d-frame animation!\n",
(int) (whichframe+1), (int) total_frames);
exit(-1);
gimp_quit ();
}
drawable = gimp_drawable_get (layers[total_frames-(whichframe+1)]);
......
......@@ -30,8 +30,6 @@
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <libgimp/gimp.h>
......
......@@ -39,8 +39,6 @@
#include "config.h"
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -34,8 +34,6 @@
#include <string.h>
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -17,9 +17,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <gtk/gtk.h>
#include "config.h"
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -102,14 +102,7 @@
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -26,15 +26,15 @@
#include "config.h"
#include <string.h>
#include <sys/stat.h>
#include <gtk/gtk.h>
#include <glib/gstdio.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
#include "libgimp/stdplugins-intl.h"
/* lets prototype */
static void query (void);
static void run (const gchar *name,
......@@ -394,7 +394,7 @@ doDialog (void)
doLabel (vbox, _("Uncompressed size: %s"), memsize);
g_free (memsize);
if (filename && !stat (filename, &st) && !gimp_image_is_dirty (imageID))
if (filename && !g_stat (filename, &st) && !gimp_image_is_dirty (imageID))
{
gchar *memsize = gimp_memsize_to_string (st.st_size);
......
......@@ -27,18 +27,10 @@
#include "config.h"
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <gtk/gtk.h>
#include <glib/gstdio.h>
#ifdef G_OS_WIN32
#include <libgimpbase/gimpwin32-io.h>
#endif
#include <libgimpmath/gimpmath.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......@@ -920,7 +912,7 @@ cm_load_file_response_callback (GtkWidget *dialog,
filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
fp = fopen (filename, "r");
fp = g_fopen (filename, "r");
if (fp)
{
......@@ -1054,7 +1046,7 @@ cm_save_file_response_callback (GtkWidget *dialog,
return;
}
file = fopen (filename, "w");
file = g_fopen (filename, "w");
if (! file)
{
......
......@@ -21,8 +21,6 @@
#include "config.h"
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -23,9 +23,6 @@
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -29,15 +29,10 @@
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
#include <libgimpmath/gimpmath.h>
#include "libgimp/stdplugins-intl.h"
......
......@@ -59,21 +59,26 @@
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#include <sys/stat.h>
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <errno.h>
#include <glib/gstdio.h>
#include <libgimp/gimp.h>
......@@ -378,7 +383,7 @@ save_image (const Compressor *compressor,
tmpname,
tmpname) && valid_file (tmpname)))
{
unlink (tmpname);
g_unlink (tmpname);
g_free (tmpname);
return GIMP_PDB_EXECUTION_ERROR;
}
......@@ -399,7 +404,7 @@ save_image (const Compressor *compressor,
{
FILE *f;
if (!(f = fopen (filename, "w")))
if (!(f = g_fopen (filename, "w")))
{
g_message (_("Could not open '%s' for writing: %s"),
gimp_filename_to_utf8 (filename), g_strerror (errno));
......@@ -450,8 +455,8 @@ save_image (const Compressor *compressor,
STARTUPINFO startupinfo;
PROCESS_INFORMATION processinfo;
in = fopen (tmpname, "rb");
out = fopen (filename, "wb");
in = g_fopen (tmpname, "rb");
out = g_fopen (filename, "wb");
startupinfo.cb = sizeof (STARTUPINFO);
startupinfo.lpReserved = NULL;
......@@ -485,7 +490,7 @@ save_image (const Compressor *compressor,
}
#endif /* G_OS_WIN32 */
unlink (tmpname);
g_unlink (tmpname);
g_free (tmpname);
return GIMP_PDB_SUCCESS;
......@@ -530,7 +535,7 @@ load_image (const Compressor *compressor,
{
FILE *f;
if (! (f = fopen (tmpname, "w")))
if (! (f = g_fopen (tmpname, "w")))
{
g_message (_("Could not open '%s' for writing: %s"),
gimp_filename_to_utf8 (tmpname), g_strerror (errno));
......@@ -586,8 +591,8 @@ load_image (const Compressor *compressor,
STARTUPINFO startupinfo;
PROCESS_INFORMATION processinfo;
in = fopen (filename, "rb");
out = fopen (tmpname, "wb");
in = g_fopen (filename, "rb");
out = g_fopen (tmpname, "wb");
startupinfo.cb = sizeof (STARTUPINFO);
startupinfo.lpReserved = NULL;
......@@ -626,7 +631,7 @@ load_image (const Compressor *compressor,
image_ID = gimp_file_load (run_mode, tmpname, tmpname);
unlink (tmpname);
g_unlink (tmpname);
g_free (tmpname);
if (image_ID != -1)
......
......@@ -54,15 +54,7 @@
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <string.h>
#include <sys/types.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -21,11 +21,9 @@
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <gtk/gtk.h>
#include <glib/gstdio.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......@@ -382,7 +380,7 @@ save_image (Config *config,
guint8 *img_buffer, *img_buffer_end;
gchar *basename;
fp = fopen (config->file_name, "w");
fp = g_fopen (config->file_name, "w");
if (!fp)
return FALSE;
......
......@@ -22,11 +22,8 @@
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -36,12 +36,11 @@
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <gtk/gtk.h>
#include <glib/gstdio.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......@@ -855,7 +854,7 @@ p_save_pointfile (BenderDialog *cd,
gint j;
FILE *l_fp;
l_fp = fopen(filename, "w+");
l_fp = g_fopen(filename, "w+");
if (!l_fp)
{
g_message (_("Could not open '%s' for writing: %s"),
......@@ -907,7 +906,7 @@ p_load_pointfile (BenderDialog *cd,
float l_fux, l_fuy, l_flx, l_fly;
gint l_iuy, l_ily ;
l_fp = fopen(filename, "r");
l_fp = g_fopen(filename, "r");
if (!l_fp)
{
g_message (_("Could not open '%s' for reading: %s"),
......
......@@ -30,13 +30,10 @@
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
#include <libgimpmath/gimpmath.h>
#include "libgimp/stdplugins-intl.h"
......
......@@ -23,8 +23,6 @@
#include "config.h"
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -24,11 +24,6 @@
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -23,11 +23,7 @@
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -23,12 +23,8 @@
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -25,9 +25,10 @@
#include "config.h"
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <glib/gstdio.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......@@ -283,7 +284,7 @@ load_image (const gchar *filename)
gboolean toggle_endian = FALSE;
/* open the file */
DICOM = fopen (filename, "rb");
DICOM = g_fopen (filename, "rb");
if (!DICOM)
{
......@@ -640,7 +641,7 @@ save_image (const gchar *filename,
g_date_free (date);
/* Open the output file. */
DICOM = fopen (filename, "wb");
DICOM = g_fopen (filename, "wb");
if (!DICOM)
{
......
......@@ -23,15 +23,6 @@
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <sys/types.h>
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -42,23 +42,8 @@
/* Version 1.12. */
typedef enum
{
CARTESIAN_MODE = 0,
POLAR_MODE = 1
} DisplaceMode;
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <signal.h>
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......@@ -70,6 +55,13 @@ typedef enum
#define ENTRY_WIDTH 75
#define TILE_CACHE_SIZE 48
typedef enum
{
CARTESIAN_MODE = 0,
POLAR_MODE = 1
} DisplaceMode;
typedef struct
{
gdouble amount_x;
......
......@@ -29,8 +29,6 @@
#include <string.h>
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -50,12 +50,6 @@
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -28,12 +28,7 @@
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -20,8 +20,6 @@
#include "config.h"
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -37,12 +37,6 @@
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <gtk/gtk.h>
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
......
......@@ -22,16 +22,10 @@
* This plug-in generates a film roll with several images
*/