]> mj.ucw.cz Git - libucw.git/blobdiff - lib/lib.h
Put back the work-around for objects generated by an old version of the
[libucw.git] / lib / lib.h
index c1709ea21a32b05c8d453b89a6946d6dc2906450..6ed45a9a3e28c637aa85ac1b212e733bf8b5048f 100644 (file)
--- a/lib/lib.h
+++ b/lib/lib.h
@@ -1,7 +1,7 @@
 /*
  *     Sherlock Library -- Miscellaneous Functions
  *
- *     (c) 1997--2001 Martin Mares <mj@ucw.cz>
+ *     (c) 1997--2003 Martin Mares <mj@ucw.cz>
  *
  *     This software may be freely distributed and used according to the terms
  *     of the GNU Lesser General Public License.
@@ -48,7 +48,8 @@
 #define L_ERROR_R      'e'
 #define L_FATAL                '!'             /* die() */
 
-void log(unsigned int cat, const char *msg, ...) __attribute__((format(printf,2,3)));
+void log_msg(unsigned int cat, const char *msg, ...) __attribute__((format(printf,2,3)));
+#define log log_msg
 void die(byte *, ...) NONRET;
 void log_init(byte *);
 void log_file(byte *);
@@ -96,43 +97,13 @@ void *xrealloc(void *, unsigned);
 void *xmalloc_zero(unsigned);
 byte *stralloc(byte *);
 
-/* Objects */
-
-struct fastbuf;
-
-struct odes {                          /* Object description */
-  struct oattr *attrs;
-  struct mempool *pool, *local_pool;
-};
-
-struct oattr {                         /* Object attribute */
-  struct oattr *next, *same, *last_same;
-  byte attr;
-  byte val[1];
-};
-
-void obj_dump(struct odes *);
-struct odes *obj_new(struct mempool *);
-void obj_free(struct odes *);
-int obj_read(struct fastbuf *, struct odes *);
-void obj_write(struct fastbuf *, struct odes *);
-struct oattr *obj_find_attr(struct odes *, uns);
-struct oattr *obj_find_attr_last(struct odes *, uns);
-uns obj_del_attr(struct odes *, struct oattr *);
-byte *obj_find_aval(struct odes *, uns);
-struct oattr *obj_set_attr(struct odes *, uns, byte *);
-struct oattr *obj_set_attr_num(struct odes *, uns, uns);
-struct oattr *obj_add_attr(struct odes *, struct oattr *, uns, byte *);
-struct oattr *obj_prepend_attr(struct odes *, uns, byte *);
-struct oattr *obj_insert_attr(struct odes *o, struct oattr *first, struct oattr *after, byte *v);
-
 /* Content-Type pattern matching and filters */
 
 int match_ct_patt(byte *, byte *);
 
 /* log2.c */
 
-int log2(u32);
+int fls(u32);
 
 /* wordsplit.c */