Changeset View
Changeset View
Standalone View
Standalone View
head/share/man/man9/sbuf.9
Show All 19 Lines | |||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd August 7, 2019 | .Dd August 26, 2020 | ||||
.Dt SBUF 9 | .Dt SBUF 9 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm sbuf , | .Nm sbuf , | ||||
.Nm sbuf_new , | .Nm sbuf_new , | ||||
.Nm sbuf_new_auto , | .Nm sbuf_new_auto , | ||||
.Nm sbuf_new_for_sysctl , | .Nm sbuf_new_for_sysctl , | ||||
.Nm sbuf_clear , | .Nm sbuf_clear , | ||||
▲ Show 20 Lines • Show All 328 Lines • ▼ Show 20 Lines | |||||
function. | function. | ||||
.Pp | .Pp | ||||
The | The | ||||
.Fn sbuf_setpos | .Fn sbuf_setpos | ||||
function sets the | function sets the | ||||
.Fa sbuf Ns 's | .Fa sbuf Ns 's | ||||
end position to | end position to | ||||
.Fa pos , | .Fa pos , | ||||
which is a value between zero and one less than the size of the | which is a value between zero and the current position in the buffer. | ||||
storage buffer. | It can only truncate the sbuf to the new position. | ||||
This effectively truncates the sbuf at the new position. | |||||
.Pp | .Pp | ||||
The | The | ||||
.Fn sbuf_bcat | .Fn sbuf_bcat | ||||
function appends the first | function appends the first | ||||
.Fa len | .Fa len | ||||
bytes from the buffer | bytes from the buffer | ||||
.Fa buf | .Fa buf | ||||
to the | to the | ||||
▲ Show 20 Lines • Show All 387 Lines • Show Last 20 Lines |