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*)
CPP_NAME="cpp %d %i %o"
;;
*qnx*)
CPP_NAME="gcc -E -x c++ %d -o %o %i"
;;
*bsd*)
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"

View File

@ -287,7 +287,7 @@ PLUGIN_INFO(cd, sdl)
plugin_info.type = qfp_cd;
plugin_info.api_version = QFPLUGIN_VERSION;
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"
"Please see the file \"AUTHORS\" for a list of contributors\n";
plugin_info.functions = &plugin_info_funcs;

View File

@ -505,7 +505,7 @@ PLUGIN_INFO(cd, win)
plugin_info.type = qfp_cd;
plugin_info.api_version = QFPLUGIN_VERSION;
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"
"Please see the file \"AUTHORS\" for a list of contributors\n";
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,
"Sound Output Plugin to use");
#else
#ifndef __QNXNTO__
snd_output = Cvar_Get ("snd_output", "oss", CVAR_ROM, NULL,
"Sound Output Plugin to use");
#else
snd_output = Cvar_Get ("snd_output", "sdl", CVAR_ROM, NULL,
"Sound Output Plugin to use");
#endif
#endif
snd_render = Cvar_Get ("snd_render", "default", CVAR_ROM, NULL,
"Sound Renderer Plugin to use");

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -41,21 +41,11 @@ static __attribute__ ((unused)) const char rcsid[] =
# include <unistd.h>
#endif
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <signal.h>
#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>
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#else
# include <sys/fcntl.h>
#endif
#include "QF/cvar.h"
#include "QF/qargs.h"

View File

@ -43,7 +43,12 @@ static __attribute__ ((unused)) const char rcsid[] =
# include <io.h>
#endif
#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/cvar.h"

View File

@ -45,7 +45,13 @@ static __attribute__ ((unused)) const char rcsid[] =
#include <string.h>
#include <getopt.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 <fcntl.h>