plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit 6c013fecdf5b447b4a09069674f60ebca9235f55
parent e41871a7f002985778ff974832ca5b8bcabb2443
Author: ssnf <ssnf@ssnf.xyz>
Date:   Fri,  1 Aug 2025 02:01:45 +0000

libvec: update documentation

Diffstat:
Mman/man3/vec.3 | 14++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/man/man3/vec.3 b/man/man3/vec.3 @@ -1,6 +1,6 @@ .TH VEC 3 .SH NAME -Vecadd, Vecaddv, Vecclose, Vecdel, Vecinit, Vecinitf, Vecinsure, Veczero, Vecsiz \- generic resizable vectors +Vec, Vecadd, Vecaddv, Vecclose, Vecdel, Vecinit, Vecinitf, Vecinsure, Veczero, Vecsiz \- generic resizable vectors .SH SYNOPSIS .B #include <u.h> .br @@ -19,6 +19,10 @@ typedef struct { } Vector; .fi .PP +.ta \w'\fLVector* 'u +.B +Vector* Vec(Type p) +.PP .ta \w'\fLType 'u .B Type Vecadd(Type *p) @@ -53,6 +57,12 @@ The vector maintains metadata about its size and capacity in a .B Vector structure stored immediately before the data. .PP +.I Vec +returns a pointer to the +.B Vector +structure for vector +.IR p . +.PP .I Vecinit initializes a vector pointed to by .IR p . @@ -181,7 +191,7 @@ Vecclose(&v); .SH DIAGNOSTICS All functions call .I sysfatal -if memory allocation fails. +if memory allocation fails or if passed nil or uninitialized vectors. .SH NOTES The vector implementation uses .I Type