Skip to content

Commit 20e3abd

Browse files
committed
Fix many typos
1 parent 4bc0a2a commit 20e3abd

File tree

115 files changed

+565
-569
lines changed

Some content is hidden

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

115 files changed

+565
-569
lines changed

Diff for: DelphiUiLib.Strings.pas

+5-5
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ function PrettifySnakeCase(
3232
// Convert an integer to a readable decimal representation (as 12 345 678)
3333
function IntToStrEx(const Value: UInt64; Width: Integer = 0): String;
3434

35-
// Convert an integer to a readable hexadecimal represenation (as 0x0FFE FFF0)
35+
// Convert an integer to a readable hexadecimal representation (as 0x0FFE FFF0)
3636
function IntToHexEx(const Value: UInt64; Digits: Integer = 0): String;
3737

38-
// Convert a pointer to a readable hexadecimal represenation (as 0x0FFE FFF0)
38+
// Convert a pointer to a readable hexadecimal representation (as 0x0FFE FFF0)
3939
function PtrToHexEx(Value: Pointer; Digits: Integer = 8): String;
4040

4141
implementation
@@ -60,7 +60,7 @@ function PrettifyCamelCase;
6060
RtlxPrefixStripString(Prefix, Result, True);
6161
RtlxSuffixStripString(Suffix, Result, True);
6262

63-
// Add a space before a capital that has a non-captial on either side of it
63+
// Add a space before a capital that has a non-capital on either side of it
6464

6565
i := Low(Result);
6666

@@ -100,8 +100,8 @@ function PrettifySnakeCase;
100100
var
101101
i: Integer;
102102
begin
103-
// Convert a string with from capitals with undescores to a spaced string
104-
// removing a prefix/suffix, ex.: 'ERROR_ACCESS_DENIED' => 'Acces Denied'
103+
// Convert a string with from capitals with underscores to a spaced string
104+
// removing a prefix/suffix, ex.: 'ERROR_ACCESS_DENIED' => 'Access Denied'
105105

106106
Result := CapsText;
107107

Diff for: DelphiUtils.Arrays.pas

+13-13
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ TArrayGroup<TKey, TValue> = record
6666
const Changes: TChanges
6767
): Boolean;
6868

69-
TConflictResolver<TData, TChanegs> = reference to function (
69+
TConflictResolver<TData, TChanges> = reference to function (
7070
const Existing: TData;
71-
const New: TChanegs
71+
const New: TChanges
7272
): TData;
7373

7474
TTreeNode<T> = record
@@ -97,21 +97,21 @@ TArray = class abstract
9797
Action: TFilterAction = ftKeep
9898
): TArray<T>; static;
9999

100-
// Filter an array on by-element basis modifiying the array
100+
// Filter an array on by-element basis modifying the array
101101
class procedure FilterInline<T>(
102102
var Entries: TArray<T>;
103103
Condition: TCondition<T>;
104104
Action: TFilterAction = ftKeep
105105
); static;
106106

107-
// Filter an array on by-element basis modifiying the array and its elements
107+
// Filter an array on by-element basis modifying the array and its elements
108108
class procedure FilterInlineVar<T>(
109109
var Entries: TArray<T>;
110110
Condition: TVarCondition<T>;
111111
Action: TFilterAction = ftKeep
112112
); static;
113113

114-
// Filter an array on by-element basis modifiying the array
114+
// Filter an array on by-element basis modifying the array
115115
class procedure FilterInlineEx<T>(
116116
var Entries: TArray<T>;
117117
Condition: TConditionEx<T>;
@@ -143,7 +143,7 @@ TArray = class abstract
143143
): Integer; static;
144144

145145
// Insert an element into a sorted array preserving sorting. The return
146-
// value has the same sementic as the binary search.
146+
// value has the same semantic as the binary search.
147147
class function InsertSorted<T>(
148148
var Entries: TArray<T>;
149149
const Element: T;
@@ -190,14 +190,14 @@ TArray = class abstract
190190
Condition: TCondition<T>
191191
): Integer; static;
192192

193-
// Find the position of the first occurance of an element
193+
// Find the position of the first occurrence of an element
194194
class function IndexOf<T>(
195195
const Entries: TArray<T>;
196196
const Element: T;
197197
EqualityCheck: TEqualityCheck<T> = nil
198198
): Integer; static;
199199

200-
// Find the position of the first occurance of an element that matches
200+
// Find the position of the first occurrence of an element that matches
201201
// a condition
202202
class function IndexOfMatch<T>(
203203
const Entries: TArray<T>;
@@ -249,13 +249,13 @@ TArray = class abstract
249249
ConverterEx: TConvertRoutineEx<T1, T2>
250250
): TArray<T2>; static;
251251

252-
// Convert the first convertable entry or return Default(T2)
252+
// Convert the first convertible entry or return Default(T2)
253253
class function ConvertFirst<T1, T2>(
254254
const Entries: TArray<T1>;
255255
Converter: TConvertRoutine<T1, T2>
256256
): T2; static;
257257

258-
// Convert the first convertable entry or return the specified default
258+
// Convert the first convertible entry or return the specified default
259259
class function ConvertFirstOrDefault<T1, T2>(
260260
const Entries: TArray<T1>;
261261
Converter: TConvertRoutine<T1, T2>;
@@ -314,7 +314,7 @@ TArray = class abstract
314314
const Default: T
315315
): T; static;
316316

317-
// Upadate existing items or add new ones into an ordered set by merging
317+
// Update existing items or add new ones into an ordered set by merging
318318
// changes and resolving conflicts.
319319
class function Merge<TData, TChanges>(
320320
const Data: TArray<TData>;
@@ -941,7 +941,7 @@ class function TArray.Merge<TData, TChanges>;
941941
begin
942942
SetLength(ConflictIndexes, Length(Changes));
943943

944-
// Find indexes of data entires with wich we have conflicts
944+
// Find indexes of data entries with which we have conflicts
945945
for i := 0 to High(Changes) do
946946
begin
947947
ConflictIndexes[i] := -1;
@@ -1058,7 +1058,7 @@ class function TArray.Sort<T>;
10581058
// instead, comparing the elements on each index. Then construct the result
10591059
// using the new order.
10601060

1061-
// Generate the intial index list
1061+
// Generate the initial index list
10621062
SetLength(Indexes, Length(Entries));
10631063

10641064
for i := 0 to High(Indexes) do

Diff for: DelphiUtils.Async.pas

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{
44
This module provides infrastructure for using anonymous functions as APC
5-
callbacks in asynchoronous operations.
5+
callbacks in asynchronous operations.
66
}
77

88
interface
@@ -51,15 +51,15 @@ function GetApcRoutine(
5151
[opt] AsyncCallback: TAnonymousApcCallback
5252
): TIoApcRoutine;
5353

54-
// Prepare an APC context with an I/O status block for asyncronous operations
54+
// Prepare an APC context with an I/O status block for asynchronous operations
5555
// or reference the I/O status block from the stack for synchronous calls
5656
function PrepareApcIsb(
5757
out ApcContext: IAnonymousIoApcContext;
5858
[opt] AsyncCallback: TAnonymousApcCallback;
5959
const [ref] IoStatusBlock: TIoStatusBlock
6060
): PIoStatusBlock;
6161

62-
// Prepare an APC context with an I/O status block for asyncronous operations
62+
// Prepare an APC context with an I/O status block for asynchronous operations
6363
// or allocate one from the heap
6464
function PrepareApcIsbEx(
6565
out ApcContext: IAnonymousIoApcContext;
@@ -108,7 +108,7 @@ function TAnonymousIoApcContext.IoStatusBlock;
108108

109109
{ Functions }
110110

111-
// An APC-compatibe wrapper for calling anonymous functions
111+
// An APC-compatible wrapper for calling anonymous functions
112112
procedure ApcCallbackForwarder(
113113
[in] ApcContext: Pointer;
114114
const IoStatusBlock: TIoStatusBlock;
@@ -140,7 +140,7 @@ function PrepareApcIsb;
140140
begin
141141
if Assigned(AsyncCallback) then
142142
begin
143-
// Allocate the contex and use its I/O status block
143+
// Allocate the context and use its I/O status block
144144
ApcContext := TAnonymousIoApcContext.Create(AsyncCallback);
145145
Result := ApcContext.IoStatusBlock;
146146
end
@@ -156,7 +156,7 @@ function PrepareApcIsbEx;
156156
begin
157157
if Assigned(AsyncCallback) then
158158
begin
159-
// Allocate the contex and use its I/O status block
159+
// Allocate the context and use its I/O status block
160160
ApcContext := TAnonymousIoApcContext.Create(AsyncCallback);
161161
Result := ApcContext.IoStatusBlock;
162162
end

Diff for: DelphiUtils.AutoEvents.pas

+5-5
Original file line numberDiff line numberDiff line change
@@ -98,27 +98,27 @@ function TWeakArray<I>.Add;
9898

9999
function TWeakArray<I>.HasAny;
100100
var
101-
StongRef: I;
101+
StrongRef: I;
102102
i: Integer;
103103
begin
104104
for i := 0 to High(Entries) do
105-
if Entries[i].Upgrade(StongRef) then
105+
if Entries[i].Upgrade(StrongRef) then
106106
Exit(True);
107107

108108
Result := False;
109109
end;
110110

111111
procedure TWeakArray<I>.RemoveEmpty;
112112
var
113-
StongRef: I;
113+
StrongRef: I;
114114
i, j: Integer;
115115
begin
116116
j := 0;
117117
for i := 0 to High(Entries) do
118-
if Entries[i].Upgrade(StongRef) then
118+
if Entries[i].Upgrade(StrongRef) then
119119
begin
120120
if i <> j then
121-
Entries[j] := StongRef;
121+
Entries[j] := StrongRef;
122122

123123
Inc(j);
124124
end;

Diff for: DelphiUtils.AutoObjects.pas

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{
44
This module provides the core facilities for automatic lifetime management
5-
for resources that require cleanup. When interactining with such resources
5+
for resources that require cleanup. When interacting with such resources
66
through interfaces, Delphi automatically emits code that counts outstanding
77
references and immediately releases the underlying resource when this value
88
drops to zero. Here you can find the definitions for the interfaces, as
@@ -69,7 +69,7 @@ TMemory = record
6969
class function Reference<T>(const [ref] Buffer: T): TMemory; static;
7070
end;
7171

72-
// An wapper that automatically releases a memory region.
72+
// A wrapper that automatically releases a memory region.
7373
// You can safely cast between IMemory<P1> and IMemory<P2> when necessary.
7474
IMemory<P> = interface(IAutoPointer<P>) // P must be a Pointer type
7575
['{7AE23663-B557-4398-A003-405CD4846BE8}']

Diff for: DelphiUtils.ExternalImport.pas

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
unit DelphiUtils.ExternalImport;
22

33
{
4-
This module allows wokring with Import Address Table for hooking
4+
This module allows working with Import Address Table for hooking
55
local imports from external DLLs.
66
}
77

Diff for: Examples.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ begin
4646
end.
4747
```
4848

49-
2. Enumerate symbolic links in HKLM and printe their targets (**144 KiB** on x64, requires around 20 seconds to complete)
49+
2. Enumerate symbolic links in HKLM and print their targets (**144 KiB** on x64, requires around 20 seconds to complete)
5050

5151
```pascal
5252
program FindRegistrySymlinks;

Diff for: Headers/DelphiApi.Reflection.pas

+1-1
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ constructor InheritsFromAttribute.Create;
369369
TypeInfoPtr: PPointer absolute ATypeInfo;
370370
begin
371371
// For some reason, Delphi gives us an indirect pointer that we need to
372-
// dereferece.
372+
// dereference.
373373

374374
if Assigned(TypeInfoPtr) then
375375
Self.TypeInfo := TypeInfoPtr^;

Diff for: Headers/Ntapi.AppModel.Policy.pas

+5-5
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ interface
8282
AppModelPolicy_Type_PullPackageDependencyData = $37, // Win 10 20H1+
8383
AppModelPolicy_Type_AppInstancingErrorBehavior = $38, // Win 11+
8484
AppModelPolicy_Type_BackgroundTaskRegistrationType = $39, // Win 11+
85-
AppModelPolicy_Type_ModsPowerNotifification = $3A // Win 11+
85+
AppModelPolicy_Type_ModsPowerNotification = $3A // Win 11+
8686
);
8787

8888
// private - includes both type and value as 0xTTTTVVVV
@@ -560,10 +560,10 @@ interface
560560

561561
// Info class 0x3A
562562
[MinOSVersion(OsWin11)]
563-
[NamingStyle(nsCamelCase, 'AppModelPolicy_ModsPowerNotifification_')]
564-
TAppModelPolicy_ModsPowerNotifification = (
565-
AppModelPolicy_ModsPowerNotifification_Disabled = 0,
566-
AppModelPolicy_ModsPowerNotifification_Enabled = 1
563+
[NamingStyle(nsCamelCase, 'AppModelPolicy_ModsPowerNotification_')]
564+
TAppModelPolicy_ModsPowerNotification = (
565+
AppModelPolicy_ModsPowerNotification_Disabled = 0,
566+
AppModelPolicy_ModsPowerNotification_Enabled = 1
567567
);
568568

569569
implementation

Diff for: Headers/Ntapi.CommCtrls.pas

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ interface
6767
[FlagName(TDF_RTL_LAYOUT, 'RTL Layout')]
6868
[FlagName(TDF_NO_DEFAULT_RADIO_BUTTON, 'No Default Radio Button')]
6969
[FlagName(TDF_CAN_BE_MINIMIZED, 'Can Be Minimized')]
70-
[FlagName(TDF_NO_SET_FOREGROUND, 'No Set Forground')]
70+
[FlagName(TDF_NO_SET_FOREGROUND, 'No Set Foreground')]
7171
[FlagName(TDF_SIZE_TO_CONTENT, 'Size To Content')]
7272
TTaskDialogFlags = type Cardinal;
7373

Diff for: Headers/Ntapi.ImageHlp.pas

+5-5
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ interface
9292

9393
IMAGE_SCN_ALIGN_MASK = $00F00000;
9494

95-
IMAGE_RELOCATION_OFFET_MASK = $0FFF;
95+
IMAGE_RELOCATION_OFFSET_MASK = $0FFF;
9696
IMAGE_RELOCATION_TYPE_SHIFT = 12;
9797

9898
// SDK::rtlsupportapi.h
@@ -147,7 +147,7 @@ TImageDosHeader = record
147147
[FlagName(IMAGE_FILE_RELOCS_STRIPPED, 'Relocs Stripped')]
148148
[FlagName(IMAGE_FILE_EXECUTABLE_IMAGE, 'Executable')]
149149
[FlagName(IMAGE_FILE_LINE_NUMS_STRIPPED, 'Line Numbers Stripped')]
150-
[FlagName(IMAGE_FILE_LOCAL_SYMS_STRIPPED, 'Local Symbols Stipped')]
150+
[FlagName(IMAGE_FILE_LOCAL_SYMS_STRIPPED, 'Local Symbols Stripped')]
151151
[FlagName(IMAGE_FILE_AGGRESIVE_WS_TRIM, 'Aggressive WS Trim')]
152152
[FlagName(IMAGE_FILE_LARGE_ADDRESS_AWARE, 'Large Address Aware')]
153153
[FlagName(IMAGE_FILE_32BIT_MACHINE, '32-bit Machine')]
@@ -359,7 +359,7 @@ TImageOptionalHeader = record
359359
[FlagName(IMAGE_SCN_MEM_SHARED, 'Shared')]
360360
[FlagName(IMAGE_SCN_MEM_EXECUTE, 'Executable')]
361361
[FlagName(IMAGE_SCN_MEM_READ, 'Readable')]
362-
[FlagName(IMAGE_SCN_MEM_WRITE, 'Writale')]
362+
[FlagName(IMAGE_SCN_MEM_WRITE, 'Writable')]
363363
[SubEnum(IMAGE_SCN_ALIGN_MASK, 0, 'Default Alignment')]
364364
[SubEnum(IMAGE_SCN_ALIGN_MASK, IMAGE_SCN_ALIGN_1BYTES, 'Align 1 Byte')]
365365
[SubEnum(IMAGE_SCN_ALIGN_MASK, IMAGE_SCN_ALIGN_2BYTES, 'Align 2 Bytes')]
@@ -766,12 +766,12 @@ function TImageNtHeaders.GetSection;
766766

767767
function TImageRelocationTypeOffset.Offset;
768768
begin
769-
Result := TypeOffset and IMAGE_RELOCATION_OFFET_MASK;
769+
Result := TypeOffset and IMAGE_RELOCATION_OFFSET_MASK;
770770
end;
771771

772772
function TImageRelocationTypeOffset.SpansOnNextPage;
773773
const
774-
PAGE_SIZE = IMAGE_RELOCATION_OFFET_MASK + 1;
774+
PAGE_SIZE = IMAGE_RELOCATION_OFFSET_MASK + 1;
775775
begin
776776
case &Type of
777777
IMAGE_REL_BASED_HIGH, IMAGE_REL_BASED_LOW:

Diff for: Headers/Ntapi.ProcessThreadsApi.pas

+3-3
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ TProcessInformation = record
231231
[FlagName(STARTF_TITLEISAPPID, 'Title Is AppID')]
232232
[FlagName(STARTF_PREVENTPINNING, 'Prevent Pinning')]
233233
[FlagName(STARTF_UNTRUSTEDSOURCE, 'Untrusted Source')]
234-
TStarupFlags = type Cardinal;
234+
TStartupFlags = type Cardinal;
235235

236236
// SDK::processthreadsapi.h
237237
[SDKName('STARTUPINFOW')]
@@ -247,7 +247,7 @@ TStartupInfoW = record
247247
XCountChars: Cardinal;
248248
YCountChars: Cardinal;
249249
FillAttribute: TConsoleFill;
250-
Flags: TStarupFlags;
250+
Flags: TStartupFlags;
251251
ShowWindow: TShowMode16;
252252
[Unlisted] cbReserved2: Word;
253253
[Unlisted] lpReserved2: PByte;
@@ -297,7 +297,7 @@ TStartupInfoW = record
297297
// SDK::WinBase.h - mask for extracting TProcThreadAttributeNum
298298
PROC_THREAD_ATTRIBUTE_NUMBER = $0000FFFF;
299299

300-
// SDK::WinBase.h & PHNT::ntpsapi.h - processess & thread attribute values
300+
// SDK::WinBase.h & PHNT::ntpsapi.h - process & thread attribute values
301301
PROC_THREAD_ATTRIBUTE_PARENT_PROCESS = $20000;
302302
PROC_THREAD_ATTRIBUTE_EXTENDED_FLAGS = $60001;
303303
PROC_THREAD_ATTRIBUTE_HANDLE_LIST = $20002;

Diff for: Headers/Ntapi.ShellApi.pas

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ TShellExecuteInfoW = record
9999
): HResult; stdcall;
100100

101101
function AddStartupFlags(
102-
[in] StartupInfoFlags: TStarupFlags
102+
[in] StartupInfoFlags: TStartupFlags
103103
): HResult; stdcall;
104104

105105
function SetTitle(

Diff for: Headers/Ntapi.Shlwapi.pas

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ interface
6363
[FlagName(SHACF_URLMRU, 'URLS in Recently Used')]
6464
[FlagName(SHACF_USETAB, 'Use Tab')]
6565
[FlagName(SHACF_FILESYS_ONLY, 'Filesystem Only')]
66-
[FlagName(SHACF_FILESYS_DIRS, 'Filesystem Direcotries')]
66+
[FlagName(SHACF_FILESYS_DIRS, 'Filesystem Directories')]
6767
[FlagName(SHACF_VIRTUAL_NAMESPACE, 'Virtual Namespace')]
6868
[FlagName(SHACF_AUTOSUGGEST_FORCE_ON, 'Auto-suggest Force On')]
6969
[FlagName(SHACF_AUTOSUGGEST_FORCE_OFF, 'Auto-suggest Force Off')]

Diff for: Headers/Ntapi.WinBase.pas

+1-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ function GetApplicationRestartSettings(
324324
// SDK::WinBase.h
325325
[Result: ReleaseWith('UnregisterApplicationRecoveryCallback')]
326326
function RegisterApplicationRecoveryCallback(
327-
[in] RecoveyCallback: TApplicationRecoveryCallback;
327+
[in] RecoveryCallback: TApplicationRecoveryCallback;
328328
[in, opt] Parameter: Pointer;
329329
[in] PingInterval: Cardinal;
330330
[Reserved] Flags: Cardinal

0 commit comments

Comments
 (0)