# HG changeset patch # User viric@llimona # Date 1187515437 -7200 # Node ID 225d6c820d230c161f16022bc97f99bb4b5d83df # Parent 09ec33061ff331396b009c9d06473a4f226aaba6 Asciiigi utf8 surstrekojn diff -r 09ec33061ff3 -r 225d6c820d23 Makefile --- a/Makefile Tue Aug 14 22:18:46 2007 +0200 +++ b/Makefile Sun Aug 19 11:23:57 2007 +0200 @@ -1,10 +1,11 @@ CFLAGS=-O2 -g CC=gcc -all: dictre idx2index trim-nou8 ia5 +all: dictre idx2index trim-nou8 ia5 asciiigi-utf8-akcenton idx2index: idx2index.o dict.o trim-nou8: trim-nou8.c +asciiigi-utf8-akcenton: asciiigi-utf8-akcenton.c ia5: ia5.o dict.o diff -r 09ec33061ff3 -r 225d6c820d23 asciiigi-utf8-akcenton.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/asciiigi-utf8-akcenton.c Sun Aug 19 11:23:57 2007 +0200 @@ -0,0 +1,32 @@ +#include + +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; +}