UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
solaris_main.cpp
Go to the documentation of this file.
1 /*
2 Copyright (C) 1997-2001 Id Software, Inc.
3 
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
8 
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 
13 See the GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 
19 */
20 #include <unistd.h>
21 #include <signal.h>
22 #include <stdlib.h>
23 #include <limits.h>
24 #include <sys/time.h>
25 #include <sys/types.h>
26 #include <unistd.h>
27 #include <fcntl.h>
28 #include <stdarg.h>
29 #include <stdio.h>
30 #include <sys/ipc.h>
31 #include <sys/shm.h>
32 #include <sys/stat.h>
33 #include <string.h>
34 #include <ctype.h>
35 #include <sys/wait.h>
36 #include <sys/mman.h>
37 #include <errno.h>
38 #include <sys/file.h>
39 
40 #include <dlfcn.h>
41 
42 #include "../../common/common.h"
43 #include "../system.h"
44 
45 /* ======================================================================= */
46 /* General routines */
47 /* ======================================================================= */
48 
49 void Sys_Init (void)
50 {
51  sys_os = Cvar_Get("sys_os", "solaris", CVAR_SERVERINFO);
52  sys_affinity = Cvar_Get("sys_affinity", "0", CVAR_ARCHIVE);
53  sys_priority = Cvar_Get("sys_priority", "0", CVAR_ARCHIVE, "Process nice level");
54 }
55 
56 int main (int argc, char **argv)
57 {
59  Qcommon_Init(argc, argv);
60 
61  fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY);
62 
63  while (1)
64  Qcommon_Frame();
65 }
void Qcommon_Frame(void)
This is the function that is called directly from main()
Definition: common.cpp:1493
void Qcommon_Init(int argc, char **argv)
Init function.
Definition: common.cpp:1078
cvar_t * sys_affinity
Definition: common.cpp:60
void Sys_ConsoleInit(void)
Initialize the console input (tty mode if possible)
#define CVAR_ARCHIVE
Definition: cvar.h:40
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags, const char *desc)
Init or return a cvar.
Definition: cvar.cpp:342
int main(int argc, char **argv)
void Sys_Init(void)
cvar_t * sys_os
Definition: common.cpp:61
cvar_t * sys_priority
Definition: common.cpp:59
#define CVAR_SERVERINFO
Definition: cvar.h:42