소스 검색

* write false/true lower case in iso mode

git-svn-id: trunk@15678 -
florian 15 년 전
부모
커밋
d0ea23f39e
3개의 변경된 파일18개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      compiler/ninl.pas
  2. 1 0
      rtl/inc/compproc.inc
  3. 12 0
      rtl/inc/text.inc

+ 5 - 1
compiler/ninl.pas

@@ -507,6 +507,11 @@ implementation
                     else
                     else
                       begin
                       begin
                         name := procprefixes[do_read]+'boolean';
                         name := procprefixes[do_read]+'boolean';
+
+                        { iso pascal needs a different handler }
+                        if (m_iso in current_settings.modeswitches) and not(do_read) then
+                           name:=name+'_iso';
+
                         readfunctype:=booltype;
                         readfunctype:=booltype;
                       end
                       end
                   else
                   else
@@ -778,7 +783,6 @@ implementation
         para,nextpara:Tcallparanode;
         para,nextpara:Tcallparanode;
         p1:Tnode;
         p1:Tnode;
         temp:Ttempcreatenode;
         temp:Ttempcreatenode;
-
     begin
     begin
       found_error:=false;
       found_error:=false;
       para:=Tcallparanode(params);
       para:=Tcallparanode(params);

+ 1 - 0
rtl/inc/compproc.inc

@@ -485,6 +485,7 @@ procedure fpc_write_text_enum(typinfo,ord2strindex:pointer;len:sizeint;var t:tex
 Procedure fpc_Write_Text_Currency(fixkomma,Len : Longint;var t : Text;c : Currency); compilerproc;
 Procedure fpc_Write_Text_Currency(fixkomma,Len : Longint;var t : Text;c : Currency); compilerproc;
 {$endif FPC_HAS_STR_CURRENCY}
 {$endif FPC_HAS_STR_CURRENCY}
 Procedure fpc_Write_Text_Boolean(Len : Longint;var t : Text;b : Boolean); compilerproc;
 Procedure fpc_Write_Text_Boolean(Len : Longint;var t : Text;b : Boolean); compilerproc;
+Procedure fpc_Write_Text_Boolean_Iso(Len : Longint;var t : Text;b : Boolean); compilerproc;
 Procedure fpc_Write_Text_Char(Len : Longint;var t : Text;c : Char); compilerproc;
 Procedure fpc_Write_Text_Char(Len : Longint;var t : Text;c : Char); compilerproc;
 {$ifdef FPC_HAS_FEATURE_WIDESTRINGS}
 {$ifdef FPC_HAS_FEATURE_WIDESTRINGS}
 Procedure fpc_Write_Text_WideChar(Len : Longint;var t : Text;c : WideChar); compilerproc;
 Procedure fpc_Write_Text_WideChar(Len : Longint;var t : Text;c : WideChar); compilerproc;

+ 12 - 0
rtl/inc/text.inc

@@ -848,6 +848,18 @@ Begin
 End;
 End;
 
 
 
 
+Procedure fpc_Write_Text_Boolean_Iso(Len : Longint;var t : Text;b : Boolean); iocheck; compilerproc;
+Begin
+  If (InOutRes<>0) then
+   exit;
+{ Can't use array[boolean] because b can be >0 ! }
+  if b then
+    Write_Str(Len,t,'true')
+  else
+    Write_Str(Len,t,'false');
+End;
+
+
 Procedure fpc_Write_Text_Char(Len : Longint;var t : Text;c : Char); iocheck; compilerproc;
 Procedure fpc_Write_Text_Char(Len : Longint;var t : Text;c : Char); iocheck; compilerproc;
 Begin
 Begin
   If (InOutRes<>0) then
   If (InOutRes<>0) then