--- embedaddon/libiconv/tests/uniq-u.c 2012/02/21 22:57:49 1.1 +++ embedaddon/libiconv/tests/uniq-u.c 2012/05/29 09:29:44 1.1.1.2 @@ -62,8 +62,8 @@ xrealloc (void *p, size_t n) struct linebuffer { - size_t size; /* Allocated. */ - size_t length; /* Used. */ + size_t size; /* Allocated. */ + size_t length; /* Used. */ char *buffer; }; @@ -97,21 +97,21 @@ readline (struct linebuffer *linebuffer, FILE *stream) { c = getc (stream); if (c == EOF) - { - if (p == buffer) - return 0; - if (p[-1] == '\n') - break; - c = '\n'; - } + { + if (p == buffer) + return 0; + if (p[-1] == '\n') + break; + c = '\n'; + } if (p == end) - { - linebuffer->size *= 2; - buffer = (char *) xrealloc (buffer, linebuffer->size); - p = p - linebuffer->buffer + buffer; - linebuffer->buffer = buffer; - end = buffer + linebuffer->size - 1; - } + { + linebuffer->size *= 2; + buffer = (char *) xrealloc (buffer, linebuffer->size); + p = p - linebuffer->buffer + buffer; + linebuffer->buffer = buffer; + end = buffer + linebuffer->size - 1; + } *p++ = c; } while (c != '\n'); @@ -210,25 +210,25 @@ check_file (const char *infile, const char *outfile) { int match; if (readline (thisline, istream) == 0) - break; + break; thisfield = thisline->buffer; thislen = thisline->length; match = !different (thisfield, prevfield, thislen, prevlen); if (match) - ++match_count; + ++match_count; if (!match) - { - writeline (prevline, ostream, match_count); - exch = prevline; - prevline = thisline; - thisline = exch; - prevfield = thisfield; - prevlen = thislen; - if (!match) - match_count = 0; - } + { + writeline (prevline, ostream, match_count); + exch = prevline; + prevline = thisline; + thisline = exch; + prevfield = thisfield; + prevlen = thislen; + if (!match) + match_count = 0; + } } writeline (prevline, ostream, match_count);