Skip to content

v0.4.2

Latest

Choose a tag to compare

@github-actions github-actions released this 24 Sep 21:55
· 2 commits to main since this release
b0b55ef

titrmlib v0.4.2

Format strings for titles, list items and labels without linking the C library's printf.

New

  • term_snprintf and term_vsnprintf: format into your own buffer with titrmlib's formatter, e.g. term_snprintf(title, sizeof title, "Password: %s", ssid). They follow C's snprintf rules: at most size - 1 characters plus a terminator, and they return the full length. Using snprintf itself would link CEdev's printf again, about 8 KB.

No API changes. titrm.h now includes <stdarg.h>.

Using titrmlib

  1. Unzip titrmlib-v0.4.2.zip into your CEdev project's lib/ folder, giving lib/titrmlib/.

  2. Add its sources to your project's makefile:

    CFLAGS = -Wall -Wextra -Oz -Ilib/titrmlib/src
    EXTRA_C_SOURCES = $(wildcard lib/titrmlib/src/*.c)
  3. #include "titrm.h" and build with make.

Keep the library inside your project directory: on Windows, CEdev can't build sources reached through ... The calculator needs the CE C libraries.

API reference: https://gavinhsmith.github.io/titrmlib/