Skip to content

Commit ef6f96e

Browse files
authored
Merge pull request #2088 from Coeur/spelling
spelling corrections
2 parents 44de731 + a1eebb5 commit ef6f96e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+145
-145
lines changed

CoreFoundation/Base.subproj/CFFileUtilities.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1245,7 +1245,7 @@ CFStringRef _CFXDGCreateConfigHomePath(void) {
12451245
/// a set of preference ordered base directories relative to which data files should be searched. This set of directories is defined by the environment variable $XDG_DATA_DIRS.
12461246
CF_CROSS_PLATFORM_EXPORT
12471247
CFArrayRef _CFXDGCreateDataDirectoriesPaths(void) {
1248-
// $XDG_DATA_DIRS defines the preference-ordered set of base directories to search for data files in addition to the $XDG_DATA_HOME base directory. The directories in $XDG_DATA_DIRS should be seperated with a colon ':'.
1248+
// $XDG_DATA_DIRS defines the preference-ordered set of base directories to search for data files in addition to the $XDG_DATA_HOME base directory. The directories in $XDG_DATA_DIRS should be separated with a colon ':'.
12491249
// If $XDG_DATA_DIRS is either not set or empty, a value equal to /usr/local/share/:/usr/share/ should be used.
12501250
const char *dataDirectoriesPaths = __CFgetenv("XDG_DATA_DIRS");
12511251
CFStringRef defaultPath[2];
@@ -1269,7 +1269,7 @@ CFArrayRef _CFXDGCreateDataDirectoriesPaths(void) {
12691269
/// a set of preference ordered base directories relative to which configuration files should be searched. This set of directories is defined by the environment variable $XDG_CONFIG_DIRS.
12701270
CF_CROSS_PLATFORM_EXPORT
12711271
CFArrayRef _CFXDGCreateConfigDirectoriesPaths(void) {
1272-
// $XDG_CONFIG_DIRS defines the preference-ordered set of base directories to search for configuration files in addition to the $XDG_CONFIG_HOME base directory. The directories in $XDG_CONFIG_DIRS should be seperated with a colon ':'.
1272+
// $XDG_CONFIG_DIRS defines the preference-ordered set of base directories to search for configuration files in addition to the $XDG_CONFIG_HOME base directory. The directories in $XDG_CONFIG_DIRS should be separated with a colon ':'.
12731273
// If $XDG_CONFIG_DIRS is either not set or empty, a value equal to /etc/xdg should be used.
12741274
const char *configDirectoriesPaths = __CFgetenv("XDG_CONFIG_DIRS");
12751275
CFStringRef defaultPath[1];

CoreFoundation/Base.subproj/CFInternal.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ CF_PRIVATE bool __CFBinaryPlistIsArray(const uint8_t *databytes, uint64_t datale
938938

939939
#if 0
940940
#pragma mark -
941-
#pragma mark Windows Compatability
941+
#pragma mark Windows Compatibility
942942
#endif
943943

944944
// Need to use the _O_BINARY flag on Windows to get the correct behavior

CoreFoundation/Base.subproj/ForFoundationOnly.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ typedef struct {
109109
Boolean (*_Null_unspecified synchronize)(CFTypeRef context, void *domain);
110110
void (*_Null_unspecified getKeysAndValues)(CFAllocatorRef _Nullable alloc, CFTypeRef context, void *domain, void *_Null_unspecified * _Null_unspecified buf[_Null_unspecified], CFIndex *numKeyValuePairs);
111111
CFDictionaryRef _Null_unspecified (*_Null_unspecified copyDomainDictionary)(CFTypeRef context, void *domain);
112-
/* HACK - this is to work around the fact that individual domains lose the information about their user/host/app triplet at creation time. We should find a better way to propogate this information. */
112+
/* HACK - this is to work around the fact that individual domains lose the information about their user/host/app triplet at creation time. We should find a better way to propagate this information. */
113113
void (*setIsWorldReadable)(CFTypeRef context, void *domain, Boolean isWorldReadable);
114114
} _CFPreferencesDomainCallBacks;
115115

@@ -248,7 +248,7 @@ typedef struct { /* A simple struct to maintain ASCII/Unicode versions of t
248248
} CFVarWidthCharBuffer;
249249

250250

251-
/* Convert a byte stream to ASCII (7-bit!) or Unicode, with a CFVarWidthCharBuffer struct on the stack. false return indicates an error occured during the conversion. Depending on .isASCII, follow .chars.ascii or .chars.unicode. If .shouldFreeChars is returned as true, free the returned buffer when done with it. If useClientsMemoryPtr is provided as non-NULL, and the provided memory can be used as is, this is set to true, and the .ascii or .unicode buffer in CFVarWidthCharBuffer is set to bytes.
251+
/* Convert a byte stream to ASCII (7-bit!) or Unicode, with a CFVarWidthCharBuffer struct on the stack. false return indicates an error occurred during the conversion. Depending on .isASCII, follow .chars.ascii or .chars.unicode. If .shouldFreeChars is returned as true, free the returned buffer when done with it. If useClientsMemoryPtr is provided as non-NULL, and the provided memory can be used as is, this is set to true, and the .ascii or .unicode buffer in CFVarWidthCharBuffer is set to bytes.
252252
!!! If the stream is Unicode and has no BOM, the data is assumed to be big endian! Could be trouble on Intel if someone didn't follow that assumption.
253253
!!! __CFStringDecodeByteStream2() needs to be deprecated and removed post-Jaguar.
254254
*/

CoreFoundation/Collections.subproj/CFBitVector.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static CFStringRef __CFBitVectorCopyDescription(CFTypeRef cf) {
180180
}
181181

182182
enum {
183-
kCFBitVectorImmutable = 0x0, /* unchangable and fixed capacity; default */
183+
kCFBitVectorImmutable = 0x0, /* unchangeable and fixed capacity; default */
184184
kCFBitVectorMutable = 0x1, /* changeable and variable capacity */
185185
};
186186

CoreFoundation/Collections.subproj/CFStorage.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ CF_INLINE void __CFStorageAllocLeafNodeMemory(CFAllocatorRef allocator, CFStorag
132132
/* We must be careful here, because another thread may be trying to allocate this memory at the same time (8203146). This may happen if two threads both attempt to read from a lazily-allocated node. */
133133
if ((compact ? (cap != node->info.leaf.capacityInBytes) : (cap > node->info.leaf.capacityInBytes))) {
134134
__CFLock(&(storage->cacheReaderMemoryAllocationLock));
135-
/* Check again now that we've acquired the lock. We know that we can do this because two simulaneous readers will always pass the same capacity. This is the fix for 8203146. This probably needs a memory barrier. */
135+
/* Check again now that we've acquired the lock. We know that we can do this because two simultaneous readers will always pass the same capacity. This is the fix for 8203146. This probably needs a memory barrier. */
136136
if ((compact ? (cap != node->info.leaf.capacityInBytes) : (cap > node->info.leaf.capacityInBytes))) {
137137
*((void **)&node->info.leaf.memory) = __CFSafelyReallocateWithAllocator(allocator, node->info.leaf.memory, cap, 0, NULL); // This will free...
138138
if (__CFOASafe) __CFSetLastAllocationEventName(node->info.leaf.memory, "CFStorage (node bytes)");
@@ -1257,7 +1257,7 @@ void CFStorageDeleteValues(CFStorageRef storage, CFRange range) {
12571257
/* No need to replace any children, nothing to do for this case */
12581258
}
12591259
else {
1260-
/* Got a legitimately new root back. If it is unfrozen, we can just acquire its guts. If it is frozen, we have more work to do. Note that we do not have to worry about releasing any existing children of the root, beacuse __CFStorageDeleteUnfrozen already did that. Also note that if we got a legitimately new root back, we must be a branch node, because if we were a leaf node, we would have been unfrozen and gotten ourself back. */
1260+
/* Got a legitimately new root back. If it is unfrozen, we can just acquire its guts. If it is frozen, we have more work to do. Note that we do not have to worry about releasing any existing children of the root, because __CFStorageDeleteUnfrozen already did that. Also note that if we got a legitimately new root back, we must be a branch node, because if we were a leaf node, we would have been unfrozen and gotten ourself back. */
12611261
storage->rootNode.numBytes = newRoot->numBytes;
12621262
storage->rootNode.isLeaf = newRoot->isLeaf;
12631263
bzero(&storage->rootNode.info, sizeof storage->rootNode.info); //be a little paranoid here

CoreFoundation/Locale.subproj/CFCalendar_Enumerate.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ static CFDateRef _Nullable _CFCalendarCreateBumpedDateUpToNextHigherUnitInCompon
14551455
// W5 28 29 30 31 25 26 27 28
14561456
//
14571457
// Consider searching for `WoM == 1` when searchingDate is *in* W1 of January. Because we're looking to advance to next month, we could simply add a month, right?
1458-
// Adding a month from Monday, January 1st lands us on Thursday, February 1st; from Tursday, January 2nd we get Friday, February 2nd, etc. Note though that for January 4th, 5th, and 6th, adding a month lands us in **W2** of February!
1458+
// Adding a month from Monday, January 1st lands us on Thursday, February 1st; from Thursday, January 2nd we get Friday, February 2nd, etc. Note though that for January 4th, 5th, and 6th, adding a month lands us in **W2** of February!
14591459
// This means that if we continue searching forward from there, we'll have completely skipped W1 of February as a candidate week, and search forward until we hit W1 of March. This is incorrect.
14601460
//
14611461
// What we really want is to skip to the _start_ of February and search from there -- if we undershoot, we can always keep looking.

CoreFoundation/Locale.subproj/CFDateFormatter.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ static void __ResetUDateFormat(CFDateFormatterRef df, Boolean goingToHaveCustomF
623623
}
624624

625625
// <rdar://problem/15420462> "Yesterday" and "Today" now appear in lower case
626-
// ICU uses middle of sentence context for relative days by default. We need to have relative dates to be captalized by default for backward compatibility
626+
// ICU uses middle of sentence context for relative days by default. We need to have relative dates to be capitalized by default for backward compatibility
627627
if (wantRelative) {
628628
__cficu_udat_setContext(icudf, UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU, &status);
629629
}
@@ -1576,7 +1576,7 @@ static Boolean __CFDateFormatterHandleAmbiguousYear(CFDateFormatterRef formatter
15761576
CFNumberGetValue(formatter->_property._AmbiguousYearStrategy, kCFNumberSInt64Type, &ambigStrat);
15771577
}
15781578
if (calendar_id == kCFCalendarIdentifierChinese) {
1579-
// we default to era 1 if era is missing, however, we cannot just test if the era is 1 becuase we may get era 2 or larger if the year in the string is greater than 60
1579+
// we default to era 1 if era is missing, however, we cannot just test if the era is 1 because we may get era 2 or larger if the year in the string is greater than 60
15801580
// now I just assume that the year will not be greater than 600 in the string
15811581
if (__cficu_ucal_get(cal, UCAL_ERA, status) < 10) {
15821582
switch (ambigStrat) {

CoreFoundation/Locale.subproj/CFLocale.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ uameasfmt_getUnitsForUsage( const char* locale,
5353
#include <string.h>
5454

5555
#if DEPLOYMENT_TARGET_EMBEDDED_MINI
56-
// Some compatability definitions
56+
// Some compatibility definitions
5757
#define ULOC_FULLNAME_CAPACITY 157
5858
#define ULOC_KEYWORD_AND_VALUES_CAPACITY 100
5959

CoreFoundation/NumberDate.subproj/CFNumber.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -708,8 +708,8 @@ static Boolean __CFNumberGetValueCompat(CFNumberRef number, CFNumberType type, v
708708
}
709709
} else {
710710
if (0 == __CFNumberTypeTable[ntype].storageBit) {
711-
// Leopard's implemenation of this always returned true. We should only return true when the conversion is lossless. However, there are some clients who use CFNumber with small unsigned values disguised as signed values. Since there is no CFNumber API yet for unsigned values, we need to accomodate those clients for now. <rdar://problem/6471866>
712-
// This accomodation should be removed if CFNumber ever provides API for unsigned values. <rdar://problem/6473890>
711+
// Leopard's implementation of this always returned true. We should only return true when the conversion is lossless. However, there are some clients who use CFNumber with small unsigned values disguised as signed values. Since there is no CFNumber API yet for unsigned values, we need to accommodate those clients for now. <rdar://problem/6471866>
712+
// This accommodation should be removed if CFNumber ever provides API for unsigned values. <rdar://problem/6473890>
713713
int64_t sv; memmove(&sv, data, sizeof(int64_t));
714714
int8_t dv = (int8_t)(sv);
715715
memmove(valuePtr, &dv, sizeof(int8_t));
@@ -728,8 +728,8 @@ static Boolean __CFNumberGetValueCompat(CFNumberRef number, CFNumberType type, v
728728
}
729729
} else {
730730
if (0 == __CFNumberTypeTable[ntype].storageBit) {
731-
// Leopard's implemenation of this always returned true. We should only return true when the conversion is lossless. However, there are some clients who use CFNumber with small unsigned values disguised as signed values. Since there is no CFNumber API yet for unsigned values, we need to accomodate those clients for now. <rdar://problem/6471866>
732-
// This accomodation should be removed if CFNumber ever provides API for unsigned values. <rdar://problem/6473890>
731+
// Leopard's implementation of this always returned true. We should only return true when the conversion is lossless. However, there are some clients who use CFNumber with small unsigned values disguised as signed values. Since there is no CFNumber API yet for unsigned values, we need to accommodate those clients for now. <rdar://problem/6471866>
732+
// This accommodation should be removed if CFNumber ever provides API for unsigned values. <rdar://problem/6473890>
733733
int64_t sv; memmove(&sv, data, sizeof(int64_t));
734734
int16_t dv = (int16_t)(sv);
735735
memmove(valuePtr, &dv, sizeof(int16_t));

CoreFoundation/Parsing.subproj/CFBinaryPList.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ CF_INLINE uint64_t _getSizedInt(const uint8_t *data, uint8_t valSize) {
727727
return CFSwapInt64BigToHost(val);
728728
}
729729
#endif
730-
// Compatability with existing archives, including anything with a non-power-of-2
730+
// Compatibility with existing archives, including anything with a non-power-of-2
731731
// size and 16-byte values, and architectures that don't support unaligned access
732732
uint64_t res = 0;
733733
for (CFIndex idx = 0; idx < valSize; idx++) {

CoreFoundation/Parsing.subproj/CFPropertyList.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ CF_INLINE void __CFPListRelease(CFTypeRef cf, CFAllocatorRef allocator) {
284284
}
285285

286286

287-
// The following set of _plist... functions append various things to a mutable data which is in UTF8 encoding. These are pretty general. Assumption is call characters and CFStrings can be converted to UTF8 and appeneded.
287+
// The following set of _plist... functions append various things to a mutable data which is in UTF8 encoding. These are pretty general. Assumption is call characters and CFStrings can be converted to UTF8 and appended.
288288

289289
// Null-terminated, ASCII or UTF8 string
290290
//
@@ -1866,7 +1866,7 @@ CF_INLINE bool isWhitespace(const char *utf8bytes, const char *end) {
18661866
205f -> <e2819f>
18671867
3000 -> <e38080>
18681868
*/
1869-
// Except we consider some additional values from 0x0 to 0x21 and 0x7E to 0xA1 as whitespace, for compatability
1869+
// Except we consider some additional values from 0x0 to 0x21 and 0x7E to 0xA1 as whitespace, for compatibility
18701870
unsigned char byte1 = *utf8bytes;
18711871
if (byte1 < 0x21 || (byte1 > 0x7E && byte1 < 0xA1)) return true;
18721872
if ((byte1 == 0xe2 || byte1 == 0xe3) && (end - utf8bytes >= 3)) {

CoreFoundation/Parsing.subproj/CFXMLParser.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ kCFXMLParserSkipWhitespace -
4949
5050
kCFXMLParserAddImpliedAttributes -
5151
where the DTD specifies implied attribute-value pairs for a particular element,
52-
add those pairs to any occurances of the element in the element tree.
52+
add those pairs to any occurrences of the element in the element tree.
5353
Currently not supported.
5454
*/
5555

CoreFoundation/PlugIn.subproj/CFBundle.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1616,7 +1616,7 @@ static void _CFBundleEnsureAllBundlesUpToDate(void) {
16161616
(void)CFBundleGetMainBundle();
16171617

16181618
#if defined(BINARY_SUPPORT_DLL)
1619-
// Dont know how to find static bundles for DLLs
1619+
// Don't know how to find static bundles for DLLs
16201620
#endif /* BINARY_SUPPORT_DLL */
16211621

16221622
#if defined(BINARY_SUPPORT_DYLD)

CoreFoundation/PlugIn.subproj/CFBundle_Binary.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ static CFStringRef _CFBundleDYLDCopyLoadedImagePathForPointer(void *p) {
165165
#else /* USE_DYLD_PRIV */
166166
if (!result) {
167167
uint32_t i, j, n = _dyld_image_count();
168-
Boolean foundit = false;
168+
Boolean foundIt = false;
169169
const char *name;
170170
#if TARGET_RT_64_BIT
171171
#define MACH_HEADER_TYPE struct mach_header_64
@@ -176,14 +176,14 @@ static CFStringRef _CFBundleDYLDCopyLoadedImagePathForPointer(void *p) {
176176
#define MACH_SEGMENT_CMD_TYPE struct segment_command
177177
#define MACH_SEGMENT_FLAVOR LC_SEGMENT
178178
#endif
179-
for (i = 0; !foundit && i < n; i++) {
179+
for (i = 0; !foundIt && i < n; i++) {
180180
const MACH_HEADER_TYPE *mh = (const MACH_HEADER_TYPE *)_dyld_get_image_header(i);
181181
uintptr_t addr = (uintptr_t)p - _dyld_get_image_vmaddr_slide(i);
182182
if (mh) {
183183
struct load_command *lc = (struct load_command *)((char *)mh + sizeof(MACH_HEADER_TYPE));
184-
for (j = 0; !foundit && j < mh->ncmds; j++, lc = (struct load_command *)((char *)lc + lc->cmdsize)) {
184+
for (j = 0; !foundIt && j < mh->ncmds; j++, lc = (struct load_command *)((char *)lc + lc->cmdsize)) {
185185
if (MACH_SEGMENT_FLAVOR == lc->cmd && ((MACH_SEGMENT_CMD_TYPE *)lc)->vmaddr <= addr && addr < ((MACH_SEGMENT_CMD_TYPE *)lc)->vmaddr + ((MACH_SEGMENT_CMD_TYPE *)lc)->vmsize) {
186-
foundit = true;
186+
foundIt = true;
187187
name = _dyld_get_image_name(i);
188188
if (name) result = CFStringCreateWithFileSystemRepresentation(kCFAllocatorSystemDefault, name);
189189
}

0 commit comments

Comments
 (0)