Skip Menu |

This queue is for tickets about the Image-Xpm CPAN distribution.

Report information
The Basics
Id: 51212
Status: resolved
Priority: 0/
Queue: Image-Xpm

People
Owner: SREZIC [...] cpan.org
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.09
Fixed in: (no value)



Subject: [PATCH] space after "static char" and before the "*" is optional
See attached patch. I can also provide a "real" test image if wished. Regards, Slaven
Subject: 0001-space-after-static-char-and-before-the-is-opti.patch
From 17f4c37e5a235b6179a0c04f813ac9847ad45002 Mon Sep 17 00:00:00 2001 From: Slaven Rezic <slaven@rezic.de> Date: Sun, 8 Nov 2009 23:09:25 +0100 Subject: [PATCH] space after "static char" and before the "*" is optional --- Xpm.pm | 2 +- t/const.t | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Xpm.pm b/Xpm.pm index 8021e8b..36ee151 100644 --- a/Xpm.pm +++ b/Xpm.pm @@ -381,7 +381,7 @@ sub load { # Object method # Name of C string if ($state == $STATE_ARRAY) { croak "$err does not have a proper C array name" - unless /static\s+(?:const\s+)?char\s+\*\s*\w+\[\s*\]\s*=\s*\{/o; #} + unless /static\s+(?:const\s+)?char\s*\*\s*\w+\[\s*\]\s*=\s*\{/o; #} $state = $STATE_VALUES; next LINE; } diff --git a/t/const.t b/t/const.t index 793ca43..5283f16 100755 --- a/t/const.t +++ b/t/const.t @@ -16,7 +16,7 @@ use Image::Xpm; my $TestImage = <<'EOT'; /* XPM */ -static const char *noname[] = { +static const char* noname[] = { /* width height ncolors chars_per_pixel */ "4 10 4 1", /* colors */ -- 1.6.1
On Sun Nov 08 17:13:35 2009, SREZIC wrote: Show quoted text
> See attached patch. I can also provide a "real" test image if wished.
After looking into more real-existing images with even broken C declaration lines (dashes in array name, missing [] ...), but still working in popular image viewers I think this line should just be skipped without looking at it. Regards, Slaven
Hi Slaven, I took over the Image::Xpm module after it was abandoned. I've made you a comaintainer so you can apply your patches and upload an updated version. There's no source control repo set up for it, and the last release was many years ago. Thanks, :)
Resolved in 1.09_50.