Errata

21st Century C

Errata for 21st Century C

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Chapter 9 A Pæan to strtok

This concerns the function ok_array_new(). When strtok_r() fails, we do not free "out" memory.

Anonymous  Jun 24, 2017 
I
Last paragraph under ISO C99 subheading in the Preface

"As of this writing, most compilers support C99 plus or minus a few caveats"

In the sentence above, either the word "or" needs to be removed, or perhaps the author intended to write "...support C99 or C11 minus a few caveats".

Shantanu R Kothavale  Aug 29, 2017 
I
Last paragraph of the ISO C99 subheading in the Preface

I mistakenly submitted an errata for the last paragraph of the ISO C99 subheading in the Preface.

The text is correct, I had misread it.

Please do not accept my previously reported erratum.

Thanks!

Shantanu R Kothavale  Aug 29, 2017 
PDF Page 20
top page

PDF:
POSIX-standard make has this recipe for compiling a .o object file from a .c source
code file:
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $*.c

True (gnumake):
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<

Rashid Yusupov  Aug 17, 2015 
Printed Page 68
figure 3-1

In Figure 3-1 the Autotools flowchart depicts 'Automake.am', when the text refers to 'Makefile.am'. The two instances of Automake.am, both in the Authors and Users boxes should be Makefile.am.

Rob Latham  Apr 06, 2015 
PDF, ePub, Mobi Page 83
Figure 3.1

"You will only be writing two of these files (the shaded ones);"

That should be Makefile.am I think and Automake.am

Took me ages to figure out :-)

Gavin Henry  Apr 17, 2016 
Printed Page 151
example 9-3

Example 9-3 as it appears in the book:

#include <stdio.h>
#include <stdlib.h>

it omits the _GNU_SOURCE before #include <stdio.h> and should be

#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>


By this point in the book the reader should be able to recognize the omission. Perhaps you were simply testing for observation? sasprintf.c from github does not have this omission.

Rob Latham  Jun 18, 2015 
Printed Page 187
Example 9-3, first comment

On page 187 of 2nd edition, First Release, the first comment in Example 9-3 runs off the page, past the right-hand margin, and part of it seems cut off.

Kevin Zembower  Mar 20, 2015