There's a printf function, but no sprintf, snprintf etc... which are really useful, and used in most C apps (including DOOM).
Integrating stb_printf in SnowflakeOS seems like a good idea: it's fully-featured and extensively tested (compared to anything we could hand-roll).
Some pointers:
copy the header to 'libc/include/deps'
create a corresponding source file that includes it in "libc/src/stdio", defining STB_SPRINTF_IMPLEMENTATION as needed, along with other symbols that control the functions included
include the header from "stdio.h", with the same flags except for STB_SPRINTF_IMPLEMENTATION
There's a
printf
function, but nosprintf
,snprintf
etc... which are really useful, and used in most C apps (including DOOM).Integrating stb_printf in SnowflakeOS seems like a good idea: it's fully-featured and extensively tested (compared to anything we could hand-roll).
Some pointers: