Commit Diff


commit - adf45835a2a3c642fae4b1748961f0fa41b540f9
commit + e86e8af835e80df38893086e43738548c6fc0c43
blob - /dev/null
blob + 185c865a9368870c9eb4d38960e315cd304c05e9 (mode 644)
--- /dev/null
+++ 1-10-text
@@ -0,0 +1,5 @@
+		lots	of tabs			
+  s o  m   e b  l a n k spa   ces
+n\ow f\\or so\me b\a\c\kslashes
+Delete this word using backspaces.
+
blob - /dev/null
blob + ffe9e5b7bc4c8b85e0389e9080f3abc0eeed7671 (mode 644)
--- /dev/null
+++ 1-11-text
@@ -0,0 +1,345 @@
+

+*** START OF THE PROJECT GUTENBERG EBOOK HAND-BOOK OF PUNCTUATION ***

+

+

+

+

+

+

+                                HAND-BOOK

+                                    OF

+                               PUNCTUATION,

+

+                          WITH INSTRUCTIONS FOR

+

+                     CAPITALIZATION, LETTER-WRITING,

+                                   AND

+                              PROOF-READING,

+

+                                    BY

+                           W. J. COCKER, A. M.

+

+                              [Illustration]

+

+                           A. S. BARNES & CO.,

+                   NEW YORK, CHICAGO, AND NEW ORLEANS.

+                                  1878.

+

+                    Copyright, 1878, by W. J. Cocker.

+

+

+

+

+PREFACE.

+

+

+As the pronunciation of words is determined by the usage of the best

+speakers, so, in a great measure, the punctuation of sentences is based

+on the usage of the best writers. Recognizing this fact, the author has

+aimed,—

+

+1. To state such general rules as are recognized by most writers of good

+English.

+

+2. To illustrate these rules by examples taken from many of our best

+English classics.

+

+3. To give some of the differences in usage that exist even among the

+best of writers.

+

+It is frequently asserted that even good writers differ so much in

+their use of punctuation marks that it is impossible to lay down any

+general rules, and that it is better for each one to consult his own

+taste and judgment. With equal reason it might be said that inasmuch as

+good speakers, and even lexicographers, differ in the pronunciation of

+words, therefore each speaker should make his own taste and judgment the

+standard for correct pronunciation. A writer’s mode of expressing his

+thoughts will determine the character and number of the punctuation marks

+that he uses, and it is chiefly owing to this that even good writers

+differ somewhat in punctuating what they have written. There are some

+rules that are invariable under all circumstances; the use of others

+depends on the mental characteristics of the writer; and there are still

+other rules, the application of which is determined by the writer’s taste

+alone.

+

+By gestures, tones of voice, oratorical pauses, emphasis, and in various

+ways, a speaker can make his meaning clear to his listeners; and so a

+writer should certainly use all the aids which punctuation, capitals,

+and italics afford, in presenting clearly what he has written for the

+perusal of others. Business men, however, seem to think that they are not

+amenable to the rules that govern good writers. They affirm that they

+have no time to punctuate their letters, and yet they subject others to

+the necessity of expending time and patience in trying to make out their

+meaning. Serious misunderstandings have arisen between business men, in

+consequence of the omission or incorrect use of punctuation marks, and

+expensive lawsuits have originated in the careless punctuation of legal

+instruments.

+

+Very little attention is paid in our public schools to punctuation, and

+the rules usually given in English Composition are either disregarded

+or not properly understood. This may, perhaps, be accounted for by the

+fact that the rules are wanting in clearness, and are not sufficiently

+illustrated by examples. The aim of this volume is to remedy, in some

+measure, these evils, and to secure more attention to what ought to be a

+prominent part of school instruction. The evils of bad punctuation are

+really more serious than the evils of bad spelling, and no student can be

+said to have learned to read well, much less to write well, who has not

+studied punctuation intelligently.

+

+We would suggest that this hand-book be used at Rhetorical Exercises,

+and that when essays, orations, criticisms, &c., are handed to the

+teacher for correction, he should use a red or a blue pencil, so that

+corrections may be the more readily recognized. Besides the corrections

+in grammar, spelling, &c., he should be careful to supply punctuation

+marks when needed, cross out needless ones, and, of course, make such

+other corrections as may be necessary. When the productions are returned

+to the pupils, the teacher should first point out the necessity of using

+certain marks, in order to define and bring out the meaning, and to show

+the relation between the different members of a sentence. Having thus

+shown the need of punctuation marks, then reference should be made to

+some of the simpler rules, to impress this need on the mind. Great care

+should be taken not to perplex the mind with too many rules before the

+necessity is created for their use. The great difficulty in the study

+of punctuation has been that many rules are committed to memory before

+the need of their use has arisen, so that the mind is perplexed and

+bewildered instead of enlightened. The rule, it must be remembered, does

+not create the necessity; the necessity creates the rule. Then, again,

+we think a great mistake is made by having the beginner punctuate what

+some one else has written. The better plan is for the pupil, at the very

+outset, to punctuate what he himself has composed, and in his effort to

+bring out his own meaning clearly, he will, with the aid of a few rules,

+almost intuitively fall into the habit of punctuating correctly.

+

+The following suggestions may be of service:—

+

+1. Do not give a pupil a rule to learn, unless it is clearly founded upon

+examples taken from what he himself has written.

+

+2. Take, at first, the simplest, most frequently used, and most readily

+understood rules.

+

+3. Advance slowly, remembering that a few simple principles clearly

+understood, are of much more practical benefit than a number of misty

+rules hastily committed to memory.

+

+In the preparation of this hand-book, the author is under obligations

+to various authorities, but he is more especially indebted to Wilson’s

+“Treatise on Punctuation.”

+

+                                                             W. J. COCKER.

+

+ADRIAN, Mich., Dec. 26, 1877.

+

+

+

+

+[Illustration]

+

+Table of Contents.

+

+

+      I. PUNCTUATION       pp.    1-53

+

+     II. CAPITALS           ”    54-70

+

+    III. LETTER-FORMS       ”   71-100

+

+     IV. PROOF-READING      ”  101-114

+

+[Illustration]

+

+

+

+

+[Illustration: Punctuation.]

+

+

+Introduction.

+

+The principal punctuation marks are,—

+

+    1. The Comma      ,

+    2. The Semicolon  ;

+    3. The Colon      :

+    4. The Period     .

+

+The comma indicates a somewhat close relationship between the parts of a

+sentence; the semicolon, a more distant relationship; the colon indicates

+that the parts are almost independent of each other; the period marks the

+close of a sentence, and indicates that a thought is complete.

+

+In simple sentences, when the words are closely united together, and

+the relationship of the words to each other is readily perceived, there

+is usually no need of any punctuation marks, except a period at the

+close. It should always be borne in mind that punctuation marks are

+used primarily to assist in bringing out the meaning of the writer, and

+not to embellish a written or a printed page. In sentences made up of

+parts that are closely related to each other, but, at the same time,

+distinct in character, commas should be used. They are way-marks for the

+accommodation of the reader. A production unpunctuated presents as dreary

+a prospect to the reader, as the level plain of Chaldæa presents to the

+perplexed traveler who has lost himself among the sandy mounds on the

+banks of the Euphrates, and has nothing by which to direct his course.

+

+When the different parts of a sentence are somewhat disconnected, and

+not closely related to each other, a semicolon or colon should be used.

+Sentences are sometimes very long and complicated. It is then necessary

+to separate the main divisions by semicolons, and the smaller by commas.

+Sometimes the smaller parts of a sentence are separated by commas and

+semicolons, and the main divisions by colons.

+

+The other marks in use are,—

+

+    1. The Interrogation Point    ?

+    2. The Exclamation Point      !

+    3. The Dash                   —

+    4. Marks of Parenthesis      ( )

+    5. Brackets                  [ ]

+    6. Quotation Marks         “ ‘ ’ ”

+    7. The Apostrophe             ’

+    8. The Hyphen                 -

+    9. Miscellaneous marks.

+

+

+THE COMMA.

+

+

+INTRODUCTORY REMARKS.

+

+In order to properly understand some of the rules that are given in the

+following pages, it is absolutely necessary to have a clear understanding

+of the difference between a sentence and a clause. A sentence is a

+combination of words expressing a complete thought, and usually followed

+by a period; a clause is a distinct part of a sentence. Some sentences

+are simple in form, and have but one subject and one finite verb; as,

+“Language is part of a man’s character.”—_Coleridge._ Other sentences

+are made up of clauses, each clause having a subject and a verb; in

+other words, several clauses are sometimes joined together to form one

+sentence; as, “New forms of beauty start at once into existence, and all

+the burial places of the memory give up their dead.”—_Macaulay._ It will

+be easily seen that clauses will be more readily recognized with the eye,

+and more easily comprehended, if they are separated from each other by

+punctuation marks. This will be especially so, if the clauses are long.

+

+In preparing this hand-book, the aim has been to avoid, as much as

+possible, the use of technical terms. Whenever such terms are used,

+explanations will usually be found under the head of _Remarks_.

+

+

+RULE I. _Independent Clauses._—Independent clauses should be separated

+from each other by commas.

+

+

+EXAMPLES.

+

+“Savage was discomposed by the intrusion or omission of a comma, and

+he would lament an error of a single letter as a great calamity.”—_Dr.

+Johnson._

+

+    “Man wants but little here below,

+      Nor wants that little long.”—_Goldsmith._

+

+“Take short views, hope for the best, and trust in God.”—_Sydney Smith._

+

+

+REMARKS.

+

+1. An independent clause is one that is not dependent on any other clause

+for the completion of its meaning; as, Take short views | hope for the

+best | and trust in God. Independent clauses are frequently connected by

+_and_, _or_, _nor_, _but_.

+

+2. When the clauses are short and closely united, the comma may be

+omitted; as, “Death had lost its terrors and pleasure its charms.”

+

+3. When the clauses are long and divided into smaller portions by commas,

+they should be separated from each other by semicolons. See Rule I. p. 23.

+

+

+RULE II. _Dependent Clauses._—Dependent clauses should be separated from

+each other by commas.

+

+

+EXAMPLES.

+

+“If a man does not make new acquaintances as he advances through life, he

+will soon find himself left alone. A man, Sir, should keep his friendship

+in constant repair.”—_Dr. Johnson._

+

+“When Dr. Franklin wished to gain his enemy, he asked him to do him a

+favor.”

+

+“Clap an extinguisher upon your irony, if you are unhappily blest with a

+vein of it.”—_Lamb._

+

+“Although we seldom followed advice, we were all ready enough to ask

+it.”—_Goldsmith._

+

+

+REMARKS.

+

+1. A clause is said to be dependent, when it depends on some other clause

+to complete its meaning; as, When Dr. Johnson wished to gain his enemy |

+he asked him to do him a favor. The first clause of this sentence would

+not be complete in meaning without the second. Dependent clauses usually

+commence with _if_, _when_, _since_, _because_, _until_, &c.

+

+2. When clauses are closely connected, the comma may be omitted; as,

+Mozart published some music when seven years of age.

+

+

+RULE III. _Relative Clauses._—1. A relative clause should be separated

+from the rest of the sentence by a comma.

+

+2. But the comma should be omitted, when the relative clause is so

+closely connected with what precedes that it cannot be dropped without

+destroying the sense.

+

+

+EXAMPLES.

+

+1. “Men in a corner, who have the unhappiness of conversing too little

+with present things.”—_Swift._

+

+“The waters are nature’s storehouse, in which she locks up her

+wonders.”—_Izaak Walton._

+

+“He had on a coat made of that cloth called thunder-and-lightning, which,

+though grown too short, was much too good to be thrown away.”—_Goldsmith._

+

+2. “Althworthy here betook himself to those pleasing slumbers which

+a heart that hungers after goodness is apt to enjoy when thoroughly

+satisfied.”—_Fielding._

+

+“A man who is good for making excuses is good for nothing else.”—_Dr.

+Franklin._

+

+“Like Cæsar, Cortes wrote his own commentaries in the heart of the

+stirring scenes which form the subject of them.”—_Prescott._

+

+

+REMARKS.

+

+1. Relative clauses are generally introduced by the relative pronouns

+_who_, _which_, _that_, or _what_.

+

+2. A comma should be placed before the relative clause, even when it is

+necessary to complete the meaning of the antecedent,—

+

+    _a._ When the relative is immediately followed by a word or an

+    expression inclosed in commas; as, “As a man, he may not have

+    deserved the admiration which he received from those, who,

+    bewitched by his fascinating society, worshiped him nightly in

+    his favorite temple at Button’s.”—_Macaulay._

+

+    _b._ When the relative has several antecedents that are

+    separated from each other by commas; as, “All those arts,

+    rarities, and inventions, which vulgar minds gaze at, the

+    ingenious pursue, and all admire, are but the relics of an

+    intellect defaced with sin and time.”—_South._

+

+3. The words _of which_ are sometimes preceded by a comma, even when they

+are necessary to complete the meaning of the antecedent: as, “His mind

+was formed of those firm materials, of which nature formerly hammered

+out the Stoic, and upon which the sorrows of no man living could make an

+impression.”—_Fielding._

blob - /dev/null
blob + 1bee9ddac33d26872bdedd95c3f6b907e80c7492 (mode 644)
--- /dev/null
+++ 1-11.c
@@ -0,0 +1,39 @@
+/* 1-11 How would you test the word count program? What kinds of input are most
+ * likely to uncover bugs if there are any?
+ * 
+ * Test the word count program by comparing with the utility wc(1)
+ *
+ * Use input that involves lots of non-alphanumeric characters. See 1-11-text
+ *
+ * $ wc 1-11-text
+ * 	345    2161   14187 1-11-text
+ * $ ./a.out < 1-11-text
+ * 345 2265 14187
+ *
+ * The book provides a simplistic definition of a word.
+ */
+
+#include <stdio.h>
+
+#define IN  1
+#define OUT 0
+
+/* count lines, words, and characters in input */
+int main() {
+	int c, nl, nw, nc, state;
+
+	state = OUT;
+	nl = nw = nc = 0;
+	while ((c = getchar()) != EOF) {
+		++nc;
+		if (c == '\n')
+			++nl;
+		if (c == ' ' || c == '\n' || c == '\t')
+			state = OUT;
+		else if (state == OUT) {
+			state = IN;
+			++nw;
+		}
+	}
+	printf("%d %d %d\n", nl, nw, nc);
+}
blob - /dev/null
blob + 0754739561d8485022537978a767fb69dc7aa946 (mode 644)
--- /dev/null
+++ 1-12-text
@@ -0,0 +1,5 @@
+  "He was therefore, feasted and invited to all the court parties. At these he
+sometimes met the old Duchess of Bourbon, who, being a chess player of about
+his force, they very generally played together. Happening once to put her king
+into prize, the Doctor took it. 'Ah,' says she, 'we do not take kings so.' 'We
+do in America,' said the Doctor."--Thomas Jefferson.
blob - /dev/null
blob + 1aa1bb279997d14ffde30a11b1302c8c614a7310 (mode 644)
--- /dev/null
+++ 1-12.c
@@ -0,0 +1,19 @@
+/* 1-12 Write a program that prints its input one word per line. */
+
+#include <stdio.h>
+
+int main() {
+	int c;
+	enum { out, in } state = out;
+	while ((c = getchar()) != EOF) {
+		if (c == ' ' || c == '\t' || c == '\n') {
+			if (state == in)
+				putchar('\n');
+			state = out;
+		} else {
+			putchar(c);
+			state = in;
+		}
+
+	}
+}