summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2013-11-03 17:23:59 +0000
committermarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2013-11-03 17:23:59 +0000
commitbc2c0832d9969ad319cc1ff710a7c5707e55fbb2 (patch)
tree8926b9312dd1b0a7df0ce367579c7cd0776abaaf
parentb1240a33e7cfe5d4529271eb9ee9b90ba01f8f07 (diff)
downloadfpc-bc2c0832d9969ad319cc1ff710a7c5707e55fbb2.tar.gz
--- Merging r24186 into '.':
U packages/opengles/src/gles20.pas --- Merging r25129 into '.': U rtl/objpas/classes/stringl.inc U rtl/objpas/classes/classesh.inc # revisions: 24186,25129 r24186 | jonas | 2013-04-07 19:25:06 +0200 (Sun, 07 Apr 2013) | 2 lines Changed paths: M /trunk/packages/opengles/src/gles20.pas * prefix calls to dynlibs routines with "dynlibs." so that under Win* the versions from the Windows unit aren't used instead (mantis #24242) r25129 | michael | 2013-07-19 09:16:06 +0200 (Fri, 19 Jul 2013) | 1 line Changed paths: M /trunk/rtl/objpas/classes/classesh.inc M /trunk/rtl/objpas/classes/stringl.inc * Added AddText as suggested in bug ID 24764 git-svn-id: http://svn.freepascal.org/svn/fpc/branches/fixes_2_6@25927 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--packages/opengles/src/gles20.pas8
-rw-r--r--rtl/objpas/classes/classesh.inc2
-rw-r--r--rtl/objpas/classes/stringl.inc15
3 files changed, 19 insertions, 6 deletions
diff --git a/packages/opengles/src/gles20.pas b/packages/opengles/src/gles20.pas
index 0aa66aa09d..acc48378ac 100644
--- a/packages/opengles/src/gles20.pas
+++ b/packages/opengles/src/gles20.pas
@@ -1365,7 +1365,7 @@ implementation
function glGetProcAddress(ahlib:tlibhandle;ProcName:pchar):pointer;
begin
- result:=GetProcAddress(ahlib,ProcName);
+ result:=dynlibs.GetProcAddress(ahlib,ProcName);
{$ifdef EGL}
if assigned(eglGetProcAddress) and not assigned(result) then
result:=eglGetProcAddress(ProcName);
@@ -1465,7 +1465,7 @@ implementation
procedure LoadEGL(lib : pchar);
begin
FreeEGL;
- EGLLib:=LoadLibrary(lib);
+ EGLLib:=dynlibs.LoadLibrary(lib);
if EGLLib=0 then
raise Exception.Create(format('Could not load library: %s',[lib]));
@@ -1687,7 +1687,7 @@ implementation
procedure LoadGLESv2(lib : pchar);
begin
FreeGLESv2;
- GLESv2Lib:=LoadLibrary(lib);
+ GLESv2Lib:=dynlibs.LoadLibrary(lib);
if GLESv2Lib=0 then
raise Exception.Create(format('Could not load library: %s',[lib]));
@@ -1872,4 +1872,4 @@ finalization
{$ifdef EGL}
FreeEGL;
{$endif}
-end. \ No newline at end of file
+end.
diff --git a/rtl/objpas/classes/classesh.inc b/rtl/objpas/classes/classesh.inc
index 9de47d0e67..f081ebe225 100644
--- a/rtl/objpas/classes/classesh.inc
+++ b/rtl/objpas/classes/classesh.inc
@@ -624,6 +624,7 @@ type
procedure SetQuoteChar(c:Char);
procedure SetNameValueSeparator(c:Char);
procedure WriteData(Writer: TWriter);
+ procedure DoSetTextStr(const Value: string; DoClear : Boolean);
protected
procedure DefineProperties(Filer: TFiler); override;
procedure Error(const Msg: string; Data: Integer);
@@ -652,6 +653,7 @@ type
procedure Append(const S: string);
procedure AddStrings(TheStrings: TStrings); overload; virtual;
procedure AddStrings(const TheStrings: array of string); overload; virtual;
+ Procedure AddText(Const S : String); virtual;
procedure Assign(Source: TPersistent); override;
procedure BeginUpdate;
procedure Clear; virtual; abstract;
diff --git a/rtl/objpas/classes/stringl.inc b/rtl/objpas/classes/stringl.inc
index 87f21769c1..ba5ab06d46 100644
--- a/rtl/objpas/classes/stringl.inc
+++ b/rtl/objpas/classes/stringl.inc
@@ -557,7 +557,7 @@ begin
Result:=True;
end;
-Procedure TStrings.SetTextStr(const Value: string);
+Procedure TStrings.DoSetTextStr(const Value: string; DoClear : Boolean);
Var
S : String;
@@ -566,7 +566,8 @@ Var
begin
Try
beginUpdate;
- Clear;
+ if DoClear then
+ Clear;
P:=1;
While GetNextLine (Value,S,P) do
Add(S);
@@ -575,7 +576,17 @@ begin
end;
end;
+Procedure TStrings.SetTextStr(const Value: string);
+begin
+ DoSetTextStr(Value,True);
+end;
+
+Procedure TStrings.AddText(const S: string);
+
+begin
+ DoSetTextStr(S,False);
+end;
Procedure TStrings.SetUpdateState(Updating: Boolean);