Table of Content
Preface; C Is Punk Rock; Q & A (Or, the Parameters of the Book); Standards: So Many to Choose From; Some Logistics; Content Updates;The Environment; Chapter 1: Set Yourself Up for Easy Compilation; 1.1 Use a Package Manager; 1.2 Compiling C with Windows; 1.3 Which Way to the Library?; 1.4 Using Makefiles; 1.5 Using Libraries from Source; 1.6 Using Libraries from Source (Even if Your Sysadmin Doesn't Want You To); 1.7 Compiling C Programs via Here Document; Chapter 2: Debug, Test, Document; 2.1 Using a Debugger; 2.2 Using Valgrind to Check for Errors; 2.3 Unit Testing; 2.4 Interweaving Documentation; 2.5 Error Checking; Chapter 3: Packaging Your Project; 3.1 The Shell; 3.2 Makefiles vs. Shell Scripts; 3.3 Packaging Your Code with Autotools; Chapter 4: Version Control; 4.1 Changes via diff; 4.2 Git's Objects; 4.3 Trees and Their Branches; 4.4 Remote Repositories; Chapter 5: Playing Nice with Others; 5.1 The Process; 5.2 Python Host;The Language; Chapter 6: Your Pal the Pointer; 6.1 Automatic, Static, and Manual Memory; 6.2 Persistent State Variables; 6.3 Pointers Without malloc; Chapter 7: C Syntax You Can Ignore; 7.1 Don't Bother Explicitly Returning from main; 7.2 Let Declarations Flow; 7.3 Cast Less; 7.4 Enums and Strings; 7.5 Labels, gotos, switches, and breaks; 7.6 Deprecate Float; 7.7 Comparing Unsigned Integers; Chapter 8: Obstacles and Opportunity; 8.1 Cultivate Robust and Flourishing Macros; 8.2 Linkage with static and extern; 8.3 The const Keyword; Chapter 9: Text; 9.1 Making String Handling Less Painful with asprintf; 9.2 A Pæan to strtok; 9.3 Unicode; Chapter 10: Better Structures; 10.1 Compound Literals; 10.2 Variadic Macros; 10.3 Safely Terminated Lists; 10.4 Foreach; 10.5 Vectorize a Function; 10.6 Designated Initializers; 10.7 Initialize Arrays and Structs with Zeros; 10.8 Typedefs Save the Day; 10.9 Return Multiple Items from a Function; 10.10 Flexible Function Inputs; 10.11 The Void Pointer and the Structures It Points To; Chapter 11: Object-Oriented Programming in C; 11.1 What You Don't Get (and Why You Won't Miss It); 11.2 Extending Structures and Dictionaries; 11.3 Functions in Your Structs; 11.4 Count References; Chapter 12: Libraries; 12.1 GLib; 12.2 POSIX; 12.3 The GNU Scientific Library; 12.4 SQLite; 12.5 libxml and cURL;Epilogue;Glossary;Bibliography;Colophon;