gimp/pdb/enumgen.pl

270 lines
6.2 KiB
Perl
Raw Normal View History

1999-03-20 07:04:16 +08:00
#!/usr/bin/perl -w
# GIMP - The GNU Image Manipulation Program
# Copyright (C) 1999-2003 Manish Singh <yosh@gimp.org>
1999-03-20 07:04:16 +08:00
# This program is free software: you can redistribute it and/or modify
1999-03-20 07:04:16 +08:00
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
1999-03-20 07:04:16 +08:00
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUTFILE 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, see <https://www.gnu.org/licenses/>.
1999-03-20 07:04:16 +08:00
BEGIN {
$srcdir = $ENV{srcdir} || '.';
$destdir = $ENV{destdir} || '.';
$builddir = $ENV{builddir} || '.';
$topsrcdir = $ENV{topsrcdir} || '.';
1999-03-20 07:04:16 +08:00
}
1999-03-21 10:14:08 +08:00
use lib $srcdir;
1999-03-20 07:04:16 +08:00
use Text::Wrap qw(wrap $columns);
1999-04-04 13:59:08 +08:00
$columns = 77;
1999-03-20 07:04:16 +08:00
#BEGIN { require 'util.pl' }
require 'util.pl';
1999-03-21 10:14:08 +08:00
*write_file = \&Gimp::CodeGen::util::write_file;
*FILE_EXT = \$Gimp::CodeGen::util::FILE_EXT;
1999-03-20 07:04:16 +08:00
my $header = <<'HEADER';
:# GIMP - The GNU Image Manipulation Program
:# Copyright (C) 1999-2003 Manish Singh <yosh@gimp.org>
1999-03-20 07:04:16 +08:00
:
:# This program is free software: you can redistribute it and/or modify
1999-03-20 07:04:16 +08:00
:# it under the terms of the GNU General Public License as published by
:# the Free Software Foundation; either version 3 of the License, or
1999-03-20 07:04:16 +08:00
:# (at your option) any later version.
:
:# This program is distributed in the hope that it will be useful,
:# but WITHOUTFILE 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, see <https://www.gnu.org/licenses/>.
1999-03-20 07:04:16 +08:00
:
:# autogenerated by enumgen.pl
:
:package Gimp::CodeGen::enums;
:
:%enums = (
HEADER
my $external;
open my $EXTERNAL, "enums-external.pl";
{
local $/;
$external = <$EXTERNAL>;
}
close $EXTERNAL;
1999-03-20 07:04:16 +08:00
my $footer = <<'FOOTER';
:);
:
:foreach $e (values %enums) {
: $e->{info} = "";
1999-04-04 13:59:08 +08:00
: foreach (@{$e->{symbols}}) {
tools/pdbgen/app.pl tools/pdbgen/enumcode-py.pl tools/pdbgen/enumcode.pl 2002-03-17 Manish Singh <yosh@gimp.org> * tools/pdbgen/app.pl * tools/pdbgen/enumcode-py.pl * tools/pdbgen/enumcode.pl * tools/pdbgen/enumgen.pl: removed enum nick support, best to keep internal and external names consistent * app/core/core-enums.h: remove chops from enums. Change TRANS to TRANSPARENT in GimpBlendMode * app/core/core-types.h: remove chops and nicks from enums. Change INV to INVERSE and SUB to SUBTRACT to make things more clear * app/core/gimpchannel.c * app/gui/channels-commands.c * app/gui/vectors-commands.c * app/tools/gimpbezierselecttool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimprectselecttool.c * app/tools/gimpselectiontool.c * app/tools/selection_options.c * app/tools/tools-types.h * app/widgets/gimpchannellistview.c * app/widgets/gimpvectorslistview.c: reflect SUB -> SUBTRACT change * app/core/gimpdrawable-blend.c: reflect TRANS -> TRANSPARENT change * app/core/gimplayer.c * app/gui/layers-commands.c: reflect INV -> INVERSE change * app/paint/paint-types.h: remove nick from PaintApplicationMode * app/tools/gimperasertool.c: fix tooltip * app/widgets/gimpenummenu.c: #include "libgimp/gimpintl.h" for gettext * libgimp/gimpcompat.h: compatibility enums here, since we removed the nicks * tools/pdbgen/enums.pl * libgimp/gimpenums.h * plug-ins/script-fu/script-fu-constants.c * app/core/core-enums.c * app/pdb/channel_cmds.c * app/pdb/drawable_cmds.c * app/pdb/edit_cmds.c * app/pdb/layer_cmds.c * app/pdb/misc_tools_cmds.c * app/pdb/paint_tools_cmds.c * app/pdb/selection_cmds.c * app/pdb/selection_tools_cmds.c: regenerated, enum changes * plug-ins/common/hot.c: GIMP_TRANS_IMAGE_FILL -> GIMP_TRANSPARENT_FILL * plug-ins/common/warp.c: GIMP_BG_IMAGE_FILL -> GIMP_BACKGROUND_FILL * plug-ins/script-fu/siod-wrapper.c: compat constant definitions
2002-03-18 06:54:26 +08:00
: $e->{info} .= "$_ ($e->{mapping}->{$_}), "
1999-04-04 13:59:08 +08:00
: }
1999-03-20 07:04:16 +08:00
: $e->{info} =~ s/, $//;
:}
:
:1;
FOOTER
tools/pdbgen/app.pl tools/pdbgen/enumcode-py.pl tools/pdbgen/enumcode.pl 2002-03-17 Manish Singh <yosh@gimp.org> * tools/pdbgen/app.pl * tools/pdbgen/enumcode-py.pl * tools/pdbgen/enumcode.pl * tools/pdbgen/enumgen.pl: removed enum nick support, best to keep internal and external names consistent * app/core/core-enums.h: remove chops from enums. Change TRANS to TRANSPARENT in GimpBlendMode * app/core/core-types.h: remove chops and nicks from enums. Change INV to INVERSE and SUB to SUBTRACT to make things more clear * app/core/gimpchannel.c * app/gui/channels-commands.c * app/gui/vectors-commands.c * app/tools/gimpbezierselecttool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimprectselecttool.c * app/tools/gimpselectiontool.c * app/tools/selection_options.c * app/tools/tools-types.h * app/widgets/gimpchannellistview.c * app/widgets/gimpvectorslistview.c: reflect SUB -> SUBTRACT change * app/core/gimpdrawable-blend.c: reflect TRANS -> TRANSPARENT change * app/core/gimplayer.c * app/gui/layers-commands.c: reflect INV -> INVERSE change * app/paint/paint-types.h: remove nick from PaintApplicationMode * app/tools/gimperasertool.c: fix tooltip * app/widgets/gimpenummenu.c: #include "libgimp/gimpintl.h" for gettext * libgimp/gimpcompat.h: compatibility enums here, since we removed the nicks * tools/pdbgen/enums.pl * libgimp/gimpenums.h * plug-ins/script-fu/script-fu-constants.c * app/core/core-enums.c * app/pdb/channel_cmds.c * app/pdb/drawable_cmds.c * app/pdb/edit_cmds.c * app/pdb/layer_cmds.c * app/pdb/misc_tools_cmds.c * app/pdb/paint_tools_cmds.c * app/pdb/selection_cmds.c * app/pdb/selection_tools_cmds.c: regenerated, enum changes * plug-ins/common/hot.c: GIMP_TRANS_IMAGE_FILL -> GIMP_TRANSPARENT_FILL * plug-ins/common/warp.c: GIMP_BG_IMAGE_FILL -> GIMP_BACKGROUND_FILL * plug-ins/script-fu/siod-wrapper.c: compat constant definitions
2002-03-18 06:54:26 +08:00
my ($enumname, $contig, $symbols, @mapping, $before);
1999-03-20 07:04:16 +08:00
# Most of this enum parsing stuff was swiped from makeenums.pl in GTK+
1999-04-04 13:59:08 +08:00
sub parse_options {
my $opts = shift;
my @opts;
for $opt (split /\s*,\s*/, $opts) {
$opt =~ s/^\s*//;
$opt =~ s/\s*$//;
my ($key,$val) = $opt =~ /([-\w]+)(?:=(.+))?/;
1999-04-04 13:59:08 +08:00
defined $val or $val = 1;
push @opts, $key, $val;
}
@opts;
}
1999-03-20 07:04:16 +08:00
sub parse_entries {
my $file = shift;
my $file_name = shift;
my $looking_for_name = 0;
1999-03-20 07:04:16 +08:00
while (<$file>) {
# Read lines until we have no open comments
while (m@/\*([^*]|\*(?!/))*$@) {
1999-03-20 07:04:16 +08:00
my $new;
defined ($new = <$file>) || die "Unmatched comment in $ARGV";
1999-03-20 07:04:16 +08:00
$_ .= $new;
}
# strip comments w/o options
1999-03-20 07:04:16 +08:00
s@/\*(?!<)
([^*]+|\*(?!/))*
\*/@@gx;
s@\n@ @;
next if m@^\s*$@;
if ($looking_for_name) {
if (/^\s*(\w+)/) {
$enumname = $1;
return 1;
}
}
1999-03-20 07:04:16 +08:00
# Handle include files
if (/^\#include\s*<([^>]*)>/ ) {
my $file= "../$1";
open NEWFILE, $file or die "Cannot open include file $file: $!\n";
if (&parse_entries (\*NEWFILE, $NEWFILE)) {
1999-03-20 07:04:16 +08:00
return 1;
} else {
next;
}
}
if (/^\s*\}\s*(\w+)/) {
$enumname = $1;
return 1;
}
if (/^\s*\}/) {
$looking_for_name = 1;
next;
}
1999-03-20 07:04:16 +08:00
if (m@^\s*
(\w+)\s* # name
(?:=( # value
(?:[^,/]|/(?!\*))*
))?,?\s*
(?:/\*< # options
(([^*]|\*(?!/))*)
tools/pdbgen/app.pl tools/pdbgen/enumcode-py.pl tools/pdbgen/enumcode.pl 2002-03-17 Manish Singh <yosh@gimp.org> * tools/pdbgen/app.pl * tools/pdbgen/enumcode-py.pl * tools/pdbgen/enumcode.pl * tools/pdbgen/enumgen.pl: removed enum nick support, best to keep internal and external names consistent * app/core/core-enums.h: remove chops from enums. Change TRANS to TRANSPARENT in GimpBlendMode * app/core/core-types.h: remove chops and nicks from enums. Change INV to INVERSE and SUB to SUBTRACT to make things more clear * app/core/gimpchannel.c * app/gui/channels-commands.c * app/gui/vectors-commands.c * app/tools/gimpbezierselecttool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimprectselecttool.c * app/tools/gimpselectiontool.c * app/tools/selection_options.c * app/tools/tools-types.h * app/widgets/gimpchannellistview.c * app/widgets/gimpvectorslistview.c: reflect SUB -> SUBTRACT change * app/core/gimpdrawable-blend.c: reflect TRANS -> TRANSPARENT change * app/core/gimplayer.c * app/gui/layers-commands.c: reflect INV -> INVERSE change * app/paint/paint-types.h: remove nick from PaintApplicationMode * app/tools/gimperasertool.c: fix tooltip * app/widgets/gimpenummenu.c: #include "libgimp/gimpintl.h" for gettext * libgimp/gimpcompat.h: compatibility enums here, since we removed the nicks * tools/pdbgen/enums.pl * libgimp/gimpenums.h * plug-ins/script-fu/script-fu-constants.c * app/core/core-enums.c * app/pdb/channel_cmds.c * app/pdb/drawable_cmds.c * app/pdb/edit_cmds.c * app/pdb/layer_cmds.c * app/pdb/misc_tools_cmds.c * app/pdb/paint_tools_cmds.c * app/pdb/selection_cmds.c * app/pdb/selection_tools_cmds.c: regenerated, enum changes * plug-ins/common/hot.c: GIMP_TRANS_IMAGE_FILL -> GIMP_TRANSPARENT_FILL * plug-ins/common/warp.c: GIMP_BG_IMAGE_FILL -> GIMP_BACKGROUND_FILL * plug-ins/script-fu/siod-wrapper.c: compat constant definitions
2002-03-18 06:54:26 +08:00
>\s*\*/)?,?
1999-03-20 07:04:16 +08:00
\s*$
@x) {
1999-04-04 13:59:08 +08:00
my ($name, $value, $options) = ($1, $2, $3);
if (defined $options) {
my %options = parse_options($options);
Enabled skipping enum values for either the PDB or GType registration 2004-01-06 Michael Natterer <mitch@gimp.org> Enabled skipping enum values for either the PDB or GType registration (don't always skip both targets): * tools/gimp-mkenums: skip enum values only if there is a literal "skip" (don't match "pdb-skip"). * tools/pdbgen/enumgen.pl: skip only "pdb-skip" values, not "skip" ones. * app/base/base-enums.h * app/core/core-enums.h * app/paint/paint-enums.h * libgimpbase/gimpbaseenums.h: use the right "pdb-skip"/"skip" combination to skip enum values. Changed comments accordingly. Cleaned up the fill functions: * app/core/core-enums.[ch]: added GIMP_PATTERN_FILL enum value to the GimpFillType enum. Don't export GIMP_NO_FILL to the PDB because it's completely useless to export a NOP. * app/core/gimp-edit.c (gimp_edit_fill, gimp_edit_fill_internal): handle pattern fill requests. * app/core/gimpdrawable.[ch] (gimp_drawable_fill): added GimpPattern parameter and fill with it if it's non-NULL. (gimp_drawable_fill_by_type): handle pattern fill and pass the current pattern to gimp_drawable_fill(). * app/text/gimptextlayer.c: changed accordingly. * app/gui/edit-commands.c * app/gui/image-menu.c: use gimp_edit_fill() instead of gimp_drawable_bucket_fill() for FG, BG and pattern filling. * libgimp/gimpcompat.h * plug-ins/script-fu/siod-wrapper.c: removed NO_IMAGE_FILL compat enum value. It should have never been exported to the PDB. * app/pdb/drawable_cmds.c * app/pdb/edit_cmds.c * libgimp/gimpenums.h * plug-ins/pygimp/gimpenums.py * plug-ins/script-fu/script-fu-constants.c * tools/pdbgen/enums.pl: regenerated.
2004-01-06 22:02:08 +08:00
next if defined $options{"pdb-skip"};
}
1999-03-20 07:04:16 +08:00
$symbols .= $name . ' ';
# Figure out a default value (not really foolproof)
$value = $before + 1 if !defined $value;
$value =~ s/\s*$//s;
$value =~ s/^\s*//s;
push @mapping, $name, $value;
my $test = $before + 1;
# Warnings in our eval should be fatal so they set $@
local $SIG{__WARN__} = sub { die $_[0] };
# Try to get a numeric value
eval "\$test = $value * 1;";
# Assume noncontiguous if it's not a number
$contig = 0 if $contig && ($@ || $test - 1 != $before);
$before = $test;
} elsif (m@^\s*\#@) {
# ignore preprocessor directives
1999-03-20 07:04:16 +08:00
} else {
print STDERR "$0: $file_name:$.: Failed to parse `$_'\n";
1999-03-20 07:04:16 +08:00
}
}
return 0;
}
my $code = "";
while (<>) {
if (eof) {
close (ARGV); # reset line numbering
}
# read lines until we have no open comments
while (m@/\*([^*]|\*(?!/))*$@) {
my $new;
defined ($new = <>) || die "Unmatched comment in $ARGV";
$_ .= $new;
}
# strip comments w/o options
s@/\*(?!<)
([^*]+|\*(?!/))*
\*/@@gx;
1999-04-04 13:59:08 +08:00
if (m@^\s*typedef\s+enum\s*
({)?\s*
(?:/\*<
(([^*]|\*(?!/))*)
tools/pdbgen/app.pl tools/pdbgen/enumcode-py.pl tools/pdbgen/enumcode.pl 2002-03-17 Manish Singh <yosh@gimp.org> * tools/pdbgen/app.pl * tools/pdbgen/enumcode-py.pl * tools/pdbgen/enumcode.pl * tools/pdbgen/enumgen.pl: removed enum nick support, best to keep internal and external names consistent * app/core/core-enums.h: remove chops from enums. Change TRANS to TRANSPARENT in GimpBlendMode * app/core/core-types.h: remove chops and nicks from enums. Change INV to INVERSE and SUB to SUBTRACT to make things more clear * app/core/gimpchannel.c * app/gui/channels-commands.c * app/gui/vectors-commands.c * app/tools/gimpbezierselecttool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimprectselecttool.c * app/tools/gimpselectiontool.c * app/tools/selection_options.c * app/tools/tools-types.h * app/widgets/gimpchannellistview.c * app/widgets/gimpvectorslistview.c: reflect SUB -> SUBTRACT change * app/core/gimpdrawable-blend.c: reflect TRANS -> TRANSPARENT change * app/core/gimplayer.c * app/gui/layers-commands.c: reflect INV -> INVERSE change * app/paint/paint-types.h: remove nick from PaintApplicationMode * app/tools/gimperasertool.c: fix tooltip * app/widgets/gimpenummenu.c: #include "libgimp/gimpintl.h" for gettext * libgimp/gimpcompat.h: compatibility enums here, since we removed the nicks * tools/pdbgen/enums.pl * libgimp/gimpenums.h * plug-ins/script-fu/script-fu-constants.c * app/core/core-enums.c * app/pdb/channel_cmds.c * app/pdb/drawable_cmds.c * app/pdb/edit_cmds.c * app/pdb/layer_cmds.c * app/pdb/misc_tools_cmds.c * app/pdb/paint_tools_cmds.c * app/pdb/selection_cmds.c * app/pdb/selection_tools_cmds.c: regenerated, enum changes * plug-ins/common/hot.c: GIMP_TRANS_IMAGE_FILL -> GIMP_TRANSPARENT_FILL * plug-ins/common/warp.c: GIMP_BG_IMAGE_FILL -> GIMP_BACKGROUND_FILL * plug-ins/script-fu/siod-wrapper.c: compat constant definitions
2002-03-18 06:54:26 +08:00
>\s*\*/)?
1999-04-04 13:59:08 +08:00
@x) {
if (defined $2) {
my %options = parse_options($2);
next if defined $options{"pdb-skip"};
1999-04-04 13:59:08 +08:00
}
1999-03-20 07:04:16 +08:00
# Didn't have trailing '{' look on next lines
if (!defined $1) {
while (<>) {
if (s/^\s*\{//) {
last;
}
}
}
tools/pdbgen/app.pl tools/pdbgen/enumcode-py.pl tools/pdbgen/enumcode.pl 2002-03-17 Manish Singh <yosh@gimp.org> * tools/pdbgen/app.pl * tools/pdbgen/enumcode-py.pl * tools/pdbgen/enumcode.pl * tools/pdbgen/enumgen.pl: removed enum nick support, best to keep internal and external names consistent * app/core/core-enums.h: remove chops from enums. Change TRANS to TRANSPARENT in GimpBlendMode * app/core/core-types.h: remove chops and nicks from enums. Change INV to INVERSE and SUB to SUBTRACT to make things more clear * app/core/gimpchannel.c * app/gui/channels-commands.c * app/gui/vectors-commands.c * app/tools/gimpbezierselecttool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimprectselecttool.c * app/tools/gimpselectiontool.c * app/tools/selection_options.c * app/tools/tools-types.h * app/widgets/gimpchannellistview.c * app/widgets/gimpvectorslistview.c: reflect SUB -> SUBTRACT change * app/core/gimpdrawable-blend.c: reflect TRANS -> TRANSPARENT change * app/core/gimplayer.c * app/gui/layers-commands.c: reflect INV -> INVERSE change * app/paint/paint-types.h: remove nick from PaintApplicationMode * app/tools/gimperasertool.c: fix tooltip * app/widgets/gimpenummenu.c: #include "libgimp/gimpintl.h" for gettext * libgimp/gimpcompat.h: compatibility enums here, since we removed the nicks * tools/pdbgen/enums.pl * libgimp/gimpenums.h * plug-ins/script-fu/script-fu-constants.c * app/core/core-enums.c * app/pdb/channel_cmds.c * app/pdb/drawable_cmds.c * app/pdb/edit_cmds.c * app/pdb/layer_cmds.c * app/pdb/misc_tools_cmds.c * app/pdb/paint_tools_cmds.c * app/pdb/selection_cmds.c * app/pdb/selection_tools_cmds.c: regenerated, enum changes * plug-ins/common/hot.c: GIMP_TRANS_IMAGE_FILL -> GIMP_TRANSPARENT_FILL * plug-ins/common/warp.c: GIMP_BG_IMAGE_FILL -> GIMP_BACKGROUND_FILL * plug-ins/script-fu/siod-wrapper.c: compat constant definitions
2002-03-18 06:54:26 +08:00
$symbols = ""; $contig = 1; $before = -1; @mapping = ();
1999-03-20 07:04:16 +08:00
# Now parse the entries
&parse_entries (\*ARGV, $ARGV);
1999-03-20 07:04:16 +08:00
$symbols =~ s/\s*$//s;
$symbols = wrap("\t\t\t ", "\t\t\t " , $symbols);
$symbols =~ s/^\s*//s;
my $mapping = ""; $pos = 1;
foreach (@mapping) {
$mapping .= $pos++ % 2 ? "$_ => " : "'$_',\n\t\t ";
}
$mapping =~ s/,\n\s*$//s;
$ARGV =~ s@($topsrcdir/)?(?:(?:..|app)/)*@@;
1999-04-23 14:55:37 +08:00
$code .= <<ENTRY;
1999-04-10 12:52:07 +08:00
: $enumname =>
: { contig => $contig,
2001-01-22 07:24:26 +08:00
: header => '$ARGV',
1999-04-10 12:52:07 +08:00
: symbols => [ qw($symbols) ],
tools/pdbgen/app.pl tools/pdbgen/enumcode-py.pl tools/pdbgen/enumcode.pl 2002-03-17 Manish Singh <yosh@gimp.org> * tools/pdbgen/app.pl * tools/pdbgen/enumcode-py.pl * tools/pdbgen/enumcode.pl * tools/pdbgen/enumgen.pl: removed enum nick support, best to keep internal and external names consistent * app/core/core-enums.h: remove chops from enums. Change TRANS to TRANSPARENT in GimpBlendMode * app/core/core-types.h: remove chops and nicks from enums. Change INV to INVERSE and SUB to SUBTRACT to make things more clear * app/core/gimpchannel.c * app/gui/channels-commands.c * app/gui/vectors-commands.c * app/tools/gimpbezierselecttool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimprectselecttool.c * app/tools/gimpselectiontool.c * app/tools/selection_options.c * app/tools/tools-types.h * app/widgets/gimpchannellistview.c * app/widgets/gimpvectorslistview.c: reflect SUB -> SUBTRACT change * app/core/gimpdrawable-blend.c: reflect TRANS -> TRANSPARENT change * app/core/gimplayer.c * app/gui/layers-commands.c: reflect INV -> INVERSE change * app/paint/paint-types.h: remove nick from PaintApplicationMode * app/tools/gimperasertool.c: fix tooltip * app/widgets/gimpenummenu.c: #include "libgimp/gimpintl.h" for gettext * libgimp/gimpcompat.h: compatibility enums here, since we removed the nicks * tools/pdbgen/enums.pl * libgimp/gimpenums.h * plug-ins/script-fu/script-fu-constants.c * app/core/core-enums.c * app/pdb/channel_cmds.c * app/pdb/drawable_cmds.c * app/pdb/edit_cmds.c * app/pdb/layer_cmds.c * app/pdb/misc_tools_cmds.c * app/pdb/paint_tools_cmds.c * app/pdb/selection_cmds.c * app/pdb/selection_tools_cmds.c: regenerated, enum changes * plug-ins/common/hot.c: GIMP_TRANS_IMAGE_FILL -> GIMP_TRANSPARENT_FILL * plug-ins/common/warp.c: GIMP_BG_IMAGE_FILL -> GIMP_BACKGROUND_FILL * plug-ins/script-fu/siod-wrapper.c: compat constant definitions
2002-03-18 06:54:26 +08:00
: mapping => { $mapping }
1999-04-10 12:52:07 +08:00
: },
1999-03-20 07:04:16 +08:00
ENTRY
}
}
$code =~ s/,\n$/\n/s;
1999-04-10 12:52:07 +08:00
foreach ($header, $code, $footer) { s/^://mg }
$outfile = "$builddir/pdb/enums.pl$FILE_EXT";
1999-03-21 10:14:08 +08:00
open OUTFILE, "> $outfile";
print OUTFILE $header, $external, $code, $footer;
1999-03-20 07:04:16 +08:00
close OUTFILE;
&write_file($outfile, "$destdir/pdb");