summaryrefslogtreecommitdiff
path: root/.cursor/rules/hybbx-c.mdc
diff options
context:
space:
mode:
authorinfo@mode42.com <info@mode42.com>2026-08-08 03:54:55 +0000
committerinfo@mode42.com <info@mode42.com>2026-08-08 03:54:55 +0000
commit20cb29c2f8c5c87bc590896854a20b1473ceb358 (patch)
tree2857f41513a56ad41af97b57362639298aa7f033 /.cursor/rules/hybbx-c.mdc
#2
Diffstat (limited to '.cursor/rules/hybbx-c.mdc')
-rw-r--r--.cursor/rules/hybbx-c.mdc22
1 files changed, 22 insertions, 0 deletions
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]`.
git clone -b <branch> https://cgit.mode42.com/<repo>.git
git clone -b <branch> git://cgit.mode42.com/<repo>.git

info@mode42.com