UFO: Alien Invasion
Loading...
Searching...
No Matches
linux_main.cpp
Go to the documentation of this file.
1
5
6/*
7Copyright (C) 1997-2001 Id Software, Inc.
8
9This program is free software; you can redistribute it and/or
10modify it under the terms of the GNU General Public License
11as published by the Free Software Foundation; either version 2
12of the License, or (at your option) any later version.
13
14This program is distributed in the hope that it will be useful,
15but WITHOUT ANY WARRANTY; without even the implied warranty of
16MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
18See the GNU General Public License for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
24*/
25
26#include <fcntl.h>
27#include <unistd.h>
28
29#include "../../common/common.h"
30#include "../system.h"
31
32/* ======================================================================= */
33/* General routines */
34/* ======================================================================= */
35
36void Sys_Init (void)
37{
38 sys_os = Cvar_Get("sys_os", "linux", CVAR_SERVERINFO);
39 sys_affinity = Cvar_Get("sys_affinity", "0", CVAR_ARCHIVE);
40 sys_priority = Cvar_Get("sys_priority", "0", CVAR_ARCHIVE, "Process nice level");
41}
42
47int main (int argc, char** argv)
48{
50 Qcommon_Init(argc, argv);
51
52 fcntl(STDIN_FILENO, F_SETFL, fcntl(STDIN_FILENO, F_GETFL, 0) | FNDELAY);
53
54 while (1)
56
57 return 0;
58}
void Sys_ConsoleInit(void)
Initialize the console input (tty mode if possible).
void Qcommon_Frame(void)
This is the function that is called directly from main().
Definition common.cpp:1511
cvar_t * sys_os
Definition common.cpp:61
cvar_t * sys_priority
Definition common.cpp:59
cvar_t * sys_affinity
Definition common.cpp:60
void Qcommon_Init(int argc, char **argv)
Init function.
Definition common.cpp:1095
definitions common between client and server, but not game lib
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
#define CVAR_SERVERINFO
Definition cvar.h:42
#define CVAR_ARCHIVE
Definition cvar.h:40
int main(int argc, char **argv)
The entry point for linux server and client. Initializes the program and calls Qcommon_Frame in an in...
void Sys_Init(void)
System specific stuff.