Commit b584b564 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

put subsequent deprecated prototypes into a single #ifndef ... #endif

2004-10-06  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/lib.pl: put subsequent deprecated prototypes into
	a single #ifndef ... #endif pair.

	* libgimp/gimpbrushes_pdb.h
	* libgimp/gimpgradients_pdb.h
	* libgimp/gimppalettes_pdb.h
	* libgimp/gimppatterns_pdb.h
	* libgimp/gimptexttool_pdb.h: regenerated.
parent e9e2e3f6
2004-10-06 Sven Neumann <sven@gimp.org>
* tools/pdbgen/lib.pl: put subsequent deprecated prototypes into
a single #ifndef ... #endif pair.
* libgimp/gimpbrushes_pdb.h
* libgimp/gimpgradients_pdb.h
* libgimp/gimppalettes_pdb.h
* libgimp/gimppatterns_pdb.h
* libgimp/gimptexttool_pdb.h: regenerated.
2004-10-06 Sven Neumann <sven@gimp.org>
* app/core/gimpimage.[ch]: store the time when the image is first
......
......@@ -36,14 +36,8 @@ gchar** gimp_brushes_get_list (const gchar *filter,
gchar* gimp_brushes_get_brush (gint *width,
gint *height,
gint *spacing);
#endif /* GIMP_DISABLE_DEPRECATED */
#ifndef GIMP_DISABLE_DEPRECATED
gint gimp_brushes_get_spacing (void);
#endif /* GIMP_DISABLE_DEPRECATED */
#ifndef GIMP_DISABLE_DEPRECATED
gboolean gimp_brushes_set_spacing (gint spacing);
#endif /* GIMP_DISABLE_DEPRECATED */
#ifndef GIMP_DISABLE_DEPRECATED
gchar* gimp_brushes_get_brush_data (const gchar *name,
gdouble *opacity,
gint *spacing,
......
......@@ -35,13 +35,9 @@ gchar** gimp_gradients_get_list (const gchar *filter,
#ifndef GIMP_DISABLE_DEPRECATED
gdouble* gimp_gradients_sample_uniform (gint num_samples,
gboolean reverse);
#endif /* GIMP_DISABLE_DEPRECATED */
#ifndef GIMP_DISABLE_DEPRECATED
gdouble* gimp_gradients_sample_custom (gint num_samples,
const gdouble *positions,
gboolean reverse);
#endif /* GIMP_DISABLE_DEPRECATED */
#ifndef GIMP_DISABLE_DEPRECATED
gchar* gimp_gradients_get_gradient_data (const gchar *name,
gint sample_size,
gboolean reverse,
......
......@@ -34,8 +34,6 @@ gchar** gimp_palettes_get_list (const gchar *filter,
gint *num_palettes);
#ifndef GIMP_DISABLE_DEPRECATED
gchar* gimp_palettes_get_palette (gint *num_colors);
#endif /* GIMP_DISABLE_DEPRECATED */
#ifndef GIMP_DISABLE_DEPRECATED
gchar* gimp_palettes_get_palette_entry (const gchar *name,
gint entry_num,
gint *num_colors,
......
......@@ -35,8 +35,6 @@ gchar** gimp_patterns_get_list (const gchar *filter,
#ifndef GIMP_DISABLE_DEPRECATED
gchar* gimp_patterns_get_pattern (gint *width,
gint *height);
#endif /* GIMP_DISABLE_DEPRECATED */
#ifndef GIMP_DISABLE_DEPRECATED
gchar* gimp_patterns_get_pattern_data (const gchar *name,
gint *width,
gint *height,
......
......@@ -65,8 +65,6 @@ gint32 gimp_text (gint32 image_ID,
const gchar *spacing,
const gchar *registry,
const gchar *encoding);
#endif /* GIMP_DISABLE_DEPRECATED */
#ifndef GIMP_DISABLE_DEPRECATED
gboolean gimp_text_get_extents (const gchar *text,
gdouble size,
GimpSizeType size_type,
......
......@@ -84,6 +84,15 @@ sub generate {
my $funcname = "gimp_$name"; my $wrapped = ""; my %usednames;
my $retdesc = "";
if ($proc->{deprecated} && !$out->{deprecated}) {
push @{$out->{protos}}, "#ifndef GIMP_DISABLE_DEPRECATED\n";
$out->{deprecated} = 1;
}
elsif (!$proc->{deprecated} && $out->{deprecated}) {
push @{$out->{protos}}, "#endif /* GIMP_DISABLE_DEPRECATED */\n";
$out->{deprecated} = 0;
}
# Find the return argument (defaults to the first arg if not
# explicity set
my $retarg = undef; $retvoid = 0;
......@@ -432,13 +441,8 @@ CODE
my $proto = "$hrettype $wrapped$funcname ($arglist);\n";
$proto =~ s/ +/ /g;
if ($proc->{deprecated}) {
push @{$out->{protos}}, "#ifndef GIMP_DISABLE_DEPRECATED\n";
}
push @{$out->{protos}}, $proto;
if ($proc->{deprecated}) {
push @{$out->{protos}}, "#endif /* GIMP_DISABLE_DEPRECATED */\n";
}
my $clist = $arglist;
my $padlen = length($wrapped) + length($funcname) + 2;
......@@ -478,6 +482,11 @@ $wrapped$funcname ($clist)
CODE
}
if ($out->{deprecated}) {
push @{$out->{protos}}, "#endif /* GIMP_DISABLE_DEPRECATED */\n";
$out->{deprecated} = 0;
}
my $lgpl_top = <<'LGPL';
/* LIBGIMP - The GIMP Library
* Copyright (C) 1995-2003 Peter Mattis and Spencer Kimball
......@@ -604,12 +613,16 @@ LGPL
else {
$arg = $_;
}
push @{$out->{protos}}, $arg;
}
my $body;
$body = $extra->{decls} if exists $extra->{decls};
foreach (@{$out->{protos}}) { $body .= $_ }
if ($out->{deprecated}) {
$body .= "#endif /* GIMP_DISABLE_DEPRECATED */\n";
}
chomp $body;
open HFILE, "> $hfile" or die "Can't open $hfile: $!\n";
......
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