main function and system functions More...
#include <stdlib.h>
#include <fcntl.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <dlfcn.h>
#include "../../common/common.h"
#include "../system.h"
#include "osx_main.h"
Go to the source code of this file.
Data Structures | |
class | NSApplication(SDL_Missing_Methods) |
struct | CPSProcessSerNum |
Functions | |
OSErr | CPSGetCurrentProcess (CPSProcessSerNum *psn) |
OSErr | CPSEnableForegroundOperation (CPSProcessSerNum *psn, UInt32 _arg2, UInt32 _arg3, UInt32 _arg4, UInt32 _arg5) |
OSErr | CPSSetFrontProcess (CPSProcessSerNum *psn) |
void | Sys_Init (void) |
static void | InitCocoa (void) |
static void | SetWorkingDirectory (const char **argv) |
Sets the current working directory to the top of the application bundle hierarchy. | |
int | main (int argc, const char **argv) |
The entry point for OSX server and client. |
main function and system functions
Definition in file osx_main.m.
OSErr CPSEnableForegroundOperation | ( | CPSProcessSerNum * | psn, | |
UInt32 | _arg2, | |||
UInt32 | _arg3, | |||
UInt32 | _arg4, | |||
UInt32 | _arg5 | |||
) |
Referenced by main().
OSErr CPSGetCurrentProcess | ( | CPSProcessSerNum * | psn | ) |
Referenced by main().
OSErr CPSSetFrontProcess | ( | CPSProcessSerNum * | psn | ) |
Referenced by main().
static void InitCocoa | ( | void | ) | [static] |
int main | ( | int | argc, | |
const char ** | argv | |||
) |
The entry point for OSX server and client.
Inits the the program and calls Qcommon in an infinite loop. FIXME: While this works, infinite loops are bad; one should not rely on exit() call; the program should be designed to fall through the bottom.
Definition at line 116 of file osx_main.m.
References argc, argv, CPSEnableForegroundOperation(), CPSGetCurrentProcess(), CPSSetFrontProcess(), InitCocoa(), Qcommon_Frame(), Qcommon_Init(), SetWorkingDirectory(), and Sys_ConsoleInit().
static void SetWorkingDirectory | ( | const char ** | argv | ) | [static] |
Sets the current working directory to the top of the application bundle hierarchy.
Definition at line 81 of file osx_main.m.
References Com_DPrintf(), Com_Printf(), and DEBUG_SYSTEM.
Referenced by main().
void Sys_Init | ( | void | ) |
Definition at line 58 of file osx_main.m.
References CVAR_ARCHIVE, Cvar_Get(), CVAR_SERVERINFO, sys_affinity, sys_os, and sys_priority.