php-internal-docs 8.4.8
Unofficial docs for php/php-src
|
#include "config.h"
#include <stdint.h>
#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <stdarg.h>
Go to the source code of this file.
Data Structures | |
struct | buffer |
union | VALUETYPE |
struct | magic |
struct | mlist |
struct | level_info |
struct | cont |
struct | magic_set |
struct | magic_set::out |
struct | file_pushbuf_t |
Typedefs | |
typedef unsigned long | file_unichar_t |
Functions | |
file_protected const char * | file_fmtdatetime (char *, size_t, uint64_t, int) |
file_protected const char * | file_fmtdate (char *, size_t, uint16_t) |
file_protected const char * | file_fmttime (char *, size_t, uint16_t) |
file_protected const char * | file_fmtvarint (char *, size_t, const unsigned char *, int) |
file_protected const char * | file_fmtnum (char *, size_t, const char *, int) |
file_protected struct magic_set * | file_ms_alloc (int) |
file_protected void | file_ms_free (struct magic_set *) |
file_protected int | file_buffer (struct magic_set *, php_stream *, zend_stat_t *, const char *, const void *, size_t) |
file_protected int | file_fsmagic (struct magic_set *, const char *, zend_stat_t *) |
file_protected int | file_pipe2file (struct magic_set *, int, const void *, size_t) |
file_protected int | file_vprintf (struct magic_set *, const char *, va_list) __attribute__((__format__(__printf__ |
file_protected int file_protected int | file_separator (struct magic_set *) |
file_protected char * | file_copystr (char *, size_t, size_t, const char *) |
file_protected int | file_checkfmt (char *, size_t, const char *) |
file_protected size_t | file_printedlen (const struct magic_set *) |
file_protected int | file_print_guid (char *, size_t, const uint64_t *) |
file_protected int | file_parse_guid (const char *, uint64_t *) |
file_protected int | file_replace (struct magic_set *, const char *, const char *) |
file_protected int | file_printf (struct magic_set *, const char *,...) __attribute__((__format__(__printf__ |
file_protected int file_protected int | file_reset (struct magic_set *, int) |
file_protected int | file_tryelf (struct magic_set *, const struct buffer *) |
file_protected int | file_trycdf (struct magic_set *, const struct buffer *) |
file_protected int | file_ascmagic (struct magic_set *, const struct buffer *, int) |
file_protected int | file_ascmagic_with_encoding (struct magic_set *, const struct buffer *, file_unichar_t *, size_t, const char *, const char *, int) |
file_protected int | file_encoding (struct magic_set *, const struct buffer *, file_unichar_t **, size_t *, const char **, const char **, const char **) |
file_protected int | file_is_json (struct magic_set *, const struct buffer *) |
file_protected int | file_is_csv (struct magic_set *, const struct buffer *, int, const char *) |
file_protected int | file_is_simh (struct magic_set *, const struct buffer *) |
file_protected int | file_is_tar (struct magic_set *, const struct buffer *) |
file_protected int | file_softmagic (struct magic_set *, const struct buffer *, uint16_t *, uint16_t *, int, int) |
file_protected int | file_apprentice (struct magic_set *, const char *, int) |
file_protected size_t | file_magic_strength (const struct magic *, size_t) |
file_protected int | buffer_apprentice (struct magic_set *, struct magic **, size_t *, size_t) |
file_protected int | file_magicfind (struct magic_set *, const char *, struct mlist *) |
file_protected uint64_t | file_signextend (struct magic_set *, struct magic *, uint64_t) |
file_protected uintmax_t | file_varint2uintmax_t (const unsigned char *, int, size_t *) |
file_protected void | file_badread (struct magic_set *) |
file_protected void | file_badseek (struct magic_set *) |
file_protected void | file_oomem (struct magic_set *, size_t) |
file_protected void | file_error (struct magic_set *, int, const char *,...) __attribute__((__format__(__printf__ |
file_protected void file_protected void | file_magerror (struct magic_set *, const char *,...) __attribute__((__format__(__printf__ |
file_protected void file_protected void file_protected void | file_magwarn (struct magic_set *, const char *,...) __attribute__((__format__(__printf__ |
file_protected void file_protected void file_protected void file_protected void | file_mdump (struct magic *) |
file_protected void | file_showstr (FILE *, const char *, size_t) |
file_protected size_t | file_mbswidth (struct magic_set *, const char *) |
file_protected const char * | file_getbuffer (struct magic_set *) |
file_protected ssize_t | sread (int, void *, size_t, int) |
file_protected int | file_check_mem (struct magic_set *, unsigned int) |
file_protected int | file_looks_utf8 (const unsigned char *, size_t, file_unichar_t *, size_t *) |
file_protected size_t | file_pstring_length_size (struct magic_set *, const struct magic *) |
file_protected size_t | file_pstring_get_length (struct magic_set *, const struct magic *, const char *) |
file_protected char * | file_printable (struct magic_set *, char *, size_t, const char *, size_t) |
file_protected int | file_pipe_closexec (int *) |
file_protected int | file_clear_closexec (int) |
file_protected char * | file_strtrim (char *) |
file_protected void | buffer_init (struct buffer *, int, const zend_stat_t *, const void *, size_t) |
file_protected void | buffer_fini (struct buffer *) |
file_protected int | buffer_fill (const struct buffer *) |
file_protected file_pushbuf_t * | file_push_buffer (struct magic_set *) |
file_protected char * | file_pop_buffer (struct magic_set *, file_pushbuf_t *) |
size_t | strlcpy (char *, const char *, size_t) |
size_t | strlcat (char *, const char *, size_t) |
char * | strcasestr (const char *, const char *) |
ssize_t | getline (char **, size_t *, FILE *) |
ssize_t | getdelim (char **, size_t *, int, FILE *) |
char * | ctime_r (const time_t *, char *) |
char * | asctime_r (const struct tm *, char *) |
Variables | |
const char * | file_names [] |
const size_t | file_nnames |
#define BINTEST |
#define file_locale_used __attribute__((__unused__)) |
#define FILE_RCSID | ( | id | ) |
#define IS_LIBMAGIC_STRING | ( | t | ) |
#define NOSPACE 0x10 /* suppress space character before output */ |
#define PSTRING_LEN (PSTRING_1_BE|PSTRING_2_LE|PSTRING_2_BE|PSTRING_4_LE|PSTRING_4_BE) |
#define STRING_IGNORE_CASE (STRING_IGNORE_LOWERCASE|STRING_IGNORE_UPPERCASE) |
#define TEXTTEST 0x40 /* for passing to file_softmagic */ |
typedef unsigned long file_unichar_t |
char * asctime_r | ( | const struct tm * | , |
char * | ) |
file_protected int buffer_apprentice | ( | struct magic_set * | , |
struct magic ** | , | ||
size_t * | , | ||
size_t | ) |
file_protected int buffer_fill | ( | const struct buffer * | bb | ) |
file_protected void buffer_fini | ( | struct buffer * | b | ) |
file_protected void buffer_init | ( | struct buffer * | b, |
int | fd, | ||
const zend_stat_t * | st, | ||
const void * | data, | ||
size_t | len ) |
char * ctime_r | ( | const time_t * | , |
char * | ) |
file_protected int file_apprentice | ( | struct magic_set * | ms, |
const char * | fn, | ||
int | action ) |
Definition at line 663 of file apprentice.c.
file_protected int file_ascmagic | ( | struct magic_set * | ms, |
const struct buffer * | b, | ||
int | text ) |
Definition at line 71 of file ascmagic.c.
file_protected int file_ascmagic_with_encoding | ( | struct magic_set * | ms, |
const struct buffer * | b, | ||
file_unichar_t * | ubuf, | ||
size_t | ulen, | ||
const char * | code, | ||
const char * | type, | ||
int | text ) |
Definition at line 105 of file ascmagic.c.
file_protected void file_badread | ( | struct magic_set * | ms | ) |
file_protected void file_badseek | ( | struct magic_set * | ms | ) |
file_protected int file_buffer | ( | struct magic_set * | , |
php_stream * | , | ||
zend_stat_t * | , | ||
const char * | , | ||
const void * | , | ||
size_t | ) |
file_protected int file_check_mem | ( | struct magic_set * | ms, |
unsigned int | level ) |
file_protected int file_checkfmt | ( | char * | msg, |
size_t | mlen, | ||
const char * | fmt ) |
file_protected int file_clear_closexec | ( | int | fd | ) |
file_protected char * file_copystr | ( | char * | buf, |
size_t | blen, | ||
size_t | width, | ||
const char * | str ) |
file_protected int file_encoding | ( | struct magic_set * | ms, |
const struct buffer * | b, | ||
file_unichar_t ** | ubuf, | ||
size_t * | ulen, | ||
const char ** | code, | ||
const char ** | code_mime, | ||
const char ** | type ) |
Definition at line 75 of file encoding.c.
file_protected void file_error | ( | struct magic_set * | , |
int | , | ||
const char * | , | ||
... ) |
file_protected const char * file_fmtdate | ( | char * | buf, |
size_t | bsize, | ||
uint16_t | v ) |
file_protected const char * file_fmtdatetime | ( | char * | buf, |
size_t | bsize, | ||
uint64_t | v, | ||
int | flags ) |
file_protected const char * file_fmtnum | ( | char * | buf, |
size_t | blen, | ||
const char * | us, | ||
int | base ) |
file_protected const char * file_fmttime | ( | char * | buf, |
size_t | bsize, | ||
uint16_t | v ) |
file_protected const char * file_fmtvarint | ( | char * | buf, |
size_t | blen, | ||
const unsigned char * | us, | ||
int | t ) |
file_protected int file_fsmagic | ( | struct magic_set * | ms, |
const char * | fn, | ||
zend_stat_t * | sb ) |
file_protected const char * file_getbuffer | ( | struct magic_set * | ms | ) |
file_protected int file_is_csv | ( | struct magic_set * | ms, |
const struct buffer * | b, | ||
int | looks_text, | ||
const char * | code ) |
file_protected int file_is_json | ( | struct magic_set * | ms, |
const struct buffer * | b ) |
file_protected int file_is_simh | ( | struct magic_set * | ms, |
const struct buffer * | b ) |
file_protected int file_is_tar | ( | struct magic_set * | ms, |
const struct buffer * | b ) |
file_protected int file_looks_utf8 | ( | const unsigned char * | buf, |
size_t | nbytes, | ||
file_unichar_t * | ubuf, | ||
size_t * | ulen ) |
Definition at line 350 of file encoding.c.
file_protected void file_protected void file_magerror | ( | struct magic_set * | , |
const char * | , | ||
... ) |
file_protected size_t file_magic_strength | ( | const struct magic * | , |
size_t | ) |
file_protected int file_magicfind | ( | struct magic_set * | ms, |
const char * | name, | ||
struct mlist * | v ) |
Definition at line 3651 of file apprentice.c.
file_protected void file_protected void file_protected void file_magwarn | ( | struct magic_set * | , |
const char * | , | ||
... ) |
file_protected size_t file_mbswidth | ( | struct magic_set * | , |
const char * | ) |
file_protected void file_protected void file_protected void file_protected void file_mdump | ( | struct magic * | m | ) |
file_protected struct magic_set * file_ms_alloc | ( | int | flags | ) |
Definition at line 549 of file apprentice.c.
file_protected void file_ms_free | ( | struct magic_set * | ms | ) |
Definition at line 526 of file apprentice.c.
file_protected void file_oomem | ( | struct magic_set * | ms, |
size_t | len ) |
file_protected int file_parse_guid | ( | const char * | s, |
uint64_t * | guid ) |
file_protected int file_pipe2file | ( | struct magic_set * | , |
int | , | ||
const void * | , | ||
size_t | ) |
file_protected int file_pipe_closexec | ( | int * | ) |
file_protected char * file_pop_buffer | ( | struct magic_set * | ms, |
file_pushbuf_t * | pb ) |
file_protected int file_print_guid | ( | char * | str, |
size_t | len, | ||
const uint64_t * | guid ) |
file_protected char * file_printable | ( | struct magic_set * | ms, |
char * | buf, | ||
size_t | bufsiz, | ||
const char * | str, | ||
size_t | slen ) |
file_protected size_t file_printedlen | ( | const struct magic_set * | ms | ) |
file_protected int file_printf | ( | struct magic_set * | , |
const char * | , | ||
... ) |
file_protected size_t file_pstring_get_length | ( | struct magic_set * | ms, |
const struct magic * | m, | ||
const char * | ss ) |
Definition at line 3598 of file apprentice.c.
file_protected size_t file_pstring_length_size | ( | struct magic_set * | ms, |
const struct magic * | m ) |
Definition at line 3579 of file apprentice.c.
file_protected file_pushbuf_t * file_push_buffer | ( | struct magic_set * | ms | ) |
file_protected int file_replace | ( | struct magic_set * | ms, |
const char * | pat, | ||
const char * | rep ) |
file_protected int file_protected int file_reset | ( | struct magic_set * | ms, |
int | checkloaded ) |
file_protected int file_protected int file_separator | ( | struct magic_set * | ms | ) |
file_protected void file_showstr | ( | FILE * | fp, |
const char * | s, | ||
size_t | len ) |
Definition at line 3119 of file apprentice.c.
file_protected uint64_t file_signextend | ( | struct magic_set * | ms, |
struct magic * | m, | ||
uint64_t | v ) |
Definition at line 1578 of file apprentice.c.
file_protected int file_softmagic | ( | struct magic_set * | ms, |
const struct buffer * | b, | ||
uint16_t * | indir_count, | ||
uint16_t * | name_count, | ||
int | mode, | ||
int | text ) |
Definition at line 119 of file softmagic.c.
file_protected char * file_strtrim | ( | char * | str | ) |
file_protected int file_trycdf | ( | struct magic_set * | ms, |
const struct buffer * | b ) |
file_protected int file_tryelf | ( | struct magic_set * | , |
const struct buffer * | ) |
file_protected uintmax_t file_varint2uintmax_t | ( | const unsigned char * | us, |
int | t, | ||
size_t * | l ) |
Definition at line 3529 of file apprentice.c.
file_protected int file_vprintf | ( | struct magic_set * | , |
const char * | , | ||
va_list | ) |
ssize_t getdelim | ( | char ** | , |
size_t * | , | ||
int | , | ||
FILE * | ) |
ssize_t getline | ( | char ** | , |
size_t * | , | ||
FILE * | ) |
file_protected ssize_t sread | ( | int | , |
void * | , | ||
size_t | , | ||
int | ) |
char * strcasestr | ( | const char * | s, |
const char * | find ) |
Definition at line 67 of file strcasestr.c.
size_t strlcat | ( | char * | , |
const char * | , | ||
size_t | ) |
size_t strlcpy | ( | char * | , |
const char * | , | ||
size_t | ) |
|
extern |
Definition at line 114 of file apprentice.c.
|
extern |
Definition at line 115 of file apprentice.c.