Pol  Revision:f37d500
clib.h File Reference
#include "pol_global_config.h"
#include "stddef.h"
#include "rawtypes.h"
#include <ctime>

Go to the source code of this file.

Classes

class  Pol::Clib::OnlineStatistics
 

Namespaces

 Pol
 
 Pol::Clib
 

Macros

#define EXPLICIT_CAST(totype, fromtype)   ( totype )
 
#define MEMCLR(a)   memset( &a, 0, sizeof a )
 
#define MEMCPY(a, b)   memcpy( &a, &b, sizeof a )
 
#define ms_to_clocks(ms)   ( ms * CLOCKS_PER_SEC / 1000 )
 
#define PARAMS
 
#define STRACPY(a, b)
 
#define STRCPY(a, b)   strncpy( a, b, sizeof a )
 
#define STRNCPY(a, b)   strncpy( a, b, sizeof a )
 
#define STRPCPY(a, b)
 
#define strzcpy   Clib::stracpy
 

Functions

char * Pol::Clib::binary (unsigned int val, int nbits)
 
char ** Pol::Clib::decompose1 (char *cmdline, int *pargc)
 
int Pol::Clib::favail (void)
 
int Pol::Clib::forspec (const char *spec, void(*func)(const char *pathname))
 
size_t Pol::Clib::getCurrentMemoryUsage ()
 returns the current process size in bytes More...
 
void Pol::Clib::incStr (char *str)
 
void Pol::Clib::legalize (char *s, const char *allowed)
 
std::tm Pol::Clib::localtime (const std::time_t &t)
 threadsafe version of localtime More...
 
int Pol::Clib::match (char *a, char *b)
 
int Pol::Clib::nwords (const char *s)
 
template<typename T >
void Pol::Clib::sanitize_bounds (T *value, const T min, const T max)
 
template<typename T >
void Pol::Clib::sanitize_lowerlimit (T *value, const T min)
 
template<typename T >
void Pol::Clib::sanitize_upperlimit (T *value, const T max)
 
char * Pol::Clib::stracpy (char *dest, const char *src, size_t maxlen)
 
char * Pol::Clib::strip (char *s)
 
char * Pol::Clib::strpcpy (char *dest, const char *src, size_t maxlen)
 

Detailed Description

History

Definition in file clib.h.

Macro Definition Documentation

#define MEMCLR (   a)    memset( &a, 0, sizeof a )

Definition at line 164 of file clib.h.

#define MEMCPY (   a,
 
)    memcpy( &a, &b, sizeof a )

Definition at line 165 of file clib.h.

#define ms_to_clocks (   ms)    ( ms * CLOCKS_PER_SEC / 1000 )

Definition at line 26 of file clib.h.

#define PARAMS

Definition at line 93 of file clib.h.

#define STRACPY (   a,
 
)
Value:
Clib: \
stracpy( a, b, sizeof a )
char * stracpy(char *dest, const char *src, size_t maxlen)
Definition: stracpy.cpp:17

Definition at line 161 of file clib.h.

#define STRCPY (   a,
 
)    strncpy( a, b, sizeof a )

Definition at line 156 of file clib.h.

#define STRNCPY (   a,
 
)    strncpy( a, b, sizeof a )

Definition at line 157 of file clib.h.

#define STRPCPY (   a,
 
)
Value:
Clib: \
strpcpy( a, b, sizeof a )
char * strpcpy(char *dest, const char *src, size_t maxlen)

Definition at line 158 of file clib.h.