Bläddra i källkod

Merged revisions 7326,7557,7850-7851,7943,7989 via svnmerge from
svn+ssh://[email protected]/FPC/svn/fpc/trunk

........
r7326 | michael | 2007-05-13 19:45:44 +0200 (Sun, 13 May 2007) | 1 line

* Fixed writing of open array declaration
........
r7557 | michael | 2007-06-03 00:17:45 +0200 (Sun, 03 Jun 2007) | 1 line

* Fixed writing of untyped file
........
r7850 | michael | 2007-06-29 22:16:44 +0200 (Fri, 29 Jun 2007) | 1 line

* Defined ExceptionClass and ExceptObjProc for Delphi compatibility (bug 8459)
........
r7851 | michael | 2007-06-29 22:20:53 +0200 (Fri, 29 Jun 2007) | 1 line

* Fixed savetostream to use writebuffer
........
r7943 | michael | 2007-07-04 09:18:37 +0200 (Wed, 04 Jul 2007) | 1 line

* Exposed FindIntToIdent and FindIntToIdent (Delphi compatible)
........
r7989 | michael | 2007-07-09 16:29:11 +0200 (Mon, 09 Jul 2007) | 3 lines

* Patch from Martin Pekar:
* Allow #0 characters in TStrings.CommaText

........

git-svn-id: branches/fixes_2_2@8009 -

joost 18 år sedan
förälder
incheckning
bde3d786d0
3 ändrade filer med 21 tillägg och 5 borttagningar
  1. 4 1
      rtl/objpas/objpas.pp
  2. 1 0
      rtl/objpas/sysutils/sysutils.inc
  3. 16 4
      utils/fpdoc/dw_html.pp

+ 4 - 1
rtl/objpas/objpas.pp

@@ -40,6 +40,10 @@ unit objpas;
        PPointerArray = ^PointerArray;
        TBoundArray = array of integer;
 
+Var
+   ExceptionClass: TClass; { Exception base class (must actually be Exception, defined in sysutils ) }
+   ExceptObjProc: Pointer; { Used to convert OS exceptions to exceptions in Delphi. Unused in FPC}
+
 {****************************************************************************
                              Compatibility routines.
 ****************************************************************************}
@@ -94,7 +98,6 @@ unit objpas;
      TResStringRec=AnsiString;
    Function LoadResString(p:PResStringRec):AnsiString;
 
-
   implementation
 
 {****************************************************************************

+ 1 - 0
rtl/objpas/sysutils/sysutils.inc

@@ -358,6 +358,7 @@ Procedure InitExceptions;
   (e.g: SIGSEGV -> ESegFault or so.)
 }
 begin
+  ExceptionClass := Exception;
   ExceptProc:=@CatchUnhandledException;
   // Create objects that may have problems when there is no memory.
   OutOfMemory:=EOutOfMemory.Create(SOutOfMemory);

+ 16 - 4
utils/fpdoc/dw_html.pp

@@ -1401,6 +1401,10 @@ end;
 { Returns the new CodeEl, which will be the old CodeEl in most cases }
 function THTMLWriter.AppendType(CodeEl, TableEl: TDOMElement;
   Element: TPasType; Expanded: Boolean; NestingLevel: Integer): TDOMElement;
+  
+Var
+  S : String;  
+  
 begin
   Result := CodeEl;
 
@@ -1412,9 +1416,15 @@ begin
   // Array
   if Element.ClassType = TPasArrayType then
   begin
-    AppendPasSHFragment(CodeEl,
-      'array [' + TPasArrayType(Element).IndexRange + '] of ', 0);
-    Result := AppendType(CodeEl, TableEl, TPasArrayType(Element).ElType, False);
+    S:='array ';
+    If (TPasArrayType(Element).IndexRange<>'') then
+      S:=S+'[' + TPasArrayType(Element).IndexRange + '] ';
+    S:=S+'of ';  
+    If (TPasArrayType(Element).ElType=Nil) then
+      S:=S+'Const';
+    AppendPasSHFragment(CodeEl,S,0);
+    If (TPasArrayType(Element).ElType<>Nil) then
+      Result := AppendType(CodeEl, TableEl, TPasArrayType(Element).ElType, False);
   end else
   // Procedure or funtion type
   if Element.InheritsFrom(TPasProcedureType) then
@@ -1429,7 +1439,9 @@ begin
   // Record type
   else if Element.ClassType = TPasRecordType then
     Result := AppendRecordType(CodeEl, TableEl, TPasRecordType(Element), NestingLevel)
-  else
+  else if (Element.ClassType = TPasFileType) and (TPasFileType(Element).elType=Nil) then
+    AppendPasSHFragment(CodeEl,'file',0)
+  else  
   // Other types
     AppendHyperlink(CodeEl, Element);
 end;