00001 00006 /* 00007 Copyright (C) 2002-2010 UFO: Alien Invasion. 00008 00009 This program is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU General Public License 00011 as published by the Free Software Foundation; either version 2 00012 of the License, or (at your option) any later version. 00013 00014 This program is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00017 00018 See the GNU General Public License for more details. 00019 00020 You should have received a copy of the GNU General Public License 00021 along with this program; if not, write to the Free Software 00022 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00023 00024 */ 00025 00026 #include "test_shared.h" 00027 #include <stdio.h> 00028 #include <stdarg.h> 00029 00030 void TEST_Shutdown (void) 00031 { 00032 FS_Shutdown(); 00033 Cmd_Shutdown(); 00034 Cvar_Shutdown(); 00035 Mem_Shutdown(); 00036 } 00037 00038 void TEST_Init (void) 00039 { 00040 com_aliasSysPool = Mem_CreatePool("Common: Alias system"); 00041 com_cmdSysPool = Mem_CreatePool("Common: Command system"); 00042 com_cmodelSysPool = Mem_CreatePool("Common: Collision model"); 00043 com_cvarSysPool = Mem_CreatePool("Common: Cvar system"); 00044 com_fileSysPool = Mem_CreatePool("Common: File system"); 00045 com_genericPool = Mem_CreatePool("Generic"); 00046 00047 Mem_Init(); 00048 Cmd_Init(); 00049 Cvar_Init(); 00050 FS_InitFilesystem(qtrue); 00051 Swap_Init(); 00052 } 00053 00054 void TEST_Printf (const char *fmt, ...) 00055 { 00056 va_list argptr; 00057 char text[1024]; 00058 00059 va_start(argptr, fmt); 00060 Q_vsnprintf(text, sizeof(text), fmt, argptr); 00061 va_end(argptr); 00062 00063 printf("%s", text); 00064 00065 fflush(stdout); 00066 }