Package org.lwjgl.system.libc
Class LibCStdio
java.lang.Object
org.lwjgl.system.libc.LibCStdio
Native bindings to stdio.h.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic intnvsnprintf(long buffer, long buf_size, long format, long vlist) Unsafe version of:vsnprintf(java.nio.ByteBuffer, java.nio.ByteBuffer, long)static intnvsscanf(long buffer, long format, long vlist) Unsafe version of:vsscanf(java.nio.ByteBuffer, java.nio.ByteBuffer, long)static intvsnprintf(@Nullable 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 intvsnprintf(@Nullable 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 intvsscanf(CharSequence buffer, CharSequence format, long vlist) Reads data from the null-terminated character stringbuffer, interprets it according toformatand stores the results into locations defined byvlist.static intvsscanf(ByteBuffer buffer, ByteBuffer format, long vlist) Reads data from the null-terminated character stringbuffer, interprets it according toformatand stores the results into locations defined byvlist.
-
Field Details
-
sscanf
public static final long sscanfThe address of thesscanffunction. -
snprintf
public static final long snprintfThe address of thesnprintffunction.
-
-
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 toformatand 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
EOFif read failure occurs before the first receiving argument was assigned
-
vsscanf
Reads data from the null-terminated character stringbuffer, interprets it according toformatand 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
EOFif 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 - 1characters 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_sizelimit, 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_sizelimit, function returns the total number of characters (not including the terminating null-byte) which would have been written, if the limit was not imposed.
-