]> mj.ucw.cz Git - libucw.git/commitdiff
b224 is deprecated by basecode
authorMichal Vaner <vorner@ucw.cz>
Wed, 10 Sep 2008 09:22:38 +0000 (11:22 +0200)
committerMartin Mares <mj@ucw.cz>
Wed, 10 Sep 2008 19:14:11 +0000 (21:14 +0200)
ucw/utils/Makefile
ucw/utils/b224.c [deleted file]

index e7892722f8a53f7938c13c9f144327163c123ddb..5bb5e643eb60af4b63a6e3524b159d489fa1a235 100644 (file)
@@ -1,13 +1,12 @@
 # Makefile for the UCW utilities (c) 2008 Michal Vaner <vorner@ucw.cz>
 
-PROGS+=$(addprefix $(o)/ucw/utils/,b224 basecode daemon-helper rotate-log urltool)
+PROGS+=$(addprefix $(o)/ucw/utils/,basecode daemon-helper rotate-log urltool)
 DIRS+=ucw/utils
 
 ifdef CONFIG_DEBUG
 PROGS+=$(o)/ucw/utils/hex
 endif
 
-$(o)/ucw/utils/b224: $(o)/ucw/utils/b224.o $(LIBUCW)
 $(o)/ucw/utils/basecode: $(o)/ucw/utils/basecode.o $(LIBUCW)
 $(o)/ucw/utils/daemon-helper: $(o)/ucw/utils/daemon-helper.o $(LIBUCW)
 $(o)/ucw/utils/hex: $(o)/ucw/utils/hex.o $(LIBUCW)
diff --git a/ucw/utils/b224.c b/ucw/utils/b224.c
deleted file mode 100644 (file)
index 501bd14..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- *     A Program For Manipulation With Base224 Encoded Files
- *
- *     (c) 2002 Martin Mares <mj@ucw.cz>
- */
-
-#include "ucw/lib.h"
-#include "ucw/fastbuf.h"
-#include "ucw/base224.h"
-
-#include <stdio.h>
-
-int main(int argc, char **argv)
-{
-  struct fastbuf *in = bfdopen_shared(0, 4096);
-  struct fastbuf *out = bfdopen_shared(1, 4096);
-  byte ib[BASE224_IN_CHUNK*10], ob[BASE224_OUT_CHUNK*10], *b;
-  uns il, ol;
-
-  if (argc != 2 || argv[1][0] != '-')
-    goto usage;
-
-  switch (argv[1][1])
-    {
-    case 'e':                          /* Plain encoding */
-      while (il = bread(in, ib, sizeof(ib)))
-       {
-         ol = base224_encode(ob, ib, il);
-         bwrite(out, ob, ol);
-       }
-      break;
-    case 'E':                          /* Line block encoding */
-      while (il = bread(in, ib, BASE224_IN_CHUNK*6))
-       {
-         ol = base224_encode(ob, ib, il);
-         bputc(out, 'N');
-         bwrite(out, ob, ol);
-         bputc(out, '\n');
-       }
-      break;
-    case 'd':                          /* Plain decoding */
-      while (ol = bread(in, ob, sizeof(ob)))
-       {
-         il = base224_decode(ib, ob, ol);
-         bwrite(out, ib, il);
-       }
-      break;
-    case 'D':                          /* Line block decoding */
-      while (b = bgets(in, ob, sizeof(ob)))
-       {
-         if (!ob[0])
-           die("Invalid line syntax");
-         il = base224_decode(ib, ob+1, b-ob-1);
-         bwrite(out, ib, il);
-       }
-      break;
-    default:
-    usage:
-      fputs("Usage: b224 (-e|-E|-d|-D)\n", stderr);
-      return 1;
-    }
-
-  bclose(in);
-  bclose(out);
-  return 0;
-}