From e09146763c91d638204786532b999e5e40b357ad Mon Sep 17 00:00:00 2001 From: ewt Date: Wed, 13 Dec 1995 22:38:23 +0000 Subject: [PATCH] Added BIN_TYPE CVS patchset: 34 CVS date: 1995/12/13 22:38:23 --- lib/header.c | 6 ++++++ lib/header.h | 1 + 2 files changed, 7 insertions(+) diff --git a/lib/header.c b/lib/header.c index 215c441..f7cbe45 100644 --- a/lib/header.c +++ b/lib/header.c @@ -203,6 +203,7 @@ void dumpHeader(Header h, FILE * f, int flags) switch (ntohl(p->type)) { case NULL_TYPE: type = "NULL_TYPE"; break; case CHAR_TYPE: type = "CHAR_TYPE"; break; + case BIN_TYPE: type = "BIN_TYPE"; break; case INT8_TYPE: type = "INT8_TYPE"; break; case INT16_TYPE: type = "INT16_TYPE"; break; case INT32_TYPE: type = "INT32_TYPE"; break; @@ -287,6 +288,8 @@ void dumpHeader(Header h, FILE * f, int flags) dp += sizeof(int_8); } break; + case BIN_TYPE: + break; case CHAR_TYPE: while (c--) { ch = (char) *((char *) dp); @@ -350,6 +353,7 @@ int getEntry(Header h, int_32 tag, int_32 * type, void **p, int_32 * c) case INT32_TYPE: case INT16_TYPE: case INT8_TYPE: + case BIN_TYPE: case CHAR_TYPE: *p = h->data + ntohl(index->offset); break; @@ -449,6 +453,7 @@ int addEntry(Header h, int_32 tag, int_32 type, void *p, int_32 c) case INT8_TYPE: length = sizeof(int_8) * c; break; + case BIN_TYPE: case CHAR_TYPE: length = sizeof(char) * c; break; @@ -499,6 +504,7 @@ int addEntry(Header h, int_32 tag, int_32 type, void *p, int_32 c) } break; case INT8_TYPE: + case BIN_TYPE: case CHAR_TYPE: memcpy(ptr, p, length); break; diff --git a/lib/header.h b/lib/header.h index 50e8c5c..40aeb05 100644 --- a/lib/header.h +++ b/lib/header.h @@ -58,5 +58,6 @@ int addEntry(Header h, int_32 tag, int_32 type, void *p, int_32 c); #define INT32_TYPE 4 #define INT64_TYPE 5 #define STRING_TYPE 6 +#define BIN_TYPE 7 #endif _header_h -- 2.7.4