UFO: Alien Invasion
Loading...
Searching...
No Matches
system.h
Go to the documentation of this file.
1
5
6/*
7All original material Copyright (C) 2002-2025 UFO: Alien Invasion.
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#pragma once
27
28#include "../shared/cxx.h"
29#include "../common/list.h"
30#include <stdio.h>
31
32/*
33==============================================================
34NON-PORTABLE SYSTEM SERVICES
35==============================================================
36*/
37
38struct qFILE_s;
39
40void Sys_Init(void);
41void Sys_NormPath(char* path);
42void Sys_Sleep(int milliseconds);
43const char* Sys_GetCurrentUser(void);
44int Sys_Setenv(const char* name, const char* value);
45void Sys_InitSignals(void);
46const char* Sys_SetLocale(const char* localeID);
47const char* Sys_GetLocale(void);
48
49const char* Sys_ConsoleInput(void);
50void Sys_ConsoleOutput(const char* string);
51void Sys_Error(const char* error, ...) __attribute__((noreturn, format(__printf__, 1, 2)));
52void Sys_Quit(void);
53char* Sys_GetHomeDirectory(void);
54
55void Sys_ConsoleShutdown(void);
56void Sys_ConsoleInit(void);
57void Sys_ShowConsole(bool show);
58
59/* pass in an attribute mask of things you wish to REJECT */
60char* Sys_FindFirst(const char* path, unsigned musthave, unsigned canthave);
61char* Sys_FindNext(unsigned musthave, unsigned canthave);
62void Sys_FindClose(void);
63void Sys_ListFilteredFiles(const char* basedir, const char* subdirs, const char* filter, linkedList_t** list);
64void Sys_Mkdir(const char* path);
65void Sys_Mkfifo(const char* ospath, struct qFILE_s* f);
66char* Sys_Cwd(void);
68int Sys_Milliseconds(void);
69void Sys_Backtrace(void);
70void Sys_Breakpoint(void);
71void Sys_OpenURL(const char* url);
72FILE* Sys_Fopen(const char* filename, const char* mode);
73int Sys_Remove (const char* filename);
74int Sys_Rename (const char* oldname, const char* newname);
75int Sys_Access (const char* filename, int mode);
void Sys_ConsoleInit(void)
Initialize the console input (tty mode if possible).
void Sys_ShowConsole(bool show)
void Sys_ConsoleShutdown(void)
void Sys_Backtrace(void)
On platforms supporting it, print a backtrace.
void Sys_Quit(void)
#define __attribute__(x)
Definition cxx.h:37
const char * filename
Definition ioapi.h:41
const char int mode
Definition ioapi.h:41
LINKED LIST interface.
void format(__printf__, 1, 2)))
QGL_EXTERN GLfloat f
Definition r_gl.h:114
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
Definition r_gl.h:110
void Sys_Sleep(int milliseconds)
Calls the win32 sleep function.
char * Sys_Cwd(void)
Get current working dir.
void Sys_Breakpoint(void)
void Sys_NormPath(char *path)
Normalize path (remove all \ ).
FILE * Sys_Fopen(const char *filename, const char *mode)
void Sys_InitSignals(void)
int Sys_Remove(const char *filename)
const char * Sys_GetLocale(void)
const char * Sys_ConsoleInput(void)
Handles input for the console window.
void Sys_OpenURL(const char *url)
int Sys_Rename(const char *oldname, const char *newname)
char * Sys_GetHomeDirectory(void)
Returns the home environment variable (which hold the path of the user's homedir).
void Sys_ListFilteredFiles(const char *basedir, const char *subdirs, const char *filter, linkedList_t **list)
void Sys_SetAffinityAndPriority(void)
void Sys_ConsoleOutput(const char *string)
char * Sys_FindFirst(const char *path, unsigned musthave, unsigned canthave)
Opens the directory and returns the first file that matches our searchrules.
int Sys_Milliseconds(void)
void Sys_Mkdir(const char *path)
void Sys_FindClose(void)
Closes the find handle.
void Sys_Mkfifo(const char *ospath, struct qFILE_s *f)
int Sys_Setenv(const char *name, const char *value)
set/unset environment variables (empty value removes it)
void Sys_Init(void)
int Sys_Access(const char *filename, int mode)
const char * Sys_GetCurrentUser(void)
Get current user.
char * Sys_FindNext(unsigned musthave, unsigned canthave)
Returns the next file of the already opened directory (Sys_FindFirst) that matches our search mask.
const char * Sys_SetLocale(const char *localeID)
void Sys_Error(const char *error,...) __attribute__((noreturn
#define FILE