From bd2b954ae59fdee3e94f7bafeb43a527a5e8c2e2 Mon Sep 17 00:00:00 2001 From: Michael VAN CANNEYT Date: Wed, 21 Dec 2022 17:36:27 +0100 Subject: [PATCH] * Char -> AnsiChar --- rtl/palmos/api/common.inc | 10 +++++----- rtl/palmos/api/font.inc | 14 +++++++------- rtl/palmos/palmos.inc | 2 +- rtl/palmos/pilot.pp | 8 ++++---- rtl/palmos/sysfile.inc | 4 ++-- rtl/palmos/system.pp | 10 +++++----- 6 files changed, 24 insertions(+), 24 deletions(-) diff --git a/rtl/palmos/api/common.inc b/rtl/palmos/api/common.inc index adabd02aee..2569191ec8 100644 --- a/rtl/palmos/api/common.inc +++ b/rtl/palmos/api/common.inc @@ -51,7 +51,7 @@ ACCOMPANYING THE COMPACT DISK. { Fixed size data types } type - SByte = char; // I'am not sure about that (FK) + SByte = AnsiChar; // I'am not sure about that (FK) UInt16 = word; UInt32 = cardinal; SWord = integer; @@ -59,7 +59,7 @@ ACCOMPANYING THE COMPACT DISK. SDWord = longint; Int32 = longint; DWord = cardinal; - UChar = char; // I'am not sure about that (FK) + UChar = AnsiChar; // I'am not sure about that (FK) Short = integer; UShort = word; Int = integer; @@ -83,7 +83,7 @@ ACCOMPANYING THE COMPACT DISK. { Logical data types } BooleanPtr = ^Boolean; - CharPtr = ^Char; + CharPtr = ^AnsiChar; UCharPtr = ^UChar; ShortPtr = ^Short; UShortPtr = ^UShort; @@ -93,9 +93,9 @@ ACCOMPANYING THE COMPACT DISK. ULongPtr = ^ULong; { Generic Pointer types used by Memory Manager } - { We have to define Ptr as char* because that's what the Mac includes do. } + { We have to define Ptr as AnsiChar* because that's what the Mac includes do. } { global pointer } - Ptr = ^char; + Ptr = ^AnsiChar; { global handle } Handle = ^Ptr; diff --git a/rtl/palmos/api/font.inc b/rtl/palmos/api/font.inc index cf4be9a44d..f63ac9acf4 100644 --- a/rtl/palmos/api/font.inc +++ b/rtl/palmos/api/font.inc @@ -40,12 +40,12 @@ function FntCharHeight:SWord;systrap sysTrapFntCharHeight; function FntLineHeight:SWord;systrap sysTrapFntLineHeight; function FntAverageCharWidth:SWord;systrap sysTrapFntAverageCharWidth; - function FntCharWidth(ch:Char):SWord;systrap sysTrapFntCharWidth; - function FntCharsWidth(chars:pChar; len:Word):SWord;systrap sysTrapFntCharsWidth; - procedure FntCharsInWidth(string:pChar; stringWidthP:pSWord; stringLengthP:pSWord; fitWithinWidth:pBoolean);systrap sysTrapFntCharsInWidth; + function FntCharWidth(ch:AnsiChar):SWord;systrap sysTrapFntCharWidth; + function FntCharsWidth(chars:PAnsiChar; len:Word):SWord;systrap sysTrapFntCharsWidth; + procedure FntCharsInWidth(string:PAnsiChar; stringWidthP:pSWord; stringLengthP:pSWord; fitWithinWidth:pBoolean);systrap sysTrapFntCharsInWidth; function FntDescenderHeight:SWord;systrap sysTrapFntDescenderHeight; - function FntLineWidth(pChars:pChar; length:Word):SWord;systrap sysTrapFntLineWidth; - function FntWordWrap(chars:pChar; maxWidth:Word):Word;systrap sysTrapFntWordWrap; - procedure FntWordWrapReverseNLines(chars:pChar; maxWidth:Word; linesToScrollP:WordPtr; scrollPosP:WordPtr);systrap sysTrapFntWordWrapReverseNLines; - procedure FntGetScrollValues(chars:pChar; width:Word; scrollPos:Word; linesP:WordPtr; topLine:WordPtr);systrap sysTrapFntGetScrollValues; + function FntLineWidth(pChars:PAnsiChar; length:Word):SWord;systrap sysTrapFntLineWidth; + function FntWordWrap(chars:PAnsiChar; maxWidth:Word):Word;systrap sysTrapFntWordWrap; + procedure FntWordWrapReverseNLines(chars:PAnsiChar; maxWidth:Word; linesToScrollP:WordPtr; scrollPosP:WordPtr);systrap sysTrapFntWordWrapReverseNLines; + procedure FntGetScrollValues(chars:PAnsiChar; width:Word; scrollPos:Word; linesP:WordPtr; topLine:WordPtr);systrap sysTrapFntGetScrollValues; function FntDefineFont(font:FontID; fontP:FontPtr):Err;systrap sysTrapFntDefineFont; diff --git a/rtl/palmos/palmos.inc b/rtl/palmos/palmos.inc index 8776729899..6fddbcdf0f 100644 --- a/rtl/palmos/palmos.inc +++ b/rtl/palmos/palmos.inc @@ -99,6 +99,6 @@ function DmReleaseResource(resourceH: MemHandle): Err; syscall sysTrapDmReleaseR const sysTrapWinDrawChars = $A220; -procedure WinDrawChars(const chars: PChar; len: SmallInt; x, y: SmallInt); syscall sysTrapWinDrawChars; +procedure WinDrawChars(const chars: PAnsiChar; len: SmallInt; x, y: SmallInt); syscall sysTrapWinDrawChars; {$PACKRECORDS DEFAULT} diff --git a/rtl/palmos/pilot.pp b/rtl/palmos/pilot.pp index bd6bf071b9..c20fdc52b7 100644 --- a/rtl/palmos/pilot.pp +++ b/rtl/palmos/pilot.pp @@ -87,16 +87,16 @@ interface UInt = word; OsType = UInt; - Cstring = packed array[1..32] of char; - Cstr16 = packed array[1..16] of char; - Cstr8 = packed array[1..8] of char; + Cstring = packed array[1..32] of AnsiChar; + Cstr16 = packed array[1..16] of AnsiChar; + Cstr8 = packed array[1..8] of AnsiChar; PString = packed record case boolean of true: ( p: String; ); false: ( - c: array[0..255] of char + c: array[0..255] of AnsiChar ); end; diff --git a/rtl/palmos/sysfile.inc b/rtl/palmos/sysfile.inc index edb91ab397..052d5f822e 100644 --- a/rtl/palmos/sysfile.inc +++ b/rtl/palmos/sysfile.inc @@ -25,12 +25,12 @@ begin end; -procedure do_erase(p : pchar; pchangeable: boolean); +procedure do_erase(p : PAnsiChar; pchangeable: boolean); begin end; -procedure do_rename(p1,p2 : pchar; p1changeable, p2changeable: boolean); +procedure do_rename(p1,p2 : PAnsiChar; p1changeable, p2changeable: boolean); begin end; diff --git a/rtl/palmos/system.pp b/rtl/palmos/system.pp index 5a3073043a..2ad6ad5199 100644 --- a/rtl/palmos/system.pp +++ b/rtl/palmos/system.pp @@ -31,8 +31,8 @@ const DriveSeparator = ':'; ExtensionSeparator = '.'; PathSeparator = ';'; - AllowDirectorySeparators : set of char = ['\','/']; - AllowDriveSeparators : set of char = [':']; + AllowDirectorySeparators : set of AnsiChar = ['\','/']; + AllowDriveSeparators : set of AnsiChar = [':']; FileNameCaseSensitive = false; FileNameCasePreserving = true; CtrlZMarksEOF: boolean = false; (* #26 not considered as end of file *) @@ -50,10 +50,10 @@ const StdErrorHandle = $ffff; var - args: PChar; + args: PAnsiChar; argc: LongInt; - argv: PPChar; - envp: PPChar; + argv: PPAnsiChar; + envp: PPAnsiChar; {$if defined(FPUSOFT)}