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