+ return (0);
+}
+
+/*
+ * Remove the last character in the list and return it.
+ */
+unputc(p)
+register struct clist *p;
+{
+ register struct cblock *bp;
+ register int c, s;
+ struct cblock *obp;
+
+ s = spl6();
+ if (p->c_cc <= 0)
+ c = -1;
+ else {
+ c = *--p->c_cl;
+ if (--p->c_cc <= 0) {
+ bp = (struct cblock *)p->c_cl;
+ bp = (struct cblock *)((int)bp & ~CROUND);
+ p->c_cl = p->c_cf = NULL;
+ bp->c_next = cfreelist;
+ cfreelist = bp;
+ cfreecount += CBSIZE;
+ } else if (((int)p->c_cl & CROUND) == sizeof(bp->c_next)) {
+ p->c_cl = (char *)((int)p->c_cl & ~CROUND);
+ bp = (struct cblock *)p->c_cf;
+ bp = (struct cblock *)((int)bp & ~CROUND);
+ while (bp->c_next != (struct cblock *)p->c_cl)
+ bp = bp->c_next;
+ obp = bp;
+ p->c_cl = (char *)(bp + 1);
+ bp = bp->c_next;
+ bp->c_next = cfreelist;
+ cfreelist = bp;
+ cfreecount += CBSIZE;
+ obp->c_next = NULL;
+ }
+ }
+ splx(s);
+ return (c);
+}
+
+/*
+ * Put the chars in the from que
+ * on the end of the to que.
+ *
+ * SHOULD JUST USE q_to_b AND THEN b_to_q HERE.
+ */
+catq(from, to)
+struct clist *from, *to;
+{
+ register c;
+
+ while ((c = getc(from)) >= 0)
+ (void) putc(c, to);