From c13e03716e6df283e3067dfe8261a4c62e943fc2 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Wed, 5 Jul 2006 19:08:44 +0000 Subject: [PATCH] adjust .def generator --- bindings/java/src/jni/generate.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bindings/java/src/jni/generate.pl b/bindings/java/src/jni/generate.pl index b36b971e..ea50fd1f 100644 --- a/bindings/java/src/jni/generate.pl +++ b/bindings/java/src/jni/generate.pl @@ -1529,10 +1529,15 @@ EOF } my $jsigar = "../../src/jni/javasigar.c"; +my(%alias) = (x => 'Sigar'); open JSIGAR, $jsigar or die "open $jsigar: $!"; while () { - next unless /SIGAR_JNI\(([A-Za-z_]+)\)/; - print DFH "Java_org_hyperic_sigar_$1\n"; + next unless /SIGAR_JNI([a-z]?)\(([A-Za-z_]+)\)/; + my $class = ""; + if ($1) { + $class = $alias{$1} . "_"; + } + print DFH "Java_org_hyperic_sigar_$class$2\n"; } close CFH;