13 if( regcomp(&re, pattern, REG_EXTENDED|REG_NOSUB) != 0 )
16 status = regexec(&re, str, (
size_t)0,
NULL, 0);
30 glob(pattern, GLOB_TILDE|GLOB_BRACE|GLOB_MARK,
NULL, &globbuf);
33 for(
unsigned i=0;
i<globbuf.gl_pathc;
i++) {
34 results.push_back(globbuf.gl_pathv[
i]);
42 string date(
"date +%d%b%Y_%H%M%S");
43 FILE *
in = popen(date.c_str(),
"r");
45 if(fscanf(in,
"%s",result) != EOF) {
54 const double pi = 3.14159265358979323;
55 const double pi2 = pi*2.;
56 while(angle>pi) angle -=
pi2;
57 while(angle<-pi) angle +=
pi2;
static std::vector< std::string > myGlob(const char *pattern)
get all files matching pattern
static std::string date()
returns the date
static bool stringMatch(const char *string, const char *pattern)
match a string to a regexp
static double mpi_pi(double angle)
returns angle between mpi and pi
T angle(T x1, T y1, T z1, T x2, T y2, T z2)