Converte símbolos Unicode decorativos dos comentários para ASCII

Substitui barras de caixa (─ ═ │ ┌ ┐ └ ┘ ├ ┤ ┬ ┴), travessões (—),
setas (→ ←), reticências (…), bullets (•), multiplicação (×) e
guillemets (› ‹) por equivalentes ASCII. Acentos portugueses são
preservados.
This commit is contained in:
mguinhos committed 2026-10-20 19:27:33 -03:00
1 parent 1cc0ff9d02
commit 90d47bf8a0
36 files changed
+327 -327

No files matched your search

+4 -4
View File
@@ -9,7 +9,7 @@
/* Código Python gerado por: xxd -i tb_mcp.py > tb_mcp_py.h */
#include "tb_mcp_py.h"
/* ── Singleton ───────────────────────────────────────────────────────────── */
/* -- Singleton --- */
static bool s_module_loaded = false;
static bool ensure_module(void) {
@@ -36,7 +36,7 @@ TB_MCP_API void tb_mcp_deinit(void) {
tb_python_deinit();
}
/* ── Helper: escapa string para literal Python ───────────────────────────── */
/* -- Helper: escapa string para literal Python --- */
static char* py_str(const char* s) {
size_t n = strlen(s);
char* out = malloc(n * 4 + 3);
@@ -60,7 +60,7 @@ static char* py_str(const char* s) {
return out;
}
/* ── Helper genérico: monta e executa chamada Python fn(arg...) ─────────── */
/* -- Helper genérico: monta e executa chamada Python fn(arg...) --- */
static char* py_call(const char* fn, const char* const* args, int n) {
if (!ensure_module()) return strdup("erro: modulo MCP nao carregado");
@@ -108,7 +108,7 @@ static char* py_call(const char* fn, const char* const* args, int n) {
return out ? out : strdup("");
}
/* ── API pública ─────────────────────────────────────────────────────────── */
/* -- API pública --- */
TB_MCP_API char* tb_mcp_ping(const char* url) {
const char* args[] = {url};
return py_call("mcp_ping", args, 1);