Only shift the next parameter from ARGV if there are more than one (1) left in the C SQLite code generator

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5434 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2008-07-09 13:49:49 +00:00
parent 74784e3f6e
commit 2d1b9d8694
1 changed files with 3 additions and 2 deletions

View File

@ -598,7 +598,7 @@ sub processCmdLine()
{
my ($argv) = @_;
$startTpl = shift(@$argv);
$startTpl = shift(@$argv) if @$argv > 1;
}
sub startFile()
@ -607,11 +607,12 @@ sub startFile()
$$output .= "/* This file is generated automatically, do not edit, change the source ($name) instead. */\n\n";
return unless $startTpl;
# Replace the extension with ".h" so that we can use it to #include the header
my $header = $name;
$header =~ s/\.[^.]*$/.h/;
return unless $startTpl;
open (TEMPL, $startTpl);
while (<TEMPL>)
{