Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../usr/include
File: magic.h
/*
[0] Fix | Delete
* Copyright (c) Christos Zoulas 2003.
[1] Fix | Delete
* All Rights Reserved.
[2] Fix | Delete
*
[3] Fix | Delete
* Redistribution and use in source and binary forms, with or without
[4] Fix | Delete
* modification, are permitted provided that the following conditions
[5] Fix | Delete
* are met:
[6] Fix | Delete
* 1. Redistributions of source code must retain the above copyright
[7] Fix | Delete
* notice immediately at the beginning of the file, without modification,
[8] Fix | Delete
* this list of conditions, and the following disclaimer.
[9] Fix | Delete
* 2. Redistributions in binary form must reproduce the above copyright
[10] Fix | Delete
* notice, this list of conditions and the following disclaimer in the
[11] Fix | Delete
* documentation and/or other materials provided with the distribution.
[12] Fix | Delete
*
[13] Fix | Delete
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
[14] Fix | Delete
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
[15] Fix | Delete
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
[16] Fix | Delete
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
[17] Fix | Delete
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
[18] Fix | Delete
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
[19] Fix | Delete
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
[20] Fix | Delete
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
[21] Fix | Delete
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
[22] Fix | Delete
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
[23] Fix | Delete
* SUCH DAMAGE.
[24] Fix | Delete
*/
[25] Fix | Delete
#ifndef _MAGIC_H
[26] Fix | Delete
#define _MAGIC_H
[27] Fix | Delete
[28] Fix | Delete
#include <sys/types.h>
[29] Fix | Delete
[30] Fix | Delete
#define MAGIC_NONE 0x0000000 /* No flags */
[31] Fix | Delete
#define MAGIC_DEBUG 0x0000001 /* Turn on debugging */
[32] Fix | Delete
#define MAGIC_SYMLINK 0x0000002 /* Follow symlinks */
[33] Fix | Delete
#define MAGIC_COMPRESS 0x0000004 /* Check inside compressed files */
[34] Fix | Delete
#define MAGIC_DEVICES 0x0000008 /* Look at the contents of devices */
[35] Fix | Delete
#define MAGIC_MIME_TYPE 0x0000010 /* Return the MIME type */
[36] Fix | Delete
#define MAGIC_CONTINUE 0x0000020 /* Return all matches */
[37] Fix | Delete
#define MAGIC_CHECK 0x0000040 /* Print warnings to stderr */
[38] Fix | Delete
#define MAGIC_PRESERVE_ATIME 0x0000080 /* Restore access time on exit */
[39] Fix | Delete
#define MAGIC_RAW 0x0000100 /* Don't convert unprintable chars */
[40] Fix | Delete
#define MAGIC_ERROR 0x0000200 /* Handle ENOENT etc as real errors */
[41] Fix | Delete
#define MAGIC_MIME_ENCODING 0x0000400 /* Return the MIME encoding */
[42] Fix | Delete
#define MAGIC_MIME (MAGIC_MIME_TYPE|MAGIC_MIME_ENCODING)
[43] Fix | Delete
#define MAGIC_APPLE 0x0000800 /* Return the Apple creator/type */
[44] Fix | Delete
#define MAGIC_EXTENSION 0x1000000 /* Return a /-separated list of
[45] Fix | Delete
* extensions */
[46] Fix | Delete
#define MAGIC_COMPRESS_TRANSP 0x2000000 /* Check inside compressed files
[47] Fix | Delete
* but not report compression */
[48] Fix | Delete
#define MAGIC_NODESC (MAGIC_EXTENSION|MAGIC_MIME|MAGIC_APPLE)
[49] Fix | Delete
[50] Fix | Delete
#define MAGIC_NO_CHECK_COMPRESS 0x0001000 /* Don't check for compressed files */
[51] Fix | Delete
#define MAGIC_NO_CHECK_TAR 0x0002000 /* Don't check for tar files */
[52] Fix | Delete
#define MAGIC_NO_CHECK_SOFT 0x0004000 /* Don't check magic entries */
[53] Fix | Delete
#define MAGIC_NO_CHECK_APPTYPE 0x0008000 /* Don't check application type */
[54] Fix | Delete
#define MAGIC_NO_CHECK_ELF 0x0010000 /* Don't check for elf details */
[55] Fix | Delete
#define MAGIC_NO_CHECK_TEXT 0x0020000 /* Don't check for text files */
[56] Fix | Delete
#define MAGIC_NO_CHECK_CDF 0x0040000 /* Don't check for cdf files */
[57] Fix | Delete
#define MAGIC_NO_CHECK_TOKENS 0x0100000 /* Don't check tokens */
[58] Fix | Delete
#define MAGIC_NO_CHECK_ENCODING 0x0200000 /* Don't check text encodings */
[59] Fix | Delete
[60] Fix | Delete
/* No built-in tests; only consult the magic file */
[61] Fix | Delete
#define MAGIC_NO_CHECK_BUILTIN ( \
[62] Fix | Delete
MAGIC_NO_CHECK_COMPRESS | \
[63] Fix | Delete
MAGIC_NO_CHECK_TAR | \
[64] Fix | Delete
/* MAGIC_NO_CHECK_SOFT | */ \
[65] Fix | Delete
MAGIC_NO_CHECK_APPTYPE | \
[66] Fix | Delete
MAGIC_NO_CHECK_ELF | \
[67] Fix | Delete
MAGIC_NO_CHECK_TEXT | \
[68] Fix | Delete
MAGIC_NO_CHECK_CDF | \
[69] Fix | Delete
MAGIC_NO_CHECK_TOKENS | \
[70] Fix | Delete
MAGIC_NO_CHECK_ENCODING | \
[71] Fix | Delete
0 \
[72] Fix | Delete
)
[73] Fix | Delete
[74] Fix | Delete
#define MAGIC_SNPRINTB "\177\020\
[75] Fix | Delete
b\0debug\0\
[76] Fix | Delete
b\1symlink\0\
[77] Fix | Delete
b\2compress\0\
[78] Fix | Delete
b\3devices\0\
[79] Fix | Delete
b\4mime_type\0\
[80] Fix | Delete
b\5continue\0\
[81] Fix | Delete
b\6check\0\
[82] Fix | Delete
b\7preserve_atime\0\
[83] Fix | Delete
b\10raw\0\
[84] Fix | Delete
b\11error\0\
[85] Fix | Delete
b\12mime_encoding\0\
[86] Fix | Delete
b\13apple\0\
[87] Fix | Delete
b\14no_check_compress\0\
[88] Fix | Delete
b\15no_check_tar\0\
[89] Fix | Delete
b\16no_check_soft\0\
[90] Fix | Delete
b\17no_check_sapptype\0\
[91] Fix | Delete
b\20no_check_elf\0\
[92] Fix | Delete
b\21no_check_text\0\
[93] Fix | Delete
b\22no_check_cdf\0\
[94] Fix | Delete
b\23no_check_reserved0\0\
[95] Fix | Delete
b\24no_check_tokens\0\
[96] Fix | Delete
b\25no_check_encoding\0\
[97] Fix | Delete
b\26no_check_reserved1\0\
[98] Fix | Delete
b\27no_check_reserved2\0\
[99] Fix | Delete
b\30extension\0\
[100] Fix | Delete
b\31transp_compression\0\
[101] Fix | Delete
"
[102] Fix | Delete
[103] Fix | Delete
/* Defined for backwards compatibility (renamed) */
[104] Fix | Delete
#define MAGIC_NO_CHECK_ASCII MAGIC_NO_CHECK_TEXT
[105] Fix | Delete
[106] Fix | Delete
/* Defined for backwards compatibility; do nothing */
[107] Fix | Delete
#define MAGIC_NO_CHECK_FORTRAN 0x000000 /* Don't check ascii/fortran */
[108] Fix | Delete
#define MAGIC_NO_CHECK_TROFF 0x000000 /* Don't check ascii/troff */
[109] Fix | Delete
[110] Fix | Delete
#define MAGIC_VERSION 533 /* This implementation */
[111] Fix | Delete
[112] Fix | Delete
[113] Fix | Delete
#ifdef __cplusplus
[114] Fix | Delete
extern "C" {
[115] Fix | Delete
#endif
[116] Fix | Delete
[117] Fix | Delete
typedef struct magic_set *magic_t;
[118] Fix | Delete
magic_t magic_open(int);
[119] Fix | Delete
void magic_close(magic_t);
[120] Fix | Delete
[121] Fix | Delete
const char *magic_getpath(const char *, int);
[122] Fix | Delete
const char *magic_file(magic_t, const char *);
[123] Fix | Delete
const char *magic_descriptor(magic_t, int);
[124] Fix | Delete
const char *magic_buffer(magic_t, const void *, size_t);
[125] Fix | Delete
[126] Fix | Delete
const char *magic_error(magic_t);
[127] Fix | Delete
int magic_getflags(magic_t);
[128] Fix | Delete
int magic_setflags(magic_t, int);
[129] Fix | Delete
[130] Fix | Delete
int magic_version(void);
[131] Fix | Delete
int magic_load(magic_t, const char *);
[132] Fix | Delete
int magic_load_buffers(magic_t, void **, size_t *, size_t);
[133] Fix | Delete
[134] Fix | Delete
int magic_compile(magic_t, const char *);
[135] Fix | Delete
int magic_check(magic_t, const char *);
[136] Fix | Delete
int magic_list(magic_t, const char *);
[137] Fix | Delete
int magic_errno(magic_t);
[138] Fix | Delete
[139] Fix | Delete
#define MAGIC_PARAM_INDIR_MAX 0
[140] Fix | Delete
#define MAGIC_PARAM_NAME_MAX 1
[141] Fix | Delete
#define MAGIC_PARAM_ELF_PHNUM_MAX 2
[142] Fix | Delete
#define MAGIC_PARAM_ELF_SHNUM_MAX 3
[143] Fix | Delete
#define MAGIC_PARAM_ELF_NOTES_MAX 4
[144] Fix | Delete
#define MAGIC_PARAM_REGEX_MAX 5
[145] Fix | Delete
#define MAGIC_PARAM_BYTES_MAX 6
[146] Fix | Delete
[147] Fix | Delete
int magic_setparam(magic_t, int, const void *);
[148] Fix | Delete
int magic_getparam(magic_t, int, void *);
[149] Fix | Delete
[150] Fix | Delete
#ifdef __cplusplus
[151] Fix | Delete
};
[152] Fix | Delete
#endif
[153] Fix | Delete
[154] Fix | Delete
#endif /* _MAGIC_H */
[155] Fix | Delete
[156] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function