asciiigi-utf8-akcenton.c
author viric@llimona
Sun, 02 Sep 2007 16:01:27 +0200
changeset 27 153c479aa0bc
parent 9 225d6c820d23
permissions -rw-r--r--
LEGUMIN kaj aliaj gxisdatigoj.
#include <stdio.h>

int main()
{
    int i;
    int last;

    last = getchar();
    do
    {
        /* Unsigned char cast to int */
        i = getchar();
        if (i == EOF)
            break;
        if (!(last == 0xcc && i == 0x81))
        {
            putchar(last);
        }
        else
        {
            putchar('\'');
            i = getchar();
            if (i == EOF)
                /* We don't want the last putchar */
                return 0;
        }
        last = i;
    } while(1);
    putchar(last);

    return 0;
}