~theorytoe/mman

578ce7f432a809e76f4409b38c5d909db0adfc68 — theorytoe 6 months ago eae75b4
bump: patches
3 files changed, 15 insertions(+), 157 deletions(-)

M no-scdoc.patch
M no-troff.patch
M nroff-fmt.patch
M no-scdoc.patch => no-scdoc.patch +0 -50
@@ 96,53 96,3 @@
 				*)
 					usage
 					exit 0;;
--- mman.1	2022-11-21 18:22:50.483321264 -0700
+++ mman.1.in	2022-11-21 18:22:58.536654103 -0700
@@ -5,14 +5,14 @@
 
 .SH SYNPOSYS
 .B mman
-.RI [ \-e | \-t | \-s | \-c | \-l ]
+.RI [ \-e | \-t | \-l ]
 .RI [ section ]
 .I name
 
 .SH DESCRIPTION
-Create man pages for personal documentation using plaintext, \fBtroff\fR(1), and \fBscdoc\fR(1)
-syntax. Pages are organized by section, similar to traditional manpages, but without the strict
-requirement to conform to those standards. If a 
+Create man pages for personal documentation using plaintext and \fBtroff\fR(1)
+syntax. Pages are organized by section, similar to traditional manpages, but
+without the strict requirement to conform to those standards. If a 
 .I secion
 Is not specified, new pages will default to secion 0, a non-standard section.
 
@@ -25,22 +25,10 @@
 Edit a troff man page.
 
 .TP
-\fB \-s \fR
-Edit an scdoc man page. Compiles pages after edit.
-
-.TP
-\fB \-c \fR
-Compile scdoc manpages.
-
-.TP
 \fB \-l \fR
 List available pages.
 
 .SH NOTES
-Be wary of pages written with scdoc. If a troff and scdoc page are named the same, compiling
-an scdoc page will overwrite the existsing troff page. This is intended behavior.
-
-.PP
 Man pages are shown with colors using \fBless\fR(1) termcap environment vars.
 
 .SH AUTHOR
@@ -62,4 +50,4 @@
 the extent permitted by law.
 
 .SH SEE ALSO
-\fBman\fR(7) \fBman-pages\fR(7) \fBnroff\fR(1) \fBtroff\fR(1) \fBscdoc\fR(5) \fBless\fR(1)
+\fBman\fR(7) \fBman-pages\fR(7) \fBnroff\fR(1) \fBtroff\fR(1) \fBless\fR(1)

M no-troff.patch => no-troff.patch +0 -39
@@ 57,42 57,3 @@
 				editscdoc)
 					if ! istty; then
 						echo "Not running in a tty!"
--- mman.1	2022-11-21 18:22:50.483321264 -0700
+++ mman.1.in	2022-11-21 18:25:26.483311724 -0700
@@ -5,7 +5,7 @@
 
 .SH SYNPOSYS
 .B mman
-.RI [ \-e | \-t | \-s | \-c | \-l ]
+.RI [ \-e | \-s | \-c | \-l ]
 .RI [ section ]
 .I name
 
@@ -21,10 +21,6 @@
 Edit a txt man page.
 
 .TP
-\fB \-t \fR
-Edit a troff man page.
-
-.TP
 \fB \-s \fR
 Edit an scdoc man page. Compiles pages after edit.
 
@@ -37,10 +33,6 @@
 List available pages.
 
 .SH NOTES
-Be wary of pages written with scdoc. If a troff and scdoc page are named the same, compiling
-an scdoc page will overwrite the existsing troff page. This is intended behavior.
-
-.PP
 Man pages are shown with colors using \fBless\fR(1) termcap environment vars.
 
 .SH AUTHOR
@@ -62,4 +54,4 @@
 the extent permitted by law.
 
 .SH SEE ALSO
-\fBman\fR(7) \fBman-pages\fR(7) \fBnroff\fR(1) \fBtroff\fR(1) \fBscdoc\fR(5) \fBless\fR(1)
+\fBman\fR(7) \fBman-pages\fR(7) \fBscdoc\fR(5) \fBless\fR(1)

M nroff-fmt.patch => nroff-fmt.patch +15 -68
@@ 1,68 1,15 @@
--- mman.1	2022-11-21 22:18:01.252458882 -0700
+++ mman.1.in	1969-12-31 17:00:00.000000000 -0700
@@ -1,65 +0,0 @@
-.\" 
-.TH mman 1 2022-11-20 "mman 0.0-a"
-.SH NAME
-mman \- write personal mmanpages
-
-.SH SYNPOSYS
-.B mman
-.RI [ \-e | \-t | \-s | \-c | \-l ]
-.RI [ section ]
-.I name
-
-.SH DESCRIPTION
-Create man pages for personal documentation using plaintext, \fBtroff\fR(1), and \fBscdoc\fR(1)
-syntax. Pages are organized by section, similar to traditional manpages, but without the strict
-requirement to conform to those standards. If a 
-.I secion
-Is not specified, new pages will default to secion 0, a non-standard section.
-
-.TP
-\fB \-e \fR
-Edit a txt man page.
-
-.TP
-\fB \-t \fR
-Edit a troff man page.
-
-.TP
-\fB \-s \fR
-Edit an scdoc man page. Compiles pages after edit.
-
-.TP
-\fB \-c \fR
-Compile scdoc manpages.
-
-.TP
-\fB \-l \fR
-List available pages.
-
-.SH NOTES
-Be wary of pages written with scdoc. If a troff and scdoc page are named the same, compiling
-an scdoc page will overwrite the existsing troff page. This is intended behavior.
-
-.PP
-Man pages are shown with colors using \fBless\fR(1) termcap environment vars.
-
-.SH AUTHOR
-Written by theorytoe <\fBhttps://theoryware.net\fR> and contributors.
-
-.SH BUG REPORTS
-Bug reports and patches can be sent to the mailing list
-<\fB~theorytoe/public-inbox@lists.sr.ht\fR>
-
-.PP
-Patches sent must have in the 
-.I mman
-in the subject line ([PATCH \fImman\fR]).
-
-.SH COPYRIGHT
-Copyright © 2022 theorytoe and authors. Licensed under GPLv3.
-.PP
-This is free software: you are free to change and redistribute it. There is NO WARRANTY, to
-the extent permitted by law.
-
-.SH SEE ALSO
-\fBman\fR(7) \fBman-pages\fR(7) \fBnroff\fR(1) \fBtroff\fR(1) \fBscdoc\fR(5) \fBless\fR(1)
--- mman	2022-11-22 13:44:18.161029481 -0700
+++ mman.in	2022-11-22 17:21:40.030231890 -0700
@@ -99,10 +99,10 @@
 		file=${MMANDIR}/$1.$i.man
 		if [ -f "$file" ]; then
 			if istty; then
-				man -mandoc "$file"
+				nroff -Tascii -c mandoc < "$file" | $PAGER
 				return $?
 			else
-				man -mandoc "$file"
+				nroff -Tascii -c mandoc < "$file"
 				return $?
 			fi
 		fi