gencpp/project/dependencies/printing.hpp
Ed_ 2e5e31ed3b gencpp : General refactors to dependencies
Mostly just cleanup and renaming of certain stuff (mostly in dependencies).

* Changed uw and sw to usize and ssize.
* Removed zpl_cast usage throughout dependencies
* No longer using GEN_DEF_INLINE & GEN_IMPL_INLINE
* header_start.hpp renamed to platform.hpp for depdendencies header.
2024-10-27 18:58:37 -04:00

42 lines
1.0 KiB
C++

#ifdef GEN_INTELLISENSE_DIRECTIVES
# pragma once
# include "string_ops.hpp"
#endif
#pragma region Printing
struct FileInfo;
#ifndef GEN_PRINTF_MAXLEN
# define GEN_PRINTF_MAXLEN kilobytes(128)
#endif
// NOTE: A locally persisting buffer is used internally
char* str_fmt_buf ( char const* fmt, ... );
char* str_fmt_buf_va ( char const* fmt, va_list va );
ssize str_fmt ( char* str, ssize n, char const* fmt, ... );
ssize str_fmt_va ( char* str, ssize n, char const* fmt, va_list va );
ssize str_fmt_out_va ( char const* fmt, va_list va );
ssize str_fmt_out_err ( char const* fmt, ... );
ssize str_fmt_out_err_va( char const* fmt, va_list va );
ssize str_fmt_file ( FileInfo* f, char const* fmt, ... );
ssize str_fmt_file_va ( FileInfo* f, char const* fmt, va_list va );
constexpr
char const* Msg_Invalid_Value = "INVALID VALUE PROVIDED";
inline
ssize log_fmt(char const* fmt, ...)
{
ssize res;
va_list va;
va_start(va, fmt);
res = str_fmt_out_va(fmt, va);
va_end(va);
return res;
}
#pragma endregion Printing