Lely core libraries  2.3.4
stdio.h File Reference

This header file is part of the C11 and POSIX compatibility library; it includes <stdio.h> and defines any missing functionality. More...

#include <lely/features.h>
#include <lely/libc/sys/types.h>
#include <stdarg.h>
#include <stdio.h>
Include dependency graph for stdio.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int asprintf (char **strp, const char *fmt,...)
 Equivalent to sprintf(), except that it allocates a string large enough to hold the output, including the terminating null byte. More...
 
int vasprintf (char **strp, const char *fmt, va_list ap)
 Equivalent to vsprintf(), except that it allocates a string large enough to hold the output, including the terminating null byte. More...
 

Detailed Description

This header file is part of the C11 and POSIX compatibility library; it includes <stdio.h> and defines any missing functionality.

Author
J. S. Seldenthuis jseld.nosp@m.enth.nosp@m.uis@l.nosp@m.ely..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file stdio.h.

Function Documentation

◆ asprintf()

int asprintf ( char **  strp,
const char *  fmt,
  ... 
)

Equivalent to sprintf(), except that it allocates a string large enough to hold the output, including the terminating null byte.

Parameters
strpthe address of a value which, on success, contains a pointer to the allocated string. This pointer SHOULD be passed to free() to release the allocated storage.
fmta printf-style format string.
...an optional list of arguments to be printed according to fmt.
Returns
the number of characters written, not counting the terminating null byte, or a negative number on error.
See also
vasprintf()

Definition at line 106 of file stdio.c.

◆ vasprintf()

int vasprintf ( char **  strp,
const char *  fmt,
va_list  ap 
)

Equivalent to vsprintf(), except that it allocates a string large enough to hold the output, including the terminating null byte.

Parameters
strpthe address of a value which, on success, contains a pointer to the allocated string. This pointer SHOULD be passed to free() to release the allocated storage.
fmta printf-style format string.
apthe list with arguments to be printed according to fmt.
Returns
the number of characters written, not counting the terminating null byte, or a negative number on error.
See also
asprintf()

Definition at line 116 of file stdio.c.