From adac2cda2e293c811e10311fced6b5edf50b9d20 Mon Sep 17 00:00:00 2001 From: "Frank B. Brokken" Date: Thu, 8 Jun 2017 11:08:25 +0200 Subject: [PATCH] fixed typos --- README.kindle | 7 ++++--- annotations/html/cplusplus.opf | 8 ++++++-- annotations/yo/classes/anonymous.yo | 2 +- annotations/yo/classes/member.yo | 2 +- annotations/yo/classes/memberinit.yo | 2 +- annotations/yo/concrete/polymorphic.yo | 2 +- annotations/yo/concrete/unrestricted.yo | 2 +- annotations/yo/first/const.yo | 4 ++-- annotations/yo/first/keywords.yo | 2 +- annotations/yo/first/rangebased.yo | 2 +- annotations/yo/first/references.yo | 2 +- annotations/yo/first/rvalueref.yo | 4 ++-- annotations/yo/first/sharedcast.yo | 4 ++-- annotations/yo/first/sizet.yo | 2 +- annotations/yo/first/wchar.yo | 4 ++-- annotations/yo/freelectures.yo | 2 +- annotations/yo/intro/annohistory.yo | 4 ++-- annotations/yo/iostreams/flags.yo | 4 ++-- annotations/yo/overview.yo | 2 +- annotations/yo/polymorphism/intro.yo | 2 +- annotations/yo/static/function.yo | 2 +- annotations/yo/string/members.yo | 2 +- 22 files changed, 36 insertions(+), 31 deletions(-) diff --git a/README.kindle b/README.kindle index cf66c5d2..0b026109 100644 --- a/README.kindle +++ b/README.kindle @@ -12,8 +12,8 @@ To create the kindle version: * createhtml kindle * xd 1h - * edit ./cplusplus.opf to reflect the latest version, maybe add a new - chapter. + * edit ./cplusplus.opf to update the latest version and date, and + maybe add a new chapter. * do: ../tmp/kindlegen/kindlegen -gif cplusplus.opf |& tee /tmp/out @@ -23,8 +23,9 @@ To create the kindle version: * Follow the instructions at https://kdp.amazon.com/self-publishing/dashboard - Select: `Book actions' for uploading the latest version: + Select: `Book actions' (lower right) for uploading the latest version: + - Click on the elipses (...) - Click on C++ Annotations - Edit the version - Click Browse to go to the location where the .mobi file is and diff --git a/annotations/html/cplusplus.opf b/annotations/html/cplusplus.opf index 71d252c5..fbfedcad 100644 --- a/annotations/html/cplusplus.opf +++ b/annotations/html/cplusplus.opf @@ -2,10 +2,14 @@ - C++ Annotations Version 10.6.0 + C++ Annotations Version 10.8.0 en-us EA989A949A - Frank B. BrokkenThe University of Groningen9036704707Computing, Internet01/10/2013 + Frank B. BrokkenThe University +of Groningen9036704707Computing, InternetJune 8, 2017 + annotations.gif diff --git a/annotations/yo/classes/anonymous.yo b/annotations/yo/classes/anonymous.yo index edf023a6..9015c145 100644 --- a/annotations/yo/classes/anonymous.yo +++ b/annotations/yo/classes/anonymous.yo @@ -62,7 +62,7 @@ functions they are considered constant as they merely exist for passing the information of (class type) objects to those functions. This way, they cannot be modified, nor may their non-const member functions be used. Of course, a tt(const_cast) could be used to cast away the const reference's constness, but -that's considered bad practive on behalf of the function receiving the +that's considered bad practice on behalf of the function receiving the anonymous objects. Also, any modification to the anonymous object is lost once the function returns as the anonymous object ceases to exist after calling the function. These anonymous objects used to initialize const references should diff --git a/annotations/yo/classes/member.yo b/annotations/yo/classes/member.yo index f97f4767..a0eed93d 100644 --- a/annotations/yo/classes/member.yo +++ b/annotations/yo/classes/member.yo @@ -38,7 +38,7 @@ modification. Except for constructors and the destructor (cf. chapter ref(MEMORY)) only const member functions can be used with (plain, references or pointers to) tt(const) objects. -Const objects are frequently encounterd as tt(const &) parameters of +Const objects are frequently encountered as tt(const &) parameters of functions. Inside such functions only the object's const members may be used. Here is an example: verb( diff --git a/annotations/yo/classes/memberinit.yo b/annotations/yo/classes/memberinit.yo index bf026939..9116c364 100644 --- a/annotations/yo/classes/memberinit.yo +++ b/annotations/yo/classes/memberinit.yo @@ -69,7 +69,7 @@ tt(++s_nObjects) can be an initial value. Note that the data member initializations are recognized by the compiler, and are applied to its implementation of the default constructor. In fact, all constructors will apply the data member initializations, unless explicitly -initialized otherwise. E.g., the move-constructor may now be implented like +initialized otherwise. E.g., the move-constructor may now be implemented like this: verb( Container(Container &&tmp) diff --git a/annotations/yo/concrete/polymorphic.yo b/annotations/yo/concrete/polymorphic.yo index 67e95370..90de74c6 100644 --- a/annotations/yo/concrete/polymorphic.yo +++ b/annotations/yo/concrete/polymorphic.yo @@ -51,7 +51,7 @@ semantic value types are used: int-values, names, and vectors of arguments. Other types could easily be used as well: doubles, complex numbers, sets; you name it. - Our semantic value must accomodate all of these different types, and must + Our semantic value must accommodate all of these different types, and must also allow us to determine the actual type that's stored in a semantic value in cases where we cannot deduct the actual type merely from the syntax (which happens, e.g., for the various semantic value types that may be contained in diff --git a/annotations/yo/concrete/unrestricted.yo b/annotations/yo/concrete/unrestricted.yo index 26447fef..1307236d 100644 --- a/annotations/yo/concrete/unrestricted.yo +++ b/annotations/yo/concrete/unrestricted.yo @@ -26,7 +26,7 @@ simply defines an tt(INT) value 0. Here is tt(Semantic)'s interface: verbinclude(-a unrestricted/semantic/semantic.h) -tt(Semantic) objects are as big as required to accomodate all its +tt(Semantic) objects are as big as required to accommodate all its variants. However, as tt(Semantic) is a union, its constructors and destructor cannot predefine or destroy all of its variants. Rather, it must pick the appropriate field based on the tt(pair)'s tt(first) field. For tt(int) values diff --git a/annotations/yo/first/const.yo b/annotations/yo/first/const.yo index 4150f1c6..6e896a64 100644 --- a/annotations/yo/first/const.yo +++ b/annotations/yo/first/const.yo @@ -79,7 +79,7 @@ function. The definition or declaration (either or not containing tt(const)) should always be read from the variable or function identifier back to the type -indentifier: +identifier: quote( ``Buf is a const pointer to const characters'' ) @@ -128,7 +128,7 @@ an (as yet unmatched) closing parenthesis. eit() return to the point where you started reading, and read backwards until you reach the beginning of the declaration or a matching opening parenthesis. - eit() If you reached an opening parenthese, continue at step 2 beyond the + eit() If you reached an opening parenthesis, continue at step 2 beyond the parenthesis where you previously stopped. ) Let's apply this recipe to the following (by itself irrelevant) complex diff --git a/annotations/yo/first/keywords.yo b/annotations/yo/first/keywords.yo index 2d961d6b..9c068e1c 100644 --- a/annotations/yo/first/keywords.yo +++ b/annotations/yo/first/keywords.yo @@ -24,7 +24,7 @@ char16_t else mutable requires try it() The ti(export) keyword is no longer actively used by bf(C++), but it is kept as a keyword, reserved for future use. it() Since the i(C++17) standard the keyword ti(register) is no longer - used, but it remains a reserved identifer. In other words, definitions + used, but it remains a reserved identifier. In other words, definitions like verb( register int index; ) diff --git a/annotations/yo/first/rangebased.yo b/annotations/yo/first/rangebased.yo index 8f0a0110..562e4fc4 100644 --- a/annotations/yo/first/rangebased.yo +++ b/annotations/yo/first/rangebased.yo @@ -56,7 +56,7 @@ inefficient if you have an array of tt(BigStruct) elements: }; ) Inefficient, because you don't need to make copies of the array's -elements. Instead, use refences to elements: +elements. Instead, use references to elements: verb( BigStruct data[100]; // assume properly initialized elsewhere diff --git a/annotations/yo/first/references.yo b/annotations/yo/first/references.yo index a40abbfe..9f5590b1 100644 --- a/annotations/yo/first/references.yo +++ b/annotations/yo/first/references.yo @@ -148,7 +148,7 @@ void printperson (Person const &p) "Address: " << p.address << '\n'; } - // get a person by indexvalue + // get a person by index value Person const &personIdx(int index) { return person[index]; // a reference is returned, diff --git a/annotations/yo/first/rvalueref.yo b/annotations/yo/first/rvalueref.yo index d0036d35..e4a4f778 100644 --- a/annotations/yo/first/rvalueref.yo +++ b/annotations/yo/first/rvalueref.yo @@ -88,7 +88,7 @@ if the function is passed an anonymous value. replaced by tt(void receive(int value)), though. When confronted with the choice between a value parameter and a reference parameter (either lvalue or rvalue) it cannot make a decision and reports an ambiguity. In practical -contexts this is not a problem. Rvalue refences were added to the language in +contexts this is not a problem. Rvalue references were added to the language in order to be able to distinguish the two forms of references: named values (for which lvalue references are used) and anonymous values (for which rvalue references are used). @@ -96,7 +96,7 @@ rvalue references are used). It is this distinction that allows the implementation of emi(move semantics) and emi(perfect forwarding). At this point the concept of emi(move semantics) cannot yet fully be discussed (but see section ref(MOVE) -for a more thorough discussusion) but it is very well possible to illustrate +for a more thorough discussion) but it is very well possible to illustrate the underlying ideas. Consider the situation where a function returns a tt(struct Data) containing a diff --git a/annotations/yo/first/sharedcast.yo b/annotations/yo/first/sharedcast.yo index 9b3f0097..a2490ec3 100644 --- a/annotations/yo/first/sharedcast.yo +++ b/annotations/yo/first/sharedcast.yo @@ -1,14 +1,14 @@ This section can safely be skipped without loss of continuity. In the context of the class tt(shared_ptr), which is covered in section -ref(SHAREDPTR), several more new-style casts are availble. Actual coverage of +ref(SHAREDPTR), several more new-style casts are available. Actual coverage of these specialized casts is postponed until section ref(SHAREDCAST). These specialized casts are: itemization( itt(static_pointer_cast), returning a tt(shared_ptr) to the base-class section of a derived class object; - itt(const_pointer_cast), returing a tt(shared_ptr) to a non-const object + itt(const_pointer_cast), returning a tt(shared_ptr) to a non-const object from a tt(shared_ptr) to a constant object; itt(dynamic_pointer_cast), returning a tt(shared_ptr) to a derived class object from a tt(shared_ptr) to a base class object. diff --git a/annotations/yo/first/sizet.yo b/annotations/yo/first/sizet.yo index a211a67f..42eaa890 100644 --- a/annotations/yo/first/sizet.yo +++ b/annotations/yo/first/sizet.yo @@ -3,7 +3,7 @@ type that is promoted by bi(POSIX) as a typename to be used for non-negative integral values answering questions like `how much' and `how many', in which case it should be used instead of ti(unsigned int). It is not a specific bf(C++) type, but also available in, e.g., bf(C). Usually it is defined -implictly when a (any) system header file is included. The header file +implicitly when a (any) system header file is included. The header file `officially' defining tt(size_t) in the context of bf(C++) is ti(cstddef). Using tt(size_t) has the advantage of being a em(conceptual) type, rather than diff --git a/annotations/yo/first/wchar.yo b/annotations/yo/first/wchar.yo index df3a8126..4bca7516 100644 --- a/annotations/yo/first/wchar.yo +++ b/annotations/yo/first/wchar.yo @@ -1,6 +1,6 @@ -The ti(wchar_t) type is an extension of the tt(char) built-in type, to accomodate +The ti(wchar_t) type is an extension of the tt(char) built-in type, to accommodate em(wide) character values (but see also the next section). The tt(g++) -compiler reports tt(sizeof(wchar_t)) as 4, which easily accomodates all 65,536 +compiler reports tt(sizeof(wchar_t)) as 4, which easily accommodates all 65,536 different em(Unicode) character values. Note that bf(Java)'s tt(char) data type is somewhat comparable to bf(C++)'s diff --git a/annotations/yo/freelectures.yo b/annotations/yo/freelectures.yo index 1914acc4..bd1f87b7 100644 --- a/annotations/yo/freelectures.yo +++ b/annotations/yo/freelectures.yo @@ -30,7 +30,7 @@ inviting me; it() Expenses for basic lodging, while the lectures take place, should also be taken care of by the organization inviting me; it() The lectures can be organized yearly between june and (including) -september; +September; it() In close cooperation with the interested organization the actual topics to be presented and the duration and intensity of the course will be determined; diff --git a/annotations/yo/intro/annohistory.yo b/annotations/yo/intro/annohistory.yo index af6d8e1a..d1837858 100644 --- a/annotations/yo/intro/annohistory.yo +++ b/annotations/yo/intro/annohistory.yo @@ -1,9 +1,9 @@ The original version of the bf(C++) Annotations was written by Frank Brokken and Karel Kubat in Dutch using tt(LaTeX). After some time, Karel rewrote the text and converted the guide to a more suitable format and (of course) to -English in september 1994. +English in September 1994. -The first version of the guide appeared on the net in october 1994. By then it +The first version of the guide appeared on the net in October 1994. By then it was converted to tt(SGML). Gradually new chapters were added, and the contents were modified and further diff --git a/annotations/yo/iostreams/flags.yo b/annotations/yo/iostreams/flags.yo index 45d82469..bbdb72ce 100644 --- a/annotations/yo/iostreams/flags.yo +++ b/annotations/yo/iostreams/flags.yo @@ -210,7 +210,7 @@ bf(Handling whitespace and flushing streams) (manipulator inserting a newline character and flushing the stream. Often flushing the stream is not required and doing so would needlessly slow down I/O processing. Consequently, using tt(endl) should be -avoided (in favor of inserting tt('\n')) unless flusing the stream is +avoided (in favor of inserting tt('\n')) unless flushing the stream is explicitly intended. Note that streams are automatically flushed when the program terminates or when a stream is `tied' to another stream (cf. tt(tie) in section ref(IOS)). Example: @@ -251,7 +251,7 @@ cin >> value; // skips initial blanks (the stream for which this flag is set flushes its buffer after every output operation Often flushing a stream is not required and doing so would needlessly slow down I/O processing. Consequently, setting tt(unitbuf) -should be avoided unless flusing the stream is explicitly intended. Note that +should be avoided unless flushing the stream is explicitly intended. Note that streams are automatically flushed when the program terminates or when a stream is `tied' to another stream (cf. tt(tie) in section ref(IOS)). Complementary flag: tt(ios::nounitbuf). Manipulators: tt(std::unitbuf), diff --git a/annotations/yo/overview.yo b/annotations/yo/overview.yo index c51671db..f3e89919 100644 --- a/annotations/yo/overview.yo +++ b/annotations/yo/overview.yo @@ -18,7 +18,7 @@ The chapters of the bf(C++) Annotations cover the following topics: linkit(OVERLOADING)(Give your own meaning to operators) linkit(CONTAINERS)(Abstract Containers to put stuff into) linkit(INHERITANCE)(Building classes upon classes: setting up class - hierarcies) + hierarchies) linkit(POLYMORPHISM)(Changing the behavior of member functions accessed through base class pointers) linkit(Friends)(Gaining access to private parts: friend functions and diff --git a/annotations/yo/polymorphism/intro.yo b/annotations/yo/polymorphism/intro.yo index 1c865e7e..d390e6fa 100644 --- a/annotations/yo/polymorphism/intro.yo +++ b/annotations/yo/polymorphism/intro.yo @@ -39,7 +39,7 @@ determined which member function will actually be called. In bf(C++) late binding is em(not) the default way functions are called. By default emi(static binding) (or emi(early binding)) is used. With static binding the functions that are called are determined by the compiler, merely -using the class types of objects, object pointers or object refences. +using the class types of objects, object pointers or object references. Late binding is an inherently different (and slightly slower) process as it is decided at i(run-time), rather than at i(compile-time) what function is going diff --git a/annotations/yo/static/function.yo b/annotations/yo/static/function.yo index 680934cd..e4a6908e 100644 --- a/annotations/yo/static/function.yo +++ b/annotations/yo/static/function.yo @@ -60,7 +60,7 @@ the member function as a reference parameter. Note that hi(static inline member functions) static member functions can be defined as inline hi(inline: static members) functions. - it() at 2 a relatively long array is defined to be able to accomodate + it() at 2 a relatively long array is defined to be able to accommodate long paths. Alternatively, a tt(string) or a pointer to dynamic memory could be used. it() at 3 a (possibly longer, but not too long) new pathname is stored in diff --git a/annotations/yo/string/members.yo b/annotations/yo/string/members.yo index 08fa0539..439fe6d5 100644 --- a/annotations/yo/string/members.yo +++ b/annotations/yo/string/members.yo @@ -104,7 +104,7 @@ otherwise. argument[object.copy(argument, string::npos)] = 0; ) Of course, the programmer should make sure that tt(argument)'s size is - large enough to accomodate the additional 0-byte.) + large enough to accommodate the additional 0-byte.) ithtq(crbegin)(string::const_reverse_iterator crbegin()) (a tt(const_reverse_iterator) referring to the last character of the current string object is returned.)