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

utility.h File Reference


Defines

#define MYSERVER_KB(x)   (x << 10)
#define MYSERVER_MB(x)   (x << 20)
#define MYSERVER_SEC(x)   (x * 1000)
#define OS_LINUX   100
#define OS_WINDOWS_2000   2
#define OS_WINDOWS_9X   1
#define OS_WINDOWS_NT3   3
#define OS_WINDOWS_XP   4

Functions

int endPrintError ()
int freecwdBuffer ()
u_long getCPUCount ()
int getdefaultwd (string &)
char * getdefaultwd (char *dwd, int maxlen)
int getdefaultwdlen ()
int getOSVersion ()
u_long getTicks ()
int preparePrintError ()
int setcwd (const char *cwd)
int setcwdBuffer ()

Define Documentation

#define MYSERVER_KB  )     (x << 10)
 

Macros to do simple transformations.

#define MYSERVER_MB  )     (x << 20)
 

#define MYSERVER_SEC  )     (x * 1000)
 

#define OS_LINUX   100
 

#define OS_WINDOWS_2000   2
 

#define OS_WINDOWS_9X   1
 

#define OS_WINDOWS_NT3   3
 

#define OS_WINDOWS_XP   4
 


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.

int getdefaultwd string &  out  ) 
 

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

Parameters:
out The string where write.

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 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.


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