From 533ca472965e22aaae803db8817fc05108687a3b Mon Sep 17 00:00:00 2001 From: marco Date: Thu, 18 Jun 2015 08:54:50 +0000 Subject: [PATCH] --- Merging r30258 into '.': U packages/chm/src/fasthtmlparser.pas --- Recording mergeinfo for merge of r30258 into '.': U . --- Merging r30292 into '.': U rtl/objpas/classes/streams.inc --- Recording mergeinfo for merge of r30292 into '.': G . --- Merging r30327 into '.': U packages/winunits-base/src/imm_dyn.pas U packages/winunits-base/src/imm.pas --- Recording mergeinfo for merge of r30327 into '.': G . --- Merging r30618 into '.': U utils/fpmake.pp --- Recording mergeinfo for merge of r30618 into '.': G . --- Merging r30621 into '.': U rtl/linux/linux.pp --- Recording mergeinfo for merge of r30621 into '.': G . --- Merging r30332 into '.': U rtl/openbsd/ptypes.inc --- Recording mergeinfo for merge of r30332 into '.': G . --- Merging r30333 into '.': G rtl/openbsd/ptypes.inc --- Recording mergeinfo for merge of r30333 into '.': G . --- Merging r30365 into '.': U packages/regexpr/src/regexpr.pas --- Recording mergeinfo for merge of r30365 into '.': G . # revisions: 30258,30292,30327,30618,30621,30332,30333,30365 git-svn-id: branches/fixes_3_0@31113 - --- packages/chm/src/fasthtmlparser.pas | 19 +------------------ packages/regexpr/src/regexpr.pas | 11 +++++++++-- packages/winunits-base/src/imm.pas | 8 ++++---- packages/winunits-base/src/imm_dyn.pas | 4 ++-- rtl/linux/linux.pp | 14 ++++++++++++++ rtl/objpas/classes/streams.inc | 11 +++++++---- rtl/openbsd/ptypes.inc | 7 +++++-- utils/fpmake.pp | 1 + 8 files changed, 43 insertions(+), 32 deletions(-) diff --git a/packages/chm/src/fasthtmlparser.pas b/packages/chm/src/fasthtmlparser.pas index 153390f7be..dbe09e81a1 100644 --- a/packages/chm/src/fasthtmlparser.pas +++ b/packages/chm/src/fasthtmlparser.pas @@ -1,22 +1,5 @@ -{ Copyright (C) <2005> fasthtmlparser.pas - - This library is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published by - the Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License - for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301, USA. -} { - See the file COPYING.FPC, included in this distribution, - for details about the copyright. + See the section LICENSE/TERMS below for details about the copyright. } // TODO: { diff --git a/packages/regexpr/src/regexpr.pas b/packages/regexpr/src/regexpr.pas index e678627fed..0f9bee2069 100644 --- a/packages/regexpr/src/regexpr.pas +++ b/packages/regexpr/src/regexpr.pas @@ -176,7 +176,7 @@ const const - NSUBEXP = 15; // max number of subexpression //###0.929 + NSUBEXP = 90; // max number of subexpression //###0.929 // Cannot be more than NSUBEXPMAX // Be carefull - don't use values which overflow CLOSE opcode // (in this case you'll get compiler erorr). @@ -389,7 +389,8 @@ type function GetLinePairedSeparator : RegExprString; public - constructor Create; + constructor Create; overload; + constructor Create(AExpression:string); overload; destructor Destroy; override; class function VersionMajor : integer; //###0.944 @@ -1201,6 +1202,12 @@ constructor TRegExpr.Create; end; { of constructor TRegExpr.Create --------------------------------------------------------------} +constructor TRegExpr.Create(AExpression:string); +begin + create; + Expression:=AExpression; +end; + destructor TRegExpr.Destroy; begin if programm <> nil then diff --git a/packages/winunits-base/src/imm.pas b/packages/winunits-base/src/imm.pas index ba57e8046a..9f667ac198 100644 --- a/packages/winunits-base/src/imm.pas +++ b/packages/winunits-base/src/imm.pas @@ -314,17 +314,17 @@ function ImmReleaseContext(wnd: HWND; imc: HIMC): LongBool; stdcall; external Im function ImmAssociateContext(wnd: HWND; imc: HIMC): HIMC; stdcall; external Imm name 'ImmAssociateContext'; function ImmAssociateContextEx(wnd: HWND; imc: HIMC; dwFlags: DWORD): LongBool; stdcall; external Imm name 'ImmAssociateContextEx'; -function ImmGetCompositionStringA(imc: HIMC; dwIndex: DWORD; +function ImmGetCompositionStringA(imc: HIMC; dwIndex: LONG; lpBuf: LPVOID; dwBufLen: DWORD): Longword; stdcall; external Imm name 'ImmGetCompositionStringA'; -function ImmGetCompositionStringW(imc: HIMC; dwIndex: DWORD; +function ImmGetCompositionStringW(imc: HIMC; dwIndex: LONG; lpBuf: LPVOID; dwBufLen: DWORD): Longword; stdcall; external Imm name 'ImmGetCompositionStringW'; {$ifndef UNICODE} function ImmGetCompositionString(imc: HIMC; dwIndex: DWORD; - lpBuf: LPVOID; dwBufLen: DWORD): Longword; stdcall; external Imm name 'ImmGetCompositionStringA'; + lpBuf: LPVOID; dwBufLen: DWORD): LONG; stdcall; external Imm name 'ImmGetCompositionStringA'; {$else} function ImmGetCompositionString(imc: HIMC; dwIndex: DWORD; - lpBuf: LPVOID; dwBufLen: DWORD): Longword; stdcall; external Imm name 'ImmGetCompositionStringW'; + lpBuf: LPVOID; dwBufLen: DWORD): LONG; stdcall; external Imm name 'ImmGetCompositionStringW'; {$endif} function ImmSetCompositionStringA(imc: HIMC; dwIndex: DWORD; lpComp: LPVOID; diff --git a/packages/winunits-base/src/imm_dyn.pas b/packages/winunits-base/src/imm_dyn.pas index 552ec2a768..c29a42cf9c 100644 --- a/packages/winunits-base/src/imm_dyn.pas +++ b/packages/winunits-base/src/imm_dyn.pas @@ -45,9 +45,9 @@ var ImmAssociateContextEx: function (wnd: HWND; imc: HIMC; dwFlags: DWORD): LongBool; stdcall = nil; ImmGetCompositionStringA: function (imc: HIMC; dwIndex: DWORD; - lpBuf: LPVOID; dwBufLen: DWORD): Longword; stdcall = nil; + lpBuf: LPVOID; dwBufLen: DWORD): LONG; stdcall = nil; ImmGetCompositionStringW: function (imc: HIMC; dwIndex: DWORD; - lpBuf: LPVOID; dwBufLen: DWORD): Longword; stdcall = nil; + lpBuf: LPVOID; dwBufLen: DWORD): LONG; stdcall = nil; ImmSetCompositionStringA: function (imc: HIMC; dwIndex: DWORD; lpComp: LPVOID; dwCompLen: DWORD; lpRead: LPVOID; dwReadLen: DWORD): LongBool; stdcall = nil; diff --git a/rtl/linux/linux.pp b/rtl/linux/linux.pp index 0aa4e864dc..d9f4f51b26 100644 --- a/rtl/linux/linux.pp +++ b/rtl/linux/linux.pp @@ -458,6 +458,8 @@ Type function clock_getres(clk_id : clockid_t; res : ptimespec) : cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'clock_getres'; {$ENDIF} function clock_gettime(clk_id : clockid_t; tp: ptimespec) : cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'clock_gettime'; {$ENDIF} function clock_settime(clk_id : clockid_t; tp : ptimespec) : cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'clock_settime'; {$ENDIF} +function setregid(rgid,egid : uid_t): cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'setregid'; {$ENDIF} +function setreuid(ruid,euid : uid_t): cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'setreuid'; {$ENDIF} implementation @@ -725,5 +727,17 @@ function clock_settime(clk_id : clockid_t; tp : ptimespec) : cint; begin clock_settime:=do_SysCall(syscall_nr_clock_settime,tsysparam(clk_id),tsysparam(tp)); end; + +function setregid(rgid,egid : uid_t): cint; + +begin + setregid:=do_syscall(syscall_nr_setregid,rgid,egid); +end; + +function setreuid(ruid,euid : uid_t): cint; +begin + setreuid:=do_syscall(syscall_nr_setreuid,ruid,euid); +end; + {$endif} end. diff --git a/rtl/objpas/classes/streams.inc b/rtl/objpas/classes/streams.inc index e6594d6e00..42b2edcef7 100644 --- a/rtl/objpas/classes/streams.inc +++ b/rtl/objpas/classes/streams.inc @@ -192,7 +192,7 @@ end; repeat r:=Read(PByte(@Buffer)[t],Count); inc(t,r); - until (t=Count) or (r=0); + until (t=Count) or (r<=0); if (tCount then Result:=Count; // This supposes FDataString to be of type AnsiString ! - Move (Pchar(FDataString)[FPosition],Buffer,Result); - FPosition:=FPosition+Result; + if Result>0 then + begin + Move (Pchar(FDataString)[FPosition],Buffer,Result); + FPosition:=FPosition+Result; + end; end; diff --git a/rtl/openbsd/ptypes.inc b/rtl/openbsd/ptypes.inc index 399264e63a..044c8bd93f 100644 --- a/rtl/openbsd/ptypes.inc +++ b/rtl/openbsd/ptypes.inc @@ -52,8 +52,11 @@ type pid_t = cint32; { used as process identifier } TPid = pid_t; pPid = ^pid_t; - +{$ifdef CPU64} + size_t = cuint64; +{$else} size_t = cuint32; { as definied in the C standard} +{$endif} TSize = size_t; pSize = ^size_t; pSize_t = ^size_t; @@ -173,7 +176,7 @@ type end; // kernel statfs from mount.h - TStatfs = packed record + TStatfs = record flags, { copy of mount flags } bsize, { filesystem block size} iosize : cint; { optimal transfr block size } diff --git a/utils/fpmake.pp b/utils/fpmake.pp index 074b529bfa..59c615d5a7 100644 --- a/utils/fpmake.pp +++ b/utils/fpmake.pp @@ -66,6 +66,7 @@ begin P.Dependencies.Add('hash'); P.Dependencies.Add('univint',[darwin,iphonesim]); P.Dependencies.Add('rtl-extra'); + P.Dependencies.Add('rtl-objpas'); P.Version:='3.0.1';