Annotation of xinu/h/io.h, revision 1.1

1.1     ! root        1: /* io.h -  fgetc, fputc, getchar, isbaddev, putchar */
        !             2: 
        !             3: #include <iodisp.h>
        !             4: 
        !             5: #if defined(NDEVS) && NDEVS > 0
        !             6: #define        INTVECI ((int)devveci0) /* lowest input interrupt dispatch loc  */
        !             7: #define        INTVECO ((int)devveco0) /* lowest output interrupt dispatch loc */
        !             8: #define DVECSIZE (INTVECO-INTVECI)/* bytes per dispatch vector-to loc  */
        !             9: #else
        !            10: #define INTVECI NULLPTR                /* dummy definitions                    */
        !            11: #define INTVECO NULLPTR
        !            12: #define DVECSIZE 0
        !            13: #endif
        !            14: 
        !            15: struct intmap  {               /* device-to-interrupt routine mapping  */
        !            16:        int     (*iin)();       /* address of input interrupt routine   */
        !            17:        int     icode;          /* argument passed to input routine     */
        !            18:        int     (*iout)();      /* address of output interrupt routine  */
        !            19:        int     ocode;          /* argument passed to output routine    */
        !            20:        };
        !            21: 
        !            22: #ifdef NDEVS
        !            23: extern struct  intmap intmap[NDEVS];
        !            24: #define        isbaddev(f)     ( (f)<0 || (f)>=NDEVS )
        !            25: #endif
        !            26: 
        !            27: #define        BADDEV          -1
        !            28: 
        !            29: /* In-line I/O procedures */
        !            30: 
        !            31: #define        getchar()       getc(CONSOLE)
        !            32: #define        putchar(ch)     putc(CONSOLE,(ch))
        !            33: #define        fgetc(unit)     getc((unit))
        !            34: #define        fputc(unit,ch)  putc((unit),(ch))

unix.superglobalmegacorp.com

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