From 20cb29c2f8c5c87bc590896854a20b1473ceb358 Mon Sep 17 00:00:00 2001 From: "info@mode42.com" Date: Sat, 8 Aug 2026 03:54:55 +0000 Subject: #2 --- .cursor/rules/hybbx-c.mdc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .cursor/rules/hybbx-c.mdc (limited to '.cursor/rules/hybbx-c.mdc') diff --git a/.cursor/rules/hybbx-c.mdc b/.cursor/rules/hybbx-c.mdc new file mode 100644 index 0000000..acd8b08 --- /dev/null +++ b/.cursor/rules/hybbx-c.mdc @@ -0,0 +1,22 @@ +--- +description: C/H coding patterns for HyBBX core and plugins +globs: "**/*.{c,h}" +alwaysApply: false +--- + +# HyBBX C conventions + +```c +/* ✅ Public API in include/hybbx/ */ +hybbx_result_t hybbx_foo_do_thing(hybbx_foo_t *foo, const char *in); + +/* ✅ Booleans from INI / config strings */ +int enabled = hybbx_parse_bool(value, default_value); + +/* ✅ Safe copy */ +hybbx_strlcpy(dst, src, sizeof(dst)); +``` + +- Return `HYBBX_ERR_*` from [include/hybbx/types.h](../../include/hybbx/types.h); `HYBBX_OK` on success. +- Plugin wire code stays in `plugins/` — not `src/core/`. +- Packet radio: TNC/AX.25 in `plugins/packet_radio/`; HBX client to `[circuit]`. -- cgit v1.3.1