C Interfaces and Implementations

Errata

1st Printing

Corrections to the first printing (Aug. 1996) of C Interfaces and Implementations: Techniques for Creating Reusable Software (Addison-Wesley Professional Computing Series, 1997, ISBN 0-201-49841-3). In the list below, line +n and line -n refer to the nth line from the top and bottom of the indicated page.

Page xi, line +5: disemminate → disseminate

Page xvii, line +3: project → projects

Page 6, line -2: instead at → instead of at

Page 10, line +14: srcdst

Page 28, line +10: Many the → Many of the

Page 44, line -5: extern Atom_addextern const char *Atom_add

Page 46, line -12: Allocated_FailedAllocate_Failed

Page 60, line -16: if (e1) e2; → if (!(e1)) e2;

Page 63, line -14: ADA → Ada

Page 89, line -2: in a arena → in an arena

Page 94, line -8: Change to

while (nbytes > arena->limit - arena->avail) {

Page 106, line +7: All the → Most of the

Page 161, line +3: homogenous → homogeneous

Page 168, line -11: Change to

if (array->length == 0)
	array->array = ALLOC(length*array->size);
else if (length > 0)

Page 169, line +7: Change to

if (copy->length >= array->length

Page 183, line +7: Unlike to → Unlike

Page 181, lines -11 and -10: Seq->remlo and Seq->remhiSeq_remlo and Seq_remhi

Page 184, line +16: Ring_seqRing_ring

Page 193, line +16: incidently → incidentally

Page 442, line +9: currentcurrent && t != current

Page 497, lines +7 and 8: Move to just before line -11.

2nd and 3rd Printings

Corrections to second (Jan. 1997) and third (June 2001) printings of C Interfaces and Implementations: Techniques for Creating Reusable Software (Addison-Wesley Professional Computing Series, 1997, ISBN 0-201-49841-3). In the list below, line +n and line -n refer to the nth line from the top and bottom of the indicated page.

Page 168, lines -13..-8: Change to

if (length == 0)
	FREE(array->array);
else if (array->length == 0)
	array->array = ALLOC(length*array->size);
else
	RESIZE(array->array, length*array->size);

(This change should also be applied to page 168, lines -11..-8 in the first printing.)

The errors below also appear in the first printing.

Page 48, line 5: char *reason;const char *reason;

Page 49, line -11..-10: Change "next EXCEPT, ELSE, FINALLY or END_TRY" to "corresponding END_TRY".

Page 61, line 6: = → +=

Page 68, line -12: >=>

Page 84, line -10: Change to

#define NALLOC ((4096 + sizeof (union align) - 1)/ \
	(sizeof (union align)))*(sizeof (union align))

Page 169, lines 9 and 12: Change to

memcpy(copy->array, array->array, array->length*array->size);
memcpy(copy->array, array->array, copy->length*array->size);

Page 241, line -8: Incidently → Incidentally

Page 249, line 1: char *suffixconst char *suffix

Page 274, line 12: 127 → 128

Page 277, line -2: 127128

Page 284, lines 5 and -7: Change to

map[(unsigned char)from->str[k]] = to->str[k];
*p++ = map[(unsigned char)s.str[i]];

Page 352, line -11: x->sign == 1x->sign == -1

Page 358, line -2: initalized → initialized

Page 366, line 2: Add

f  print all the values on the stack from the top down

Page 367, line -6: MP_Tvolatile MP_T

Page 370, line -11: char *fmt;const char *fmt;

Page 372, line 3: --n > 0--n >= 0

Page 416, lines 15 and 16: Change to

Sem_wait(&mutex);
TRY

Page 417, lines 11 and 12: Change to

Sem_wait(&tab.mutex);
TRY

Page 420, line -7: Change to

i++; while (i < j && a[i] < v) i++;

Page 493, line -11: returns preempt or zero → returns one or zero