summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 495fd07)
raw | patch | inline | side by side (parent: 495fd07)
author | Jonas Fonseca <fonseca@diku.dk> | |
Mon, 19 Jan 2009 14:33:43 +0000 (15:33 +0100) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Mon, 19 Jan 2009 14:39:08 +0000 (15:39 +0100) |
tig.c | patch | blob | history |
index b16fe244d0fd2d9b26d4208fd99c9ffaecf4b338..6d3191e2f9032f0add961b9f69a2f48b57eb0d03 100644 (file)
--- a/tig.c
+++ b/tig.c
}
for (; (line = io_get(view->pipe, '\n', can_read)); can_read = FALSE) {
- size_t linelen = strlen(line);
-
if (opt_iconv != ICONV_NONE) {
ICONV_CONST char *inbuf = line;
- size_t inlen = linelen + 1;
+ size_t inlen = strlen(line) + 1;
char *outbuf = out_buffer;
size_t outlen = sizeof(out_buffer);
size_t ret;
ret = iconv(opt_iconv, &inbuf, &inlen, &outbuf, &outlen);
- if (ret != (size_t) -1) {
+ if (ret != (size_t) -1)
line = out_buffer;
- linelen = strlen(out_buffer);
- }
}
if (!view->ops->read(view, line))