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");
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};
/* 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));