Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/wsfont Bump WSFONT_L2R/R2L by +1 so 0 can mean no sp...



details:   https://anonhg.NetBSD.org/src/rev/ea4ee424186b
branches:  trunk
changeset: 472294:ea4ee424186b
user:      ad <ad%NetBSD.org@localhost>
date:      Mon Apr 26 23:41:57 1999 +0000

description:
Bump WSFONT_L2R/R2L by +1 so 0 can mean no specific order is required.
Change entry for QVSS to match bitorder.

diffstat:

 sys/dev/wsfont/wsfont.c |  24 ++++++++++++------------
 sys/dev/wsfont/wsfont.h |   8 ++++----
 2 files changed, 16 insertions(+), 16 deletions(-)

diffs (94 lines):

diff -r 280a5f56a50e -r ea4ee424186b sys/dev/wsfont/wsfont.c
--- a/sys/dev/wsfont/wsfont.c   Mon Apr 26 23:28:31 1999 +0000
+++ b/sys/dev/wsfont/wsfont.c   Mon Apr 26 23:41:57 1999 +0000
@@ -1,6 +1,6 @@
-/* $NetBSD: wsfont.c,v 1.5 1999/04/26 04:24:22 ad Exp $ */
+/*     $NetBSD: wsfont.c,v 1.6 1999/04/26 23:41:57 ad Exp $ */
 
-/*-
+/*
  * Copyright (c) 1999 Andy Doran <ad%NetBSD.org@localhost>
  * All rights reserved.
  *
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.5 1999/04/26 04:24:22 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsfont.c,v 1.6 1999/04/26 23:41:57 ad Exp $");
 
 #include "opt_wsfont.h"
 
@@ -87,24 +87,24 @@
 /* Our list of built-in fonts */
 static struct font *list, builtin_fonts[] = {
 #ifdef FONT_BOLD8x16
-       { NULL, NULL, &bold8x16, 0, 1, WSFONT_STATIC | WSFONT_BUILTIN, 0, 0 },
+       { NULL, NULL, &bold8x16, 0, 1, WSFONT_STATIC | WSFONT_BUILTIN, WSFONT_L2R, WSFONT_L2R },
 #endif
 #ifdef FONT_ISO8x16
-       { NULL, NULL, &iso8x16, 0, 2, WSFONT_STATIC | WSFONT_BUILTIN, 0, 0 },
+       { NULL, NULL, &iso8x16, 0, 2, WSFONT_STATIC | WSFONT_BUILTIN, WSFONT_L2R, WSFONT_L2R },
 #endif
 #ifdef FONT_COURIER11x18
-       { NULL, NULL, &courier11x18, 0, 3, WSFONT_STATIC | WSFONT_BUILTIN, 0, 0 },
+       { NULL, NULL, &courier11x18, 0, 3, WSFONT_STATIC | WSFONT_BUILTIN, WSFONT_L2R, WSFONT_L2R },
 #endif
 #ifdef FONT_GALLANT12x22
-       { NULL, NULL, &gallant12x22, 0, 4, WSFONT_STATIC | WSFONT_BUILTIN, 0, 0 },
+       { NULL, NULL, &gallant12x22, 0, 4, WSFONT_STATIC | WSFONT_BUILTIN, WSFONT_L2R, WSFONT_L2R },
 #endif
 #ifdef FONT_LUCIDA16x29
-       { NULL, NULL, &lucida16x29, 0, 5, WSFONT_STATIC | WSFONT_BUILTIN, 0, 0 },
+       { NULL, NULL, &lucida16x29, 0, 5, WSFONT_STATIC | WSFONT_BUILTIN, WSFONT_L2R, WSFONT_L2R },
 #endif
 #ifdef FONT_QVSS8x15
-       { NULL, NULL, &qvss8x15, 0, 6, WSFONT_STATIC | WSFONT_BUILTIN, 0, 0 },
+       { NULL, NULL, &qvss8x15, 0, 6, WSFONT_STATIC | WSFONT_BUILTIN, WSFONT_R2L, WSFONT_L2R },
 #endif
-       { NULL, NULL, NULL, 0, 0, 0 },
+       { NULL, NULL, NULL, 0, WSFONT_L2R, WSFONT_L2R },
 };
 
 /* Reverse the bit order in a byte */
@@ -409,7 +409,7 @@
        s = splhigh();
        
        if ((ent = wsfont_find0(cookie)) != NULL) {
-               if (bitorder != ent->bitorder) {
+               if (bitorder && bitorder != ent->bitorder) {
                        if (ent->lockcount)
                                return (-1);
                
@@ -417,7 +417,7 @@
                        ent->bitorder = bitorder;
                }
 
-               if (byteorder != ent->byteorder) {
+               if (byteorder && byteorder != ent->byteorder) {
                        if (ent->lockcount)
                                return (-1);
 
diff -r 280a5f56a50e -r ea4ee424186b sys/dev/wsfont/wsfont.h
--- a/sys/dev/wsfont/wsfont.h   Mon Apr 26 23:28:31 1999 +0000
+++ b/sys/dev/wsfont/wsfont.h   Mon Apr 26 23:41:57 1999 +0000
@@ -1,6 +1,6 @@
-/* $NetBSD: wsfont.h,v 1.3 1999/04/26 04:24:22 ad Exp $ */
+/*     $NetBSD: wsfont.h,v 1.4 1999/04/26 23:41:57 ad Exp $ */
 
-/*-
+/*
  * Copyright (c) 1999 Andy Doran <ad%NetBSD.org@localhost>
  * All rights reserved.
  *
@@ -55,8 +55,8 @@
 struct wsdisplay_font;
 
 /* Left to Right, Right to Left */
-#define WSFONT_L2R     (0)
-#define WSFONT_R2L     (1)
+#define WSFONT_L2R     (1)
+#define WSFONT_R2L     (2)
 
 void   wsfont_init __P((void));
 int    wsfont_find __P((char *name, int width, int height, int stride));



Home | Main Index | Thread Index | Old Index