|
|
1.1 root 1: /* vcuputc.c - vcuputc */
2:
3: #include <conf.h>
4: #include <kernel.h>
5: #include <tty.h>
6: #include <io.h>
7: #include <vcu.h>
8: #include <procreg.h>
9:
10: /*------------------------------------------------------------------------
11: * vcuputc - write one character to vax console device
12: *------------------------------------------------------------------------
13: */
14: vcuputc(devptr, ch )
15: struct devsw *devptr;
16: char ch;
17: {
18: struct tty *iptr;
19: PStype ps;
20:
21: iptr = &tty[devptr->dvminor];
22: if ( ch==NEWLINE && iptr->ocrlf )
23: vcuputc(devptr,RETURN);
24: disable(ps);
25: wait(iptr->osem); /* wait for space in queue */
26: iptr->obuff[iptr->ohead++] = ch;
27: if (iptr->ohead >= OBUFLEN)
28: iptr->ohead = 0;
29: mtpr(VCUTXCSENBL, TXCS);
30: restore(ps);
31: return(OK);
32: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.