From 78793aecce92e1be7c9d2ef92c22c1746366954f Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 24 Apr 2022 10:17:25 -0700 Subject: man page: use fonts in examples. --- cppawk.1 | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'cppawk.1') diff --git a/cppawk.1 b/cppawk.1 index b87cb37..9dbc403 100644 --- a/cppawk.1 +++ b/cppawk.1 @@ -236,13 +236,16 @@ manual page. .SH EXAMPLES Print the larger of field 1 or 2: - cppawk '// C comment - #define max(a, b) ((a) > (b) ? (a) : (b)) - { print max($1, $2) /* C comment */ } #awk comment' +.ft B + cppawk '\fI// C comment\fP + #define max(\fIa\fP, \fIb\fP) ((\fIa\fP) > (\fIb\fP) ? (\fIa\fP) : (\fIb\fP)) + { print max($1, $2) /* C comment */ } \fI#awk comment\fP' +.ft R Implement awk-like processing loop within function, to process /proc/mounts: +.ft B #include "awkloop.h" function main() @@ -256,14 +259,17 @@ Implement awk-like processing loop within function, to process BEGIN { main() } +.ft R Where .B awkloop.h contains: - #define awkloop(file) for (; getline < file || (close(file) && 0); ) +.ft B + #define awkloop(\fIfile\fP) for (; getline < \fIfile\fP || (close(\fIfile\fP) && 0); ) #define nextrec continue - #define rule(cond) if (cond) + #define rule(\fIcond\fP) if (\fIcond\fP) +.ft R .SH "SEE ALSO" awk(1), cpp(6), cppawk-narg(1), cppawk-case(1), cppawk-cons(1) -- cgit v1.2.3