]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bc/manuals/dc/ENP.1
Update to version 3.1.1
[FreeBSD/FreeBSD.git] / contrib / bc / manuals / dc / ENP.1
1 .\"
2 .\" SPDX-License-Identifier: BSD-2-Clause
3 .\"
4 .\" Copyright (c) 2018-2020 Gavin D. Howard and contributors.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions are met:
8 .\"
9 .\" * Redistributions of source code must retain the above copyright notice,
10 .\"   this list of conditions and the following disclaimer.
11 .\"
12 .\" * Redistributions in binary form must reproduce the above copyright notice,
13 .\"   this list of conditions and the following disclaimer in the documentation
14 .\"   and/or other materials provided with the distribution.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
20 .\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 .\" POSSIBILITY OF SUCH DAMAGE.
27 .\"
28 .TH "DC" "1" "July 2020" "Gavin D. Howard" "General Commands Manual"
29 .SH Name
30 .PP
31 dc \- arbitrary\-precision reverse\-Polish notation calculator
32 .SH SYNOPSIS
33 .PP
34 \f[B]dc\f[] [\f[B]\-hiPvVx\f[]] [\f[B]\-\-version\f[]]
35 [\f[B]\-\-help\f[]] [\f[B]\-\-interactive\f[]] [\f[B]\-\-no\-prompt\f[]]
36 [\f[B]\-\-extended\-register\f[]] [\f[B]\-e\f[] \f[I]expr\f[]]
37 [\f[B]\-\-expression\f[]=\f[I]expr\f[]...] [\f[B]\-f\f[]
38 \f[I]file\f[]...] [\f[B]\-file\f[]=\f[I]file\f[]...] [\f[I]file\f[]...]
39 .SH DESCRIPTION
40 .PP
41 dc(1) is an arbitrary\-precision calculator.
42 It uses a stack (reverse Polish notation) to store numbers and results
43 of computations.
44 Arithmetic operations pop arguments off of the stack and push the
45 results.
46 .PP
47 If no files are given on the command\-line as extra arguments (i.e., not
48 as \f[B]\-f\f[] or \f[B]\-\-file\f[] arguments), then dc(1) reads from
49 \f[B]stdin\f[].
50 Otherwise, those files are processed, and dc(1) will then exit.
51 .PP
52 This is different from the dc(1) on OpenBSD and possibly other dc(1)
53 implementations, where \f[B]\-e\f[] (\f[B]\-\-expression\f[]) and
54 \f[B]\-f\f[] (\f[B]\-\-file\f[]) arguments cause dc(1) to execute them
55 and exit.
56 The reason for this is that this dc(1) allows users to set arguments in
57 the environment variable \f[B]DC_ENV_ARGS\f[] (see the \f[B]ENVIRONMENT
58 VARIABLES\f[] section).
59 Any expressions given on the command\-line should be used to set up a
60 standard environment.
61 For example, if a user wants the \f[B]scale\f[] always set to
62 \f[B]10\f[], they can set \f[B]DC_ENV_ARGS\f[] to \f[B]\-e 10k\f[], and
63 this dc(1) will always start with a \f[B]scale\f[] of \f[B]10\f[].
64 .PP
65 If users want to have dc(1) exit after processing all input from
66 \f[B]\-e\f[] and \f[B]\-f\f[] arguments (and their equivalents), then
67 they can just simply add \f[B]\-e q\f[] as the last command\-line
68 argument or define the environment variable \f[B]DC_EXPR_EXIT\f[].
69 .SH OPTIONS
70 .PP
71 The following are the options that dc(1) accepts.
72 .TP
73 .B \f[B]\-h\f[], \f[B]\-\-help\f[]
74 Prints a usage message and quits.
75 .RS
76 .RE
77 .TP
78 .B \f[B]\-v\f[], \f[B]\-V\f[], \f[B]\-\-version\f[]
79 Print the version information (copyright header) and exit.
80 .RS
81 .RE
82 .TP
83 .B \f[B]\-i\f[], \f[B]\-\-interactive\f[]
84 Forces interactive mode.
85 (See the \f[B]INTERACTIVE MODE\f[] section.)
86 .RS
87 .PP
88 This is a \f[B]non\-portable extension\f[].
89 .RE
90 .TP
91 .B \f[B]\-P\f[], \f[B]\-\-no\-prompt\f[]
92 This option is a no\-op.
93 .RS
94 .PP
95 This is a \f[B]non\-portable extension\f[].
96 .RE
97 .TP
98 .B \f[B]\-x\f[] \f[B]\-\-extended\-register\f[]
99 Enables extended register mode.
100 See the \f[I]Extended Register Mode\f[] subsection of the
101 \f[B]REGISTERS\f[] section for more information.
102 .RS
103 .PP
104 This is a \f[B]non\-portable extension\f[].
105 .RE
106 .TP
107 .B \f[B]\-e\f[] \f[I]expr\f[], \f[B]\-\-expression\f[]=\f[I]expr\f[]
108 Evaluates \f[I]expr\f[].
109 If multiple expressions are given, they are evaluated in order.
110 If files are given as well (see below), the expressions and files are
111 evaluated in the order given.
112 This means that if a file is given before an expression, the file is
113 read in and evaluated first.
114 .RS
115 .PP
116 In other dc(1) implementations, this option causes the program to
117 execute the expressions and then exit.
118 This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
119 the \f[B]ENVIRONMENT VARIABLES\f[] section).
120 .PP
121 This is a \f[B]non\-portable extension\f[].
122 .RE
123 .TP
124 .B \f[B]\-f\f[] \f[I]file\f[], \f[B]\-\-file\f[]=\f[I]file\f[]
125 Reads in \f[I]file\f[] and evaluates it, line by line, as though it were
126 read through \f[B]stdin\f[].
127 If expressions are also given (see above), the expressions are evaluated
128 in the order given.
129 .RS
130 .PP
131 In other dc(1) implementations, this option causes the program to
132 execute the files and then exit.
133 This dc(1) does not, unless the \f[B]DC_EXPR_EXIT\f[] is defined (see
134 the \f[B]ENVIRONMENT VARIABLES\f[] section).
135 .PP
136 This is a \f[B]non\-portable extension\f[].
137 .RE
138 .PP
139 All long options are \f[B]non\-portable extensions\f[].
140 .SH STDOUT
141 .PP
142 Any non\-error output is written to \f[B]stdout\f[].
143 .PP
144 \f[B]Note\f[]: Unlike other dc(1) implementations, this dc(1) will issue
145 a fatal error (see the \f[B]EXIT STATUS\f[] section) if it cannot write
146 to \f[B]stdout\f[], so if \f[B]stdout\f[] is closed, as in \f[B]dc
147 >&\-\f[], it will quit with an error.
148 This is done so that dc(1) can report problems when \f[B]stdout\f[] is
149 redirected to a file.
150 .PP
151 If there are scripts that depend on the behavior of other dc(1)
152 implementations, it is recommended that those scripts be changed to
153 redirect \f[B]stdout\f[] to \f[B]/dev/null\f[].
154 .SH STDERR
155 .PP
156 Any error output is written to \f[B]stderr\f[].
157 .PP
158 \f[B]Note\f[]: Unlike other dc(1) implementations, this dc(1) will issue
159 a fatal error (see the \f[B]EXIT STATUS\f[] section) if it cannot write
160 to \f[B]stderr\f[], so if \f[B]stderr\f[] is closed, as in \f[B]dc
161 2>&\-\f[], it will quit with an error.
162 This is done so that dc(1) can exit with an error code when
163 \f[B]stderr\f[] is redirected to a file.
164 .PP
165 If there are scripts that depend on the behavior of other dc(1)
166 implementations, it is recommended that those scripts be changed to
167 redirect \f[B]stderr\f[] to \f[B]/dev/null\f[].
168 .SH SYNTAX
169 .PP
170 Each item in the input source code, either a number (see the
171 \f[B]NUMBERS\f[] section) or a command (see the \f[B]COMMANDS\f[]
172 section), is processed and executed, in order.
173 Input is processed immediately when entered.
174 .PP
175 \f[B]ibase\f[] is a register (see the \f[B]REGISTERS\f[] section) that
176 determines how to interpret constant numbers.
177 It is the "input" base, or the number base used for interpreting input
178 numbers.
179 \f[B]ibase\f[] is initially \f[B]10\f[].
180 The max allowable value for \f[B]ibase\f[] is \f[B]16\f[].
181 The min allowable value for \f[B]ibase\f[] is \f[B]2\f[].
182 The max allowable value for \f[B]ibase\f[] can be queried in dc(1)
183 programs with the \f[B]T\f[] command.
184 .PP
185 \f[B]obase\f[] is a register (see the \f[B]REGISTERS\f[] section) that
186 determines how to output results.
187 It is the "output" base, or the number base used for outputting numbers.
188 \f[B]obase\f[] is initially \f[B]10\f[].
189 The max allowable value for \f[B]obase\f[] is \f[B]DC_BASE_MAX\f[] and
190 can be queried with the \f[B]U\f[] command.
191 The min allowable value for \f[B]obase\f[] is \f[B]2\f[].
192 Values are output in the specified base.
193 .PP
194 The \f[I]scale\f[] of an expression is the number of digits in the
195 result of the expression right of the decimal point, and \f[B]scale\f[]
196 is a register (see the \f[B]REGISTERS\f[] section) that sets the
197 precision of any operations (with exceptions).
198 \f[B]scale\f[] is initially \f[B]0\f[].
199 \f[B]scale\f[] cannot be negative.
200 The max allowable value for \f[B]scale\f[] can be queried in dc(1)
201 programs with the \f[B]V\f[] command.
202 .SS Comments
203 .PP
204 Comments go from \f[B]#\f[] until, and not including, the next newline.
205 This is a \f[B]non\-portable extension\f[].
206 .SH NUMBERS
207 .PP
208 Numbers are strings made up of digits, uppercase letters up to
209 \f[B]F\f[], and at most \f[B]1\f[] period for a radix.
210 Numbers can have up to \f[B]DC_NUM_MAX\f[] digits.
211 Uppercase letters are equal to \f[B]9\f[] + their position in the
212 alphabet (i.e., \f[B]A\f[] equals \f[B]10\f[], or \f[B]9+1\f[]).
213 If a digit or letter makes no sense with the current value of
214 \f[B]ibase\f[], they are set to the value of the highest valid digit in
215 \f[B]ibase\f[].
216 .PP
217 Single\-character numbers (i.e., \f[B]A\f[] alone) take the value that
218 they would have if they were valid digits, regardless of the value of
219 \f[B]ibase\f[].
220 This means that \f[B]A\f[] alone always equals decimal \f[B]10\f[] and
221 \f[B]F\f[] alone always equals decimal \f[B]15\f[].
222 .SH COMMANDS
223 .PP
224 The valid commands are listed below.
225 .SS Printing
226 .PP
227 These commands are used for printing.
228 .TP
229 .B \f[B]p\f[]
230 Prints the value on top of the stack, whether number or string, and
231 prints a newline after.
232 .RS
233 .PP
234 This does not alter the stack.
235 .RE
236 .TP
237 .B \f[B]n\f[]
238 Prints the value on top of the stack, whether number or string, and pops
239 it off of the stack.
240 .RS
241 .RE
242 .TP
243 .B \f[B]P\f[]
244 Pops a value off the stack.
245 .RS
246 .PP
247 If the value is a number, it is truncated and the absolute value of the
248 result is printed as though \f[B]obase\f[] is \f[B]UCHAR_MAX+1\f[] and
249 each digit is interpreted as an ASCII character, making it a byte
250 stream.
251 .PP
252 If the value is a string, it is printed without a trailing newline.
253 .PP
254 This is a \f[B]non\-portable extension\f[].
255 .RE
256 .TP
257 .B \f[B]f\f[]
258 Prints the entire contents of the stack, in order from newest to oldest,
259 without altering anything.
260 .RS
261 .PP
262 Users should use this command when they get lost.
263 .RE
264 .SS Arithmetic
265 .PP
266 These are the commands used for arithmetic.
267 .TP
268 .B \f[B]+\f[]
269 The top two values are popped off the stack, added, and the result is
270 pushed onto the stack.
271 The \f[I]scale\f[] of the result is equal to the max \f[I]scale\f[] of
272 both operands.
273 .RS
274 .RE
275 .TP
276 .B \f[B]\-\f[]
277 The top two values are popped off the stack, subtracted, and the result
278 is pushed onto the stack.
279 The \f[I]scale\f[] of the result is equal to the max \f[I]scale\f[] of
280 both operands.
281 .RS
282 .RE
283 .TP
284 .B \f[B]*\f[]
285 The top two values are popped off the stack, multiplied, and the result
286 is pushed onto the stack.
287 If \f[B]a\f[] is the \f[I]scale\f[] of the first expression and
288 \f[B]b\f[] is the \f[I]scale\f[] of the second expression, the
289 \f[I]scale\f[] of the result is equal to
290 \f[B]min(a+b,max(scale,a,b))\f[] where \f[B]min()\f[] and \f[B]max()\f[]
291 return the obvious values.
292 .RS
293 .RE
294 .TP
295 .B \f[B]/\f[]
296 The top two values are popped off the stack, divided, and the result is
297 pushed onto the stack.
298 The \f[I]scale\f[] of the result is equal to \f[B]scale\f[].
299 .RS
300 .PP
301 The first value popped off of the stack must be non\-zero.
302 .RE
303 .TP
304 .B \f[B]%\f[]
305 The top two values are popped off the stack, remaindered, and the result
306 is pushed onto the stack.
307 .RS
308 .PP
309 Remaindering is equivalent to 1) Computing \f[B]a/b\f[] to current
310 \f[B]scale\f[], and 2) Using the result of step 1 to calculate
311 \f[B]a\-(a/b)*b\f[] to \f[I]scale\f[]
312 \f[B]max(scale+scale(b),scale(a))\f[].
313 .PP
314 The first value popped off of the stack must be non\-zero.
315 .RE
316 .TP
317 .B \f[B]~\f[]
318 The top two values are popped off the stack, divided and remaindered,
319 and the results (divided first, remainder second) are pushed onto the
320 stack.
321 This is equivalent to \f[B]x y / x y %\f[] except that \f[B]x\f[] and
322 \f[B]y\f[] are only evaluated once.
323 .RS
324 .PP
325 The first value popped off of the stack must be non\-zero.
326 .PP
327 This is a \f[B]non\-portable extension\f[].
328 .RE
329 .TP
330 .B \f[B]^\f[]
331 The top two values are popped off the stack, the second is raised to the
332 power of the first, and the result is pushed onto the stack.
333 .RS
334 .PP
335 The first value popped off of the stack must be an integer, and if that
336 value is negative, the second value popped off of the stack must be
337 non\-zero.
338 .RE
339 .TP
340 .B \f[B]v\f[]
341 The top value is popped off the stack, its square root is computed, and
342 the result is pushed onto the stack.
343 The \f[I]scale\f[] of the result is equal to \f[B]scale\f[].
344 .RS
345 .PP
346 The value popped off of the stack must be non\-negative.
347 .RE
348 .TP
349 .B \f[B]_\f[]
350 If this command \f[I]immediately\f[] precedes a number (i.e., no spaces
351 or other commands), then that number is input as a negative number.
352 .RS
353 .PP
354 Otherwise, the top value on the stack is popped and copied, and the copy
355 is negated and pushed onto the stack.
356 This behavior without a number is a \f[B]non\-portable extension\f[].
357 .RE
358 .TP
359 .B \f[B]b\f[]
360 The top value is popped off the stack, and if it is zero, it is pushed
361 back onto the stack.
362 Otherwise, its absolute value is pushed onto the stack.
363 .RS
364 .PP
365 This is a \f[B]non\-portable extension\f[].
366 .RE
367 .TP
368 .B \f[B]|\f[]
369 The top three values are popped off the stack, a modular exponentiation
370 is computed, and the result is pushed onto the stack.
371 .RS
372 .PP
373 The first value popped is used as the reduction modulus and must be an
374 integer and non\-zero.
375 The second value popped is used as the exponent and must be an integer
376 and non\-negative.
377 The third value popped is the base and must be an integer.
378 .PP
379 This is a \f[B]non\-portable extension\f[].
380 .RE
381 .TP
382 .B \f[B]G\f[]
383 The top two values are popped off of the stack, they are compared, and a
384 \f[B]1\f[] is pushed if they are equal, or \f[B]0\f[] otherwise.
385 .RS
386 .PP
387 This is a \f[B]non\-portable extension\f[].
388 .RE
389 .TP
390 .B \f[B]N\f[]
391 The top value is popped off of the stack, and if it a \f[B]0\f[], a
392 \f[B]1\f[] is pushed; otherwise, a \f[B]0\f[] is pushed.
393 .RS
394 .PP
395 This is a \f[B]non\-portable extension\f[].
396 .RE
397 .TP
398 .B \f[B](\f[]
399 The top two values are popped off of the stack, they are compared, and a
400 \f[B]1\f[] is pushed if the first is less than the second, or \f[B]0\f[]
401 otherwise.
402 .RS
403 .PP
404 This is a \f[B]non\-portable extension\f[].
405 .RE
406 .TP
407 .B \f[B]{\f[]
408 The top two values are popped off of the stack, they are compared, and a
409 \f[B]1\f[] is pushed if the first is less than or equal to the second,
410 or \f[B]0\f[] otherwise.
411 .RS
412 .PP
413 This is a \f[B]non\-portable extension\f[].
414 .RE
415 .TP
416 .B \f[B])\f[]
417 The top two values are popped off of the stack, they are compared, and a
418 \f[B]1\f[] is pushed if the first is greater than the second, or
419 \f[B]0\f[] otherwise.
420 .RS
421 .PP
422 This is a \f[B]non\-portable extension\f[].
423 .RE
424 .TP
425 .B \f[B]}\f[]
426 The top two values are popped off of the stack, they are compared, and a
427 \f[B]1\f[] is pushed if the first is greater than or equal to the
428 second, or \f[B]0\f[] otherwise.
429 .RS
430 .PP
431 This is a \f[B]non\-portable extension\f[].
432 .RE
433 .TP
434 .B \f[B]M\f[]
435 The top two values are popped off of the stack.
436 If they are both non\-zero, a \f[B]1\f[] is pushed onto the stack.
437 If either of them is zero, or both of them are, then a \f[B]0\f[] is
438 pushed onto the stack.
439 .RS
440 .PP
441 This is like the \f[B]&&\f[] operator in bc(1), and it is \f[I]not\f[] a
442 short\-circuit operator.
443 .PP
444 This is a \f[B]non\-portable extension\f[].
445 .RE
446 .TP
447 .B \f[B]m\f[]
448 The top two values are popped off of the stack.
449 If at least one of them is non\-zero, a \f[B]1\f[] is pushed onto the
450 stack.
451 If both of them are zero, then a \f[B]0\f[] is pushed onto the stack.
452 .RS
453 .PP
454 This is like the \f[B]||\f[] operator in bc(1), and it is \f[I]not\f[] a
455 short\-circuit operator.
456 .PP
457 This is a \f[B]non\-portable extension\f[].
458 .RE
459 .SS Stack Control
460 .PP
461 These commands control the stack.
462 .TP
463 .B \f[B]c\f[]
464 Removes all items from ("clears") the stack.
465 .RS
466 .RE
467 .TP
468 .B \f[B]d\f[]
469 Copies the item on top of the stack ("duplicates") and pushes the copy
470 onto the stack.
471 .RS
472 .RE
473 .TP
474 .B \f[B]r\f[]
475 Swaps ("reverses") the two top items on the stack.
476 .RS
477 .RE
478 .TP
479 .B \f[B]R\f[]
480 Pops ("removes") the top value from the stack.
481 .RS
482 .RE
483 .SS Register Control
484 .PP
485 These commands control registers (see the \f[B]REGISTERS\f[] section).
486 .TP
487 .B \f[B]s\f[]\f[I]r\f[]
488 Pops the value off the top of the stack and stores it into register
489 \f[I]r\f[].
490 .RS
491 .RE
492 .TP
493 .B \f[B]l\f[]\f[I]r\f[]
494 Copies the value in register \f[I]r\f[] and pushes it onto the stack.
495 This does not alter the contents of \f[I]r\f[].
496 .RS
497 .RE
498 .TP
499 .B \f[B]S\f[]\f[I]r\f[]
500 Pops the value off the top of the (main) stack and pushes it onto the
501 stack of register \f[I]r\f[].
502 The previous value of the register becomes inaccessible.
503 .RS
504 .RE
505 .TP
506 .B \f[B]L\f[]\f[I]r\f[]
507 Pops the value off the top of the stack for register \f[I]r\f[] and push
508 it onto the main stack.
509 The previous value in the stack for register \f[I]r\f[], if any, is now
510 accessible via the \f[B]l\f[]\f[I]r\f[] command.
511 .RS
512 .RE
513 .SS Parameters
514 .PP
515 These commands control the values of \f[B]ibase\f[], \f[B]obase\f[], and
516 \f[B]scale\f[].
517 Also see the \f[B]SYNTAX\f[] section.
518 .TP
519 .B \f[B]i\f[]
520 Pops the value off of the top of the stack and uses it to set
521 \f[B]ibase\f[], which must be between \f[B]2\f[] and \f[B]16\f[],
522 inclusive.
523 .RS
524 .PP
525 If the value on top of the stack has any \f[I]scale\f[], the
526 \f[I]scale\f[] is ignored.
527 .RE
528 .TP
529 .B \f[B]o\f[]
530 Pops the value off of the top of the stack and uses it to set
531 \f[B]obase\f[], which must be between \f[B]2\f[] and
532 \f[B]DC_BASE_MAX\f[], inclusive (see the \f[B]LIMITS\f[] section).
533 .RS
534 .PP
535 If the value on top of the stack has any \f[I]scale\f[], the
536 \f[I]scale\f[] is ignored.
537 .RE
538 .TP
539 .B \f[B]k\f[]
540 Pops the value off of the top of the stack and uses it to set
541 \f[B]scale\f[], which must be non\-negative.
542 .RS
543 .PP
544 If the value on top of the stack has any \f[I]scale\f[], the
545 \f[I]scale\f[] is ignored.
546 .RE
547 .TP
548 .B \f[B]I\f[]
549 Pushes the current value of \f[B]ibase\f[] onto the main stack.
550 .RS
551 .RE
552 .TP
553 .B \f[B]O\f[]
554 Pushes the current value of \f[B]obase\f[] onto the main stack.
555 .RS
556 .RE
557 .TP
558 .B \f[B]K\f[]
559 Pushes the current value of \f[B]scale\f[] onto the main stack.
560 .RS
561 .RE
562 .TP
563 .B \f[B]T\f[]
564 Pushes the maximum allowable value of \f[B]ibase\f[] onto the main
565 stack.
566 .RS
567 .PP
568 This is a \f[B]non\-portable extension\f[].
569 .RE
570 .TP
571 .B \f[B]U\f[]
572 Pushes the maximum allowable value of \f[B]obase\f[] onto the main
573 stack.
574 .RS
575 .PP
576 This is a \f[B]non\-portable extension\f[].
577 .RE
578 .TP
579 .B \f[B]V\f[]
580 Pushes the maximum allowable value of \f[B]scale\f[] onto the main
581 stack.
582 .RS
583 .PP
584 This is a \f[B]non\-portable extension\f[].
585 .RE
586 .SS Strings
587 .PP
588 The following commands control strings.
589 .PP
590 dc(1) can work with both numbers and strings, and registers (see the
591 \f[B]REGISTERS\f[] section) can hold both strings and numbers.
592 dc(1) always knows whether the contents of a register are a string or a
593 number.
594 .PP
595 While arithmetic operations have to have numbers, and will print an
596 error if given a string, other commands accept strings.
597 .PP
598 Strings can also be executed as macros.
599 For example, if the string \f[B][1pR]\f[] is executed as a macro, then
600 the code \f[B]1pR\f[] is executed, meaning that the \f[B]1\f[] will be
601 printed with a newline after and then popped from the stack.
602 .TP
603 .B \f[B][\f[]\f[I]characters\f[]\f[B]]\f[]
604 Makes a string containing \f[I]characters\f[] and pushes it onto the
605 stack.
606 .RS
607 .PP
608 If there are brackets (\f[B][\f[] and \f[B]]\f[]) in the string, then
609 they must be balanced.
610 Unbalanced brackets can be escaped using a backslash (\f[B]\\\f[])
611 character.
612 .PP
613 If there is a backslash character in the string, the character after it
614 (even another backslash) is put into the string verbatim, but the
615 (first) backslash is not.
616 .RE
617 .TP
618 .B \f[B]a\f[]
619 The value on top of the stack is popped.
620 .RS
621 .PP
622 If it is a number, it is truncated and its absolute value is taken.
623 The result mod \f[B]UCHAR_MAX+1\f[] is calculated.
624 If that result is \f[B]0\f[], push an empty string; otherwise, push a
625 one\-character string where the character is the result of the mod
626 interpreted as an ASCII character.
627 .PP
628 If it is a string, then a new string is made.
629 If the original string is empty, the new string is empty.
630 If it is not, then the first character of the original string is used to
631 create the new string as a one\-character string.
632 The new string is then pushed onto the stack.
633 .PP
634 This is a \f[B]non\-portable extension\f[].
635 .RE
636 .TP
637 .B \f[B]x\f[]
638 Pops a value off of the top of the stack.
639 .RS
640 .PP
641 If it is a number, it is pushed back onto the stack.
642 .PP
643 If it is a string, it is executed as a macro.
644 .PP
645 This behavior is the norm whenever a macro is executed, whether by this
646 command or by the conditional execution commands below.
647 .RE
648 .TP
649 .B \f[B]>\f[]\f[I]r\f[]
650 Pops two values off of the stack that must be numbers and compares them.
651 If the first value is greater than the second, then the contents of
652 register \f[I]r\f[] are executed.
653 .RS
654 .PP
655 For example, \f[B]0 1>a\f[] will execute the contents of register
656 \f[B]a\f[], and \f[B]1 0>a\f[] will not.
657 .PP
658 If either or both of the values are not numbers, dc(1) will raise an
659 error and reset (see the \f[B]RESET\f[] section).
660 .RE
661 .TP
662 .B \f[B]>\f[]\f[I]r\f[]\f[B]e\f[]\f[I]s\f[]
663 Like the above, but will execute register \f[I]s\f[] if the comparison
664 fails.
665 .RS
666 .PP
667 If either or both of the values are not numbers, dc(1) will raise an
668 error and reset (see the \f[B]RESET\f[] section).
669 .PP
670 This is a \f[B]non\-portable extension\f[].
671 .RE
672 .TP
673 .B \f[B]!>\f[]\f[I]r\f[]
674 Pops two values off of the stack that must be numbers and compares them.
675 If the first value is not greater than the second (less than or equal
676 to), then the contents of register \f[I]r\f[] are executed.
677 .RS
678 .PP
679 If either or both of the values are not numbers, dc(1) will raise an
680 error and reset (see the \f[B]RESET\f[] section).
681 .RE
682 .TP
683 .B \f[B]!>\f[]\f[I]r\f[]\f[B]e\f[]\f[I]s\f[]
684 Like the above, but will execute register \f[I]s\f[] if the comparison
685 fails.
686 .RS
687 .PP
688 If either or both of the values are not numbers, dc(1) will raise an
689 error and reset (see the \f[B]RESET\f[] section).
690 .PP
691 This is a \f[B]non\-portable extension\f[].
692 .RE
693 .TP
694 .B \f[B]<\f[]\f[I]r\f[]
695 Pops two values off of the stack that must be numbers and compares them.
696 If the first value is less than the second, then the contents of
697 register \f[I]r\f[] are executed.
698 .RS
699 .PP
700 If either or both of the values are not numbers, dc(1) will raise an
701 error and reset (see the \f[B]RESET\f[] section).
702 .RE
703 .TP
704 .B \f[B]<\f[]\f[I]r\f[]\f[B]e\f[]\f[I]s\f[]
705 Like the above, but will execute register \f[I]s\f[] if the comparison
706 fails.
707 .RS
708 .PP
709 If either or both of the values are not numbers, dc(1) will raise an
710 error and reset (see the \f[B]RESET\f[] section).
711 .PP
712 This is a \f[B]non\-portable extension\f[].
713 .RE
714 .TP
715 .B \f[B]!<\f[]\f[I]r\f[]
716 Pops two values off of the stack that must be numbers and compares them.
717 If the first value is not less than the second (greater than or equal
718 to), then the contents of register \f[I]r\f[] are executed.
719 .RS
720 .PP
721 If either or both of the values are not numbers, dc(1) will raise an
722 error and reset (see the \f[B]RESET\f[] section).
723 .RE
724 .TP
725 .B \f[B]!<\f[]\f[I]r\f[]\f[B]e\f[]\f[I]s\f[]
726 Like the above, but will execute register \f[I]s\f[] if the comparison
727 fails.
728 .RS
729 .PP
730 If either or both of the values are not numbers, dc(1) will raise an
731 error and reset (see the \f[B]RESET\f[] section).
732 .PP
733 This is a \f[B]non\-portable extension\f[].
734 .RE
735 .TP
736 .B \f[B]=\f[]\f[I]r\f[]
737 Pops two values off of the stack that must be numbers and compares them.
738 If the first value is equal to the second, then the contents of register
739 \f[I]r\f[] are executed.
740 .RS
741 .PP
742 If either or both of the values are not numbers, dc(1) will raise an
743 error and reset (see the \f[B]RESET\f[] section).
744 .RE
745 .TP
746 .B \f[B]=\f[]\f[I]r\f[]\f[B]e\f[]\f[I]s\f[]
747 Like the above, but will execute register \f[I]s\f[] if the comparison
748 fails.
749 .RS
750 .PP
751 If either or both of the values are not numbers, dc(1) will raise an
752 error and reset (see the \f[B]RESET\f[] section).
753 .PP
754 This is a \f[B]non\-portable extension\f[].
755 .RE
756 .TP
757 .B \f[B]!=\f[]\f[I]r\f[]
758 Pops two values off of the stack that must be numbers and compares them.
759 If the first value is not equal to the second, then the contents of
760 register \f[I]r\f[] are executed.
761 .RS
762 .PP
763 If either or both of the values are not numbers, dc(1) will raise an
764 error and reset (see the \f[B]RESET\f[] section).
765 .RE
766 .TP
767 .B \f[B]!=\f[]\f[I]r\f[]\f[B]e\f[]\f[I]s\f[]
768 Like the above, but will execute register \f[I]s\f[] if the comparison
769 fails.
770 .RS
771 .PP
772 If either or both of the values are not numbers, dc(1) will raise an
773 error and reset (see the \f[B]RESET\f[] section).
774 .PP
775 This is a \f[B]non\-portable extension\f[].
776 .RE
777 .TP
778 .B \f[B]?\f[]
779 Reads a line from the \f[B]stdin\f[] and executes it.
780 This is to allow macros to request input from users.
781 .RS
782 .RE
783 .TP
784 .B \f[B]q\f[]
785 During execution of a macro, this exits the execution of that macro and
786 the execution of the macro that executed it.
787 If there are no macros, or only one macro executing, dc(1) exits.
788 .RS
789 .RE
790 .TP
791 .B \f[B]Q\f[]
792 Pops a value from the stack which must be non\-negative and is used the
793 number of macro executions to pop off of the execution stack.
794 If the number of levels to pop is greater than the number of executing
795 macros, dc(1) exits.
796 .RS
797 .RE
798 .SS Status
799 .PP
800 These commands query status of the stack or its top value.
801 .TP
802 .B \f[B]Z\f[]
803 Pops a value off of the stack.
804 .RS
805 .PP
806 If it is a number, calculates the number of significant decimal digits
807 it has and pushes the result.
808 .PP
809 If it is a string, pushes the number of characters the string has.
810 .RE
811 .TP
812 .B \f[B]X\f[]
813 Pops a value off of the stack.
814 .RS
815 .PP
816 If it is a number, pushes the \f[I]scale\f[] of the value onto the
817 stack.
818 .PP
819 If it is a string, pushes \f[B]0\f[].
820 .RE
821 .TP
822 .B \f[B]z\f[]
823 Pushes the current stack depth (before execution of this command).
824 .RS
825 .RE
826 .SS Arrays
827 .PP
828 These commands manipulate arrays.
829 .TP
830 .B \f[B]:\f[]\f[I]r\f[]
831 Pops the top two values off of the stack.
832 The second value will be stored in the array \f[I]r\f[] (see the
833 \f[B]REGISTERS\f[] section), indexed by the first value.
834 .RS
835 .RE
836 .TP
837 .B \f[B];\f[]\f[I]r\f[]
838 Pops the value on top of the stack and uses it as an index into the
839 array \f[I]r\f[].
840 The selected value is then pushed onto the stack.
841 .RS
842 .RE
843 .SH REGISTERS
844 .PP
845 Registers are names that can store strings, numbers, and arrays.
846 (Number/string registers do not interfere with array registers.)
847 .PP
848 Each register is also its own stack, so the current register value is
849 the top of the stack for the register.
850 All registers, when first referenced, have one value (\f[B]0\f[]) in
851 their stack.
852 .PP
853 In non\-extended register mode, a register name is just the single
854 character that follows any command that needs a register name.
855 The only exception is a newline (\f[B]\[aq]\\n\[aq]\f[]); it is a parse
856 error for a newline to be used as a register name.
857 .SS Extended Register Mode
858 .PP
859 Unlike most other dc(1) implentations, this dc(1) provides nearly
860 unlimited amounts of registers, if extended register mode is enabled.
861 .PP
862 If extended register mode is enabled (\f[B]\-x\f[] or
863 \f[B]\-\-extended\-register\f[] command\-line arguments are given), then
864 normal single character registers are used \f[I]unless\f[] the character
865 immediately following a command that needs a register name is a space
866 (according to \f[B]isspace()\f[]) and not a newline
867 (\f[B]\[aq]\\n\[aq]\f[]).
868 .PP
869 In that case, the register name is found according to the regex
870 \f[B][a\-z][a\-z0\-9_]*\f[] (like bc(1) identifiers), and it is a parse
871 error if the next non\-space characters do not match that regex.
872 .SH RESET
873 .PP
874 When dc(1) encounters an error or a signal that it has a non\-default
875 handler for, it resets.
876 This means that several things happen.
877 .PP
878 First, any macros that are executing are stopped and popped off the
879 stack.
880 The behavior is not unlike that of exceptions in programming languages.
881 Then the execution point is set so that any code waiting to execute
882 (after all macros returned) is skipped.
883 .PP
884 Thus, when dc(1) resets, it skips any remaining code waiting to be
885 executed.
886 Then, if it is interactive mode, and the error was not a fatal error
887 (see the \f[B]EXIT STATUS\f[] section), it asks for more input;
888 otherwise, it exits with the appropriate return code.
889 .SH PERFORMANCE
890 .PP
891 Most dc(1) implementations use \f[B]char\f[] types to calculate the
892 value of \f[B]1\f[] decimal digit at a time, but that can be slow.
893 This dc(1) does something different.
894 .PP
895 It uses large integers to calculate more than \f[B]1\f[] decimal digit
896 at a time.
897 If built in a environment where \f[B]DC_LONG_BIT\f[] (see the
898 \f[B]LIMITS\f[] section) is \f[B]64\f[], then each integer has
899 \f[B]9\f[] decimal digits.
900 If built in an environment where \f[B]DC_LONG_BIT\f[] is \f[B]32\f[]
901 then each integer has \f[B]4\f[] decimal digits.
902 This value (the number of decimal digits per large integer) is called
903 \f[B]DC_BASE_DIGS\f[].
904 .PP
905 In addition, this dc(1) uses an even larger integer for overflow
906 checking.
907 This integer type depends on the value of \f[B]DC_LONG_BIT\f[], but is
908 always at least twice as large as the integer type used to store digits.
909 .SH LIMITS
910 .PP
911 The following are the limits on dc(1):
912 .TP
913 .B \f[B]DC_LONG_BIT\f[]
914 The number of bits in the \f[B]long\f[] type in the environment where
915 dc(1) was built.
916 This determines how many decimal digits can be stored in a single large
917 integer (see the \f[B]PERFORMANCE\f[] section).
918 .RS
919 .RE
920 .TP
921 .B \f[B]DC_BASE_DIGS\f[]
922 The number of decimal digits per large integer (see the
923 \f[B]PERFORMANCE\f[] section).
924 Depends on \f[B]DC_LONG_BIT\f[].
925 .RS
926 .RE
927 .TP
928 .B \f[B]DC_BASE_POW\f[]
929 The max decimal number that each large integer can store (see
930 \f[B]DC_BASE_DIGS\f[]) plus \f[B]1\f[].
931 Depends on \f[B]DC_BASE_DIGS\f[].
932 .RS
933 .RE
934 .TP
935 .B \f[B]DC_OVERFLOW_MAX\f[]
936 The max number that the overflow type (see the \f[B]PERFORMANCE\f[]
937 section) can hold.
938 Depends on \f[B]DC_LONG_BIT\f[].
939 .RS
940 .RE
941 .TP
942 .B \f[B]DC_BASE_MAX\f[]
943 The maximum output base.
944 Set at \f[B]DC_BASE_POW\f[].
945 .RS
946 .RE
947 .TP
948 .B \f[B]DC_DIM_MAX\f[]
949 The maximum size of arrays.
950 Set at \f[B]SIZE_MAX\-1\f[].
951 .RS
952 .RE
953 .TP
954 .B \f[B]DC_SCALE_MAX\f[]
955 The maximum \f[B]scale\f[].
956 Set at \f[B]DC_OVERFLOW_MAX\-1\f[].
957 .RS
958 .RE
959 .TP
960 .B \f[B]DC_STRING_MAX\f[]
961 The maximum length of strings.
962 Set at \f[B]DC_OVERFLOW_MAX\-1\f[].
963 .RS
964 .RE
965 .TP
966 .B \f[B]DC_NAME_MAX\f[]
967 The maximum length of identifiers.
968 Set at \f[B]DC_OVERFLOW_MAX\-1\f[].
969 .RS
970 .RE
971 .TP
972 .B \f[B]DC_NUM_MAX\f[]
973 The maximum length of a number (in decimal digits), which includes
974 digits after the decimal point.
975 Set at \f[B]DC_OVERFLOW_MAX\-1\f[].
976 .RS
977 .RE
978 .TP
979 .B Exponent
980 The maximum allowable exponent (positive or negative).
981 Set at \f[B]DC_OVERFLOW_MAX\f[].
982 .RS
983 .RE
984 .TP
985 .B Number of vars
986 The maximum number of vars/arrays.
987 Set at \f[B]SIZE_MAX\-1\f[].
988 .RS
989 .RE
990 .PP
991 These limits are meant to be effectively non\-existent; the limits are
992 so large (at least on 64\-bit machines) that there should not be any
993 point at which they become a problem.
994 In fact, memory should be exhausted before these limits should be hit.
995 .SH ENVIRONMENT VARIABLES
996 .PP
997 dc(1) recognizes the following environment variables:
998 .TP
999 .B \f[B]DC_ENV_ARGS\f[]
1000 This is another way to give command\-line arguments to dc(1).
1001 They should be in the same format as all other command\-line arguments.
1002 These are always processed first, so any files given in
1003 \f[B]DC_ENV_ARGS\f[] will be processed before arguments and files given
1004 on the command\-line.
1005 This gives the user the ability to set up "standard" options and files
1006 to be used at every invocation.
1007 The most useful thing for such files to contain would be useful
1008 functions that the user might want every time dc(1) runs.
1009 Another use would be to use the \f[B]\-e\f[] option to set
1010 \f[B]scale\f[] to a value other than \f[B]0\f[].
1011 .RS
1012 .PP
1013 The code that parses \f[B]DC_ENV_ARGS\f[] will correctly handle quoted
1014 arguments, but it does not understand escape sequences.
1015 For example, the string \f[B]"/home/gavin/some dc file.dc"\f[] will be
1016 correctly parsed, but the string \f[B]"/home/gavin/some "dc"
1017 file.dc"\f[] will include the backslashes.
1018 .PP
1019 The quote parsing will handle either kind of quotes, \f[B]\[aq]\f[] or
1020 \f[B]"\f[].
1021 Thus, if you have a file with any number of single quotes in the name,
1022 you can use double quotes as the outside quotes, as in \f[B]"some
1023 \[aq]bc\[aq] file.bc"\f[], and vice versa if you have a file with double
1024 quotes.
1025 However, handling a file with both kinds of quotes in
1026 \f[B]DC_ENV_ARGS\f[] is not supported due to the complexity of the
1027 parsing, though such files are still supported on the command\-line
1028 where the parsing is done by the shell.
1029 .RE
1030 .TP
1031 .B \f[B]DC_LINE_LENGTH\f[]
1032 If this environment variable exists and contains an integer that is
1033 greater than \f[B]1\f[] and is less than \f[B]UINT16_MAX\f[]
1034 (\f[B]2^16\-1\f[]), dc(1) will output lines to that length, including
1035 the backslash newline combo.
1036 The default line length is \f[B]70\f[].
1037 .RS
1038 .RE
1039 .TP
1040 .B \f[B]DC_EXPR_EXIT\f[]
1041 If this variable exists (no matter the contents), dc(1) will exit
1042 immediately after executing expressions and files given by the
1043 \f[B]\-e\f[] and/or \f[B]\-f\f[] command\-line options (and any
1044 equivalents).
1045 .RS
1046 .RE
1047 .SH EXIT STATUS
1048 .PP
1049 dc(1) returns the following exit statuses:
1050 .TP
1051 .B \f[B]0\f[]
1052 No error.
1053 .RS
1054 .RE
1055 .TP
1056 .B \f[B]1\f[]
1057 A math error occurred.
1058 This follows standard practice of using \f[B]1\f[] for expected errors,
1059 since math errors will happen in the process of normal execution.
1060 .RS
1061 .PP
1062 Math errors include divide by \f[B]0\f[], taking the square root of a
1063 negative number, attempting to convert a negative number to a hardware
1064 integer, overflow when converting a number to a hardware integer, and
1065 attempting to use a non\-integer where an integer is required.
1066 .PP
1067 Converting to a hardware integer happens for the second operand of the
1068 power (\f[B]^\f[]) operator.
1069 .RE
1070 .TP
1071 .B \f[B]2\f[]
1072 A parse error occurred.
1073 .RS
1074 .PP
1075 Parse errors include unexpected \f[B]EOF\f[], using an invalid
1076 character, failing to find the end of a string or comment, and using a
1077 token where it is invalid.
1078 .RE
1079 .TP
1080 .B \f[B]3\f[]
1081 A runtime error occurred.
1082 .RS
1083 .PP
1084 Runtime errors include assigning an invalid number to \f[B]ibase\f[],
1085 \f[B]obase\f[], or \f[B]scale\f[]; give a bad expression to a
1086 \f[B]read()\f[] call, calling \f[B]read()\f[] inside of a
1087 \f[B]read()\f[] call, type errors, and attempting an operation when the
1088 stack has too few elements.
1089 .RE
1090 .TP
1091 .B \f[B]4\f[]
1092 A fatal error occurred.
1093 .RS
1094 .PP
1095 Fatal errors include memory allocation errors, I/O errors, failing to
1096 open files, attempting to use files that do not have only ASCII
1097 characters (dc(1) only accepts ASCII characters), attempting to open a
1098 directory as a file, and giving invalid command\-line options.
1099 .RE
1100 .PP
1101 The exit status \f[B]4\f[] is special; when a fatal error occurs, dc(1)
1102 always exits and returns \f[B]4\f[], no matter what mode dc(1) is in.
1103 .PP
1104 The other statuses will only be returned when dc(1) is not in
1105 interactive mode (see the \f[B]INTERACTIVE MODE\f[] section), since
1106 dc(1) resets its state (see the \f[B]RESET\f[] section) and accepts more
1107 input when one of those errors occurs in interactive mode.
1108 This is also the case when interactive mode is forced by the
1109 \f[B]\-i\f[] flag or \f[B]\-\-interactive\f[] option.
1110 .PP
1111 These exit statuses allow dc(1) to be used in shell scripting with error
1112 checking, and its normal behavior can be forced by using the
1113 \f[B]\-i\f[] flag or \f[B]\-\-interactive\f[] option.
1114 .SH INTERACTIVE MODE
1115 .PP
1116 Like bc(1), dc(1) has an interactive mode and a non\-interactive mode.
1117 Interactive mode is turned on automatically when both \f[B]stdin\f[] and
1118 \f[B]stdout\f[] are hooked to a terminal, but the \f[B]\-i\f[] flag and
1119 \f[B]\-\-interactive\f[] option can turn it on in other cases.
1120 .PP
1121 In interactive mode, dc(1) attempts to recover from errors (see the
1122 \f[B]RESET\f[] section), and in normal execution, flushes
1123 \f[B]stdout\f[] as soon as execution is done for the current input.
1124 .SH TTY MODE
1125 .PP
1126 If \f[B]stdin\f[], \f[B]stdout\f[], and \f[B]stderr\f[] are all
1127 connected to a TTY, dc(1) turns on "TTY mode."
1128 .PP
1129 TTY mode is required for history to be enabled (see the \f[B]COMMAND
1130 LINE HISTORY\f[] section).
1131 It is also required to enable special handling for \f[B]SIGINT\f[]
1132 signals.
1133 .PP
1134 TTY mode is different from interactive mode because interactive mode is
1135 required in the bc(1)
1136 specification (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html),
1137 and interactive mode requires only \f[B]stdin\f[] and \f[B]stdout\f[] to
1138 be connected to a terminal.
1139 .SH SIGNAL HANDLING
1140 .PP
1141 Sending a \f[B]SIGINT\f[] will cause dc(1) to stop execution of the
1142 current input.
1143 If dc(1) is in TTY mode (see the \f[B]TTY MODE\f[] section), it will
1144 reset (see the \f[B]RESET\f[] section).
1145 Otherwise, it will clean up and exit.
1146 .PP
1147 Note that "current input" can mean one of two things.
1148 If dc(1) is processing input from \f[B]stdin\f[] in TTY mode, it will
1149 ask for more input.
1150 If dc(1) is processing input from a file in TTY mode, it will stop
1151 processing the file and start processing the next file, if one exists,
1152 or ask for input from \f[B]stdin\f[] if no other file exists.
1153 .PP
1154 This means that if a \f[B]SIGINT\f[] is sent to dc(1) as it is executing
1155 a file, it can seem as though dc(1) did not respond to the signal since
1156 it will immediately start executing the next file.
1157 This is by design; most files that users execute when interacting with
1158 dc(1) have function definitions, which are quick to parse.
1159 If a file takes a long time to execute, there may be a bug in that file.
1160 The rest of the files could still be executed without problem, allowing
1161 the user to continue.
1162 .PP
1163 \f[B]SIGTERM\f[] and \f[B]SIGQUIT\f[] cause dc(1) to clean up and exit,
1164 and it uses the default handler for all other signals.
1165 The one exception is \f[B]SIGHUP\f[]; in that case, when dc(1) is in TTY
1166 mode, a \f[B]SIGHUP\f[] will cause dc(1) to clean up and exit.
1167 .SH COMMAND LINE HISTORY
1168 .PP
1169 dc(1) supports interactive command\-line editing.
1170 If dc(1) is in TTY mode (see the \f[B]TTY MODE\f[] section), history is
1171 enabled.
1172 Previous lines can be recalled and edited with the arrow keys.
1173 .PP
1174 \f[B]Note\f[]: tabs are converted to 8 spaces.
1175 .SH SEE ALSO
1176 .PP
1177 bc(1)
1178 .SH STANDARDS
1179 .PP
1180 The dc(1) utility operators are compliant with the operators in the
1181 bc(1) IEEE Std 1003.1\-2017
1182 (“POSIX.1\-2017”) (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html)
1183 specification.
1184 .SH BUGS
1185 .PP
1186 None are known.
1187 Report bugs at https://git.yzena.com/gavin/bc.
1188 .SH AUTHOR
1189 .PP
1190 Gavin D.
1191 Howard <yzena.tech@gmail.com> and contributors.