XFree86 4.3.0.1

This commit is contained in:
Kaleb Keithley 2003-11-14 16:49:22 +00:00
commit d568221710
438 changed files with 42562 additions and 37394 deletions

View file

@ -1,10 +1,10 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/etc/kbd_mode.c,v 3.5 1996/12/23 06:47:13 dawes Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/etc/kbd_mode.c,v 3.6 1998/07/26 09:56:17 dawes Exp $ */
/* Keyboard mode control program for 386BSD */
/* $Xorg: kbd_mode.c,v 1.3 2000/08/17 19:51:09 cpqbld Exp $ */
/* $XConsortium: kbd_mode.c /main/7 1996/03/11 10:46:12 kaleb $ */
#include <sys/types.h>
#include <fcntl.h>
@ -20,6 +20,7 @@
#include "scrnintstr.h"
#include "xf86.h"
#include "xf86Priv.h"
#include "xf86_OSlib.h"
static int fd;

View file

@ -1,5 +1,5 @@
.\" $XFree86: xc/programs/Xserver/hw/xfree86/etc/kbd_mode.man,v 3.2 1996/12/23 06:47:14 dawes Exp $
.TH KBD_MODE 1 "Release 6.3 (XFree86 3.2)" "X Version 11"
.\" $XFree86: xc/programs/Xserver/hw/xfree86/etc/kbd_mode.man,v 3.5 2001/01/27 18:20:56 dawes Exp $
.TH KBD_MODE 1 __vendorversion__
.SH NAME
kbd_mode \- recover the PC console keyboard
.SH SYNOPSIS
@ -33,4 +33,4 @@ reset it typing:
kbd_mode -u
.sp
.\" $Xorg: kbd_mode.man,v 1.3 2000/08/17 19:51:10 cpqbld Exp $
.\" $TOG: kbd_mode.man /main/6 1997/07/19 10:37:14 kaleb $

View file

@ -27,10 +27,11 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
/* $XFree86: xc/programs/Xserver/hw/sun/kbd_mode.c,v 3.11 2002/10/23 16:23:36 tsi Exp $ */
#ifndef lint
/*
static char sccsid[] = "@(#)kbd_mode.c 7.1 87/04/13";
#endif
*/
/*
* Copyright 1986 by Sun Microsystems, Inc.
@ -41,7 +42,7 @@ static char sccsid[] = "@(#)kbd_mode.c 7.1 87/04/13";
#include <sys/types.h>
#include <sys/file.h>
#include <sys/ioctl.h>
#if defined(SVR4) || defined(__bsdi_)
#if defined(SVR4) || defined(__bsdi__)
#include <fcntl.h>
#ifndef __bsdi__
#include <sys/kbio.h>
@ -61,15 +62,18 @@ static char sccsid[] = "@(#)kbd_mode.c 7.1 87/04/13";
#endif
#endif
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
static void die(), usage();
static int kbd_fd;
int
main(argc, argv)
int argc;
char** argv;
{
int code, translate, direct = -1;
int code = 0, translate, direct = -1;
char led;
int click;

View file

@ -23,7 +23,10 @@
.\" not be used in advertising or otherwise to promote the sale, use or
.\" other dealings in this Software without prior written authorization
.\" from The Open Group.
.TH KBD_MODE 1 "Release 6.4" "X Version 11"
.\"
.\" $XFree86: xc/programs/Xserver/hw/sun/kbd_mode.man,v 1.7 2001/12/14 19:59:42 dawes Exp $
.\"
.TH KBD_MODE 1 __xorgversion__
.SH NAME
kbd_mode \- recover the Sun console keyboard
.SH SYNOPSIS

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,10 +1,10 @@
/* $Xorg: cards.c,v 1.3 2000/08/17 19:53:05 cpqbld Exp $ */
/* $XConsortium: cards.c /main/9 1996/10/19 18:15:32 kaleb $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/xf86config/cards.c,v 3.11.2.1 1998/01/18 10:35:45 hohndel Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/xf86config/cards.c,v 3.17 2002/05/31 18:46:04 dawes Exp $ */
/*
* Functions to manipulate card database.
@ -22,6 +22,7 @@
* NAME <name of card>
* CHIPSET <chipset description>
* SERVER <server name>
* DRIVER <driver name>
*
* Optional keywords:
* RAMDAC <ramdac identifier>
@ -47,16 +48,13 @@ int lastcard;
Card card[MAX_CARDS];
void sort_database();
static int getline(f, l)
FILE *f;
char *l;
static int
getnextline(FILE *f, char *l)
{
if (fgets(l, 128, f) == NULL)
return -1;
#ifdef __EMX__
#ifdef __UNIXOS2__
{
char *p = strchr(l,'\r');
if (p) {
@ -68,9 +66,8 @@ char *l;
return 0;
}
static void appendstring(destp, src)
char **destp;
char *src;
static void
appendstring(char **destp, char *src)
{
char *newstr;
newstr = malloc(strlen(*destp) + strlen(src) + 1);
@ -81,7 +78,8 @@ static void appendstring(destp, src)
*destp = newstr;
}
int lookupcard( char *name ) {
int
lookupcard(char *name) {
int i;
for (i = 0; i <= lastcard; i++)
if (strcmp(name, card[i].name) == 0)
@ -109,7 +107,7 @@ int parse_database() {
int i, lineno;
char filename[128];
#ifndef __EMX__
#ifndef __UNIXOS2__
strcpy(filename, CARD_DATABASE_FILE);
#else
strcpy(filename, (char*)__XOS2RedirRoot(CARD_DATABASE_FILE));
@ -122,7 +120,7 @@ int parse_database() {
lineno = 0;
for (;;) {
if (getline(f, buf))
if (getnextline(f, buf))
break;
lineno++;
if (buf[0] == '#')
@ -133,7 +131,6 @@ int parse_database() {
break;
if (strncmp(buf, "LINE", 4) == 0 && lastcard>=0) {
/* Line of Device comment. */
char *lines;
/* Append to existing lines. */
appendstring(&card[lastcard].lines, buf + 5);
continue;
@ -158,7 +155,9 @@ int parse_database() {
card[lastcard].name = malloc(strlen(buf + 5) + 1);
strcpy(card[lastcard].name, buf + 5);
card[lastcard].chipset = NULL;
card[lastcard].ramdac = NULL;
card[lastcard].server = NULL;
card[lastcard].driver = NULL;
card[lastcard].ramdac = NULL;
card[lastcard].clockchip = NULL;
card[lastcard].dacspeed = NULL;
card[lastcard].flags = 0;
@ -182,6 +181,8 @@ int parse_database() {
card[lastcard].chipset = card[i].chipset;
if (card[lastcard].server == NULL)
card[lastcard].server = card[i].server;
if (card[lastcard].driver == NULL)
card[lastcard].driver = card[i].driver;
if (card[lastcard].ramdac == NULL)
card[lastcard].ramdac = card[i].ramdac;
if (card[lastcard].clockchip == NULL)
@ -204,6 +205,12 @@ int parse_database() {
strcpy(card[lastcard].server, buf + 7);
continue;
}
if (strncmp(buf, "DRIVER", 6) == 0) {
/* Driver identifier. */
card[lastcard].driver = malloc(strlen(buf + 7) + 1);
strcpy(card[lastcard].driver, buf + 7);
continue;
}
if (strncmp(buf, "RAMDAC", 6) == 0) {
/* Ramdac indentifier. */
card[lastcard].ramdac = malloc(strlen(buf + 7) + 1);
@ -232,12 +239,12 @@ int parse_database() {
continue;
}
/* test for missing required fields */
if (card[lastcard].server == NULL) {
fprintf(stderr, "Warning SERVER specification missing "
if (card[lastcard].driver == NULL) {
fprintf(stderr, "Warning DRIVER specification missing "
"in Card database entry %s (line %d).\n",
card[lastcard].name, lineno);
keypress();
card[lastcard].server = "unknown";
card[lastcard].driver = "unknown";
}
if (card[lastcard].chipset == NULL) {
fprintf(stderr, "Warning CHIPSET specification missing "
@ -266,20 +273,14 @@ int parse_database() {
return 0;
}
#ifdef __STDC__
#define CONST const
#else
#define CONST
#endif
static int compare_card(e1, e2)
CONST void *e1;
CONST void *e2;
static int
compare_card(const void *e1, const void *e2)
{
return strcmp(((Card *)e1)->name, ((Card *)e2)->name);
}
void sort_database() {
void
sort_database() {
/* Each element is a bunch of words, but nothing too bad. */
qsort(card, lastcard + 1, sizeof(Card), compare_card);
}

View file

@ -1,10 +1,10 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/xf86config/cards.h,v 3.3 1996/12/23 07:04:44 dawes Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/xf86config/cards.h,v 3.5 1999/07/05 12:12:06 dawes Exp $ */
/* $Xorg: cards.h,v 1.3 2000/08/17 19:53:05 cpqbld Exp $ */
/* $XConsortium: cards.h /main/3 1996/02/21 18:12:53 kaleb $ */
#ifndef CARD_DATABASE_FILE
#define CARD_DATABASE_FILE "Cards"
@ -16,7 +16,8 @@ typedef struct {
char *name; /* Name of the card. */
char *chipset; /* Chipset (decriptive). */
char *server; /* Server identifier. */
char *ramdac; /* Ramdac identifier. */
char *driver; /* Driver identifier. */
char *ramdac; /* Ramdac identifier. */
char *clockchip; /* Clockchip identifier. */
char *dacspeed; /* DAC speed rating. */
int flags;
@ -31,6 +32,7 @@ extern int lastcard;
extern Card card[MAX_CARDS];
int parse_database();
extern int lookupcard ( char *name );
extern int parse_database ( void );
extern void sort_database ( void );
extern void keypress ( void );