| 909 |
int i; |
int i; |
| 910 |
for (i = 0; i < pattern_count; i++) |
for (i = 0; i < pattern_count; i++) |
| 911 |
{ |
{ |
| 912 |
*mrc = pcre_exec(pattern_list[i], hints_list[i], matchptr, length, 0, |
*mrc = pcre_exec(pattern_list[i], hints_list[i], matchptr, (int)length, 0, |
| 913 |
PCRE_NOTEMPTY, offsets, OFFSET_SIZE); |
PCRE_NOTEMPTY, offsets, OFFSET_SIZE); |
| 914 |
if (*mrc >= 0) return TRUE; |
if (*mrc >= 0) return TRUE; |
| 915 |
if (*mrc == PCRE_ERROR_NOMATCH) continue; |
if (*mrc == PCRE_ERROR_NOMATCH) continue; |
| 1365 |
offset to the current line is maintained in filepos. */ |
offset to the current line is maintained in filepos. */ |
| 1366 |
|
|
| 1367 |
ptr += linelength + endlinelength; |
ptr += linelength + endlinelength; |
| 1368 |
filepos += linelength + endlinelength; |
filepos += (int)(linelength + endlinelength); |
| 1369 |
linenumber++; |
linenumber++; |
| 1370 |
|
|
| 1371 |
/* If input is line buffered, and the buffer is not yet full, read another |
/* If input is line buffered, and the buffer is not yet full, read another |
| 1531 |
{ |
{ |
| 1532 |
int frc, nflen; |
int frc, nflen; |
| 1533 |
sprintf(buffer, "%.512s%c%.128s", pathname, sep, nextfile); |
sprintf(buffer, "%.512s%c%.128s", pathname, sep, nextfile); |
| 1534 |
nflen = strlen(nextfile); |
nflen = (int)(strlen(nextfile)); |
| 1535 |
|
|
| 1536 |
if (isdirectory(buffer)) |
if (isdirectory(buffer)) |
| 1537 |
{ |
{ |
| 1575 |
argument at top level, we don't show the file name, unless we are only showing |
argument at top level, we don't show the file name, unless we are only showing |
| 1576 |
the file name, or the filename was forced (-H). */ |
the file name, or the filename was forced (-H). */ |
| 1577 |
|
|
| 1578 |
pathlen = strlen(pathname); |
pathlen = (int)(strlen(pathname)); |
| 1579 |
|
|
| 1580 |
/* Open using zlib if it is supported and the file name ends with .gz. */ |
/* Open using zlib if it is supported and the file name ends with .gz. */ |
| 1581 |
|
|
| 2028 |
} |
} |
| 2029 |
else /* Special case xxx=data */ |
else /* Special case xxx=data */ |
| 2030 |
{ |
{ |
| 2031 |
int oplen = equals - op->long_name; |
int oplen = (int)(equals - op->long_name); |
| 2032 |
int arglen = (argequals == NULL)? (int)strlen(arg) : argequals - arg; |
int arglen = (argequals == NULL)? |
| 2033 |
|
(int)strlen(arg) : (int)(argequals - arg); |
| 2034 |
if (oplen == arglen && strncmp(arg, op->long_name, oplen) == 0) |
if (oplen == arglen && strncmp(arg, op->long_name, oplen) == 0) |
| 2035 |
{ |
{ |
| 2036 |
option_data = arg + arglen; |
option_data = arg + arglen; |
| 2051 |
char buff1[24]; |
char buff1[24]; |
| 2052 |
char buff2[24]; |
char buff2[24]; |
| 2053 |
|
|
| 2054 |
int baselen = opbra - op->long_name; |
int baselen = (int)(opbra - op->long_name); |
| 2055 |
int fulllen = strchr(op->long_name, ')') - op->long_name + 1; |
int fulllen = (int)(strchr(op->long_name, ')') - op->long_name + 1); |
| 2056 |
int arglen = (argequals == NULL || equals == NULL)? |
int arglen = (argequals == NULL || equals == NULL)? |
| 2057 |
(int)strlen(arg) : argequals - arg; |
(int)strlen(arg) : (int)(argequals - arg); |
| 2058 |
|
|
| 2059 |
sprintf(buff1, "%.*s", baselen, op->long_name); |
sprintf(buff1, "%.*s", baselen, op->long_name); |
| 2060 |
sprintf(buff2, "%s%.*s", buff1, fulllen - baselen - 2, opbra + 1); |
sprintf(buff2, "%s%.*s", buff1, fulllen - baselen - 2, opbra + 1); |
| 2206 |
{ |
{ |
| 2207 |
char *equals = strchr(op->long_name, '='); |
char *equals = strchr(op->long_name, '='); |
| 2208 |
int nlen = (equals == NULL)? (int)strlen(op->long_name) : |
int nlen = (equals == NULL)? (int)strlen(op->long_name) : |
| 2209 |
equals - op->long_name; |
(int)(equals - op->long_name); |
| 2210 |
fprintf(stderr, "pcregrep: Malformed number \"%s\" after --%.*s\n", |
fprintf(stderr, "pcregrep: Malformed number \"%s\" after --%.*s\n", |
| 2211 |
option_data, nlen, op->long_name); |
option_data, nlen, op->long_name); |
| 2212 |
} |
} |