====== Dies und das... ====== ===== State-Machine ===== * http://stackoverflow.com/questions/133214/is-there-a-typical-state-machine-implementation-pattern ===== Function Calls ===== * [[https://www.csee.umbc.edu/~chang/cs313.s02/stack.shtml|C Function Call Conventions and the Stack]] ===== Überflüssige Includes ===== * http://stackoverflow.com/questions/614794/c-c-detecting-superfluous-includes ===== Reading and writing files/pipes/etc. ===== * http://www.it.uc3m.es/abel/as/MMC/L2/FilesDef_en.html * [[https://stackoverflow.com/questions/5782279/why-does-a-read-only-open-of-a-named-pipe-block|read-only from pipe is blocking]] ===== Type-Casting in C ===== * https://www.tutorialspoint.com/cprogramming/c_type_casting.htm ===== Pointers in C (Kurs) ===== * https://github.com/hartwork/c-kurs-pointers * [[https://www.youtube.com/watch?v=NHmlXEAEl68]], ist Entwickler folgenden Tools: * [[https://github.com/fredoverflow/skorbut-release]] - das Programm visualisiert Zeiger. * [[https://www.geeksforgeeks.org/difference-pointer-array-c/|Difference between pointers and arrays]] ===== Debugging mit Valgrind ===== Mit Valgrind lassen sich Speicherprobleme und Segmentation Faults untersuchen und finden: Unix Systeme liefern [[public_v6:bash|Exit-Code]] 128+Signal wenn ein Signal empfangen wurde. Signal 11 is SIGSEV (i.e. segmentation violation, a memory access bug in your code): 128 + 11 = 139 valgrind --leak-check=full --track-origins=yes --show-reachable=yes --log-file=valgrindlog.txt ./NAME_OF_YOUR_EXECUTABLE -r RUN_NUMBER -u Cmdenv -c NAME_OF_YOUR_CONFIGURATION -n NED_PATH1; NED_PATH2 -l LIB_PATH1 -l LIB_PATH2 --record-eventlog=false --debug-on-errors=false * http://valgrind.org/docs/manual/quick-start.html ===== Unlesbarer C-Code ;-) ===== * [[https://en.wikipedia.org/wiki/International_Obfuscated_C_Code_Contest|International Obfuscated C Code Contest]] * http://www.ioccc.org/years-spoiler.html * http://www.ioccc.org/2006/toledo1/toledo1.c * https://www.quora.com/What-is-the-shortest-and-most-effective-code-ever-written