- b_dolata@compfort.pl sent in this patch to fix a problem Christophe

described in bug [ #538214 ] directory as keymap file
This commit is contained in:
Bryce Denney 2002-04-03 21:07:14 +00:00
parent 8cfa8a3bba
commit 767ac9b2dc

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: keymap.cc,v 1.6 2002-04-01 22:43:01 cbothamy Exp $
// $Id: keymap.cc,v 1.7 2002-04-03 21:07:14 bdenney Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2002 MandrakeSoft S.A.
@ -201,9 +201,18 @@ bx_keymap_c::loadKeymap(Bit32u stringToSymbol(const char*), const char* filename
{
FILE *keymapFile;
char line[256], c, *p;
char baseSym[256], modSym[256], xwinSym[256];
char baseSym[256], modSym[256], xwinSym[256];
Bit32s ascii;
Bit32u baseKey, modKey, xwinKey;
struct stat status;
if (stat(filename, &status)) {
BX_PANIC(("Can not stat keymap file '%s'.",filename));
}
if (!(S_ISREG(status.st_mode))) {
BX_PANIC(("Keymap file '%s' is not a file",filename));
}
if((keymapFile = fopen(filename,"r"))==NULL) {
BX_PANIC(("Can not open keymap file '%s'.",filename));