From a5d4651ef6a5d5a234db5f0b1d0a761289fc463c Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Sat, 31 Oct 1992 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1992-10-31 --- port/devdk.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/port/devdk.c b/port/devdk.c index 474d774816c792ef76d940a437a81bfd0464794a..0517b6fd7244de6d472b033b6127e6148051e15a 100644 --- a/port/devdk.c +++ b/port/devdk.c @@ -80,7 +80,6 @@ struct Dkmsg { #define W_DESTMAX(x,y) (W_WINDOW(W_ORIG(x),MIN(W_DEST(x),y),W_TRAF(x))) #define W_LIMIT(x,y) (W_WINDOW(MIN(W_ORIG(x),y),MIN(W_DEST(x),y),W_TRAF(x))) #define W_VALUE(x) (1<<((x)+4)) -#define WS_2K 7 struct Line { QLock; @@ -488,7 +487,7 @@ dkoput(Queue *q, Block *bp) * the number of lines in the device (optional) * the word `restart' or `norestart' (optional/default==restart) * the name of the dk (default==dk) - * the urp window size (default==WS_2K) + * the urp window size (default==2048) * * we can configure only once */ @@ -524,7 +523,7 @@ dkmuxconfig(Queue *q, Block *bp) ncsc = 1; restart = 1; lines = 16; - window = WS_2K; + window = 2048; strcpy(name, "dk"); /* @@ -534,6 +533,8 @@ dkmuxconfig(Queue *q, Block *bp) switch(n){ case 5: window = strtoul(fields[4], 0, 0); + if(window < 16) + window = 1<<(window+4); case 4: strncpy(name, fields[3], sizeof(name)); name[sizeof(name)-1] = 0;