Soft'N'Design Software
/
projects
/
compress.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e75046f
)
cleaning and bug fix
author
Laurent Mazet
<laurent.mazet@thalesgroup.com>
Fri, 9 Dec 2022 13:45:37 +0000
(14:45 +0100)
committer
Laurent Mazet
<laurent.mazet@thalesgroup.com>
Fri, 9 Dec 2022 13:45:37 +0000
(14:45 +0100)
compress.c
patch
|
blob
|
blame
|
history
diff --git
a/compress.c
b/compress.c
index ea65038032707bf22d3ea6396221d19cba6ab0ef..713fc5b0b94b415e6cfaa74db3a918da74d370e1 100644
(file)
--- a/
compress.c
+++ b/
compress.c
@@
-27,7
+27,6
@@
char *progname = NULL;
int usage (int ret)
{
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");
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;
}
return ret;
}
-void blkcpy (void *dst, const void *src, int len)
-{
- while (len--) {
- *((char *)dst++) = *((char *)src++);
- }
-}
-
/* create occurence table */
/* create occurence table */
+
int *create_table (char *filename)
{
byte_t buffer[BUFFER_SIZE] = {0};
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) {
/* 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));
return NULL;
}
VERBOSE (INFO, PRINTOUT ("file '%s' opened\n", filename));