Deleted Added
full compact
mandoc_escape.3 (274880) mandoc_escape.3 (275432)
1.\" $Id: mandoc_escape.3,v 1.1 2014/08/05 05:48:56 schwarze Exp $
1.\" $Id: mandoc_escape.3,v 1.2 2014/10/28 14:06:31 schwarze Exp $
2.\"
3.\" Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
2.\"
3.\" Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: August 5 2014 $
17.Dd $Mdocdate: October 28 2014 $
18.Dt MANDOC_ESCAPE 3
19.Os
20.Sh NAME
21.Nm mandoc_escape
22.Nd parse roff escape sequences
23.Sh LIBRARY
24.Lb libmandoc
25.Sh SYNOPSIS

--- 166 unchanged lines hidden (view full) ---

192and, as a special exception, the escape sequences
193.Em not
194having an identifier, that is, those where the argument, in standard
195form, directly follows the initial backslash:
196.Ic \eC' , \e[ , \e( , \e Ns Ar a .
197Note that the one-character argument short form can only be used for
198argument characters that do not clash with escape sequence identifiers.
199.Pp
18.Dt MANDOC_ESCAPE 3
19.Os
20.Sh NAME
21.Nm mandoc_escape
22.Nd parse roff escape sequences
23.Sh LIBRARY
24.Lb libmandoc
25.Sh SYNOPSIS

--- 166 unchanged lines hidden (view full) ---

192and, as a special exception, the escape sequences
193.Em not
194having an identifier, that is, those where the argument, in standard
195form, directly follows the initial backslash:
196.Ic \eC' , \e[ , \e( , \e Ns Ar a .
197Note that the one-character argument short form can only be used for
198argument characters that do not clash with escape sequence identifiers.
199.Pp
200If the argument consists of more than one character
201and starts with the character
202.Sq u ,
203.Dv ESCAPE_UNICODE
204is returned as described below.
205If the argument is just the single character
206.Sq u ,
207.Dv ESCAPE_ERROR
208is returned.
200If the argument matches one of the forms described below under
201.Dv ESCAPE_UNICODE ,
202that value is returned instead.
209.Pp
210The
211.Dv ESCAPE_SPECIAL
212special character escape sequences can be rendered using the functions
213.Fn mchars_spec2cp
214and
215.Fn mchars_spec2str
216described in the
217.Xr mchars_alloc 3
218manual.
219.It Dv ESCAPE_UNICODE
220Escape sequences of the same format as described above under
221.Dv ESCAPE_SPECIAL ,
203.Pp
204The
205.Dv ESCAPE_SPECIAL
206special character escape sequences can be rendered using the functions
207.Fn mchars_spec2cp
208and
209.Fn mchars_spec2str
210described in the
211.Xr mchars_alloc 3
212manual.
213.It Dv ESCAPE_UNICODE
214Escape sequences of the same format as described above under
215.Dv ESCAPE_SPECIAL ,
222but with an argument starting with the character
223.Sq u :
216but with an argument of the forms
217.Ic u Ns Ar XXXX ,
218.Ic u Ns Ar YXXXX ,
219or
220.Ic u10 Ns Ar XXXX
221where
222.Ar X
223and
224.Ar Y
225are hexadecimal digits and
226.Ar Y
227is not zero:
224.Ic \eC'u , \e[u .
225As a special exception,
226.Fa start
227is set to the character after the
228.Ic \eC'u , \e[u .
229As a special exception,
230.Fa start
231is set to the character after the
228.Sq u ,
232.Ic u ,
229and the
230.Fa sz
231return value does not include the
233and the
234.Fa sz
235return value does not include the
232.Sq u
236.Ic u
233either.
234.Pp
235Such Unicode character escape sequences can be rendered using the function
236.Fn mchars_num2uc
237described in the
238.Xr mchars_alloc 3
239manual.
240.It Dv ESCAPE_NUMBERED

--- 122 unchanged lines hidden ---
237either.
238.Pp
239Such Unicode character escape sequences can be rendered using the function
240.Fn mchars_num2uc
241described in the
242.Xr mchars_alloc 3
243manual.
244.It Dv ESCAPE_NUMBERED

--- 122 unchanged lines hidden ---