unvis.3 (ff88ef4183d34943e90dda4138857bcee2d8e092) | unvis.3 (ea46e63863df9bd36b65f7293092214f1937349e) |
---|---|
1.\" $NetBSD: unvis.3,v 1.29 2017/10/24 19:14:55 abhinav Exp $ 2.\" $FreeBSD$ | 1.\" $NetBSD: unvis.3,v 1.30 2019/05/08 15:37:41 bad Exp $ |
3.\" 4.\" Copyright (c) 1989, 1991, 1993 5.\" The Regents of the University of California. All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 10.\" 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" SUCH DAMAGE. 30.\" 31.\" @(#)unvis.3 8.2 (Berkeley) 12/11/93 32.\" | 2.\" 3.\" Copyright (c) 1989, 1991, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28.\" SUCH DAMAGE. 29.\" 30.\" @(#)unvis.3 8.2 (Berkeley) 12/11/93 31.\" |
33.Dd March 12, 2011 | 32.Dd May 8, 2019 |
34.Dt UNVIS 3 35.Os 36.Sh NAME 37.Nm unvis , 38.Nm strunvis , 39.Nm strnunvis , 40.Nm strunvisx , 41.Nm strnunvisx --- 53 unchanged lines hidden (view full) --- 95The size of 96.Ar dst 97should be equal to the size of 98.Ar src 99(that is, no expansion takes place during decoding). 100.Pp 101The 102.Fn strunvisx | 33.Dt UNVIS 3 34.Os 35.Sh NAME 36.Nm unvis , 37.Nm strunvis , 38.Nm strnunvis , 39.Nm strunvisx , 40.Nm strnunvisx --- 53 unchanged lines hidden (view full) --- 94The size of 95.Ar dst 96should be equal to the size of 97.Ar src 98(that is, no expansion takes place during decoding). 99.Pp 100The 101.Fn strunvisx |
103function does the same as the | 102and 103.Fn strnunvisx 104functions do the same as the |
104.Fn strunvis | 105.Fn strunvis |
105function, 106but it allows you to add a flag that specifies the style the string | 106and 107.Fn strnunvis 108functions, 109but take a flag that specifies the style the string |
107.Ar src 108is encoded with. | 110.Ar src 111is encoded with. |
109Currently, the supported flags are: 110.Dv VIS_HTTPSTYLE 111and 112.Dv VIS_MIMESTYLE . | 112The meaning of the flag is the same as explained below for 113.Fn unvis . |
113.Pp 114The 115.Fn unvis 116function implements a state machine that can be used to decode an 117arbitrary stream of bytes. 118All state associated with the bytes being decoded is stored outside the 119.Fn unvis 120function (that is, a pointer to the state is passed in), so --- 32 unchanged lines hidden (view full) --- 153one more time with flag set to 154.Dv UNVIS_END 155to extract any remaining character (the character passed in is ignored). 156.Pp 157The 158.Fa flag 159argument is also used to specify the encoding style of the source. 160If set to | 114.Pp 115The 116.Fn unvis 117function implements a state machine that can be used to decode an 118arbitrary stream of bytes. 119All state associated with the bytes being decoded is stored outside the 120.Fn unvis 121function (that is, a pointer to the state is passed in), so --- 32 unchanged lines hidden (view full) --- 154one more time with flag set to 155.Dv UNVIS_END 156to extract any remaining character (the character passed in is ignored). 157.Pp 158The 159.Fa flag 160argument is also used to specify the encoding style of the source. 161If set to |
162.Dv VIS_NOESCAPE 163.Fn unvis 164will not decode backslash escapes. 165If set to |
|
161.Dv VIS_HTTPSTYLE 162or 163.Dv VIS_HTTP1808 , 164.Fn unvis 165will decode URI strings as specified in RFC 1808. 166If set to 167.Dv VIS_HTTP1866 , 168.Fn unvis --- 97 unchanged lines hidden --- | 166.Dv VIS_HTTPSTYLE 167or 168.Dv VIS_HTTP1808 , 169.Fn unvis 170will decode URI strings as specified in RFC 1808. 171If set to 172.Dv VIS_HTTP1866 , 173.Fn unvis --- 97 unchanged lines hidden --- |