intmax_t for %d va_arg to int to be friendlier.
Signed-off-by: Rick Bird <nveid@bender.theari.com>
#define LOG_H
/* log types */
-#define LT_ERR 0
-#define LT_CMD 1
-#define LT_WIZ 2
-#define LT_CONN 3
-#define LT_TRACE 4
-#define LT_RPAGE 5 /* Obsolete */
-#define LT_CHECK 6
-#define LT_HUH 7
+#define LT_ERR 0
+#define LT_CMD 1
+#define LT_WIZ 2
+#define LT_CONN 3
+#define LT_TRACE 4
+#define LT_SUSPECT 5 /* Obsolete */
+#define LT_CHECK 6
+#define LT_HUH 7
/* From log.c */
extern void start_all_logs(void);
log_activity(LA_CMD, player, msg);
if (options.log_commands || Suspect(player))
- do_log(LT_CMD, player, NOTHING, "%s", msg);
+ do_log(Suspect(player) ? LT_SUSPECT : LT_CMD, player, NOTHING, "%s", msg);
if Verbose
(player)
raw_notify(Owner(player), tprintf("#%d] %s", player, msg));
case LT_ERR:
f = stderr;
break;
+ case LT_SUSPECT:
case LT_HUH:
case LT_CMD:
start_log(&cmdlog_fp, CMDLOG);
case LT_ERR:
do_rawlog(logtype, "RPT: %s", tbuf1);
break;
+ case LT_SUSPECT:
case LT_CMD:
strcpy(unp1, quick_unparse(player));
if (GoodObject(object)) {
case 'D':
case 'd':
global_eval_context.wenv[spot++] =
- unparse_integer(va_arg(arguments, intmax_t));
+ unparse_integer(va_arg(arguments, int));
next = 0;
break;
case 'S':
if (attrib)
safe_str(atr_value(attrib), buff, bp);
break;
- default: /* just copy */
- safe_chr(savec, buff, bp);
- }
- if (isupper((unsigned char) savec))
- *savepos = UPCASE(*savepos);
- }
- break;
case 'z':
case 'Z':
nextc = **str;
break;
}
break;
+ default: /* just copy */
+ safe_chr(savec, buff, bp);
+ }
+
+ if (isupper((unsigned char) savec))
+ *savepos = UPCASE(*savepos);
+ }
+ break;
}
case '{': /* "{}" parse group; recurse with no function check */