From 977b25a76ae8263e53fb4eb1abfc395769f23e3d Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 13 Aug 2020 23:41:59 -0400 Subject: tmac: introduce real manual reference macro instead of overloading IR The overloading of IR emits magic \X'...' sequences that turn into HTML manual links. But not all such IR invocations should be manual links; those had to be written to avoid the IR macro before. Worse, the \X'...' ending the IR causes troff to emit only a single space after a period. Defining a new IM macro for manual references fixes both problems. Fixes #441. --- man/man3/print.3 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'man/man3/print.3') diff --git a/man/man3/print.3 b/man/man3/print.3 index a701bc04..997b5cb3 100644 --- a/man/man3/print.3 +++ b/man/man3/print.3 @@ -67,7 +67,7 @@ writes to the named output file descriptor: a buffered form is described in -.IR bio (3). +.IM bio (3) . .I Sprint places text followed by the NUL character @@ -104,7 +104,7 @@ is like .IR sprint , except that it prints into and returns a string of the required length, which is allocated by -.IR malloc (3). +.IM malloc (3) . .PP The routines .IR runesprint , @@ -361,7 +361,7 @@ The .B S verb is similar, but it interprets its pointer as an array of runes (see -.IR utf (7)); +.IM utf (7) ); the runes are converted to .SM UTF before output. @@ -389,10 +389,10 @@ but that will change if pointers and integers are different sizes. The .B r verb takes no arguments; it copies the error string returned by a call to -.IR errstr (3). +.IM errstr (3) . .PP Custom verbs may be installed using -.IR fmtinstall (3). +.IM fmtinstall (3) . .SH EXAMPLE This function prints an error message with a variable number of arguments and then quits. @@ -415,9 +415,9 @@ void fatal(char *msg, ...) .SH SOURCE .B \*9/src/lib9/fmt .SH SEE ALSO -.IR fmtinstall (3), -.IR fprintf (3), -.IR utf (7) +.IM fmtinstall (3) , +.IM fprintf (3) , +.IM utf (7) .SH DIAGNOSTICS Routines that write to a file descriptor or call .IR malloc @@ -425,7 +425,7 @@ set .IR errstr . .SH BUGS The formatting is close to that specified for ANSI -.IR fprintf (3); +.IM fprintf (3) ; the main difference is that .B b and -- cgit v1.2.3 From d32deab17bfffa5bffc5fab3e6577558e40888c5 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sat, 15 Aug 2020 20:07:38 -0400 Subject: tmac: rename IM (italic manual) to MR (manual reference) Suggested by G. Brandon Robinson. --- man/man3/print.3 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'man/man3/print.3') diff --git a/man/man3/print.3 b/man/man3/print.3 index 997b5cb3..452ed7c8 100644 --- a/man/man3/print.3 +++ b/man/man3/print.3 @@ -67,7 +67,7 @@ writes to the named output file descriptor: a buffered form is described in -.IM bio (3) . +.MR bio (3) . .I Sprint places text followed by the NUL character @@ -104,7 +104,7 @@ is like .IR sprint , except that it prints into and returns a string of the required length, which is allocated by -.IM malloc (3) . +.MR malloc (3) . .PP The routines .IR runesprint , @@ -361,7 +361,7 @@ The .B S verb is similar, but it interprets its pointer as an array of runes (see -.IM utf (7) ); +.MR utf (7) ); the runes are converted to .SM UTF before output. @@ -389,10 +389,10 @@ but that will change if pointers and integers are different sizes. The .B r verb takes no arguments; it copies the error string returned by a call to -.IM errstr (3) . +.MR errstr (3) . .PP Custom verbs may be installed using -.IM fmtinstall (3) . +.MR fmtinstall (3) . .SH EXAMPLE This function prints an error message with a variable number of arguments and then quits. @@ -415,9 +415,9 @@ void fatal(char *msg, ...) .SH SOURCE .B \*9/src/lib9/fmt .SH SEE ALSO -.IM fmtinstall (3) , -.IM fprintf (3) , -.IM utf (7) +.MR fmtinstall (3) , +.MR fprintf (3) , +.MR utf (7) .SH DIAGNOSTICS Routines that write to a file descriptor or call .IR malloc @@ -425,7 +425,7 @@ set .IR errstr . .SH BUGS The formatting is close to that specified for ANSI -.IM fprintf (3) ; +.MR fprintf (3) ; the main difference is that .B b and -- cgit v1.2.3