Fixes to address -ansi -pedantic compilation (bug #342390). Thanks goes to

2006-05-20  Manish Singh  <yosh@gimp.org>

        Fixes to address -ansi -pedantic compilation (bug #342390).
        Thanks goes to Daniel Richard G. for noticing and suggesting
        fixes.

        * libgimpbase/gimpsignal.c: #include "config.h" and define
        __POSIX_SOURCE for sigaction stuff.

        * app/base/tile-swap.c (tile_swap_test): use more portable
        S_IRUSR and S_IWUSR, instead of S_IREAD and S_IWRITE.

        * plug-ins/common/ripple.c
        * plug-ins/imagemap/imap_main.c: use C89 comments.

        * plug-ins/Lighting/lighting_preview.h: don't define spin widget
        variables here...

        * plug-ins/Lighting/lighting_ui.[ch]: ... and instead take care
        of them here.
This commit is contained in:
Manish Singh 2006-05-20 07:18:25 +00:00 committed by Manish Singh
parent 1beec26359
commit b9416956f8
8 changed files with 43 additions and 11 deletions

View File

@ -1,3 +1,24 @@
2006-05-20 Manish Singh <yosh@gimp.org>
Fixes to address -ansi -pedantic compilation (bug #342390).
Thanks goes to Daniel Richard G. for noticing and suggesting
fixes.
* libgimpbase/gimpsignal.c: #include "config.h" and define
__POSIX_SOURCE for sigaction stuff.
* app/base/tile-swap.c (tile_swap_test): use more portable
S_IRUSR and S_IWUSR, instead of S_IREAD and S_IWRITE.
* plug-ins/common/ripple.c
* plug-ins/imagemap/imap_main.c: use C89 comments.
* plug-ins/Lighting/lighting_preview.h: don't define spin widget
variables here...
* plug-ins/Lighting/lighting_ui.[ch]: ... and instead take care
of them here.
2006-05-19 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* libgimpwidgets/gimpwidgets.c (gimp_coordinates_callback):

View File

@ -393,7 +393,7 @@ tile_swap_test (void)
/* make sure this duplicates the open() call from tile_swap_open() */
swap_file->fd = g_open (swap_file->filename,
O_CREAT | O_RDWR | _O_BINARY | _O_TEMPORARY,
S_IREAD | S_IWRITE);
S_IRUSR | S_IWUSR);
if (swap_file->fd != -1)
{

View File

@ -19,6 +19,10 @@
* $Revision$
*/
#include "config.h"
#define __POSIX_SOURCE /* all the sigaction stuff is POSIX */
#include <glib.h>
#include "gimpsignal.h"
@ -89,7 +93,7 @@ gimp_signal_private (gint signum,
return (GimpSignalHandlerFunc) osa.sa_handler;
#else
return NULL; /* Or g_error()? Should all calls to
return NULL; /* Or g_error()? Should all calls to
* this function really be inside
* #ifdef G_OS_UNIX?
*/

View File

@ -35,13 +35,6 @@ extern gdouble *xpostab, *ypostab;
extern gboolean light_hit;
extern gboolean left_button_pressed;
GtkWidget *spin_pos_x;
GtkWidget *spin_pos_y;
GtkWidget *spin_pos_z;
GtkWidget *spin_dir_x;
GtkWidget *spin_dir_y;
GtkWidget *spin_dir_z;
/* Externally visible functions */
void draw_preview_image (gboolean recompute);

View File

@ -44,6 +44,13 @@ static GtkNotebook *options_note_book = NULL;
GdkGC *gc = NULL;
GtkWidget *previewarea = NULL;
GtkWidget *spin_pos_x = NULL;
GtkWidget *spin_pos_y = NULL;
GtkWidget *spin_pos_z = NULL;
GtkWidget *spin_dir_x = NULL;
GtkWidget *spin_dir_y = NULL;
GtkWidget *spin_dir_z = NULL;
static GtkWidget *colorbutton;
static GtkWidget *light_type_combo;
static GtkWidget *lightselect_combo;

View File

@ -7,6 +7,13 @@
extern GdkGC *gc;
extern GtkWidget *previewarea;
extern GtkWidget *spin_pos_x;
extern GtkWidget *spin_pos_y;
extern GtkWidget *spin_pos_z;
extern GtkWidget *spin_dir_x;
extern GtkWidget *spin_dir_y;
extern GtkWidget *spin_dir_z;
/* Externally visible functions */
/* ============================ */

View File

@ -650,7 +650,7 @@ average_two_pixels (guchar *dest,
{
gint b;
// x = x - floor(x);
/* x = x - floor(x); */
if (has_alpha)
{

View File

@ -1291,7 +1291,7 @@ dialog(GimpDrawable *drawable)
gtk_widget_show(hbox);
tools = make_tools(dlg);
// selection_set_edit_command(tools, factory_edit);
/* selection_set_edit_command(tools, factory_edit); */
gtk_box_pack_start(GTK_BOX(hbox), tools, FALSE, FALSE, 0);
_preview = make_preview(drawable);