Skip to content

spelling corrections #2088

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CoreFoundation/Base.subproj/CFFileUtilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ CFStringRef _CFXDGCreateConfigHomePath(void) {
/// 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.
CF_CROSS_PLATFORM_EXPORT
CFArrayRef _CFXDGCreateDataDirectoriesPaths(void) {
// $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 ':'.
// $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 ':'.
// If $XDG_DATA_DIRS is either not set or empty, a value equal to /usr/local/share/:/usr/share/ should be used.
const char *dataDirectoriesPaths = __CFgetenv("XDG_DATA_DIRS");
CFStringRef defaultPath[2];
Expand All @@ -1269,7 +1269,7 @@ CFArrayRef _CFXDGCreateDataDirectoriesPaths(void) {
/// 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.
CF_CROSS_PLATFORM_EXPORT
CFArrayRef _CFXDGCreateConfigDirectoriesPaths(void) {
// $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 ':'.
// $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 ':'.
// If $XDG_CONFIG_DIRS is either not set or empty, a value equal to /etc/xdg should be used.
const char *configDirectoriesPaths = __CFgetenv("XDG_CONFIG_DIRS");
CFStringRef defaultPath[1];
Expand Down
2 changes: 1 addition & 1 deletion CoreFoundation/Base.subproj/CFInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ CF_PRIVATE bool __CFBinaryPlistIsArray(const uint8_t *databytes, uint64_t datale

#if 0
#pragma mark -
#pragma mark Windows Compatability
#pragma mark Windows Compatibility
#endif

// Need to use the _O_BINARY flag on Windows to get the correct behavior
Expand Down
4 changes: 2 additions & 2 deletions CoreFoundation/Base.subproj/ForFoundationOnly.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ typedef struct {
Boolean (*_Null_unspecified synchronize)(CFTypeRef context, void *domain);
void (*_Null_unspecified getKeysAndValues)(CFAllocatorRef _Nullable alloc, CFTypeRef context, void *domain, void *_Null_unspecified * _Null_unspecified buf[_Null_unspecified], CFIndex *numKeyValuePairs);
CFDictionaryRef _Null_unspecified (*_Null_unspecified copyDomainDictionary)(CFTypeRef context, void *domain);
/* 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. */
/* 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. */
void (*setIsWorldReadable)(CFTypeRef context, void *domain, Boolean isWorldReadable);
} _CFPreferencesDomainCallBacks;

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


/* 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.
/* 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.
!!! 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.
!!! __CFStringDecodeByteStream2() needs to be deprecated and removed post-Jaguar.
*/
Expand Down
2 changes: 1 addition & 1 deletion CoreFoundation/Collections.subproj/CFBitVector.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ static CFStringRef __CFBitVectorCopyDescription(CFTypeRef cf) {
}

enum {
kCFBitVectorImmutable = 0x0, /* unchangable and fixed capacity; default */
kCFBitVectorImmutable = 0x0, /* unchangeable and fixed capacity; default */
kCFBitVectorMutable = 0x1, /* changeable and variable capacity */
};

Expand Down
4 changes: 2 additions & 2 deletions CoreFoundation/Collections.subproj/CFStorage.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ CF_INLINE void __CFStorageAllocLeafNodeMemory(CFAllocatorRef allocator, CFStorag
/* 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. */
if ((compact ? (cap != node->info.leaf.capacityInBytes) : (cap > node->info.leaf.capacityInBytes))) {
__CFLock(&(storage->cacheReaderMemoryAllocationLock));
/* 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. */
/* 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. */
if ((compact ? (cap != node->info.leaf.capacityInBytes) : (cap > node->info.leaf.capacityInBytes))) {
*((void **)&node->info.leaf.memory) = __CFSafelyReallocateWithAllocator(allocator, node->info.leaf.memory, cap, 0, NULL); // This will free...
if (__CFOASafe) __CFSetLastAllocationEventName(node->info.leaf.memory, "CFStorage (node bytes)");
Expand Down Expand Up @@ -1257,7 +1257,7 @@ void CFStorageDeleteValues(CFStorageRef storage, CFRange range) {
/* No need to replace any children, nothing to do for this case */
}
else {
/* 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. */
/* 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. */
storage->rootNode.numBytes = newRoot->numBytes;
storage->rootNode.isLeaf = newRoot->isLeaf;
bzero(&storage->rootNode.info, sizeof storage->rootNode.info); //be a little paranoid here
Expand Down
2 changes: 1 addition & 1 deletion CoreFoundation/Locale.subproj/CFCalendar_Enumerate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,7 @@ static CFDateRef _Nullable _CFCalendarCreateBumpedDateUpToNextHigherUnitInCompon
// W5 28 29 30 31 25 26 27 28
//
// 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?
// 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!
// 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!
// 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.
//
// What we really want is to skip to the _start_ of February and search from there -- if we undershoot, we can always keep looking.
Expand Down
4 changes: 2 additions & 2 deletions CoreFoundation/Locale.subproj/CFDateFormatter.c
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ static void __ResetUDateFormat(CFDateFormatterRef df, Boolean goingToHaveCustomF
}

// <rdar://problem/15420462> "Yesterday" and "Today" now appear in lower case
// 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
// 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
if (wantRelative) {
__cficu_udat_setContext(icudf, UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU, &status);
}
Expand Down Expand Up @@ -1576,7 +1576,7 @@ static Boolean __CFDateFormatterHandleAmbiguousYear(CFDateFormatterRef formatter
CFNumberGetValue(formatter->_property._AmbiguousYearStrategy, kCFNumberSInt64Type, &ambigStrat);
}
if (calendar_id == kCFCalendarIdentifierChinese) {
// 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
// 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
// now I just assume that the year will not be greater than 600 in the string
if (__cficu_ucal_get(cal, UCAL_ERA, status) < 10) {
switch (ambigStrat) {
Expand Down
2 changes: 1 addition & 1 deletion CoreFoundation/Locale.subproj/CFLocale.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ uameasfmt_getUnitsForUsage( const char* locale,
#include <string.h>

#if DEPLOYMENT_TARGET_EMBEDDED_MINI
// Some compatability definitions
// Some compatibility definitions
#define ULOC_FULLNAME_CAPACITY 157
#define ULOC_KEYWORD_AND_VALUES_CAPACITY 100

Expand Down
8 changes: 4 additions & 4 deletions CoreFoundation/NumberDate.subproj/CFNumber.c
Original file line number Diff line number Diff line change
Expand Up @@ -708,8 +708,8 @@ static Boolean __CFNumberGetValueCompat(CFNumberRef number, CFNumberType type, v
}
} else {
if (0 == __CFNumberTypeTable[ntype].storageBit) {
// 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>
// This accomodation should be removed if CFNumber ever provides API for unsigned values. <rdar://problem/6473890>
// 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>
// This accommodation should be removed if CFNumber ever provides API for unsigned values. <rdar://problem/6473890>
int64_t sv; memmove(&sv, data, sizeof(int64_t));
int8_t dv = (int8_t)(sv);
memmove(valuePtr, &dv, sizeof(int8_t));
Expand All @@ -728,8 +728,8 @@ static Boolean __CFNumberGetValueCompat(CFNumberRef number, CFNumberType type, v
}
} else {
if (0 == __CFNumberTypeTable[ntype].storageBit) {
// 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>
// This accomodation should be removed if CFNumber ever provides API for unsigned values. <rdar://problem/6473890>
// 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>
// This accommodation should be removed if CFNumber ever provides API for unsigned values. <rdar://problem/6473890>
int64_t sv; memmove(&sv, data, sizeof(int64_t));
int16_t dv = (int16_t)(sv);
memmove(valuePtr, &dv, sizeof(int16_t));
Expand Down
2 changes: 1 addition & 1 deletion CoreFoundation/Parsing.subproj/CFBinaryPList.c
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ CF_INLINE uint64_t _getSizedInt(const uint8_t *data, uint8_t valSize) {
return CFSwapInt64BigToHost(val);
}
#endif
// Compatability with existing archives, including anything with a non-power-of-2
// Compatibility with existing archives, including anything with a non-power-of-2
// size and 16-byte values, and architectures that don't support unaligned access
uint64_t res = 0;
for (CFIndex idx = 0; idx < valSize; idx++) {
Expand Down
4 changes: 2 additions & 2 deletions CoreFoundation/Parsing.subproj/CFPropertyList.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ CF_INLINE void __CFPListRelease(CFTypeRef cf, CFAllocatorRef allocator) {
}


// 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.
// 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.

// Null-terminated, ASCII or UTF8 string
//
Expand Down Expand Up @@ -1866,7 +1866,7 @@ CF_INLINE bool isWhitespace(const char *utf8bytes, const char *end) {
205f -> <e2819f>
3000 -> <e38080>
*/
// Except we consider some additional values from 0x0 to 0x21 and 0x7E to 0xA1 as whitespace, for compatability
// Except we consider some additional values from 0x0 to 0x21 and 0x7E to 0xA1 as whitespace, for compatibility
unsigned char byte1 = *utf8bytes;
if (byte1 < 0x21 || (byte1 > 0x7E && byte1 < 0xA1)) return true;
if ((byte1 == 0xe2 || byte1 == 0xe3) && (end - utf8bytes >= 3)) {
Expand Down
2 changes: 1 addition & 1 deletion CoreFoundation/Parsing.subproj/CFXMLParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ kCFXMLParserSkipWhitespace -

kCFXMLParserAddImpliedAttributes -
where the DTD specifies implied attribute-value pairs for a particular element,
add those pairs to any occurances of the element in the element tree.
add those pairs to any occurrences of the element in the element tree.
Currently not supported.
*/

Expand Down
2 changes: 1 addition & 1 deletion CoreFoundation/PlugIn.subproj/CFBundle.c
Original file line number Diff line number Diff line change
Expand Up @@ -1616,7 +1616,7 @@ static void _CFBundleEnsureAllBundlesUpToDate(void) {
(void)CFBundleGetMainBundle();

#if defined(BINARY_SUPPORT_DLL)
// Dont know how to find static bundles for DLLs
// Don't know how to find static bundles for DLLs
#endif /* BINARY_SUPPORT_DLL */

#if defined(BINARY_SUPPORT_DYLD)
Expand Down
8 changes: 4 additions & 4 deletions CoreFoundation/PlugIn.subproj/CFBundle_Binary.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static CFStringRef _CFBundleDYLDCopyLoadedImagePathForPointer(void *p) {
#else /* USE_DYLD_PRIV */
if (!result) {
uint32_t i, j, n = _dyld_image_count();
Boolean foundit = false;
Boolean foundIt = false;
const char *name;
#if TARGET_RT_64_BIT
#define MACH_HEADER_TYPE struct mach_header_64
Expand All @@ -176,14 +176,14 @@ static CFStringRef _CFBundleDYLDCopyLoadedImagePathForPointer(void *p) {
#define MACH_SEGMENT_CMD_TYPE struct segment_command
#define MACH_SEGMENT_FLAVOR LC_SEGMENT
#endif
for (i = 0; !foundit && i < n; i++) {
for (i = 0; !foundIt && i < n; i++) {
const MACH_HEADER_TYPE *mh = (const MACH_HEADER_TYPE *)_dyld_get_image_header(i);
uintptr_t addr = (uintptr_t)p - _dyld_get_image_vmaddr_slide(i);
if (mh) {
struct load_command *lc = (struct load_command *)((char *)mh + sizeof(MACH_HEADER_TYPE));
for (j = 0; !foundit && j < mh->ncmds; j++, lc = (struct load_command *)((char *)lc + lc->cmdsize)) {
for (j = 0; !foundIt && j < mh->ncmds; j++, lc = (struct load_command *)((char *)lc + lc->cmdsize)) {
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) {
foundit = true;
foundIt = true;
name = _dyld_get_image_name(i);
if (name) result = CFStringCreateWithFileSystemRepresentation(kCFAllocatorSystemDefault, name);
}
Expand Down
Loading