rpm
5.4.14
|
#include "system.h"
#include <rpmio_internal.h>
#include <rpmdir.h>
#include <poptIO.h>
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | _MIRE_INTERNAL |
#define | FALSE ((BOOL)0) |
#define | TRUE ((BOOL)1) |
#define | MAX_PATTERN_COUNT 100 |
#define | MBUFTHIRD 8192 |
#define | _GFB(n) ((1U << (n)) | 0x40000000) |
#define | GF_ISSET(_FLAG) ((grepFlags & ((GREP_FLAGS_##_FLAG) & ~0x40000000)) != GREP_FLAGS_NONE) |
Typedefs | |
typedef unsigned | BOOL |
Enumerations | |
enum | dee_e { dee_READ =1, dee_SKIP, dee_RECURSE } |
Actions for the -d option. More... | |
enum | DEE_e { DEE_READ =1, DEE_SKIP } |
Actions for the -D option. More... | |
enum | FN_e { FN_NONE, FN_DEFAULT, FN_ONLY, FN_NOMATCH_ONLY, FN_FORCE } |
Values for the "filenames" variable, which specifies options for file name output. More... | |
enum | grepFlags_e { GREP_FLAGS_NONE = 0, GREP_FLAGS_WORD_MATCH = ((1U << ( 0 )) | 0x40000000), GREP_FLAGS_LINE_MATCH = ((1U << ( 1 )) | 0x40000000), GREP_FLAGS_FIXED_STRINGS = ((1U << ( 2 )) | 0x40000000), GREP_FLAGS_COUNT = ((1U << ( 3 )) | 0x40000000), GREP_FLAGS_COLOR = ((1U << ( 4 )) | 0x40000000), GREP_FLAGS_FOFFSETS = ((1U << ( 5 )) | 0x40000000), GREP_FLAGS_LOFFSETS = ((1U << ( 6 )) | 0x40000000), GREP_FLAGS_LNUMBER = ((1U << ( 7 )) | 0x40000000), GREP_FLAGS_MULTILINE = ((1U << ( 8 )) | 0x40000000), GREP_FLAGS_ONLY_MATCHING = ((1U << ( 9 )) | 0x40000000), GREP_FLAGS_INVERT = ((1U << ( 10 )) | 0x40000000), GREP_FLAGS_QUIET = ((1U << ( 11 )) | 0x40000000), GREP_FLAGS_SILENT = ((1U << ( 12 )) | 0x40000000), GREP_FLAGS_UTF8 = ((1U << ( 13 )) | 0x40000000), GREP_FLAGS_CASELESS = ((1U << ( 14 )) | 0x40000000) } |
Functions | |
static void | fwrite_check (const void *ptr, size_t size, size_t nmemb, FILE *stream) |
if (both_context > 0) | |
if (((((grepFlags &((GREP_FLAGS_FOFFSETS)&~0x40000000))!=GREP_FLAGS_NONE)||((grepFlags &((GREP_FLAGS_LOFFSETS)&~0x40000000))!=GREP_FLAGS_NONE))&&((grepFlags &((GREP_FLAGS_ONLY_MATCHING)&~0x40000000))!=GREP_FLAGS_NONE))||(((grepFlags &((GREP_FLAGS_FOFFSETS)&~0x40000000))!=GREP_FLAGS_NONE)&&((grepFlags &((GREP_FLAGS_LOFFSETS)&~0x40000000))!=GREP_FLAGS_NONE))) | |
if (((grepFlags &((GREP_FLAGS_FOFFSETS)&~0x40000000))!=GREP_FLAGS_NONE)||((grepFlags &((GREP_FLAGS_LOFFSETS)&~0x40000000))!=GREP_FLAGS_NONE)) | |
if (npatterns==0 &&pattern_filenames==NULL) | |
for (j=0;j< npatterns;j++) | |
if (mireLoadPatterns(grepMode, 0, exclude_patterns, NULL,&excludeMire,&nexcludes)) | |
if (mireLoadPatterns(grepMode, 0, include_patterns, NULL,&includeMire,&nincludes)) | |
if (i >=ac) | |
if (_rpmsw_stats) | |
Variables | |
static const char * | newline = NULL |
static const char * | color_string = NULL |
static ARGV_t | pattern_filenames = NULL |
static const char * | stdin_name = NULL |
static const char * | locale = NULL |
static ARGV_t | patterns = NULL |
static miRE | pattern_list = NULL |
static int | pattern_count = 0 |
static ARGV_t | exclude_patterns = NULL |
static miRE | excludeMire = NULL |
static int | nexcludes = 0 |
static ARGV_t | include_patterns = NULL |
static miRE | includeMire = NULL |
static int | nincludes = 0 |
static int | after_context = 0 |
static int | before_context = 0 |
static int | both_context = 0 |
static enum dee_e | dee_action = dee_READ |
static enum DEE_e | DEE_action = DEE_READ |
static int | error_count = 0 |
static enum FN_e | filenames = FN_DEFAULT |
static enum grepFlags_e | grepFlags = GREP_FLAGS_NONE |
static rpmMireMode | grepMode = RPMMIRE_REGEX |
static struct rpmop_s | grep_totalops |
static struct rpmop_s | grep_readops |
static const char * | prefix [] |
Tables for prefixing and suffixing patterns, according to the -w, -x, and -F options. More... | |
static const char * | suffix [] |
static const unsigned | utf8_table3 [] |
UTF-8 tables - used only when the newline setting is "any". More... | |
static const char | utf8_table4 [] |
static const char * | int |
ARGV_t | av = NULL |
int | ac = 0 |
int | i = 0 |
int | rc = 1 |
int | j |
int | xx = rpmswEnter(&grep_totalops, -1) |
__progname = "pcregrep" | |
npatterns = argvCount(patterns) | |
goto | errxit |
else { BOOL only_one_at_top = (i == ac -1) | |
exit | __pad0__ |
optCon = rpmioFini(optCon) | |
errxit | __pad1__ |
goto | exit |
#define GF_ISSET | ( | _FLAG | ) | ((grepFlags & ((GREP_FLAGS_##_FLAG) & ~0x40000000)) != GREP_FLAGS_NONE) |
#define TRUE ((BOOL)1) |
Definition at line 53 of file rpmgrep.c.
Referenced by rpmperlRun().
enum dee_e |
enum DEE_e |
enum FN_e |
enum grepFlags_e |
if | ( | both_context | , |
0 | |||
) |
Definition at line 1451 of file rpmgrep.c.
References after_context, before_context, and both_context.
if | ( | ((((grepFlags &((GREP_FLAGS_FOFFSETS)&~0x40000000))!=GREP_FLAGS_NONE)||((grepFlags &((GREP_FLAGS_LOFFSETS)&~0x40000000))!=GREP_FLAGS_NONE))&&((grepFlags &((GREP_FLAGS_ONLY_MATCHING)&~0x40000000))!=GREP_FLAGS_NONE))||(((grepFlags &((GREP_FLAGS_FOFFSETS)&~0x40000000))!=GREP_FLAGS_NONE)&&((grepFlags &((GREP_FLAGS_LOFFSETS)&~0x40000000))!=GREP_FLAGS_NONE)) | ) |
if | ( | ((grepFlags &((GREP_FLAGS_FOFFSETS)&~0x40000000))!=GREP_FLAGS_NONE)||((grepFlags &((GREP_FLAGS_LOFFSETS)&~0x40000000))!=GREP_FLAGS_NONE) | ) |
if | ( | npatterns | = = 0 && pattern_filenames == NULL | ) |
if | ( | mireLoadPatterns(grepMode, 0, exclude_patterns, NULL,&excludeMire,&nexcludes) | ) |
Definition at line 1537 of file rpmgrep.c.
References _, __progname, errxit, excludeMire, fprintf(), and nexcludes.
if | ( | mireLoadPatterns(grepMode, 0, include_patterns, NULL,&includeMire,&nincludes) | ) |
Definition at line 1549 of file rpmgrep.c.
References _, __progname, errxit, fprintf(), includeMire, and nincludes.
if | ( | _rpmsw_stats | ) |
Definition at line 1603 of file rpmgrep.c.
References grep_readops, grep_totalops, and rpmswPrint().
ac = 0 |
Definition at line 1431 of file rpmgrep.c.
Referenced by argvAppend(), FDGsqlTag(), FDGxmlTag(), FDGyamlTag(), for(), hSaveBlinks(), hSaveFlinks(), IDTXglob(), main(), open_dso(), PRCOsqlTag(), PRCOxmlTag(), PRCOyamlTag(), rpmdsDupArgv(), rpmfcExpandAppend(), rpmfcExpandRegexps(), rpmfcGenerateDepends(), rpmfiBuildFClasses(), rpmfiBuildFDeps(), rpmGetMacroEntries(), rpmgiGlobArgv(), rpmGlob(), rpmInitMacros(), rpmioInit(), rpmmc_list(), rpmpythonNew(), rpmReadPackageManifest(), rpmrepoInitPopt(), rpmsquirrelNew(), rpmtclNew(), rpmtsOpenSDB(), rpnFormat(), and strsubFormat().
goto errxit |
Definition at line 1527 of file rpmgrep.c.
Referenced by db_init(), doAddSubtract(), doLogical(), doMultiplyDivide(), doRelational(), for(), ftpLogin(), ftpReq(), headerLoad(), headerReload(), headerUnload(), httpReq(), if(), rpmTempFile(), and tcpConnect().
|
static |
|
static |
|
static |
const char* int |
|
static |
Definition at line 87 of file rpmgrep.c.
Referenced by cacheWalkPathFilter(), for(), freeGlobs(), if(), and initGlobs().
|
static |
Tables for prefixing and suffixing patterns, according to the -w, -x, and -F options.
These set the 1, 2, and 4 bits in grepFlags, respectively. Note that the combination of -w and -x has the same effect as -x on its own, so we can treat them as the same.
Definition at line 183 of file rpmgrep.c.
Referenced by rpmbcSetRSA(), and showQueryPackage().
|
static |
|
static |
|
static |
xx = rpmswEnter(&grep_totalops, -1) |