Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

utility.cpp File Reference


Functions

int endPrintError ()
int freecwdBuffer ()
u_long getCPUCount ()
char * getdefaultwd (char *path, int len)
int getdefaultwd (string &out)
int getdefaultwdlen ()
int getOSVersion ()
u_long getTicks ()
int preparePrintError ()
int setcwd (const char *dir)
int setcwdBuffer ()

Variables

char * currentPath = 0

Function Documentation

int endPrintError  ) 
 

Set the text color to white on black. Return 0 on success.

int freecwdBuffer  ) 
 

free the cwd buffer.

u_long getCPUCount  ) 
 

Returns the number of processors available on the local machine.

char* getdefaultwd char *  path,
int  len
 

Get the default working directory (Where is the main executable).

Parameters:
path The buffer where write.
len The length of the buffer.

int getdefaultwd string &  out  ) 
 

Get the defult directory using a string as output. Return 0 on success.

Parameters:
out The string where write.

int getdefaultwdlen  ) 
 

Get the default working directory length.

int getOSVersion  ) 
 

Returns the version of the operating system. Return 0 on fails.

u_long getTicks  ) 
 

Return the ticks count. Used to check time variations. Return 0 on errors.

int preparePrintError  ) 
 

Set the text color to red on black. Return 0 on success.

int setcwd const char *  dir  ) 
 

Set the current working directory. Returns Zero if successful.

Parameters:
dir The current working directory.

int setcwdBuffer  ) 
 

Save the current working directory. Return -1 on fails. Return 0 on success.


Variable Documentation

char* currentPath = 0 [static]
 


Generated on Thu May 1 12:40:59 2008 for MyServer by  doxygen 1.3.9.1