Procházet zdrojové kódy

Merged revisions 1801-1808,1810-1811 via svnmerge from
http://svn.freepascal.org/svn/fpc/trunk

........
r1801 | michael | 2005-11-22 22:22:12 +0100 (Di, 22 Nov 2005) | 1 line

+ Fixed inline detection on functions
........
r1802 | florian | 2005-11-22 22:27:56 +0100 (Di, 22 Nov 2005) | 2 lines

+ support exit();

........
r1803 | florian | 2005-11-22 23:08:11 +0100 (Di, 22 Nov 2005) | 2 lines

* fixed issue with static fields

........
r1804 | florian | 2005-11-22 23:10:40 +0100 (Di, 22 Nov 2005) | 2 lines

+ extended test

........
r1805 | florian | 2005-11-23 19:33:32 +0100 (Mi, 23 Nov 2005) | 2 lines

+ cursorfont.pp from Mikolay Nikolov

........
r1806 | florian | 2005-11-23 20:21:21 +0100 (Mi, 23 Nov 2005) | 2 lines

* fixed AnsiContainsText

........
r1807 | florian | 2005-11-23 20:30:33 +0100 (Mi, 23 Nov 2005) | 2 lines

* AnsiEndsStr fixed

........
r1808 | florian | 2005-11-23 20:32:19 +0100 (Mi, 23 Nov 2005) | 2 lines

* test for last commit

........
........
r1811 | florian | 2005-11-23 22:14:32 +0100 (Mi, 23 Nov 2005) | 2 lines

* fixes 4519, applied patch from Martin Schreiber to do so

........

git-svn-id: branches/fixes_2_0@1812 -

florian před 20 roky
rodič
revize
fff1dd8032

+ 6 - 0
.gitattributes

@@ -3090,6 +3090,7 @@ packages/extra/winunits/shlobj.pp svneol=native#text/plain
 packages/extra/winunits/winver.pp svneol=native#text/plain
 packages/extra/x11/Makefile svneol=native#text/plain
 packages/extra/x11/Makefile.fpc svneol=native#text/plain
+packages/extra/x11/cursorfont.pp svneol=native#text/plain
 packages/extra/x11/keysym.pp svneol=native#text/plain
 packages/extra/x11/x.pp svneol=native#text/plain
 packages/extra/x11/xatom.pp svneol=native#text/plain
@@ -5390,6 +5391,7 @@ tests/webtbf/tw4244.pp svneol=native#text/plain
 tests/webtbf/tw4256.pp svneol=native#text/plain
 tests/webtbf/tw4359.pp svneol=native#text/plain
 tests/webtbf/tw4445.pp svneol=native#text/plain
+tests/webtbf/tw4529.pp svneol=native#text/plain
 tests/webtbf/uw0744.pp svneol=native#text/plain
 tests/webtbf/uw0840a.pp svneol=native#text/plain
 tests/webtbf/uw0840b.pp svneol=native#text/plain
@@ -6091,6 +6093,10 @@ tests/webtbs/tw4477.pp svneol=native#text/plain
 tests/webtbs/tw4487.pp -text svneol=unset#text/plain
 tests/webtbs/tw4489.pp -text svneol=unset#text/plain
 tests/webtbs/tw4496.pp svneol=native#text/plain
+tests/webtbs/tw4519.pp -text svneol=unset#text/plain
+tests/webtbs/tw4529.pp -text svneol=unset#text/plain
+tests/webtbs/tw4537.pp svneol=native#text/plain
+tests/webtbs/tw4540.pp -text svneol=unset#text/plain
 tests/webtbs/ub1873.pp svneol=native#text/plain
 tests/webtbs/ub1883.pp svneol=native#text/plain
 tests/webtbs/uw0555.pp svneol=native#text/plain

+ 0 - 3
compiler/pdecvar.pas

@@ -1149,11 +1149,8 @@ implementation
                (cs_static_keyword in aktmoduleswitches) and (idtoken=_STATIC) then
                   begin
                     include(current_object_option,sp_static);
-                    insert_syms(sc,tt,false,dummysymoptions);
-                    exclude(current_object_option,sp_static);
                     consume(_STATIC);
                     consume(_SEMICOLON);
-                    symdone:=true;
                   end;
 
              { insert it in the symtable, if not done yet }

+ 20 - 15
compiler/pexpr.pas

@@ -377,23 +377,28 @@ implementation
                 begin
                   if not (m_mac in aktmodeswitches) then
                     begin
-                      p1:=comp_expr(true);
-                      consume(_RKLAMMER);
-                      if (block_type=bt_except) then
+                      if not(try_to_consume(_RKLAMMER)) then
                         begin
-                          Message(parser_e_exit_with_argument_not__possible);
-                          { recovery }
-                          p1.free;
-                          p1:=nil;
+                          p1:=comp_expr(true);
+                          consume(_RKLAMMER);
+                          if (block_type=bt_except) then
+                            begin
+                              Message(parser_e_exit_with_argument_not__possible);
+                              { recovery }
+                              p1.free;
+                              p1:=nil;
+                            end
+                          else if (not assigned(current_procinfo) or
+                              is_void(current_procinfo.procdef.rettype.def)) then
+                            begin
+                              Message(parser_e_void_function);
+                              { recovery }
+                              p1.free;
+                              p1:=nil;
+                            end;
                         end
-                      else if (not assigned(current_procinfo) or
-                          is_void(current_procinfo.procdef.rettype.def)) then
-                        begin
-                          Message(parser_e_void_function);
-                          { recovery }
-                          p1.free;
-                          p1:=nil;
-                        end;
+                      else
+                        p1:=nil;
                     end
                   else
                     begin

+ 55 - 33
fcl/passrc/pparser.pp

@@ -1330,6 +1330,10 @@ end;
 // will get the token after the final ";" as next token.
 procedure TPasParser.ParseProcedureOrFunctionHeader(Parent: TPasElement;
   Element: TPasProcedureType; ProcType: TProcType; OfObjectPossible: Boolean);
+  
+Var
+  Tok : String;
+  
 begin
   NextToken;
   case ProcType of
@@ -1407,50 +1411,68 @@ begin
   ExpectToken(tkSemicolon);
 
   while True do
-  begin
-    NextToken;
-    if (CurToken = tkIdentifier) and (UpperCase(CurTokenString) = 'CDECL') then
-    begin
-{      El['calling-conv'] := 'cdecl';}
-      ExpectToken(tkSemicolon);
-    end else if (CurToken = tkIdentifier) and (UpperCase(CurTokenString) = 'STDCALL') then
-    begin
-{      El['calling-conv'] := 'stdcall';}
-      ExpectToken(tkSemicolon);
-    end else if (CurToken = tkIdentifier) and (UpperCase(CurTokenString) = 'COMPILERPROC') then
     begin
+    NextToken;
+    if (CurToken = tkIdentifier) then
+      begin
+      Tok:=UpperCase(CurTokenString);
+      If (Tok='CDECL') then
+        begin
+ {       El['calling-conv'] := 'cdecl';}
+        ExpectToken(tkSemicolon);
+        end 
+      else if (Tok='STDCALL') then
+        begin
+{        El['calling-conv'] := 'stdcall';}
+        ExpectToken(tkSemicolon);
+        end 
+      else if (Tok='COMPILERPROC') then
+        begin
 {      El['calling-conv'] := 'compilerproc';}
-      ExpectToken(tkSemicolon);
-    end else if (CurToken = tkInline) then
-    begin
+        ExpectToken(tkSemicolon);
+        end
+      else if (tok='DEPRECATED') then  
+        begin
+{       El['calling-conv'] := 'deprecated';}
+        ExpectToken(tkSemicolon);
+        end
+      else if (tok='OVERLOAD') then
+        begin
+        TPasProcedure(Parent).IsOverload := True;
+        ExpectToken(tkSemicolon);
+        end 
+      else if (tok='INLINE') then
+        begin
+        ExpectToken(tkSemicolon);
+        end 
+      else if (UpperCase(CurTokenString) = 'EXTERNAL') then  
+        repeat
+          NextToken;
+        until CurToken = tkSemicolon
+      else
+        begin
+        UnGetToken;
+        Break;
+        end  
+      end  
+    else if (CurToken = tkInline) then
+      begin
 {      TPasProcedure(Parent).IsInline := True;}
       ExpectToken(tkSemicolon);
-    end else if (CurToken = tkIdentifier) and (UpperCase(CurTokenString) = 'DEPRECATED') then
-    begin
-{      El['calling-conv'] := 'deprecated';}
-      ExpectToken(tkSemicolon);
-    end else if (CurToken = tkIdentifier) and (UpperCase(CurTokenString) = 'EXTERNAL') then
-    begin
-      repeat
-        NextToken
-      until CurToken = tkSemicolon;
-    end else if (CurToken = tkSquaredBraceOpen) then
-    begin
+      end 
+    else if (CurToken = tkSquaredBraceOpen) then
+      begin
       repeat
         NextToken
       until CurToken = tkSquaredBraceClose;
       ExpectToken(tkSemicolon);
-    end else if Parent.InheritsFrom(TPasProcedure) and
-      (CurToken = tkIdentifier) and (UpperCase(CurTokenString) = 'OVERLOAD') then
-    begin
-      TPasProcedure(Parent).IsOverload := True;
-      ExpectToken(tkSemicolon);
-    end else
-    begin
+      end 
+    else
+      begin
       UngetToken;
       break;
+      end;
     end;
-  end;
 end;
 
 

+ 43 - 38
packages/extra/x11/Makefile

@@ -1,5 +1,5 @@
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2005/11/08]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2005/11/14]
 #
 default: all
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-emx i386-watcom i386-netwlibc i386-wince m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos powerpc-linux powerpc-netbsd powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-wince powerpc64-linux
@@ -233,115 +233,115 @@ PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/ext
 override PACKAGE_NAME=x11
 override PACKAGE_VERSION=2.0.3
 ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),i386-qnx)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),i386-netware)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),i386-wdosx)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),i386-watcom)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),i386-netwlibc)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),m68k-freebsd)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),m68k-amiga)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),m68k-atari)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),m68k-openbsd)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),m68k-palmos)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),powerpc-macos)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 endif
 override INSTALL_FPCPACKAGE=y
 ifdef REQUIRE_UNITSDIR
@@ -546,6 +546,11 @@ GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
 endif
 endif
 endif
+ifeq ($(CPU_TARGET),powerpc64)
+ifeq ($(BINUTILSPREFIX),)
+GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
+endif
+endif
 endif
 ifndef GCCLIBDIR
 CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))

+ 1 - 1
packages/extra/x11/Makefile.fpc

@@ -7,7 +7,7 @@ name=x11
 version=2.0.3
 
 [target]
-units=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib
+units=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
 
 [require]
 libc=y

+ 116 - 0
packages/extra/x11/cursorfont.pp

@@ -0,0 +1,116 @@
+{ $Xorg: cursorfont.h,v 1.4 2001/02/09 02:03:39 xorgcvs Exp $ }
+{
+
+Copyright 1987, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+}
+
+unit cursorfont;
+
+interface
+
+const
+  XC_num_glyphs = 154;
+  XC_X_cursor = 0;
+  XC_arrow = 2;
+  XC_based_arrow_down = 4;
+  XC_based_arrow_up = 6;
+  XC_boat = 8;
+  XC_bogosity = 10;
+  XC_bottom_left_corner = 12;
+  XC_bottom_right_corner = 14;
+  XC_bottom_side = 16;
+  XC_bottom_tee = 18;
+  XC_box_spiral = 20;
+  XC_center_ptr = 22;
+  XC_circle = 24;
+  XC_clock = 26;
+  XC_coffee_mug = 28;
+  XC_cross = 30;
+  XC_cross_reverse = 32;
+  XC_crosshair = 34;
+  XC_diamond_cross = 36;
+  XC_dot = 38;
+  XC_dotbox = 40;
+  XC_double_arrow = 42;
+  XC_draft_large = 44;
+  XC_draft_small = 46;
+  XC_draped_box = 48;
+  XC_exchange = 50;
+  XC_fleur = 52;
+  XC_gobbler = 54;
+  XC_gumby = 56;
+  XC_hand1 = 58;
+  XC_hand2 = 60;
+  XC_heart = 62;
+  XC_icon = 64;
+  XC_iron_cross = 66;
+  XC_left_ptr = 68;
+  XC_left_side = 70;
+  XC_left_tee = 72;
+  XC_leftbutton = 74;
+  XC_ll_angle = 76;
+  XC_lr_angle = 78;
+  XC_man = 80;
+  XC_middlebutton = 82;
+  XC_mouse = 84;
+  XC_pencil = 86;
+  XC_pirate = 88;
+  XC_plus = 90;
+  XC_question_arrow = 92;
+  XC_right_ptr = 94;
+  XC_right_side = 96;
+  XC_right_tee = 98;
+  XC_rightbutton = 100;
+  XC_rtl_logo = 102;
+  XC_sailboat = 104;
+  XC_sb_down_arrow = 106;
+  XC_sb_h_double_arrow = 108;
+  XC_sb_left_arrow = 110;
+  XC_sb_right_arrow = 112;
+  XC_sb_up_arrow = 114;
+  XC_sb_v_double_arrow = 116;
+  XC_shuttle = 118;
+  XC_sizing = 120;
+  XC_spider = 122;
+  XC_spraycan = 124;
+  XC_star = 126;
+  XC_target = 128;
+  XC_tcross = 130;
+  XC_top_left_arrow = 132;
+  XC_top_left_corner = 134;
+  XC_top_right_corner = 136;
+  XC_top_side = 138;
+  XC_top_tee = 140;
+  XC_trek = 142;
+  XC_ul_angle = 144;
+  XC_umbrella = 146;
+  XC_ur_angle = 148;
+  XC_watch = 150;
+  XC_xterm = 152;
+
+implementation
+
+end.

+ 5 - 5
rtl/objpas/strutils.pp

@@ -27,7 +27,7 @@ uses
   ---------------------------------------------------------------------}
 
 Function AnsiResemblesText(const AText, AOther: string): Boolean;
-Function AnsiContainsText(const AText, ASubText: string): Boolean;inline;
+Function AnsiContainsText(const AText, ASubText: string): Boolean;
 Function AnsiStartsText(const ASubText, AText: string): Boolean;inline;
 Function AnsiEndsText(const ASubText, AText: string): Boolean;inline;
 Function AnsiReplaceText(const AText, AFromText, AToText: string): string;inline;
@@ -200,9 +200,9 @@ begin
     Result:=False;
 end;
 
-Function AnsiContainsText(const AText, ASubText: string): Boolean;inline;
+Function AnsiContainsText(const AText, ASubText: string): Boolean;
 begin
-  AnsiContainsText:=AnsiPos(ASubText,AText)<>0;
+  AnsiContainsText:=AnsiPos(AnsiUppercase(ASubText),AnsiUppercase(AText))>0;
 end;
 
 
@@ -250,7 +250,7 @@ end;
 
 Function AnsiContainsStr(const AText, ASubText: string): Boolean;inline;
 begin
-  Result := AnsiPos(ASubText,AText)<>0;
+  Result := AnsiPos(ASubText,AText)>0;
 end;
 
 
@@ -262,7 +262,7 @@ end;
 
 Function AnsiEndsStr(const ASubText, AText: string): Boolean;inline;
 begin
- Result := AnsiPos(ASubText,AText)=(length(AText)-length(ASubText)+1);
+ Result := AnsiCompareStr(Copy(AText,length(AText)-length(ASubText)+1,length(ASubText)),ASubText)=0;
 end;
 
 

+ 22 - 6
tests/test/testv9.pp

@@ -1,11 +1,13 @@
+{$ifdef fpc}
 {$mode objfpc}
+{$endif fpc}
 uses
   Variants;
 
 var
-  a : array of longint;
-  a2 : array of array of longint;
-  v : variant;
+  a,av : array of longint;
+  a2,av2 : array of array of longint;
+  v,v2 : variant;
   i,j : longint;
 begin
   setlength(a,1000);
@@ -24,13 +26,27 @@ begin
   for i:=0 to high(a2) do
     for j:=0 to high(a2[i]) do
       a2[i,j]:=i*j;
-  v:=a2;
+  writeln(length(a2));
+  writeln(length(a2[0]));
+  v2:=a2;
   for i:=0 to high(a2) do
     for j:=0 to high(a2[i]) do
-    if v[i,j]<>i*j then
+    if v2[i,j]<>i*j then
       begin
-        writeln('v[',i,',',j,']=',v[i,j]);
+        writeln('v2[',i,',',j,']=',v2[i,j]);
         halt(1);
       end;
   writeln('complex test ok');
+
+  av:=v;
+  writeln('1d dyn. array:=var. array ok');
+
+
+  av2:=v2;
+  if high(av2)<>VarArrayHighBound(v2,1) then
+   halt(1);
+  if high(av2[0])<>VarArrayHighBound(v2,2) then
+   halt(1);
+  writeln('2d dyn. array:=var. array ok');
+  writeln('ok');
 end.

+ 19 - 0
tests/webtbf/tw4529.pp

@@ -0,0 +1,19 @@
+{ %FAIL }
+{ Source provided for Free Pascal Bug Report 4529 }
+{ Submitted by "Vincent Snijders" on  2005-11-20 }
+{ e-mail: [email protected] }
+program Project1;
+
+{$mode objfpc}{$H+}{$static on}
+
+uses
+  Classes
+  { add your units here };
+
+type
+  MyClass = class(TComponent)
+    FClassVar: integer; static;
+  end;
+
+begin
+end.

+ 49 - 0
tests/webtbs/tw4519.pp

@@ -0,0 +1,49 @@
+{ Source provided for Free Pascal Bug Report 4519 }
+{ Submitted by "Martin Schreiber" on  2005-11-17 }
+{ e-mail:  }
+program project1;
+{$mode objfpc}{$h+}
+uses
+ classes;
+ 
+type
+ ttestcomp = class(tcomponent)
+  private
+   fstringvar: string;
+   procedure readstringvar(reader: treader);
+   procedure writestringvar(writer: twriter);
+  protected
+   procedure defineproperties(filer: tfiler); override;
+ end;
+ 
+{ ttestcomp }
+
+procedure ttestcomp.readstringvar(reader: treader);
+begin
+ fstringvar:= reader.readstring;
+end;
+
+procedure ttestcomp.writestringvar(writer: twriter);
+begin
+ writer.writestring(fstringvar);
+end;
+
+procedure ttestcomp.defineproperties(filer: tfiler);
+begin
+ filer.defineproperty('stringvar',@readstringvar,@writestringvar,true);
+end;
+
+var
+ testcomp: ttestcomp;
+ stream1,stream2: tmemorystream;
+ 
+begin
+ testcomp:= ttestcomp.create(nil);
+ stream1:= tmemorystream.create;
+ stream1.writecomponent(testcomp);
+ stream1.position:= 0;
+ stream2:= tmemorystream.create;
+ objectbinarytotext(stream1,stream2); //<- AV
+ stream1.free;
+ stream2.free;
+end.

+ 20 - 0
tests/webtbs/tw4529.pp

@@ -0,0 +1,20 @@
+{ Source provided for Free Pascal Bug Report 4529 }
+{ Submitted by "Vincent Snijders" on  2005-11-20 }
+{ e-mail: [email protected] }
+program Project1;
+
+{$mode objfpc}{$H+}{$static on}
+
+uses
+  Classes
+  { add your units here };
+
+type
+  MyClass = class(TComponent)
+  //private
+  public
+    FClassVar: integer; static;
+  end;
+
+begin
+end.

+ 12 - 0
tests/webtbs/tw4537.pp

@@ -0,0 +1,12 @@
+procedure foo;
+  begin
+    exit();
+  end;
+
+function bar: integer;
+  begin
+    exit(42);
+  end;
+  
+begin
+end.

+ 23 - 0
tests/webtbs/tw4540.pp

@@ -0,0 +1,23 @@
+{ Source provided for Free Pascal Bug Report 4540 }
+{ Submitted by "Aleksa Todorovic" on  2005-11-23 }
+{ e-mail: [email protected] }
+program TestAnsiEndsStr;
+
+uses
+  StrUtils;
+
+begin
+  Writeln('A/AB: ', AnsiEndsStr('A', 'AB'));
+  if AnsiEndsStr('A', 'AB')<>false then
+    halt(1);
+    // False -> ok
+  Writeln('AB/AB: ', AnsiEndsStr('AB', 'AB'));
+  if AnsiEndsStr('AB', 'AB')<>true then
+    halt(1);
+    // True -> ok
+  Writeln('ABC/AB: ', AnsiEndsStr('ABC', 'AB'));
+  if AnsiEndsStr('ABC', 'AB')<>false then
+    halt(1);
+  writeln('ok');
+    // True -> ???
+end.