From 125462cff18fd1757ca467214d9c21808f02a8e1 Mon Sep 17 00:00:00 2001 From: Laurent Mazet Date: Fri, 9 Dec 2022 14:45:37 +0100 Subject: [PATCH] cleaning and bug fix --- compress.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/compress.c b/compress.c index ea65038..713fc5b 100644 --- a/compress.c +++ b/compress.c @@ -27,7 +27,6 @@ char *progname = NULL; int usage (int ret) { - //int fd = ret ? STDERR_FILENO : STDOUT_FILENO; int fd = ret ? _fderr : _fdout; fdprintf (fd, "usage: %s\n", progname); fdprintf (fd, " -h : help message\n"); @@ -38,14 +37,8 @@ int usage (int ret) return ret; } -void blkcpy (void *dst, const void *src, int len) -{ - while (len--) { - *((char *)dst++) = *((char *)src++); - } -} - /* create occurence table */ + int *create_table (char *filename) { byte_t buffer[BUFFER_SIZE] = {0}; @@ -58,7 +51,7 @@ int *create_table (char *filename) /* open file */ fid = open (filename, O_RDONLY|O_RAW); if (fid == -1) { - VERBOSE (ERROR, PRINTERR ("can't open file '%s'\n", filename/); + VERBOSE (ERROR, PRINTERR ("can't open file '%s'\n", filename)); return NULL; } VERBOSE (INFO, PRINTOUT ("file '%s' opened\n", filename)); -- 2.30.2