/* Messages logging.
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
- 2007 Free Software Foundation, Inc.
+ 2007, 2008 Free Software Foundation, Inc.
This file is part of GNU Wget.
shall include the source code for the parts of OpenSSL used as well
as that of the covered work. */
-#include <config.h>
+#include "wget.h"
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
-#include "wget.h"
#include "utils.h"
#include "log.h"
/* String escape functions. */
/* Return the number of non-printable characters in SOURCE.
- Non-printable characters are determined as per safe-ctype.c. */
+ Non-printable characters are determined as per c-ctype.c. */
static int
count_nonprint (const char *source)
const char *p;
int cnt;
for (p = source, cnt = 0; *p; p++)
- if (!ISPRINT (*p))
+ if (!c_isprint (*p))
++cnt;
return cnt;
}
{
case 8:
while ((c = *from++) != '\0')
- if (ISPRINT (c))
+ if (c_isprint (c))
*to++ = c;
else
{
break;
case 16:
while ((c = *from++) != '\0')
- if (ISPRINT (c))
+ if (c_isprint (c))
*to++ = c;
else
{
void
log_cleanup (void)
{
- int i;
+ size_t i;
for (i = 0; i < countof (ring); i++)
xfree_null (ring[i].buffer);
}
logfp = unique_create (DEFAULT_LOGFILE, false, &logfile);
if (logfp)
{
- fprintf (stderr, _("\n%s received, redirecting output to `%s'.\n"),
- redirect_request_signal_name, logfile);
+ fprintf (stderr, _("\n%s received, redirecting output to %s.\n"),
+ redirect_request_signal_name, quote (logfile));
xfree (logfile);
/* Dump the context output to the newly opened log. */
log_dump_context ();