The simplest example program to show CEC in action
C++ Shell
Latest commit d86a88f Aug 1, 2015 @DrGeoff Make the build.sh just grab the build command out of the source code
comment so that the two can't get out of sync. Make sure that -ldl is
specified in the build command. Make sure g++-4.8 is used (again)

README.md

cec_simplest

The simplest example program to show CEC in action on the Raspberry Pi.

According to sloccount there are only 75 lines of code to get your head around which is a lot simpler than the 1145 contained in the all singing, all dancing, libcec test client.