Permalink
Browse files

Rename log() to log_msg().

This way it won't conflict with the logarithm-computing function
of the same name from the standard math library.
  • Loading branch information...
1 parent 79d5daa commit 8971973cd1d9d022786d947dbfc1e781a29e25cc @jonm committed Oct 3, 2015
Showing with 460 additions and 460 deletions.
  1. +1 −1 src/Trap.c
  2. +4 −4 src/act.move.c
  3. +2 −2 src/act.obj1.c
  4. +4 −4 src/act.obj2.c
  5. +1 −1 src/act.off.c
  6. +2 −2 src/act.other.c
  7. +1 −1 src/act.social.c
  8. +15 −15 src/act.wizard.c
  9. +7 −7 src/board.c
  10. +29 −29 src/comm.c
  11. +1 −1 src/create.c
  12. +69 −69 src/db.c
  13. +14 −14 src/fight.c
  14. +12 −12 src/fight.old.c
  15. +1 −1 src/foo.c
  16. +29 −29 src/handler.c
  17. +14 −14 src/interpreter.c
  18. +1 −1 src/intrinsics.c
  19. +3 −3 src/limits.c
  20. +1 −1 src/magic3.c
  21. +7 −7 src/mobact.c
  22. +5 −5 src/modify.c
  23. +6 −6 src/multiclass.c
  24. +19 −19 src/reception.c
  25. +4 −4 src/security.c
  26. +4 −4 src/signals.c
  27. +4 −4 src/skills.c
  28. +2 −2 src/spec_assign.c
  29. +8 −8 src/spec_procs.c
  30. +3 −3 src/spec_procs2.c
  31. +8 −8 src/spell_parser.c
  32. +22 −22 src/spells1.c
  33. +154 −154 src/spells2.c
  34. +3 −3 src/utility.c
View
@@ -156,7 +156,7 @@ void TrapDamage(struct char_data *v, int damtype, int amnt, struct obj_data *t)
sprintf(buf, "%s killed by a trap at %s",
GET_NAME(v),
real_roomp(v->in_room)->name);
- log(buf);
+ log_msg(buf);
}
die(v);
View
@@ -697,7 +697,7 @@ open_door(struct char_data *ch, int dir)
rp = real_roomp(ch->in_room);
if (rp==NULL) {
sprintf(buf, "NULL rp in open_door() for %s.", PERS(ch,ch));
- log(buf);
+ log_msg(buf);
}
exitp = rp->dir_option[dir];
@@ -740,7 +740,7 @@ raw_open_door(struct char_data *ch, int dir)
rp = real_roomp(ch->in_room);
if (rp==NULL) {
sprintf(buf, "NULL rp in open_door() for %s.", PERS(ch,ch));
- log(buf);
+ log_msg(buf);
}
exitp = rp->dir_option[dir];
@@ -906,7 +906,7 @@ void raw_unlock_door( struct char_data *ch,
} else {
sprintf(buf, "Inconsistent door locks in rooms %d->%d",
ch->in_room, exitp->to_room);
- log(buf);
+ log_msg(buf);
}
}
@@ -927,7 +927,7 @@ void raw_lock_door( struct char_data *ch,
} else {
sprintf(buf, "Inconsistent door locks in rooms %d->%d",
ch->in_room, exitp->to_room);
- log(buf);
+ log_msg(buf);
}
}
View
@@ -61,7 +61,7 @@ void get(struct char_data *ch, struct obj_data *obj_object,
char buf[MAX_INPUT_LENGTH];
sprintf(buf,"%s just got %d coins!",
GET_NAME(ch),obj_object->obj_flags.value[0]);
- log(buf);
+ log_msg(buf);
}
extract_obj(obj_object);
}
@@ -683,7 +683,7 @@ void do_give(struct char_data *ch, char *argument, int cmd)
save_char(ch, AUTO_RENT);
if ((GET_GOLD(vict) > 500000) && (amount > 100000)) {
sprintf(buf, "%s gave %d coins to %s", GET_NAME(ch), amount, GET_NAME(vict));
- log(buf);
+ log_msg(buf);
}
return;
View
@@ -30,10 +30,10 @@ void weight_change_object(struct obj_data *obj, int weight)
weight = 0 - (GET_OBJ_WEIGHT(obj) -1);
if (obj->carried_by) {
sprintf(buf,"Bad weight change on %s, carried by %s.",obj->name,obj->carried_by->player.name);
- log(buf);
+ log_msg(buf);
} else {
sprintf(buf,"Bad weight change on %s.",obj->name);
- log(buf);
+ log_msg(buf);
}
}
@@ -48,7 +48,7 @@ void weight_change_object(struct obj_data *obj, int weight)
GET_OBJ_WEIGHT(obj) += weight;
obj_to_obj(obj, tmp_obj);
} else {
- log("Unknown attempt to subtract weight from an object.");
+ log_msg("Unknown attempt to subtract weight from an object.");
}
}
@@ -964,7 +964,7 @@ void wear(struct char_data *ch, struct obj_data *obj_object, int keyword)
send_to_char(buffer, ch);
} break;
default: {
- log("Unknown type called in wear.");
+ log_msg("Unknown type called in wear.");
} break;
}
}
View
@@ -1272,7 +1272,7 @@ void do_breath(struct char_data *ch, char *argument, int cmd)
if (count<1) {
sprintf(buf, "monster %s has no breath weapons",
ch->player.short_descr);
- log(buf);
+ log_msg(buf);
send_to_char("Hey, why don't you have any breath weapons!?\n\r",ch);
return;
}
View
@@ -188,7 +188,7 @@ void do_quit(struct char_data *ch, char *argument, int cmd)
if (GET_POS(ch) < POSITION_STUNNED) {
send_to_char("You die before your time!\n\r", ch);
sprintf(buf, "%s dies via quit.", GET_NAME(ch));
- log(buf);
+ log_msg(buf);
die(ch);
return;
}
@@ -457,7 +457,7 @@ void do_steal(struct char_data *ch, char *argument, int cmd)
if(GetMaxLevel(victim) > 50) {
send_to_char("Steal from a God?!? Oh the thought!\n\r", ch);
sprintf(buf, "BUG NOTE: %s tried to steal from GOD %s", GET_NAME(ch), GET_NAME(victim));
- log(buf);
+ log_msg(buf);
return;
}
View
@@ -59,7 +59,7 @@ char *fread_action(FILE *fl)
for (;;) {
fgets(buf, MAX_STRING_LENGTH, fl);
if (feof(fl)) {
- log("Fread_action - unexpected EOF.");
+ log_msg("Fread_action - unexpected EOF.");
exit(0);
}
View
@@ -79,13 +79,13 @@ void do_auth(struct char_data *ch, char *argument, int cmd)
d->character->generic = NEWBIE_START;
sprintf(buf2,"%s has just accepted %s into the game.",
ch->player.name,name);
- log(buf2);
+ log_msg(buf2);
SEND_TO_Q("You have been accepted. Press enter\n\r", d);
} else if (str_cmp(word,"no")==0){
SEND_TO_Q("You have been denied. Press enter\n\r", d);
sprintf(buf2,"%s has just denied %s from the game.",
ch->player.name,name);
- log(buf2);
+ log_msg(buf2);
d->character->generic = NEWBIE_AXE;
} else {
SEND_TO_Q(argument, d);
@@ -512,12 +512,12 @@ void do_silence(struct char_data *ch, char *argument, int cmd)
Silence = 1;
send_to_char("You have now silenced polyed mobles.\n\r",ch);
sprintf(buf,"%s has stopped Polymophed characters from shouting.",ch->player.name);
- log(buf);
+ log_msg(buf);
} else {
Silence = 0;
send_to_char("You have now unsilenced mobles.\n\r",ch);
sprintf(buf,"%s has allowed Polymophed characters to shout.",ch->player.name);
- log(buf);
+ log_msg(buf);
}
}
void do_wizlock(struct char_data *ch, char *argument, int cmd)
@@ -564,7 +564,7 @@ void do_wizlock(struct char_data *ch, char *argument, int cmd)
send_to_char("Its already on!\n\r", ch);
} else {
send_to_char("WizLock is now on\n\r",ch);
- log("WizLock is now on.");
+ log_msg("WizLock is now on.");
WizLock = TRUE;
}
@@ -574,7 +574,7 @@ void do_wizlock(struct char_data *ch, char *argument, int cmd)
send_to_char("Its already off!\n\r", ch);
} else {
send_to_char("WizLock is now off\n\r",ch);
- log("WizLock is now off.");
+ log_msg("WizLock is now off.");
WizLock = FALSE;
}
@@ -599,7 +599,7 @@ void do_wizlock(struct char_data *ch, char *argument, int cmd)
strcpy(hostlist[numberhosts],buf);
sprintf(buf,"%s has added host %s to the access denied list.",
GET_NAME(ch),hostlist[numberhosts]);
- log(buf);
+ log_msg(buf);
numberhosts++;
return;
@@ -636,7 +636,7 @@ void do_wizlock(struct char_data *ch, char *argument, int cmd)
strcpy(hostlist[b],hostlist[b+1]);
sprintf(buf,"%s has removed host %s from the access denied list.",
GET_NAME(ch),hostlist[numberhosts]);
- log(buf);
+ log_msg(buf);
numberhosts--;
return;
}
@@ -665,11 +665,11 @@ void do_wizlock(struct char_data *ch, char *argument, int cmd)
#else
if (WizLock) {
send_to_char("WizLock is now off\n\r",ch);
- log("Wizlock is now off.");
+ log_msg("Wizlock is now off.");
WizLock = FALSE;
} else {
send_to_char("WizLock is now on\n\r",ch);
- log("WizLock is now on.");
+ log_msg("WizLock is now on.");
WizLock = TRUE;
}
#endif
@@ -963,7 +963,7 @@ void do_goto(struct char_data *ch, char *argument, int cmd)
if (!real_roomp(location)) {
- log("Massive error in do_goto. Everyone Off NOW.");
+ log_msg("Massive error in do_goto. Everyone Off NOW.");
return;
}
@@ -1814,7 +1814,7 @@ void do_set(struct char_data *ch, char *argument, int cmd)
EasySummon = TRUE;
sprintf(buf, "Peaceful rooms and Easy Summon enabled by %s", GET_NAME(ch));
}
- log(buf);
+ log_msg(buf);
} else if (!strcmp(field, "mana")) {
sscanf(parmstr, "%d", &parm);
@@ -1854,12 +1854,12 @@ void do_shutdown(struct char_data *ch, char *argument, int cmd)
if (!*arg) {
sprintf(buf, "Shutdown by %s.", GET_NAME(ch) );
send_to_all(buf);
- log(buf);
+ log_msg(buf);
mudshutdown = 1;
} else if (!str_cmp(arg, "reboot")) {
sprintf(buf, "Reboot by %s.", GET_NAME(ch));
send_to_all(buf);
- log(buf);
+ log_msg(buf);
mudshutdown = reboot = 1;
} else
send_to_char("Go shut down someone your own size.\n\r", ch);
@@ -1902,7 +1902,7 @@ void do_snoop(struct char_data *ch, char *argument, int cmd)
char buf[MAX_STRING_LENGTH];
sprintf(buf, "caught %s snooping %s who didn't have a descriptor!",
ch->player.name, ch->desc->snoop.snooping->player.name);
- log(buf);
+ log_msg(buf);
/*
logically.. this person has returned from being a creature?
*/
View
@@ -139,7 +139,7 @@ void board_write_msg(struct char_data *ch, char *arg, int bnum) {
extern char *month_name[];
if ( bnum == -1 ) {
- log("Board special procedure called for non-board object.\r\n");
+ log_msg("Board special procedure called for non-board object.\r\n");
send_to_char("This board is not in operation at this time.\n\r", ch);
return;
}
@@ -233,7 +233,7 @@ int board_remove_msg(struct char_data *ch, char *arg, int bnum) {
if (!(tmessage = atoi(number))) return(0);
if ( bnum == -1 ) {
- log("Board special procedure called for non-board object.\r\n");
+ log_msg("Board special procedure called for non-board object.\r\n");
send_to_char("This board is not in operation at this time.\n\r", ch);
return 1;
}
@@ -293,7 +293,7 @@ int board_remove_msg(struct char_data *ch, char *arg, int bnum) {
act(buf, FALSE, ch, 0, 0, TO_ROOM);
sprintf((buf+strlen(buf)-1)," from board %d.",bnum);
- log(buf); /* Message removals now logged. */
+ log_msg(buf); /* Message removals now logged. */
board_save_board(bnum);
return(1);
@@ -346,7 +346,7 @@ void board_save_board(bnum) {
the_file = fopen(save_file[bnum], "w");
if (!the_file) {
- log("Unable to open/create savefile for bulletin board..\n\r");
+ log_msg("Unable to open/create savefile for bulletin board..\n\r");
return;
}
@@ -384,14 +384,14 @@ void board_load_board() {
the_file = fopen(save_file[bnum], "r");
if (!the_file) {
sprintf(buf,"Can't open message file for board %d.\n\r",bnum);
- log(buf,0);
+ log_msg(buf,0);
continue;
}
fscanf( the_file, " %d ", &boards[bnum].number);
if (boards[bnum].number < 0 || boards[bnum].number > MAX_MSGS ||
feof(the_file)) {
- log("Board-message file corrupt, nonexistent, or empty.\n\r");
+ log_msg("Board-message file corrupt, nonexistent, or empty.\n\r");
boards[bnum].number = -1;
fclose(the_file);
continue;
@@ -526,7 +526,7 @@ int board_check_locks (int bnum, struct char_data *ch) {
}
if (!found)
{
- log("Board: board locked for a user not in game.");
+ log_msg("Board: board locked for a user not in game.");
board_lock[bnum].lock = 0;
board_lock[bnum].locked_for = NULL;
return(0);
Oops, something went wrong.

0 comments on commit 8971973

Please sign in to comment.