]>
Commit | Line | Data |
---|---|---|
5b2abdfb | 1 | .\" Copyright (c) 1990, 1991, 1993 |
e9ce8d39 A |
2 | .\" The Regents of the University of California. All rights reserved. |
3 | .\" | |
5b2abdfb A |
4 | .\" This code is derived from software contributed to Berkeley by |
5 | .\" Chris Torek. | |
e9ce8d39 A |
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 | |
10 | .\" notice, this list of conditions and the following disclaimer. | |
11 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
12 | .\" notice, this list of conditions and the following disclaimer in the | |
13 | .\" documentation and/or other materials provided with the distribution. | |
e9ce8d39 A |
14 | .\" 4. Neither the name of the University nor the names of its contributors |
15 | .\" may be used to endorse or promote products derived from this software | |
16 | .\" without specific prior written permission. | |
17 | .\" | |
18 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
19 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
20 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
21 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
22 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
23 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
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 | .\" | |
5b2abdfb | 30 | .\" @(#)bstring.3 8.1 (Berkeley) 6/4/93 |
1f2f436a | 31 | .\" $FreeBSD: src/lib/libc/string/bstring.3,v 1.8 2007/01/09 00:28:11 imp Exp $ |
e9ce8d39 | 32 | .\" |
5b2abdfb A |
33 | .Dd June 4, 1993 |
34 | .Dt BSTRING 3 | |
e9ce8d39 A |
35 | .Os |
36 | .Sh NAME | |
5b2abdfb A |
37 | .Nm bcmp , |
38 | .Nm bcopy , | |
39 | .Nm bzero , | |
40 | .Nm memccpy , | |
41 | .Nm memchr , | |
42 | .Nm memcmp , | |
43 | .Nm memcpy , | |
44 | .Nm memmove , | |
45 | .Nm memset | |
46 | .Nd byte string operations | |
e9ce8d39 A |
47 | .Sh LIBRARY |
48 | .Lb libc | |
49 | .Sh SYNOPSIS | |
ad3c9f2a | 50 | .In strings.h |
e9ce8d39 | 51 | .Ft int |
ad3c9f2a A |
52 | .Fo bcmp |
53 | .Fa "const void *s1" | |
54 | .Fa "const void *s2" | |
55 | .Fa "size_t n" | |
56 | .Fc | |
5b2abdfb | 57 | .Ft void |
ad3c9f2a A |
58 | .Fo bcopy |
59 | .Fa "const void *s1" | |
60 | .Fa "void *s2" | |
61 | .Fa "size_t n" | |
62 | .Fc | |
5b2abdfb | 63 | .Ft void |
ad3c9f2a A |
64 | .Fo bzero |
65 | .Fa "void *s" | |
66 | .Fa "size_t n" | |
67 | .Fc | |
68 | .In string.h | |
5b2abdfb | 69 | .Ft void * |
ad3c9f2a A |
70 | .Fo memccpy |
71 | .Fa "void *restrict s1" | |
72 | .Fa "const void *restrict s2" | |
73 | .Fa "int c" | |
74 | .Fa "size_t n" | |
75 | .Fc | |
5b2abdfb | 76 | .Ft void * |
ad3c9f2a A |
77 | .Fo memchr |
78 | .Fa "const void *s" | |
79 | .Fa "int c" | |
80 | .Fa "size_t n" | |
81 | .Fc | |
82 | .Ft int | |
83 | .Fo memcmp | |
84 | .Fa "const void *s1" | |
85 | .Fa "const void *s2" | |
86 | .Fa "size_t n" | |
87 | .Fc | |
5b2abdfb | 88 | .Ft void * |
ad3c9f2a A |
89 | .Fo memcpy |
90 | .Fa "void *restrict s1" | |
91 | .Fa "const void *restrict s2" | |
92 | .Fa "size_t n" | |
93 | .Fc | |
5b2abdfb | 94 | .Ft void * |
ad3c9f2a A |
95 | .Fo memmove |
96 | .Fa "void *s1" | |
97 | .Fa "const void *s2" | |
98 | .Fa "size_t n" | |
99 | .Fc | |
5b2abdfb | 100 | .Ft void * |
ad3c9f2a A |
101 | .Fo memset |
102 | .Fa "void *s" | |
103 | .Fa "int c" | |
104 | .Fa "size_t n" | |
105 | .Fc | |
e9ce8d39 | 106 | .Sh DESCRIPTION |
5b2abdfb | 107 | These functions operate on variable length strings of bytes. |
ad3c9f2a | 108 | They do not check for terminating null bytes, as the routines |
5b2abdfb A |
109 | listed in |
110 | .Xr string 3 | |
111 | do. | |
112 | .Pp | |
113 | See the specific manual pages for more information. | |
ad3c9f2a A |
114 | .Sh LEGACY SYNOPSIS |
115 | .Fd #include <string.h> | |
116 | .Pp | |
117 | The include file | |
118 | .In string.h | |
119 | is necessary and sufficient for all functions. | |
e9ce8d39 | 120 | .Sh SEE ALSO |
5b2abdfb A |
121 | .Xr bcmp 3 , |
122 | .Xr bcopy 3 , | |
123 | .Xr bzero 3 , | |
124 | .Xr memccpy 3 , | |
125 | .Xr memchr 3 , | |
126 | .Xr memcmp 3 , | |
127 | .Xr memcpy 3 , | |
128 | .Xr memmove 3 , | |
ad3c9f2a A |
129 | .Xr memset 3 , |
130 | .Xr compat 5 | |
5b2abdfb A |
131 | .Sh STANDARDS |
132 | The functions | |
133 | .Fn memchr , | |
134 | .Fn memcmp , | |
135 | .Fn memcpy , | |
136 | .Fn memmove , | |
137 | and | |
138 | .Fn memset | |
139 | conform to | |
140 | .St -isoC . | |
e9ce8d39 | 141 | .Sh HISTORY |
5b2abdfb A |
142 | The functions |
143 | .Fn bzero | |
144 | and | |
145 | .Fn memccpy | |
146 | appeared in | |
147 | .Bx 4.3 ; | |
148 | the functions | |
149 | .Fn bcmp , | |
150 | .Fn bcopy , | |
151 | appeared in | |
152 | .Bx 4.2 . |