summaryrefslogtreecommitdiff
path: root/.cursor/rules/hybbx-c.mdc
blob: acd8b086a7cfe8d2099e347befd7b54a1282d0fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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