static char *rcsid_util_c
= "$Header: util.c,v 10.2 86/02/01 16:21:36 tony Rel $";
* The Sun X drivers are a product of Sun Microsystems, Inc. and are provided
* for unrestricted use provided that this legend is included on all tape
* media and as a part of the software program in whole or part. Users
* may copy or modify these drivers without charge, but are not authorized
* to license or distribute them to anyone else except as part of a product or
* program developed by the user.
* THE SUN X DRIVERS ARE PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND
* INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A
* PARTICULAR PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE
* The Sun X Drivers are provided with no support and without any obligation
* on the part of Sun Microsystems, Inc. to assist in their use, correction,
* modification or enhancement.
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THE SUN X
* DRIVERS OR ANY PART THEREOF.
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
* or profits or other special, indirect and consequential damages, even if
* Sun has been advised of the possibility of such damages.
* Mountain View, California 94043
static char sccsid
[] = "@(#)util.c 2.1 86/01/28 Copyright 1986 Sun Micro";
* Copyright (c) 1986 by Sun Microsystems, Inc.
/* util.c Various utilities
* SoundBell Generate audible bell
* SetKeyClick Control key click
* SetAutoRepeat Control auto repeat
* SetLockLED Control Lock LED
* SetVideo Disable/enable video
* QueryShape Determine shapes
* ResolveColors does nothing
* StoreColors does nothing
/* Sound bell, volume between 0 (quiet) and 7 (loud) */
/* Set key click, volume between -1 (default), 0 (off) and 8 (loud) */
QueryShape (shape
, width
, height
)
/* Cursors & tiles unrestricted */
ResolveColor (red
, green
, blue
)
unsigned short *red
, *green
, *blue
;
StoreColors (count
, entries
)
/* XXX - should keep interal shadow of color map and rewrite whole */
extern struct pixrect
*PixRect
;
r
= (u_char
) (entries
->red
>>8);
g
= (u_char
) (entries
->green
>>8);
b
= (u_char
) (entries
->blue
>>8);
pr_putcolormap(PixRect
, entries
->pixel
, 1, &r
, &g
, &b
);
register unsigned short *p
;
register unsigned short l
= (*p
& 0xff), h
= (*p
>> 8)&0xff;
*p
= (unsigned short) ((InvPix
[l
] << 8) | InvPix
[h
]);