]> git.imager.perl.org - imager.git/commitdiff
[rt #74875] add unshipped test for unclosed pod in C sources
authorTony Cook <tony@develop-help.com>
Mon, 6 May 2013 10:30:44 +0000 (20:30 +1000)
committerTony Cook <tony@develop-help.com>
Mon, 6 May 2013 10:30:44 +0000 (20:30 +1000)
and fix the failures

JPEG/Changes
JPEG/JPEG.pm
JPEG/imexif.c
color.c
draw.c
fills.c
hlines.c
iolayer.c
limits.c
xt/x50cpod.t [new file with mode: 0644]

index 4cbe4bb80be78fcbb1b9ffebd14e490811ccf9a4..e1e4af4aaf1eba0983379a0b73c2f8db07d40154 100644 (file)
@@ -1,3 +1,8 @@
+Imager-File-JPEG 0.88
+=====================
+
+ - correct an internal documentation error.
+
 Imager-File-JPEG 0.87
 =====================
 
 Imager-File-JPEG 0.87
 =====================
 
index 613cc6daca118af8be53c6f85cd4af36b915a69e..9546596d9c2927949025e90643858f45aef41249 100644 (file)
@@ -4,7 +4,7 @@ use Imager;
 use vars qw($VERSION @ISA);
 
 BEGIN {
 use vars qw($VERSION @ISA);
 
 BEGIN {
-  $VERSION = "0.87";
+  $VERSION = "0.88";
 
   require XSLoader;
   XSLoader::load('Imager::File::JPEG', $VERSION);
 
   require XSLoader;
   XSLoader::load('Imager::File::JPEG', $VERSION);
index 305e36e719e65bae05334f17b83a8bb12b1e161e..8cb90b7808aeac46346b6c2927bb3dc47fc1522e 100644 (file)
@@ -282,6 +282,7 @@ invalid data.
 
 Returns true if an Exif header was seen.
 
 
 Returns true if an Exif header was seen.
 
+=cut
 */
 
 int
 */
 
 int
diff --git a/color.c b/color.c
index 9c9d195b9dee255111c8d9e68e999ce3a3d37549..634a6c85c06e9a3d7f3869ca3af653705f75834f 100644 (file)
--- 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.
 
 
 A collection of utility functions for converting between color spaces.
 
+=over
+
+=cut
 */
 
 #define EPSILON (1e-8)
 */
 
 #define EPSILON (1e-8)
diff --git a/draw.c b/draw.c
index b74fe2e6178d077532ca4386df415d56e4e28ac2..1978fb30bd73916565193d5f976d3c35a2a9a51e 100644 (file)
--- 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.
 
 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
 */
 
 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);
 }
   }
   i_render_done(&r);
 }
+
+/*
+=back
+
+=cut
+*/
diff --git a/fills.c b/fills.c
index 6b4648232d35cd7414e0162540e27469efed0240..2a124764eff188b45dd7b6a5a31324545bb5216d 100644 (file)
--- 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.
 
 
 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,
 */
 static void
 fill_hatchf(i_fill_t *fill, i_img_dim x, i_img_dim y, i_img_dim width,
index 460a20ff82c5fbb48610a699ab1d06b366b20d3c..3dbbd77f3e10b79522557666be7c3c8f99fc3445 100644 (file)
--- 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)
 
 
 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) {
 */
 void
 i_int_hlines_fill_fill(i_img *im, i_int_hlines *hlines, i_fill_t *fill) {
index 39c8c298a583ceee516ddeb78f85ae7c54e733c8..c4b910cb85e4ace7599c3eaab942ff80edf16b69 100644 (file)
--- 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.
 
 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.
 
 
 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.
 
 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.
index 16deaa7372ee07ce60d21f444efa46668b48e846..36ae45b5c9afcbe6b3ca98c8ea3b7afa81ffb2ff 100644 (file)
--- 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.
 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
  */
 
 #define IMAGER_NO_CONTEXT
diff --git a/xt/x50cpod.t b/xt/x50cpod.t
new file mode 100644 (file)
index 0000000..245eb82
--- /dev/null
@@ -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);
+}