mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-14 09:37:34 -05:00
Adopt C99 <stdbool.h>'s true/false.
This commit includes <stdbool.h> from defs.h and deletes my traditional definitions of TRUE and FALSE, but other than that, it's a 100% mechanical search-and-replace transforming all uses of TRUE and FALSE into the C99-standardised lowercase spellings. No actual types are changed in this commit; that will come next. This is just getting the noise out of the way, so that subsequent commits can have a higher proportion of signal.
This commit is contained in:
14
logging.c
14
logging.c
@ -87,18 +87,18 @@ static void logfopen_callback(void *vctx, int mode)
|
||||
char buf[256], *event;
|
||||
struct tm tm;
|
||||
const char *fmode;
|
||||
int shout = FALSE;
|
||||
int shout = false;
|
||||
|
||||
if (mode == 0) {
|
||||
ctx->state = L_ERROR; /* disable logging */
|
||||
} else {
|
||||
fmode = (mode == 1 ? "ab" : "wb");
|
||||
ctx->lgfp = f_open(ctx->currlogfilename, fmode, FALSE);
|
||||
ctx->lgfp = f_open(ctx->currlogfilename, fmode, false);
|
||||
if (ctx->lgfp) {
|
||||
ctx->state = L_OPEN;
|
||||
} else {
|
||||
ctx->state = L_ERROR;
|
||||
shout = TRUE;
|
||||
shout = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -425,9 +425,9 @@ void log_reconfig(LogContext *ctx, Conf *conf)
|
||||
conf_get_filename(conf, CONF_logfilename)) ||
|
||||
conf_get_int(ctx->conf, CONF_logtype) !=
|
||||
conf_get_int(conf, CONF_logtype))
|
||||
reset_logging = TRUE;
|
||||
reset_logging = true;
|
||||
else
|
||||
reset_logging = FALSE;
|
||||
reset_logging = false;
|
||||
|
||||
if (reset_logging)
|
||||
logfclose(ctx);
|
||||
@ -463,7 +463,7 @@ static Filename *xlatlognam(Filename *src, char *hostname, int port,
|
||||
s = filename_to_str(src);
|
||||
|
||||
while (*s) {
|
||||
int sanitise = FALSE;
|
||||
int sanitise = false;
|
||||
/* Let (bufp, len) be the string to append. */
|
||||
bufp = buf; /* don't usually override this */
|
||||
if (*s == '&') {
|
||||
@ -501,7 +501,7 @@ static Filename *xlatlognam(Filename *src, char *hostname, int port,
|
||||
* auto-format directives. E.g. 'hostname' can contain
|
||||
* colons, if it's an IPv6 address, and colons aren't
|
||||
* legal in filenames on Windows. */
|
||||
sanitise = TRUE;
|
||||
sanitise = true;
|
||||
} else {
|
||||
buf[0] = *s++;
|
||||
size = 1;
|
||||
|
Reference in New Issue
Block a user