_ALIGNP - move pointer value to specified alignment.
(Not in the ANSI standard)
Usage:
#include <sdgstd.h>
newp = _alignp(oldp,alignment);
Where:
- void *oldp;
- is any pointer value.
- size_t alignment;
- is a number indicating the byte boundary of the desired
alignment. For example, a value of 4 indicates word
alignment on the DPS-8, while a value of 8 indicates
double-word alignment.
- void *newp;
- is the value of "oldp" moved up to the next
alignment boundary of the type given by
"alignment". If "oldp" already had
suitable alignment, it is not changed.
Description:
"_alignp" (one underscore) returns a pointer value
with a specified alignment. The "__alignof" operator is
sometimes useful in conjunction with "_alignp".
Copyright © 1996, Thinkage Ltd.