PEBL 2.2
Psychology Experiment Building Language - Cross-platform psychological experiment development system
PEBLUtility.cpp File Reference
#include "jsmn.h"
#include "PEBLUtility.h"
#include "PError.h"
#include "rc_ptrs.h"
#include "../base/Variant.h"
#include "../base/PComplexData.h"
#include "../base/PList.h"
#include "../objects/PCustomObject.h"
#include "../devices/PKeyboard.h"
#include "../apps/Globals.h"
#include "md5.h"
#include <errno.h>
#include <ctype.h>
#include <string>
#include <stdlib.h>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <dirent.h>
#include <unistd.h>
#include <sys/stat.h>
#include <stdio.h>
#include <fcntl.h>
#include <sys/types.h>
#include <map>

Go to the source code of this file.

Macros

#define PI   3.141592653589793238462643383279502884197169399375
 
#define SWP(x, y)   (x^=y, y^=x, x^=y)
 

Functions

unsigned long get_size_by_fd (int fd)
 

Macro Definition Documentation

◆ PI

#define PI   3.141592653589793238462643383279502884197169399375

Definition at line 115 of file PEBLUtility.cpp.

◆ SWP

#define SWP (   x,
 
)    (x^=y, y^=x, x^=y)

Definition at line 1243 of file PEBLUtility.cpp.

Function Documentation

◆ get_size_by_fd()

unsigned long get_size_by_fd ( int  fd)

Definition at line 1437 of file PEBLUtility.cpp.

1437 {
1438 struct stat statbuf;
1439 if(fstat(fd, &statbuf) < 0) exit(-1);
1440 return statbuf.st_size;
1441}

Referenced by PEBLUtility::MD5File().