diff options
| author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2013-05-20 03:03:23 +0000 |
|---|---|---|
| committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2013-05-20 03:03:23 +0000 |
| commit | 226d495989ed1b1cca53b70f9a1fcee891be9d93 (patch) | |
| tree | 698d16658e5d256e793b9a7da155f753684dde0a /gnu | |
| parent | 89bc9d9c13e93ffcd2c26ca4ba429069c88c5456 (diff) | |
Notes
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/usr.bin/grep/dfa.c | 11 | ||||
| -rw-r--r-- | gnu/usr.bin/grep/grep.c | 4 | ||||
| -rw-r--r-- | gnu/usr.bin/grep/search.c | 5 |
3 files changed, 9 insertions, 11 deletions
diff --git a/gnu/usr.bin/grep/dfa.c b/gnu/usr.bin/grep/dfa.c index faf4f0b008a1..920d13986fdf 100644 --- a/gnu/usr.bin/grep/dfa.c +++ b/gnu/usr.bin/grep/dfa.c @@ -334,10 +334,9 @@ static int hard_LC_COLLATE; /* Nonzero if LC_COLLATE is hard. */ #ifdef MBS_SUPPORT /* These variables are used only if (MB_CUR_MAX > 1). */ static mbstate_t mbs; /* Mbstate for mbrlen(). */ -static ssize_t cur_mb_len; /* Byte length of the current scanning - multibyte character. Must also handle - negative result from mbrlen(). */ -static ssize_t cur_mb_index; /* Byte index of the current scanning multibyte +static int cur_mb_len; /* Byte length of the current scanning + multibyte character. */ +static int cur_mb_index; /* Byte index of the current scanning multibyte character. singlebyte character : cur_mb_index = 0 @@ -370,7 +369,7 @@ static unsigned char const *buf_end; /* refference to end in dfaexec(). */ /* This function update cur_mb_len, and cur_mb_index. p points current lexptr, len is the remaining buffer length. */ static void -update_mb_len_index (unsigned char const *p, size_t len) +update_mb_len_index (unsigned char const *p, int len) { /* If last character is a part of a multibyte character, we update cur_mb_index. */ @@ -2464,7 +2463,7 @@ match_mb_charset (struct dfa *d, int s, position pos, int index) int match; /* Flag which represent that matching succeed. */ int match_len; /* Length of the character (or collating element) with which this operator match. */ - size_t op_len; /* Length of the operator. */ + int op_len; /* Length of the operator. */ char buffer[128]; wchar_t wcbuf[6]; diff --git a/gnu/usr.bin/grep/grep.c b/gnu/usr.bin/grep/grep.c index 6bc97f834434..1684a820b670 100644 --- a/gnu/usr.bin/grep/grep.c +++ b/gnu/usr.bin/grep/grep.c @@ -1346,9 +1346,9 @@ int main (int argc, char **argv) { char *keys; - size_t cc, keycc, oldcc, keyalloc; + size_t keycc, oldcc, keyalloc; int with_filenames; - int opt, status; + int opt, cc, status; int default_context; FILE *fp; extern char *optarg; diff --git a/gnu/usr.bin/grep/search.c b/gnu/usr.bin/grep/search.c index 96ee18197434..982d2c5ce098 100644 --- a/gnu/usr.bin/grep/search.c +++ b/gnu/usr.bin/grep/search.c @@ -112,7 +112,7 @@ static void kwsinit (void) { static char trans[NCHAR]; - size_t i; + int i; if (match_icase) for (i = 0; i < NCHAR; ++i) @@ -326,8 +326,7 @@ EGexecute (char const *buf, size_t size, size_t *match_size, int exact) { register char const *buflim, *beg, *end; char eol = eolbyte; - int backref; - ptrdiff_t start, len; + int backref, start, len; struct kwsmatch kwsm; size_t i, ret_val; static int use_dfa; |
