aboutsummaryrefslogtreecommitdiffstats
path: root/src/log.c
diff options
context:
space:
mode:
authorJ. Alexander Treuman <jat@spatialrift.net>2007-02-18 00:42:22 +0000
committerJ. Alexander Treuman <jat@spatialrift.net>2007-02-18 00:42:22 +0000
commit7b1e14b8e81c2dc44def58f2781bcfcc3cc9e58b (patch)
tree16ed8f0c622cc6c9d7569d12c9442992cc23b4b5 /src/log.c
parentd7e8507eaf9ac76d207a51ac850964b9373ba2d3 (diff)
downloadmpd-7b1e14b8e81c2dc44def58f2781bcfcc3cc9e58b.tar.gz
mpd-7b1e14b8e81c2dc44def58f2781bcfcc3cc9e58b.tar.xz
mpd-7b1e14b8e81c2dc44def58f2781bcfcc3cc9e58b.zip
Reverting all of my localization changes. It was a horrible
implementation, and fixing it is a big enough job that I don't know when I'll get around to it. Probably best just starting from scratch anyhow. git-svn-id: https://svn.musicpd.org/mpd/trunk@5373 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/log.c')
-rw-r--r--src/log.c27
1 files changed, 8 insertions, 19 deletions
diff --git a/src/log.c b/src/log.c
index b2e1e1339..5185bb9c3 100644
--- a/src/log.c
+++ b/src/log.c
@@ -21,7 +21,6 @@
#include "conf.h"
#include "myfprintf.h"
#include "utils.h"
-#include "localization.h"
#include <assert.h>
#include <stdlib.h>
@@ -87,17 +86,9 @@ static void buffer_warning(const char *fmt, va_list args)
static void do_log(FILE *fp, const char *fmt, va_list args)
{
- char buffer[BUFFER_LENGTH + 1];
- char *localized;
-
- if (!stdout_mode) {
+ if (!stdout_mode)
fwrite(log_date(), 15, 1, fp);
- vfprintf(fp, fmt, args);
- } else {
- vsnprintf(buffer, BUFFER_LENGTH, fmt, args);
- localized = utf8ToLocaleCharset(buffer);
- fputs(localized, fp);
- }
+ vfprintf(fp, fmt, args);
}
void flushWarningLog(void)
@@ -109,14 +100,12 @@ void flushWarningLog(void)
if (warningBuffer != NULL)
{
while (s != NULL) {
- char *next = strchr(s, '\n');
- if (next == NULL) break;
- *next = '\0';
- next++;
- if (stdout_mode)
- fprintf(stderr, "%s\n", utf8ToLocaleCharset(s));
- else
- fprintf(stderr, "%s\n", s);
+ char * next = strchr(s, '\n');
+ if (next != NULL) {
+ *next = '\0';
+ next++;
+ }
+ fprintf(stderr, "%s\n", s);
s = next;
}