--- al.h 2002/10/18 12:24:53 1.12
+++ al.h 2002/10/22 15:33:16 1.13
@@ -46,6 +46,8 @@
struct al_chunk_st;
typedef struct al_chunk_st al_chunk_t;
+typedef void *al_label_t;
+
typedef enum {
AL_FORWARD,
AL_BACKWARD
@@ -56,25 +58,27 @@
al_rc_t al_create (al_t **alp);
al_rc_t al_destroy (al_t *al);
-al_rc_t al_append_bytes (al_t *al, const char *src, size_t n);
-al_rc_t al_prepend_bytes(al_t *al, const char *src, size_t n);
-al_rc_t al_attach_buffer(al_t *al, char *p, size_t n, void (*freemem)(char *, size_t, void *), void *u);
+al_rc_t al_append_bytes (al_t *al, const char *src, size_t n, al_label_t label);
+al_rc_t al_prepend_bytes(al_t *al, const char *src, size_t n, al_label_t label);
+al_rc_t al_attach_buffer(al_t *al, char *p, size_t n, al_label_t label, void (*freemem)(char *, size_t, void *), void *u);
al_rc_t al_txalloc (al_t *al, al_tx_t **txp);
al_rc_t al_txfree (al_t *al, al_tx_t *tx);
-al_rc_t al_traverse (al_t *al, size_t off, size_t n, al_td_t dir, al_tx_t *tx);
+al_rc_t al_traverse (al_t *al, size_t off, size_t n, al_td_t dir, al_label_t label, al_tx_t *tx);
al_rc_t al_traverse_next(al_t *al, al_tx_t *tx, al_chunk_t **alcp);
al_rc_t al_traverse_end (al_t *al, al_tx_t *tx, int final);
-al_rc_t al_traverse_cb (al_t *al, size_t off, size_t n, al_td_t dir, al_rc_t (*cb)(al_chunk_t *, void *), void *u);
-al_rc_t al_copy (al_t *al, size_t off, size_t n, al_t *tal);
+al_rc_t al_traverse_cb (al_t *al, size_t off, size_t n, al_td_t dir, al_label_t, al_rc_t (*cb)(al_chunk_t *, void *), void *u);
+al_rc_t al_copy (al_t *al, size_t off, size_t n, al_label_t label, al_t *tal);
al_rc_t al_splice (al_t *al, size_t off, size_t n, al_t *nal, al_t *tal);
-al_rc_t al_flatten (al_t *al, size_t off, size_t n, char *dst, size_t *lenp);
+al_rc_t al_flatten (al_t *al, size_t off, size_t n, al_label_t label, char *dst, size_t *lenp);
-size_t al_bytes (const al_t *al);
-size_t al_chunk_len (al_chunk_t *alc);
-size_t al_chunk_span(al_chunk_t *alc, size_t off, size_t n);
-char *al_chunk_ptr (al_chunk_t *alc, size_t off);
+size_t al_bytes (const al_t *al);
+size_t al_chunk_len (al_chunk_t *alc);
+al_label_t al_chunk_label(al_chunk_t *alc);
+int al_same_label (al_chunk_t *alc, al_label_t label);
+size_t al_chunk_span (al_chunk_t *alc, size_t off, size_t n);
+char *al_chunk_ptr (al_chunk_t *alc, size_t off);
-const char *al_error(al_rc_t rc);
+const char *al_error (al_rc_t rc);
#endif /* __AL_H__ */
|