]> mj.ucw.cz Git - libucw.git/commitdiff
Merged obj2buck.h and buck2obj.h to object.h, the number of includes
authorMartin Mares <mj@ucw.cz>
Tue, 6 Jul 2004 11:02:45 +0000 (11:02 +0000)
committerMartin Mares <mj@ucw.cz>
Tue, 6 Jul 2004 11:02:45 +0000 (11:02 +0000)
started to grow insane.

lib/buck2obj.c
lib/buck2obj.h [deleted file]
lib/obj2buck.c
lib/obj2buck.h [deleted file]
lib/object.h

index e71fa21fd2bcbf565f2eed9f69d4c0f4fbc8a57e..3e7b78fc96ab532994013ec711f4d8b9768f9ac6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *     Bucket -> Object Converter
+ *     Generating Objects from Buckets
  *
  *     (c) 2004, Robert Spalek <robert@ucw.cz>
  *     (c) 2004, Martin Mares <mj@ucw.cz>
@@ -13,7 +13,6 @@
 #include "lib/object.h"
 #include "lib/bucket.h"
 #include "lib/lizard.h"
-#include "lib/buck2obj.h"
 #include "lib/bbuf.h"
 
 #include <stdlib.h>
diff --git a/lib/buck2obj.h b/lib/buck2obj.h
deleted file mode 100644 (file)
index 6e11c3a..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- *     Bucket -> Object converter
- *
- *     (c) 2004, Robert Spalek <robert@ucw.cz>
- */
-
-struct buck2obj_buf;
-struct mempool;
-struct odes;
-
-struct buck2obj_buf *buck2obj_alloc(void);
-void buck2obj_free(struct buck2obj_buf *buf);
-
-int buck2obj_parse(struct buck2obj_buf *buf, uns buck_type, uns buck_len, struct fastbuf *body, struct odes *o_hdr, uns *body_start, struct odes *o_body);
-struct odes *obj_read_bucket(struct buck2obj_buf *buf, struct mempool *pool, uns buck_type, uns buck_len, struct fastbuf *body, uns *body_start);
-  /* If body_start != NULL, then only the header is parsed and *body_start is
-   * set to the position of the body. This function does a plenty of optimizations
-   * and if the body fastbuf is overwritable (body->can_overwrite_buffer), it can keep the
-   * attribute values stored on their original locations in the fastbuf's buffer.
-   * However, no such things are performed when reading the header only.
-   */
index 2a2fd1c97b1b98504e690faf81ed037b5e609c17..7fee3d54a145a663aad7ca1393697a2cdcd24d93 100644 (file)
@@ -1,13 +1,16 @@
 /*
- *     Generating V33 buckets
+ *     Generating Buckets from Objects
  *
  *     (c) 2004, Robert Spalek <robert@ucw.cz>
+ *
+ *     This software may be freely distributed and used according to the terms
+ *     of the GNU Lesser General Public License.
  */
 
 #include "lib/lib.h"
 #include "lib/fastbuf.h"
-#include "lib/obj2buck.h"
 #include "lib/bucket.h"
+#include "lib/object.h"
 #include "charset/unistream.h"
 
 #include <string.h>
diff --git a/lib/obj2buck.h b/lib/obj2buck.h
deleted file mode 100644 (file)
index 0b6f72e..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- *     Generating V33 buckets
- *
- *     (c) 2004, Robert Spalek <robert@ucw.cz>
- */
-
-void attr_set_type(uns type);
-
-byte *put_attr(byte *ptr, uns type, byte *val, uns len);
-byte *put_attr_str(byte *ptr, uns type, byte *val);
-byte *put_attr_vformat(byte *ptr, uns type, byte *mask, va_list va);
-byte *put_attr_format(byte *ptr, uns type, char *mask, ...) __attribute__((format(printf,3,4)));
-byte *put_attr_num(byte *ptr, uns type, uns val);
-
-struct fastbuf;
-void bput_attr(struct fastbuf *b, uns type, byte *val, uns len);
-void bput_attr_str(struct fastbuf *b, uns type, byte *val);
-void bput_attr_vformat(struct fastbuf *b, uns type, byte *mask, va_list va);
-void bput_attr_format(struct fastbuf *b, uns type, char *mask, ...) __attribute__((format(printf,3,4)));
-void bput_attr_num(struct fastbuf *b, uns type, uns val);
index 5f43414072d091b61823ef8244c07a368f5f53e3..7ec9965855bb571542d2fb2ce6c1681bba21921b 100644 (file)
@@ -1,7 +1,8 @@
 /*
  *     Sherlock Library -- Object Functions
  *
- *     (c) 1997--2003 Martin Mares <mj@ucw.cz>
+ *     (c) 1997--2004 Martin Mares <mj@ucw.cz>
+ *     (c) 2004, Robert Spalek <robert@ucw.cz>
  *
  *     This software may be freely distributed and used according to the terms
  *     of the GNU Lesser General Public License.
@@ -13,6 +14,7 @@
 #define MAX_ATTR_SIZE 1024             /* Maximum length an attribute can ever have (including name and trailing 0) */
 
 struct fastbuf;
+struct mempool;
 
 struct odes {                          /* Object description */
   struct oattr *attrs;
@@ -45,4 +47,36 @@ struct oattr *obj_insert_attr(struct odes *o, struct oattr *first, struct oattr
 void obj_move_attr_to_head(struct odes *o, uns);
 void obj_move_attr_to_tail(struct odes *o, uns);
 
+/* buck2obj.c: Reading of objects from buckets */
+
+struct buck2obj_buf;
+
+struct buck2obj_buf *buck2obj_alloc(void);
+void buck2obj_free(struct buck2obj_buf *buf);
+
+int buck2obj_parse(struct buck2obj_buf *buf, uns buck_type, uns buck_len, struct fastbuf *body, struct odes *o_hdr, uns *body_start, struct odes *o_body);
+struct odes *obj_read_bucket(struct buck2obj_buf *buf, struct mempool *pool, uns buck_type, uns buck_len, struct fastbuf *body, uns *body_start);
+  /* If body_start != NULL, then only the header is parsed and *body_start is
+   * set to the position of the body. This function does a plenty of optimizations
+   * and if the body fastbuf is overwritable (body->can_overwrite_buffer), it can keep the
+   * attribute values stored on their original locations in the fastbuf's buffer.
+   * However, no such things are performed when reading the header only.
+   */
+
+/* obj2buck.c: Generating buckets from objects */
+
+void attr_set_type(uns type);
+
+byte *put_attr(byte *ptr, uns type, byte *val, uns len);
+byte *put_attr_str(byte *ptr, uns type, byte *val);
+byte *put_attr_vformat(byte *ptr, uns type, byte *mask, va_list va);
+byte *put_attr_format(byte *ptr, uns type, char *mask, ...) __attribute__((format(printf,3,4)));
+byte *put_attr_num(byte *ptr, uns type, uns val);
+
+void bput_attr(struct fastbuf *b, uns type, byte *val, uns len);
+void bput_attr_str(struct fastbuf *b, uns type, byte *val);
+void bput_attr_vformat(struct fastbuf *b, uns type, byte *mask, va_list va);
+void bput_attr_format(struct fastbuf *b, uns type, char *mask, ...) __attribute__((format(printf,3,4)));
+void bput_attr_num(struct fastbuf *b, uns type, uns val);
+
 #endif