From 631f6e62498bb0439be2718c04a4f5e76baaeec0 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Fri, 12 Jan 2007 16:41:22 +0100 Subject: [PATCH] Fake reencoding success under NO_ICONV instead of returning NULL. git-am when invoked from git-rebase seems to rely on successful conversion. --- utf8.c | 7 +++++++ utf8.h | 4 ---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/utf8.c b/utf8.c index 4efef6faf7..5949b4d2d4 100644 --- a/utf8.c +++ b/utf8.c @@ -353,4 +353,11 @@ char *reencode_string(const char *in, const char *out_encoding, const char *in_e iconv_close(conv); return out; } +#else +char *reencode_string(const char *in, const char *out_encoding, const char *in_encoding) +{ + if (!in_encoding) + return NULL; + return xstrdup(in); +} #endif diff --git a/utf8.h b/utf8.h index 15db6f1f27..a8b8c2f4da 100644 --- a/utf8.h +++ b/utf8.h @@ -7,10 +7,6 @@ int is_encoding_utf8(const char *name); int print_wrapped_text(const char *text, int indent, int indent2, int len); -#ifndef NO_ICONV char *reencode_string(const char *in, const char *out_encoding, const char *in_encoding); -#else -#define reencode_string(a,b,c) NULL -#endif #endif