IOFMT

Table of Contents

IOFMT

Description

Type-aware format specifier generator

Parameters

NameDirectionDescription
xinValue to format

Success

Returns TypeSpecificIO for supported types

Failure

Returns unsupported type handler for unknown types

Usage example (Cross-references)

    
    #if defined(_MSC_VER) || defined(__MSC_VER)
    #    define IOFMT(x)                                                                                                   \
            _Generic(                                                                                                      \
                (x),                                                                                                       \
    /// Used in following macros
    ///
    #define IOFMT_LVAL_APPEND_COMMA(x) IOFMT(LVAL(x)),
    #define IOFMT_APPEND_COMMA(x)      IOFMT(x),
    ///
    #define IOFMT_LVAL_APPEND_COMMA(x) IOFMT(LVAL(x)),
    #define IOFMT_APPEND_COMMA(x)      IOFMT(x),
    
    ///

Share :

Related Posts

TypeSpecificWriter

TypeSpecificWriter Description Type-specific write callback signature

Read More

TypeSpecificReader

TypeSpecificReader Description Unified I/O operations container

Read More

ReadCompleteFile

ReadCompleteFile Description Read complete contents of file at once. Pointer returned is malloc’d and hence must be freed after use. The returned pointer can also be reused by providing pointer to it in data parameter. realloc is called on *data in order to expand it’s size. If *capacity exceeds the size of file to be loaded, then no reallocation is performed. This means the provided buffer will automatically be expanded if required. The returned buffer is null-terminated just-in-case. The implementation and API is designed in such a way that it can be used with containers like Vec and Str.

Read More