[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[pdf-devel] libgnupdf ChangeLog prmgt/check-api-doc-consist...
From: |
Gerardo E. Gidoni |
Subject: |
[pdf-devel] libgnupdf ChangeLog prmgt/check-api-doc-consist... |
Date: |
Fri, 11 Jul 2008 15:41:26 +0000 |
CVSROOT: /sources/pdf
Module name: libgnupdf
Changes by: Gerardo E. Gidoni <gerel> 08/07/11 15:41:26
Modified files:
. : ChangeLog
prmgt : check-api-doc-consistency.pl
Log message:
added -i feature
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libgnupdf/ChangeLog?cvsroot=pdf&r1=1.277&r2=1.278
http://cvs.savannah.gnu.org/viewcvs/libgnupdf/prmgt/check-api-doc-consistency.pl?cvsroot=pdf&r1=1.2&r2=1.3
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/pdf/libgnupdf/ChangeLog,v
retrieving revision 1.277
retrieving revision 1.278
diff -u -b -r1.277 -r1.278
--- ChangeLog 10 Jul 2008 14:17:18 -0000 1.277
+++ ChangeLog 11 Jul 2008 15:41:26 -0000 1.278
@@ -1,3 +1,7 @@
+2008-07-11 gerel <address@hidden>
+
+ * prmgt/check-api-doc-consistency.pl: added '-i' feature.
+
2008-07-10 Aleksander Morgado <address@hidden>
* doc/gnupdf.texi: Parameter names for `pdf_time_get_utc_cal',
Index: prmgt/check-api-doc-consistency.pl
===================================================================
RCS file: /sources/pdf/libgnupdf/prmgt/check-api-doc-consistency.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- prmgt/check-api-doc-consistency.pl 18 May 2008 21:33:35 -0000 1.2
+++ prmgt/check-api-doc-consistency.pl 11 Jul 2008 15:41:26 -0000 1.3
@@ -38,6 +38,8 @@
sub clean_docsigs
{
my $str = shift;
+ my $novars = shift;
+
# remove newlines
$str =~ tr/\n/ /;
# remove info syntax
@@ -53,6 +55,11 @@
# remove word spaces
$str =~ s/ *(\w+) +/$1 /g;
+ if ($novars == 1){
+ # remove variable names
+ $str =~ s/(\w+)(,|\))/$2/g;
+ }
+
return $str;
}
@@ -60,6 +67,7 @@
sub clean_implsigs
{
my $fd = shift;
+ my $novars = shift;
my ($nextchar, $char, $lines);
# remove comments
@@ -101,6 +109,11 @@
# remove word spaces
$lines =~ s/ *(\w+) +/$1 /g;
+ if ($novars == 1){
+ # remove variable names
+ $lines =~ s/(\w+)(,|\))/$2/g;
+ }
+
return ($lines);
}
@@ -108,11 +121,12 @@
sub read_implsigs
{
my $file = shift;
+ my $novars = shift;
my $fd;
if (open ($fd, $file))
{
- push (@IMPLSIGS, clean_implsigs ($fd));
+ push (@IMPLSIGS, clean_implsigs ($fd,$novars));
close($fd);
}else{
print "Couldn't open $file\n";
@@ -123,13 +137,14 @@
sub read_docsigs
{
my $file = shift;
+ my $novars = shift;
open (FILE, $file);
while (<FILE>)
{
if (m/address@hidden/)
{
- push (@DOCSIGS, clean_docsigs($_));
+ push (@DOCSIGS, clean_docsigs($_,$novars));
}
}
close (FILE);
@@ -183,17 +198,19 @@
print "OPT is one of:\n";
print "\t -h:\tprint this help.\n";
print "\t -f:\tshow failing checks only.\n";
+ print "\t -i:\tignore variable names.\n";
print "\t -p:\tplain mode: do not print a resume.\n\n";
}
##
# MAIN PROGRAM
###
-my ($reg, $matched, $fails, $total, $showok,$plainmode);
+my ($reg, $matched, $fails, $total, $showok,$plainmode, $ignorevars);
$showok = 1;
$plainmode = 0;
+$ignorevars = 0;
if (@ARGV == 1){
if ($ARGV[0] eq '-h'){
show_help ();
@@ -205,12 +222,20 @@
}
}
+if (grep ($_ eq '-i', @ARGV)) {
+ $ignorevars = 1;
+}
+
+
+# fill @ALLSRCS
read_filenames ($MAKEFILE);
-read_docsigs($INFODOC);
+# fill @DOCSIGS
+read_docsigs($INFODOC, $ignorevars);
foreach my $file (@ALLSRCS)
{
- read_implsigs (join('/',$SRCDIR,$file));
+ # fill @IMPLSIGS
+ read_implsigs (join('/',$SRCDIR,$file), $ignorevars);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [pdf-devel] libgnupdf ChangeLog prmgt/check-api-doc-consist...,
Gerardo E. Gidoni <=