trim-nou8.c
author viric <viriketo@gmail.com>
Fri, 30 Mar 2012 18:54:55 +0200
changeset 31 2bcc08d0f1d8
parent 5 c87681fff7d3
permissions -rw-r--r--
Fixing an error message
viric@5
     1
#include <stdio.h>
viric@5
     2
viric@5
     3
int main()
viric@5
     4
{
viric@5
     5
    int i;
viric@5
     6
    do
viric@5
     7
    {
viric@5
     8
        /* Unsigned char cast to int */
viric@5
     9
        i = getchar();
viric@5
    10
        if (i == EOF)
viric@5
    11
            break;
viric@5
    12
        if (i == '\n' || (i >= ' ' && i < 0xfe))
viric@5
    13
            putchar(i);
viric@5
    14
    } while(1);
viric@5
    15
viric@5
    16
    return 0;
viric@5
    17
}