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:
1 parent
1cc0ff9d02
commit
90d47bf8a0
36 files changed
+327
-327
No files matched your search
+12
-12
@@ -1,20 +1,20 @@
|
||||
/*
|
||||
* mylib.c — Library de exemplo para testar hot reload no TinyBlocks Editor.
|
||||
* mylib.c - Library de exemplo para testar hot reload no TinyBlocks Editor.
|
||||
*
|
||||
* Blocos incluídos:
|
||||
* Extra.Square — n² de um inteiro
|
||||
* Extra.Cube — n³ de um inteiro
|
||||
* Extra.Clamp — limita valor entre min e max
|
||||
* Extra.Fibonacci — n-ésimo número de Fibonacci
|
||||
* Extra.IsEven — 1 se par, 0 se ímpar
|
||||
* Extra.IntToText — converte inteiro em texto
|
||||
* Extra.Pow — base elevado a exp (inteiros)
|
||||
* Extra.Square - n^2 de um inteiro
|
||||
* Extra.Cube - n^3 de um inteiro
|
||||
* Extra.Clamp - limita valor entre min e max
|
||||
* Extra.Fibonacci - n-ésimo número de Fibonacci
|
||||
* Extra.IsEven - 1 se par, 0 se ímpar
|
||||
* Extra.IntToText - converte inteiro em texto
|
||||
* Extra.Pow - base elevado a exp (inteiros)
|
||||
*
|
||||
* Para compilar:
|
||||
* make mylib
|
||||
*
|
||||
* Para carregar no editor:
|
||||
* Ctrl+O → build/mylib.so ou arraste build/mylib.so para a janela
|
||||
* Ctrl+O -> build/mylib.so ou arraste build/mylib.so para a janela
|
||||
*/
|
||||
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <tinyblocks/tinyblocks.h>
|
||||
|
||||
/* ── Slots reutilizáveis ─────────────────────────────────────────────────── */
|
||||
/* -- Slots reutilizáveis --- */
|
||||
static const TinyBlocks_SlotDesc in_n[] = {{"n", TB_VALUE_INTEGER}};
|
||||
static const TinyBlocks_SlotDesc in_ab[] = {{"a", TB_VALUE_INTEGER},
|
||||
{"b", TB_VALUE_INTEGER}};
|
||||
@@ -34,7 +34,7 @@ static const TinyBlocks_SlotDesc in_clamp[]= {{"val", TB_VALUE_INTEGER},
|
||||
static const TinyBlocks_SlotDesc out_int[] = {{"out", TB_VALUE_INTEGER}};
|
||||
static const TinyBlocks_SlotDesc out_txt[] = {{"out", TB_VALUE_TEXT}};
|
||||
|
||||
/* ── Implementações ──────────────────────────────────────────────────────── */
|
||||
/* -- Implementações --- */
|
||||
static void eval_square(TinyBlocks_Block* self, TinyBlocks* rt) {
|
||||
TinyBlocks_Value v = tb_block_get_input(self, rt, 0);
|
||||
int64_t n = v.kind==TB_VALUE_INTEGER ? v.as.integer : 0;
|
||||
@@ -94,7 +94,7 @@ static void eval_int_to_text(TinyBlocks_Block* self, TinyBlocks* rt) {
|
||||
tb_block_set_output(self, 0, tb_value_text(buf));
|
||||
}
|
||||
|
||||
/* ── Registro da library ─────────────────────────────────────────────────── */
|
||||
/* -- Registro da library --- */
|
||||
static bool mylib_init(TinyBlocks* rt, TinyBlocks_LibraryBlock* lib) {
|
||||
TinyBlocks_TypeBlock* t;
|
||||
|
||||
|
||||
Reference in new issue
Block a user