#include "system.h"
#include "file.h"
#include "names.h"
#include "tar.h"
#include "debug.h"
Go to the source code of this file.
Defines | |
#define | isodigit(c) ( ((c) >= '0') && ((c) <= '7') ) |
#define | MAXLINELEN 300 |
#define | ISSPC(x) |
#define | F 0 |
#define | T 1 |
#define | I 2 |
#define | X 3 |
Typedefs | |
typedef unsigned long | unichar |
Functions | |
static const char * | rcsid (const char *p) |
static int | from_oct (int digs, char *where) |
static int | is_tar (const fmagic fm) |
static int | looks_ascii (const unsigned char *buf, int nb, unichar *ubuf, int *ulen) |
static int | looks_latin1 (const unsigned char *buf, int nb, unichar *ubuf, int *ulen) |
static int | looks_extended (const unsigned char *buf, int nb, unichar *ubuf, int *ulen) |
static int | looks_utf8 (const unsigned char *buf, int nb, unichar *ubuf, int *ulen) |
static int | looks_unicode (const unsigned char *buf, int nb, unichar *ubuf, int *ulen) |
static void | from_ebcdic (const unsigned char *buf, int nb, unsigned char *otp) |
static int | fmagicAMatch (const unsigned char *s, const unichar *us, int ulen) |
int | fmagicA (fmagic fm) |
Variables | |
static char | text_chars [256] |
static unsigned char | ebcdic_to_ascii [] |
|
Definition at line 190 of file ascmagic.c. |
|
Definition at line 192 of file ascmagic.c. |
|
Definition at line 51 of file ascmagic.c. Referenced by from_oct(). |
|
Value: ((x) == ' ' || (x) == '\t' || (x) == '\r' || (x) == '\n' \ || (x) == 0x85 || (x) == '\f') Definition at line 135 of file ascmagic.c. Referenced by fmagicA(). |
|
Definition at line 134 of file ascmagic.c. Referenced by fmagicA(). |
|
Definition at line 191 of file ascmagic.c. Referenced by looks_ascii(), looks_extended(), looks_latin1(), looks_unicode(), and looks_utf8(). |
|
Definition at line 193 of file ascmagic.c. Referenced by looks_extended(). |
|
Definition at line 132 of file ascmagic.c. |
|
Definition at line 513 of file ascmagic.c. References fmagic_s::buf, file_printf(), fmagic_s::flags, FMAGIC_FLAGS_MIME, fmagicAMatch(), from_ebcdic(), HOWMANY, is_tar(), ISSPC, looks_ascii(), looks_extended(), looks_latin1(), looks_unicode(), looks_utf8(), MAXLINELEN, names::name, fmagic_s::nb, NNAMES, names::type, and types. Referenced by fmagicF(). |
|
Definition at line 493 of file ascmagic.c. Referenced by fmagicA(). |
|
Definition at line 480 of file ascmagic.c. Referenced by fmagicA(). |
|
Definition at line 60 of file ascmagic.c. References isodigit. Referenced by is_tar(). |
|
Definition at line 92 of file ascmagic.c. References fmagic_s::buf, from_oct(), record::header, fmagic_s::nb, and TARMAGIC. Referenced by fmagicA(). |
|
Definition at line 220 of file ascmagic.c. References T. Referenced by fmagicA(). |
|
Definition at line 266 of file ascmagic.c. Referenced by fmagicA(). |
|
Definition at line 243 of file ascmagic.c. References T. Referenced by fmagicA(). |
|
Definition at line 355 of file ascmagic.c. References T. Referenced by fmagicA(). |
|
Definition at line 289 of file ascmagic.c. References T. Referenced by fmagicA(). |
|
Definition at line 43 of file ascmagic.c. |
|
Initial value: { 0, 1, 2, 3, 156, 9, 134, 127, 151, 141, 142, 11, 12, 13, 14, 15, 16, 17, 18, 19, 157, 133, 8, 135, 24, 25, 146, 143, 28, 29, 30, 31, 128, 129, 130, 131, 132, 10, 23, 27, 136, 137, 138, 139, 140, 5, 6, 7, 144, 145, 22, 147, 148, 149, 150, 4, 152, 153, 154, 155, 20, 21, 158, 26, ' ', 160, 161, 162, 163, 164, 165, 166, 167, 168, 213, '.', '<', '(', '+', '|', '&', 169, 170, 171, 172, 173, 174, 175, 176, 177, '!', '$', '*', ')', ';', '~', '-', '/', 178, 179, 180, 181, 182, 183, 184, 185, 203, ',', '%', '_', '>', '?', 186, 187, 188, 189, 190, 191, 192, 193, 194, '`', ':', '#', '@', '\'','=', '"', 195, 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 196, 197, 198, 199, 200, 201, 202, 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', '^', 204, 205, 206, 207, 208, 209, 229, 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 210, 211, 212, '[', 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, ']', 230, 231, '{', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 232, 233, 234, 235, 236, 237, '}', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 238, 239, 240, 241, 242, 243, '\\',159, 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 244, 245, 246, 247, 248, 249, '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 250, 251, 252, 253, 254, 255 } Definition at line 420 of file ascmagic.c. |
|
Initial value: { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 0 , 3 , 3 , 3 , 3 , 3 , 1 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 3 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 , 2 } Definition at line 196 of file ascmagic.c. |