summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandr Shadchin <shadchin@cvs.openbsd.org>2012-01-06 14:55:39 +0000
committerAlexandr Shadchin <shadchin@cvs.openbsd.org>2012-01-06 14:55:39 +0000
commitc1baa4c32d8dc1bee2cbc31047ccffc26599ca53 (patch)
tree2377f0b196d42160918c962e521b937d1a8e77c4
parentfe56784b73b7f2c67674d4008b27de08f757a442 (diff)
Remove extra and trailing spaces.
ok mpi@
-rw-r--r--sys/dev/wsfont/bold8x16-iso1.h4
-rw-r--r--sys/dev/wsfont/bold8x16.h6
-rw-r--r--sys/dev/wsfont/files.wsfont4
-rw-r--r--sys/dev/wsfont/gallant12x22.h12
-rw-r--r--sys/dev/wsfont/lucida16x29.h54
-rw-r--r--sys/dev/wsfont/qvss8x15.h6
-rw-r--r--sys/dev/wsfont/vt220l8x10.h4
-rw-r--r--sys/dev/wsfont/vt220l8x8.h4
-rw-r--r--sys/dev/wsfont/wsfont.c162
-rw-r--r--sys/dev/wsfont/wsfont.h6
10 files changed, 130 insertions, 132 deletions
diff --git a/sys/dev/wsfont/bold8x16-iso1.h b/sys/dev/wsfont/bold8x16-iso1.h
index f88a8fda3b0..6b43cbd14cb 100644
--- a/sys/dev/wsfont/bold8x16-iso1.h
+++ b/sys/dev/wsfont/bold8x16-iso1.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bold8x16-iso1.h,v 1.3 2009/06/21 20:30:35 jsg Exp $ */
+/* $OpenBSD: bold8x16-iso1.h,v 1.4 2012/01/06 14:55:38 shadchin Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
static u_char bold8x16_iso1_data[];
-struct wsdisplay_font bold8x16_iso1 = {
+struct wsdisplay_font bold8x16_iso1 = {
"Boldface.iso1", /* typeface name */
0, /* index */
' ', /* firstchar */
diff --git a/sys/dev/wsfont/bold8x16.h b/sys/dev/wsfont/bold8x16.h
index d29ec054b4d..cd7062a9632 100644
--- a/sys/dev/wsfont/bold8x16.h
+++ b/sys/dev/wsfont/bold8x16.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: bold8x16.h,v 1.3 2009/06/21 20:30:35 jsg Exp $ */
-/* $NetBSD: bold8x16.h,v 1.4 2000/01/05 18:44:22 ad Exp $ */
+/* $OpenBSD: bold8x16.h,v 1.4 2012/01/06 14:55:38 shadchin Exp $ */
+/* $NetBSD: bold8x16.h,v 1.4 2000/01/05 18:44:22 ad Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
*/
static u_char bold8x16_data[];
-struct wsdisplay_font bold8x16 = {
+struct wsdisplay_font bold8x16 = {
"Boldface", /* typeface name */
0, /* index */
1, /* firstchar */
diff --git a/sys/dev/wsfont/files.wsfont b/sys/dev/wsfont/files.wsfont
index 354a2c9882a..ad8a83c5c29 100644
--- a/sys/dev/wsfont/files.wsfont
+++ b/sys/dev/wsfont/files.wsfont
@@ -1,5 +1,5 @@
-# $OpenBSD: files.wsfont,v 1.3 2005/09/15 20:23:10 miod Exp $
-# $NetBSD: files.wsfont,v 1.7 2000/11/21 11:44:45 tsutsui Exp $
+# $OpenBSD: files.wsfont,v 1.4 2012/01/06 14:55:38 shadchin Exp $
+# $NetBSD: files.wsfont,v 1.7 2000/11/21 11:44:45 tsutsui Exp $
# Note: `wsfont_glue' is only here to force the header file's name
# hence it must be mentioned first.
diff --git a/sys/dev/wsfont/gallant12x22.h b/sys/dev/wsfont/gallant12x22.h
index 5d0dc311e8c..c4b7ec11a98 100644
--- a/sys/dev/wsfont/gallant12x22.h
+++ b/sys/dev/wsfont/gallant12x22.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: gallant12x22.h,v 1.4 2009/06/21 20:30:35 jsg Exp $ */
-/* $NetBSD: gallant12x22.h,v 1.2 1999/05/18 21:51:58 ad Exp $ */
+/* $OpenBSD: gallant12x22.h,v 1.5 2012/01/06 14:55:38 shadchin Exp $ */
+/* $NetBSD: gallant12x22.h,v 1.2 1999/05/18 21:51:58 ad Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -35,10 +35,10 @@
*
* Derived from: @(#)gallant19.h 8.1 (Berkeley) 6/11/93
*/
-
+
static u_char gallant12x22_data[];
-struct wsdisplay_font gallant12x22 = {
+struct wsdisplay_font gallant12x22 = {
"Gallant", /* typeface name */
0, /* index */
' ', /* firstchar */
@@ -52,7 +52,7 @@ struct wsdisplay_font gallant12x22 = {
NULL, /* cookie */
gallant12x22_data /* data */
};
-
+
static u_char gallant12x22_data[] = {
/* */
0x00, 0x00, /* ............ */
@@ -5429,6 +5429,4 @@ static u_char gallant12x22_data[] = {
0x78, 0x00, /* .****....... */
0x70, 0x00, /* .***........ */
0x00, 0x00, /* ............ */
-
-
};
diff --git a/sys/dev/wsfont/lucida16x29.h b/sys/dev/wsfont/lucida16x29.h
index 3c241d2f23c..44a63bc0f62 100644
--- a/sys/dev/wsfont/lucida16x29.h
+++ b/sys/dev/wsfont/lucida16x29.h
@@ -1,63 +1,63 @@
-/* $OpenBSD: lucida16x29.h,v 1.2 2009/06/21 20:30:35 jsg Exp $ */
-/* $NetBSD: lucida16x29.h,v 1.3 1999/05/18 21:51:58 ad Exp $ */
+/* $OpenBSD: lucida16x29.h,v 1.3 2012/01/06 14:55:38 shadchin Exp $ */
+/* $NetBSD: lucida16x29.h,v 1.3 1999/05/18 21:51:58 ad Exp $ */
/*
This is the LEGAL NOTICE pertaining to the Lucida fonts from Bigelow & Holmes:
- NOTICE TO USER: The source code, including the glyphs or icons
- forming a par of the OPEN LOOK TM Graphic User Interface, on this
+ NOTICE TO USER: The source code, including the glyphs or icons
+ forming a par of the OPEN LOOK TM Graphic User Interface, on this
tape and in these files is copyrighted under U.S. and international
laws. Sun Microsystems, Inc. of Mountain View, California owns
- the copyright and has design patents pending on many of the icons.
+ the copyright and has design patents pending on many of the icons.
AT&T is the owner of the OPEN LOOK trademark associated with the
- materials on this tape. Users and possessors of this source code
- are hereby granted a nonexclusive, royalty-free copyright and
- design patent license to use this code in individual and
+ materials on this tape. Users and possessors of this source code
+ are hereby granted a nonexclusive, royalty-free copyright and
+ design patent license to use this code in individual and
commercial software. A royalty-free, nonexclusive trademark
- license to refer to the code and output as "OPEN LOOK" compatible
- is available from AT&T if, and only if, the appearance of the
+ license to refer to the code and output as "OPEN LOOK" compatible
+ is available from AT&T if, and only if, the appearance of the
icons or glyphs is not changed in any manner except as absolutely
necessary to accommodate the standard resolution of the screen or
- other output device, the code and output is not changed except as
- authorized herein, and the code and output is validated by AT&T.
+ other output device, the code and output is not changed except as
+ authorized herein, and the code and output is validated by AT&T.
Bigelow & Holmes is the owner of the Lucida (R) trademark for the
- fonts and bit-mapped images associated with the materials on this
+ fonts and bit-mapped images associated with the materials on this
tape. Users are granted a royalty-free, nonexclusive license to use
- the trademark only to identify the fonts and bit-mapped images if,
+ the trademark only to identify the fonts and bit-mapped images if,
and only if, the fonts and bit-mapped images are not modified in any
- way by the user.
+ way by the user.
- Any use of this source code must include, in the user documentation
- and internal comments to the code, notices to the end user as
+ Any use of this source code must include, in the user documentation
+ and internal comments to the code, notices to the end user as
follows:
(c) Copyright 1989 Sun Microsystems, Inc. Sun design patents
- pending in the U.S. and foreign countries. OPEN LOOK is a
+ pending in the U.S. and foreign countries. OPEN LOOK is a
trademark of AT&T. Used by written permission of the owners.
- (c) Copyright Bigelow & Holmes 1986, 1985. Lucida is a registered
- trademark of Bigelow & Holmes. Permission to use the Lucida
- trademark is hereby granted only in association with the images
+ (c) Copyright Bigelow & Holmes 1986, 1985. Lucida is a registered
+ trademark of Bigelow & Holmes. Permission to use the Lucida
+ trademark is hereby granted only in association with the images
and fonts described in this file.
- SUN MICROSYSTEMS, INC., AT&T, AND BIGELOW & HOLMES
+ SUN MICROSYSTEMS, INC., AT&T, AND BIGELOW & HOLMES
MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF
- THIS SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS"
- WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
- SUN MICROSYSTEMS, INC., AT&T AND BIGELOW & HOLMES,
- SEVERALLY AND INDIVIDUALLY, DISCLAIM ALL WARRANTIES
+ THIS SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS"
+ WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND.
+ SUN MICROSYSTEMS, INC., AT&T AND BIGELOW & HOLMES,
+ SEVERALLY AND INDIVIDUALLY, DISCLAIM ALL WARRANTIES
WITH REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE. IN NO EVENT SHALL SUN MICROSYSTEMS,
INC., AT&T OR BIGELOW & HOLMES BE LIABLE FOR ANY
SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
- OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
+ OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE.
diff --git a/sys/dev/wsfont/qvss8x15.h b/sys/dev/wsfont/qvss8x15.h
index 09cdc9a05e4..a6c020f4a39 100644
--- a/sys/dev/wsfont/qvss8x15.h
+++ b/sys/dev/wsfont/qvss8x15.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: qvss8x15.h,v 1.4 2009/06/21 20:30:35 jsg Exp $ */
-/* $NetBSD: qvss8x15.h,v 1.3 1999/05/18 21:51:58 ad Exp $ */
+/* $OpenBSD: qvss8x15.h,v 1.5 2012/01/06 14:55:38 shadchin Exp $ */
+/* $NetBSD: qvss8x15.h,v 1.3 1999/05/18 21:51:58 ad Exp $ */
/*-
* Copyright (c) 1982, 1986
@@ -71,7 +71,7 @@
static u_char qvss8x15_data[];
-struct wsdisplay_font qvss8x15 = {
+struct wsdisplay_font qvss8x15 = {
"QVSS", /* typeface name */
0, /* index */
' ', /* firstchar */
diff --git a/sys/dev/wsfont/vt220l8x10.h b/sys/dev/wsfont/vt220l8x10.h
index e6f2b81a093..75793b80d3a 100644
--- a/sys/dev/wsfont/vt220l8x10.h
+++ b/sys/dev/wsfont/vt220l8x10.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: vt220l8x10.h,v 1.2 2009/06/21 20:30:35 jsg Exp $ */
-/* $NetBSD: vt220l8x10.h,v 1.3 2000/01/05 18:44:25 ad Exp $ */
+/* $OpenBSD: vt220l8x10.h,v 1.3 2012/01/06 14:55:38 shadchin Exp $ */
+/* $NetBSD: vt220l8x10.h,v 1.3 2000/01/05 18:44:25 ad Exp $ */
/*
* Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch
diff --git a/sys/dev/wsfont/vt220l8x8.h b/sys/dev/wsfont/vt220l8x8.h
index a7e58625e8c..46ac30bbc1b 100644
--- a/sys/dev/wsfont/vt220l8x8.h
+++ b/sys/dev/wsfont/vt220l8x8.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: vt220l8x8.h,v 1.2 2009/06/21 20:30:35 jsg Exp $ */
-/* $NetBSD: vt220l8x8.h,v 1.3 2000/01/05 18:44:25 ad Exp $ */
+/* $OpenBSD: vt220l8x8.h,v 1.3 2012/01/06 14:55:38 shadchin Exp $ */
+/* $NetBSD: vt220l8x8.h,v 1.3 2000/01/05 18:44:25 ad Exp $ */
/*
* Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch
diff --git a/sys/dev/wsfont/wsfont.c b/sys/dev/wsfont/wsfont.c
index 3f126111405..8b82c757860 100644
--- a/sys/dev/wsfont/wsfont.c
+++ b/sys/dev/wsfont/wsfont.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: wsfont.c,v 1.25 2010/05/23 15:04:19 deraadt Exp $ */
-/* $NetBSD: wsfont.c,v 1.17 2001/02/07 13:59:24 ad Exp $ */
+/* $OpenBSD: wsfont.c,v 1.26 2012/01/06 14:55:38 shadchin Exp $ */
+/* $NetBSD: wsfont.c,v 1.17 2001/02/07 13:59:24 ad Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -124,7 +124,7 @@ struct font {
u_short lockcount;
u_short cookie;
u_short flg;
-};
+};
/* Our list of built-in fonts */
static struct font *list, builtin_fonts[] = {
@@ -168,38 +168,38 @@ static struct font *list, builtin_fonts[] = {
/* Reverse the bit order in a byte */
static const u_char reverse[256] = {
- 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
- 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
- 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
- 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
- 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
- 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
- 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
- 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
- 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
- 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
- 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
- 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
- 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
- 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
- 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
- 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0x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, 0x3b, 0xbb, 0x7b, 0xfb,
+ 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7,
+ 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
+ 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
+ 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff,
};
#endif
@@ -217,11 +217,11 @@ wsfont_revbit(font)
struct wsdisplay_font *font;
{
u_char *p, *m;
-
+
p = (u_char *)font->data;
m = p + font->stride * font->numchars * font->fontheight;
- for (; p < m; p++)
+ for (; p < m; p++)
*p = reverse[*p];
}
@@ -239,24 +239,24 @@ wsfont_revbyte(font)
{
int x, l, r, nr;
u_char *rp;
-
+
if (font->stride == 1)
return;
rp = (u_char *)font->data;
nr = font->numchars * font->fontheight;
-
+
while (nr--) {
l = 0;
r = font->stride - 1;
-
+
while (l < r) {
x = rp[l];
rp[l] = rp[r];
rp[r] = x;
l++, r--;
}
-
+
rp += font->stride;
}
}
@@ -273,14 +273,14 @@ wsfont_enum(cb)
struct wsdisplay_font *f;
struct font *ent;
int s;
-
+
s = splhigh();
-
+
for (ent = list; ent; ent = ent->next) {
- f = ent->font;
+ f = ent->font;
cb(f->name, f->fontwidth, f->fontheight, f->stride);
}
-
+
splx(s);
}
@@ -362,7 +362,7 @@ wsfont_rotate(int cookie)
if (font == NULL)
return (-1);
- ncookie = wsfont_find(font->name, font->fontwidth, font->fontheight,
+ ncookie = wsfont_find(font->name, font->fontwidth, font->fontheight,
font->stride);
return (ncookie);
@@ -378,11 +378,11 @@ wsfont_init(void)
{
static int again;
int i;
-
+
if (again != 0)
return;
again = 1;
-
+
for (i = 0; builtin_fonts[i].font != NULL; i++) {
builtin_fonts[i].next = list;
list = &builtin_fonts[i];
@@ -397,11 +397,11 @@ wsfont_find0(cookie)
int cookie;
{
struct font *ent;
-
+
for (ent = list; ent != NULL; ent = ent->next)
if (ent->cookie == cookie)
return (ent);
-
+
return (NULL);
}
@@ -415,9 +415,9 @@ wsfont_find(name, width, height, stride)
{
struct font *ent;
int s;
-
+
s = splhigh();
-
+
for (ent = list; ent != NULL; ent = ent->next) {
if (height != 0 && ent->font->fontheight != height)
continue;
@@ -427,7 +427,7 @@ wsfont_find(name, width, height, stride)
if (stride != 0 && ent->font->stride != stride)
continue;
-
+
if (name != NULL && strcmp(ent->font->name, name) != 0)
continue;
@@ -451,24 +451,24 @@ wsfont_add(font, copy)
struct font *ent;
size_t size;
int s;
-
+
s = splhigh();
-
+
/* Don't allow exact duplicates */
- if (wsfont_find(font->name, font->fontwidth, font->fontheight,
+ if (wsfont_find(font->name, font->fontwidth, font->fontheight,
font->stride) >= 0) {
splx(s);
return (-1);
}
-
+
ent = (struct font *)malloc(sizeof *ent, M_DEVBUF, M_WAITOK);
-
+
ent->lockcount = 0;
ent->flg = 0;
ent->cookie = cookiegen++;
ent->next = list;
ent->prev = NULL;
-
+
/* Is this font statically allocated? */
if (!copy) {
ent->font = font;
@@ -478,7 +478,7 @@ wsfont_add(font, copy)
M_DEVBUF, M_WAITOK);
memcpy(ent->font, font, sizeof(*ent->font));
-
+
size = font->fontheight * font->numchars * font->stride;
ent->font->data = (void *)malloc(size, M_DEVBUF, M_WAITOK);
memcpy(ent->font->data, font->data, size);
@@ -487,7 +487,7 @@ wsfont_add(font, copy)
/* Now link into the list and return */
list = ent;
- splx(s);
+ splx(s);
return (0);
}
@@ -501,34 +501,34 @@ wsfont_remove(cookie)
{
struct font *ent;
int s;
-
+
s = splhigh();
if ((ent = wsfont_find0(cookie)) == NULL) {
splx(s);
return (-1);
}
-
+
if ((ent->flg & WSFONT_BUILTIN) != 0 || ent->lockcount != 0) {
splx(s);
return (-1);
}
-
+
/* Don't free statically allocated font data */
if ((ent->flg & WSFONT_STATIC) != 0) {
free(ent->font->data, M_DEVBUF);
free(ent->font, M_DEVBUF);
}
-
- /* Remove from list, free entry */
+
+ /* Remove from list, free entry */
if (ent->prev)
ent->prev->next = ent->next;
else
list = ent->next;
-
+
if (ent->next)
- ent->next->prev = ent->prev;
-
+ ent->next->prev = ent->prev;
+
free(ent, M_DEVBUF);
splx(s);
return (0);
@@ -537,7 +537,7 @@ wsfont_remove(cookie)
/*
* Lock a given font and return new lockcount. This fails if the cookie
- * is invalid, or if the font is already locked and the bit/byte order
+ * is invalid, or if the font is already locked and the bit/byte order
* requested by the caller differs.
*/
int
@@ -548,9 +548,9 @@ wsfont_lock(cookie, ptr, bitorder, byteorder)
{
struct font *ent;
int s, lc;
-
+
s = splhigh();
-
+
if ((ent = wsfont_find0(cookie)) != NULL) {
if (bitorder && bitorder != ent->font->bitorder) {
#if !defined(SMALL_KERNEL) || defined(__alpha__)
@@ -579,12 +579,12 @@ wsfont_lock(cookie, ptr, bitorder, byteorder)
return (-1);
#endif
}
-
+
lc = ++ent->lockcount;
*ptr = ent->font;
} else
lc = -1;
-
+
splx(s);
return (lc);
}
@@ -598,14 +598,14 @@ wsfont_getflg(cookie, flg, lc)
{
struct font *ent;
int s;
-
+
s = splhigh();
-
+
if ((ent = wsfont_find0(cookie)) != NULL) {
*flg = ent->flg;
*lc = ent->lockcount;
}
-
+
splx(s);
return (ent != NULL ? 0 : -1);
}
@@ -619,16 +619,16 @@ wsfont_unlock(cookie)
{
struct font *ent;
int s, lc;
-
+
s = splhigh();
-
+
if ((ent = wsfont_find0(cookie)) != NULL) {
if (ent->lockcount == 0)
panic("wsfont_unlock: font not locked");
lc = --ent->lockcount;
- } else
+ } else
lc = -1;
-
+
splx(s);
return (lc);
}
diff --git a/sys/dev/wsfont/wsfont.h b/sys/dev/wsfont/wsfont.h
index ddd28e5b3f1..0cb185bf6fb 100644
--- a/sys/dev/wsfont/wsfont.h
+++ b/sys/dev/wsfont/wsfont.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: wsfont.h,v 1.5 2008/06/26 05:42:20 ray Exp $ */
-/* $NetBSD: wsfont.h,v 1.12 2000/06/13 13:37:07 ad Exp $ */
+/* $OpenBSD: wsfont.h,v 1.6 2012/01/06 14:55:38 shadchin Exp $ */
+/* $NetBSD: wsfont.h,v 1.12 2000/06/13 13:37:07 ad Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
* don't care about that aspect of the font. It returns a cookie which
* we can use with the other functions. When more flexibility is required,
* wsfont_enum() should be used. The last two parameters to wsfont_lock()
- * are the bit order and byte order required (WSDISPLAY_FONTORDER_L2R or
+ * are the bit order and byte order required (WSDISPLAY_FONTORDER_L2R or
* WSDISPLAY_FONTORDER_R2L).
*
* Example: