Commit a01f0296 by Hristian Kirtchev Committed by Arnaud Charlet

a-ztflau.adb, [...] (Load_Real): Do not parse "." in the case of nnn.xxx when…

a-ztflau.adb, [...] (Load_Real): Do not parse "." in the case of nnn.xxx when nnn terminates with an underscore.

2007-04-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* a-ztflau.adb, a-wtflau.adb, a-tiflau.adb (Load_Real): Do not parse
	"." in the case of nnn.xxx when nnn terminates with an underscore.
	Parse the remaining "#" or ":" in the case of nnn#.xxx#

From-SVN: r125384
parent f2f4ef82
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2006, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2007, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -138,6 +138,7 @@ package body Ada.Text_IO.Float_Aux is ...@@ -138,6 +138,7 @@ package body Ada.Text_IO.Float_Aux is
if Loaded then if Loaded then
Load_Extended_Digits (File, Buf, Ptr); Load_Extended_Digits (File, Buf, Ptr);
Load (File, Buf, Ptr, '#', ':');
-- Case of nnn#xxx.[xxx]# or nnn#xxx# -- Case of nnn#xxx.[xxx]# or nnn#xxx#
...@@ -158,6 +159,13 @@ package body Ada.Text_IO.Float_Aux is ...@@ -158,6 +159,13 @@ package body Ada.Text_IO.Float_Aux is
-- Case of nnn.[nnn] or nnn -- Case of nnn.[nnn] or nnn
else else
-- Prevent the potential processing of '.' in cases where the
-- initial digits have a trailing underscore.
if Buf (Ptr) = '_' then
return;
end if;
Load (File, Buf, Ptr, '.', Loaded); Load (File, Buf, Ptr, '.', Loaded);
if Loaded then if Loaded then
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2006, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2007, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -138,6 +138,7 @@ package body Ada.Wide_Text_IO.Float_Aux is ...@@ -138,6 +138,7 @@ package body Ada.Wide_Text_IO.Float_Aux is
if Loaded then if Loaded then
Load_Extended_Digits (File, Buf, Ptr); Load_Extended_Digits (File, Buf, Ptr);
Load (File, Buf, Ptr, '#', ':');
-- Case of nnn#xxx.[xxx]# or nnn#xxx# -- Case of nnn#xxx.[xxx]# or nnn#xxx#
...@@ -158,6 +159,13 @@ package body Ada.Wide_Text_IO.Float_Aux is ...@@ -158,6 +159,13 @@ package body Ada.Wide_Text_IO.Float_Aux is
-- Case of nnn.[nnn] or nnn -- Case of nnn.[nnn] or nnn
else else
-- Prevent the potential processing of '.' in cases where the
-- initial digits have a trailing underscore.
if Buf (Ptr) = '_' then
return;
end if;
Load (File, Buf, Ptr, '.', Loaded); Load (File, Buf, Ptr, '.', Loaded);
if Loaded then if Loaded then
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2005, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2007, Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -138,6 +138,7 @@ package body Ada.Wide_Wide_Text_IO.Float_Aux is ...@@ -138,6 +138,7 @@ package body Ada.Wide_Wide_Text_IO.Float_Aux is
if Loaded then if Loaded then
Load_Extended_Digits (File, Buf, Ptr); Load_Extended_Digits (File, Buf, Ptr);
Load (File, Buf, Ptr, '#', ':');
-- Case of nnn#xxx.[xxx]# or nnn#xxx# -- Case of nnn#xxx.[xxx]# or nnn#xxx#
...@@ -158,6 +159,13 @@ package body Ada.Wide_Wide_Text_IO.Float_Aux is ...@@ -158,6 +159,13 @@ package body Ada.Wide_Wide_Text_IO.Float_Aux is
-- Case of nnn.[nnn] or nnn -- Case of nnn.[nnn] or nnn
else else
-- Prevent the potential processing of '.' in cases where the
-- initial digits have a trailing underscore.
if Buf (Ptr) = '_' then
return;
end if;
Load (File, Buf, Ptr, '.', Loaded); Load (File, Buf, Ptr, '.', Loaded);
if Loaded then if Loaded then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment