first chunk of Mike Gorchak's <mike@malva.ua> QNX patches

This commit is contained in:
Bill Currie 2004-01-20 05:57:39 +00:00
parent f097c2e206
commit 283d49bd8e
12 changed files with 75 additions and 21 deletions

View file

@ -117,6 +117,9 @@ else
*freebsd*) *freebsd*)
CPP_NAME="cpp %d %i %o" CPP_NAME="cpp %d %i %o"
;; ;;
*qnx*)
CPP_NAME="gcc -E -x c++ %d -o %o %i"
;;
*bsd*) *bsd*)
touch conftest.c touch conftest.c
CPP_NAME="`(f=\`$CC -v -E -Dfoo conftest.c -o conftest.i 2>&1 | grep -e -Dfoo\`; set $f; echo "$1")` %d %i %o" CPP_NAME="`(f=\`$CC -v -E -Dfoo conftest.c -o conftest.i 2>&1 | grep -e -Dfoo\`; set $f; echo "$1")` %d %i %o"

View file

@ -287,7 +287,7 @@ PLUGIN_INFO(cd, sdl)
plugin_info.type = qfp_cd; plugin_info.type = qfp_cd;
plugin_info.api_version = QFPLUGIN_VERSION; plugin_info.api_version = QFPLUGIN_VERSION;
plugin_info.plugin_version = "0.1"; plugin_info.plugin_version = "0.1";
plugin_info.description = "Linux CD Audio output" plugin_info.description = "SDL CD Audio output"
"Copyright (C) 2001 contributors of the QuakeForge project\n" "Copyright (C) 2001 contributors of the QuakeForge project\n"
"Please see the file \"AUTHORS\" for a list of contributors\n"; "Please see the file \"AUTHORS\" for a list of contributors\n";
plugin_info.functions = &plugin_info_funcs; plugin_info.functions = &plugin_info_funcs;

View file

@ -505,7 +505,7 @@ PLUGIN_INFO(cd, win)
plugin_info.type = qfp_cd; plugin_info.type = qfp_cd;
plugin_info.api_version = QFPLUGIN_VERSION; plugin_info.api_version = QFPLUGIN_VERSION;
plugin_info.plugin_version = "0.1"; plugin_info.plugin_version = "0.1";
plugin_info.description = "Linux CD Audio output" plugin_info.description = "Windows CD Audio output"
"Copyright (C) 2001 contributors of the QuakeForge project\n" "Copyright (C) 2001 contributors of the QuakeForge project\n"
"Please see the file \"AUTHORS\" for a list of contributors\n"; "Please see the file \"AUTHORS\" for a list of contributors\n";
plugin_info.functions = &plugin_info_funcs; plugin_info.functions = &plugin_info_funcs;

View file

@ -104,8 +104,13 @@ S_Init_Cvars (void)
snd_output = Cvar_Get ("snd_output", "dx", CVAR_ROM, NULL, snd_output = Cvar_Get ("snd_output", "dx", CVAR_ROM, NULL,
"Sound Output Plugin to use"); "Sound Output Plugin to use");
#else #else
#ifndef __QNXNTO__
snd_output = Cvar_Get ("snd_output", "oss", CVAR_ROM, NULL, snd_output = Cvar_Get ("snd_output", "oss", CVAR_ROM, NULL,
"Sound Output Plugin to use"); "Sound Output Plugin to use");
#else
snd_output = Cvar_Get ("snd_output", "sdl", CVAR_ROM, NULL,
"Sound Output Plugin to use");
#endif
#endif #endif
snd_render = Cvar_Get ("snd_render", "default", CVAR_ROM, NULL, snd_render = Cvar_Get ("snd_render", "default", CVAR_ROM, NULL,
"Sound Renderer Plugin to use"); "Sound Renderer Plugin to use");

View file

@ -41,6 +41,10 @@ static __attribute__ ((unused)) const char rcsid[] =
#include <stdarg.h> #include <stdarg.h>
#include <errno.h> #include <errno.h>
#ifdef __QNXNTO__
# include <locale.h>
#endif
#include "QF/cbuf.h" #include "QF/cbuf.h"
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/console.h" #include "QF/console.h"
@ -540,7 +544,18 @@ C_KeyEvent (knum_t key, short unicode, qboolean down)
} }
il = input_line; il = input_line;
} }
//FIXME should this translation be here?
if ((unicode==0x0A) && (key==QFK_RETURN)) {
Con_ProcessInputLine (il, key);
}
if ((unicode==0x7F) && (key==QFK_BACKSPACE)) {
Con_ProcessInputLine (il, key);
}
if (unicode!=0) {
Con_ProcessInputLine (il, key >= 256 ? (int) key : unicode); Con_ProcessInputLine (il, key >= 256 ? (int) key : unicode);
} else {
Con_ProcessInputLine (il, key);
}
} }
/* DRAWING */ /* DRAWING */
@ -798,6 +813,10 @@ C_Init (void)
{ {
view_t *view; view_t *view;
#ifdef __QNXNTO__
setlocale (LC_ALL, "C-TRADITIONAL");
#endif
Menu_Init (); Menu_Init ();
con_notifytime = Cvar_Get ("con_notifytime", "3", CVAR_NONE, NULL, con_notifytime = Cvar_Get ("con_notifytime", "3", CVAR_NONE, NULL,

View file

@ -34,10 +34,16 @@
static __attribute__ ((unused)) const char rcsid[] = static __attribute__ ((unused)) const char rcsid[] =
"$Id$"; "$Id$";
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#include <limits.h> #include <limits.h>
#include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>

View file

@ -83,6 +83,11 @@ VID_SetPalette (unsigned char *palette)
} }
} }
static void
do_screen_buffer (void)
{
}
void void
VID_Init (unsigned char *palette) VID_Init (unsigned char *palette)
{ {
@ -158,6 +163,7 @@ VID_Init (unsigned char *palette)
vid.conbuffer = vid.buffer; vid.conbuffer = vid.buffer;
vid.conrowbytes = vid.rowbytes; vid.conrowbytes = vid.rowbytes;
vid.direct = rendersurface->pixels; vid.direct = rendersurface->pixels;
vid.do_screen_buffer = do_screen_buffer;
VID_InitBuffers (); // allocate z buffer and surface cache VID_InitBuffers (); // allocate z buffer and surface cache

View file

@ -31,6 +31,13 @@
static __attribute__ ((unused)) const char rcsid[] = static __attribute__ ((unused)) const char rcsid[] =
"$Id$"; "$Id$";
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#include "QF/cbuf.h" #include "QF/cbuf.h"
#include "QF/idparse.h" #include "QF/idparse.h"
#include "QF/cmd.h" #include "QF/cmd.h"

View file

@ -31,6 +31,13 @@
static __attribute__ ((unused)) const char rcsid[] = static __attribute__ ((unused)) const char rcsid[] =
"$Id$"; "$Id$";
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#include "QF/cbuf.h" #include "QF/cbuf.h"
#include "QF/console.h" #include "QF/console.h"
#include "QF/cmd.h" #include "QF/cmd.h"

View file

@ -41,21 +41,11 @@ static __attribute__ ((unused)) const char rcsid[] =
# include <unistd.h> # include <unistd.h>
#endif #endif
#include <ctype.h> #ifdef HAVE_FCNTL_H
#include <errno.h> # include <fcntl.h>
#include <fcntl.h> #else
#include <limits.h> # include <sys/fcntl.h>
#include <signal.h> #endif
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/ipc.h>
#include <sys/mman.h>
#include <sys/shm.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/wait.h>
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/qargs.h" #include "QF/qargs.h"

View file

@ -43,7 +43,12 @@ static __attribute__ ((unused)) const char rcsid[] =
# include <io.h> # include <io.h>
#endif #endif
#include <sys/types.h> #include <sys/types.h>
#include <sys/fcntl.h>
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#else
# include <sys/fcntl.h>
#endif
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/cvar.h" #include "QF/cvar.h"

View file

@ -45,7 +45,13 @@ static __attribute__ ((unused)) const char rcsid[] =
#include <string.h> #include <string.h>
#include <getopt.h> #include <getopt.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/fcntl.h>
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#else
# include <sys/fcntl.h>
#endif
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>