arogue7, xrogue: rename daemon() to start_daemon().

This prevents conflict with the BSD/OSX daemon() system function.
This commit is contained in:
John "Elwin" Edwards 2015-05-28 10:21:43 -04:00
parent b369d09125
commit 4e5f4c52d3
14 changed files with 26 additions and 26 deletions

View file

@ -92,10 +92,10 @@ reg int (*func)();
/* /*
* daemon: * start_daemon:
* Start a daemon, takes a function. * Start a daemon, takes a function.
*/ */
daemon(func, arg, type) start_daemon(func, arg, type)
reg int arg, type, (*func)(); reg int arg, type, (*func)();
{ {
reg struct delayed_action *dev; reg struct delayed_action *dev;

View file

@ -110,7 +110,7 @@ register struct thing *tp;
swander() swander()
{ {
daemon(rollwand, 0, BEFORE); start_daemon(rollwand, 0, BEFORE);
} }
/* /*

View file

@ -383,7 +383,7 @@ char **envp;
/* /*
* Start up daemons and fuses * Start up daemons and fuses
*/ */
daemon(doctor, &player, AFTER); start_daemon(doctor, &player, AFTER);
fuse(swander, 0, WANDERTIME, AFTER); fuse(swander, 0, WANDERTIME, AFTER);
if (player.t_ctype == C_MAGICIAN || player.t_ctype == C_RANGER) if (player.t_ctype == C_MAGICIAN || player.t_ctype == C_RANGER)
fuse(spell_recovery, 0, SPELLTIME, AFTER); fuse(spell_recovery, 0, SPELLTIME, AFTER);
@ -391,11 +391,11 @@ char **envp;
fuse(chant_recovery, 0, SPELLTIME, AFTER); fuse(chant_recovery, 0, SPELLTIME, AFTER);
if (player.t_ctype == C_CLERIC || player.t_ctype == C_PALADIN) if (player.t_ctype == C_CLERIC || player.t_ctype == C_PALADIN)
fuse(prayer_recovery, 0, SPELLTIME, AFTER); fuse(prayer_recovery, 0, SPELLTIME, AFTER);
daemon(stomach, 0, AFTER); start_daemon(stomach, 0, AFTER);
if (player.t_ctype == C_THIEF || if (player.t_ctype == C_THIEF ||
player.t_ctype == C_ASSASIN || player.t_ctype == C_ASSASIN ||
player.t_ctype == C_MONK) player.t_ctype == C_MONK)
daemon(trap_look, 0, AFTER); start_daemon(trap_look, 0, AFTER);
/* Does this character have any special knowledge? */ /* Does this character have any special knowledge? */
switch (player.t_ctype) { switch (player.t_ctype) {

View file

@ -116,7 +116,7 @@ int newclass;
* if he becomes a thief then add the trap_look() daemon * if he becomes a thief then add the trap_look() daemon
*/ */
if (newclass == C_THIEF || newclass == C_ASSASIN || newclass == C_MONK) 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; char_type = player.t_ctype = newclass;
save = pstats.s_hpt; save = pstats.s_hpt;
max_stats.s_hpt = pstats.s_hpt = 0; max_stats.s_hpt = pstats.s_hpt = 0;

View file

@ -322,7 +322,7 @@ picked_up:
else else
purse = 1; /* fudge to get right msg from eat_gold() */ purse = 1; /* fudge to get right msg from eat_gold() */
eat_gold(obj); 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. */ /* For the axe start a fuse to change player to a fighter. */
if (obj->o_which == AXE_AKLAD) if (obj->o_which == AXE_AKLAD)

View file

@ -89,9 +89,9 @@ register struct linked_list *item;
} }
} }
when R_SEARCH: when R_SEARCH:
daemon(ring_search, 0, AFTER); start_daemon(ring_search, 0, AFTER);
when R_TELEPORT: when R_TELEPORT:
daemon(ring_teleport, 0, AFTER); start_daemon(ring_teleport, 0, AFTER);
} }
status(FALSE); status(FALSE);
if (r_know[obj->o_which] && r_guess[obj->o_which]) if (r_know[obj->o_which] && r_guess[obj->o_which])

View file

@ -325,7 +325,7 @@ wear()
msg("Wearing %s", inv_name(obj,TRUE)); msg("Wearing %s", inv_name(obj,TRUE));
cur_misc[WEAR_GAUNTLET] = obj; cur_misc[WEAR_GAUNTLET] = obj;
if (obj->o_which == MM_FUMBLE) if (obj->o_which == MM_FUMBLE)
daemon(fumble, 0, AFTER); start_daemon(fumble, 0, AFTER);
/* /*
* the jewel of attacks does an aggavate monster * the jewel of attacks does an aggavate monster
*/ */
@ -349,7 +349,7 @@ wear()
msg("Wearing %s",inv_name(obj,TRUE)); msg("Wearing %s",inv_name(obj,TRUE));
cur_misc[WEAR_NECKLACE] = obj; cur_misc[WEAR_NECKLACE] = obj;
msg("The necklace is beginning to strangle you!"); msg("The necklace is beginning to strangle you!");
daemon(strangle, 0, AFTER); start_daemon(strangle, 0, AFTER);
otherwise: otherwise:
msg("What a strange item you have!"); msg("What a strange item you have!");
} }

View file

@ -87,11 +87,11 @@ reg int (*func)();
} }
/* /*
* daemon: * start_daemon:
* Start a daemon, takes a function. * Start a daemon, takes a function.
*/ */
daemon(dfunc, arg, type) start_daemon(dfunc, arg, type)
reg VOID *arg; reg VOID *arg;
reg int type, (*dfunc)(); reg int type, (*dfunc)();
{ {

View file

@ -113,7 +113,7 @@ register struct thing *tp;
swander() swander()
{ {
daemon(rollwand, (VOID *)NULL, BEFORE); start_daemon(rollwand, (VOID *)NULL, BEFORE);
} }
/* /*

View file

@ -240,7 +240,7 @@ char **envp;
/* /*
* Start up daemons and fuses * Start up daemons and fuses
*/ */
daemon(doctor, &player, AFTER); start_daemon(doctor, &player, AFTER);
fuse(swander, (VOID *)NULL, WANDERTIME, AFTER); fuse(swander, (VOID *)NULL, WANDERTIME, AFTER);
/* Give characters their innate abilities */ /* Give characters their innate abilities */
if (player.t_ctype == C_MAGICIAN || player.t_ctype == C_RANGER) if (player.t_ctype == C_MAGICIAN || player.t_ctype == C_RANGER)
@ -249,11 +249,11 @@ char **envp;
fuse(chant_recovery, (VOID *)NULL, SPELLTIME, AFTER); fuse(chant_recovery, (VOID *)NULL, SPELLTIME, AFTER);
if (player.t_ctype == C_CLERIC || player.t_ctype == C_PALADIN) if (player.t_ctype == C_CLERIC || player.t_ctype == C_PALADIN)
fuse(prayer_recovery, (VOID *)NULL, SPELLTIME, AFTER); fuse(prayer_recovery, (VOID *)NULL, SPELLTIME, AFTER);
daemon(stomach, (VOID *)NULL, AFTER); start_daemon(stomach, (VOID *)NULL, AFTER);
if (player.t_ctype == C_THIEF || if (player.t_ctype == C_THIEF ||
player.t_ctype == C_ASSASSIN || player.t_ctype == C_ASSASSIN ||
player.t_ctype == C_MONK) 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? */ /* Does this character have any special knowledge? */
switch (player.t_ctype) { switch (player.t_ctype) {

View file

@ -132,7 +132,7 @@ long *newclass;
*/ */
if (*newclass == C_THIEF || *newclass == C_ASSASSIN || if (*newclass == C_THIEF || *newclass == C_ASSASSIN ||
*newclass == C_MONK) *newclass == C_MONK)
daemon(trap_look, (VOID *)NULL, AFTER); start_daemon(trap_look, (VOID *)NULL, AFTER);
/* adjust stats */ /* adjust stats */
char_type = player.t_ctype = *newclass; char_type = player.t_ctype = *newclass;

View file

@ -355,7 +355,7 @@ picked_up:
else purse = 1; /* fudge to get right msg from eat_gold() */ else purse = 1; /* fudge to get right msg from eat_gold() */
eat_gold(obj); eat_gold(obj);
daemon(eat_gold, obj, AFTER); start_daemon(eat_gold, obj, AFTER);
} }
/* start a fuse to change player into a thief */ /* start a fuse to change player into a thief */
if (quest_item != MUSTY_DAGGER) { if (quest_item != MUSTY_DAGGER) {
@ -435,7 +435,7 @@ picked_up:
else purse = 1; /* fudge to get right msg */ else purse = 1; /* fudge to get right msg */
eat_gold(obj); eat_gold(obj);
daemon(eat_gold, obj, AFTER); start_daemon(eat_gold, obj, AFTER);
} }
} }
else { else {
@ -444,7 +444,7 @@ picked_up:
else purse = 1; /* fudge to get right msg */ else purse = 1; /* fudge to get right msg */
eat_gold(obj); eat_gold(obj);
daemon(eat_gold, obj, AFTER); start_daemon(eat_gold, obj, AFTER);
} }
otherwise: otherwise:

View file

@ -100,9 +100,9 @@ register struct linked_list *item;
} }
} }
when R_SEARCH: when R_SEARCH:
daemon(ring_search, (VOID *)NULL, AFTER); start_daemon(ring_search, (VOID *)NULL, AFTER);
when R_TELEPORT: when R_TELEPORT:
daemon(ring_teleport, (VOID *)NULL, AFTER); start_daemon(ring_teleport, (VOID *)NULL, AFTER);
} }
status(FALSE); status(FALSE);
if (r_know[obj->o_which] && r_guess[obj->o_which]) { if (r_know[obj->o_which] && r_guess[obj->o_which]) {

View file

@ -324,7 +324,7 @@ wear()
msg("Wearing %s", inv_name(obj,TRUE)); msg("Wearing %s", inv_name(obj,TRUE));
cur_misc[WEAR_GAUNTLET] = obj; cur_misc[WEAR_GAUNTLET] = obj;
if (obj->o_which == MM_FUMBLE) 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 * the jewel of attacks does an aggavate monster
*/ */
@ -354,7 +354,7 @@ wear()
msg("Wearing %s",inv_name(obj,TRUE)); msg("Wearing %s",inv_name(obj,TRUE));
cur_misc[WEAR_NECKLACE] = obj; cur_misc[WEAR_NECKLACE] = obj;
msg("The necklace is beginning to strangle you!"); msg("The necklace is beginning to strangle you!");
daemon(strangle, (VOID *)NULL, AFTER); start_daemon(strangle, (VOID *)NULL, AFTER);
otherwise: otherwise:
msg("What a strange item you have!"); msg("What a strange item you have!");
} }