summaryrefslogtreecommitdiff
path: root/rtl/objpas/classes
diff options
context:
space:
mode:
Diffstat (limited to 'rtl/objpas/classes')
-rw-r--r--rtl/objpas/classes/classesh.inc19
-rw-r--r--rtl/objpas/classes/streams.inc26
-rw-r--r--rtl/objpas/classes/stringl.inc20
3 files changed, 54 insertions, 11 deletions
diff --git a/rtl/objpas/classes/classesh.inc b/rtl/objpas/classes/classesh.inc
index 60669bb9fb..adb906bca7 100644
--- a/rtl/objpas/classes/classesh.inc
+++ b/rtl/objpas/classes/classesh.inc
@@ -623,6 +623,9 @@ type
procedure SetNameValueSeparator(c:Char);
procedure WriteData(Writer: TWriter);
procedure DoSetTextStr(const Value: string; DoClear : Boolean);
+ Function GetDelimiter : Char;
+ Function GetNameValueSeparator : Char;
+ Function GetQuoteChar: Char;
protected
procedure DefineProperties(Filer: TFiler); override;
procedure Error(const Msg: string; Data: Integer);
@@ -677,11 +680,11 @@ type
procedure GetNameValue(Index : Integer; Out AName,AValue : String);
function ExtractName(Const S:String):String;
Property TextLineBreakStyle : TTextLineBreakStyle Read GetLBS Write SetLBS;
- property Delimiter: Char read FDelimiter write SetDelimiter;
+ property Delimiter: Char read GetDelimiter write SetDelimiter;
property DelimitedText: string read GetDelimitedText write SetDelimitedText;
Property StrictDelimiter : Boolean Read FStrictDelimiter Write FStrictDelimiter;
- property QuoteChar: Char read FQuoteChar write SetQuoteChar;
- Property NameValueSeparator : Char Read FNameValueSeparator Write SetNameValueSeparator;
+ property QuoteChar: Char read GetQuoteChar write SetQuoteChar;
+ Property NameValueSeparator : Char Read GetNameValueSeparator Write SetNameValueSeparator;
property ValueFromIndex[Index: Integer]: string read GetValueFromIndex write SetValueFromIndex;
property Capacity: Integer read GetCapacity write SetCapacity;
property CommaText: string read GetCommaText write SetCommaText;
@@ -1606,9 +1609,8 @@ type
{$ifdef Unix}
private
// see tthread.inc, ThreadFunc and TThread.Resume
- FSem: Pointer;
+ FSuspendEvent: PRTLEvent;
FInitialSuspended: boolean;
- FSuspendedExternal: boolean;
FSuspendedInternal: longbool;
FThreadReaped: boolean;
{$endif}
@@ -1620,6 +1622,13 @@ type
FSuspendedExternal: boolean;
FPid: LongInt;
{$endif}
+{$ifdef aros}
+ private
+ // see tthread.inc, ThreadFunc and TThread.Resume
+ FSem: Pointer;
+ FCond: Pointer;
+ FInitialSuspended: boolean;
+{$endif}
public
constructor Create(CreateSuspended: Boolean;
const StackSize: SizeUInt = DefaultStackSize);
diff --git a/rtl/objpas/classes/streams.inc b/rtl/objpas/classes/streams.inc
index 63e5895aee..e6594d6e00 100644
--- a/rtl/objpas/classes/streams.inc
+++ b/rtl/objpas/classes/streams.inc
@@ -184,15 +184,31 @@ end;
procedure TStream.ReadBuffer(var Buffer; Count: Longint);
- begin
- if Read(Buffer,Count)<Count then
- Raise EReadError.Create(SReadError);
- end;
+ Var
+ r,t : longint;
+
+ begin
+ t:=0;
+ repeat
+ r:=Read(PByte(@Buffer)[t],Count);
+ inc(t,r);
+ until (t=Count) or (r=0);
+ if (t<Count) then
+ Raise EReadError.Create(SReadError);
+ end;
procedure TStream.WriteBuffer(const Buffer; Count: Longint);
+ var
+ r,t : Longint;
+
begin
- if Write(Buffer,Count)<Count then
+ T:=0;
+ Repeat
+ r:=Write(PByte(@Buffer)[t],Count);
+ inc(t,r);
+ Until (t=count) or (r=0);
+ if (t<Count) then
Raise EWriteError.Create(SWriteError);
end;
diff --git a/rtl/objpas/classes/stringl.inc b/rtl/objpas/classes/stringl.inc
index afc84f49a7..7f274c7702 100644
--- a/rtl/objpas/classes/stringl.inc
+++ b/rtl/objpas/classes/stringl.inc
@@ -74,8 +74,8 @@ begin
FQuoteChar:='"';
FDelimiter:=',';
FNameValueSeparator:='=';
- FSpecialCharsInited:=true;
FLBS:=DefaultTextLineBreakStyle;
+ FSpecialCharsInited:=true;
end;
end;
@@ -97,6 +97,12 @@ begin
FDelimiter:=c;
end;
+Function TStrings.GetDelimiter : Char;
+begin
+ CheckSpecialChars;
+ Result:=FDelimiter;
+end;
+
procedure TStrings.SetQuoteChar(c:Char);
begin
@@ -104,12 +110,24 @@ begin
FQuoteChar:=c;
end;
+Function TStrings.GetQuoteChar :Char;
+begin
+ CheckSpecialChars;
+ Result:=FQuoteChar;
+end;
+
procedure TStrings.SetNameValueSeparator(c:Char);
begin
CheckSpecialChars;
FNameValueSeparator:=c;
end;
+Function TStrings.GetNameValueSeparator :Char;
+begin
+ CheckSpecialChars;
+ Result:=FNameValueSeparator;
+end;
+
function TStrings.GetCommaText: string;