#include "file.h"#include "magic.h"#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <string.h>#include <sys/types.h>#include <sys/param.h>#include <sys/stat.h>#include <fcntl.h>#include <netinet/in.h>#include "patchlevel.h"Go to the source code of this file.
Defines | |
| #define | SYMLINKFLAG "" |
| #define | USAGE "Usage: %s [-bcik" SYMLINKFLAG "nNsvz] [-f namefile] [-F separator] [-m magicfiles] file...\n %s -C -m magicfiles\n" |
| #define | MAXPATHLEN 512 |
| #define | OPTSTRING "bcCdf:F:ikLm:nNprsvz" |
Functions | |
| static const char * | rcsid (const char *p) |
| static void | unwrap (char *fn) |
| static void | usage (void) |
| static void | process (const char *inname, int wid) |
| static void | load (const char *m, int flags) |
| int | main (int argc, char *argv[]) |
| size_t | file_mbswidth (const char *s) |
Variables | |
| static int | bflag = 0 |
| static int | nopad = 0 |
| static int | nobuffer = 0 |
| static const char * | magicfile = 0 |
| static const char * | default_magicfile = "/etc/magic" |
| static const char * | separator = ":" |
| static char * | progname |
| static struct magic_set * | magic |
| #define OPTSTRING "bcCdf:F:ikLm:nNprsvz" |
Referenced by main().
| #define USAGE "Usage: %s [-bcik" SYMLINKFLAG "nNsvz] [-f namefile] [-F separator] [-m magicfiles] file...\n %s -C -m magicfiles\n" |
| size_t file_mbswidth | ( | const char * | s | ) |
| static void load | ( | const char * | m, | |
| int | flags | |||
| ) | [static] |
| int main | ( | int | argc, | |
| char * | argv[] | |||
| ) |
Definition at line 140 of file file.c.
References bflag, magic_set::c, errno, FILE_CHECK, FILE_COMPILE, file_mbswidth(), magic_set::flags, getenv(), load(), magic, nobuffer, nopad, OPTSTRING, process(), setlocale, strerror, unwrap(), and usage().
| static void process | ( | const char * | inname, | |
| int | wid | |||
| ) | [static] |
| static void unwrap | ( | char * | fn | ) | [static] |
Definition at line 368 of file file.c.
References errno, EXIT_FAILURE, file_mbswidth(), MAXPATHLEN, nobuffer, process(), and strerror.
Referenced by main().
| static void usage | ( | void | ) | [static] |
const char* default_magicfile = "/etc/magic" [static] |
const char* magicfile = 0 [static] |
1.5.2