]> mj.ucw.cz Git - libucw.git/commitdiff
deleted obj_attr_to_bucket*(). sorry, I like them, however I have already
authorRobert Spalek <robert@ucw.cz>
Mon, 28 Jun 2004 11:44:00 +0000 (11:44 +0000)
committerRobert Spalek <robert@ucw.cz>
Mon, 28 Jun 2004 11:44:00 +0000 (11:44 +0000)
converted all sources to my version of these functions.  if we reintroduce
them, let us put them to obj2buck.[ch]

lib/buck2obj.c
lib/buck2obj.h

index ee45116eb57ca76d1cb688218247a68e5b914228..c0ee98c66af9486f34338353dfc4e0fec629b9a9 100644 (file)
@@ -187,37 +187,3 @@ obj_read_bucket(struct buck2obj_buf *buf, uns buck_type, uns buck_len, struct fa
   }
   return o;
 }
-
-byte *
-obj_attr_to_bucket(byte *buf, uns buck_type, uns attr, byte *val)
-{
-  uns l;
-
-  switch (buck_type)
-    {
-    case BUCKET_TYPE_PLAIN:
-    case BUCKET_TYPE_V30:
-      buf += sprintf(buf, "%c%s\n", attr, val);
-      break;
-    case BUCKET_TYPE_V33:
-    case BUCKET_TYPE_V33_LIZARD:
-      l = strlen(val) + 1;
-      PUT_UTF8(buf, l);
-      l--;
-      memcpy(buf, val, l);
-      buf += l;
-      *buf++ = attr;
-      break;
-    default:
-      die("obj_attr_to_bucket called for unknown type %08x", buck_type);
-    }
-  return buf;
-}
-
-byte *
-obj_attr_to_bucket_num(byte *buf, uns buck_type, uns attr, uns val)
-{
-  byte vbuf[16];
-  sprintf(vbuf, "%d", val);
-  return obj_attr_to_bucket(buf, buck_type, attr, vbuf);
-}
index 950e5d0c330c84d10b8a7dbb1fd0c007eb6a3aa7..e83015cdecec42672b9317110acc557c5178a7c2 100644 (file)
@@ -18,7 +18,3 @@ struct odes *obj_read_bucket(struct buck2obj_buf *buf, uns buck_type, uns buck_l
    * been tampered with (unless the bucket is larger than the buffer).  In such
    * a case, you must call bflush(body) before you do anything else than
    * sequential read.  */
-
-/* FIXME: These functions should be put somewhere else */
-byte *obj_attr_to_bucket(byte *buf, uns buck_type, uns attr, byte *val);
-byte *obj_attr_to_bucket_num(byte *buf, uns buck_type, uns attr, uns val);