Browse Source

--- Merging r22248 into '.':
U rtl/objpas/sysutils/sysstr.inc
A tests/webtbs/tw22290.pp
--- Merging r22635 into '.':
U packages/univint/src/MacTypes.pas

# revisions: 22248,22635
r22248 | jonas | 2012-08-26 16:51:32 +0200 (Sun, 26 Aug 2012) | 2 lines
Changed paths:
M /trunk/rtl/objpas/sysutils/sysstr.inc
A /trunk/tests/webtbs/tw22290.pp

* print literal e/E in formatfloat if not followed by +/- (remaining part of
mantis #22290)
r22635 | jonas | 2012-10-13 13:38:30 +0200 (Sat, 13 Oct 2012) | 5 lines
Changed paths:
M /trunk/packages/univint/src/MacTypes.pas

* "merge" of r382-383 from macosxintf repository (383 is whitspace fix):

r382 | jonas | 2012-10-13 13:27:03 +0200 (Sat, 13 Oct 2012) | 2 lines

* "bool" is only 32 bit on Darwin/ppc, it's 8 bit on all other platforms

git-svn-id: branches/fixes_2_6@22721 -

marco 12 years ago
parent
commit
48a15bb10e
4 changed files with 19 additions and 3 deletions
  1. 1 0
      .gitattributes
  2. 6 2
      packages/univint/src/MacTypes.pas
  3. 5 1
      rtl/objpas/sysutils/sysstr.inc
  4. 7 0
      tests/webtbs/tw22290.pp

+ 1 - 0
.gitattributes

@@ -11952,6 +11952,7 @@ tests/webtbs/tw2214.pp svneol=native#text/plain
 tests/webtbs/tw2220.pp svneol=native#text/plain
 tests/webtbs/tw2226.pp svneol=native#text/plain
 tests/webtbs/tw2229.pp svneol=native#text/plain
+tests/webtbs/tw22290.pp svneol=native#text/plain
 tests/webtbs/tw22329.pp svneol=native#text/pascal
 tests/webtbs/tw2233.pp svneol=native#text/plain
 tests/webtbs/tw2242.pp svneol=native#text/plain

+ 6 - 2
packages/univint/src/MacTypes.pas

@@ -303,8 +303,12 @@ type
 	********************************************************************************	}
 	ByteParameter = SInt8;
 
-// For interfaces that use Cs "bool" type, which is a 32 bit number
-	CBool = SInt32; 
+// For interfaces that use Cs "bool" type
+{$ifc TARGET_CPU_PPC}
+	CBool = SInt32;
+{$elsec}
+	CBool = SInt8;
+{$endc}
 
 {*******************************************************************************
 

+ 5 - 1
rtl/objpas/sysutils/sysstr.inc

@@ -2063,7 +2063,11 @@ Var
                       Inc(Fmt);
                       End;
                     End;
-                  End;
+                  End
+                Else
+                  { just e/E without subsequent +/- -> not exponential format,
+                    but we have to simply print e/E literally }
+                  ExpFmt:=0;
                 End
               Else
                 Inc(Fmt);

+ 7 - 0
tests/webtbs/tw22290.pp

@@ -0,0 +1,7 @@
+uses
+  SysUtils;
+
+begin
+  if formatfloat('0e',-1)<>'-1e' then
+    halt(1);
+end.