Index

A note on the digital index

A link in an index entry is displayed as the section title in which that entry appears. Because some sections have multiple index markers, it is not unusual for an entry to have several links to the same section. Clicking on any link will take you directly to the place in the text in which the marker appears.

Symbols

! (exclamation mark), not operator, Test for Files
# (octothorp), preprocessor uses of, Preprocessor Tricks
$ (dollar sign)
$ (CC) variable in make, The Rules
$( ), backtick and, Replacing Shell Commands with Their Outputs
$* variable in make, Setting Variables
$< variable in make, Setting Variables
$@ variable in make, Setting Variables
GDB variables, GDB Variables
indicating value of variables, Setting Variables
& (ampersand)
&& running commands in short-circuit sequence, Makefiles vs. Shell Scripts
( ) (parentheses)
using with macros, Cultivate Robust and Flourishing Macros
variables declared in, just before opening curly brace, Scope
* (asterisk), using with pointers, The Fault Is in Our Stars
- filename to use standard in as input file, Here Documents
-g compiler flag, A Few of My Favorite Flags
-O3 compiler flag, A Few of My Favorite Flags
. (dot), POSIX command to source a script, Replacing Shell Commands with Their Outputs
32-bit systems, Deprecate Float
64-bit systems, Deprecate Float
; (semicolon), ending list of files used by for loop, Use the Shell’s for Loops to Operate on a Set of Files
@ (at sign)
at head of line in make, Makefiles vs. Shell Scripts
in CWEB codes, Literate Code with CWEB
in Doxygen documentation, Doxygen
` (backticks)
replacing command with its output, Replacing Shell Commands with Their Outputs
surrounding commands in gcc, Paths
{ } (curly braces)
for blocks, Cultivate Robust and Flourishing Macros
variables declared in parens just before opening curly brace, Scope

A

abort function, The Context in Which the User Is Working
AC_CHECK_HEADER, adding to configure.ac, Adding testing
AC_CONFIG_FILES macro, The configure Script
AC_INIT macro, The configure Script
AC_OUTPUT macro, The configure Script
AC_PROG_CC_C99 macro, Content variables
Adamson, Chris, C Is Punk Rock
agent-based model of group formation, An Agent-Based Model of Group FormationAn Agent-Based Model of Group Formation
aliasing, Pointers Without malloc
arrays, Structures Get Copied, Arrays Get Aliased
alignment, Glossary
lists of structs, All the Pointer Arithmetic You Need to Know
American Standard Code for Information Exchange (see ASCII)
AM_INIT_AUTOMAKE macro, The configure Script
AM_VARIABLE macro, Content variables
AM_VARIABLE, using to set variable for all compilations or linkings in Automake, Content variables
Anjuta, Use a Package Manager
ANSI C89, Standards: So Many to Choose From, Let Declarations Flow
char size, The Encoding for C Code
declarations at head of block, Let Declarations Flow
variadic functions, Declare Your Function as printf-Style
Visual Studio and, Compiling C with POSIX
wide character type, Unicode Libraries
Apophenia, library of stats functions, Functions in Your Structs
Apple, Use a Package Manager
(see also Mac computers)
Xcode, Use a Package Manager
arithmetic expansion in shells, fc
arrays
aliasing, Structures Get Copied, Arrays Get Aliased
calling function getting pointer to returned array, Structures Get Copied, Arrays Get Aliased
copying, using memmove, Structures Get Copied, Arrays Get Aliased
indices as integers, Cast Less
initializing with zeros, Initialize Arrays and Structs with Zeros
notating arrays and their elements, All the Pointer Arithmetic You Need to Know
pointers and, Automatic, Static, and Manual Memory
setting size at runtime, Set Array Size at Runtime
ASCII (American Standard Code for Information Interchange), Unicode, Glossary
asprintf function, Making String Handling Less Painful with asprintfExtending Strings with asprintf, Functions with Generic Inputs
better strings with, Making String Handling Less Painful with asprintf
constant strings, Constant Strings
extending strings, Extending Strings with asprintf
improved security with, Security
Sasprintf macro, Extending Strings with asprintf, A Pæan to strtok
assembly code, Labels, gotos, switches, and breaks
assert macro, The Context in Which the User Is Working
assertion-type macro returning if assertion fails, Cultivate Robust and Flourishing Macros
assignment
copying and aliasing, Pointers Without malloc
item of one type to item of another type, Cast Less
atol (ASCII to long int), Smuggling Data Structures Across the Border
attribute directive, Declare Your Function as printf-Style
automatic allocation, Automatic, Static, and Manual Memory, Pointers Without malloc, Linkage with static and extern, Glossary
arrays and, Structures Get Copied, Arrays Get Aliased
on the stack, malloc and Memory-Twiddling
Autotools, Compiling C Without POSIX, Using Libraries from Source, Packaging Your Project
Autoconf, Automake, Autoscan, and Libtool, Packaging Your Code with Autotools
compiling and linking Python function, Compiling and Linking
conditional Python subdirectory for Automake, The Conditional Subdirectory for Automake
defined, Glossary
Libtool adding compiler flags for runtime linking, Runtime Linking
packaging code with, Packaging Your Code with AutotoolsMore Bits of Shell
describing makefile in makefile.am, Describing the Makefile with Makefile.am
example, packaging Hello World, An Autotools Demo
runtime linking of library on the system, Linking
talking to Python Distutils, Distutils Backed with AutotoolsDistutils Backed with Autotools
auxiliary variables, Preprocessor Tricks

B

backing up .c files, fc
backtraces, Using a Debugger
listing of stack of frames, Using a Debugger
Valgrind, Using Valgrind to Check for Errors
base-plus-offset, All the Pointer Arithmetic You Need to Know, Extending Structures and Dictionaries
bash
arithmetic expansion on integers, fc
replacing with preferred shell each time it starts, fc
Basic Linear Algebra Subprograms (BLAS) library, Paths
Benford’s Law, Use the Shell’s for Loops to Operate on a Set of Files
Benford’s law, Glossary
Berkeley Software Distribution (BSD), The POSIX Standard, Glossary
bin (form variable), Form variables
blank tokens, A Pæan to strtok
block-of-memory versus list approach, Extending Structures and Dictionaries
_Bool type, The char const ** Issue
Boolean, Glossary
Bourne Shell, Setting Variables
break statements, switch
BSD (Berkeley Software Distribution), The POSIX Standard, Glossary

C

C shell, Setting Variables
C++, Standards: So Many to Choose From, Standards: So Many to Choose From, Functions in Your Structs
casting in, Cast Less
extending a type, Extending a Structure
gcc producing compatible object files for, Let Declarations Flow
mangling of code by compiler, Using a Debugger
Microsoft Visual Studio compiler, Compiling C with POSIX
operator overloading, Overloaded with Operator Overloading
C11, Standards: So Many to Choose From, Let Declarations Flow
anonymous elements in structures, C, with fewer seams
calling function getting copy of returned value, Structures Get Copied, Arrays Get Aliased
char size, The Encoding for C Code
complex double, _Generic
declarations, placement of, Let Declarations Flow
gcc compiler flag for code, A Few of My Favorite Flags
_Generic keyword, _Generic
not explicitly returning from main, Don’t Bother Explicitly Returning from main
_Thread_local keyword, Reporting Errors
wide character type, Unicode Libraries
C89 (see ANSI C89)
C99 (see ISO C99)
call graphs, Doxygen, Glossary
callback functions, Functions with Generic Inputs, Glossary
casting less, Cast Less
CC variable, setting with Autoconf, Content variables
central repository (Git), Remote Repositories
cetology, A Pæan to strtok, Glossary
CFLAGS environment variable, Using a Debugger
makefiles versus other systems, Makefiles vs. Shell Scripts
setting value, Setting Variables
CFLAGs environment variable
-include allheads.h, The Unified Header
char const** issue, The char const ** Issue
check (form variable), Form variables
chsh command to change shells, fc
Church, Alonso, Extending Structures and Dictionaries
Clang, The POSIX Standard, Use a Package Manager
$* variable, A Few of My Favorite Flags
-g compiler flag, A Few of My Favorite Flags
-xc compiler flag, indicating C code, Compiling from stdin
flag for including headers, Include Header Files from the Command Line
LDADD=-Llibpath -Wl,-Rlibpath command, Runtime Linking
CLASSPATH environment variable (Java), Using Libraries from Source (Even if Your Sysadmin Doesn’t Want You To)
closedir function, Functions with Generic Inputs
code examples from this book, Using Code Examples
code points, Unicode
Code::blocks, Use a Package Manager, Compiling C Without POSIX
command-line arguments, parsing with getopt, switch
commands
command -v, full path to a command, fc
replacing shell commands with their outputs, Replacing Shell Commands with Their Outputs
comments, Doxygen documentation in, Doxygen
commit objects, Git’s Objects
branch diffs applied to existing commit object, Merging
diff/snapshot duality, Git’s Objects
listing with git log, Git’s Objects
showing sequence of changes between commits, Git’s Objects
writing new object to Git repository, Git’s Objects
compilation, setting up for, Set Yourself Up for Easy CompilationCompiling from stdin
compiling C with Windows, Compiling C with WindowsCompiling C Without POSIX
compiling C with POSIX, Compiling C with POSIX
POSIX for Windows, POSIX for Windows
without POSIX, Compiling C Without POSIX
libraries, Which Way to the Library?Runtime Linking
using libraries from source, Using Libraries from SourceCompiling C Programs via Here Document, Compiling C Programs via Here DocumentCompiling from stdin
using makefiles, Using MakefilesUsing Libraries from Source
using package manager, Use a Package Manager
packages to obtain, Use a Package Manager
compiler flags, Which Way to the Library?
gcc and Clang, including headers, Include Header Files from the Command Line
recommended for use every time, A Few of My Favorite Flags
compilers, Use a Package Manager, Glossary
constant-checking, overriding, Tension
gcc and clang, The POSIX Standard
Microsoft C compiler, Compiling C with POSIX
complex keyword, declarations with, _Generic
complex types, _Generic
compound literals, Compound LiteralsInitialization via Compound Literals
initialization via, Initialization via Compound Literals
using variadic macro to produce, Safely Terminated Lists
config.h header, The configure Script
configuration file for Doxygen, Doxygen
configure script, tarball for distribution with, An Autotools Demo
configure.ac script, An Autotools Demo, The configure Script
adding more shell code to, More Bits of Shell
for Python building task, The Conditional Subdirectory for Automake
configure.scan file, An Autotools Demo
const keyword, The const KeywordThe char const ** Issue
char const** issue, The char const ** Issue
const pointer as input to const-less function, Tension
depth and elements of const struct, Depth
no lock on data being pointed to, The const Keyword
noun-adjective form, Noun-Adjective Form
constant strings, Constant Strings
content variables, Describing the Makefile with Makefile.am, Content variables
copying, Pointers Without malloc
contents of structs with equals sign, Implementing a Dictionary
pointer contents, Structures Get Copied, Arrays Get Aliased
structure contents, Structures Get Copied, Arrays Get Aliased
copyright, The POSIX Standard
coverage, unit tests, Coverage
cross references to other documented elements in Doxygen (\ref), Doxygen
Ctrl-A command key, using with GNU Screen, Test for Files
cURL, libxml and cURLlibxml and cURL
cut and paste feature in multiplexers, Test for Files
CWEB, An Agent-Based Model of Group Formation
literate code with, Literate Code with CWEB
Cygwin
compiling C with POSIX, Compiling C with POSIX
compiling C without POSIX, Compiling C Without POSIX
installing, POSIX for Windows
cygwin1.dll library of POSIX functions, Compiling C with POSIX

D

data types
assigning item of one type to item of another type, Cast Less
translation between host language and C data types, The Wrapper Function
debuggers, Use a Package Manager, Glossary
(see also gdb)
starting debugger in Valgrind, Using Valgrind to Check for Errors
debugging, Debug, Test, Document
GDB variables, GDB Variables
symbols for, adding with -g compiler flag, A Few of My Favorite Flags
using a debugger, Using a DebuggerUsing Valgrind to Check for Errors
GDB variables, GDB Variables
printing your structures, Print Your Structures
using Valgrind to check for errors, Using Valgrind to Check for ErrorsUnit Testing
declarations
occurring as needed, Let Declarations Flow
deep copies, Structures Get Copied, Arrays Get Aliased, Glossary
dependencies, checked in make target call, The Rules
design rule espoused throughout The Design of Everyday Things, The Fault Is in Our Stars
designated initializers, Designated InitializersInitialize Arrays and Structs with Zeros, Implementing a Dictionary
dictionary, implementing, Implementing a DictionaryImplementing a Dictionary
diff files
commit objects and, Git’s Objects
stored by Git program, Git’s Objects
diff program, Changes via diff
dispatch function, Functions in Your Structs
DIST boilerplate make scripts, Automake, Form variables
distributed revision control systems, Version Control
Distutils, Compiling and Linking
backed with Autotools, Distutils Backed with Autotools
dlopen function, Linking
dlsym function, Linking
documentation
CWEB, Literate Code with CWEB, An Agent-Based Model of Group Formation
interweaving into code, Interweaving Documentation
using Doxygen, Doxygen
dot function, using with different input types, _Generic
double delimiters, ignored by strtok, A Pæan to strtok
double type, using instead of float, Deprecate Float
double usage, avoiding, Cultivate Robust and Flourishing Macros
Doxygen, Use a Package Manager, Doxygen
syntax, Doxygen

E

Eclipse, Use a Package Manager, Compiling C Without POSIX
EDITOR environment variable, Git’s Objects
ellipsis (...) and __VA_ARGS__, Variadic Macros
Emacs, Use a Package Manager
encoding, Glossary
Enter key, repeating last command in GDB, GDB Variables
enums, advantages and disadvantages of, Enums and Strings
environment variables, Setting Variables, Glossary
copy sent to child program on use of fork system call, Replacing Shell Commands with Their Outputs
for paths, Paths
erf (error) function, Which Way to the Library?
error checking, Error CheckingHow Should the Error Indication Be Returned?
and context in which user is working, The Context in Which the User Is Working
and user’s involvement in the error, What Is the User’s Involvement in the Error?
method by which error indication is returned, How Should the Error Indication Be Returned?
errors
macro for dealing with, Variadic Macros
reporting, Reporting Errors
events, mouse and keyboard, GLib
expansions, Replacing Shell Commands with Their Outputs, Cultivate Robust and Flourishing Macros
of globs, in Zsh, fc
Extensible Markup Language (see XML)
extern keyword, Linkage with static and extern
external linkage, Linkage with static and extern
external pointers, Smuggling Data Structures Across the Border

F

fall-through, switch
fast-forward (Git), Merging
making sure your push to remote branch will be fast forwarded, Remote Repositories
fc (fix) command, fc
Fibonacci sequence, generated by state machine, Persistent State Variables
files, getting count of, on POSIX-standard systems, Paths
filesystems, POSIX for Windows
find / -type f | wc -l command for POSIX-standard systems, Paths
Fink, Use a Package Manager
fix command (fc), fc
float type, reasons not to use, Deprecate FloatDeprecate Float
floating-point data, NaN marker to annotate, switch
floating-point numbers, Deprecate Float, Glossary
fopen function, Enums and Strings
for loops, Labels, gotos, switches, and breaks
shell, using to operate on set of files, Use the Shell’s for Loops to Operate on a Set of Files
streamlining using fact that p++ means step to next pointer, All the Pointer Arithmetic You Need to Know
foreach, Foreach
fork system call, Replacing Shell Commands with Their Outputs
form variables, Describing the Makefile with Makefile.am
frames, Automatic, Static, and Manual Memory, Glossary
frames, stack of, Using a Debugger
free function, Automatic, Static, and Manual Memory
vectorizing, Vectorize a Function
functions
defining to run before or after a command in GDB, Print Your Structures
documenting with Doxygen, Doxygen
flexible inputs, Flexible Function InputsPolishing a Dull Function
declaring functions as printf-style, Declare Your Function as printf-Style
optional and named arguments, Optional and Named Arguments
polishing a dull function, Polishing a Dull FunctionPolishing a Dull Function
frame, Automatic, Static, and Manual Memory
generating call graphs for, Doxygen
in structures, Functions in Your StructsFunctions in Your Structs
pointer to function type, Typedef as a teaching tool
profiling, Print Your Structures
returning multiple items from, Return Multiple Items from a FunctionReporting Errors
reporting errors, Reporting Errors
returning structs but not arrays, Structures Get Copied, Arrays Get Aliased
vectorizing, Vectorize a Function
with generic inputs, Functions with Generic InputsFunctions with Generic Inputs
wrapper functions to call C from other languages, The Wrapper Function

G

-g flag, using to include debugging symbols, Using a Debugger
gcc (GNU compiler collection), The POSIX Standard, Use a Package Manager
--ms-extensions flag, C, with fewer seams
-xc flag, indicating C code, Compiling from stdin
attribute to decle\are function as printf-style, Declare Your Function as printf-Style
compiler flags recommended for constant use, A Few of My Favorite Flags
Cygwin, POSIX-linked versus MinGW version, Compiling C Without POSIX
environment variables for paths, Paths
flag for including headers, Include Header Files from the Command Line
full command line, linking a library, Which Way to the Library?
included with Cygwin, Compiling C with POSIX
LDADD=-Llibpath -Wl,-Rlibpath command, Runtime Linking
__thread keyword, _Thread_local and static variables
gcov, Coverage
gdb (GNU debugger), Use a Package Manager, Using a DebuggerUsing Valgrind to Check for Errors, Glossary
experimenting with, Using a Debugger
printing your structures, Print Your StructuresUsing Valgrind to Check for Errors
variables, GDB Variables
-gdbinit, macros defined in, Using a Debugger
generic inputs, functions with, Functions with Generic InputsFunctions with Generic Inputs
generic structures, Generic StructuresGeneric Structures
_Generic keyword, _Generic_Generic
overloading via, _Generic
getenv function, Setting Variables
getopt function, switch
Gettext, The Sample Code
get_strings function, Making String Handling Less Painful with asprintf
Git program, Git’s ObjectsThe Stash
central repository, Remote Repositories
copying a repository via git clone, Git’s Objects
displaying metadata with git log, Git’s Objects
git add changefile or git add -u command, Git’s Objects
git commit --amend -a command, Git’s Objects
git commit -a -m command, Git’s Objects
GUIs for, Trees and Their Branches
merging
committing merges in non-fast-forward, Merging
rebase, The Rebase
storing unsaved work in stash, The Stash
taking working directory back to state when you last checked out, The Stash
trees and their branches, Trees and Their Branches
creating a new branch, Trees and Their Branches
merging, Merging
viewing diffs with git diff, Git’s Objects
GLib, GLib
error-handling system with GError type, How Should the Error Indication Be Returned?
linked lists, Print Your Structures
debugging, Print Your Structures
wrappers to iconv and Unicode manipulation tools, Unicode Libraries
global variables, Glossary
enums as, Enums and Strings
glyphs, Glossary
GNU (Gnu’s Not Unix), The POSIX Standard, Glossary
GNU Autoconf macro archive, More Bits of Shell
GNU debugger (see gdb)
GNU Scientific Library (see GSL)
GNU Screen, Test for Files
Gnuplot, An Agent-Based Model of Group Formation
goto
reasons it’s considered harmful, Labels, gotos, switches, and breaks
reconsidered for limited use, goto Considered
gprof, Use a Package Manager
Graphviz, Doxygen
grep
-C flag to GNU grep, Coverage
group formation, agent-based model of, An Agent-Based Model of Group FormationAn Agent-Based Model of Group Formation
GSL (GNU Scientific Library), The GNU Scientific LibrarySQLite, Glossary
complex and vector types, _Generic
gcc compiler flags for, Paths
getting as source code and setting up, Using Libraries from Source
vector and matrix objects, Pointers Without malloc

H

hashes, GLib
character-frequency hash, Generic Structures
HAVE_PYTHON variable, The Conditional Subdirectory for Automake
HAVE_STRDUP macro, Constant Strings
header files
AC_CHECK_HEADER macro,, The configure Script
config.h, The configure Script, The configure Script
including from command line, Include Header Files from the Command Line
unified header, The Unified Header
HEADERS boilerplate make scripts, Automake, Form variables
heap, Automatic, Static, and Manual Memory, Glossary
here documents, Here Documents
compiling C programs via, Compiling C Programs via Here DocumentCompiling from stdin
hexadecathorp ##, Preprocessor Tricks

I

-I compiler flag, adding given path to include search path, Paths
icc (Intel C compiler), A Few of My Favorite Flags
LDADD=-Llibpath -Wl,-Rlibpath command, Runtime Linking
iconv function, Unicode Libraries
IDEs (integrated development environments), Set Yourself Up for Easy Compilation
Code::block and Eclipse, Compiling C Without POSIX
recommendations for, Use a Package Manager
if statements, using test shell command in, Test for Files
if/else statements as alternatives to switch, switch
if/then shell syntax and test, folding into a makefile, Makefiles vs. Shell Scripts
#ifdef directive, Using a Program as a Library
iff (if and only if), Test for Files, The Conditional Subdirectory for Automake
#ifndef directive, Using a Program as a Library
ill-conditioned data, Deprecate Float
#include directives, Which Way to the Library?
include (form variable), Form variables
-include flag, gcc and Clang, Include Header Files from the Command Line
index, changes bundled into Git commit object, Git’s Objects
inline keyword, Noun-Adjective Form
integrated development environments (see IDEs)
integration tests, Unit Testing, Glossary
interface functions, Object-Oriented Programming in C
interfacing with other languages, Playing Nice with OthersDistutils Backed with Autotools
data structures, Smuggling Data Structures Across the Border
process, The Process
Python host, Python HostDistutils Backed with Autotools
compiling and linking, Compiling and Linking
conditional subdirectory for Automake, The Conditional Subdirectory for Automake
Distutils backed with Autotools, Distutils Backed with Autotools
wrapper functions, The Wrapper Function
writing to be read by nonnatives, Writing to Be Read by Nonnatives
intermediate variables, higher level of precision for, Deprecate Float
internal linkage, Linkage with static and extern
intmax_t, Deprecate Float
intptr_t type, Smuggling Data Structures Across the Border
ISO C99, Q & A (Or, the Parameters of the Book), Standards: So Many to Choose From, Content variables
calling function getting copy of returned value, Structures Get Copied, Arrays Get Aliased
char size, The Encoding for C Code
complex double, _Generic
compound literals, variable-length macros, and designated initializers, Better Structures
declarations, placement of, Let Declarations Flow
error function, erf, Which Way to the Library?
making text more human readable, Let Declarations Flow
not explicitly returning from main, Don’t Bother Explicitly Returning from main
ISO/IEC 8859, Unicode

J

jumps
single jump, use of, goto Considered

K

K & R standard (circa 1978), Standards: So Many to Choose From
Kate, Use a Package Manager
kDevelop, Use a Package Manager
Kerrighan, Brian, Standards: So Many to Choose From, All the Pointer Arithmetic You Need to Know
key/value pair, object representing, Implementing a Dictionary
keyboard events, GLib
Knuth, Donald, Literate Code with CWEB
Korn shell, POSIX for Windows
Ksh, fc

L

-l (library) compiler flag, Which Way to the Library?
-L compiler flag,adding to library search path, Paths
labels, Labels, gotos, switches, and breaks
switch function jumping to appropriate label, switch
lambda calculus, Extending Structures and Dictionaries
-lc compiler flag, Which Way to the Library?
LDADD variable, Content variables
LDLIBS variable, Makefiles vs. Shell Scripts, Content variables
LD_LIBRARY_PATH environment variable, Runtime Linking
lib (form variable), Form variables
libglib.dll, shipped with Cygwin, Compiling C Without POSIX
libiberty library, Making String Handling Less Painful with asprintf
libraries, Librarieslibxml and cURL, Glossary
checking for, AC_CHECK_LIB macro, The configure Script
common format for, Object-Oriented Programming in C
distribution of, copyright and, The POSIX Standard
generating shared library via Libtool, Adding testing
GLib, GLib
GSL (GNU Scientific Library), The GNU Scientific LibrarySQLite
libxml and cURL, libxml and cURLlibxml and cURL
paths to, Paths
POSIX, POSIX_Thread_local and static variables
recommended, Use a Package Manager
setting variable listing libraries to link to, Which Way to the Library?
SQLite, SQLiteThe Queries
Unicode, Unicode Libraries
using from source, Using Libraries from Source
without sysadmin permission, Using Libraries from Source (Even if Your Sysadmin Doesn’t Want You To)
using in compilation, Which Way to the Library?Runtime Linking
compiler flags, A Few of My Favorite Flags
paths, Paths
runtime linking of, Runtime Linking
verifying presence of with Autoconf, The configure Script
writing your own, Epilogue
LIBRARIES boilerplate make scripts, Automake, Form variables
Libtool
assisting Automake, Packaging Your Code with Autotools
generating shared libraries via, Adding testing
setup with LT_INIT macro, The configure Script
Libxml, Unicode Libraries
libxml, libxml and cURLlibxml and cURL
LibXML2, compiler flags for, Paths
licensing
BSD and GNU, The POSIX Standard
GPL-like license for cygwin1.dll, Compiling C with POSIX
limits.h file, Deprecate Float
linked lists, GLib
debugging code for GLib linked lists, Print Your Structures
displaying in GDB, Print Your Structures
linker, Which Way to the Library?, Glossary
linking
C library to be opened by host language, Linking
static and shared libraries, Runtime Linking
with static and extern, Linkage with static and extern
Linux, Glossary
gcc environment variables for paths, Paths
package manager, Use a Package Manager
lists
named, Extending Structures and Dictionaries
safely terminated, Safely Terminated Lists
literate programming, Literate Code with CWEB
localstring_to_utf8 function, The Sample Code
long double, Deprecate Float
long int, Deprecate Float
longjmp function, goto Considered
LTLLIBRARIES boilerplate make scripts, Automake, Form variables
LT_INIT macro, The configure Script

M

m4 language, The configure Script
Mac computers
BSD system, POSIX for Windows
c99 variable, specially-hacked version of gcc, A Few of My Favorite Flags
gcc environment variables for paths, Paths
package managers, Use a Package Manager
Macports, Use a Package Manager
macros, Glossary
C preprocessor, Literate Code with CWEB
C preprocessor macros, using in GDB, Print Your Structures
capitalization of names, Preprocessor Tricks
checking for additional Autoconf macros in GNU archive, More Bits of Shell
checking for errors, Reporting Errors
cleanly extending strings, Extending Strings with asprintf
cultivating robust and flourishing macros, Cultivate Robust and Flourishing MacrosPreprocessor Tricks
dealing with errors, The Context in Which the User Is Working
displaying linked list in GDB, Print Your Structures
GLib, Unit Testing
m4 macros for Autoconf, The configure Script
use of # (octothorpe), turning input code into a string, Preprocessor Tricks
variadic, Variadic Macros
main function, Using a Debugger
explicitly returning from, not bothering with, Don’t Bother Explicitly Returning from main
make, Use a Package Manager
make program, Using Makefiles
built-in variables, Setting Variables
GNU make, building .o object file from .c source code file, The Rules
make distcheck command, An Autotools Demo
POSIX-standard make, compiling .o object file from .c source code file, The Rules
Makefile.am file
adding necessary information to, Adding makefile bits
describing the makefile in, Describing the Makefile with Makefile.am
for root directory of project with Python subdirectory, The Conditional Subdirectory for Automake
makefiles, Using MakefilesUsing Libraries from Source
for pthreads and GLib, The pthreads checklist
generating automatically with Automake, Packaging Your Code with Autotools
generation with Autotools, Packaging Your Project
rules for, The Rules
setting variables, Setting Variables
using nonstandard shell, fc
versus shell scripts, Makefiles vs. Shell ScriptsPackaging Your Code with Autotools
malloc function, Automatic, Static, and Manual Memory
asprintf function and, Making String Handling Less Painful with asprintf
avoiding bugs related to malloc by not using it, malloc and Memory-Twiddling
memory allocated via, Automatic, Static, and Manual Memory
pointers without, Pointers Without malloc
returning char* pointer requiring casting, Cast Less
using in string setup, Making String Handling Less Painful with asprintf
man command, Using Libraries from Source (Even if Your Sysadmin Doesn’t Want You To)
manual (see man command)
manual allocation, Automatic, Static, and Manual Memory, Linkage with static and extern
defined, Glossary
manual memory, malloc and Memory-Twiddling
master tag, Git, Git’s Objects
math functions, including and linking to library of, Which Way to the Library?
matrix and vector types in GSL library, C, with fewer seams
mean and variance calculators, Deprecate Float
memmove function, copying an array, Structures Get Copied, Arrays Get Aliased
memory leaks, Extending Strings with asprintf
checking for, using Valgrind, Using Valgrind to Check for Errors
memory management
automatic, static, and manual memory, Automatic, Static, and Manual Memory
malloc and memory-twiddling, malloc and Memory-Twiddling
types of memory models, Linkage with static and extern
using Valgrind for, Using Valgrind to Check for Errors
merges, Git repository branches, Merging
Message Passing Interface (MPI) library, Easy Threading with Pthreads
metadata, project, displaying in Git program, Git’s Objects
Microsoft
Subsystem for Unix-based Application (SUA), POSIX for Windows
MinGW (Minimalist GNU for Windows), Compiling C Without POSIX
Mingw32 compiler, Compiling C Without POSIX
mmap, using for gigantic data sets, Using mmap for Gigantic Data SetsUsing mmap for Gigantic Data Sets
mouse events, GLib
MSYS tool, Compiling C Without POSIX
multibyte encoding, Unicode Libraries, Glossary
multibyte-to-wide conversions, Unicode Libraries
multiplexers, Test for Files
mutexes, Easy Threading with Pthreads, Glossary
protecting threaded resources with, Protect threaded resources with mutexes
wiring up in pthreads example, The example

N

named lists, Extending Structures and Dictionaries
NaN (Not-a-Number), goto Considered, Glossary
marking exceptional numeric values with NaNs, switch
NaN boxing, switch
nano text editor, Use a Package Manager
narrative in documentation, The narrative
nodes in tree data structures, Trees and Their Branches
noinst (form variable), Form variables
Not-a-Number (see NaN)

O

-o (output) compiler flag, Which Way to the Library?
object file, Glossary
object-oriented programming in C, Object-Oriented Programming in CAn Agent-Based Model of Group Formation
counting references, Count ReferencesAn Agent-Based Model of Group Formation
agent-based model of group formation, An Agent-Based Model of Group FormationAn Agent-Based Model of Group Formation
substring object (example), Example: A Substring ObjectExample: A Substring Object
extending structures and dictionaries, Extending Structures and DictionariesBase Your Code on Pointers to Objects
extending a structure, Extending a StructureImplementing a Dictionary
implementing a dictionary, Implementing a DictionaryImplementing a Dictionary
functions in your structs, Functions in Your StructsFunctions in Your Structs
what you don’t get, What You Don’t Get (and Why You Won’t Miss It)
overloaded with operator overloading, Overloaded with Operator Overloading
scope, ScopePrivate struct elements
objects
defined, Glossary
pointers to, Base Your Code on Pointers to Objects
object_fn form, functions related to objects, Functions in Your Structs
obstacles and opportunities, Obstacles and OpportunityThe char const ** Issue
const keyword, The const KeywordThe char const ** Issue
linkage with static and extern, Linkage with static and extern
preprocessor tricks, Preprocessor TricksPreprocessor Tricks
using robust and flourishing macros, Cultivate Robust and Flourishing MacrosPreprocessor Tricks
offset macro, All the Pointer Arithmetic You Need to Know
ok_array struct, A Pæan to strtok
ok_array_new function, A Pæan to strtok, The Sample Code
opaque pointers, Smuggling Data Structures Across the Border, Glossary
open system call, Enums and Strings
opendir function, Functions with Generic Inputs
operating systems
displaying Unicode, Unicode
standard location for library installation, Paths
operator overloading, Overloaded with Operator Overloading
_Generic keyword, _Generic_Generic
optimization levels, -O3 compiler flag, A Few of My Favorite Flags

P

package managers, Use a Package Manager
packages
library packages separated into subparts, Use a Package Manager
recommended for installation, Use a Package Manager
packaging a project, Packaging Your ProjectMore Bits of Shell
makefiles versus shell scripts, Makefiles vs. Shell Scripts
Python Distutils backed with Autotools, Distutils Backed with Autotools
using Autotools, Packaging Your Code with AutotoolsMore Bits of Shell
using the shell, The ShellMakefiles vs. Shell Scripts
parse function, breakpoint in, Print Your Structures
patch command, Changes via diff
PATH environment variable, Using Libraries from Source (Even if Your Sysadmin Doesn’t Want You To)
paths, Paths
order of compiler flags specifying, Paths
persistent state variables, Persistent State Variables
-pg compiler flag, gcc or icc, Print Your Structures
phead and pnext macros, Print Your Structures
pkg-config, Use a Package Manager
modifying makefile to specify libraries and their locations, Using Libraries from Source
no knowledge of runtime paths, Runtime Linking
repository of flags and locations self-reported by packages, Paths
runtime linking of libraries, Linking
pkgbin form variable, Form variables
pointer decay, Functions in Your Structs
pointer-to-pointer-to-const, problems with, The char const ** Issue
pointers, Your Pal the PointerTypedef as a teaching tool
* in pointer declaration and use, The Fault Is in Our Stars
automatic, static, and manual memory, Automatic, Static, and Manual Memory
char* and void pointers returned by malloc, Cast Less
const, as input to const-less function, Tension
freeing, checking error in, Using Valgrind to Check for Errors
memory type, Automatic, Static, and Manual Memory
persistent state variables, Persistent State Variables
pointer arithmetic, All the Pointer Arithmetic You Need to KnowTypedef as a teaching tool
typedef as teaching tool, All the Pointer Arithmetic You Need to Know
referencing data across files, Smuggling Data Structures Across the Border
to objects, Base Your Code on Pointers to Objects
without malloc, Pointers Without malloc
copying structures, aliasing arrays, Structures Get Copied, Arrays Get Aliased
POSIX (Portable Operating System Interface), The POSIX Standard, POSIX_Thread_local and static variables, Glossary
compiling C with, Compiling C with POSIX
compiling C without, on Windows, Compiling C Without POSIX
gcc compiler flag for code, A Few of My Favorite Flags
mmap, using for gigantic data sets, Using mmap for Gigantic Data SetsUsing mmap for Gigantic Data Sets
pthreads, Easy Threading with Pthreads_Thread_local and static variables
example, The example_Thread_local and static variables
protecting threaded resources with mutexes, Protect threaded resources with mutexes
pthreads checklist, The pthreads checklistProtect threaded resources with mutexes
_Thread_local and static variables, _Thread_local and static variables
standard shell, The Shell
using on Windows, POSIX for Windows
POSIX threads (see pthreads)
preprocessor, Glossary
preprocessor tricks, Preprocessor TricksPreprocessor Tricks
print command, verbose, Using a Debugger
printf function
%g as format speficier, Deprecate Float
getting documentation for, Using Libraries from Source (Even if Your Sysadmin Doesn’t Want You To)
printing val to 20 significant decimal digits, Deprecate Float
using %li or %ji instead of %i format specifier, Deprecate Float
variable number of inputs, Flexible Function Inputs
printf-style, declaring your function as, Declare Your Function as printf-Style
processes, Glossary
process_dir function, Functions with Generic Inputs
profilers, Glossary
profiling, Print Your Structures
PROGRAMS boilerplate make scripts, Automake, Form variables
pthreads, Easy Threading with Pthreads_Thread_local and static variables, Glossary
checklist, The pthreads checklistProtect threaded resources with mutexes
example of use, The example_Thread_local and static variables
protecting threaded resources with mutexes, Protect threaded resources with mutexes
_Thread_local and static variables, _Thread_local and static variables
punk rock, Epilogue
“Punk Rock Languages: A Polemic”, C Is Punk Rock
Python
aliasing in, Pointers Without malloc
here documents, Here Documents
host language interfacing with C, Python HostDistutils Backed with Autotools
compiling and linking, Compiling and Linking
conditional Python subdirectory for Automake, The Conditional Subdirectory for Automake
Distutils and Autotools, Distutils Backed with AutotoolsDistutils Backed with Autotools
using here documents, Here Documents
PYTHON variable, The Conditional Subdirectory for Automake

R

random number generator (RNG), The GNU Scientific Library, Glossary
Read the manual. (RTFM), Glossary
readdir function, Functions with Generic Inputs
rebases in Git, The Rebase
remote repositories, Remote Repositories
restrict and inline keywords, Noun-Adjective Form
revision control systems (RCSes), Version Control
Ritchie, Dennis, Standards: So Many to Choose From, All the Pointer Arithmetic You Need to Know
RNG (see random number generator)
root directory, making for yourself, Using Libraries from Source (Even if Your Sysadmin Doesn’t Want You To)
RTFM (Read the manual.), Packaging Your Code with Autotools, Glossary
runtime linking, Runtime Linking, Linking

S

Sapir-Whorf hypothesis, Object-Oriented Programming in C, Glossary
Sasprintf macro, Extending Strings with asprintf, A Pæan to strtok
scope, ScopePrivate struct elements
defined, Glossary
private struct elements, Private struct elements
scripts, Glossary
Secure Hash Algorithm (SHA), Glossary
segfault (segmentation fault), Glossary
seq (sequence) command, Use the Shell’s for Loops to Operate on a Set of Files
setup.py file to control production of Python package, Distutils Backed with Autotools
SHA (Secure Hash Algorithm), Glossary
shared libraries
linkder flags for building, The Rules
runtime linking of, Runtime Linking
shell scripts
makefiles versus, Makefiles vs. Shell ScriptsPackaging Your Code with Autotools
script for coverage testing, Coverage
SHELL variable, fc
shells, POSIX for Windows, The ShellMakefiles vs. Shell Scripts, Glossary
Bourne Shell and C shell grammar, Setting Variables
fc (fix) command, fc
here documents, Here Documents
provided by MinGW, Compiling C Without POSIX
replacing commands with their outputs, Replacing Shell Commands with Their Outputs
startup script, Git’s Objects
testing for files, Test for Files
trying a new shell, fc
using shell’s for loops to operate on set of files, Use the Shell’s for Loops to Operate on a Set of Files
sizeof operator, Preprocessor Tricks, Initialization via Compound Literals
limits of, Preprocessor Tricks
snapshot of project, commit object as, Git’s Objects
snprintf function, Security
source files needed by Automake, Content variables
spaces in filenames, shells and, fc
sprintf function, Making String Handling Less Painful with asprintf
SQL (Structured Query Language), SQLite, Glossary
SQLite, SQLiteThe Queries
queries, The Queries
stack, Glossary
stack of frames, Using a Debugger, Automatic, Static, and Manual Memory
standard C library, Set Yourself Up for Easy Compilation
additions to, POSIX for Windows
linking, Which Way to the Library?
standards, Standards: So Many to Choose From
stash objects, The Stash
state machine, Persistent State Variables
static allocation, Glossary
static keyword, Functions in Your Structs
for internal linkage, Linkage with static and extern
preceding declaration of a function, Linkage with static and extern
static libraries, compiler linking of, Runtime Linking
static memory, Automatic, Static, and Manual Memory, Linkage with static and extern
static variables, Automatic, Static, and Manual Memory, Persistent State Variables
declaring, Persistent State Variables
_Thread_local and, _Thread_local and static variables
-std=gnu11 compiler flag (gcc), A Few of My Favorite Flags
stderr, The Context in Which the User Is Working
stdin
- filename for, Here Documents
compiling from, Compiling from stdin
stdint.h file, Deprecate Float
Stopif macro, Reporting Errors
strcmp function, Structures Get Copied, Arrays Get Aliased
strdup (string duplicate) function, Constant Strings, Extending Strings with asprintf
string-from-file function, The Sample Code
strings
easier handling with asprintf, Making String Handling Less Painful with asprintfExtending Strings with asprintf
constant strings, Constant Strings
extending strings, Extending Strings with asprintf
improved security, Security
old, tedious way of setting up strings, Making String Handling Less Painful with asprintf
pointers and, Typedef as a teaching tool
substring object (example), Example: A Substring ObjectExample: A Substring Object
tokenizing with strtok, A Pæan to strtokUnicode
using instead of enums, Enums and Strings
string_Bool, The char const ** Issue
string_from_file function, A Pæan to strtok
strlen function, The Sample Code
strtok (string tokenize) function, A Pæan to strtokUnicode
strtok_r function, A Pæan to strtok
strtok_s function, A Pæan to strtok, A Pæan to strtok
Structured Query Language (SQL), SQLite, Glossary
structures
alignment of lists of structs, All the Pointer Arithmetic You Need to Know
base-plus-offset form, Extending Structures and Dictionaries
better, Better StructuresGeneric Structures
compound literals, Compound LiteralsInitialization via Compound Literals
designated initializers, Designated InitializersInitialize Arrays and Structs with Zeros
flexible function inputs, Flexible Function InputsPolishing a Dull Function
foreach, Foreach
initializing with zeros, Initialize Arrays and Structs with Zeros
passing structs, not pointers to structs, Polishing a Dull Function
returning multiple items from a function, Return Multiple Items from a FunctionReporting Errors
safely terminated lists, Safely Terminated Lists
using typedef, Typedefs Save the DayReturn Multiple Items from a Function
variadic macros, Variadic Macros
vectorizing a function, Vectorize a Function
void pointer and structures it points to, The Void Pointer and the Structures It Points ToGeneric Structures
bridging between C and another language, Smuggling Data Structures Across the Border
const, modifying elements of, Depth
copying, Structures Get Copied, Arrays Get Aliased
extending, Extending a StructureImplementing a Dictionary
anonymous structure inside wrapping structure, C, with fewer seams
functions in, Functions in Your StructsFunctions in Your Structs
holding flexible function input, Optional and Named Arguments
printing using GDB, Print Your StructuresUsing Valgrind to Check for Errors
private struct elements, Private struct elements
substring object (example), Example: A Substring ObjectExample: A Substring Object
Subsystem for Unix-based Application (SUA), POSIX for Windows
sum-an-array function, Safely Terminated Lists
switch statements, alternative to, switch
switch-case as syntax for using labels, goto, and break, switch
syntax you can ignore, C Syntax You Can IgnoreDeprecate Float
casting less, Cast Less
declarations occurring as needed, Let Declarations Flow
deprecate float, Deprecate Float
enums and strings, Enums and Strings
explicitly returning from main, Don’t Bother Explicitly Returning from main
labels, gotos, switches, and breaks, Labels, gotos, switches, and breaks
break, switch
reconsidering goto, goto Considered
switch, switch
setting array size at runtime, Set Array Size at Runtime

T

tab completion in shells, The Shell
tags in Git, Git’s Objects
tar command, testing successful completion of, Test for Files
tarballs, extracting files from, An Autotools Demo
target, called via make target, The Rules
temp variables, Compound Literals
terminal multiplexers, Test for Files
test command, Test for Files
test harness, Unit Testing, Glossary
testing, Automake file to handle testing, Adding testing
TESTS variable, Adding testing
TeX, using with CWEB, Literate Code with CWEB
text, TextThe Sample Code
easier string handling with asprintf, Making String Handling Less Painful with asprintfExtending Strings with asprintf
tokenizing strings with strtok, A Pæan to strtokUnicode
Unicode, UnicodeThe Sample Code
text editors
calling up manpages, Using Libraries from Source (Even if Your Sysadmin Doesn’t Want You To)
recommendations for, Use a Package Manager
text substitutions, Cultivate Robust and Flourishing Macros
(see also expansions)
__thread keyword (gcc), _Thread_local and static variables
_Thread_local keyword, Reporting Errors
thread safety, static state machines and, Persistent State Variables
threading
easy, with pthreads, Easy Threading with Pthreads_Thread_local and static variables
checklist for pthreads, The pthreads checklistProtect threaded resources with mutexes
example, The example_Thread_local and static variables
protecting threaded resources with mutexes, Protect threaded resources with mutexes
_Thread_local and static variables, _Thread_local and static variables
threads
defined, Glossary
variant, Easy Threading with Pthreads
_Thread_local keyword, _Thread_local and static variables
tmux (terminal multiplexer), Test for Files
tokenizing strings, A Pæan to strtokUnicode
tokens, Glossary
Torvalds, Linus, Using a Debugger, goto Considered
traditionalists, C Is Punk Rock
translations, The Sample Code
tree data structures, Trees and Their Branches
true and false values, The char const ** Issue
try-catch constructs for errors, The Context in Which the User Is Working
Turing, Alan, Extending Structures and Dictionaries
type punning, Glossary
type qualifier, Glossary
typedef
as teaching tool, Typedef as a teaching tool
use in nested anonymous struct declaration, C, with fewer seams
using with structs, Typedefs Save the DayReturn Multiple Items from a Function
style note, A Style Note
typing skills, improving, Literate Code with CWEB

U

Unicode, UnicodeThe Sample Code
encoding for C code, The Encoding for C Code
hash for Unicode characters, Generic Structures
libraries, Unicode Libraries
sample code, taking in file anb breaking it into words, The Sample Code
tools in GLib, GLib
union, Glossary
union keyword, C, with fewer seams
unit testing, Unit TestingInterweaving Documentation
coverage, Coverage
unit tests, Glossary
Unix, The POSIX Standard
coevolution with C, POSIX for Windows
/usr/ local path, Paths
UTF (Unicode Transformation Format), Glossary
UTF-32 encoding, Unicode, Unicode Libraries
UTF-8 encoding, Unicode
encoding for C code, The Encoding for C Code
standard C library functions safe for, The Encoding for C Code
utilities, POSIX for Windows

V

Valgrind, Use a Package Manager
using to check for errors, Using Valgrind to Check for ErrorsUnit Testing
variable substitution, make versus shell, Makefiles vs. Shell Scripts
variables
controlling scope with curly braces, Cultivate Robust and Flourishing Macros
scope, Scope
setting for makefiles, Setting Variables
setting in Automake on per-program or per-library basis, Content variables
static, Automatic, Static, and Manual Memory, Automatic, Static, and Manual Memory, Persistent State Variables
declaring, Persistent State Variables
variadic functions, Flexible Function Inputs, Glossary
variadic macros, Variadic Macros
using to produce compound literal, Safely Terminated Lists
variance, single-pass calculation of, Deprecate Float
variant threads, Easy Threading with Pthreads
vasprintf function, Declare Your Function as printf-Style
__VA_ARGS__ keyword, Variadic Macros
vector type, _Generic
vectorizing a function, Vectorize a Function
vectors, C, with fewer seams
verbosity level, increasing, Using a Debugger
version control, Version ControlRemote Repositories
finding changes via diff, Changes via diff
Git, Git’s ObjectsThe Stash
trees and their branches, Trees and Their Branches
trees and their branches/merging, Merging
trees and their branches/rebase, The Rebase
remote repositories, Remote Repositories
revision control systems (RCSes), Version Control
vim, Use a Package Manager
Visual Studio, Compiling C with POSIX
void pointers, Private struct elements
and structures they point to, The Void Pointer and the Structures It Points ToGeneric Structures

W

-Wall compiler flag, A Few of My Favorite Flags
warnings, compiler, A Few of My Favorite Flags
-Werror compiler flag, A Few of My Favorite Flags
wget, Using Libraries from Source
while loops, Labels, gotos, switches, and breaks
wide-character encoding, Unicode Libraries, Glossary
Windows
compiling C for, Compiling C with Windows
compiling C with POSIX, Compiling C with POSIX
POSIX for Windows, POSIX for Windows
without POSIX, Compiling C Without POSIX
wrapper functions
for C functions on host language side, The Wrapper Function
for ideal gas function in Python, Python Host

X

-xc compiler flag, identifying C code, Compiling from stdin
Xcode, Use a Package Manager
XML (Extensible Markup Language), libxml and cURL, Glossary
XML library, Object-Oriented Programming in C

Z

zeros, initializing arrays and structs with, Initialize Arrays and Structs with Zeros
Zsh, fc