_VECTOR - create a shrink vector.

Usage:

#include <climb.h>
sv = _vector(ptr,length);
sv = _VECTOR(obj);        /* Macro */

Where:

void *ptr;
is a pointer to the beginning of any object that you want to frame with a shrink vector.
size_t length;
is the length (in bytes) of the object that you want to frame with the shrink vector.
obj
is any object that you want to frame with a shrink vector.
struct _vector sv;
is the shrink vector framing the object.

Description:

The "_vector" function returns a "struct _vector" shrink vector framing a specified object. _VECTOR is a macro that performs the same operation. The shrink vector gives full permissions on the object.

The _VECTOR macro expands to a call to the "_vector" function, using "sizeof" to obtain the size of "obj". For example, in

int arr[100];
struct _vector sh;
sh = _VECTOR(arr);

the "sh" variable is assigned a shrink vector framing the "arr" array.

See Also:

expl nsc lib _AVECTOR

expl nsc lib _lddstd

Copyright © 1996, Thinkage Ltd.