build/rpmfile.h File Reference

#include <stdio.h>
#include <errno.h>
#include <sys/stat.h>

Go to the source code of this file.

Data Structures

struct  magic
union  magic::VALUETYPE
struct  mlist
struct  magic_set
struct  magic_set::cont
struct  magic_set::out

Defines

#define MAGIC   "/etc/magic"
#define PATHSEP   ':'
#define private   static
#define public
#define HOWMANY   (256 * 1024)
#define MAXMAGIS   8192
#define MAXDESC   64
#define MAXstring   32
#define MAGICNO   0xF11E041C
#define VERSIONNO   2
#define FILE_MAGICSIZE   (32 * 4)
#define FILE_LOAD   0
#define FILE_CHECK   1
#define FILE_COMPILE   2
#define INDIR   1
#define UNSIGNED   2
#define OFFADD   4
#define INDIROFFADD   8
#define FILE_BYTE   1
#define FILE_SHORT   2
#define FILE_LONG   4
#define FILE_STRING   5
#define FILE_DATE   6
#define FILE_BESHORT   7
#define FILE_BELONG   8
#define FILE_BEDATE   9
#define FILE_LESHORT   10
#define FILE_LELONG   11
#define FILE_LEDATE   12
#define FILE_PSTRING   13
#define FILE_LDATE   14
#define FILE_BELDATE   15
#define FILE_LELDATE   16
#define FILE_REGEX   17
#define FILE_BESTRING16   18
#define FILE_LESTRING16   19
#define FILE_SEARCH   20
#define FILE_FORMAT_NAME
#define FILE_FMT_NUM   "cduxXi"
#define FILE_FMT_STR   "s"
#define FILE_FORMAT_STRING
#define FILE_OPS   "&|^+-*/%"
#define FILE_OPAND   0
#define FILE_OPOR   1
#define FILE_OPXOR   2
#define FILE_OPADD   3
#define FILE_OPMINUS   4
#define FILE_OPMULTIPLY   5
#define FILE_OPDIVIDE   6
#define FILE_OPMODULO   7
#define FILE_OPINVERSE   0x40
#define FILE_OPINDIRECT   0x80
#define BIT(A)   (1 << (A))
#define STRING_IGNORE_LOWERCASE   BIT(0)
#define STRING_COMPACT_BLANK   BIT(1)
#define STRING_COMPACT_OPTIONAL_BLANK   BIT(2)
#define CHAR_IGNORE_LOWERCASE   'c'
#define CHAR_COMPACT_BLANK   'B'
#define CHAR_COMPACT_OPTIONAL_BLANK   'b'
#define strerror(e)   (((e) >= 0 && (e) < sys_nerr) ? sys_errlist[(e)] : "Unknown error")
#define strtoul(a, b, c)   strtol(a, b, c)
#define FILE_RCSID(id)

Functions

const char * file_fmttime (uint32_t, int)
int file_buffer (struct magic_set *ms, int, const void *, size_t)
int file_fsmagic (struct magic_set *ms, const char *fn, struct stat *sb)
int file_pipe2file (struct magic_set *ms, int fd, const void *startbuf, size_t nbytes)
int file_printf (struct magic_set *ms, const char *,...)
int file_reset (struct magic_set *ms)
int file_tryelf (struct magic_set *ms, int, const unsigned char *, size_t)
int file_zmagic (struct magic_set *ms, int, const unsigned char *, size_t)
int file_ascmagic (struct magic_set *ms, const unsigned char *, size_t)
int file_is_tar (struct magic_set *ms, const unsigned char *, size_t)
int file_softmagic (struct magic_set *ms, const unsigned char *, size_t)
mlistfile_apprentice (struct magic_set *ms, const char *, int)
uint32_t file_signextend (struct magic_set *ms, struct magic *, uint32_t)
void file_delmagic (struct magic *p, int type, size_t entries)
void file_badread (struct magic_set *ms)
void file_badseek (struct magic_set *ms)
void file_oomem (struct magic_set *ms)
void file_error (struct magic_set *ms, int, const char *,...)
void file_magwarn (struct magic_set *ms, const char *,...)
void file_mdump (struct magic *m)
void file_showstr (FILE *fp, const char *, size_t)
size_t file_mbswidth (const char *)
const char * file_getbuffer (struct magic_set *ms)

Variables

int sys_nerr
char * sys_errlist []


Define Documentation

#define BIT (  )     (1 << (A))

Definition at line 206 of file rpmfile.h.

#define CHAR_COMPACT_BLANK   'B'

Definition at line 211 of file rpmfile.h.

#define CHAR_COMPACT_OPTIONAL_BLANK   'b'

Definition at line 212 of file rpmfile.h.

#define CHAR_IGNORE_LOWERCASE   'c'

Definition at line 210 of file rpmfile.h.

#define FILE_BEDATE   9

Definition at line 103 of file rpmfile.h.

#define FILE_BELDATE   15

Definition at line 109 of file rpmfile.h.

#define FILE_BELONG   8

Definition at line 102 of file rpmfile.h.

#define FILE_BESHORT   7

Definition at line 101 of file rpmfile.h.

#define FILE_BESTRING16   18

Definition at line 112 of file rpmfile.h.

#define FILE_BYTE   1

Definition at line 96 of file rpmfile.h.

#define FILE_CHECK   1

Definition at line 79 of file rpmfile.h.

Referenced by main().

#define FILE_COMPILE   2

Definition at line 80 of file rpmfile.h.

Referenced by main().

#define FILE_DATE   6

Definition at line 100 of file rpmfile.h.

#define FILE_FMT_NUM   "cduxXi"

Definition at line 139 of file rpmfile.h.

#define FILE_FMT_STR   "s"

Definition at line 140 of file rpmfile.h.

#define FILE_FORMAT_NAME

Value:

/* 0 */                         "invalid 0",            \
/* 1 */                         "byte",                 \
/* 2 */                         "short",                \
/* 3 */                         "invalid 3",            \
/* 4 */                         "long",                 \
/* 5 */                         "string",               \
/* 6 */                         "date",                 \
/* 7 */                         "beshort",              \
/* 8 */                         "belong",               \
/* 9 */                         "bedate",               \
/* 10 */                        "leshort",              \
/* 11 */                        "lelong",               \
/* 12 */                        "ledate",               \
/* 13 */                        "pstring",              \
/* 14 */                        "ldate",                \
/* 15 */                        "beldate",              \
/* 16 */                        "leldate",              \
/* 17 */                        "regex",                \
/* 18 */                        "bestring16",           \
/* 19 */                        "lestring16",           \
/* 20 */                        "search",

Definition at line 116 of file rpmfile.h.

#define FILE_FORMAT_STRING

Value:

/* 0 */                         NULL,                   \
/* 1 */                         FILE_FMT_NUM,           \
/* 2 */                         FILE_FMT_NUM,           \
/* 3 */                         NULL,                   \
/* 4 */                         FILE_FMT_NUM,           \
/* 5 */                         FILE_FMT_STR,           \
/* 6 */                         FILE_FMT_STR,           \
/* 7 */                         FILE_FMT_NUM,           \
/* 8 */                         FILE_FMT_NUM,           \
/* 9 */                         FILE_FMT_STR,           \
/* 10 */                        FILE_FMT_NUM,           \
/* 11 */                        FILE_FMT_NUM,           \
/* 12 */                        FILE_FMT_STR,           \
/* 13 */                        FILE_FMT_STR,           \
/* 14 */                        FILE_FMT_STR,           \
/* 15 */                        FILE_FMT_STR,           \
/* 16 */                        FILE_FMT_STR,           \
/* 17 */                        FILE_FMT_STR,           \
/* 18 */                        FILE_FMT_STR,           \
/* 19 */                        FILE_FMT_STR,           \
/* 20 */                        FILE_FMT_STR,

Definition at line 142 of file rpmfile.h.

#define FILE_LDATE   14

Definition at line 108 of file rpmfile.h.

#define FILE_LEDATE   12

Definition at line 106 of file rpmfile.h.

#define FILE_LELDATE   16

Definition at line 110 of file rpmfile.h.

#define FILE_LELONG   11

Definition at line 105 of file rpmfile.h.

#define FILE_LESHORT   10

Definition at line 104 of file rpmfile.h.

#define FILE_LESTRING16   19

Definition at line 113 of file rpmfile.h.

#define FILE_LOAD   0

Definition at line 78 of file rpmfile.h.

#define FILE_LONG   4

Definition at line 98 of file rpmfile.h.

#define FILE_MAGICSIZE   (32 * 4)

Definition at line 76 of file rpmfile.h.

#define FILE_OPADD   3

Definition at line 174 of file rpmfile.h.

#define FILE_OPAND   0

Definition at line 171 of file rpmfile.h.

#define FILE_OPDIVIDE   6

Definition at line 177 of file rpmfile.h.

#define FILE_OPINDIRECT   0x80

Definition at line 180 of file rpmfile.h.

#define FILE_OPINVERSE   0x40

Definition at line 179 of file rpmfile.h.

#define FILE_OPMINUS   4

Definition at line 175 of file rpmfile.h.

#define FILE_OPMODULO   7

Definition at line 178 of file rpmfile.h.

#define FILE_OPMULTIPLY   5

Definition at line 176 of file rpmfile.h.

#define FILE_OPOR   1

Definition at line 172 of file rpmfile.h.

#define FILE_OPS   "&|^+-*/%"

Definition at line 170 of file rpmfile.h.

#define FILE_OPXOR   2

Definition at line 173 of file rpmfile.h.

#define FILE_PSTRING   13

Definition at line 107 of file rpmfile.h.

#define FILE_RCSID ( id   ) 

Value:

static const char *rcsid(const char *p) { \
        return rcsid(p = id); \
}

Definition at line 330 of file rpmfile.h.

#define FILE_REGEX   17

Definition at line 111 of file rpmfile.h.

#define FILE_SEARCH   20

Definition at line 114 of file rpmfile.h.

#define FILE_SHORT   2

Definition at line 97 of file rpmfile.h.

#define FILE_STRING   5

Definition at line 99 of file rpmfile.h.

#define HOWMANY   (256 * 1024)

Definition at line 68 of file rpmfile.h.

#define INDIR   1

Definition at line 87 of file rpmfile.h.

#define INDIROFFADD   8

Definition at line 90 of file rpmfile.h.

#define MAGIC   "/etc/magic"

Definition at line 52 of file rpmfile.h.

#define MAGICNO   0xF11E041C

Definition at line 74 of file rpmfile.h.

#define MAXDESC   64

Definition at line 71 of file rpmfile.h.

#define MAXMAGIS   8192

Definition at line 70 of file rpmfile.h.

#define MAXstring   32

Definition at line 72 of file rpmfile.h.

#define OFFADD   4

Definition at line 89 of file rpmfile.h.

#define PATHSEP   ':'

Definition at line 58 of file rpmfile.h.

#define private   static

Definition at line 61 of file rpmfile.h.

#define public

Definition at line 65 of file rpmfile.h.

#define strerror (  )     (((e) >= 0 && (e) < sys_nerr) ? sys_errlist[(e)] : "Unknown error")

Definition at line 318 of file rpmfile.h.

Referenced by checkOwners(), checkPassPhrase(), cpioStrerror(), dbiOpen(), doScript(), fdFgets(), fdWritable(), fsmStage(), Fstrerror(), getFdErrstr(), getFilesystemList(), getOutputFrom(), load(), lzdClose(), lzdWrite(), main(), makeGPGSignature(), makePGPSignature(), packageBinaries(), processSourceFiles(), rpmdbRebuild(), rpmfcClassify(), rpmGetFilesystemUsage(), rpmProblemString(), rpmQueryVerify(), runScript(), ufdRead(), ufdWrite(), unwrap(), and urlStrerror().

#define STRING_COMPACT_BLANK   BIT(1)

Definition at line 208 of file rpmfile.h.

#define STRING_COMPACT_OPTIONAL_BLANK   BIT(2)

Definition at line 209 of file rpmfile.h.

#define STRING_IGNORE_LOWERCASE   BIT(0)

Definition at line 207 of file rpmfile.h.

#define strtoul ( a,
b,
 )     strtol(a, b, c)

Definition at line 323 of file rpmfile.h.

Referenced by addCanon(), parseFormat(), parseNum(), rpmQueryVerify(), and strntoul().

#define UNSIGNED   2

Definition at line 88 of file rpmfile.h.

#define VERSIONNO   2

Definition at line 75 of file rpmfile.h.


Function Documentation

struct mlist* file_apprentice ( struct magic_set ms,
const char *  ,
int   
)

int file_ascmagic ( struct magic_set ms,
const unsigned char *  ,
size_t   
)

void file_badread ( struct magic_set ms  ) 

void file_badseek ( struct magic_set ms  ) 

int file_buffer ( struct magic_set ms,
int  ,
const void *  ,
size_t   
)

void file_delmagic ( struct magic p,
int  type,
size_t  entries 
)

void file_error ( struct magic_set ms,
int  ,
const char *  ,
  ... 
)

const char* file_fmttime ( uint32_t  ,
int   
)

int file_fsmagic ( struct magic_set ms,
const char *  fn,
struct stat *  sb 
)

const char* file_getbuffer ( struct magic_set ms  ) 

int file_is_tar ( struct magic_set ms,
const unsigned char *  ,
size_t   
)

void file_magwarn ( struct magic_set ms,
const char *  ,
  ... 
)

size_t file_mbswidth ( const char *   ) 

Definition at line 480 of file rpmfile.c.

Referenced by main(), process(), and unwrap().

void file_mdump ( struct magic m  ) 

void file_oomem ( struct magic_set ms  ) 

int file_pipe2file ( struct magic_set ms,
int  fd,
const void *  startbuf,
size_t  nbytes 
)

int file_printf ( struct magic_set ms,
const char *  ,
  ... 
)

int file_reset ( struct magic_set ms  ) 

void file_showstr ( FILE *  fp,
const char *  ,
size_t   
)

uint32_t file_signextend ( struct magic_set ms,
struct magic ,
uint32_t   
)

int file_softmagic ( struct magic_set ms,
const unsigned char *  ,
size_t   
)

int file_tryelf ( struct magic_set ms,
int  ,
const unsigned char *  ,
size_t   
)

int file_zmagic ( struct magic_set ms,
int  ,
const unsigned char *  ,
size_t   
)


Variable Documentation

char* sys_errlist[]

int sys_nerr


Generated on Tue Feb 19 22:26:22 2008 for rpm by  doxygen 1.5.1