path: root/array.h
diff options
authorFelix von Leitner <>2003-08-26 17:58:14 +0000
committerFelix von Leitner <>2003-08-26 17:58:14 +0000
commitc4b0574495b62c125abd72729631889494a50333 (patch)
treed4edf55789f5a84ca2358e245ea0e8edef401df7 /array.h
parent7a18b91761a5a6ea9be032be29922410fe5e1fe0 (diff)
change length or size specifiers in APIs from int to long
add array API (
Diffstat (limited to 'array.h')
1 files changed, 9 insertions, 8 deletions
diff --git a/array.h b/array.h
index 4d5d966..0889f23 100644
--- a/array.h
+++ b/array.h
@@ -6,25 +6,26 @@
typedef struct {
char* p;
- int64 allocated, initialized; /* in bytes */
+ int64 allocated; /* in bytes */
+ uint64 initialized; /* in bytes */
/* p and allocated nonzero: array is allocated */
- /* p zero: array is unallocated */
- /* allocated < 0: array is failed */
+ /* p and allocated zero: array is unallocated */
+ /* p zero and allocated < 0: array is failed */
} array;
-void* array_allocate(array* x,int64 membersize,int64 pos);
-void* array_get(array* x,int64 membersize,int64 pos);
+void* array_allocate(array* x,uint64 membersize,int64 pos);
+void* array_get(array* x,uint64 membersize,int64 pos);
void* array_start(const array* const x);
-int64 array_length(const array* const x,int64 membersize);
+int64 array_length(const array* const x,uint64 membersize);
int64 array_bytes(const array* const x);
-void array_truncate(array* x,int64 membersize,int64 len);
+void array_truncate(array* x,uint64 membersize,int64 len);
void array_trunc(array* x);
void array_reset(array* x);
void array_fail(array* x);
int array_equal(const array* const x,const array* const y);
void array_cat(array* to,const array* const from);
-void array_catb(array* to,const char* from,int64 len);
+void array_catb(array* to,const char* from,uint64 len);
void array_cats(array* to,const char* from);
void array_cats0(array* to,const char* from);
void array_cat0(array* to);