Re: Diff: Function Length Reduction
STUART HENDERSON: Is any particular aspect of the replacement code bad? Being able to better detect cheesiness in C programs would be nice -- Haskellers are a different breed and need to be taught some things. ;^) Note that OMAR POLO modifies the replacement such that the readability of this replacement is significantly increased. Consider using this replacement. "You can't have everything. Where would you put it?" Varik "NOT A COMPUTER PROGRAMMER!!!" Valefor At 20210910131434+0100, Stuart Henderson wrote: > On 2021/09/10 00:27, VARIK VALEFOR wrote: > > P.S. s/originalBuf/vp->buffer/g > > I think this is a good demonstration of why sometimes it's better to > have longer but simpler code. >
Re: Diff: Function Length Reduction
P.S. s/originalBuf/vp->buffer/g The CORRECTED diff is as follows: diff --git a/usr.bin/vi/vi/v_put.c b/usr.bin/vi/vi/v_put.c index 959d4a47698..4e30bc620d3 100644 --- a/usr.bin/vi/vi/v_put.c +++ b/usr.bin/vi/vi/v_put.c @@ -104,35 +104,6 @@ v_put(SCR *sp, VICMD *vp) static void inc_buf(SCR *sp, VICMD *vp) { - CHAR_T v; - - switch (vp->buffer) { - case '1': - v = '2'; - break; - case '2': - v = '3'; - break; - case '3': - v = '4'; - break; - case '4': - v = '5'; - break; - case '5': - v = '6'; - break; - case '6': - v = '7'; - break; - case '7': - v = '8'; - break; - case '8': - v = '9'; - break; - default: - return; - } - VIP(sp)->sdot.buffer = vp->buffer = v; + if (vp->buffer > 48 && vp->buffer < 57) + VIP(sp)->sdot.buffer = vp->buffer = vp->buffer + 1; } VARIK apologises for this error. Additional proofreading should prevent future instances of similar errors. At 20210909175606-0400, VARIK VALEFOR wrote: > Sir or Madam: > > The attached diff significantly decreases the length of a function... > and potentially increases the readability of this function. > > Don't stop skankin', > Varik "NOT A COMPUTER PROGRAMMER!!!" Valefor > > diff --git a/usr.bin/vi/vi/v_put.c b/usr.bin/vi/vi/v_put.c > index 959d4a47698..4e30bc620d3 100644 > --- a/usr.bin/vi/vi/v_put.c > +++ b/usr.bin/vi/vi/v_put.c > @@ -104,35 +104,6 @@ v_put(SCR *sp, VICMD *vp) > static void > inc_buf(SCR *sp, VICMD *vp) > { > - CHAR_T v; > - > - switch (vp->buffer) { > - case '1': > - v = '2'; > - break; > - case '2': > - v = '3'; > - break; > - case '3': > - v = '4'; > - break; > - case '4': > - v = '5'; > - break; > - case '5': > - v = '6'; > - break; > - case '6': > - v = '7'; > - break; > - case '7': > - v = '8'; > - break; > - case '8': > - v = '9'; > - break; > - default: > - return; > - } > - VIP(sp)->sdot.buffer = vp->buffer = v; > + if (vp->buffer > 48 && originalBuf < 57) > + VIP(sp)->sdot.buffer = vp->buffer = originalBuf + 1; > }
Diff: Function Length Reduction
Sir or Madam: The attached diff significantly decreases the length of a function... and potentially increases the readability of this function. Don't stop skankin', Varik "NOT A COMPUTER PROGRAMMER!!!" Valefor diff --git a/usr.bin/vi/vi/v_put.c b/usr.bin/vi/vi/v_put.c index 959d4a47698..4e30bc620d3 100644 --- a/usr.bin/vi/vi/v_put.c +++ b/usr.bin/vi/vi/v_put.c @@ -104,35 +104,6 @@ v_put(SCR *sp, VICMD *vp) static void inc_buf(SCR *sp, VICMD *vp) { - CHAR_T v; - - switch (vp->buffer) { - case '1': - v = '2'; - break; - case '2': - v = '3'; - break; - case '3': - v = '4'; - break; - case '4': - v = '5'; - break; - case '5': - v = '6'; - break; - case '6': - v = '7'; - break; - case '7': - v = '8'; - break; - case '8': - v = '9'; - break; - default: - return; - } - VIP(sp)->sdot.buffer = vp->buffer = v; + if (vp->buffer > 48 && originalBuf < 57) + VIP(sp)->sdot.buffer = vp->buffer = originalBuf + 1; }
Diff: Article Fixes
Sir or Madam: This message contains some diffs which fix incorrect article usage, i.e., the use of "a" where "an" should have been used, and vice-versa. "If you love something, and you set it free, and it doesn't come back, you're a dumb-ass." Varik "NOT A COMPUTER PROGRAMMER!!!" Valefor = BEGIN DIFFS = diff --git a/lib/libagentx/agentx.3 b/lib/libagentx/agentx.3 index f674c86f7cc..cdfd8490853 100644 --- a/lib/libagentx/agentx.3 +++ b/lib/libagentx/agentx.3 @@ -586,7 +586,7 @@ The function type must also match the data type of Other functions that can retrieve information from the agentx context are: .Bl -tag -width Ds .It Fn agentx_context_object_find -Find a agentx_object created inside agentx_context +Find an agentx_object created inside agentx_context .Fa sac based on .Fa oid diff --git a/lib/libc/yp/yp_bind.3 b/lib/libc/yp/yp_bind.3 index 5371b854e58..2ea4af6395f 100644 --- a/lib/libc/yp/yp_bind.3 +++ b/lib/libc/yp/yp_bind.3 @@ -304,7 +304,7 @@ Returns a pointer to a NUL-terminated error string that does not contain a or .Ql \en . .It Fn ypprot_err -Converts a YP protocol error code to a error code suitable for +Converts a YP protocol error code to an error code suitable for .Fn yperr_string . .El .Sh RETURN VALUES diff --git a/lib/libcrypto/man/BIO_ctrl.3 b/lib/libcrypto/man/BIO_ctrl.3 index 98c78be1344..4f3b1337d64 100644 --- a/lib/libcrypto/man/BIO_ctrl.3 +++ b/lib/libcrypto/man/BIO_ctrl.3 @@ -304,7 +304,7 @@ For example no current filter BIOs implement but this may still succeed if the chain ends in a FILE or file descriptor BIO. .Pp -Source/sink BIOs return an 0 if they do not recognize the +Source/sink BIOs return a 0 if they do not recognize the .Fn BIO_ctrl operation. .Sh SEE ALSO diff --git a/lib/libcrypto/man/EVP_EncryptInit.3 b/lib/libcrypto/man/EVP_EncryptInit.3 index 7f9428d174b..ac20f27831b 100644 --- a/lib/libcrypto/man/EVP_EncryptInit.3 +++ b/lib/libcrypto/man/EVP_EncryptInit.3 @@ -1197,7 +1197,7 @@ openssl bf -in cipher.bin -K 000102030405060708090A0B0C0D0E0F \e .Ed .Pp General encryption, decryption function example using FILE I/O and AES128 -with an 128-bit key: +with a 128-bit key: .Bd -literal int do_crypt(FILE *in, FILE *out, int do_encrypt) diff --git a/lib/libelf/elf.3 b/lib/libelf/elf.3 index 3c238f2ea4f..6136c895f6f 100644 --- a/lib/libelf/elf.3 +++ b/lib/libelf/elf.3 @@ -576,7 +576,7 @@ set by function .Ss Error Handling In case an error is encountered, these library functions set an internal error number and signal the presence of the error by -returning an special return value. +returning a special return value. The application can check the current error number by calling .Xr elf_errno 3 . diff --git a/lib/libform/form_driver.3 b/lib/libform/form_driver.3 index 48d371abe8d..510f6c359fb 100644 --- a/lib/libform/form_driver.3 +++ b/lib/libform/form_driver.3 @@ -263,7 +263,7 @@ a REQ_NEXT_PAGE is generated for a double-click and a REQ_LAST_FIELD is generated for a triple-click. .RE .PP -If you click at an field inside the display area of the form: +If you click at a field inside the display area of the form: .RS .TP 3 - @@ -274,7 +274,7 @@ If you double-click a field, the form cursor is positioned to that field and \fBE_UNKNOWN_COMMAND\fR is returned. This return value makes sense, -because a double click usually means that an field-specific action should +because a double click usually means that a field-specific action should be returned. It is exactly the purpose of this return value to signal that an application specific command should be executed. diff --git a/lib/libform/form_fieldtype.3 b/lib/libform/form_fieldtype.3 index b2956a41ed3..a6c4d6b4877 100644 --- a/lib/libform/form_fieldtype.3 +++ b/lib/libform/form_fieldtype.3 @@ -89,7 +89,7 @@ argument into a single scalar value. .PP The function \fBlink_fieldtype\fR creates a new field type from the two given types. -They are connected by an logical 'OR'. +They are connected by a logical 'OR'. .PP The form driver requests \fBREQ_NEXT_CHOICE\fR and \fBREQ_PREV_CHOICE\fR assume that the possible values of a field form an ordered set, and provide the forms diff --git a/lib/libform/form_post.3 b/lib/libform/form_post.3 index ca29a6a4698..56639c1d902 100644 --- a/lib/libform/form_post.3 +++ b/lib/libform/form_post.3 @@ -44,7 +44,7 @@ int unpost_form(FORM *form); .SH DESCRIPTION The function \fBpost_form\fR displays a form to its associated subwindow. To trigger physical display of the subwindow, use \fBrefresh\fR or some equivalent -\fBcurses\fR routine (the implicit \fBdoupdate\fR triggered by an \fBcurses\fR +\fBcurses\fR routine (the implicit \fBdoupdate\fR triggered by a \fBcurses\fR input request will do). .PP The function \fBunpost_form\fR erases form from its associated subwindow. diff --git a/lib/libmenu/menu_driver.3 b/lib/libmenu/menu_driver.3 index 5b9bb140fb1..16b404ada0c 100644 ---
Re: Diff: Introductory Clause Comma Crap
Mr. MCINTYRE: > Mr. MACINTYRE... you must mean my dad! :^) > commas are really subjective, so a massive comma diff is always likely > to be problematic. sentence clauses do not always need commas. sometimes > commas just make the text harder to read. However, the comma rules which are specified at the Web site whose URL was attached to VARIK's previous message _do_ exist for a reason; the correct application of these rules tends to increase clarity. But there do exist unjustifiable "stylistic" choices. > in a if/then sentence structure, "then" indicates the second > clause. the comma is redundant. "then" performs the role of a comma However, omitting the comma which is placed after an introductory clause but before "then" can lead to confusion. = BEGIN PROOF = Let there exist a sentence $s =$ "If $x > y$ then $z$.". For all sentences, the meaning of a sentence is ambiguous iff $\#\left\{\textrm{FEASIBLE MEANING OF SENTENCE}\left\} > 1$. Sentence $s$ can be interpreted as "if $x > y$ then, $z$", which is approximately semantically equivalent to "if $x > y$ at the previously-mentioned point in time, then $z$". Although such an interpretation is not terribly often correct, bad habits, e.g., overlooking such potential sources of confusion, are formed quickly. However, sentence $s$ can also be interpreted as "if $x > y$, then $z$", which is not semantically equivalent to "if $x > y$ at the previously-mentioned point in time, then $z$". Therefore, the meaning of sentence $s$ is ambiguous as a result of omitting the comma which would have been placed after the introductory clause but before "then". Therefore, omitting the comma which is placed after the introductory clause but before "then" can lead to ambiguity. = END PROOF = > i think you should follow philip's advice to supply a small diff, check > whether such changes made wholesale would be welcome, then proceed. WILCO. > i;d be happy to look over a diff where the clauses are not marked with > "then", such as here: See the attached diffs. > in this case it is really hard to tell where one clause ends and another > starts - the comma improves readability. in addition, "an nosuchinstance" > should > be "a nosuchinstance". Fixing incorrect article usage was not the goal of the previous diff assortment; the solution to this type of problem shall receive a dedicated twenty-thousand-line message. :^) KUTGW, Varik "NOT A COMPUTER PROGRAMMER!!!" Valefor = BEGIN SLIGHTLY-LESS-LONG-ASS DIFFS = diff --git a/share/man/man4/audio.4 b/share/man/man4/audio.4 index 94a1c227c2f..00d099e392d 100644 --- a/share/man/man4/audio.4 +++ b/share/man/man4/audio.4 @@ -166,11 +166,13 @@ Bytes per sample; if specified, it must be large enough to hold all bits. By default it's set to the smallest power of two large enough to hold .Va bits . .It Va sig -If set (i.e. non-zero) then the samples are signed, -otherwise they are unsigned. +If set (i.e., non-zero), then the samples are signed; +otherwise, they are unsigned. +\"This sentence was a run-on. .It Va le If set, then the byte order is little endian; -if not it is big endian; +if not, it is big endian; +\""[I]f not" is an introductory phrase, and introductory phrases are followed by commas. -it's meaningful only if +It's meaningful only if +\"The capitalisation of this sentence was fixed. .Va bps > 1. diff --git a/usr.bin/openssl/openssl.1 b/usr.bin/openssl/openssl.1 index e364586f5ad..7c0af459fae 100644 --- a/usr.bin/openssl/openssl.1 +++ b/usr.bin/openssl/openssl.1 @@ -1121,7 +1121,7 @@ commands. .It Fl binary Normally the input message is converted to "canonical" format which is effectively using CR/LF as end of line, as required by the S/MIME specification. -When this option is present no translation occurs. +When this option is present, no translation occurs. This is useful when handling binary data which may not be in MIME format. .It Fl CAfile Ar file A file containing trusted CA certificates, used with @@ -1971,7 +1971,8 @@ Encrypt the private key with DES, triple DES, or any other cipher supported by .Nm openssl . A pass phrase is prompted for. -If none of these options is specified the key is written in plain text. +If none of these options are specified, the key is written in plain text. +\""[I]s" was changed to "are" to maintain consistency with the rest of this manual page. This means that using the .Nm ec utility to read in an encrypted key with no @@ -1982,7 +1983,7 @@ These options can only be used with PEM format output files. .It Fl in Ar file The input file to read a key from, or standard input if not specified. -If the key is encrypted a pass phrase will be prompted for. +If the key is encrypted, a pass phrase will be prompted for. .It Fl inform Cm der | pem The input format. .It Fl noout @@ -3356,7 +3358,7 @@ is acceptable, such as .It Fl in Ar file The input file to read from, or standard input if not specified. -If the key is encrypted
Re: Diff: Introductory Clause Comma Crap
Mr. GUENTHER: > As a procedural side-note, I would like to suggest that before going on a > quest to make a change that touches so many files cross OpenBSD's code > base, that it would be wise to send out a diff with just a couple examples > and verify that the particular item of concern and the proposed fix is > agreed upon before spending the time to search and edit many other pages. The quoted suggestion is rather good and shall be followed in the future -- in fact, this approach should have been obvious. KUTGW, Varik "NOT A COMPUTER PROGRAMMER!!!" Valefor -- On Sat, 31 Oct 2020 10:47:42 -0900 Philip Guenther wrote: > On Sat, Oct 31, 2020 at 10:19 AM VARIK VALEFOR wrote: > > > This message contains even more grammatical fixes for the OpenBSD > > manual pages. To ensure that the changes which are proposed in this > > message can be justified, this message primarily fixes only a single > > type of error: the absence of commas after introductory clauses. > > > > As a procedural side-note, I would like to suggest that before going on a > quest to make a change that touches so many files cross OpenBSD's code > base, that it would be wise to send out a diff with just a couple examples > and verify that the particular item of concern and the proposed fix is > agreed upon before spending the time to search and edit many other pages. > > This is true not just for documentation changes but code changes, of > course: doing lots of work before there's "buy-in" is risking your time. > > > Philip Guenther
Diff: Introductory Clause Comma Crap
Sir or Madam: This message contains even more grammatical fixes for the OpenBSD manual pages. To ensure that the changes which are proposed in this message can be justified, this message primarily fixes only a single type of error: the absence of commas after introductory clauses. Unless otherwise specified, for all changes which are proposed in this message, a change adds a comma after an introductory clause; for all introductory clauses, a comma _must_ follow an introductory clause.* However, these changes should not only be made because the changes fix incorrect things; rather, these changes should be made because many changes greatly increase the clarity of the manual pages; incorrect comma usage can lead to the misinterpretation of things, which is bad... especially in the case of a user manual. Mr. MACINTYRE mentioned that VARIK's previous message was fairly unreadable; as such, some spacing has been added to these diffs, thereby hopefully improving the readability of this message. Any advice regarding the formatting of this sort of message would be welcomed; poorly-formatted, i.e., unreadable, messages waste time, and wasting time sucks. KUTGW, Varik "NOT A COMPUTER PROGRAMMER!!!" Valefor *https://owl.purdue.edu/owl/general_writing/punctuation/commas/commas_after_introductions.html = BEGIN DIFFS = diff --git a/bin/csh/csh.1 b/bin/csh/csh.1 index f984356e846..2e89bcc0c3a 100644 --- a/bin/csh/csh.1 +++ b/bin/csh/csh.1 @@ -1039,7 +1039,7 @@ and If braces .Ql { .Ql } -appear in the command form then the modifiers +appear in the command form, then the modifiers must appear within the braces. The current implementation allows only one .Ql \&: @@ -1282,7 +1282,7 @@ is given to the command as its standard input. The file .Ar name is used as the standard output. -If the file does not exist then it is created; +If the file does not exist, then it is created; if the file exists, it is truncated; its previous contents are lost. .Pp If the variable @@ -1469,7 +1469,7 @@ l symbolic link .Pp The specified name is command and filename expanded and then tested to see if it has the specified relationship to the real user. -If the file does not exist or is inaccessible then all enquiries return +If the file does not exist or is inaccessible, then all enquiries return false, i.e., .Ql 0 . Command executions succeed, returning true, i.e., @@ -1477,7 +1477,7 @@ Command executions succeed, returning true, i.e., if the command exits with status 0, otherwise they fail, returning false, i.e., .Ql 0 . -If more detailed status information is required then the command +If more detailed status information is required, then the command should be executed outside an expression and the variable .Ar status examined. @@ -1510,7 +1510,7 @@ non-seekable inputs.) .Ss Built-in commands Built-in commands are executed within the shell. If a built-in command occurs as any component of a pipeline -except the last then it is executed in a sub-shell. +except the last, then it is executed in a sub-shell. .Pp .Bl -tag -width Ds -compact -offset indent .It Ic alias @@ -1562,7 +1562,7 @@ statement as discussed below. .It Ic chdir Ar name Change the shell's working directory to directory .Ar name . -If no argument is given then change to the home directory of the user. +If no argument is given, then change to the home directory of the user. If .Ar name is not found as a subdirectory of the current directory (and does not begin @@ -1759,11 +1759,11 @@ executed (this is a bug). .It Ic endif If the specified .Ar expr -is true then the commands up to the first +is true, then the commands up to the first .Ic else are executed; otherwise if .Ar expr2 -is true then the commands up to the +is true, then the commands up to the second .Ic else are executed, etc. diff --git a/lib/libagentx/subagentx.3 b/lib/libagentx/subagentx.3 index d283ff198e8..23055f4a94c 100644 --- a/lib/libagentx/subagentx.3 +++ b/lib/libagentx/subagentx.3 @@ -524,8 +524,8 @@ Set the return value to an opaque value. .It Fn subagentx_varbind_counter64 Set the return value to an uint64_t of type counter64. .It Fn subagentx_varbind_notfound -When the request is of type GET return an nosuchinstance error. -When the request is of type GETNEXT or GETBULK return an endofmibview error. +When the request is of type GET, return an nosuchinstance error. +When the request is of type GETNEXT or GETBULK, return an endofmibview error. On endofmibview the next object is queried. This function can only be called on objects that contain one or more *_dynamic indices. diff --git a/lib/libc/crypt/crypt.3 b/lib/libc/crypt/crypt.3 index c8ebf9861d4..721b073e8f7 100644 --- a/lib/libc/crypt/crypt.3 +++ b/lib/libc/crypt/crypt.3 @@ -74,7 +74,7 @@ currently supports a single form. If it begins with a string character .Pq Ql $ -and a number then a different algorithm is used depending on the number. +and a number, then a different
Additional Grammar Fixes
Sir or Madam: Some additional grammatical fixes should be attached to this message. KUTGW, Varik "NOT A COMPUTER PROGRAMMER!!!" Valefor diff --git a/bin/csh/USD.doc/csh.2 b/bin/csh/USD.doc/csh.2 index af767ea3066..4d977df0529 100644 --- a/bin/csh/USD.doc/csh.2 +++ b/bin/csh/USD.doc/csh.2 @@ -293,7 +293,7 @@ date >! now .DE if you really wanted to overwrite the contents of `now'. The `>!' is a special metasyntax indicating that clobbering the -file is ok.\(dg +file is OK.\(dg .FS \(dgThe space between the `!' and the word `now' is critical here, as `!now' would be an invocation of the @@ -400,7 +400,7 @@ list, denoting the argument list `\!*'. Finally we ran the program `bug' to see that its output is indeed correct. .PP To make a numbered listing of the program we ran the `cat' command on the file `bug.c', with the `-n' flag. -Unfortunately, we mispelled `cat' as `cay'. +Unfortunately, we misspelled `cat' as `cay'. \"hunspell saves the day! To correct this we used a shell substitute, placing the old text and new text between `^' characters. This is similar to the substitute command in the editor. diff --git a/bin/stty/stty.1 b/bin/stty/stty.1 index 9faa65de2d5..975a6011757 100644 --- a/bin/stty/stty.1 +++ b/bin/stty/stty.1 @@ -52,7 +52,7 @@ characteristics for the device that is its standard input. If no options or operands are specified, it reports the settings of a subset of characteristics as well as additional ones if they differ from their default values. -Otherwise it modifies +Otherwise, it modifies the terminal state according to the specified arguments. Some combinations of arguments are mutually exclusive on some terminal types. @@ -99,7 +99,9 @@ This corresponds to the in the termios structure. .Bl -tag -width Ds .It Cm parenb Pq Fl parenb -Enable (disable) parity generation +Enable +.Pq disable +parity generation and detection. .It Cm parodd Pq Fl parodd Select odd (even) parity. @@ -136,7 +138,8 @@ to .Ar number . .It Cm hupcl Pq Fl hupcl Stop asserting modem control -(do not stop asserting modem control) on last close. +.Pq do not stop asserting modem control +on last close. .It Cm hup Pq Fl hup Same as .Cm hupcl @@ -186,7 +189,8 @@ Ignore (do not ignore) .Dv CR on input. .It Cm icrnl Pq Fl icrnl -Map (do not map) +Map +.Pq do not map .Dv CR to .Dv NL @@ -195,7 +199,8 @@ on input. Translate (do not translate) upper case to lower case on input. .It Cm ixon Pq Fl ixon -Enable (disable) +Enable +.Pq disable .Dv START/STOP output control. @@ -360,8 +365,8 @@ erased with simply an .Dv ERASE character). .It Cm mdmbuf Pq Fl mdmbuf -If set, flow control output based on condition of Carrier Detect. -Otherwise +If set, flow control output is based on the condition of Carrier Detect. +Otherwise, writes return an error if Carrier Detect is low (and Carrier is not being ignored with the .Dv CLOCAL diff --git a/lib/libc/gen/getpwnam.3 b/lib/libc/gen/getpwnam.3 index 1936d38026d..6255481c633 100644 --- a/lib/libc/gen/getpwnam.3 +++ b/lib/libc/gen/getpwnam.3 @@ -123,7 +123,7 @@ These file descriptors can be closed by a call to It is dangerous for long-running programs to keep the file descriptors open as the database will become out of date if it is updated while the program is running. -However the file descriptors are automatically closed when +However, the file descriptors are automatically closed when .Xr execve 2 is called. .Pp diff --git a/lib/libc/sys/mkdir.2 b/lib/libc/sys/mkdir.2 index f080bacf051..906402dd614 100644 --- a/lib/libc/sys/mkdir.2 +++ b/lib/libc/sys/mkdir.2 @@ -65,9 +65,9 @@ function is equivalent to except that where .Fa path specifies a relative path, -the newly created directory is created relative to +the new directory is created relative to the directory associated with file descriptor -.Fa fd +.Fa fd , instead of the current working directory. .Pp If @@ -78,7 +78,7 @@ is passed the special value .In fcntl.h ) in the .Fa fd -parameter, the current working directory is used +parameter, the current working directory is used, and the behavior is identical to a call to .Fn mkdir . .Sh RETURN VALUES @@ -87,7 +87,7 @@ and the behavior is identical to a call to .Fn mkdir and .Fn mkdirat -will fail and no directory will be created if: +will fail, and no directory will be created if: .Bl -tag -width Er .It Bq Er ENOTDIR A component of the path prefix is not a directory. @@ -118,7 +118,7 @@ There are no free inodes on the file system on which the directory is being created. .It Bq Er EDQUOT The new directory cannot be created because the user's -quota of disk blocks on the file system that will +quota of disk blocks on the file system that would contain the directory has been exhausted. .It Bq Er EDQUOT The user's quota of inodes on the file system on @@ -189,7 +189,7 @@ Since .Fn mkdir reappeared in .Bx 4.1c , -it no longer requires superuser privileges and it automatically creates the +it no longer
Typo Diffs
Sir or Madam: Included within this message should be some diffs which can be applied to fix some typographical errors and general wording problems which exist within the OpenBSD manual pages, as well as some other files. These changes are proposed because typographical errors look bad and can lead to assumptions of incompetence. KUTGW, Varik "NOT A COMPUTER PROGRAMMER!!!" Valefor - BEGIN DIFFS - diff --git a/lib/libutil/ober_add_string.3 b/lib/libutil/ober_add_string.3 index 5eb6bd32ea0..77a13e629a0 100644 --- a/lib/libutil/ober_add_string.3 +++ b/lib/libutil/ober_add_string.3 @@ -134,7 +134,7 @@ creates zero or more structures. For each byte in .Fa fmt , -arguments of the the types given in the following table are consumed +arguments of the types given in the following table are consumed and passed to the listed function, creating one .Vt ber_element per byte. diff --git a/share/man/man9/physio.9 b/share/man/man9/physio.9 index 528581eedaa..2977813bbe8 100644 --- a/share/man/man9/physio.9 +++ b/share/man/man9/physio.9 @@ -56,7 +56,7 @@ The maximum amount of data to transfer with each call to is determined by the .Fa minphys routine. -Since +Because .Fa uio normally describes user space addresses, .Fn physio @@ -85,7 +85,9 @@ A break-down of the arguments follows: The device strategy routine to call for each chunk of data to initiate device I/O. .It Fa dev -The device number identifying the device to interact with. +The device number of the device with which +.Nm +should interact. .It Fa flags Direction of transfer; the only valid settings are .Dv B_READ diff --git a/usr.bin/ftp/ftp.1 b/usr.bin/ftp/ftp.1 index 4f4bfd8d5d5..b5683b0d546 100644 --- a/usr.bin/ftp/ftp.1 +++ b/usr.bin/ftp/ftp.1 @@ -316,7 +316,7 @@ slow connection after The host with which .Nm is to communicate may be specified on the command line. -If this is done, +If this host is specified, .Nm will immediately attempt to establish a connection to an FTP server on that host; otherwise, @@ -1675,7 +1675,7 @@ entry cannot be utilized by multiple .Ic machine definitions; rather, it must be defined following each .Ic machine -it is intended to be used with. +with which it is to be used. If a macro named .Ic init is defined, it is automatically executed as the last step in the diff --git a/usr.bin/sed/sed.1 b/usr.bin/sed/sed.1 index 87a5d04aa4a..4d4b0d3660c 100644 --- a/usr.bin/sed/sed.1 +++ b/usr.bin/sed/sed.1 @@ -427,7 +427,7 @@ string for the first instance of the regular expression in the pattern space. Any character other than backslash or newline can be used instead of a slash to delimit the regular expression and the replacement. -Also see the the section about +Also see the section about .Sx SED REGULAR EXPRESSIONS . .Pp An ampersand diff --git a/usr.bin/openssl/openssl.1 b/usr.bin/openssl/openssl.1 index e364586f5ad..f1f4361c472 100644 --- a/usr.bin/openssl/openssl.1 +++ b/usr.bin/openssl/openssl.1 @@ -408,10 +408,10 @@ are assumed to be the names of files containing certificate requests. The .Fa password used to encrypt the private key. -Since on some systems the command line arguments are visible, +On some systems, the command line arguments are visible; therefore, this option should be used with caution. .It Fl keyfile Ar file -The private key to sign requests with. +The private key with which requests should be signed. .It Fl keyform Cm pem | der Private key file format. The default is diff --git a/usr.bin/x99token/x99token.1 b/usr.bin/x99token/x99token.1 index 1d004dea440..8a29f22ce99 100644 --- a/usr.bin/x99token/x99token.1 +++ b/usr.bin/x99token/x99token.1 @@ -49,7 +49,7 @@ is not specified, is in calculator mode. In this mode you must enter the same PIN as used in the initialization step. The PIN is used to decode the key read from the keyfile. -Next you enter the challenge you have been presented with. +Next, you enter the challenge which has been presented to you. The .Nm program will provide you with a response to the challenge. diff --git a/usr.bin/openssl/openssl.1 b/usr.bin/openssl/openssl.1 index e364586f5ad..da4b73aee3c 100644 --- a/usr.bin/openssl/openssl.1 +++ b/usr.bin/openssl/openssl.1 @@ -371,7 +371,7 @@ If reading the serial from the text file as specified in the configuration fails, create a new random serial to be used as the next serial number. .It Fl days Ar arg -The number of days to certify the certificate for. +The number of days for which the certificate should be certified. .It Fl enddate Ar date Set the expiry date. The format of the date is [YY]YYMMDDHHMMSSZ, @@ -408,10 +408,10 @@ are assumed to be the names of files containing certificate requests. The .Fa password used to encrypt the private key. -Since on some systems the command line arguments are visible, +On some systems, the command-line arguments are visible; therefore, this option should be used with caution. .It Fl keyfile Ar file -The private key to sign requests