]> sigrok.org Git - libsigrokdecode.git/commit
irmp: rework shared library (style, reliability, TODO items)
authorGerhard Sittig <redacted>
Sat, 22 Feb 2020 06:27:58 +0000 (07:27 +0100)
committerGerhard Sittig <redacted>
Sat, 18 Jul 2020 13:29:59 +0000 (15:29 +0200)
commit19a0121b2c45d880dab2362d59e1426a5b287a26
treeb3f204a8950f65f9b25107c220dc0d226b2c65e8
parent53eb681dd5611931b6af949a8c50c22fc65661ac
irmp: rework shared library (style, reliability, TODO items)

Address several style nits in the previous implementation of the PC
library, but keep the core as is to simplify future upstream tracking.

Eliminate camel case identifiers, and in(?)/out prefixes for variables,
only keep s_ for global(?) variables. Fixup whitespace, reduce a little
indentation where appropriate. Separate variable declaration from later
assignments and updates to improve readability. Use C style comments.

Drop initializer values for .bss variables. Decorate the declaration as
well as implementation of routines for symbol export. Improve robustness
of name lookups in the list of known protocols.

Prefer native C language data types in the public API. Normalize data in
the wrapper so that application code need not care. Make the byte buffer
API for IR frame detection optional. The API is limited and overloaded
at the same time, and may need more consideration.

Extend comments in spots which are essential for proper operation, or
which encode non-obvious details of the build system. Control visibility
of public API identifiers on non-Windows platforms, too. Rephrase the
doxygen comments for more formal API documentation. Discuss limitations
in the current implementation. Keep a TODO list in the source code.
irmp/irmp-main-sharedlib.c
irmp/irmp-main-sharedlib.h