The Wayback Machine - https://web.archive.org/web/20180905095817/https://git.savannah.gnu.org/cgit/man-db.git/commit/?id=84bde8d8a9a357bd372793d25746ac6b49480525
summaryrefslogtreecommitdiff
diff options
authorColin Watson <cjwatson@debian.org>2017-11-21 09:24:15 +0000
committerColin Watson <cjwatson@debian.org>2017-11-21 09:24:15 +0000
commit84bde8d8a9a357bd372793d25746ac6b49480525 (patch)
tree9f9171c87fb45de5a26bc7c94c37401f07b8cec3
parentf498f1bad6cb5bd154f1a10cbdafad0aa159bfd3 (diff)
downloadman-db-84bde8d8a9a357bd372793d25746ac6b49480525.tar.gz
Stop Easter egg interfering with non-error cases
* src/man.c (main): Restrict Easter egg to the case where 'man' is run without any options or arguments at all (which isn't useful for anything else), not 'man -w' (which is). https://unix.stackexchange.com/questions/405783/why-does-man-print-gimme-gimme-gimme-at-0030
-rw-r--r--src/man.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/man.c b/src/man.c
index 8c67f21..637bb4d 100644
--- a/src/man.c
+++ b/src/man.c
@@ -4120,18 +4120,18 @@ int main (int argc, char *argv[])
debug ("\nusing %s as pager\n", pager);
if (first_arg == argc) {
- /* http://twitter.com/#!/marnanel/status/132280557190119424 */
- time_t now = time (NULL);
- struct tm *localnow = localtime (&now);
- if (localnow &&
- localnow->tm_hour == 0 && localnow->tm_min == 30)
- fprintf (stderr, "gimme gimme gimme\n");
-
if (print_where) {
manp = get_manpath ("");
printf ("%s\n", manp);
exit (OK);
} else {
+ /* http://twitter.com/#!/marnanel/status/132280557190119424 */
+ time_t now = time (NULL);
+ struct tm *localnow = localtime (&now);
+ if (localnow &&
+ localnow->tm_hour == 0 && localnow->tm_min == 30)
+ fprintf (stderr, "gimme gimme gimme\n");
+
free_cwd (&cwd);
free (internal_locale);
free (program_name);