X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/d0053e2e04b82ba280e6bffb9168ae9468eb9788..f02553fdfdc99b34012478cdea5b57a280c0d3e7:/man/darray.3 diff --git a/man/darray.3 b/man/darray.3 index 69a3239..8f7953c 100644 --- a/man/darray.3 +++ b/man/darray.3 @@ -19,7 +19,7 @@ .. .ie t .ds o \(bu .el .ds o o -.TH darray 3 "21 October 1999" mLib +.TH darray 3 "21 October 1999" "Straylight/Edgeware" "mLib utilities library" .SH "NAME" darray \- dense, dynamically resizing arrays .\" @DA_INIT @@ -43,6 +43,8 @@ darray \- dense, dynamically resizing arrays .\" @DA_UNSAFE_SHRINK .\" @DA_UNSLIDE .\" @DA_UNSAFE_UNSLIDE +.\" @DA_FIRST +.\" @DA_LAST .\" @DA_PUSH .\" @DA_POP .\" @DA_UNSHIFT @@ -82,6 +84,8 @@ darray \- dense, dynamically resizing arrays .BI "void DA_UNSAFE_SLIDE(" type_v " *" a ", long " n ); .BI "void DA_UNSAFE_UNSLIDE(" type_v " *" a ", long " n ); +.IB type " DA_FIRST(" type_v " *" a ); +.IB type " DA_LAST(" type_v " *" a ); .BI "void DA_PUSH(" type_v " *" a ", " type " " x ); .IB type " DA_POP(" type_v " *" a ); .BI "void DA_UNSHIFT(" type_v " *" a ", " type " " x ); @@ -329,6 +333,13 @@ and can fail because the array is empty, in which case .B DAEXC_UFLOW is thrown. +.PP +The operations +.B DA_FIRST +and +.B DA_LAST +are lvalues referring to the first and last elements in the array +respectively. They are unsafe if the array is empty. .SS "Low-level details" This section describes low-level details of the dynamic array implementation. You should try to avoid making use of this information @@ -441,4 +452,4 @@ Reallocate the array to use the smallest amount of memory possible. .BR exc (3), .BR mLib (3). .SH "AUTHOR" -Mark Wooding, +Mark Wooding,