Advanced Rogue 7: convert to ANSI-style function declarations.

Almost 1500 lines of compiler warnings remain, and the GCC developers
are already working on a new version with even more warnings turned on
by default.
This commit is contained in:
John "Elwin" Edwards 2016-02-19 21:02:28 -05:00
parent f38b2223c8
commit e8e6e604c3
39 changed files with 1181 additions and 889 deletions

View file

@ -46,8 +46,7 @@ void (*res_abil[NUMABILITIES])() = {
*/
void
add_constitution(change)
int change;
add_constitution(int change)
{
/* Do the potion */
if (change < 0) {
@ -71,8 +70,7 @@ int change;
*/
void
add_charisma(change)
int change;
add_charisma(int change)
{
/* Do the potion */
if (change < 0) msg("You feel less attractive now.");
@ -92,8 +90,7 @@ int change;
*/
void
add_dexterity(change)
int change;
add_dexterity(int change)
{
int ring_str; /* Value of ring strengths */
@ -123,8 +120,8 @@ int change;
* add a haste to the player
*/
add_haste(blessed)
bool blessed;
void
add_haste(bool blessed)
{
int hasttime;
@ -161,8 +158,7 @@ bool blessed;
* Increase player's intelligence
*/
void
add_intelligence(change)
int change;
add_intelligence(int change)
{
int ring_str; /* Value of ring strengths */
@ -190,7 +186,8 @@ int change;
/*
* this routine makes the hero move slower
*/
add_slow()
void
add_slow(void)
{
/* monks cannot be slowed or hasted */
if (player.t_ctype == C_MONK || ISWEARING(R_FREEDOM)) {
@ -219,8 +216,7 @@ add_slow()
*/
void
add_strength(change)
int change;
add_strength(int change)
{
if (change < 0) {
@ -238,8 +234,7 @@ int change;
*/
void
add_wisdom(change)
int change;
add_wisdom(int change)
{
int ring_str; /* Value of ring strengths */
@ -264,11 +259,8 @@ int change;
pstats.s_wisdom += ring_str;
}
quaff(which, kind, flags, is_potion)
int which;
int kind;
int flags;
bool is_potion;
void
quaff(int which, int kind, int flags, bool is_potion)
{
register struct object *obj;
register struct linked_list *item, *titem;
@ -869,8 +861,7 @@ bool is_potion;
*/
void
res_dexterity(howmuch)
int howmuch;
res_dexterity(int howmuch)
{
short save_max;
int ring_str;
@ -903,8 +894,7 @@ int howmuch;
*/
void
res_intelligence(howmuch)
int howmuch;
res_intelligence(int howmuch)
{
short save_max;
int ring_str;
@ -931,8 +921,7 @@ int howmuch;
*/
void
res_wisdom(howmuch)
int howmuch;
res_wisdom(int howmuch)
{
short save_max;
int ring_str;
@ -959,8 +948,7 @@ int howmuch;
*/
void
res_constitution(howmuch)
int howmuch;
res_constitution(int howmuch)
{
if (howmuch > 0)
pstats.s_const = min(pstats.s_const + howmuch, max_stats.s_const);
@ -972,8 +960,7 @@ int howmuch;
*/
void
res_charisma(howmuch)
int howmuch;
res_charisma(int howmuch)
{
if (howmuch > 0)
pstats.s_charisma =