#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 | |
| FILE_RCSID ("@(#)$Id: file.c,v 1.96 2005/03/06 05:58:22 christos Exp $") private intbflag=0 | |
| private void | unwrap (char *fn) |
| private void | usage (void) |
| private void | process (const char *inname, int wid) |
| private void | load (const char *m, int flags) |
| int | main (int argc, char *argv[]) |
| size_t | file_mbswidth (const char *s) |
Variables | |
| nopad = 0 | |
| nobuffer = 0 | |
| private const char * | magicfile = 0 |
| private const char * | default_magicfile = MAGIC |
| private const char * | separator = ":" |
| private char * | progname |
| private struct magic_set * | magic |
| #define MAXPATHLEN 512 |
| #define OPTSTRING "bcCdf:F:ikLm:nNprsvz" |
Referenced by main().
| #define SYMLINKFLAG "" |
| #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 | ) |
| FILE_RCSID | ( | "@(#)$Id: file. | c, | |
| v 1.96 2005/03/06 05:58:22 christos Exp $" | ||||
| ) | [pure virtual] |
| private void load | ( | const char * | m, | |
| int | flags | |||
| ) |
| int main | ( | int | argc, | |
| char * | argv[] | |||
| ) |
Definition at line 140 of file rpmfile.c.
References magic_set::c, errno, FILE_CHECK, FILE_COMPILE, file_mbswidth(), flags, getenv(), load(), magic, nobuffer, nopad, OPTSTRING, process(), setlocale, strerror, unwrap(), and usage().
| private void process | ( | const char * | inname, | |
| int | wid | |||
| ) |
| private void unwrap | ( | char * | fn | ) |
Definition at line 368 of file rpmfile.c.
References errno, EXIT_FAILURE, file_mbswidth(), MAXPATHLEN, nobuffer, process(), and strerror.
Referenced by main().
| private void usage | ( | void | ) |
| private const char* default_magicfile = MAGIC |
| private const char* magicfile = 0 |
1.5.1