From 5ae436304a6686d3b6bcaa64e4f028490b7108ce Mon Sep 17 00:00:00 2001 From: Michal Vaner Date: Wed, 10 Sep 2008 11:22:38 +0200 Subject: [PATCH] b224 is deprecated by basecode --- ucw/utils/Makefile | 3 +-- ucw/utils/b224.c | 66 ---------------------------------------------- 2 files changed, 1 insertion(+), 68 deletions(-) delete mode 100644 ucw/utils/b224.c diff --git a/ucw/utils/Makefile b/ucw/utils/Makefile index e7892722..5bb5e643 100644 --- a/ucw/utils/Makefile +++ b/ucw/utils/Makefile @@ -1,13 +1,12 @@ # Makefile for the UCW utilities (c) 2008 Michal Vaner -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 index 501bd143..00000000 --- a/ucw/utils/b224.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * A Program For Manipulation With Base224 Encoded Files - * - * (c) 2002 Martin Mares - */ - -#include "ucw/lib.h" -#include "ucw/fastbuf.h" -#include "ucw/base224.h" - -#include - -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; -} -- 2.39.2