[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#296456: update of patch for #296456



On Thu, Sep 15, 2005 at 10:36:04PM +0200, Matthias Klose wrote:
> please could you send an updated patch? IIUC, then the patch has to be
> updated.

OK, new patch attached.

Cheers,
    Olly
--- gij-wrapper-3.4-old	2005-09-15 22:19:07.772964328 +0100
+++ gij-wrapper-3.4	2005-09-15 22:18:48.353916472 +0100
@@ -28,12 +28,20 @@
 
 # Build the command-line from the arguments given.
 my $parsingOptions = 1;
+
+# Flag used to copy argument to -classpath or -cp.
+my $copyNext = 0;
 foreach my $arg (@ARGV) {
   if (not $parsingOptions) {
     # We're done parsing options; just copy all remaining arguments directly.
     push @commandLine, $arg;
     next;
   }
+  if ($copyNext) {
+    push @commandLine, $arg;
+    $copyNext = 0;
+    next;
+  }
 
   # Try to interpret Sun-style options.
   if ($arg eq '-version') {
@@ -42,8 +50,10 @@
     push @commandLine, '--help';
   } elsif ($arg eq '-cp' or $arg eq '--cp') {
     push @commandLine, '-cp';
+    $copyNext = 1;
   } elsif ($arg eq '-classpath' or $arg eq '--classpath') {
     push @commandLine, '-classpath';
+    $copyNext = 1;
   } elsif ($arg =~ /^-Djava.library.path=(.+)$/) {
     # A component of the JNI search path has been given.
     if ($JNIPath) {

Reply to: