Commit e5aad8b8 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

s/sprintf/g_snprintf

1999-11-20  Michael Natterer  <mitch@gimp.org>

	* app/devices.c: s/sprintf/g_snprintf

	* app/color_balance.[ch]: spinbuttons instead of text entries.
parent 40606d94
1999-11-20 Michael Natterer <mitch@gimp.org>
* app/devices.c: s/sprintf/g_snprintf
* app/color_balance.[ch]: spinbuttons instead of text entries.
1999-11-20 Michael Natterer <mitch@gimp.org>
* libgimp/gimpexport.c: changed the packing spacings to match the
......
This diff is collapsed.
......@@ -19,6 +19,7 @@
#define __COLOR_BALANCE_H__
#include <gtk/gtk.h>
#include "gimpdrawableF.h"
#include "image_map.h"
#include "tools.h"
......@@ -31,39 +32,41 @@ typedef enum
} TransferMode;
typedef struct _ColorBalanceDialog ColorBalanceDialog;
struct _ColorBalanceDialog
{
GtkWidget *shell;
GtkWidget *cyan_red_text;
GtkWidget *magenta_green_text;
GtkWidget *yellow_blue_text;
GtkAdjustment *cyan_red_data;
GtkAdjustment *magenta_green_data;
GtkAdjustment *yellow_blue_data;
GtkWidget *shell;
GimpDrawable *drawable;
ImageMap image_map;
GtkAdjustment *cyan_red_data;
GtkAdjustment *magenta_green_data;
GtkAdjustment *yellow_blue_data;
double cyan_red[3];
double magenta_green[3];
double yellow_blue[3];
GimpDrawable *drawable;
ImageMap image_map;
guchar r_lookup[256];
guchar g_lookup[256];
guchar b_lookup[256];
gdouble cyan_red[3];
gdouble magenta_green[3];
gdouble yellow_blue[3];
gint preserve_luminosity;
gint preview;
gint application_mode;
guchar r_lookup[256];
guchar g_lookup[256];
guchar b_lookup[256];
gboolean preserve_luminosity;
gboolean preview;
TransferMode application_mode;
};
/* by_color select functions */
Tool * tools_new_color_balance (void);
void tools_free_color_balance (Tool *);
/* color balance functions */
Tool * tools_new_color_balance (void);
void tools_free_color_balance (Tool *tool);
void color_balance_initialize (GDisplay *);
void color_balance (PixelRegion *, PixelRegion *, void *);
void color_balance_initialize (GDisplay *gdisp);
void color_balance (PixelRegion *srcPR,
PixelRegion *destPR,
void *data);
void color_balance_create_lookup_tables (ColorBalanceDialog *);
void color_balance_create_lookup_tables (ColorBalanceDialog *cbd);
#endif /* __COLOR_BALANCE_H__ */
This diff is collapsed.
......@@ -19,6 +19,7 @@
#define __COLOR_BALANCE_H__
#include <gtk/gtk.h>
#include "gimpdrawableF.h"
#include "image_map.h"
#include "tools.h"
......@@ -31,39 +32,41 @@ typedef enum
} TransferMode;
typedef struct _ColorBalanceDialog ColorBalanceDialog;
struct _ColorBalanceDialog
{
GtkWidget *shell;
GtkWidget *cyan_red_text;
GtkWidget *magenta_green_text;
GtkWidget *yellow_blue_text;
GtkAdjustment *cyan_red_data;
GtkAdjustment *magenta_green_data;
GtkAdjustment *yellow_blue_data;
GtkWidget *shell;
GimpDrawable *drawable;
ImageMap image_map;
GtkAdjustment *cyan_red_data;
GtkAdjustment *magenta_green_data;
GtkAdjustment *yellow_blue_data;
double cyan_red[3];
double magenta_green[3];
double yellow_blue[3];
GimpDrawable *drawable;
ImageMap image_map;
guchar r_lookup[256];
guchar g_lookup[256];
guchar b_lookup[256];
gdouble cyan_red[3];
gdouble magenta_green[3];
gdouble yellow_blue[3];
gint preserve_luminosity;
gint preview;
gint application_mode;
guchar r_lookup[256];
guchar g_lookup[256];
guchar b_lookup[256];
gboolean preserve_luminosity;
gboolean preview;
TransferMode application_mode;
};
/* by_color select functions */
Tool * tools_new_color_balance (void);
void tools_free_color_balance (Tool *);
/* color balance functions */
Tool * tools_new_color_balance (void);
void tools_free_color_balance (Tool *tool);
void color_balance_initialize (GDisplay *);
void color_balance (PixelRegion *, PixelRegion *, void *);
void color_balance_initialize (GDisplay *gdisp);
void color_balance (PixelRegion *srcPR,
PixelRegion *destPR,
void *data);
void color_balance_create_lookup_tables (ColorBalanceDialog *);
void color_balance_create_lookup_tables (ColorBalanceDialog *cbd);
#endif /* __COLOR_BALANCE_H__ */
......@@ -18,7 +18,6 @@
#include "config.h"
#include <string.h>
#include <stdio.h>
#include "appenv.h"
#include "devices.h"
......@@ -1048,10 +1047,10 @@ device_status_update (guint32 deviceid)
gtk_widget_show (deviceD->colors[i]);
/* Set the tip to be the RGB value */
sprintf (ttbuf, "[%3d,%3d,%3d]",
buffer[j],
buffer[j+1],
buffer[j+2]);
g_snprintf (ttbuf, sizeof (ttbuf), "[%3d,%3d,%3d]",
buffer[j],
buffer[j+1],
buffer[j+2]);
gimp_help_set_help_data (deviceD->colors[i], ttbuf, NULL);
......
......@@ -18,7 +18,6 @@
#include "config.h"
#include <string.h>
#include <stdio.h>
#include "appenv.h"
#include "devices.h"
......@@ -1048,10 +1047,10 @@ device_status_update (guint32 deviceid)
gtk_widget_show (deviceD->colors[i]);
/* Set the tip to be the RGB value */
sprintf (ttbuf, "[%3d,%3d,%3d]",
buffer[j],
buffer[j+1],
buffer[j+2]);
g_snprintf (ttbuf, sizeof (ttbuf), "[%3d,%3d,%3d]",
buffer[j],
buffer[j+1],
buffer[j+2]);
gimp_help_set_help_data (deviceD->colors[i], ttbuf, NULL);
......
......@@ -18,7 +18,6 @@
#include "config.h"
#include <string.h>
#include <stdio.h>
#include "appenv.h"
#include "devices.h"
......@@ -1048,10 +1047,10 @@ device_status_update (guint32 deviceid)
gtk_widget_show (deviceD->colors[i]);
/* Set the tip to be the RGB value */
sprintf (ttbuf, "[%3d,%3d,%3d]",
buffer[j],
buffer[j+1],
buffer[j+2]);
g_snprintf (ttbuf, sizeof (ttbuf), "[%3d,%3d,%3d]",
buffer[j],
buffer[j+1],
buffer[j+2]);
gimp_help_set_help_data (deviceD->colors[i], ttbuf, NULL);
......
This diff is collapsed.
......@@ -19,6 +19,7 @@
#define __COLOR_BALANCE_H__
#include <gtk/gtk.h>
#include "gimpdrawableF.h"
#include "image_map.h"
#include "tools.h"
......@@ -31,39 +32,41 @@ typedef enum
} TransferMode;
typedef struct _ColorBalanceDialog ColorBalanceDialog;
struct _ColorBalanceDialog
{
GtkWidget *shell;
GtkWidget *cyan_red_text;
GtkWidget *magenta_green_text;
GtkWidget *yellow_blue_text;
GtkAdjustment *cyan_red_data;
GtkAdjustment *magenta_green_data;
GtkAdjustment *yellow_blue_data;
GtkWidget *shell;
GimpDrawable *drawable;
ImageMap image_map;
GtkAdjustment *cyan_red_data;
GtkAdjustment *magenta_green_data;
GtkAdjustment *yellow_blue_data;
double cyan_red[3];
double magenta_green[3];
double yellow_blue[3];
GimpDrawable *drawable;
ImageMap image_map;
guchar r_lookup[256];
guchar g_lookup[256];
guchar b_lookup[256];
gdouble cyan_red[3];
gdouble magenta_green[3];
gdouble yellow_blue[3];
gint preserve_luminosity;
gint preview;
gint application_mode;
guchar r_lookup[256];
guchar g_lookup[256];
guchar b_lookup[256];
gboolean preserve_luminosity;
gboolean preview;
TransferMode application_mode;
};
/* by_color select functions */
Tool * tools_new_color_balance (void);
void tools_free_color_balance (Tool *);
/* color balance functions */
Tool * tools_new_color_balance (void);
void tools_free_color_balance (Tool *tool);
void color_balance_initialize (GDisplay *);
void color_balance (PixelRegion *, PixelRegion *, void *);
void color_balance_initialize (GDisplay *gdisp);
void color_balance (PixelRegion *srcPR,
PixelRegion *destPR,
void *data);
void color_balance_create_lookup_tables (ColorBalanceDialog *);
void color_balance_create_lookup_tables (ColorBalanceDialog *cbd);
#endif /* __COLOR_BALANCE_H__ */
This diff is collapsed.
......@@ -19,6 +19,7 @@
#define __COLOR_BALANCE_H__
#include <gtk/gtk.h>
#include "gimpdrawableF.h"
#include "image_map.h"
#include "tools.h"
......@@ -31,39 +32,41 @@ typedef enum
} TransferMode;
typedef struct _ColorBalanceDialog ColorBalanceDialog;
struct _ColorBalanceDialog
{
GtkWidget *shell;
GtkWidget *cyan_red_text;
GtkWidget *magenta_green_text;
GtkWidget *yellow_blue_text;
GtkAdjustment *cyan_red_data;
GtkAdjustment *magenta_green_data;
GtkAdjustment *yellow_blue_data;
GtkWidget *shell;
GimpDrawable *drawable;
ImageMap image_map;
GtkAdjustment *cyan_red_data;
GtkAdjustment *magenta_green_data;
GtkAdjustment *yellow_blue_data;
double cyan_red[3];
double magenta_green[3];
double yellow_blue[3];
GimpDrawable *drawable;
ImageMap image_map;
guchar r_lookup[256];
guchar g_lookup[256];
guchar b_lookup[256];
gdouble cyan_red[3];
gdouble magenta_green[3];
gdouble yellow_blue[3];
gint preserve_luminosity;
gint preview;
gint application_mode;
guchar r_lookup[256];
guchar g_lookup[256];
guchar b_lookup[256];
gboolean preserve_luminosity;
gboolean preview;
TransferMode application_mode;
};
/* by_color select functions */
Tool * tools_new_color_balance (void);
void tools_free_color_balance (Tool *);
/* color balance functions */
Tool * tools_new_color_balance (void);
void tools_free_color_balance (Tool *tool);
void color_balance_initialize (GDisplay *);
void color_balance (PixelRegion *, PixelRegion *, void *);
void color_balance_initialize (GDisplay *gdisp);
void color_balance (PixelRegion *srcPR,
PixelRegion *destPR,
void *data);
void color_balance_create_lookup_tables (ColorBalanceDialog *);
void color_balance_create_lookup_tables (ColorBalanceDialog *cbd);
#endif /* __COLOR_BALANCE_H__ */
......@@ -18,7 +18,6 @@
#include "config.h"
#include <string.h>
#include <stdio.h>
#include "appenv.h"
#include "devices.h"
......@@ -1048,10 +1047,10 @@ device_status_update (guint32 deviceid)
gtk_widget_show (deviceD->colors[i]);
/* Set the tip to be the RGB value */
sprintf (ttbuf, "[%3d,%3d,%3d]",
buffer[j],
buffer[j+1],
buffer[j+2]);
g_snprintf (ttbuf, sizeof (ttbuf), "[%3d,%3d,%3d]",
buffer[j],
buffer[j+1],
buffer[j+2]);
gimp_help_set_help_data (deviceD->colors[i], ttbuf, NULL);
......
......@@ -18,7 +18,6 @@
#include "config.h"
#include <string.h>
#include <stdio.h>
#include "appenv.h"
#include "devices.h"
......@@ -1048,10 +1047,10 @@ device_status_update (guint32 deviceid)
gtk_widget_show (deviceD->colors[i]);
/* Set the tip to be the RGB value */
sprintf (ttbuf, "[%3d,%3d,%3d]",
buffer[j],
buffer[j+1],
buffer[j+2]);
g_snprintf (ttbuf, sizeof (ttbuf), "[%3d,%3d,%3d]",
buffer[j],
buffer[j+1],
buffer[j+2]);
gimp_help_set_help_data (deviceD->colors[i], ttbuf, NULL);
......
Supports Markdown
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