# HG changeset patch # User John "Elwin" Edwards # Date 1432822903 14400 # Node ID cadff8f047a103a81f9cab12929cb840166d594c # Parent a307ff9cd95ef30bb863298f8fbd0ee79c48d39b arogue7, xrogue: rename daemon() to start_daemon(). This prevents conflict with the BSD/OSX daemon() system function. diff -r a307ff9cd95e -r cadff8f047a1 arogue7/daemon.c --- a/arogue7/daemon.c Thu May 28 09:41:29 2015 -0400 +++ b/arogue7/daemon.c Thu May 28 10:21:43 2015 -0400 @@ -92,10 +92,10 @@ /* - * daemon: + * start_daemon: * Start a daemon, takes a function. */ -daemon(func, arg, type) +start_daemon(func, arg, type) reg int arg, type, (*func)(); { reg struct delayed_action *dev; diff -r a307ff9cd95e -r cadff8f047a1 arogue7/daemons.c --- a/arogue7/daemons.c Thu May 28 09:41:29 2015 -0400 +++ b/arogue7/daemons.c Thu May 28 10:21:43 2015 -0400 @@ -110,7 +110,7 @@ swander() { - daemon(rollwand, 0, BEFORE); + start_daemon(rollwand, 0, BEFORE); } /* diff -r a307ff9cd95e -r cadff8f047a1 arogue7/main.c --- a/arogue7/main.c Thu May 28 09:41:29 2015 -0400 +++ b/arogue7/main.c Thu May 28 10:21:43 2015 -0400 @@ -383,7 +383,7 @@ /* * Start up daemons and fuses */ - daemon(doctor, &player, AFTER); + start_daemon(doctor, &player, AFTER); fuse(swander, 0, WANDERTIME, AFTER); if (player.t_ctype == C_MAGICIAN || player.t_ctype == C_RANGER) fuse(spell_recovery, 0, SPELLTIME, AFTER); @@ -391,11 +391,11 @@ fuse(chant_recovery, 0, SPELLTIME, AFTER); if (player.t_ctype == C_CLERIC || player.t_ctype == C_PALADIN) fuse(prayer_recovery, 0, SPELLTIME, AFTER); - daemon(stomach, 0, AFTER); + start_daemon(stomach, 0, AFTER); if (player.t_ctype == C_THIEF || player.t_ctype == C_ASSASIN || player.t_ctype == C_MONK) - daemon(trap_look, 0, AFTER); + start_daemon(trap_look, 0, AFTER); /* Does this character have any special knowledge? */ switch (player.t_ctype) { diff -r a307ff9cd95e -r cadff8f047a1 arogue7/misc.c --- a/arogue7/misc.c Thu May 28 09:41:29 2015 -0400 +++ b/arogue7/misc.c Thu May 28 10:21:43 2015 -0400 @@ -116,7 +116,7 @@ * if he becomes a thief then add the trap_look() daemon */ if (newclass == C_THIEF || newclass == C_ASSASIN || newclass == C_MONK) - daemon(trap_look, 0, AFTER); + start_daemon(trap_look, 0, AFTER); char_type = player.t_ctype = newclass; save = pstats.s_hpt; max_stats.s_hpt = pstats.s_hpt = 0; diff -r a307ff9cd95e -r cadff8f047a1 arogue7/pack.c --- a/arogue7/pack.c Thu May 28 09:41:29 2015 -0400 +++ b/arogue7/pack.c Thu May 28 10:21:43 2015 -0400 @@ -322,7 +322,7 @@ else purse = 1; /* fudge to get right msg from eat_gold() */ eat_gold(obj); - daemon(eat_gold, obj, AFTER); + start_daemon(eat_gold, obj, AFTER); } /* For the axe start a fuse to change player to a fighter. */ if (obj->o_which == AXE_AKLAD) diff -r a307ff9cd95e -r cadff8f047a1 arogue7/rings.c --- a/arogue7/rings.c Thu May 28 09:41:29 2015 -0400 +++ b/arogue7/rings.c Thu May 28 10:21:43 2015 -0400 @@ -89,9 +89,9 @@ } } when R_SEARCH: - daemon(ring_search, 0, AFTER); + start_daemon(ring_search, 0, AFTER); when R_TELEPORT: - daemon(ring_teleport, 0, AFTER); + start_daemon(ring_teleport, 0, AFTER); } status(FALSE); if (r_know[obj->o_which] && r_guess[obj->o_which]) diff -r a307ff9cd95e -r cadff8f047a1 arogue7/wear.c --- a/arogue7/wear.c Thu May 28 09:41:29 2015 -0400 +++ b/arogue7/wear.c Thu May 28 10:21:43 2015 -0400 @@ -325,7 +325,7 @@ msg("Wearing %s", inv_name(obj,TRUE)); cur_misc[WEAR_GAUNTLET] = obj; if (obj->o_which == MM_FUMBLE) - daemon(fumble, 0, AFTER); + start_daemon(fumble, 0, AFTER); /* * the jewel of attacks does an aggavate monster */ @@ -349,7 +349,7 @@ msg("Wearing %s",inv_name(obj,TRUE)); cur_misc[WEAR_NECKLACE] = obj; msg("The necklace is beginning to strangle you!"); - daemon(strangle, 0, AFTER); + start_daemon(strangle, 0, AFTER); otherwise: msg("What a strange item you have!"); } diff -r a307ff9cd95e -r cadff8f047a1 xrogue/daemon.c --- a/xrogue/daemon.c Thu May 28 09:41:29 2015 -0400 +++ b/xrogue/daemon.c Thu May 28 10:21:43 2015 -0400 @@ -87,11 +87,11 @@ } /* - * daemon: + * start_daemon: * Start a daemon, takes a function. */ -daemon(dfunc, arg, type) +start_daemon(dfunc, arg, type) reg VOID *arg; reg int type, (*dfunc)(); { diff -r a307ff9cd95e -r cadff8f047a1 xrogue/daemons.c --- a/xrogue/daemons.c Thu May 28 09:41:29 2015 -0400 +++ b/xrogue/daemons.c Thu May 28 10:21:43 2015 -0400 @@ -113,7 +113,7 @@ swander() { - daemon(rollwand, (VOID *)NULL, BEFORE); + start_daemon(rollwand, (VOID *)NULL, BEFORE); } /* diff -r a307ff9cd95e -r cadff8f047a1 xrogue/main.c --- a/xrogue/main.c Thu May 28 09:41:29 2015 -0400 +++ b/xrogue/main.c Thu May 28 10:21:43 2015 -0400 @@ -240,7 +240,7 @@ /* * Start up daemons and fuses */ - daemon(doctor, &player, AFTER); + start_daemon(doctor, &player, AFTER); fuse(swander, (VOID *)NULL, WANDERTIME, AFTER); /* Give characters their innate abilities */ if (player.t_ctype == C_MAGICIAN || player.t_ctype == C_RANGER) @@ -249,11 +249,11 @@ fuse(chant_recovery, (VOID *)NULL, SPELLTIME, AFTER); if (player.t_ctype == C_CLERIC || player.t_ctype == C_PALADIN) fuse(prayer_recovery, (VOID *)NULL, SPELLTIME, AFTER); - daemon(stomach, (VOID *)NULL, AFTER); + start_daemon(stomach, (VOID *)NULL, AFTER); if (player.t_ctype == C_THIEF || player.t_ctype == C_ASSASSIN || player.t_ctype == C_MONK) - daemon(trap_look, (VOID *)NULL, AFTER); + start_daemon(trap_look, (VOID *)NULL, AFTER); /* Does this character have any special knowledge? */ switch (player.t_ctype) { diff -r a307ff9cd95e -r cadff8f047a1 xrogue/misc.c --- a/xrogue/misc.c Thu May 28 09:41:29 2015 -0400 +++ b/xrogue/misc.c Thu May 28 10:21:43 2015 -0400 @@ -132,7 +132,7 @@ */ if (*newclass == C_THIEF || *newclass == C_ASSASSIN || *newclass == C_MONK) - daemon(trap_look, (VOID *)NULL, AFTER); + start_daemon(trap_look, (VOID *)NULL, AFTER); /* adjust stats */ char_type = player.t_ctype = *newclass; diff -r a307ff9cd95e -r cadff8f047a1 xrogue/pack.c --- a/xrogue/pack.c Thu May 28 09:41:29 2015 -0400 +++ b/xrogue/pack.c Thu May 28 10:21:43 2015 -0400 @@ -355,7 +355,7 @@ else purse = 1; /* fudge to get right msg from eat_gold() */ eat_gold(obj); - daemon(eat_gold, obj, AFTER); + start_daemon(eat_gold, obj, AFTER); } /* start a fuse to change player into a thief */ if (quest_item != MUSTY_DAGGER) { @@ -435,7 +435,7 @@ else purse = 1; /* fudge to get right msg */ eat_gold(obj); - daemon(eat_gold, obj, AFTER); + start_daemon(eat_gold, obj, AFTER); } } else { @@ -444,7 +444,7 @@ else purse = 1; /* fudge to get right msg */ eat_gold(obj); - daemon(eat_gold, obj, AFTER); + start_daemon(eat_gold, obj, AFTER); } otherwise: diff -r a307ff9cd95e -r cadff8f047a1 xrogue/rings.c --- a/xrogue/rings.c Thu May 28 09:41:29 2015 -0400 +++ b/xrogue/rings.c Thu May 28 10:21:43 2015 -0400 @@ -100,9 +100,9 @@ } } when R_SEARCH: - daemon(ring_search, (VOID *)NULL, AFTER); + start_daemon(ring_search, (VOID *)NULL, AFTER); when R_TELEPORT: - daemon(ring_teleport, (VOID *)NULL, AFTER); + start_daemon(ring_teleport, (VOID *)NULL, AFTER); } status(FALSE); if (r_know[obj->o_which] && r_guess[obj->o_which]) { diff -r a307ff9cd95e -r cadff8f047a1 xrogue/wear.c --- a/xrogue/wear.c Thu May 28 09:41:29 2015 -0400 +++ b/xrogue/wear.c Thu May 28 10:21:43 2015 -0400 @@ -324,7 +324,7 @@ msg("Wearing %s", inv_name(obj,TRUE)); cur_misc[WEAR_GAUNTLET] = obj; if (obj->o_which == MM_FUMBLE) - daemon(fumble, (VOID *)NULL, AFTER); + start_daemon(fumble, (VOID *)NULL, AFTER); /* * the jewel of attacks does an aggavate monster */ @@ -354,7 +354,7 @@ msg("Wearing %s",inv_name(obj,TRUE)); cur_misc[WEAR_NECKLACE] = obj; msg("The necklace is beginning to strangle you!"); - daemon(strangle, (VOID *)NULL, AFTER); + start_daemon(strangle, (VOID *)NULL, AFTER); otherwise: msg("What a strange item you have!"); }