Skip to content

Commit 9cd4251

Browse files
author
Ward van Wanrooij
committed
miscellaneous changes to Reissner patches and updating of README/LICENSE/frontpage
1 parent 6bd42f8 commit 9cd4251

File tree

8 files changed

+30
-11
lines changed

8 files changed

+30
-11
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@
55
/*.bbl
66
/*.blg
77
/*.synctex.gz
8+
/*.lot
9+
/*.lof
10+
/*.pdf

LICENSE

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,3 @@ This online version is derived from files in Unix nroff format discovered on a f
77
The publication of the online version is for historical interest and readers are warned that it should be treated as an historical document. There is now a later standard for the C programming language and this publication cannot be considered current: whilst for the most part the current and the first standard are very close, some substantive changes and extensions have occurred since 1991. NO WARRANTY IS OFFERED AS TO THE COMPLETENESS OR ACCURACY OF THE MATERIAL.
88

99
Permission is hereby granted for anyone to do anything that they want with this material: you may freely reprint it, redistribute it, amend it or do whatever you like with it provided that you include an acknowledgement of the original authorship and copyright in the form of a link to this page. In doing so you must accept that you do so strictly on your own liability and that you accept any consequences with no liability whatsoever remaining with the original authors. If you find the material useful and happen to encounter one of the authors, it is unlikely that they will refuse offers to buy them a drink. You may therefore like to consider this material 'drinkware'. (Offer void where prohibited by law, in which case fawning and flattery may be substituted.)
10-
11-
Conversion to LaTeX by Ward van Wanrooij.

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# The C Book
2+
3+
## Overview
4+
This is the TeX/PDF version of The C Book by Mike Banahan, Declan Brady and Mark Doran. This version is based on the second edition and contains minor edits and corrections of the past 10 years. These edits mainly pertain to formatting and fixing small errors. The PDF can be freely redistributed.
5+
6+
## PDF download
7+
The latest version of the PDF of The C Book can be downloaded at [https://github.com/wardvanwanrooij/thecbook/releases/latest](https://github.com/wardvanwanrooij/thecbook/releases/latest).
8+
9+
## History
10+
Thr second ediiton was made printed in 1991 by Addison Wesley. The original nroff sources were converted to HTML and made available in 2003 by [Mike Banahan](https://publications.gbdirect.co.uk/c_book/copyright.html). In 2010 these HTML files were converted by a purpose-built Perl script to TeX/PdF by [Ward van Wanrooii](https://github.com/wardvanwanrooij(. The TeX sources have been put on Github and since then have also incorporated changes by [Andrea D'Amore](https://github.com/anddam) and [Ernst Reissner](https://github.com/Reissner).
11+
12+
## Comments
13+
If you spot any errors, please open an issue or send a pull request.
14+
15+
## License
16+
Permission is hereby granted for anyone to do anything that they want with this material—you may freely reprint it, redistribute it, amend it or do whatever you like with it provided that you include an acknowledgement of the original authorship and copyright in the form of a link to https://publications.gbdirect.co.uk/c_book/copyright.html.
17+
For more information please review the [original license](./LICENSE).
18+

book.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,7 +1549,7 @@ \chapter*{Preface}\addcontentsline{toc}{chapter}{Preface}
15491549

15501550

15511551
The Standard requires that an alphabet of 96 symbols is available
1552-
for c as follows:
1552+
for C as follows in Table~\ref{tab:alphabetC}.
15531553

15541554
\begin{table}[htb]
15551555
\centering
@@ -1564,7 +1564,7 @@ \chapter*{Preface}\addcontentsline{toc}{chapter}{Preface}
15641564
form feed, newline \\
15651565
\bottomrule
15661566
\end{tabular}
1567-
\caption{\label{tab:alphaC}The Alphabet of C}
1567+
\caption{\label{tab:alphabetC}The Alphabet of C}
15681568
\end{table}
15691569

15701570

example/example2-3.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ main() {
66
char c;
77

88
c = CHAR_MIN;
9-
while (c != CHAR_MAX) {
9+
do {
1010
printf("%d\n", c);
1111
c = c+1;
12-
}
12+
} while (c < CHAR_MAX);
1313

1414
exit(EXIT_SUCCESS);
1515
}

example/example8-3.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ main() {
1414
cpi = &ci;
1515
ncpi = &i;
1616

17-
printf("ci has value %i at address %p, cpi has value %i and points at address %p.\n", ci, &ci, *cpi, cpi);
17+
printf("ci has value %i at address %p, cpi has value %i "
18+
"and points at address %p.\n", ci, &ci, *cpi, cpi);
1819

1920
/* this needs a cast
2021
* because it is usually a big mistake,
@@ -27,7 +28,8 @@ main() {
2728
*/
2829
*ncpi = 42;
2930

30-
printf("ci has value %i at address %p, cpi has value %i and points at address %p.\n", ci, &ci, *cpi, cpi);
31+
printf("ci has value %i at address %p, cpi has value %i "
32+
"and points at address %p.\n", ci, &ci, *cpi, cpi);
3133

3234
exit(EXIT_SUCCESS);
3335
}

thecbook.pdf

-1.29 MB
Binary file not shown.

thecbook.tex

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888

8989
\begin{document}
9090
\frontmatter
91-
\title{The C Book\thanks{Conversion to LaTeX by Ward van Wanrooij. Any layout issues are caused by my conversion script and do not reflect on the authors. Also available on-line at \url{http://publications.gbdirect.co.uk/c_book/}}}
91+
\title{The C Book\thanks{Conversion to TeX and editing by Ward van Wanrooij.\newline This version contains changes up to 2020-07-21.\newline The latest version is available at https://github.com/wardvanwanrooij/thecbook}}
9292
\author{Mike Banahan \and Declan Brady \and Mark Doran}
9393
\date{January 1991}
9494
\maketitle
@@ -97,8 +97,6 @@
9797
\pdfbookmark[1]{Contents}{toc}
9898
\setcounter{page}{1}
9999
\tableofcontents
100-
\listoffigures
101-
\listoftables
102100
\mainmatter
103101
\include{book}
104102

0 commit comments

Comments
 (0)