From 33bfba86222efb6cc5b271b3e12b6cf3f38836c5 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Sun, 11 Feb 2018 15:34:30 -0500 Subject: Quake: attempt 2 Change-Id: I4285036e967d7f0722802d43cf2096c808ca5799 --- apps/plugins/sdl/progs/quake/sys_null.c | 232 ++++++++++++++++++++++++++++++++ 1 file changed, 232 insertions(+) create mode 100644 apps/plugins/sdl/progs/quake/sys_null.c (limited to 'apps/plugins/sdl/progs/quake/sys_null.c') diff --git a/apps/plugins/sdl/progs/quake/sys_null.c b/apps/plugins/sdl/progs/quake/sys_null.c new file mode 100644 index 0000000..057d61d --- /dev/null +++ b/apps/plugins/sdl/progs/quake/sys_null.c @@ -0,0 +1,232 @@ +/* +Copyright (C) 1996-1997 Id Software, Inc. + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +*/ +// sys_null.h -- null system driver to aid porting efforts + +#include "quakedef.h" +#include "errno.h" + +/* +=============================================================================== + +FILE IO + +=============================================================================== +*/ + +#define MAX_HANDLES 10 +FILE *sys_handles[MAX_HANDLES]; + +int findhandle (void) +{ + int i; + + for (i=1 ; i