use header file; cinit to main()
authorBill Joy <wnj@ucbvax.Berkeley.EDU>
Fri, 27 Feb 1981 15:56:47 +0000 (07:56 -0800)
committerBill Joy <wnj@ucbvax.Berkeley.EDU>
Fri, 27 Feb 1981 15:56:47 +0000 (07:56 -0800)
SCCS-vsn: sys/kern/tty_subr.c 4.7

usr/src/sys/kern/tty_subr.c

index c8683fa..4e63419 100644 (file)
@@ -1,20 +1,12 @@
-/*     tty_subr.c      4.6     %G%     */
+/*     tty_subr.c      4.7     %G%     */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 #include "../h/conf.h"
 #include "../h/buf.h"
 #include "../h/tty.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
 #include "../h/conf.h"
 #include "../h/buf.h"
 #include "../h/tty.h"
+#include "../h/clist.h"
 
 
-struct cblock {
-       struct  cblock *c_next;
-       char    c_info[CBSIZE];
-};
-
-struct cblock cfree[NCLIST];
-struct cblock *cfreelist;
-
-int    cfreecount;
 char   cwaiting;
 
 /*
 char   cwaiting;
 
 /*
@@ -506,30 +498,6 @@ struct clist *from, *to;
                (void) putc(c, to);
 }
 
                (void) putc(c, to);
 }
 
-/*
- * Initialize clist by freeing all character blocks, then count
- * number of character devices. (Once-only routine)
- */
-cinit()
-{
-       register int ccp;
-       register struct cblock *cp;
-       register struct cdevsw *cdp;
-
-       ccp = (int)cfree;
-       ccp = (ccp+CROUND) & ~CROUND;
-       for(cp=(struct cblock *)ccp; cp < &cfree[NCLIST-1]; cp++) {
-               cp->c_next = cfreelist;
-               cfreelist = cp;
-               cfreecount += CBSIZE;
-       }
-       ccp = 0;
-       for(cdp = cdevsw; cdp->d_open; cdp++)
-               ccp++;
-       nchrdev = ccp;
-}
-
-
 /*
  * integer (2-byte) get/put
  * using clists
 /*
  * integer (2-byte) get/put
  * using clists