Commit 57f56c63 by Robert Dewar Committed by Arnaud Charlet

ali.adb: Correct casing of ASCII.NUL

2008-05-20  Robert Dewar  <dewar@adacore.com>

	* ali.adb: Correct casing of ASCII.NUL

	* styleg-c.adb (Check_Identifier): Handle case of names in ASCII
	properly.

From-SVN: r135615
parent 0e5b1d0b
...@@ -1838,7 +1838,7 @@ package body ALI is ...@@ -1838,7 +1838,7 @@ package body ALI is
end if; end if;
end loop; end loop;
Add_Char_To_Name_Buffer (nul); Add_Char_To_Name_Buffer (NUL);
Skip_Eol; Skip_Eol;
end if; end if;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2007, Free Software Foundation, Inc. -- -- Copyright (C) 1992-2008, 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- --
...@@ -175,8 +175,10 @@ package body Styleg.C is ...@@ -175,8 +175,10 @@ package body Styleg.C is
-- Case of definition in package Standard -- Case of definition in package Standard
elsif Sdef = Standard_Location then elsif Sdef = Standard_Location
or else
Sdef = Standard_ASCII_Location
then
-- Check case of identifiers in Standard -- Check case of identifiers in Standard
if Style_Check_Standard then if Style_Check_Standard then
...@@ -190,19 +192,14 @@ package body Styleg.C is ...@@ -190,19 +192,14 @@ package body Styleg.C is
-- Otherwise determine required casing of Standard entity -- Otherwise determine required casing of Standard entity
else else
-- ASCII entities are in all upper case -- ASCII is all upper case
if Entity (Ref) = Standard_ASCII then if Entity (Ref) = Standard_ASCII then
Cas := All_Upper_Case; Cas := All_Upper_Case;
-- Special names in ASCII are also all upper case -- Special names in ASCII are also all upper case
elsif Entity (Ref) in SE (S_LC_A) .. SE (S_LC_Z) elsif Sdef = Standard_ASCII_Location then
or else
Entity (Ref) in SE (S_NUL) .. SE (S_US)
or else
Entity (Ref) = SE (S_DEL)
then
Cas := All_Upper_Case; Cas := All_Upper_Case;
-- All other entities are in mixed case -- All other entities are in mixed case
......
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