From: Tony Cook Date: Mon, 6 May 2013 10:30:44 +0000 (+1000) Subject: [rt #74875] add unshipped test for unclosed pod in C sources X-Git-Tag: v0.96~8 X-Git-Url: http://git.imager.perl.org/imager.git/commitdiff_plain/12db268a9c1fd385438b268ee766df8acb20f0b8 [rt #74875] add unshipped test for unclosed pod in C sources and fix the failures --- diff --git a/JPEG/Changes b/JPEG/Changes index 4cbe4bb8..e1e4af4a 100644 --- a/JPEG/Changes +++ b/JPEG/Changes @@ -1,3 +1,8 @@ +Imager-File-JPEG 0.88 +===================== + + - correct an internal documentation error. + Imager-File-JPEG 0.87 ===================== diff --git a/JPEG/JPEG.pm b/JPEG/JPEG.pm index 613cc6da..9546596d 100644 --- a/JPEG/JPEG.pm +++ b/JPEG/JPEG.pm @@ -4,7 +4,7 @@ use Imager; use vars qw($VERSION @ISA); BEGIN { - $VERSION = "0.87"; + $VERSION = "0.88"; require XSLoader; XSLoader::load('Imager::File::JPEG', $VERSION); diff --git a/JPEG/imexif.c b/JPEG/imexif.c index 305e36e7..8cb90b78 100644 --- a/JPEG/imexif.c +++ b/JPEG/imexif.c @@ -282,6 +282,7 @@ invalid data. Returns true if an Exif header was seen. +=cut */ int diff --git a/color.c b/color.c index 9c9d195b..634a6c85 100644 --- a/color.c +++ b/color.c @@ -16,6 +16,9 @@ color.c - color manipulation functions A collection of utility functions for converting between color spaces. +=over + +=cut */ #define EPSILON (1e-8) diff --git a/draw.c b/draw.c index b74fe2e6..1978fb30 100644 --- a/draw.c +++ b/draw.c @@ -640,7 +640,7 @@ i_circle_out(i_img *im, i_img_dim xc, i_img_dim yc, i_img_dim r, Convert an angle in degrees into an angle measure we can generate simply from the numbers we have when drawing the circle. -=back +=cut */ static i_img_dim @@ -2039,3 +2039,9 @@ cfill_from_btm(i_img *im, i_fill_t *fill, struct i_bitmap *btm, } i_render_done(&r); } + +/* +=back + +=cut +*/ diff --git a/fills.c b/fills.c index 6b464823..2a124764 100644 --- a/fills.c +++ b/fills.c @@ -720,7 +720,7 @@ fill_hatch(i_fill_t *fill, i_img_dim x, i_img_dim y, i_img_dim width, The floating sample fill function for hatched fills. -=back +=cut */ static void fill_hatchf(i_fill_t *fill, i_img_dim x, i_img_dim y, i_img_dim width, diff --git a/hlines.c b/hlines.c index 460a20ff..3dbbd77f 100644 --- a/hlines.c +++ b/hlines.c @@ -263,6 +263,7 @@ i_int_hlines_fill_color(i_img *im, i_int_hlines *hlines, const i_color *col) { i_int_hlines_fill_fill(im, hlines, fill) +=cut */ void i_int_hlines_fill_fill(i_img *im, i_int_hlines *hlines, i_fill_t *fill) { diff --git a/iolayer.c b/iolayer.c index 39c8c298..c4b910cb 100644 --- a/iolayer.c +++ b/iolayer.c @@ -1375,7 +1375,8 @@ realseek_close(io_glue *igo) { } -/* realseek_seek(ig, offset, whence) +/* +=item realseek_seek(ig, offset, whence) Implements seeking for a source that is seekable, the purpose of having this is to be able to have an offset into a file that is different from what the underlying library thinks. @@ -1488,7 +1489,8 @@ buffer_close(io_glue *ig) { } -/* buffer_seek(ig, offset, whence) +/* +=item buffer_seek(ig, offset, whence) Implements seeking for a buffer source. @@ -1843,7 +1845,8 @@ bufchain_close(io_glue *ig) { } -/* bufchain_seek(ig, offset, whence) +/* +=item bufchain_seek(ig, offset, whence) Implements seeking for a source that is seekable, the purpose of having this is to be able to have an offset into a file that is different from what the underlying library thinks. diff --git a/limits.c b/limits.c index 16deaa73..36ae45b5 100644 --- a/limits.c +++ b/limits.c @@ -21,7 +21,10 @@ limits.c - manages data/functions for limiting the sizes of images read from fil Manage limits for image files read by Imager. Setting a value of zero means that limit will be ignored. - + +=over + +=cut */ #define IMAGER_NO_CONTEXT diff --git a/xt/x50cpod.t b/xt/x50cpod.t new file mode 100644 index 00000000..245eb82e --- /dev/null +++ b/xt/x50cpod.t @@ -0,0 +1,43 @@ +#!perl -w +use strict; +use Test::More; +use ExtUtils::Manifest qw(maniread); + +# RT #74875 +my $manifest = maniread(); +my @files = grep /\.(c|im|h)$/, sort keys %$manifest; +plan tests => scalar @files; + +++$|; +for my $file (@files) { + my $ok = 1; + if (open my $fh, "<", $file) { + my $in_pod; + while (<$fh>) { + if (/^=cut/) { + if ($in_pod) { + $in_pod = 0; + } + else { + diag("$file:$.: found =cut without pod"); + $ok = 0; + } + } + elsif (/^=\w+/) { + $in_pod = $.; + } + elsif (m(\*/)) { + if ($in_pod) { + diag("$file:$.: unclosed pod starting $in_pod"); + $ok = 0; + } + } + } + close $fh; + } + else { + diag("Cannot open $file: $!"); + $ok = 0; + } + ok($ok, $file); +}