Skip to content

Commit a9bf35b

Browse files
author
Ciaran Anscomb
committed
ANSIfy hack.wield.c
1 parent 0bbf9bf commit a9bf35b

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

hack.wield.c

+9-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
22
/* hack.wield.c - version 1.0.3 */
33

4-
#include "hack.h"
5-
extern struct obj zeroobj;
4+
#include "hack.h"
65

7-
setuwep(obj) register struct obj *obj; {
6+
void setuwep(struct obj *obj) {
87
setworn(obj, W_WEP);
98
}
109

11-
dowield()
12-
{
13-
register struct obj *wep;
14-
register int res = 0;
10+
int dowield(void) {
11+
struct obj *wep;
12+
int res = 0;
1513

1614
multi = 0;
1715
if(!(wep = getobj("#-)", "wield"))) /* nothing */;
@@ -44,7 +42,7 @@ dowield()
4442
return(res);
4543
}
4644

47-
corrode_weapon(){
45+
void corrode_weapon(void) {
4846
if(!uwep || uwep->olet != WEAPON_SYM) return; /* %% */
4947
if(uwep->rustfree)
5048
pline("Your %s not affected.", aobjnam(uwep, "are"));
@@ -54,12 +52,9 @@ corrode_weapon(){
5452
}
5553
}
5654

57-
chwepon(otmp,amount)
58-
register struct obj *otmp;
59-
register amount;
60-
{
61-
register char *color = (amount < 0) ? "black" : "green";
62-
register char *time;
55+
int chwepon(struct obj *otmp, int amount) {
56+
char *color = (amount < 0) ? "black" : "green";
57+
char *time;
6358
if(!uwep || uwep->olet != WEAPON_SYM) {
6459
strange_feeling(otmp,
6560
(amount > 0) ? "Your hands twitch."

0 commit comments

Comments
 (0)