summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2008-07-30 12:32:42 +0000
committered <ed@FreeBSD.org>2008-07-30 12:32:42 +0000
commit870de37626ca069ffd8dc0d083dc610bfcc1332b (patch)
treeb90b7011cd8317be3d6d606b0945eaedd4eb2328 /sys/kern
parent2f3eaa65d516cc9b503141da15b0c4032c949af0 (diff)
downloadFreeBSD-src-870de37626ca069ffd8dc0d083dc610bfcc1332b.zip
FreeBSD-src-870de37626ca069ffd8dc0d083dc610bfcc1332b.tar.gz
Don't make subr_clist.c depend on the TTY layer.
After the import of the new TTY layer, the TTY_QUOTE definition will not be present anymore. To make sure clists will still work as expected, introduce an internal definition called QUOTEMASK. Maybe we can decide to remove the quote bits entirely, but we still have to look into this. There may be drivers that still use the quote bits. Obtained from: //depot/projects/mpsafetty
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/subr_clist.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/kern/subr_clist.c b/sys/kern/subr_clist.c
index 57225db..f434a72 100644
--- a/sys/kern/subr_clist.c
+++ b/sys/kern/subr_clist.c
@@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/malloc.h>
-#include <sys/tty.h>
#include <sys/clist.h>
static void clist_init(void *);
@@ -53,6 +52,8 @@ static int ctotcount;
#define INITIAL_CBLOCKS 50
#endif
+#define QUOTEMASK 0x100
+
static struct cblock *cblock_alloc(void);
static void cblock_alloc_cblocks(int number);
static void cblock_free(struct cblock *cblockp);
@@ -235,7 +236,7 @@ getc(clistp)
* If this char is quoted, set the flag.
*/
if (isset(cblockp->c_quote, clistp->c_cf - (char *)cblockp->c_info))
- chr |= TTY_QUOTE;
+ chr |= QUOTEMASK;
/*
* Advance to next character.
@@ -407,7 +408,7 @@ putc(chr, clistp)
/*
* If this character is quoted, set the quote bit, if not, clear it.
*/
- if (chr & TTY_QUOTE) {
+ if (chr & QUOTEMASK) {
setbit(cblockp->c_quote, clistp->c_cl - (char *)cblockp->c_info);
/*
* Use one of the spare quote bits to record that something
@@ -581,7 +582,7 @@ nextc(clistp, cp, dst)
* Get the character. Set the quote flag if this character
* is quoted.
*/
- *dst = (u_char)*cp | (isset(cblockp->c_quote, cp - (char *)cblockp->c_info) ? TTY_QUOTE : 0);
+ *dst = (u_char)*cp | (isset(cblockp->c_quote, cp - (char *)cblockp->c_info) ? QUOTEMASK : 0);
return (cp);
}
@@ -615,7 +616,7 @@ unputc(clistp)
* Set quote flag if this character was quoted.
*/
if (isset(cblockp->c_quote, (u_char *)clistp->c_cl - cblockp->c_info))
- chr |= TTY_QUOTE;
+ chr |= QUOTEMASK;
/*
* If all of the characters have been unput in this
OpenPOWER on IntegriCloud