null_main.c 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. ===========================================================================
  3. Copyright (C) 1999-2005 Id Software, Inc.
  4. This file is part of Quake III Arena source code.
  5. Quake III Arena source code is free software; you can redistribute it
  6. and/or modify it under the terms of the GNU General Public License as
  7. published by the Free Software Foundation; either version 2 of the License,
  8. or (at your option) any later version.
  9. Quake III Arena source code is distributed in the hope that it will be
  10. useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with Foobar; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  16. ===========================================================================
  17. */
  18. // sys_null.h -- null system driver to aid porting efforts
  19. #include <errno.h>
  20. #include <stdio.h>
  21. #include "../qcommon/qcommon.h"
  22. int sys_curtime;
  23. //===================================================================
  24. void Sys_BeginStreamedFile( FILE *f, int readAhead ) {
  25. }
  26. void Sys_EndStreamedFile( FILE *f ) {
  27. }
  28. int Sys_StreamedRead( void *buffer, int size, int count, FILE *f ) {
  29. return fread( buffer, size, count, f );
  30. }
  31. void Sys_StreamSeek( FILE *f, int offset, int origin ) {
  32. fseek( f, offset, origin );
  33. }
  34. //===================================================================
  35. void Sys_mkdir ( const char *path ) {
  36. }
  37. void Sys_Error (char *error, ...) {
  38. va_list argptr;
  39. printf ("Sys_Error: ");
  40. va_start (argptr,error);
  41. vprintf (error,argptr);
  42. va_end (argptr);
  43. printf ("\n");
  44. exit (1);
  45. }
  46. void Sys_Quit (void) {
  47. exit (0);
  48. }
  49. void Sys_UnloadGame (void) {
  50. }
  51. void *Sys_GetGameAPI (void *parms) {
  52. return NULL;
  53. }
  54. char *Sys_GetClipboardData( void ) {
  55. return NULL;
  56. }
  57. int Sys_Milliseconds (void) {
  58. return 0;
  59. }
  60. void Sys_Mkdir (char *path) {
  61. }
  62. char *Sys_FindFirst (char *path, unsigned musthave, unsigned canthave) {
  63. return NULL;
  64. }
  65. char *Sys_FindNext (unsigned musthave, unsigned canthave) {
  66. return NULL;
  67. }
  68. void Sys_FindClose (void) {
  69. }
  70. void Sys_Init (void) {
  71. }
  72. void Sys_EarlyOutput( char *string ) {
  73. printf( "%s", string );
  74. }
  75. void main (int argc, char **argv) {
  76. Com_Init (argc, argv);
  77. while (1) {
  78. Com_Frame( );
  79. }
  80. }