summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2014-12-20 12:34:14 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2014-12-20 12:34:14 +0000
commit0d82edd9f8bebb396a9154d4e1003340dbf6b967 (patch)
tree0659c834f387f3504944a610ed6858b9e268e6c7 /src/include
parent2436785702b47996e9f0e281df0d6027660ec914 (diff)
downloadskalibs-0d82edd9f8bebb396a9154d4e1003340dbf6b967.tar.xz
Lots of cosmetic fixes.
sha256 documented.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/skalibs/alloc.h4
-rw-r--r--src/include/skalibs/avlnode.h6
-rw-r--r--src/include/skalibs/avltree.h12
-rw-r--r--src/include/skalibs/avltreen.h12
-rw-r--r--src/include/skalibs/bufalloc.h11
-rw-r--r--src/include/skalibs/djbtime.h6
-rw-r--r--src/include/skalibs/genset.h8
-rw-r--r--src/include/skalibs/gensetdyn.h12
-rw-r--r--src/include/skalibs/iobuffer.h2
-rw-r--r--src/include/skalibs/md5.h6
-rw-r--r--src/include/skalibs/rc4.h4
-rw-r--r--src/include/skalibs/rrandom.h10
-rw-r--r--src/include/skalibs/sgetopt.h4
-rw-r--r--src/include/skalibs/sha1.h6
-rw-r--r--src/include/skalibs/sha256.h6
-rw-r--r--src/include/skalibs/surf.h11
-rw-r--r--src/include/skalibs/unirandom.h19
-rw-r--r--src/include/skalibs/unix-timed.h4
-rw-r--r--src/include/skalibs/unix-transactional.h12
19 files changed, 77 insertions, 78 deletions
diff --git a/src/include/skalibs/alloc.h b/src/include/skalibs/alloc.h
index 707d5c1..0df0f9d 100644
--- a/src/include/skalibs/alloc.h
+++ b/src/include/skalibs/alloc.h
@@ -8,9 +8,9 @@
typedef char aligned_char gccattr_aligned ;
typedef aligned_char *aligned_char_ref, **aligned_char_ref_ref ;
-extern aligned_char_ref alloc (unsigned int) ;
+extern aligned_char *alloc (unsigned int) ;
extern void alloc_free (void *) ;
#define alloc_re(p, old, new) alloc_realloc(p, new)
-extern int alloc_realloc (aligned_char_ref_ref, unsigned int) ;
+extern int alloc_realloc (aligned_char **, unsigned int) ;
#endif
diff --git a/src/include/skalibs/avlnode.h b/src/include/skalibs/avlnode.h
index 4d13d15..faaee10 100644
--- a/src/include/skalibs/avlnode.h
+++ b/src/include/skalibs/avlnode.h
@@ -35,10 +35,10 @@ extern int avlnode_extreme (avlnode const *, unsigned int, unsigned int, int, un
#define avlnode_min(s, max, r, data) avlnode_extreme(s, max, (r), 0, data)
#define avlnode_max(s, max, r, data) avlnode_extreme(s, max, (r), 1, data)
-extern unsigned int avlnode_insertnode (avlnode_ref, unsigned int, unsigned int, unsigned int, dtokfunc_t_ref, cmpfunc_t_ref, void *) ;
-extern unsigned int avlnode_delete (avlnode_ref, unsigned int, unsigned int *, void const *, dtokfunc_t_ref, cmpfunc_t_ref, void *) ;
+extern unsigned int avlnode_insertnode (avlnode *, unsigned int, unsigned int, unsigned int, dtokfunc_t_ref, cmpfunc_t_ref, void *) ;
+extern unsigned int avlnode_delete (avlnode *, unsigned int, unsigned int *, void const *, dtokfunc_t_ref, cmpfunc_t_ref, void *) ;
#define avlnode_deletenode(s, max, r, i, dtok, f, p) avlnode_delete(s, max, r, (*(dtok))((s)[i].data), dtok, f, p)
-extern int avlnode_iter (avlnode_ref, unsigned int, unsigned int, avliterfunc_t_ref, void *) ;
+extern int avlnode_iter (avlnode *, unsigned int, unsigned int, avliterfunc_t_ref, void *) ;
#endif
diff --git a/src/include/skalibs/avltree.h b/src/include/skalibs/avltree.h
index cefd116..cd035f6 100644
--- a/src/include/skalibs/avltree.h
+++ b/src/include/skalibs/avltree.h
@@ -21,13 +21,13 @@ struct avltree_s
extern avltree const avltree_zero ;
#define avltree_len(t) gensetdyn_n(&(t)->x)
#define avltree_totalsize(t) ((t)->x.storage.len)
-#define avltree_nodes(t) ((avlnode_ref)(t)->x.storage.s)
+#define avltree_nodes(t) ((avlnode *)(t)->x.storage.s)
#define avltree_data(t, i) (avltree_nodes(t)[i].data)
#define avltree_root(t) ((t)->root)
#define avltree_setroot(t, r) ((t)->root = (r))
-extern void avltree_free (avltree_ref) ;
-extern void avltree_init (avltree_ref, unsigned int, unsigned int, unsigned int, dtokfunc_t_ref, cmpfunc_t_ref, void *) ;
+extern void avltree_free (avltree *) ;
+extern void avltree_init (avltree *, unsigned int, unsigned int, unsigned int, dtokfunc_t_ref, cmpfunc_t_ref, void *) ;
#define AVLTREE_INIT(b, num, den, dtk, f, p) { .x = GENSETDYN_INIT(avlnode, (b), num, den), .root = (unsigned int)-1, .dtok = (dtk), .kcmp = (f), .external = (p) }
#define avltree_searchnode(t, k) avlnode_searchnode(avltree_nodes(t), avltree_totalsize(t), avltree_root(t), k, (t)->dtok, (t)->kcmp, (t)->external)
@@ -43,12 +43,12 @@ extern void avltree_init (avltree_ref, unsigned int, unsigned int, unsigned int,
#define avltree_min(t, data) avltree_extreme((t), 0, data)
#define avltree_max(t, data) avltree_extreme((t), 1, data)
-extern int avltree_newnode (avltree_ref, unsigned int, unsigned int *) ;
+extern int avltree_newnode (avltree *, unsigned int, unsigned int *) ;
#define avltree_insertnode(t, i) avltree_setroot(t, avlnode_insertnode(avltree_nodes(t), avltree_totalsize(t), avltree_root(t), i, (t)->dtok, (t)->kcmp, (t)->external))
-extern int avltree_insert (avltree_ref, unsigned int) ;
+extern int avltree_insert (avltree *, unsigned int) ;
#define avltree_deletenode(t, i) avltree_delete(t, (*(t)->dtok)(avltree_data(t, i)))
-extern int avltree_delete (avltree_ref, void const *) ;
+extern int avltree_delete (avltree *, void const *) ;
#define avltree_iter(t, f, p) avlnode_iter(avltree_nodes(t), avltree_totalsize(t), avltree_root(t), f, p)
diff --git a/src/include/skalibs/avltreen.h b/src/include/skalibs/avltreen.h
index 8151e9d..c453b99 100644
--- a/src/include/skalibs/avltreen.h
+++ b/src/include/skalibs/avltreen.h
@@ -23,11 +23,11 @@ struct avltreen_s
#define AVLTREEN_ZERO { .x = GENSET_ZERO, .root = (unsigned int)-1, .dtok = 0, .kcmp = 0, .external = 0 }
#define avltreen_totalsize(t) ((t)->x.max)
#define avltreen_len(t) genset_n(&(t)->x)
-#define avltreen_nodes(t) ((avlnode_ref)(t)->x.storage)
+#define avltreen_nodes(t) ((avlnode *)(t)->x.storage)
#define avltreen_data(t, i) (avltreen_nodes(t)[i].data)
#define avltreen_root(t) ((t)->root)
#define avltreen_setroot(t, r) ((t)->root = (r))
-extern void avltreen_init (avltreen_ref, avlnode_ref, unsigned int *, unsigned int, dtokfunc_t_ref, cmpfunc_t_ref, void *) ;
+extern void avltreen_init (avltreen *, avlnode *, unsigned int *, unsigned int, dtokfunc_t_ref, cmpfunc_t_ref, void *) ;
#define avltreen_searchnode(t, k) avlnode_searchnode(avltreen_nodes(t), avltreen_totalsize(t), avltreen_root(t), (k), (t)->dtok, (t)->kcmp, (t)->external)
#define avltreen_search(t, k, data) avlnode_search(avltreen_nodes(t), avltreen_totalsize(t), avltreen_root(t), k, (data), (t)->dtok, (t)->kcmp, (t)->external)
@@ -42,12 +42,12 @@ extern void avltreen_init (avltreen_ref, avlnode_ref, unsigned int *, unsigned i
#define avltreen_min(t, data) avltreen_extreme((t), 0, data)
#define avltreen_max(t, data) avltreen_extreme((t), 1, data)
-extern unsigned int avltreen_newnode (avltreen_ref, unsigned int) ;
+extern unsigned int avltreen_newnode (avltreen *, unsigned int) ;
#define avltreen_insertnode(t, i) avltreen_setroot(t, avlnode_insertnode(avltreen_nodes(t), avltreen_totalsize(t), avltreen_root(t), i, (t)->dtok, (t)->kcmp, (t)->external))
-extern int avltreen_insert (avltreen_ref, unsigned int) ;
+extern int avltreen_insert (avltreen *, unsigned int) ;
#define avltreen_deletenode(t, i) avltreen_delete(t, avltreen_data(t, i))
-extern int avltreen_delete (avltreen_ref, void const *) ;
+extern int avltreen_delete (avltreen *, void const *) ;
#define avltreen_iter(t, f, p) avlnode_iter(avltreen_nodes(t), avltreen_totalsize(t), avltreen_root(t), f, p)
@@ -58,7 +58,7 @@ extern int avltreen_delete (avltreen_ref, void const *) ;
#define avltreeb_init(t, size, dtk, f, p) avltreen_init(&(t)->info, (t)->storage, (t)->freelist, size, dtk, f, p)
#define avltreeb_totalsize(t) avltreen_totalsize(&(t)->info)
#define avltreeb_len(t) avltreen_len(&(t)->info)
-#define avltreeb_nodes(t) ((avlnode_ref)(t)->storage)
+#define avltreeb_nodes(t) ((avlnode *)(t)->storage)
#define avltreeb_data(t, i) (avltreeb_nodes(t)[i].data)
#define avltreeb_root(t) ((t)->info.root)
#define avltreeb_setroot(t, r) ((t)->info.root = (r))
diff --git a/src/include/skalibs/bufalloc.h b/src/include/skalibs/bufalloc.h
index c2779b6..2941311 100644
--- a/src/include/skalibs/bufalloc.h
+++ b/src/include/skalibs/bufalloc.h
@@ -17,7 +17,7 @@ struct bufalloc
#define BUFALLOC_ZERO { .x = STRALLOC_ZERO, .p = 0, .fd = -1, .op = 0 }
#define BUFALLOC_INIT(f, d) { .x = STRALLOC_ZERO, .p = 0, .fd = (d), .op = (f) }
-extern void bufalloc_init (bufalloc_ref, int (*)(int, char const *, unsigned int), int) ;
+extern void bufalloc_init (bufalloc *, int (*)(int, char const *, unsigned int), int) ;
#define bufalloc_shrink(ba) stralloc_shrink(&(ba)->x)
#define bufalloc_free(ba) stralloc_free(&(ba)->x)
#define bufalloc_put(ba, s, n) stralloc_catb(&(ba)->x, s, n)
@@ -25,12 +25,15 @@ extern void bufalloc_init (bufalloc_ref, int (*)(int, char const *, unsigned int
#define bufalloc_putv(ba, v, n) stralloc_catv(&(ba)->x, v, n)
#define bufalloc_fd(ba) ((ba)->fd)
extern int bufalloc_getfd (bufalloc const *) gccattr_pure ;
-extern int bufalloc_flush (bufalloc_ref) ;
-extern void bufalloc_clean (bufalloc_ref) ;
+extern int bufalloc_flush (bufalloc *) ;
+extern void bufalloc_clean (bufalloc *) ;
#define bufalloc_len(ba) ((ba)->x.len - (ba)->p)
extern unsigned int bufalloc_getlen (bufalloc const *) gccattr_pure ;
#define bufalloc_isempty(ba) ((ba)->x.len == (ba)->p)
-extern bufalloc_ref bufalloc_1, bufalloc_2 ;
+extern bufalloc bufalloc_1_ ;
+#define bufalloc_1 (&bufalloc_1_)
+extern bufalloc bufalloc_2_ ;
+#define bufalloc_2 (&bufalloc_2_)
#endif
diff --git a/src/include/skalibs/djbtime.h b/src/include/skalibs/djbtime.h
index 60a1d0b..8aace55 100644
--- a/src/include/skalibs/djbtime.h
+++ b/src/include/skalibs/djbtime.h
@@ -54,9 +54,9 @@ extern int utc_from_localtm (uint64 *, struct tm const *) ;
extern int localtm_from_tai (struct tm *, tai_t const *, int) ;
extern int tai_from_localtm (tai_t *, struct tm const *) ;
-extern int localtmn_from_tain (localtmn_t_ref, tain_t const *, int) ;
+extern int localtmn_from_tain (localtmn_t *, tain_t const *, int) ;
extern int tain_from_localtmn (tain_t *, localtmn_t const *) ;
-extern int localtmn_from_sysclock (localtmn_t_ref, tain_t const *, int) ;
+extern int localtmn_from_sysclock (localtmn_t *, tain_t const *, int) ;
extern int sysclock_from_localtmn (tain_t *, localtmn_t const *) ;
#define LOCALTM_FMT 21
@@ -65,6 +65,6 @@ extern unsigned int localtm_scan (char const *, struct tm *) ;
#define LOCALTMN_FMT 31
extern unsigned int localtmn_fmt (char *, localtmn_t const *) ;
-extern unsigned int localtmn_scan (char const *, localtmn_t_ref) ;
+extern unsigned int localtmn_scan (char const *, localtmn_t *) ;
#endif
diff --git a/src/include/skalibs/genset.h b/src/include/skalibs/genset.h
index 5eb47d7..5e27821 100644
--- a/src/include/skalibs/genset.h
+++ b/src/include/skalibs/genset.h
@@ -16,14 +16,14 @@ struct genset_s
} ;
#define GENSET_ZERO { .storage = 0, .freelist = 0, .esize = 1, .max = 0, .sp = 0 }
-extern void genset_init (genset_ref, void *, unsigned int *, unsigned int, unsigned int) ;
+extern void genset_init (genset *, void *, unsigned int *, unsigned int, unsigned int) ;
#define GENSET_init(g, type, storage, fl, size) genset_init(g, storage, fl, sizeof(type), size)
#define genset_p(type, g, i) ((type *)((g)->storage + (i) * (g)->esize))
-extern unsigned int genset_new (genset_ref) ;
-extern int genset_delete (genset_ref, unsigned int) ;
+extern unsigned int genset_new (genset *) ;
+extern int genset_delete (genset *, unsigned int) ;
#define genset_n(g) ((g)->max - (g)->sp)
-extern unsigned int genset_iter (genset_ref, iterfunc_t_ref, void *) ;
+extern unsigned int genset_iter (genset *, iterfunc_t_ref, void *) ;
#define GENSETB_TYPE(type, size) struct { type storage[size] ; unsigned int freelist[size] ; genset info ; }
diff --git a/src/include/skalibs/gensetdyn.h b/src/include/skalibs/gensetdyn.h
index 4fe396b..20dfde6 100644
--- a/src/include/skalibs/gensetdyn.h
+++ b/src/include/skalibs/gensetdyn.h
@@ -22,19 +22,19 @@ struct gensetdyn_s
extern gensetdyn const gensetdyn_zero ;
#define GENSETDYN_INIT(type, b, num, den) { .storage = STRALLOC_ZERO, .freelist = GENALLOC_ZERO, .esize = sizeof(type), .base = (b), .fracnum = (num), .fracden = (den) }
-extern void gensetdyn_init (gensetdyn_ref, unsigned int, unsigned int, unsigned int, unsigned int) ;
+extern void gensetdyn_init (gensetdyn *, unsigned int, unsigned int, unsigned int, unsigned int) ;
#define gensetdyn_n(g) ((g)->storage.len - genalloc_len(unsigned int, &(g)->freelist))
-extern int gensetdyn_ready (gensetdyn_ref, unsigned int) ;
+extern int gensetdyn_ready (gensetdyn *, unsigned int) ;
#define gensetdyn_readyplus(x, n) gensetdyn_ready(x, gensetdyn_n(x) + (n))
-extern void gensetdyn_free (gensetdyn_ref) ;
+extern void gensetdyn_free (gensetdyn *) ;
-extern int gensetdyn_new (gensetdyn_ref, unsigned int *) ;
-extern int gensetdyn_delete (gensetdyn_ref, unsigned int) ;
+extern int gensetdyn_new (gensetdyn *, unsigned int *) ;
+extern int gensetdyn_delete (gensetdyn *, unsigned int) ;
#define gensetdyn_p(g, i) ((g)->storage.s + (i) * (g)->esize)
#define GENSETDYN_P(type, g, i) ((type *)gensetdyn_p(g, i))
-extern unsigned int gensetdyn_iter (gensetdyn_ref, iterfunc_t_ref, void *) ;
+extern unsigned int gensetdyn_iter (gensetdyn *, iterfunc_t_ref, void *) ;
#endif
diff --git a/src/include/skalibs/iobuffer.h b/src/include/skalibs/iobuffer.h
index d9d44d8..93a98c5 100644
--- a/src/include/skalibs/iobuffer.h
+++ b/src/include/skalibs/iobuffer.h
@@ -58,7 +58,7 @@ typedef iobufferk_finish_func_t *iobufferk_finish_func_t_ref ;
extern iobufferk_io_func_t iobufferk_nosys ;
extern iobufferk_io_func_t iobufferk_isworking ;
-extern int iobufferk_init (iobufferk_ref, int, int) ;
+extern int iobufferk_init (iobufferk *, int, int) ;
extern iobufferk_io_func_t_ref const iobufferk_fill_f[4] ;
extern iobufferk_io_func_t_ref const iobufferk_flush_f[4] ;
extern iobufferk_finish_func_t_ref const iobufferk_finish_f[4] ;
diff --git a/src/include/skalibs/md5.h b/src/include/skalibs/md5.h
index 00e43cc..c5d61a8 100644
--- a/src/include/skalibs/md5.h
+++ b/src/include/skalibs/md5.h
@@ -14,8 +14,8 @@ struct MD5Schedule
} ;
#define MD5_INIT() { .buf = { 0x67452301UL, 0xefcdab89UL, 0x98badcfeUL, 0x10325476UL }, .bits = { 0, 0 }, .in = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" }
-extern void md5_init (MD5Schedule_ref) ;
-extern void md5_update (MD5Schedule_ref, char const *, unsigned int) ;
-extern void md5_final (MD5Schedule_ref, char * /* 16 chars */) ;
+extern void md5_init (MD5Schedule *) ;
+extern void md5_update (MD5Schedule *, char const *, unsigned int) ;
+extern void md5_final (MD5Schedule *, char * /* 16 chars */) ;
#endif
diff --git a/src/include/skalibs/rc4.h b/src/include/skalibs/rc4.h
index 16683ce..6bb8062 100644
--- a/src/include/skalibs/rc4.h
+++ b/src/include/skalibs/rc4.h
@@ -13,7 +13,7 @@ struct RC4Schedule
unsigned char x, y ;
} ;
-extern void rc4_init (RC4Schedule_ref, char const *, unsigned int) ;
-extern void rc4 (RC4Schedule_ref, char const *, char *, unsigned int) ;
+extern void rc4_init (RC4Schedule *, char const *, unsigned int) ;
+extern void rc4 (RC4Schedule *, char const *, char *, unsigned int) ;
#endif
diff --git a/src/include/skalibs/rrandom.h b/src/include/skalibs/rrandom.h
index 7f6a2aa..0678523 100644
--- a/src/include/skalibs/rrandom.h
+++ b/src/include/skalibs/rrandom.h
@@ -23,14 +23,14 @@ struct rrandom
#define RRANDOM_ZERO { .tries = { RRANDOMINFO_ZERO, RRANDOMINFO_ZERO, RRANDOMINFO_ZERO }, .n = 0 }
-extern int rrandom_add (rrandom_ref, int (*) (unirandom_ref)) ;
-extern int rrandom_finish (rrandom_ref) ;
+extern int rrandom_add (rrandom *, int (*) (unirandom *)) ;
+extern int rrandom_finish (rrandom *) ;
-extern unsigned int rrandom_read (rrandom_ref, char *, unsigned int, unsigned int (*) (unirandom_ref, char *, unsigned int)) ;
-extern unsigned int rrandom_readint (rrandom_ref, unsigned int, unsigned int (*) (unirandom_ref, char *, unsigned int)) ;
+extern unsigned int rrandom_read (rrandom *, char *, unsigned int, unsigned int (*) (unirandom *, char *, unsigned int)) ;
+extern unsigned int rrandom_readint (rrandom *, unsigned int, unsigned int (*) (unirandom *, char *, unsigned int)) ;
#define rrandom_readb(z, s, n) rrandom_read((z), (s), (n), &unirandom_readb)
#define rrandom_readnb(z, s, n) rrandom_read((z), (s), (n), &unirandom_readnb)
-extern unsigned int rrandom_name (rrandom_ref, char *, unsigned int, int) ;
+extern unsigned int rrandom_name (rrandom *, char *, unsigned int, int) ;
#endif
diff --git a/src/include/skalibs/sgetopt.h b/src/include/skalibs/sgetopt.h
index 367edf3..3c7a393 100644
--- a/src/include/skalibs/sgetopt.h
+++ b/src/include/skalibs/sgetopt.h
@@ -19,12 +19,12 @@ struct subgetopt_s
#define SUBGETOPT_ZERO { .ind = 1, .err = 1, .problem = 0, .arg = 0, .pos = 0, .prog = 0 }
-extern int subgetopt_r (int, char const *const *, char const *, subgetopt_t_ref) ;
+extern int subgetopt_r (int, char const *const *, char const *, subgetopt_t *) ;
/* non-reentrant */
-extern int sgetopt_r (int, char const *const *, char const *, subgetopt_t_ref) ;
+extern int sgetopt_r (int, char const *const *, char const *, subgetopt_t *) ;
extern subgetopt_t subgetopt_here ;
diff --git a/src/include/skalibs/sha1.h b/src/include/skalibs/sha1.h
index 03cdaf0..be252ba 100644
--- a/src/include/skalibs/sha1.h
+++ b/src/include/skalibs/sha1.h
@@ -15,8 +15,8 @@ struct SHA1Schedule
} ;
#define SHA1_INIT() { .buf = { 0x67452301UL, 0xefcdab89UL, 0x98badcfeUL, 0x10325476UL, 0xc3d2e1f0UL }, .bits = { 0, 0 }, .in = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, .b = 0 }
-extern void sha1_init (SHA1Schedule_ref) ;
-extern void sha1_update (SHA1Schedule_ref, char const *, unsigned int) ;
-extern void sha1_final (SHA1Schedule_ref, char * /* 20 chars */) ;
+extern void sha1_init (SHA1Schedule *) ;
+extern void sha1_update (SHA1Schedule *, char const *, unsigned int) ;
+extern void sha1_final (SHA1Schedule *, char * /* 20 chars */) ;
#endif
diff --git a/src/include/skalibs/sha256.h b/src/include/skalibs/sha256.h
index 8f28c38..3675211 100644
--- a/src/include/skalibs/sha256.h
+++ b/src/include/skalibs/sha256.h
@@ -22,8 +22,8 @@ struct SHA256Schedule_s
} ;
#define SHA256_INIT() { .buf = { 0x6a09e667UL, 0xbb67ae85UL, 0x3c6ef372UL, 0xa54ff53aUL, 0x510e527fUL, 0x9b05688cUL, 0x1f83d9abUL, 0x5be0cd19UL }, .bits = { 0, 0 }, .in = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, .b = 0 }
-extern void sha256_init (SHA256Schedule_ref) ;
-extern void sha256_update (SHA256Schedule_ref, char const *, unsigned int) ;
-extern void sha256_final (SHA256Schedule_ref, char *digest) ;
+extern void sha256_init (SHA256Schedule *) ;
+extern void sha256_update (SHA256Schedule *, char const *, unsigned int) ;
+extern void sha256_final (SHA256Schedule *, char *digest) ;
#endif
diff --git a/src/include/skalibs/surf.h b/src/include/skalibs/surf.h
index 6422903..aa872e1 100644
--- a/src/include/skalibs/surf.h
+++ b/src/include/skalibs/surf.h
@@ -16,14 +16,11 @@ struct SURFSchedule
#define SURFSCHEDULE_ZERO { .seed = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, .in = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, .out = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", .pos = 32 }
-extern void surf_sinit (SURFSchedule_ref, char const *) ; /* 160 chars */
-extern void surf (SURFSchedule_ref, char *, unsigned int) ;
-
-
- /* The following functions need libstdcrypto.a */
+extern void surf_sinit (SURFSchedule *, char const *) ; /* 160 chars */
+extern void surf (SURFSchedule *, char *, unsigned int) ;
extern void surf_makeseed (char *) ; /* fills 160 chars */
-extern void surf_init (SURFSchedule_ref) ;
-extern void surf_autoinit (SURFSchedule_ref, char *, unsigned int) ;
+extern void surf_init (SURFSchedule *) ;
+extern void surf_autoinit (SURFSchedule *, char *, unsigned int) ;
#endif
diff --git a/src/include/skalibs/unirandom.h b/src/include/skalibs/unirandom.h
index fc87886..ecbe6de 100644
--- a/src/include/skalibs/unirandom.h
+++ b/src/include/skalibs/unirandom.h
@@ -43,15 +43,14 @@ struct unirandom
#define UNIRANDOM_ZERO { .readb = 0, .readnb = 0, .init = 0, .finish = 0, .data = UNIRANDOMINFO_ZERO, .initted = 0 }
-extern int unirandom_register_devrandom (unirandom_ref) ;
-extern int unirandom_register_devurandom (unirandom_ref) ;
-extern int unirandom_register_hasegd (unirandom_ref) ;
-extern int unirandom_register_surf (unirandom_ref) ;
-
-extern int unirandom_init (unirandom_ref) ;
-extern unsigned int unirandom_readb (unirandom_ref, char *, unsigned int) ;
-extern unsigned int unirandom_readnb (unirandom_ref, char *, unsigned int) ;
-extern int unirandom_finish (unirandom_ref) ;
-
+extern int unirandom_register_devrandom (unirandom *) ;
+extern int unirandom_register_devurandom (unirandom *) ;
+extern int unirandom_register_hasegd (unirandom *) ;
+extern int unirandom_register_surf (unirandom *) ;
+
+extern int unirandom_init (unirandom *) ;
+extern unsigned int unirandom_readb (unirandom *, char *, unsigned int) ;
+extern unsigned int unirandom_readnb (unirandom *, char *, unsigned int) ;
+extern int unirandom_finish (unirandom *) ;
#endif
diff --git a/src/include/skalibs/unix-timed.h b/src/include/skalibs/unix-timed.h
index f5a25b6..5fad179 100644
--- a/src/include/skalibs/unix-timed.h
+++ b/src/include/skalibs/unix-timed.h
@@ -26,9 +26,9 @@ extern int buffer_timed_flush (buffer *, tain_t const *, tain_t *) ;
extern unsigned int buffer_timed_get (buffer *, char *, unsigned int, tain_t const *, tain_t *) ;
#define buffer_timed_get_g(b, buf, buflen, deadline) buffer_timed_get(b, buf, buflen, (deadline), &STAMP)
-extern int timed_getln (buffer_ref, stralloc *, char, tain_t const *, tain_t *) ;
+extern int timed_getln (buffer *, stralloc *, char, tain_t const *, tain_t *) ;
#define timed_getln_g(b, sa, sep, deadline) timed_getln(b, sa, sep, (deadline), &STAMP)
-extern int timed_getlnmax (buffer_ref, char *, unsigned int, unsigned int *, char, tain_t const *, tain_t *) ;
+extern int timed_getlnmax (buffer *, char *, unsigned int, unsigned int *, char, tain_t const *, tain_t *) ;
#define timed_getlnmax_g(b, max, maxlen, len, sep, deadline) timed_getlnmax(b, max, maxlen, len, sep, (deadline), &STAMP)
extern int netstring_timed_get (buffer *, stralloc *, tain_t const *, tain_t *) ;
#define netstring_timed_get_g(b, sa, deadline) netstring_timed_get(b, sa, (deadline), &STAMP)
diff --git a/src/include/skalibs/unix-transactional.h b/src/include/skalibs/unix-transactional.h
index e1545e0..b811c99 100644
--- a/src/include/skalibs/unix-transactional.h
+++ b/src/include/skalibs/unix-transactional.h
@@ -44,12 +44,12 @@ struct dirdescriptor_s
#define DIRDESCRIPTOR_ZERO { .fd = 0, .lnkfn = 0, .new = STRALLOC_ZERO }
-extern int dd_open_read (dirdescriptor_t_ref, char const *) ;
-extern int dd_open_write (dirdescriptor_t_ref, char const *, unsigned int) ;
-extern int dd_close (dirdescriptor_t_ref) ; /* after dd_open_read */
-extern void dd_cancel (dirdescriptor_t_ref) ; /* after dd_open_write */
-extern int dd_commit (dirdescriptor_t_ref) ; /* after dd_open_write */
-extern int dd_commit_devino (dirdescriptor_t_ref, uint64 *, uint64 *) ; /* after dd_open_write */
+extern int dd_open_read (dirdescriptor_t *, char const *) ;
+extern int dd_open_write (dirdescriptor_t *, char const *, unsigned int) ;
+extern int dd_close (dirdescriptor_t *) ; /* after dd_open_read */
+extern void dd_cancel (dirdescriptor_t *) ; /* after dd_open_write */
+extern int dd_commit (dirdescriptor_t *) ; /* after dd_open_write */
+extern int dd_commit_devino (dirdescriptor_t *, uint64 *, uint64 *) ; /* after dd_open_write */
#define dd_openreadnclose(blah, file, s, len) openreadnclose_at((blah)->fd, file, s, len)
#define dd_openslurpclose(blah, file, sa) openslurpclose_at((blah)->fd, file, sa)