source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: If man(1) only has one single argument, always interpret it as a
@ 2015-01-01 13:21 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2015-01-01 13:21 UTC (permalink / raw)
  To: source

Log Message:
-----------
If man(1) only has one single argument, always interpret it as a name,
never as a section.  Who would have thought that people call their 
manual pages 7z(1), 9c(1), 9p(1), and 9p(3)...
Patch from Sebastien Marie <semarie dash openbsd at latrappe dot fr>.

Modified Files:
--------------
    mdocml:
        main.c

Revision Data
-------------
Index: main.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/main.c,v
retrieving revision 1.210
retrieving revision 1.211
diff -Lmain.c -Lmain.c -u -p -r1.210 -r1.211
--- main.c
+++ main.c
@@ -310,7 +310,8 @@ main(int argc, char *argv[])
 				argv = help_argv;
 				argc = 1;
 			}
-		} else if (((uc = argv[0]) != NULL) &&
+		} else if (argc > 1 &&
+		    ((uc = argv[0]) != NULL) &&
 		    ((isdigit(uc[0]) && (uc[1] == '\0' ||
 		      (isalpha(uc[1]) && uc[2] == '\0'))) ||
 		     (uc[0] == 'n' && uc[1] == '\0'))) {
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-01-01 13:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-01 13:21 mdocml: If man(1) only has one single argument, always interpret it as a schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).