Class LibCStdio

java.lang.Object
org.lwjgl.system.libc.LibCStdio

public class LibCStdio extends Object
Native bindings to stdio.h.
  • Field Details

    • sscanf

      public static final long sscanf
      The address of the sscanf function.
    • snprintf

      public static final long snprintf
      The address of the snprintf function.
  • Method Details

    • nvsscanf

      public static int nvsscanf(long buffer, long format, long vlist)
    • vsscanf

      public static int vsscanf(ByteBuffer buffer, ByteBuffer format, long vlist)
      Reads data from the null-terminated character string buffer, interprets it according to format and stores the results into locations defined by vlist.
      Parameters:
      buffer - pointer to a null-terminated character string to read from
      format - pointer to a null-terminated character string specifying how to read the input
      vlist - 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

      public static int vsscanf(CharSequence buffer, CharSequence format, long vlist)
      Reads data from the null-terminated character string buffer, interprets it according to format and stores the results into locations defined by vlist.
      Parameters:
      buffer - pointer to a null-terminated character string to read from
      format - pointer to a null-terminated character string specifying how to read the input
      vlist - 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)
      Parameters:
      buf_size - up to buf_size - 1 characters may be written, plus the null terminator
    • vsnprintf

      public static int vsnprintf(@Nullable ByteBuffer buffer, ByteBuffer format, long vlist)
      Loads the data from the locations, defined by vlist, converts them to character string equivalents and writes the results to a character string buffer.
      Parameters:
      buffer - pointer to a character string to write to
      format - pointer to a null-terminated character string specifying how to interpret the data
      vlist - 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

      public static int vsnprintf(@Nullable ByteBuffer buffer, CharSequence format, long vlist)
      Loads the data from the locations, defined by vlist, converts them to character string equivalents and writes the results to a character string buffer.
      Parameters:
      buffer - pointer to a character string to write to
      format - pointer to a null-terminated character string specifying how to interpret the data
      vlist - 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.