]> git.sesse.net Git - rdpsrv/blob - Xserver/lib/font/Speedo/sperr.c
Support RDP5 logon packets.
[rdpsrv] / Xserver / lib / font / Speedo / sperr.c
1 /* $XConsortium: sperr.c,v 1.6 94/04/17 20:17:47 dpw Exp $ */
2 /*
3  * Copyright 1990, 1991 Network Computing Devices;
4  * Portions Copyright 1987 by Digital Equipment Corporation
5  *
6  * Permission to use, copy, modify, distribute, and sell this software and its
7  * documentation for any purpose is hereby granted without fee, provided that
8  * the above copyright notice appear in all copies and that both that
9  * copyright notice and this permission notice appear in supporting
10  * documentation, and that the names of M.I.T., Network Computing Devices,
11  * or Digital not be used in advertising or
12  * publicity pertaining to distribution of the software without specific,
13  * written prior permission.  M.I.T. Network Computing Devices, or Digital
14  * make no representations about the
15  * suitability of this software for any purpose.  It is provided "as is"
16  * without express or implied warranty.
17  *
18  * NETWORK COMPUTING DEVICES, DIGITAL AND MIT DISCLAIM ALL WARRANTIES WITH
19  * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
20  * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, DIGITAL OR MIT BE
21  * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
22  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
23  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
24  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
25  *
26  */
27
28 /*
29
30 Copyright (c) 1994  X Consortium
31
32 Permission is hereby granted, free of charge, to any person obtaining
33 a copy of this software and associated documentation files (the
34 "Software"), to deal in the Software without restriction, including
35 without limitation the rights to use, copy, modify, merge, publish,
36 distribute, sublicense, and/or sell copies of the Software, and to
37 permit persons to whom the Software is furnished to do so, subject to
38 the following conditions:
39
40 The above copyright notice and this permission notice shall be included
41 in all copies or substantial portions of the Software.
42
43 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
44 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
45 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
46 IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
47 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
48 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
49 OTHER DEALINGS IN THE SOFTWARE.
50
51 Except as contained in this notice, the name of the X Consortium shall
52 not be used in advertising or otherwise to promote the sale, use or
53 other dealings in this Software without prior written authorization
54 from the X Consortium.
55
56 */
57 #include        "spint.h"
58
59 #if NeedVarargsPrototypes
60 #include <stdarg.h>
61
62 void
63 SpeedoErr(char *str, ...)
64 {
65     va_list v;
66     int a1;
67
68     va_start(v, str);
69     ErrorF("Speedo: ");
70     a1 = va_arg(v, int);
71     ErrorF(str, a1);
72     va_end(v);
73 }
74
75 #else
76
77 /* VARARGS1 */
78 void
79 SpeedoErr(str, a1)
80     char       *str;
81     char       *a1;
82 {
83     ErrorF("Speedo: ");
84     ErrorF(str, a1);
85 }
86 #endif /* NeedVarargsPrototypes else */
87
88
89 /*
90  * Called by Speedo character generator to report an error.
91  *
92  *  Since character data not available is one of those errors
93  *  that happens many times, don't report it to user
94  */
95 void
96 sp_report_error(n)
97     fix15       n;
98 {
99     switch (n) {
100     case 1:
101         SpeedoErr("Insufficient font data loaded\n");
102         break;
103     case 3:
104         SpeedoErr("Transformation matrix out of range\n");
105         break;
106     case 4:
107         SpeedoErr("Font format error\n");
108         break;
109     case 5:
110         SpeedoErr("Requested specs not compatible with output module\n");
111         break;
112     case 7:
113         SpeedoErr("Intelligent transformation requested but not supported\n");
114         break;
115     case 8:
116         SpeedoErr("Unsupported output mode requested\n");
117         break;
118     case 9:
119         SpeedoErr("Extended font loaded but only compact fonts supported\n");
120         break;
121     case 10:
122         SpeedoErr("Font specs not set prior to use of font\n");
123         break;
124     case 12:
125         break;
126     case 13:
127         SpeedoErr("Track kerning data not available()\n");
128         break;
129     case 14:
130         SpeedoErr("Pair kerning data not available()\n");
131         break;
132     default:
133         SpeedoErr("report_error(%d)\n", n);
134         break;
135     }
136 }