X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fwfront2gl.pl;h=c78974e5094e738a602a81fb8de44f8aba4d39af;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hp=f57e28c5d5f1ba2d70d17ddceafa0b5b5ba3c6da;hpb=ec8d2b32b63649e6d32bdfb306eda062769af823;p=xscreensaver diff --git a/hacks/glx/wfront2gl.pl b/hacks/glx/wfront2gl.pl index f57e28c5..c78974e5 100755 --- a/hacks/glx/wfront2gl.pl +++ b/hacks/glx/wfront2gl.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# Copyright © 2003-2011 Jamie Zawinski +# Copyright © 2003-2012 Jamie Zawinski # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that @@ -27,7 +27,7 @@ use diagnostics; use strict; my $progname = $0; $progname =~ s@.*/@@g; -my $version = q{ $Revision: 1.4 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/; +my ($version) = ('$Revision: 1.6 $' =~ m/\s(\d[.\d]+)\s/s); my $verbose = 0; @@ -116,7 +116,7 @@ sub parse_obj($$$) { if ($f =~ m@^(\d+)$@s) { $v = $1; } elsif ($f =~ m@^(\d+)/(\d+)$@s) { $v = $1, $t = $2; } elsif ($f =~ m@^(\d+)/(\d+)/(\d+)$@s) { $v = $1, $t = $2; $n = $3; } - elsif ($f =~ m@^(\d+)///(\d+)$@s) { $v = $1; $n = $3; } + elsif ($f =~ m@^(\d+)///?(\d+)$@s) { $v = $1; $n = $3; } else { error ("line $lineno: unparsable F line: $_") unless defined($v); }