From 6ccc7bdd8bbf8b1e0f8d6ecc080f6543ddc447c8 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Wed, 27 Oct 2004 19:32:04 +0000 Subject: [PATCH] removed trailing commmas from output. 2004-10-27 Sven Neumann * tools/pdbgen/enumcode.pl: removed trailing commmas from output. --- ChangeLog | 4 ++++ tools/pdbgen/enumcode.pl | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8f81d780ba..a6a7ce2774 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,10 @@ dialogs for the tool options in a GtkNotebook showing the options within one page for each tool. +2004-10-27 Sven Neumann + + * tools/pdbgen/enumcode.pl: removed trailing commmas from output. + 2004-10-27 Sven Neumann * tools/pdbgen/enumcode.pl: fixed loop control in diff --git a/tools/pdbgen/enumcode.pl b/tools/pdbgen/enumcode.pl index b56a2c72ae..6ea9708c88 100755 --- a/tools/pdbgen/enumcode.pl +++ b/tools/pdbgen/enumcode.pl @@ -121,6 +121,7 @@ static GimpGetTypeFunc get_type_funcs[] = { CODE +my $first = 1; foreach (sort keys %enums) { if (! ($_ =~ /GimpUnit/)) { my $enum = $enums{$_}; @@ -128,9 +129,13 @@ foreach (sort keys %enums) { for ($func) { s/Gimp//; s/PDB/Pdb/; s/([A-Z][^A-Z]+)/\L$1\E_/g; s/_$// } - print ENUMFILE " gimp_$func\_get_type,\n"; + print ENUMFILE ",\n" unless $first; + print ENUMFILE " gimp_$func\_get_type"; + + $first = 0; } } +print ENUMFILE "\n" unless $first; print ENUMFILE <