diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-04-10 13:50:43 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-04-10 14:11:27 +0200 |
commit | 80e5bdd0f09110a00241d901067e1e457a17ec06 (patch) | |
tree | f6b9c6e99ac7756bf6d7872db9b582fa5c670591 /doc | |
parent | 57555c75a8faf71bc7d664d73a2b9914ddb809d0 (diff) | |
download | gnutls-80e5bdd0f09110a00241d901067e1e457a17ec06.tar.gz |
remove perl warnings from scripts.
Diffstat (limited to 'doc')
-rwxr-xr-x | doc/scripts/gdoc | 8 | ||||
-rwxr-xr-x | doc/scripts/sort2.pl | 12 |
2 files changed, 13 insertions, 7 deletions
diff --git a/doc/scripts/gdoc b/doc/scripts/gdoc index e79d3afd72..afd0802968 100755 --- a/doc/scripts/gdoc +++ b/doc/scripts/gdoc @@ -1,6 +1,4 @@ -eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' - & eval 'exec perl -wS "$0" $argv:q' - if 0; +#!/usr/bin/perl ## Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Simon Josefsson ## added -texinfo, -listfunc, -pkg-name @@ -184,7 +182,7 @@ $blankline_man = ""; $type_struct, "\$1", $type_param, "\$1" ); $blankline_text = ""; - +my $lineprefix = ""; sub usage { print "Usage: $0 [ -v ] [ -docbook | -html | -text | -man | -tex | -texinfo -listfunc ]\n"; @@ -746,7 +744,7 @@ sub dump_function { # print STDERR " :> @args\n"; $type = join " ", @args; - if ($parameters{$param} eq "" && $param != "void") { + if ((!defined($parameters{$param}) || $parameters{$param} eq "") && $param ne "void") { $parameters{$param} = "-- undescribed --"; print STDERR "warning: $lineno: Function parameter '$param' not described in '$function_name'\n"; } diff --git a/doc/scripts/sort2.pl b/doc/scripts/sort2.pl index 171bab7f9a..485c20f708 100755 --- a/doc/scripts/sort2.pl +++ b/doc/scripts/sort2.pl @@ -7,11 +7,19 @@ sub key_of_record { # Split record into lines: my @lines = split /\n/, $record; + my $max = @lines; + if ($max > 5) { + $max = 5; + } + + if ($max < 2) { + return ""; + } my ($i) = 1; my ($key) = $lines[$i]; - while( !($key =~ /^\@deftypefun/) && ($i < 5)) { $i=$i+1; $key = $lines[$i]; } + while( !($key =~ /^\@deftypefun/) && ($i < $max)) { $i=$i+1; $key = $lines[$i]; } $key = $1 if $key =~ /^\@deftypefun {.*} {(.*)}/; @@ -20,7 +28,7 @@ sub key_of_record { return $key; } -$/="@end deftypefun"; # Records are separated by blank lines. +$/="\@end deftypefun"; # Records are separated by blank lines. @records = <>; # Read in whole file, one record per array element. @records = sort { key_of_record($a) cmp key_of_record($b) } @records; |