]> granicus.if.org Git - curl/commitdiff
nroff-scan.pl: verify that references are made with \fI
authorDaniel Stenberg <daniel@haxx.se>
Mon, 2 May 2016 07:09:16 +0000 (09:09 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 2 May 2016 07:09:59 +0000 (09:09 +0200)
tests/nroff-scan.pl

index a70c16b868a51626b96b71fd08525506c665fde2..393068cd35b9363ff7838c127ef456bb549135eb 100644 (file)
@@ -64,7 +64,7 @@ sub file {
             my ($pre, $str, $post)=($1, $2, $3);
             if($post ne "P") {
                 print STDERR "error: $f:$line: missing \\fP after $str\n";
-                $errrors++;
+                $errors++;
             }
             if($str =~ /((libcurl|curl)([^ ]*))\(3\)/i) {
                 my $man = "$1.3";
@@ -72,6 +72,10 @@ sub file {
                     print STDERR "error: $f:$line: refering to non-existing man page $man\n";
                     $errors++;
                 }
+                if($pre ne "I") {
+                    print STDERR "error: $f:$line: use \\fI before $str\n";
+                    $errors++;
+                }
             }
         }
         if($l =~ /(curl([^ ]*)\(3\))/i) {
@@ -97,4 +101,4 @@ foreach my $f (@f) {
     file($f);
 }
 
-    exit $errors?1:0;
+exit $errors?1:0;