rpms/rogue/FC-6 rogue-5.4.2-64bit.patch, NONE, 1.1 rogue-5.4.2-warnings.patch, NONE, 1.1 rogue.spec, 1.8, 1.9
Michael Thomas (wart)
fedora-extras-commits at redhat.com
Mon Jul 16 16:40:05 UTC 2007
Author: wart
Update of /cvs/extras/rpms/rogue/FC-6
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16822
Modified Files:
rogue.spec
Added Files:
rogue-5.4.2-64bit.patch rogue-5.4.2-warnings.patch
Log Message:
- New upstream home page and download URL
- Add patch when reading long values from the save file on 64-bit arch
(BZ #248283)
- Add patch removing many compiler warnings
rogue-5.4.2-64bit.patch:
--- NEW FILE rogue-5.4.2-64bit.patch ---
--- rogue-5.4.2/state.c.orig 2007-07-14 23:18:43.000000000 -0700
+++ rogue-5.4.2/state.c 2007-07-15 13:19:14.000000000 -0700
@@ -508,25 +508,14 @@
int
rs_read_long(int inf, long *i)
{
- unsigned char bytes[4];
- long input;
- unsigned char *buf = (unsigned char *) &input;
+ int input;
if (read_error || format_error)
return(READSTAT);
- rs_read(inf, &input, 4);
+ rs_read_int(inf, &input);
- if (big_endian)
- {
- bytes[3] = buf[0];
- bytes[2] = buf[1];
- bytes[1] = buf[2];
- bytes[0] = buf[3];
- buf = bytes;
- }
-
- *i = *((long *) buf);
+ *i = (long) input;
return(READSTAT);
}
rogue-5.4.2-warnings.patch:
--- NEW FILE rogue-5.4.2-warnings.patch ---
--- rogue-5.4.2/misc.c.orig 2006-01-03 16:17:29.000000000 -0800
+++ rogue-5.4.2/misc.c 2007-07-15 21:54:52.000000000 -0700
@@ -19,7 +19,7 @@
* A quick glance all around the player
*/
-look(bool wakeup)
+void look(bool wakeup)
{
int x, y;
chtype ch;
@@ -96,13 +96,17 @@
}
else
{
- if (wakeup)
+ if (wakeup) {
wake_monster(y, x);
- if (see_monst(tp))
- if (on(player, ISHALU))
+ }
+ if (see_monst(tp)) {
+ if (on(player, ISHALU)) {
ch = rnd(26) + 'A';
- else
+ }
+ else {
ch = tp->t_disguise;
+ }
+ }
}
if (on(player, ISBLIND) && (y != hero.y || x != hero.x))
continue;
@@ -206,7 +210,7 @@
* Erase the area shown by a lamp in a dark room.
*/
-erase_lamp(coord *pos, struct room *rp)
+void erase_lamp(coord *pos, struct room *rp)
{
int y, x, ey, sy, ex;
@@ -269,7 +273,7 @@
* She wants to eat something, so let her try
*/
-eat()
+void eat()
{
THING *obj;
@@ -309,7 +313,7 @@
* Check to see if the guy has gone up a level.
*/
-check_level()
+void check_level()
{
int i, add, olevel;
@@ -334,7 +338,7 @@
* highest it has been, just in case
*/
-chg_str(int amt)
+void chg_str(int amt)
{
auto str_t comp;
@@ -354,7 +358,7 @@
* add_str:
* Perform the actual add, checking upper and lower bound limits
*/
-add_str(str_t *sp, int amt)
+void add_str(str_t *sp, int amt)
{
if ((*sp += amt) < 3)
*sp = 3;
@@ -391,7 +395,7 @@
* Aggravate all the monsters on this level
*/
-aggravate()
+void aggravate()
{
THING *mp;
@@ -528,7 +532,7 @@
* Call an object something after use.
*/
-call_it(struct obj_info *info)
+void call_it(struct obj_info *info)
{
if (info->oi_know)
{
--- rogue-5.4.2/potions.c.orig 2007-07-15 21:37:54.000000000 -0700
+++ rogue-5.4.2/potions.c 2007-07-15 21:59:41.000000000 -0700
@@ -17,7 +17,7 @@
typedef struct
{
int pa_flags;
- int (*pa_daemon)();
+ void (*pa_daemon)();
int pa_time;
char *pa_high, *pa_straight;
} PACT;
@@ -55,7 +55,7 @@
* Quaff a potion from the pack
*/
-quaff()
+void quaff()
{
THING *obj, *tp, *mp;
bool discardit = FALSE;
@@ -251,7 +251,7 @@
* Turn on the ability to see invisible
*/
-invis_on()
+void invis_on()
{
THING *mp;
@@ -338,7 +338,7 @@
* The guy just magically went up a level.
*/
-raise_level()
+void raise_level()
{
pstats.s_exp = e_levels[pstats.s_lvl-1] + 1L;
check_level();
@@ -350,7 +350,7 @@
* turns on a flag
*/
-do_pot(int type, bool knowit)
+void do_pot(int type, bool knowit)
{
PACT *pp;
int t;
--- rogue-5.4.2/new_level.c.orig 2007-07-15 21:19:43.000000000 -0700
+++ rogue-5.4.2/new_level.c 2007-07-15 21:20:48.000000000 -0700
@@ -18,7 +18,7 @@
#define MAXTREAS 10 /* maximum number of treasures in a treasure room */
#define MINTREAS 2 /* minimum number of treasures in a treasure room */
-new_level()
+void new_level()
{
THING *tp;
PLACE *pp;
@@ -118,7 +118,7 @@
* Put potions and scrolls on this level
*/
-put_things()
+void put_things()
{
int i;
THING *obj;
@@ -180,7 +180,7 @@
#define MAXTRIES 10 /* max number of tries to put down a monster */
-treas_room()
+void treas_room()
{
int nm;
THING *tp;
--- rogue-5.4.2/wizard.c.orig 2006-01-03 16:17:29.000000000 -0800
+++ rogue-5.4.2/wizard.c 2007-07-15 20:56:09.000000000 -0700
@@ -20,7 +20,7 @@
* What a certin object is
*/
-whatis(bool insist, int type)
+void whatis(bool insist, int type)
{
THING *obj;
@@ -74,7 +74,7 @@
* Set things up when we really know what a thing is
*/
-set_know(THING *obj, struct obj_info *info)
+void set_know(THING *obj, struct obj_info *info)
{
char **guess;
@@ -97,14 +97,14 @@
{
struct h_list *hp;
static struct h_list tlist[] = {
- POTION, "potion", FALSE,
- SCROLL, "scroll", FALSE,
- FOOD, "food", FALSE,
[...2227 lines suppressed...]
+void money(int value)
{
purse += value;
mvaddch(hero.y, hero.x, floor_ch());
@@ -484,7 +489,7 @@
* Reset the last command when the current one is aborted
*/
-reset_last()
+void reset_last()
{
last_comm = l_last_comm;
last_dir = l_last_dir;
--- rogue-5.4.2/state.c.orig 2007-07-15 20:53:50.000000000 -0700
+++ rogue-5.4.2/state.c 2007-07-15 20:56:09.000000000 -0700
@@ -97,58 +97,6 @@
}
int
-rs_write_char(FILE *savef, char c)
-{
- if (write_error)
- return(WRITESTAT);
-
- rs_write(savef, &c, 1);
-
- return(WRITESTAT);
-}
-
-int
-rs_read_char(int inf, char *c)
-{
- if (read_error || format_error)
- return(READSTAT);
-
- rs_read(inf, c, 1);
-
- return(READSTAT);
-}
-
-int
-rs_write_chars(FILE *savef, char *c, int count)
-{
- if (write_error)
- return(WRITESTAT);
-
- rs_write_int(savef, count);
- rs_write(savef, c, count);
-
- return(WRITESTAT);
-}
-
-int
-rs_read_chars(int inf, char *i, int count)
-{
- int value = 0;
-
- if (read_error || format_error)
- return(READSTAT);
-
- rs_read_int(inf, &value);
-
- if (value != count)
- format_error = TRUE;
-
- rs_read(inf, i, count);
-
- return(READSTAT);
-}
-
-int
rs_write_int(FILE *savef, int c)
{
unsigned char bytes[4];
@@ -235,6 +183,58 @@
}
int
+rs_write_char(FILE *savef, char c)
+{
+ if (write_error)
+ return(WRITESTAT);
+
+ rs_write(savef, &c, 1);
+
+ return(WRITESTAT);
+}
+
+int
+rs_read_char(int inf, char *c)
+{
+ if (read_error || format_error)
+ return(READSTAT);
+
+ rs_read(inf, c, 1);
+
+ return(READSTAT);
+}
+
+int
+rs_write_chars(FILE *savef, char *c, int count)
+{
+ if (write_error)
+ return(WRITESTAT);
+
+ rs_write_int(savef, count);
+ rs_write(savef, c, count);
+
+ return(WRITESTAT);
+}
+
+int
+rs_read_chars(int inf, char *i, int count)
+{
+ int value = 0;
+
+ if (read_error || format_error)
+ return(READSTAT);
+
+ rs_read_int(inf, &value);
+
+ if (value != count)
+ format_error = TRUE;
+
+ rs_read(inf, i, count);
+
+ return(READSTAT);
+}
+
+int
rs_write_boolean(FILE *savef, bool c)
{
unsigned char buf = (c == 0) ? 0 : 1;
@@ -1860,7 +1860,7 @@
return(READSTAT);
}
-int
+void
rs_fix_thing(THING *t)
{
THING *item;
@@ -1941,7 +1941,7 @@
return(READSTAT);
}
-int
+void
rs_fix_thing_list(THING *list)
{
THING *item;
--- rogue-5.4.2/monsters.c.orig 2006-01-03 16:17:29.000000000 -0800
+++ rogue-5.4.2/monsters.c 2007-07-15 21:58:30.000000000 -0700
@@ -55,7 +55,7 @@
* Pick a new monster and add it to the list
*/
-new_monster(THING *tp, char type, coord *cp)
+void new_monster(THING *tp, char type, coord *cp)
{
struct monster *mp;
int lev_add;
@@ -113,7 +113,7 @@
* Create a new wandering monster and aim it at the player
*/
-wanderer()
+void wanderer()
{
THING *tp;
static coord cp;
@@ -209,7 +209,7 @@
* Give a pack to a monster if it deserves one
*/
-give_pack(THING *tp)
+void give_pack(THING *tp)
{
if (level >= max_level && rnd(100) < monsters[tp->t_type-'A'].m_carry)
attach(tp->t_pack, new_thing());
--- rogue-5.4.2/rings.c.orig 2007-07-15 21:39:17.000000000 -0700
+++ rogue-5.4.2/rings.c 2007-07-15 21:39:58.000000000 -0700
@@ -18,7 +18,7 @@
* Put a ring on a hand
*/
-ring_on()
+void ring_on()
{
THING *obj;
int ring;
@@ -89,7 +89,7 @@
* take off a ring
*/
-ring_off()
+void ring_off()
{
int ring;
THING *obj;
Index: rogue.spec
===================================================================
RCS file: /cvs/extras/rpms/rogue/FC-6/rogue.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- rogue.spec 4 Mar 2007 04:34:23 -0000 1.8
+++ rogue.spec 16 Jul 2007 16:39:33 -0000 1.9
@@ -1,17 +1,19 @@
Name: rogue
Version: 5.4.2
-Release: 8%{?dist}
+Release: 9%{?dist}
Summary: The original graphical adventure game
Group: Amusements/Games
License: BSD
-URL: http://roguelike.sourceforge.net/
-Source0: http://downloads.sourceforge.net/roguelike/rogue%{version}-src.tar.gz
+URL: http://rogue.rogueforge.net/
+Source0: http://rogue.rogueforge.net/files/rogue5.4/rogue5.4.2-src.tar.gz
Source1: rogue.desktop
Source2: rogue.png
Patch0: rogue-rpmopts.patch
Patch1: rogue-includes.patch
Patch2: rogue-5.4-setgid.patch
+Patch3: rogue-5.4.2-64bit.patch
+Patch4: rogue-5.4.2-warnings.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: desktop-file-utils
@@ -26,6 +28,8 @@
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
+%patch4 -p1
%{__sed} -i 's/\r//' rogue54.html
%{__sed} -i 's/\r//' readme54.html
chmod a-x *.c *.h
@@ -80,6 +84,13 @@
%changelog
+* Sun Jul 15 2007 Wart <wart at kobold.org> 5.4.2-9
+- New upstream home page and download URL
+- Add patch when reading long values from the save file on 64-bit arch
+ (BZ #248283)
+- Add patch removing many compiler warnings
+- Use proper version in the .desktop file
+
* Sat Mar 3 2007 Wart <wart at kobold.org> 5.4.2-8
- Use better sourceforge download url
- Use more precise desktop file categories
More information about the fedora-extras-commits
mailing list