diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-08-23 12:22:51 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-08-23 12:22:51 +0200 |
commit | bc3604d9b226ac475a104cd8ae2ca2d1d4a27984 (patch) | |
tree | e796661f371a94a50edfdc693388bb911b253dfd /numlib/numsup.h | |
parent | 509016be676f7915d635fa57144d2a441e3090ca (diff) | |
parent | c0b89ac5bfb90835ef01573267020e42d4fe070c (diff) |
Merge new upstream release
Diffstat (limited to 'numlib/numsup.h')
-rwxr-xr-x[-rw-r--r--] | numlib/numsup.h | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/numlib/numsup.h b/numlib/numsup.h index 1fb83bc..a284809 100644..100755 --- a/numlib/numsup.h +++ b/numlib/numsup.h @@ -85,8 +85,6 @@ #define PNTR UINT_PTR -#define vsnprintf _vsnprintf - #define PF64PREC "I64" /* printf format precision specifier */ #define CF64PREC "LL" /* Constant precision specifier */ @@ -310,6 +308,10 @@ void a1loge(a1log *log, int ecode, char *fmt, ...); /* This resets errc and errm */ void a1logue(a1log *log); +/* Print bytes as hex to debug log */ +/* base is the base of the displayed offset */ +void adump_bytes(a1log *log, char *pfx, unsigned char *buf, int base, int len); + /* =========================================================== */ /* Globals used to hold certain information */ extern char *exe_path; /* Path leading to executable, not including exe name itself. */ @@ -454,47 +456,47 @@ char *ctime_64(const INR64 *timer); /* Unsigned 8 bit */ unsigned int read_ORD8(ORD8 *p); -void write_ORD8(unsigned int d, ORD8 *p); +void write_ORD8(ORD8 *p, unsigned int d); /* Signed 8 bit */ int read_INR8(ORD8 *p); -void write_INR8(int d, ORD8 *p); +void write_INR8(ORD8 *p, int d); /* Unsigned 16 bit */ unsigned int read_ORD16_be(ORD8 *p); unsigned int read_ORD16_le(ORD8 *p); -void write_ORD16_be(unsigned int d, ORD8 *p); -void write_ORD16_le(unsigned int d, ORD8 *p); +void write_ORD16_be(ORD8 *p, unsigned int d); +void write_ORD16_le(ORD8 *p, unsigned int d); /* Signed 16 bit */ int read_INR16_be(ORD8 *p); int read_INR16_le(ORD8 *p); -void write_INR16_be(int d, ORD8 *p); -void write_INR16_le(int d, ORD8 *p); +void write_INR16_be(ORD8 *p, int d); +void write_INR16_le(ORD8 *p, int d); /* Unsigned 32 bit */ unsigned int read_ORD32_be(ORD8 *p); unsigned int read_ORD32_le(ORD8 *p); -void write_ORD32_be(unsigned int d, ORD8 *p); -void write_ORD32_le(unsigned int d, ORD8 *p); +void write_ORD32_be(ORD8 *p, unsigned int d); +void write_ORD32_le(ORD8 *p, unsigned int d); /* Signed 32 bit */ int read_INR32_be(ORD8 *p); int read_INR32_le(ORD8 *p); -void write_INR32_be(int d, ORD8 *p); -void write_INR32_le(int d, ORD8 *p); +void write_INR32_be(ORD8 *p, int d); +void write_INR32_le(ORD8 *p, int d); /* Unsigned 64 bit */ ORD64 read_ORD64_be(ORD8 *p); ORD64 read_ORD64_le(ORD8 *p); -void write_ORD64_be(ORD64 d, ORD8 *p); -void write_ORD64_le(ORD64 d, ORD8 *p); +void write_ORD64_be(ORD8 *p, ORD64 d); +void write_ORD64_le(ORD8 *p, ORD64 d); /* Signed 64 bit */ INR64 read_INR64_be(ORD8 *p); INR64 read_INR64_le(ORD8 *p); -void write_INR64_be(INR64 d, ORD8 *p); -void write_INR64_le(INR64 d, ORD8 *p); +void write_INR64_be(ORD8 *p, INR64 d); +void write_INR64_le(ORD8 *p, INR64 d); /*******************************************/ /* Numerical diagnostics */ |