Package org.lwjgl.system.libc
Class LibCStdio
java.lang.Object
org.lwjgl.system.libc.LibCStdio
Native bindings to stdio.h.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
nvsnprintf
(long buffer, long buf_size, long format, long vlist) Unsafe version of:vsnprintf(java.nio.ByteBuffer, java.nio.ByteBuffer, long)
static int
nvsscanf
(long buffer, long format, long vlist) Unsafe version of:vsscanf(java.nio.ByteBuffer, java.nio.ByteBuffer, long)
static int
vsnprintf
(ByteBuffer buffer, CharSequence format, long vlist) Loads the data from the locations, defined byvlist
, converts them to character string equivalents and writes the results to a character string buffer.static int
vsnprintf
(ByteBuffer buffer, ByteBuffer format, long vlist) Loads the data from the locations, defined byvlist
, converts them to character string equivalents and writes the results to a character string buffer.static int
vsscanf
(CharSequence buffer, CharSequence format, long vlist) Reads data from the null-terminated character stringbuffer
, interprets it according toformat
and stores the results into locations defined byvlist
.static int
vsscanf
(ByteBuffer buffer, ByteBuffer format, long vlist) Reads data from the null-terminated character stringbuffer
, interprets it according toformat
and stores the results into locations defined byvlist
.
-
Field Details
-
sscanf
public static final long sscanfThe address of thesscanf
function. -
snprintf
public static final long snprintfThe address of thesnprintf
function.
-
-
Method Details
-
nvsscanf
public static int nvsscanf(long buffer, long format, long vlist) Unsafe version of:vsscanf(java.nio.ByteBuffer, java.nio.ByteBuffer, long)
-
vsscanf
Reads data from the null-terminated character stringbuffer
, interprets it according toformat
and stores the results into locations defined byvlist
.- Parameters:
buffer
- pointer to a null-terminated character string to read fromformat
- pointer to a null-terminated character string specifying how to read the inputvlist
- variable argument list containing the receiving arguments- Returns:
- the number of receiving arguments successfully assigned, or
EOF
if read failure occurs before the first receiving argument was assigned
-
vsscanf
Reads data from the null-terminated character stringbuffer
, interprets it according toformat
and stores the results into locations defined byvlist
.- Parameters:
buffer
- pointer to a null-terminated character string to read fromformat
- pointer to a null-terminated character string specifying how to read the inputvlist
- variable argument list containing the receiving arguments- Returns:
- the number of receiving arguments successfully assigned, or
EOF
if read failure occurs before the first receiving argument was assigned
-
nvsnprintf
public static int nvsnprintf(long buffer, long buf_size, long format, long vlist) Unsafe version of:vsnprintf(java.nio.ByteBuffer, java.nio.ByteBuffer, long)
- Parameters:
buf_size
- up tobuf_size - 1
characters may be written, plus the null terminator
-
vsnprintf
Loads the data from the locations, defined byvlist
, converts them to character string equivalents and writes the results to a character string buffer.- Parameters:
buffer
- pointer to a character string to write toformat
- pointer to a null-terminated character string specifying how to interpret the datavlist
- variable argument list containing the data to print- Returns:
- the number of characters written if successful or negative value if an error occurred. If the resulting string gets truncated due to
buf_size
limit, function returns the total number of characters (not including the terminating null-byte) which would have been written, if the limit was not imposed.
-
vsnprintf
Loads the data from the locations, defined byvlist
, converts them to character string equivalents and writes the results to a character string buffer.- Parameters:
buffer
- pointer to a character string to write toformat
- pointer to a null-terminated character string specifying how to interpret the datavlist
- variable argument list containing the data to print- Returns:
- the number of characters written if successful or negative value if an error occurred. If the resulting string gets truncated due to
buf_size
limit, function returns the total number of characters (not including the terminating null-byte) which would have been written, if the limit was not imposed.
-