--- embedaddon/pcre/pcregrep.c 2012/02/21 23:05:51 1.1.1.1 +++ embedaddon/pcre/pcregrep.c 2012/02/21 23:50:25 1.1.1.2 @@ -6,7 +6,7 @@ its pattern matching. On a Unix or Win32 system it can recurse into directories. - Copyright (c) 1997-2011 University of Cambridge + Copyright (c) 1997-2012 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -625,7 +625,7 @@ Arguments: Returns: the number of characters read, zero at end of file */ -static int +static unsigned int read_one_line(char *buffer, int length, FILE *f) { int c; @@ -1573,7 +1573,6 @@ grep_or_recurse(char *pathname, BOOL dir_recurse, BOOL int rc = 1; int sep; int frtype; -int pathlen; void *handle; FILE *in = NULL; /* Ensure initialized */ @@ -1585,6 +1584,10 @@ gzFile ingz = NULL; BZFILE *inbz2 = NULL; #endif +#if defined SUPPORT_LIBZ || defined SUPPORT_LIBZ2 +int pathlen; +#endif + /* If the file name is "-" we scan stdin */ if (strcmp(pathname, "-") == 0) @@ -1664,7 +1667,9 @@ skipping was not requested. The scan proceeds. If this argument at top level, we don't show the file name, unless we are only showing the file name, or the filename was forced (-H). */ +#if defined SUPPORT_LIBZ || defined SUPPORT_LIBZ2 pathlen = (int)(strlen(pathname)); +#endif /* Open using zlib if it is supported and the file name ends with .gz. */