diff arogue5/daemons.c @ 218:56e748983fa8

Advanced Rogue 5: convert to ANSI function declarations. This still leaves over a thousand lines of warning messages, mostly related to the return types of daemons and fuses.
author John "Elwin" Edwards
date Sun, 07 Feb 2016 14:39:21 -0500
parents f2951c4e28d9
children
line wrap: on
line diff
--- a/arogue5/daemons.c	Sun Jan 31 13:45:07 2016 -0500
+++ b/arogue5/daemons.c	Sun Feb 07 14:39:21 2016 -0500
@@ -22,8 +22,8 @@
  *	A healing daemon that restors hit points after rest
  */
 
-doctor(tp)
-register struct thing *tp;
+void
+doctor(struct thing *tp)
 {
     register int ohp;
     register int limit, new_points;
@@ -100,7 +100,8 @@
  *	Called when it is time to start rolling for wandering monsters
  */
 
-swander()
+void
+swander(void)
 {
     start_daemon(rollwand, 0, BEFORE);
 }
@@ -110,7 +111,8 @@
  *	Called to roll to see if a wandering monster starts up
  */
 
-rollwand()
+void
+rollwand(void)
 {
     if (++between >= 4)
     {
@@ -128,7 +130,8 @@
 /*
  * this function is a daemon called each turn when the character is a thief
  */
-trap_look()
+void
+trap_look(void)
 {
     if (rnd(100) < (2*dex_compute() + 5*pstats.s_lvl))
 	search(TRUE, FALSE);
@@ -139,7 +142,8 @@
  *	Release the poor player from his confusion
  */
 
-unconfuse()
+void
+unconfuse(void)
 {
     turn_off(player, ISHUH);
     msg("You feel less confused now");
@@ -151,7 +155,8 @@
  *	He lost his see invisible power
  */
 
-unsee()
+void
+unsee(void)
 {
     if (!ISWEARING(R_SEEINVIS)) {
 	turn_off(player, CANSEE);
@@ -164,7 +169,8 @@
  *	Remove to-hit handicap from player
  */
 
-unstink()
+void
+unstink(void)
 {
     turn_off(player, HASSTINK);
 }
@@ -174,7 +180,8 @@
  *	Player is no longer immune to confusion
  */
 
-unclrhead()
+void
+unclrhead(void)
 {
     turn_off(player, ISCLEAR);
     msg("The blue aura about your head fades away.");
@@ -185,7 +192,8 @@
  *	Player can no longer walk through walls
  */
 
-unphase()
+void
+unphase(void)
 {
     turn_off(player, CANINWALL);
     msg("Your dizzy feeling leaves you.");
@@ -197,7 +205,8 @@
  *	Player can no longer fly
  */
 
-land()
+void
+land(void)
 {
     turn_off(player, ISFLY);
     msg("You regain your normal weight");
@@ -209,7 +218,8 @@
  *	He gets his sight back
  */
 
-sight()
+void
+sight(void)
 {
     if (on(player, ISBLIND))
     {
@@ -225,7 +235,8 @@
  *	Restore player's strength
  */
 
-res_strength()
+void
+res_strength(void)
 {
 
     /* If lost_str is non-zero, restore that amount of strength,
@@ -249,7 +260,8 @@
  *	End the hasting
  */
 
-nohaste()
+void
+nohaste(void)
 {
     turn_off(player, ISHASTE);
     msg("You feel yourself slowing down.");
@@ -260,7 +272,8 @@
  *	End the slowing
  */
 
-noslow()
+void
+noslow(void)
 {
     turn_off(player, ISSLOW);
     msg("You feel yourself speeding up.");
@@ -271,7 +284,8 @@
  *	If this gets called, the player has suffocated
  */
 
-suffocate()
+void
+suffocate(void)
 {
     death(D_SUFFOCATION);
 }
@@ -279,7 +293,8 @@
 /*
  * digest the hero's food
  */
-stomach()
+void
+stomach(void)
 {
     register int oldfood, old_hunger, food_use, i;
 
@@ -335,7 +350,8 @@
 /*
  * daemon for curing the diseased
  */
-cure_disease()
+void
+cure_disease(void)
 {
     turn_off(player, HASDISEASE);
     if (off (player, HASINFEST))
@@ -346,7 +362,8 @@
 /*
  * daemon for adding back dexterity
  */
-un_itch()
+void
+un_itch(void)
 {
     if (--lost_dext < 1) {
 	lost_dext = 0;
@@ -358,7 +375,8 @@
  * appear:
  *	Become visible again
  */
-appear()
+void
+appear(void)
 {
     turn_off(player, ISINVIS);
     PLAYER = VPLAYER;
@@ -369,7 +387,8 @@
  * dust_appear:
  *	dust of disappearance wears off
  */
-dust_appear()
+void
+dust_appear(void)
 {
     turn_off(player, ISINVIS);
     PLAYER = VPLAYER;
@@ -380,7 +399,8 @@
  * unchoke:
  * 	the effects of "dust of choking and sneezing" wear off
  */
-unchoke()
+void
+unchoke(void)
 {
     if (!find_slot(unconfuse))
 	turn_off(player, ISHUH);
@@ -392,8 +412,8 @@
 /*
  * make some potion for the guy in the Alchemy jug
  */
-alchemy(obj)
-register struct object *obj;
+void
+alchemy(struct object *obj)
 {
     register struct object *tobj = NULL;
     register struct linked_list *item;
@@ -440,7 +460,8 @@
  * otto's irresistable dance wears off 
  */
 
-undance()
+void
+undance(void)
 {
     turn_off(player, ISDANCE);
     msg ("Your feet take a break.....whew!");
@@ -449,14 +470,16 @@
 /* 
  * if he has our favorite necklace of strangulation then take damage every turn
  */
-strangle()
+void
+strangle(void)
 {
      if ((pstats.s_hpt -= 6) <= 0) death(D_STRANGLE);
 }
 /*
  * if he has on the gauntlets of fumbling he might drop his weapon each turn
  */
-fumble()
+void
+fumble(void)
 {
     register struct linked_list *item;
 
@@ -474,14 +497,16 @@
 /*
  * this is called each turn the hero has the ring of searching on
  */
-ring_search()
+void
+ring_search(void)
 {
     search(FALSE, FALSE);
 }
 /*
  * this is called each turn the hero has the ring of teleportation on
  */
-ring_teleport()
+void
+ring_teleport(void)
 {
     if (rnd(100) < 2) teleport();
 }