mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 01:01:06 +00:00
grep: Move lone 'r'grep case into the adjacent switch
This 'r' case should have belonged to the switch in the first place, but I had somehow missed the switch when initially adding the rgrep link. The zgrep script later came along and faithfully left this case standing alone, so we will now go ahead and join it. Nearby comment also adjusted a tad bit for wording and style. Reported by: Daniel Ebdrup MFC after: 3 days
This commit is contained in:
parent
d842aa5114
commit
25385eb325
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=348503
|
@ -343,14 +343,12 @@ main(int argc, char *argv[])
|
|||
|
||||
setlocale(LC_ALL, "");
|
||||
|
||||
/* Check what is the program name of the binary. In this
|
||||
way we can have all the funcionalities in one binary
|
||||
without the need of scripting and using ugly hacks. */
|
||||
/*
|
||||
* Check how we've bene invoked to determine the behavior we should
|
||||
* exhibit. In this way we can have all the functionalities in one
|
||||
* binary without the need of scripting and using ugly hacks.
|
||||
*/
|
||||
pn = getprogname();
|
||||
if (pn[0] == 'r') {
|
||||
dirbehave = DIR_RECURSE;
|
||||
Hflag = true;
|
||||
}
|
||||
switch (pn[0]) {
|
||||
case 'e':
|
||||
grepbehave = GREP_EXTENDED;
|
||||
|
@ -358,6 +356,10 @@ main(int argc, char *argv[])
|
|||
case 'f':
|
||||
grepbehave = GREP_FIXED;
|
||||
break;
|
||||
case 'r':
|
||||
dirbehave = DIR_RECURSE;
|
||||
Hflag = true;
|
||||
break;
|
||||
}
|
||||
|
||||
lastc = '\0';
|
||||
|
|
Loading…
Reference in a new issue