summaryrefslogtreecommitdiffstats
path: root/src/defs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/defs.h')
-rw-r--r--src/defs.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/defs.h b/src/defs.h
index 5d632c3..0d543d7 100644
--- a/src/defs.h
+++ b/src/defs.h
@@ -49,9 +49,6 @@
# endif
#endif
-#define get(in) (in->settings->access == cached ? in->get_next_element_cache(in) : in->get_next_element_direct(in))
-#define put(in, data) (in->settings->access == cached ? in->place_next_element_cache(in, data) : in->place_next_element_direct(in, data))
-
union nextoff {
struct entry_l *next;
void *nextaddr;
@@ -96,7 +93,7 @@ enum streamtype {
stream_invalid,
stream_in,
stream_out,
- stream_outlite,
+ stream_lite,
stream_cache,
stream_randread
};
@@ -110,12 +107,11 @@ struct stream {
struct entry_l *cnode; /* "current" node */
union cachewrap;
struct settings *settings;
- struct entry_l *(*get_next_element_direct)(struct stream * const);
- struct entry_l *(*get_next_element_cache)(struct stream * const);
- int (*place_next_element_direct)(struct stream * const, struct entry_l const * const);
- int (*place_next_element_cache)(struct stream * const, struct entry_l const * const);
+ struct entry_l *(*get)(struct stream * const);
+ int (*put)(struct stream * const, struct entry_l const * const);
int (*split)(struct stream * const, struct stream * const, struct stream * const);
- int (*rewind)(struct stream * const);
+ int (*rewind)(struct stream * restrict const);
+ int (*copy)(struct stream * restrict const, struct stream * restrict const);
};
struct settings {