Commit | Line | Data |
---|---|---|
76ce485e KM |
1 | .\" Copyright (c) 1983 Regents of the University of California. |
2 | .\" All rights reserved. The Berkeley software License Agreement | |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
95f51977 | 5 | .\" @(#)bstring.3 6.1 (Berkeley) 5/15/85 |
76ce485e | 6 | .\" |
95f51977 | 7 | .TH BSTRING 3 "May 15, 1985" |
76ce485e KM |
8 | .UC 5 |
9 | .SH NAME | |
10 | bcopy, bcmp, bzero, ffs \- bit and byte string operations | |
11 | .SH SYNOPSIS | |
12 | .nf | |
100f1cee KM |
13 | .B bcopy(src, dst, length) |
14 | .B char *src, *dst; | |
76ce485e KM |
15 | .B int length; |
16 | .PP | |
17 | .B bcmp(b1, b2, length) | |
18 | .B char *b1, *b2; | |
19 | .B int length; | |
20 | .PP | |
21 | .B bzero(b, length) | |
22 | .B char *b; | |
23 | .B int length; | |
24 | .PP | |
25 | .B ffs(i) | |
26 | .B int i; | |
27 | .fi | |
28 | .SH DESCRIPTION | |
29 | The functions | |
30 | .IR bcopy , | |
31 | .IR bcmp , | |
32 | and | |
33 | .I bzero | |
34 | operate on variable length strings of bytes. | |
35 | They do not check for null bytes as the routines in | |
36 | .IR string (3) | |
37 | do. | |
38 | .PP | |
39 | .I Bcopy | |
40 | copies | |
41 | .I length | |
42 | bytes from string | |
100f1cee | 43 | .I src |
76ce485e | 44 | to the string |
100f1cee | 45 | .IR dst . |
76ce485e KM |
46 | .PP |
47 | .I Bcmp | |
48 | compares byte string | |
49 | .I b1 | |
50 | against byte string | |
51 | .IR b2 , | |
52 | returning zero if they are identical, | |
53 | non-zero otherwise. Both strings are | |
54 | assumed to be | |
55 | .I length | |
56 | bytes long. | |
57 | .PP | |
58 | .I Bzero | |
59 | places | |
60 | .I length | |
61 | 0 bytes in the string | |
62 | .IR b1 . | |
63 | .PP | |
64 | .I Ffs | |
65 | find the first bit set in the argument passed it and | |
66 | returns the index of that bit. Bits are numbered | |
100f1cee | 67 | starting at 1. A return value of 0 indicates the |
76ce485e KM |
68 | value passed is zero. |
69 | .SH BUGS | |
70 | The | |
76ce485e | 71 | .I bcopy |
100f1cee | 72 | routine take parameters backwards from |
76ce485e | 73 | .IR strcpy . |