Datasheet

The C and C++ Libraries
ARM DUI 0067D Copyright © 1999-2001 ARM Limited. All rights reserved. 4-101
The
bufsize
parameter specifies the number of characters of
buffer
that the function can
write into, including the terminating null.
<stdio.h>
is an ANSI header file, but the function is not allowed by the ANSI C library
standard. It is therefore not available if you use the compilers with the
-strict
option.
Syntax
int vsnprintf(char *buffer, size_t bufsize, const char *format, va_list ap)
4.14.6 lldiv()
The
lldiv
functiondivides two
long long
integers and returns both the quotient and the
remainder. It is the
long long
equivalent of the ANSI function
ldiv
. The return type
lldiv_t
is a structure containing two
long long
members, called
quot
and
rem
.
<stdlib.h>
is an ANSI header file, but the function is not allowed by the ANSI C library
standard. It is therefore not available if you use the compilers with the
-strict
option.
Syntax
lldiv_tlldiv(long long num, long long denom)
4.14.7 llabs()
The
llabs()
returns the absolute value of its input. It is the
long long
equivalent of the
ANSI function
labs
.
<stdlib.h>
is an ANSI header file, but the function is not allowed by the ANSI C library
standard. It is therefore not available if you use the compilers with the
-strict
option.
Syntax
longlong llabs(long long num)
4.14.8 alloca()
The
alloca()
function allocates local storage in a function. It returns a pointer to
size
bytes of memory, or
NULL
if not enough memory was available. The default
implementation returns an 8-byte aligned block of memory.
Memory returned from
alloca()
must never be passed to
free()
. Instead, the memory
is deallocated automatically when the function that called
alloca()
returns.