From 3950ffe2a485479f6561c27364d3d7df5a21d124 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Sun, 24 Jun 2012 22:28:35 +0000 Subject: Imported Upstream version 93u+ --- src/lib/libast/man/chr.3 | 126 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 src/lib/libast/man/chr.3 (limited to 'src/lib/libast/man/chr.3') diff --git a/src/lib/libast/man/chr.3 b/src/lib/libast/man/chr.3 new file mode 100644 index 0000000..8d57648 --- /dev/null +++ b/src/lib/libast/man/chr.3 @@ -0,0 +1,126 @@ +.fp 5 CW +.de Af +.ds ;G \\*(;G\\f\\$1\\$3\\f\\$2 +.if !\\$4 .Af \\$2 \\$1 "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9" +.. +.de aF +.ie \\$3 .ft \\$1 +.el \{\ +.ds ;G \& +.nr ;G \\n(.f +.Af "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9" +\\*(;G +.ft \\n(;G \} +.. +.de L +.aF 5 \\n(.f "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" +.. +.de LR +.aF 5 1 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" +.. +.de RL +.aF 1 5 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" +.. +.de EX \" start example +.ta 1i 2i 3i 4i 5i 6i +.PP +.RS +.PD 0 +.ft 5 +.nf +.. +.de EE \" end example +.fi +.ft +.PD +.RE +.PP +.. +.TH CHR 3 +.SH NAME +chr \- character constant conversion routines +.SH SYNOPSIS +.EX +#include + +int chresc(const char* \fIs\fP, char** \fIe\fP); +int chrtoi(const char* \fIs\fP); +.EE +.SH DESCRIPTION +.L chresc +converts and returns the next character constant in the 0-terminated string +.IR s . +If +.I e +is not 0 then +.I *e +is set to point to the next character in +.I s +on return. +0 is returned and +.I e +is not modified when the end of +.I s +is reached. +.PP +.L chrtoi +converts the 0-terminated string +.I s +to an +.I int +and returns the value. +The characters in +.I s +are converted in order from the left and shifted into the +.I int +value until up to the number of characters in an +.I int +is reached. +This operation is inherently machine-dependent, +but at least its defined in one place. +.PP +The following +.B \e +escape sequences are recognized: +.TP +.RI \e ooo +The character represented by the octal code +.IR ooo . +.TP +.RI \ex xx +The character represented by the hex code +.IR xx . +.TP +.L \ea +Alert (bell). +.TP +.L \eb +Backspace. +.TP +.L \ef +Formfeed. +.TP +.L \en +Newline. +.TP +.L \er +Carriage return. +.TP +.L \et +Horizontal tab. +.TP +.L \ev +Vertical tab. +.TP +.L \eE +ESC (escape). +.TP +.L \e\e +Backslash. +.PP +Other characters following +.B \e +are undefined (although for backwards compatibility they +translate to themselves). +.SH "SEE ALSO" +str(3) -- cgit v1.2.3