TORCS  1.3.9
The Open Racing Car Simulator
tgf.cpp File Reference
#include <sys/stat.h>
#include <sys/types.h>
#include <errno.h>
#include <portability.h>
#include <tgf.h>
#include <time.h>
Include dependency graph for tgf.cpp:

Go to the source code of this file.

Macros

#define mkdir(x)   mkdir((x), S_IRWXU);
 

Functions

void gfDirInit (void)
 
void gfModInit (void)
 
void gfOsInit (void)
 Init of the module. More...
 
void GfParmInit (void)
 Parameter set library API initialization, set up parameter set handle cache. More...
 
void gfRlstInit (void)
 
void GfInit (void)
 
void gfMeanReset (tdble v, tMeanVal *pvt)
 
tdble gfMean (tdble v, tMeanVal *pvt, int n, int w)
 
void GfTime2Str (char *result, int resultSize, tdble sec, int sgn)
 Convert a time in seconds (float) to an ascii string. More...
 
char * GetLocalDir (void)
 
void SetLocalDir (char *buf)
 
char * GetLibDir (void)
 
void SetLibDir (char *buf)
 
char * GetDataDir (void)
 
void SetDataDir (char *buf)
 
int GetSingleTextureMode (void)
 
void SetSingleTextureMode (void)
 
int GfNearestPow2 (int x)
 
int GfCreateDir (char *path)
 Create directory for given path recursively, so all missing parent directories are created as well. More...
 
int GfCreateDirForFile (const char *filenameandpath)
 Create directory for given file path recursively, so all missing parent directories are created as well. More...
 

Variables

static char * localDir = strdup("")
 
static char * libDir = strdup("")
 
static char * dataDir = strdup("")
 
static int singleTextureMode = 0
 

Macro Definition Documentation

◆ mkdir

#define mkdir (   x)    mkdir((x), S_IRWXU);

Function Documentation

◆ GetDataDir()

char* GetDataDir ( void  )

Definition at line 257 of file tgf.cpp.

◆ GetLibDir()

char* GetLibDir ( void  )

Definition at line 244 of file tgf.cpp.

◆ GetLocalDir()

char* GetLocalDir ( void  )

Definition at line 231 of file tgf.cpp.

◆ GetSingleTextureMode()

int GetSingleTextureMode ( void  )

Definition at line 273 of file tgf.cpp.

◆ GfCreateDir()

int GfCreateDir ( char *  path)

Create directory for given path recursively, so all missing parent directories are created as well.

Parameters
[in]pathPath
Returns
GF_DIR_CREATED if directory was created or already exits
GF_DIR_CREATION_FAILED if directory could not be created

Definition at line 309 of file tgf.cpp.

Here is the call graph for this function:

◆ GfCreateDirForFile()

int GfCreateDirForFile ( const char *  filenameandpath)

Create directory for given file path recursively, so all missing parent directories are created as well.

Parameters
[in]filenameandpathPath including file name
Returns
GF_DIR_CREATED if directory was created or already exits
GF_DIR_CREATION_FAILED if directory could not be created
See also
GfCreateDir

Definition at line 364 of file tgf.cpp.

Here is the call graph for this function:

◆ gfDirInit()

void gfDirInit ( void  )

Definition at line 33 of file directory.cpp.

◆ GfInit()

void GfInit ( void  )

Definition at line 138 of file tgf.cpp.

Here is the call graph for this function:

◆ gfMean()

tdble gfMean ( tdble  v,
tMeanVal pvt,
int  n,
int  w 
)

Definition at line 157 of file tgf.cpp.

◆ gfMeanReset()

void gfMeanReset ( tdble  v,
tMeanVal pvt 
)

Definition at line 147 of file tgf.cpp.

◆ gfModInit()

void gfModInit ( void  )

Definition at line 42 of file module.cpp.

◆ GfNearestPow2()

int GfNearestPow2 ( int  x)

Definition at line 285 of file tgf.cpp.

◆ gfOsInit()

void gfOsInit ( void  )

Init of the module.

Definition at line 41 of file os.cpp.

◆ gfRlstInit()

void gfRlstInit ( void  )

◆ SetDataDir()

void SetDataDir ( char *  buf)

Definition at line 263 of file tgf.cpp.

◆ SetLibDir()

void SetLibDir ( char *  buf)

Definition at line 250 of file tgf.cpp.

◆ SetLocalDir()

void SetLocalDir ( char *  buf)

Definition at line 237 of file tgf.cpp.

◆ SetSingleTextureMode()

void SetSingleTextureMode ( void  )

Definition at line 279 of file tgf.cpp.

Variable Documentation

◆ dataDir

char* dataDir = strdup("")
static

Definition at line 228 of file tgf.cpp.

◆ libDir

char* libDir = strdup("")
static

Definition at line 227 of file tgf.cpp.

◆ localDir

char* localDir = strdup("")
static

Definition at line 226 of file tgf.cpp.

◆ singleTextureMode

int singleTextureMode = 0
static

Definition at line 270 of file tgf.cpp.