Skip to content

Commit 9dfa236

Browse files
committed
Spelling corrections in docs;
Pull request #6 docs/APRDesign.html docs/canonical_filenames.html docs/incomplete_types Submitted by: "Bruno P. Kinoshita" <brunodepaulak yahoo.com.br> Pull request #10 misc/unix/errorcodes.c Submitted by: Jimmy Casey <casey.jimmy gmail.com> Backports: r1839622 git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1839623 13f79535-47bb-0310-9956-ffa450edef68
1 parent 49a5e69 commit 9dfa236

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

docs/APRDesign.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ <h2>Creating an APR Type</h2>
152152
<p>The current design of APR requires that most APR types be incomplete.
153153
It is not possible to write flexible portable code if programs can access
154154
the internals of APR types. This is because different platforms are
155-
likely to define different native types. There are only two execptions to
155+
likely to define different native types. There are only two exceptions to
156156
this rule:</p>
157157

158158
<ul>
@@ -227,7 +227,7 @@ <h2>Documentation</h2>
227227

228228
<p>For an actual example, look at any file in the include directory. The
229229
reason the docs are in the header files is to ensure that the docs always
230-
reflect the current code. If you change paramters or return values for a
230+
reflect the current code. If you change parameters or return values for a
231231
function, please be sure to update the documentation.</p>
232232

233233
<h2>APR Error reporting</h2>
@@ -246,7 +246,7 @@ <h2>APR Error reporting</h2>
246246

247247
<p>All platforms return errno values unchanged. Each platform can also have
248248
one system error type, which can be returned after an offset is added.
249-
There are five types of error values in APR, each with it's own offset.</p>
249+
There are five types of error values in APR, each with its own offset.</p>
250250

251251
<!-- This should be turned into a table, but I am lazy today -->
252252
<pre>
@@ -277,7 +277,7 @@ <h2>APR Error reporting</h2>
277277

278278
<strong>The difference in naming between APR_OS_START_ERROR and
279279
APR_OS_START_STATUS mentioned above allows programmers to easily determine if
280-
the error code indicates an error condition or a status codition.</strong>
280+
the error code indicates an error condition or a status condition.</strong>
281281

282282
<p>If your function has multiple return codes that all indicate success, but
283283
with different results, or if your function can only return PASS/FAIL, you
@@ -345,7 +345,7 @@ <h2>APR Error reporting</h2>
345345
an error string. If we convert all errors to a common subset, we have four
346346
steps to output an error string:</p>
347347

348-
<p>The seocnd problem with option 1, is that it is a lossy conversion. For
348+
<p>The second problem with option 1, is that it is a lossy conversion. For
349349
example, Windows and OS/2 have a couple hundred error codes, but POSIX errno
350350
only defines about 50 errno values. This means that if we convert to a
351351
canonical error value immediately, there is no way for the programmer to

docs/canonical_filenames.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ <h2>Requirements</h2>
88
<p>APR porters need to address the underlying discrepancies between
99
file systems. To achieve a reasonable degree of security, the
1010
program depending upon APR needs to know that two paths may be
11-
compared, and that a mismatch is guarenteed to reflect that the
11+
compared, and that a mismatch is guaranteed to reflect that the
1212
two paths do not return the same resource</p>.
1313

14-
<p>The first discrepancy is in volume roots. Unix and pure deriviates
14+
<p>The first discrepancy is in volume roots. Unix and pure derivatives
1515
have only one root path, "/". Win32 and OS2 share root paths of
1616
the form "D:/", D: is the volume designation. However, this can
1717
be specified as "//./D:/" as well, indicating D: volume of the
@@ -21,7 +21,7 @@ <h2>Requirements</h2>
2121
form "server/volume:/", or the simpler "volume:/" syntax for 'this'
2222
machine. All these non-Unix file systems accept volume:path,
2323
without a slash following the colon, as a path relative to the
24-
current working directory, which APR will treat as ambigious, that
24+
current working directory, which APR will treat as ambiguous, that
2525
is, neither an absolute nor a relative path per se.</p>
2626

2727
<p>The second discrepancy is in the meaning of the 'this' directory.
@@ -39,35 +39,35 @@ <h2>Requirements</h2>
3939
since the parent of the root is root. This gets tricky on the
4040
Win32 and OS2 platforms, since the ".." element is invalid before
4141
the "//server/share/" is complete, and the "//server/share/../"
42-
seqence is the complete UNC root "//server/share/". In relative
42+
sequence is the complete UNC root "//server/share/". In relative
4343
paths, leading ".." elements are significant, until they are merged
4444
with an absolute path. The relative form must only retain the ".."
4545
segments as leading segments, to be resolved once merged to another
4646
relative or an absolute path.</p>
4747

4848
<p>The fourth discrepancy occurs with acceptance of alternate character
49-
codes for the same element. Path seperators are not retained within
49+
codes for the same element. Path separators are not retained within
5050
the APR canonical forms. The OS filesystem and APR (slashed) forms
5151
can both be returned as strings, to be used in the proper context.
5252
Unix, Win32 and Netware all accept slashes and backslashes as the
53-
same path seperator symbol, although unix strictly accepts slashes.
53+
same path separator symbol, although unix strictly accepts slashes.
5454
While the APR form of the name strictly uses slashes, always consider
5555
that there could be a platform that actually accepts slashes as a
5656
character within a segment name.</p>
5757

58-
<p>The fifth and worst discrepancy plauges Win32, OS2, Netware, and some
58+
<p>The fifth and worst discrepancy plagues Win32, OS2, Netware, and some
5959
filesystems mounted in Unix. Case insensitivity can permit the same
6060
file to slip through in both it's proper case and alternate cases.
6161
Simply changing the case is insufficient for any character set beyond
62-
ASCII, since various dilectic forms of characters suffer from one to
62+
ASCII, since various dialectic forms of characters suffer from one to
6363
many or many to one translations. An example would be u-umlaut, which
6464
might be accepted as a single character u-umlaut, a two character
6565
sequence u and the zero-width umlaut, the upper case form of the same,
66-
or perhaps even a captial U alone. This can be handled in different
66+
or perhaps even a capital U alone. This can be handled in different
6767
ways depending on the purposes of the APR based program, but the one
6868
requirement is that the path must be absolute in order to resolve these
6969
ambiguities. Methods employed include comparison of device and inode
70-
file uniqifiers, which is a fairly fast operation, or quering the OS
70+
file uniqifiers, which is a fairly fast operation, or querying the OS
7171
for the true form of the name, which can be much slower. Only the
7272
acknowledgement of the file names by the OS can validate the equality
7373
of two different cases of the same filename.</p>
@@ -76,7 +76,7 @@ <h2>Requirements</h2>
7676
significant in non-unix file systems. Trailing periods are accepted
7777
but never stored, therefore trailing periods must be ignored for any
7878
form of comparison. And all OS's have certain expectations of what
79-
characters are illegal (or undesireable due to confusion.)</p>
79+
characters are illegal (or undesirable due to confusion.)</p>
8080

8181
<p>A final warning, canonical functions don't transform or resolve case
8282
or character ambiguity issues until they are resolved into an absolute
@@ -111,10 +111,10 @@ <h2>Canonical API</h2>
111111

112112
<p>In any case, returning the char* path, with a flag to request the proper
113113
case, forces the OS calls to resolve the true names of each segment. Where
114-
there is a penality for this operation and the stat device and inode test
114+
there is a penalty for this operation and the stat device and inode test
115115
is faster, case correction is postponed until the char* result is requested.
116116
On platforms that identify the inode, device, or proper name interchangably
117-
with no penalities, this may occur when the name is initially processed.</p>
117+
with no penalties, this may occur when the name is initially processed.</p>
118118

119119
<hr>
120120

docs/incomplete_types

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ typedef struct ap_file_t {
3838
#endif
3939
} ap_file_t;
4040

41-
This captures the essense of what is currently being defined for ap_file_t
41+
This captures the essence of what is currently being defined for ap_file_t
4242
using incomplete types. However, using this structure leads developers to
4343
believe that they are safe accessing any of the fields in this structure.
4444
This is not true. On some platforms, such as Windows, about half of the
@@ -53,7 +53,7 @@ macros, for example:
5353
#define filetype int
5454
#endif
5555

56-
And then in the defintion for ap_file_t, we could say:
56+
And then in the definition for ap_file_t, we could say:
5757
filetype filedes;
5858

5959
This gets rid of some of the complexity, by moving it off to the side, but
@@ -73,7 +73,7 @@ Having said all of that, sometimes incomplete types just don't make sense.
7373
For example, the first implementation of time functions used incomplete types,
7474
which added a layer of complexity that turned out to be unnecessary. If
7575
a platform cannot provide a simple number that represents the number of seconds
76-
elapsed since a specifed date and time, then APR doesn't really want to
76+
elapsed since a specified date and time, then APR doesn't really want to
7777
provide support for that platform.
7878

7979
APR is trying hard to provide a balance of incomplete and complete types,

misc/unix/errorcodes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ static char *native_strerror(apr_status_t statcode, char *buf,
369369
/* glibc style */
370370

371371
/* BeOS has the function available, but it doesn't provide
372-
* the prototype publically (doh!), so to avoid a build warning
372+
* the prototype publicly (doh!), so to avoid a build warning
373373
* we add a suitable prototype here.
374374
*/
375375
#if defined(BEOS)

0 commit comments

Comments
 (0)