UFO: Alien Invasion
Loading...
Searching...
No Matches
shared.h File Reference
Include dependency graph for shared.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mapConfig_t
struct  threadstate_t

Macros

#define SYS_VRB   0 /* verbose support (on/off) */
#define SYS_STD   1 /* standard print level */
#define SYS_WRN   2 /* warnings */
#define SYS_ERR   3 /* error */

Enumerations

enum  verbosityLevel_t {
  VERB_SILENT_EXCEPT_ERROR , VERB_CHECK , VERB_MAPNAME , VERB_LESS ,
  VERB_NORMAL , VERB_EXTRA , VERB_DUMP , VERB_NUM
}
 verbosity levels for use in calls to Verb_Printf and on the command line -v <int> More...

Functions

bool AbortPrint (const verbosityLevel_t importance)
 return nonzero if printing should be aborted based on the command line verbosity level and the importance of the message
void Verb_Printf (const verbosityLevel_t importance, const char *format,...) __attribute__((format(__printf__
void ThreadLock (void)
 Lock the shared data by the calling thread.
void ThreadUnlock (void)
 Release the lock on the shared data.
void RunThreadsOn (void(*func)(unsigned int), unsigned int workcount, bool progress, const char *id)
void RunSingleThreadOn (void(*func)(unsigned int), unsigned int workcount, bool progress, const char *id)
void Sys_Error (const char *error,...) __attribute__((noreturn
void format (__printf__, 1, 2)))
void Com_Printf (const char *format,...) __attribute__((format(__printf__

Variables

mapConfig_t config
char baseFilename [MAX_OSPATH]
threadstate_t threadstate
memPool_tcom_genericPool
memPool_tcom_fileSysPool

Macro Definition Documentation

◆ SYS_ERR

#define SYS_ERR   3 /* error */

Definition at line 148 of file shared.h.

◆ SYS_STD

#define SYS_STD   1 /* standard print level */

Definition at line 146 of file shared.h.

◆ SYS_VRB

#define SYS_VRB   0 /* verbose support (on/off) */

Definition at line 145 of file shared.h.

◆ SYS_WRN

#define SYS_WRN   2 /* warnings */

Definition at line 147 of file shared.h.

Enumeration Type Documentation

◆ verbosityLevel_t

verbosity levels for use in calls to Verb_Printf and on the command line -v <int>

Enumerator
VERB_SILENT_EXCEPT_ERROR 
VERB_CHECK 

print nothing, except check/fix messages

VERB_MAPNAME 

print mapname only. in check/fix, only do this if a problem is found

VERB_LESS 
VERB_NORMAL 
VERB_EXTRA 
VERB_DUMP 

the highest verbosity level

VERB_NUM 

the number of verbosity levels

Definition at line 40 of file shared.h.

Function Documentation

◆ AbortPrint()

bool AbortPrint ( const verbosityLevel_t msgVerbLevel)

return nonzero if printing should be aborted based on the command line verbosity level and the importance of the message

Parameters
msgVerbLevelinsignificance of the message. Larger numbers mean the message is less important. The message will first be printed if the msgVerbLevel is equal to the config.verbosity.
See also
verbosityLevel_t

Definition at line 189 of file ufo2map.cpp.

References config.

Referenced by Check_Printf(), and Verb_Printf().

◆ Com_Printf()

void Com_Printf ( const char * format,
... )

References __attribute__, Com_Printf(), and format().

◆ format()

void format ( __printf__ ,
1 ,
2  )

References __attribute__, and format().

◆ RunSingleThreadOn()

void RunSingleThreadOn ( void(* func )(unsigned int),
unsigned int workcount,
bool progress,
const char * id )

Referenced by DoRouting(), and ProcessWorldModel().

◆ RunThreadsOn()

void RunThreadsOn ( void(* func )(unsigned int),
unsigned int workcount,
bool progress,
const char * id )

Referenced by LightWorld().

◆ Sys_Error()

void Sys_Error ( const char * error,
... )

◆ ThreadLock()

void ThreadLock ( void )

Lock the shared data by the calling thread.

Definition at line 112 of file threads.cpp.

References lock, Sys_Error(), and threadstate.

Referenced by FinalLightFace(), and GetThreadWork().

◆ ThreadUnlock()

void ThreadUnlock ( void )

Release the lock on the shared data.

Definition at line 126 of file threads.cpp.

References lock, Sys_Error(), and threadstate.

Referenced by FinalLightFace(), and GetThreadWork().

◆ Verb_Printf()

Variable Documentation

◆ baseFilename

char baseFilename[MAX_OSPATH]
extern

This is used for extra file output functions

Definition at line 55 of file ufo2map.cpp.

Referenced by DoRouting(), main(), and RT_WriteCSVFiles().

◆ com_fileSysPool

◆ com_genericPool

◆ config

mapConfig_t config
extern

Definition at line 49 of file ufo2map.cpp.

◆ threadstate