1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-10 14:02:43 +00:00

Fix a longstanding buglet in bz-prefixed grep(1).

This commit is contained in:
Jung-uk Kim 2005-10-20 21:50:44 +00:00
parent 64a266f9e8
commit 354cdde5b9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=151527

View File

@ -1359,16 +1359,16 @@ main (int argc, char **argv)
if (program_name && strrchr (program_name, '/'))
program_name = strrchr (program_name, '/') + 1;
if (strlen (program_name) > 1 && program_name[0] == 'b' && program_name[1] == 'z') {
BZflag = 1;
program_name += 2;
}
#if HAVE_LIBZ > 0
if (program_name[0] == 'z') {
else if (strlen (program_name) > 0 && program_name[0] == 'z') {
Zflag = 1;
++program_name;
}
#endif
if (program_name[0] == 'b') {
BZflag = 1;
++program_name;
}
#if defined(__MSDOS__) || defined(_WIN32)
/* DOS and MS-Windows use backslashes as directory separators, and usually