Skip to content

Commit

Permalink
miscellaneous changes to Reissner patches and updating of README/LICE…
Browse files Browse the repository at this point in the history
…NSE/frontpage
  • Loading branch information
wardvanwanrooij committed Jul 23, 2020
1 parent 6bd42f8 commit 9cd4251
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@
/*.bbl
/*.blg
/*.synctex.gz
/*.lot
/*.lof
/*.pdf
2 changes: 0 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ This online version is derived from files in Unix nroff format discovered on a f
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.

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.)

Conversion to LaTeX by Ward van Wanrooij.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# The C Book

## Overview
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.

## PDF download
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).

## History
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).

## Comments
If you spot any errors, please open an issue or send a pull request.

## License
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.
For more information please review the [original license](./LICENSE).

4 changes: 2 additions & 2 deletions book.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1549,7 +1549,7 @@ \chapter*{Preface}\addcontentsline{toc}{chapter}{Preface}


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

\begin{table}[htb]
\centering
Expand All @@ -1564,7 +1564,7 @@ \chapter*{Preface}\addcontentsline{toc}{chapter}{Preface}
form feed, newline \\
\bottomrule
\end{tabular}
\caption{\label{tab:alphaC}The Alphabet of C}
\caption{\label{tab:alphabetC}The Alphabet of C}
\end{table}


Expand Down
4 changes: 2 additions & 2 deletions example/example2-3.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ main() {
char c;

c = CHAR_MIN;
while (c != CHAR_MAX) {
do {
printf("%d\n", c);
c = c+1;
}
} while (c < CHAR_MAX);

exit(EXIT_SUCCESS);
}
6 changes: 4 additions & 2 deletions example/example8-3.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ main() {
cpi = &ci;
ncpi = &i;

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

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

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

exit(EXIT_SUCCESS);
}
Binary file removed thecbook.pdf
Binary file not shown.
4 changes: 1 addition & 3 deletions thecbook.tex
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@

\begin{document}
\frontmatter
\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/}}}
\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}}
\author{Mike Banahan \and Declan Brady \and Mark Doran}
\date{January 1991}
\maketitle
Expand All @@ -97,8 +97,6 @@
\pdfbookmark[1]{Contents}{toc}
\setcounter{page}{1}
\tableofcontents
\listoffigures
\listoftables
\mainmatter
\include{book}

Expand Down

0 comments on commit 9cd4251

Please sign in to comment.