Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/qbus Copied from ../../arch/vax/uba/qfont.c, v



details:   https://anonhg.NetBSD.org/src/rev/a15716ae324b
branches:  trunk
changeset: 473884:a15716ae324b
user:      ragge <ragge%NetBSD.org@localhost>
date:      Sun Jun 20 17:55:12 1999 +0000

description:
Copied from ../../arch/vax/uba/qfont.c,v

diffstat:

 sys/dev/qbus/qfont.c |  3293 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 3293 insertions(+), 0 deletions(-)

diffs (truncated from 3297 to 300 lines):

diff -r 5e4b6855d48b -r a15716ae324b sys/dev/qbus/qfont.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/dev/qbus/qfont.c      Sun Jun 20 17:55:12 1999 +0000
@@ -0,0 +1,3293 @@
+/*     $NetBSD: qfont.c,v 1.3 1999/06/20 17:55:12 ragge Exp $  */
+/*-
+ * Copyright (c) 1982, 1986
+ *     The Regents of the University of California.  All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the University of
+ *     California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *     @(#)qfont.c     7.2 (Berkeley) 1/21/94
+ */
+
+/*
+ *     derived from:  "@(#)qfont.c     6.2     ULTRIX  2/4/88"
+ */
+
+/************************************************************************
+ *                                                                     *
+ *                     Copyright (c) 1984, 1987 by                     *
+ *             Digital Equipment Corporation, Maynard, MA              *
+ *                     All rights reserved.                            *
+ *                                                                     *
+ *   This software is furnished under a license and may be used and    *
+ *   copied  only  in accordance with the terms of such license and    *
+ *   with the  inclusion  of  the  above  copyright  notice.   This    *
+ *   software  or  any  other copies thereof may not be provided or    *
+ *   otherwise made available to any other person.  No title to and    *
+ *   ownership of the software is hereby transferred.                  *
+ *                                                                     *
+ *   This software is  derived  from  software  received  from  the    *
+ *   University    of   California,   Berkeley,   and   from   Bell    *
+ *   Laboratories.  Use, duplication, or disclosure is  subject  to    *
+ *   restrictions  under  license  agreements  with  University  of    *
+ *   California and with AT&T.                                         *
+ *                                                                     *
+ *   The information in this software is subject to change  without    *
+ *   notice  and should not be construed as a commitment by Digital    *
+ *   Equipment Corporation.                                            *
+ *                                                                     *
+ *   Digital assumes no responsibility for the use  or  reliability    *
+ *   of its software on equipment which is not supplied by Digital.    *
+ *                                                                     *
+ ************************************************************************/
+
+/*
+ * The following tables are used to translate LK201 key strokes
+ * into ascii characters. The tables also support the special
+ * function keys.
+ */
+
+unsigned short q_key[]={
+        0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /*   0 */
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /*   8 */
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /*  16 */
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /*  24 */
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /*  32 */
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /*  40 */ 
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /*  48 */
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /*  56 */ 
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /*  64 */
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /*  72 */ 
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x101 ,0x102 /*  80 */
+       ,0x103 ,0x104 ,0x105 ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /*  88 */ 
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x106 ,0x107 ,0x108 ,0x109 /*  96 */
+       ,0x10a ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /* 104 */ 
+       ,0x00  ,0x1b  ,0x08  ,0x0a  ,0x10b ,0x00  ,0x00  ,0x00  /* 112 */
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x10c ,0x10d ,0x00  ,0x00  /* 120 */
+       ,0x10e ,0x10f ,0x110 ,0x111 ,0x00  ,0x00  ,0x00  ,0x00  /* 128 */
+       ,0x00  ,0x00  ,0x112 ,0x113 ,0x114 ,0x115 ,0x116 ,0x117 /* 136 */
+       ,0x00  ,0x00  ,0x120 ,0x00  ,0x121 ,0x122 ,0x123 ,0x124 /* 144 */
+       ,0x125 ,0x126 ,0x127 ,0x128 ,0x129 ,0x12a ,0x12b ,0x12c /* 152 */
+       ,0x12d ,0x118 ,0x119 ,0x11a ,0x11b ,0x00  ,0x00  ,0x11c /* 160 */
+       ,0x11d ,0x11e ,0x11f ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /* 168 */
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /* 176 */
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x7f  ,'\r'  ,0x09  ,'`'   /* 184 */
+       ,'1'   ,'q'   ,'a'   ,'z'   ,0x00  ,'2'   ,'w'   ,'s'   /* 192 */
+       ,'x'   ,'<'   ,0x00  ,'3'   ,'e'   ,'d'   ,'c'   ,0x00  /* 200 */
+       ,'4'   ,'r'   ,'f'   ,'v'   ,' '   ,0x00  ,'5'   ,'t'   /* 208 */
+       ,'g'   ,'b'   ,0x00  ,'6'   ,'y'   ,'h'   ,'n'   ,0x00  /* 216 */
+       ,'7'   ,'u'   ,'j'   ,'m'   ,0x00  ,'8'   ,'i'   ,'k'   /* 224 */
+       ,','   ,0x00  ,'9'   ,'o'   ,'l'   ,'.'   ,0x00  ,'0'   /* 232 */
+       ,'p'   ,0x00  ,';'   ,'/'   ,0x00  ,'='   ,']'   ,'\\'  /* 240 */
+       ,0x00  ,'-'   ,'['   ,'\''  ,0x00  ,0x00  ,0x00  ,0x00  /* 248 */
+};
+
+unsigned short q_shift_key[]={
+        0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /*   0 */
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /*   8 */
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /*  16 */
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /*  24 */
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /*  32 */
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /*  40 */ 
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /*  48 */
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /*  56 */ 
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /*  64 */
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /*  72 */ 
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x101 ,0x102 /*  80 */
+       ,0x103 ,0x104 ,0x105 ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /*  88 */ 
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x106 ,0x107 ,0x108 ,0x109 /*  96 */
+       ,0x10a ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /* 104 */ 
+       ,0x00  ,0x1b  ,0x08  ,0x0a  ,0x10b ,0x00  ,0x00  ,0x00  /* 112 */
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x10c ,0x10d ,0x00  ,0x00  /* 120 */
+       ,0x10e ,0x10f ,0x110 ,0x111 ,0x00  ,0x00  ,0x00  ,0x00  /* 128 */
+       ,0x00  ,0x00  ,0x112 ,0x113 ,0x114 ,0x115 ,0x116 ,0x117 /* 136 */
+       ,0x00  ,0x00  ,0x120 ,0x00  ,0x121 ,0x122 ,0x123 ,0x124 /* 144 */
+       ,0x125 ,0x126 ,0x127 ,0x128 ,0x129 ,0x12a ,0x12b ,0x12c /* 152 */
+       ,0x12d ,0x118 ,0x119 ,0x11a ,0x11b ,0x00  ,0x00  ,0x11c /* 160 */
+       ,0x11d ,0x11e ,0x11f ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /* 168 */
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  ,0x00  /* 176 */
+       ,0x00  ,0x00  ,0x00  ,0x00  ,0x7f  ,'\r'  ,0x09  ,'~'   /* 184 */
+       ,'!'   ,'Q'   ,'A'   ,'Z'   ,0x00  ,'@'   ,'W'   ,'S'   /* 192 */
+       ,'X'   ,'>'   ,0x00  ,'#'   ,'E'   ,'D'   ,'C'   ,0x00  /* 200 */
+       ,'$'   ,'R'   ,'F'   ,'V'   ,' '   ,0x00  ,'%'   ,'T'   /* 208 */
+       ,'G'   ,'B'   ,0x00  ,'^'   ,'Y'   ,'H'   ,'N'   ,0x00  /* 216 */
+       ,'&'   ,'U'   ,'J'   ,'M'   ,0x00  ,'*'   ,'I'   ,'K'   /* 224 */
+       ,','   ,0x00  ,'('   ,'O'   ,'L'   ,'.'   ,0x00  ,')'   /* 232 */
+       ,'P'   ,0x00  ,':'   ,'?'   ,0x00  ,'+'   ,'}'   ,'|'   /* 240 */
+       ,0x00  ,'_'   ,'{'   ,'"'   ,0x00  ,0x00  ,0x00  ,0x00  /* 248 */
+};
+
+/*
+ * LK201 special purpose keys. Translations from the tables above
+ * includes codes for the function keys and other goodies. They can
+ * be determined by the presence of the 8th bit being set.  The 
+ * following table is accessed by removing that bit and using the 
+ * result as the index to the following table. Note that table begins
+ * a null entry.
+ */
+char   *q_special[]={ 0,
+       "\33[11~",                      /* f1 */
+       "\33[12~",                      /* f2 */
+       "\33[13~",                      /* f3 */
+       "\33[14~",                      /* f4 */
+       "\33[15~",                      /* f5 */
+       "\33[17~",                      /* f6 */
+       "\33[18~",                      /* f7 */
+       "\33[19~",                      /* f8 */
+       "\33[20~",                      /* f9 */
+       "\33[21~",                      /* f10 */
+       "\33[26~",                      /* f14 */
+       "\33[28~",                      /* f15 */
+       "\33[29~",                      /* f16 */
+       "\33[31~",                      /* f17 */
+       "\33[32~",                      /* f18 */
+       "\33[33~",                      /* f19 */
+       "\33[34~",                      /* f20 */
+       "\33[1~",                       /* find */
+       "\33[2~",                       /* insert */
+       "\33[3~",                       /* remove */
+       "\33[4~",                       /* select */
+       "\33[5~",                       /* prev */
+       "\33[6~",                       /* next */
+       "\33OP",                        /* pf1 */
+       "\33OQ",                        /* pf2 */
+       "\33OR",                        /* pf3 */
+       "\33OS",                        /* pf4 */
+       "\33[D",                        /* left */
+       "\33[C",                        /* right */
+       "\33[B",                        /* down */
+       "\33[A",                        /* up */
+       "\33Op",                        /* key pad 0 */
+       "\33On",                        /* key pad . */
+       "\33OM",                        /* key pad enter */
+       "\33Oq",                        /* key pad 1 */
+       "\33Or",                        /* key pad 2 */
+       "\33Os",                        /* key pad 3 */
+       "\33Ot",                        /* key pad 4 */
+       "\33Ou",                        /* key pad 5 */
+       "\33Ov",                        /* key pad 6 */
+       "\33O/*",                       /* key pad , */
+       "\33Ow",                        /* key pad 7 */
+       "\33Ox",                        /* key pad 8 */
+       "\33Oy",                        /* key pad 9 */
+       "\33Om",                        /* key pad - */
+       /*
+        * The following strings are to allow a numeric keypad
+        * mode and still use the same translation tables
+        */
+       "0",
+       ".",
+       "\r",
+       "1",
+       "2",
+       "3",
+       "4",
+       "5",
+       "6",
+       ",",
+       "7",
+       "8",
+       "9",
+       "-"
+};
+
+
+/*
+ * QVSS font table of displayable characters.
+ */
+char  q_font[]={
+       0x00, /* 0x00000000        */
+       0x00, /* 0x00000000        */
+       0x00, /* 0x00000000        */
+       0x00, /* 0x00000000        */
+       0x00, /* 0x00000000        */
+       0x00, /* 0x00000000        */
+       0x00, /* 0x00000000        */
+       0x00, /* 0x00000000        */
+       0x00, /* 0x00000000        */
+       0x00, /* 0x00000000        */
+       0x00, /* 0x00000000        */
+       0x00, /* 0x00000000        */
+       0x00, /* 0x00000000        */
+       0x00, /* 0x00000000        */
+       0x00, /* 0x00000000        */
+/* */
+       0x00, /* 0x00000000       ! */
+       0x00, /* 0x00000000       ! */
+       0x08, /* 0x00001000       ! */
+       0x08, /* 0x00001000       ! */
+       0x08, /* 0x00001000       ! */
+       0x08, /* 0x00001000       ! */
+       0x08, /* 0x00001000       ! */
+       0x08, /* 0x00001000       ! */
+       0x08, /* 0x00001000       ! */
+       0x08, /* 0x00001000       ! */
+       0x00, /* 0x00000000       ! */
+       0x08, /* 0x00001000       ! */
+       0x00, /* 0x00000000       ! */
+       0x00, /* 0x00000000       ! */
+       0x00, /* 0x00000000       ! */
+/* */
+       0x00, /* 0x00000000       " */
+       0x00, /* 0x00000000       " */
+       0x24, /* 0x00100100       " */
+       0x24, /* 0x00100100       " */
+       0x24, /* 0x00100100       " */
+       0x00, /* 0x00000000       " */
+       0x00, /* 0x00000000       " */
+       0x00, /* 0x00000000       " */
+       0x00, /* 0x00000000       " */
+       0x00, /* 0x00000000       " */
+       0x00, /* 0x00000000       " */
+       0x00, /* 0x00000000       " */
+       0x00, /* 0x00000000       " */
+       0x00, /* 0x00000000       " */
+       0x00, /* 0x00000000       " */
+/* */
+       0x00, /* 0x00000000       # */
+       0x00, /* 0x00000000       # */
+       0x00, /* 0x00000000       # */
+       0x12, /* 0x00010010       # */
+       0x12, /* 0x00010010       # */
+       0x3f, /* 0x00111111       # */
+       0x12, /* 0x00010010       # */
+       0x12, /* 0x00010010       # */
+       0x3f, /* 0x00111111       # */
+       0x12, /* 0x00010010       # */
+       0x12, /* 0x00010010       # */
+       0x00, /* 0x00000000       # */
+       0x00, /* 0x00000000       # */
+       0x00, /* 0x00000000       # */
+       0x00, /* 0x00000000       # */
+/* */
+       0x00, /* 0x00000000       $ */
+       0x00, /* 0x00000000       $ */
+       0x00, /* 0x00000000       $ */
+       0x08, /* 0x00001000       $ */



Home | Main Index | Thread Index | Old Index