ztd.vargs

The premiere library for handling text in different encoding forms for C software.

Who Is This Library For?

Ideally?

Nobody.

This is mostly a proof of concept to make a proposal go through ISO/IEC JTC1 SC22 WG14 - Programming Language, C (AKA, C Standards Committee) easier and faster.

But if you’re still curious, well, have a look! It works mostly like va_start, va_arg, and va_end, but so far iterates over all arguments (regardless of whether they were passed statically or not).

How snazzy and cool, 3 arguments iterated over and used!
 1#include <ztd/vargs.hpp>
 2#include <ztd/idk/assert.hpp>
 3
 4int imul3(...) {
 5        ztdc_va_list vl;
 6        ztdc_va_start(vl);
 7        int num0 = ztdc_va_arg(vl, int);
 8        int num1 = ztdc_va_arg(vl, int);
 9        int num2 = ztdc_va_arg(vl, int);
10        ztdc_va_end(vl);
11        return num0 * num1 * num2;
12}
13
14int main() {
15        int result0 = imul3(3, 4, 5);
16        ZTD_ASSERT(result0 == 60);
17        return result0;
18}