Annotation of 40BSD/cmd/liszt/uctolc.c, revision 1.1

1.1     ! root        1: #include <stdio.h>
        !             2: #include <ctype.h>
        !             3: /*   uctolc                                    j foderaro
        !             4:        convert upper case to lower case
        !             5:        in the first field of a tags file
        !             6:  */
        !             7: #define TRUE -1
        !             8: main()
        !             9: {
        !            10:        register char c;
        !            11:        while(TRUE)
        !            12:        {
        !            13:          pt1:
        !            14:                while( (c=getchar()) != EOF)
        !            15:                {       
        !            16:                    if(isupper(c))putchar( c + ('a' - 'A'));
        !            17:                    else if(c == ' ') goto pt2;
        !            18:                    else putchar(c);
        !            19:                }
        !            20:                exit();
        !            21:        pt2:
        !            22:                putchar(c);
        !            23:                while( (c=getchar()) != EOF)
        !            24:                {
        !            25:                    putchar(c);
        !            26:                    if(c == '\n') goto pt1;
        !            27:                }
        !            28:                exit();
        !            29:        }
        !            30: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.