GCpp general purpose C++ library  version 1.0
GBaseFunctions.cpp File Reference
#include "GBaseFunctions.hh"

Functions

void GSetColorTerminal ()
 
void GSetMonochromeTerminal ()
 
void GSwapBytes (u_int *array, size_t n)
 
void GSwapBytes (u_short *array, size_t n)
 

Variables

string gPrefixError = string( "" ) + "<E> "
 ! Prefix for error messages
 
string gPrefixWarning = string( "" ) + "<W> "
 ! Prefix for warning messages
 
string gPrefixInfo = string( "<I> " )
 ! Prefix for information messages
 
string gPrefixDebug = string( "<D> " )
 ! Prefix for debugging messages
 
string gSuffixError = string( "\n" )
 ! Suffix for error messages
 
string gSuffixWarning = string( "\n" )
 ! Suffix for warning messages
 
string gSuffixInfo = string("\n")
 ! Suffix for information messages
 
string gSuffixDebug = string("\n")
 ! Suffix for debugging messages
 

Detailed Description

Source file for various base functions

Function Documentation

void GSetMonochromeTerminal ( )
void GSwapBytes ( u_int array,
size_t  n 
)

Function that swaps bytes in an array of 32 bits integers. The swapping is performed by groups of 4 bytes.

Parameters
array32-bits integer array
nnumber of 32-bits integers
void GSwapBytes ( u_short array,
size_t  n 
)

Function that swaps bytes in an array of 16 bits integers. The swapping is performed by groups of 2 bytes.

Parameters
array16-bits integer array
nnumber of 16-bits integers