diff options
author | Jonathan McCrohan <jmccrohan@gmail.com> | 2012-10-30 21:29:30 +0000 |
---|---|---|
committer | Jonathan McCrohan <jmccrohan@gmail.com> | 2012-10-30 21:29:30 +0000 |
commit | 62f81e5cafbacfb90ac0f86e52e8e3176aa5ba8f (patch) | |
tree | 8f8f6028fa880b3296b1e42bc8d87cead73aaf78 /machine_type.h | |
download | dhex-62f81e5cafbacfb90ac0f86e52e8e3176aa5ba8f.tar.gz |
Imported Upstream version 0.65upstream/0.65
Diffstat (limited to 'machine_type.h')
-rw-r--r-- | machine_type.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/machine_type.h b/machine_type.h new file mode 100644 index 0000000..124650f --- /dev/null +++ b/machine_type.h @@ -0,0 +1,29 @@ +#ifndef MACHINE_TYPE_H +#define MACHINE_TYPE_H +#include <stdio.h> +#include <ncurses.h> +// number 1: datatypes + +typedef unsigned char tBool; +typedef unsigned char tUInt8; +typedef unsigned short tUInt16; +typedef unsigned int tUInt32; +typedef unsigned long long tUInt64; + +typedef signed char tInt8; +typedef signed short tInt16; +typedef signed int tInt32; +typedef signed long long tInt64; + +typedef FILE* tFptr; + +// number 2: file operations +tUInt64 getfilepos(tFptr f); +tUInt64 getfilesize(tFptr f); +void setfilepos(tFptr f,tUInt64 pos); + +#define MIN(a,b) (((a)<(b))?(a):(b)) +#define MAX(a,b) (((a)>(b))?(a):(b)) +#define RETOK 0 +#define RETNOK -1 +#endif |