meta: rename io module to fx.io namespace

This commit is contained in:
2026-05-02 14:37:29 +01:00
parent 47feee7b1a
commit 274a48a845
21 changed files with 0 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
#include "misc.h"
#include <fx/core/random.h>
void z__fx_io_generate_tmp_filename(char *out, size_t len)
{
static const char *alphabet
= "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
"01234567"
"89+=-_.";
static const size_t alphabet_len = 67;
fx_random_ctx *ctx = fx_random_global_ctx();
for (size_t i = 0; i < len; i++) {
int v = fx_random_next_int64(ctx) % alphabet_len;
out[i] = alphabet[v];
}
out[len - 1] = 0;
}