Fix typos in Documentation/filesystems/seq_file.txt
PATCH 1/1 Fix typos in Documentation/filesystems/seq_file.txt
A couple of typos crept into the newly added document about the seq_file interface. This patch corrects those typos and simultaneously deletes a few superfluous blanks.
--- Documentation/filesystems/seq_file.txt | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-)
Documentation/filesystems/seq_file.txt +9 -9
@@ -6,7 +6,7 @@ The seq_file interface There are numerous ways for a device driver (or other kernel component) to -provide information to the user or system administrator. One useful +provide information to the user or system administrator. One useful technique is the creation of virtual files, in debugfs, /proc or elsewhere. Virtual files can provide human-readable output that is easy to get at without any special utility programs; they can also make life easier for
@@ -16,7 +16,7 @@ grown over the years. Creating those files correctly has always been a bit of a challenge, however. It is not that hard to make a virtual file which returns a string. But life gets trickier if the output is long - anything greater -than an application is likely to read in a single operation. Handling +than an application is likely to read in a single operation. Handling multiple reads (and seeks) requires careful attention to the reader's position within the virtual file - that position is, likely as not, in the middle of a line of output. The kernel has traditionally had a number of
@@ -50,7 +50,7 @@ following: Then concatenate the output files out1 and out2 and get the right result. Yes, it is a thoroughly useless module, but the point is to show -how the mechanism works without getting lost in other details. (Those +how the mechanism works without getting lost in other details. (Those wanting to see the full source for this module can find it at http://lwn.net/Articles/22359/).
@@ -92,14 +92,14 @@ implementations; in most cases the start() function should check for a "past end of file" condition and return NULL if need be. For more complicated applications, the private field of the seq_file -structure can be used. There is also a special value whch can be returned +structure can be used. There is also a special value which can be returned by the start() function called SEQ_START_TOKEN; it can be used if you wish to instruct your show() function (described below) to print a header at the top of the output. SEQ_START_TOKEN should only be used if the offset is zero, however. The next function to implement is called, amazingly, next(); its job is to -move the iterator forward to the next position in the sequence. The +move the iterator forward to the next position in the sequence. The example module can simply increment the position by one; more useful modules will do what is needed to step through some data structure. The next() function returns a new iterator, or NULL if the sequence is
@@ -146,7 +146,7 @@ the four functions we have just defined: This structure will be needed to tie our iterator to the /proc file in a little bit. -It's worth noting that the interator value returned by start() and +It's worth noting that the iterator value returned by start() and manipulated by the other functions is considered to be completely opaque by the seq_file code. It can thus be anything that is useful in stepping through the data to be output. Counters can be useful, but it could also be
@@ -261,13 +261,13 @@ routines useful: loff_t *ppos); These helpers will interpret pos as a position within the list and iterate -accordingly. Your start() and next() functions need only invoke the -seq_list_* helpers with a pointer to the appropriate list_head structure. +accordingly. Your start() and next() functions need only invoke the +seq_list_* helpers with a pointer to the appropriate list_head structure. The extra-simple version -For extremely simple virtual files, there is an even easier interface. A +For extremely simple virtual files, there is an even easier interface. A module can define only the show() function, which should create all the output that the virtual file will contain. The file's open() method then calls:
Signature · 1 line
1.5.3
Quoted 3 lines · On Sun, 13 Apr 2008 22:26:41 +0400 Dmitri Vorobiev wrote:
A couple of typos crept into the newly added document about the
seq_fileinterface. This patch corrects those typos and simultaneously deletes a few superfluous blanks.
The "2 spaces after a period at the end of a sentence" was done on purpose, I feel sure. It's not a mistake.
The other typo corrections & elimination of trailing whitespace look good. Thanks.
Quoted 4 lines
Signed-off-by Dmitri Vorobiev <[email protected]>--- Documentation/filesystems/seq_file.txt | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-)
---
~Randy
Randy Dunlap пишет:
Quoted 8 lines · On Sun, 13 Apr 2008 22:26:41 +0400 Dmitri Vorobiev wrote:
Quoted 4 lines
A couple of typos crept into the newly added document about the
seq_fileinterface. This patch corrects those typos and simultaneously deletes a few superfluous blanks.The "2 spaces after a period at the end of a sentence" was done on purpose, I feel sure. It's not a mistake.
OK, I'll redo the changes.
Actually, I was doubting whether the "2 spaces" thing was intentional or not. The overwhelming majority of the sentences in this document use only one space after a period, however, and this made me decide that the "2 spaces" thing had not been deliberate but just a typo.
Are there any rules about using spaces after a period at the end of a sentence?
Thanks,
Dmitri
Quoted 8 lines · Dmitri Vorobiev
Actually, I was doubting whether the "2 spaces" thing was intentional or not. The overwhelming majority of the sentences in this document use only one space after a period, however, and this made me decide that the "2 spaces" thing had not been deliberate but just a typo.
Are there any rules about using spaces after a period at the end of a sentence?
See Knuth (TeXbook) for the story on that...
Quoted 8 lines · Al Viro
Quoted 6 lines · Dmitri Vorobiev
Actually, I was doubting whether the "2 spaces" thing was intentional or not. The overwhelming majority of the sentences in this document use only one space after a period, however, and this made me decide that the "2 spaces" thing had not been deliberate but just a typo.
Quoted 5 lines
Quoted 2 lines
Are there any rules about using spaces after a period at the end of a sentence?
See Knuth (TeXbook) for the story on that...
Thanks, Al.
Dmitri
Quoted 8 lines · On Sun, 13 Apr 2008 23:45:47 +0100 Al Viro wrote:
Quoted 6 lines · Dmitri Vorobiev
Actually, I was doubting whether the "2 spaces" thing was intentional or not. The overwhelming majority of the sentences in this document use only one space after a period, however, and this made me decide that the "2 spaces" thing had not been deliberate but just a typo.
Quoted 4 lines
Quoted 2 lines
Are there any rules about using spaces after a period at the end of a sentence?
See Knuth (TeXbook) for the story on that...
I googled that but I don't see the history there.
AFAIK, 2 spaces at the end of sentences is a typewriter-ism, for easier visual separation of sentences.
Probably (just guessing here) has to do with monospace fonts vs. (not having) proportional ones there (usually).
---
~Randy
[Yes, I learned to type on a manual typewriter.]
Randy Dunlap пишет:
Quoted 12 lines · On Sun, 13 Apr 2008 23:45:47 +0100 Al Viro wrote:
Quoted 11 lines · Dmitri Vorobiev
Quoted 9 lines
Actually, I was doubting whether the "2 spaces" thing was intentional or not. The overwhelming majority of the sentences in this document use only one space after a period, however, and this made me decide that the "2 spaces" thing had not been deliberate but just a typo.
Are there any rules about using spaces after a period at the end of a sentence?
Quoted 8 lines
Quoted 1 line
See Knuth (TeXbook) for the story on that...
I googled that but I don't see the history there.
AFAIK, 2 spaces at the end of sentences is a typewriter-ism, for easier visual separation of sentences.
Probably (just guessing here) has to do with monospace fonts vs. (not having) proportional ones there (usually).
The following Wikipedia article is the most complete and exhaustive source I could find while researching the double spacing rules:
http://en.wikipedia.org/wiki/French_spacing
To put it briefly, there are three main conventions about inter-sentence spacing:
o English spacing a.k.a. American typewriter spacing: two spaces after full stop;
o French spacing, i.e. one space;
o traditional typography, which uses proportional fonts and is therefore not very much interesting here.
Offhand, it seems that the double spacing convention is being currently used in a more or less consistent manner throughout Linux docs. It also seems to me that this can be made a requirement and documented somewhere.
Thanks,
Dmitri
Quoted 5 lines
---
~Randy
[Yes, I learned to type on a manual typewriter.]
Jonathan Corbet
maintainerQuoted 3 lines · Dmitri Vorobiev
Offhand, it seems that the double spacing convention is being currently used in a more or less consistent manner throughout Linux docs. It also seems to me that this can be made a requirement and documented somewhere.
Double spacing is my preference, and I appreciate your sending a new patch which doesn't take that out.
But *please* let's not try to make "requirements" along those lines. If somebody's going to go to the trouble to write some documentation, I don't think we really want people bouncing it back to them with 100 "single space after period" errors from checkpatch.pl...
Thanks,
jon
Jonathan Corbet пишет:
Quoted 6 lines
Quoted 3 lines · Dmitri Vorobiev
Offhand, it seems that the double spacing convention is being currently used in a more or less consistent manner throughout Linux docs. It also seems to me that this can be made a requirement and documented somewhere.
Quoted 8 lines
Double spacing is my preference, and I appreciate your sending a new patch which doesn't take that out.
But *please* let's not try to make "requirements" along those lines. If somebody's going to go to the trouble to write some documentation, I don't think we really want people bouncing it back to them with 100 "single space after period" errors from checkpatch.pl...
OK, clear enough. Thanks.
Dmitri
Quoted 4 lines
Thanks,
jon
Quoted 6 lines · Jonathan Corbet
Quoted 3 lines · Dmitri Vorobiev
Offhand, it seems that the double spacing convention is being currently used in a more or less consistent manner throughout Linux docs. It also seems to me that this can be made a requirement and documented somewhere.
Quoted 7 lines
Double spacing is my preference, and I appreciate your sending a new patch which doesn't take that out.
But *please* let's not try to make "requirements" along those lines. If somebody's going to go to the trouble to write some documentation, I don't think we really want people bouncing it back to them with 100 "single space after period" errors from checkpatch.pl...
Big Ack on that.
Signature · 1 line
~Randy
Quoted 7 lines · Dmitri Vorobiev
To put it briefly, there are three main conventions about inter-sentence spacing:
o English spacing a.k.a. American typewriter spacing: two spaces after full stop;
o French spacing, i.e. one space;
French spacing has even weirder inter-word/operator spacing, like « this » and that !
Quoted 3 lines
Offhand, it seems that the double spacing convention is being currently used in a more or less consistent manner throughout Linux docs. It also seems to me that this can be made a requirement and documented somewhere.
I object. No matter how many (unescaped) spaces you cram in after a sentence stop, HTML engines will happily squash it when displayed [in text/html
mode of course], like <p>do as much english spacing. as you want,
it's still correctly fixed by the display :-)</p>.
Quoted 4 lines · Randy Dunlap
AFAIK, 2 spaces at the end of sentences is a typewriter-ism, for easier visual separation of sentences.
Probably (just guessing here) has to do with monospace fonts vs. (not having) proportional ones there (usually).
In a sense... Basically, the real rules are
* inter-sentence space is naturally wider than inter-word one
* if you need to stretch line, inter-sentence spaces get
proportionally more than inter-word ones.
* if you need to shrink line, they get proportionally less.
* there are fun extra considerations for quoted sentences and
friends.
For monospace almost nothing of that can be applied, but the first part (wider inter-sentence spaces) is more painful to ignore. The ratio for normally typeset text is going to be less than 2, but it's easier on eyes to approximate it with 2 than with 1...
Quoted 5 lines · Dmitri Vorobiev
Actually, I was doubting whether the "2 spaces" thing was intentional or not. The overwhelming majority of the sentences in this document use only one space after a period, however, and this made me decide that the "2 spaces" thing had not been deliberate but just a typo.
The 2-spaces ones were probably reformatted using 'fmt'. If fmt joins a line ending in a period, it will use 2 spaces. It does not change the spacing in non-joined lines, despite what the manpage says.
Nick.