Annotation of xinu/sys/TEST/test.c.io, revision 1.1.1.1

1.1       root        1: /* test.c - main */
                      2: 
                      3: #include <conf.h>
                      4: 
                      5: main ()
                      6: {
                      7:        char    ch;
                      8:        char    line[128];
                      9:        int     i,l;
                     10: 
                     11:        printf("Starting I/O test\n");
                     12:        printf("type line(s) to be echoed (you have 5 seconds): ");
                     13:        sleep10(50);
                     14:        printf("I got %d characters\n\n" , l=read(CONSOLE,line,0));
                     15:        for (i=0 ; i<l ; i++)
                     16:                putc(CONSOLE,line[i]);
                     17:        printf("\n\nI'll echo chars until you type S\n");
                     18:        while ( (ch=getc(CONSOLE)) != 'S')
                     19:                putc(CONSOLE,ch);
                     20:        printf("\n\ntest over\n");
                     21: }

unix.superglobalmegacorp.com

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