r9575 - in packages/branches/xmahjongg/lenny: . debian debian/patches
Peter Pentchev
roam-guest at alioth.debian.org
Tue Apr 14 10:41:39 UTC 2009
Author: roam-guest
Date: 2009-04-14 10:41:39 +0000 (Tue, 14 Apr 2009)
New Revision: 9575
Added:
packages/branches/xmahjongg/lenny/debian/patches/05-feof.patch
packages/branches/xmahjongg/lenny/debian/xmahjongg.desktop
packages/branches/xmahjongg/lenny/debian/xmahjongg.install
Modified:
packages/branches/xmahjongg/lenny/
packages/branches/xmahjongg/lenny/debian/
packages/branches/xmahjongg/lenny/debian/changelog
packages/branches/xmahjongg/lenny/debian/patches/04-gif-read-errors.patch
packages/branches/xmahjongg/lenny/debian/patches/series
Log:
Merge trunk rev. 9360-9434:
Add and install a desktop file, slightly modified from #478955.
........
I think this overhauled xmahjongg package is pretty much ready to be
unleashed upon the unsuspecting world.
........
ARRRRGH! Score one for well-meant yet not-quite-thought-out patches...
Invert a test so that xmahjongg's GIF library actually manages to
read GIF images from a memory buffer instead of just skipping
the rest and segfaulting a couple of steps down the line.
Reported by: tolimar
Pointy hat to: myself
........
My GIF library patches initially meant for the getter functions to
return the number of bytes actually read (hence an unsigned value),
but were later changed to let them return a true/false flag.
This is better served by a plain "int" return type.
........
Update the release timestamp.
........
Fix reading the layout files.
The problem was that xmahjongg assumed that when fgets() reads a line
containing the final newline of a file, the file's EOF indicator would
be set. However, this seems not to be the case on recent Debian
versions, so a patch is needed to explicitly distinguish between feof()
and ferror() *after* the fgets() call.
Closes: #522740
........
Add svn-bp:tagsUrl property.
Property changes on: packages/branches/xmahjongg/lenny
___________________________________________________________________
Modified: svnmerge-integrated
- /packages/trunk/xmahjongg:1-9357,9359
+ /packages/trunk/xmahjongg:1-9574
Property changes on: packages/branches/xmahjongg/lenny/debian
___________________________________________________________________
Added: svn-bp:tagsUrl
+ svn+ssh://svn.debian.org/svn/pkg-games/packages/tags/xmahjongg
Modified: packages/branches/xmahjongg/lenny/debian/changelog
===================================================================
--- packages/branches/xmahjongg/lenny/debian/changelog 2009-04-14 09:36:15 UTC (rev 9574)
+++ packages/branches/xmahjongg/lenny/debian/changelog 2009-04-14 10:41:39 UTC (rev 9575)
@@ -1,8 +1,12 @@
-xmahjongg (3.7-2) UNRELEASED; urgency=low
+xmahjongg (3.7-3) unstable; urgency=low
+ * Unbreak reading layout files. Closes: #522740
+
+ -- Peter Pentchev <roam at ringlet.net> Mon, 06 Apr 2009 17:35:18 +0300
+
+xmahjongg (3.7-2) unstable; urgency=low
+
* New maintainer. Closes: #519355
- * TODO:
- - add a desktop file to fix #478955
* Use quilt for patch management.
* Regenerate the autotools-related files.
* Add a watch file.
@@ -31,8 +35,9 @@
- teach the GIF library and the layout parser about read errors
* Use the build hardening wrapper unless "nohardening" is specified
in DEB_BUILD_OPTIONS.
+ * Add a desktop file. Closes: #478955
- -- Peter Pentchev <roam at ringlet.net> Tue, 31 Mar 2009 17:19:37 +0300
+ -- Peter Pentchev <roam at ringlet.net> Fri, 03 Apr 2009 14:59:50 +0300
xmahjongg (3.7-1.1) unstable; urgency=high
Modified: packages/branches/xmahjongg/lenny/debian/patches/04-gif-read-errors.patch
===================================================================
--- packages/branches/xmahjongg/lenny/debian/patches/04-gif-read-errors.patch 2009-04-14 09:36:15 UTC (rev 9574)
+++ packages/branches/xmahjongg/lenny/debian/patches/04-gif-read-errors.patch 2009-04-14 10:41:39 UTC (rev 9575)
@@ -7,7 +7,7 @@
int is_eoi;
uint8_t (*byte_getter)(struct Gif_Reader *);
- void (*block_getter)(uint8_t *, uint32_t, struct Gif_Reader *);
-+ uint32_t (*block_getter)(uint8_t *, uint32_t, struct Gif_Reader *);
++ int (*block_getter)(uint8_t *, uint32_t, struct Gif_Reader *);
uint32_t (*offseter)(struct Gif_Reader *);
int (*eofer)(struct Gif_Reader *);
@@ -16,7 +16,7 @@
}
-static void
-+uint32_t
++int
file_block_getter(uint8_t *p, uint32_t s, Gif_Reader *grr)
{
- fread(p, 1, s, grr->f);
@@ -29,13 +29,13 @@
}
-static void
-+static uint32_t
++static int
record_block_getter(uint8_t *p, uint32_t s, Gif_Reader *grr)
{
- if (s > grr->w) s = grr->w;
+ int res;
+ res = (s <= grr->w);
-+ if (res)
++ if (!res)
+ s = grr->w;
memcpy(p, grr->v, s);
grr->w -= s, grr->v += s;
Copied: packages/branches/xmahjongg/lenny/debian/patches/05-feof.patch (from rev 9434, packages/trunk/xmahjongg/debian/patches/05-feof.patch)
===================================================================
--- packages/branches/xmahjongg/lenny/debian/patches/05-feof.patch (rev 0)
+++ packages/branches/xmahjongg/lenny/debian/patches/05-feof.patch 2009-04-14 10:41:39 UTC (rev 9575)
@@ -0,0 +1,24 @@
+Do not break if fgets() detects EOF when invoked *at* EOF instead of
+setting the EOF flag at the end of the previous invocation, after
+the final newline has been read.
+
+--- a/src/game.cc
++++ b/src/game.cc
+@@ -498,7 +498,7 @@
+ while (!feof(f)) {
+ buffer[0] = 0;
+ if (fgets(buffer, BUFSIZ, f) == NULL)
+- return false;
++ return feof(f)? true: false;
+ int r, c, l;
+ if (sscanf(buffer, " %d %d %d", &r, &c, &l) == 3)
+ if (!place_tile(r+2, c+2, l))
+@@ -527,7 +527,7 @@
+ for (int r = 0; r < 16 && !feof(f); r++) {
+ buf[0] = 0;
+ if (fgets(buf, BUFSIZ, f) == NULL)
+- return false;
++ return feof(f)? true: false;
+ for (int c = 0; c < TILE_COLS - 3 && buf[c] && !isspace(buf[c]); c++)
+ if (buf[c] == '1') {
+ if (!place_tile(r + 2, c + 2, l))
Modified: packages/branches/xmahjongg/lenny/debian/patches/series
===================================================================
--- packages/branches/xmahjongg/lenny/debian/patches/series 2009-04-14 09:36:15 UTC (rev 9574)
+++ packages/branches/xmahjongg/lenny/debian/patches/series 2009-04-14 10:41:39 UTC (rev 9575)
@@ -2,3 +2,4 @@
02-manpage-typo.patch
03-compiler-warnings.patch
04-gif-read-errors.patch
+05-feof.patch
Copied: packages/branches/xmahjongg/lenny/debian/xmahjongg.desktop (from rev 9434, packages/trunk/xmahjongg/debian/xmahjongg.desktop)
===================================================================
--- packages/branches/xmahjongg/lenny/debian/xmahjongg.desktop (rev 0)
+++ packages/branches/xmahjongg/lenny/debian/xmahjongg.desktop 2009-04-14 10:41:39 UTC (rev 9575)
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Version=1.0
+Type=Application
+Name=xmahjongg
+Name[bg_BG.UTF-8]=Маджонг (xmahjongg)
+GenericName=
+Comment=A colorful solitaire Mah Jongg game
+Comment[bg_BG.UTF-8]=Премахване на купчина плочки чрез групирането им по двойки
+Icon=
+Exec=/usr/games/xmahjongg
+Terminal=false
+Categories=Game;CardGame;
Copied: packages/branches/xmahjongg/lenny/debian/xmahjongg.install (from rev 9434, packages/trunk/xmahjongg/debian/xmahjongg.install)
===================================================================
--- packages/branches/xmahjongg/lenny/debian/xmahjongg.install (rev 0)
+++ packages/branches/xmahjongg/lenny/debian/xmahjongg.install 2009-04-14 10:41:39 UTC (rev 9575)
@@ -0,0 +1 @@
+debian/xmahjongg.desktop usr/share/applications
More information about the Pkg-games-commits
mailing list