Saturday, June 23, 2012

Finite State Machines in C

FSM in C are often implemented through loop (while or for), switch and control variables. This approach has the biggest disadvantage that is almost impossible from the code to understand the original FSM diagram. That's why c-libutl offers simple macros to implement FSM with a 1-to-1 relationship with...

Monday, June 18, 2012

Exception handling in C

Adding exception handling in C is a rather controversial topic. Some think that exceptions are pure evil and should never be considered, others say that those wanting to use exceptions should leave the realm of pure C and fly to C++ (or, even, Java). Others suggest that goto is a perfectly fine way...