The majority of the code in this repository adheres to Google's C++ guidelines. Below are additional rules which we adhere to:
If you're initialising a struct, please use member designators to identify the individual fields:
iota_stor_pack_t pack = {.models = (void **)txs,
.capacity = 5,
.num_loaded = 0,
.insufficient_capacity = false};You can find more information on the capabilities of C99 in this regard here.
When writing a header file in C, put function prototypes inside an extern "C" block like this:
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endifIt will avoid having function symbols mangled leading to linkage errors when used in a C++ project. You can find more information about this here.