diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-16 14:17:56 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-16 14:17:56 +0200 |
commit | 4e0079cc3ce34e5d73d82ad99c96b43b7f5184e7 (patch) | |
tree | 8a23d332bae4e014e749fa8c79b5f8910a336c66 /gcc/ada/prep.adb | |
parent | 9093359a7b5a48d0d93cd9f4f7620647c8d09d40 (diff) | |
download | gcc-4e0079cc3ce34e5d73d82ad99c96b43b7f5184e7.zip gcc-4e0079cc3ce34e5d73d82ad99c96b43b7f5184e7.tar.gz gcc-4e0079cc3ce34e5d73d82ad99c96b43b7f5184e7.tar.bz2 |
[multiple changes]
2009-04-16 Thomas Quinot <quinot@adacore.com>
* snames.ads-tmpl (Name_Defined): New predefined name for use by the
integrated preprocessor.
* prep.ads, prep.adb (Setup_Hooks): New subprogram.
(Initialize): Split into two subprograms, Initialize (to be called
prior to compiler command line processing) and Setup_Hooks (to be called
later on when the first source file is loaded).
* gprep.adb: Change call to Prep.Initialize to call to Prep.Setup_Hooks.
Add call to Prep.Initialize.
* sinput-l.adb, prepcomp.adb: Change call to Prep.Initialize to call
to Prep.Setup_Hooks.
2009-04-16 Pascal Obry <obry@adacore.com>
* adaint.h, adaint.c (__gnat_chdir): New routine.
Simple wrapper routines used to convert to proper encoding on
Windows.
* s-crtl.ads: Use __gnat_chdir instead of direct call to the C library.
* a-direct.adb, g-dirope.adb: Use chdir from System.CRTL.
From-SVN: r146174
Diffstat (limited to 'gcc/ada/prep.adb')
-rw-r--r-- | gcc/ada/prep.adb | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/gcc/ada/prep.adb b/gcc/ada/prep.adb index 8106699..52328b2 100644 --- a/gcc/ada/prep.adb +++ b/gcc/ada/prep.adb @@ -119,9 +119,6 @@ package body Prep is String_False : String_Id; -- "false", as a string_id - Name_Defined : Name_Id; - -- defined, as a name_id - --------------- -- Behaviour -- --------------- @@ -691,13 +688,7 @@ package body Prep is -- Initialize -- ---------------- - procedure Initialize - (Error_Msg : Error_Msg_Proc; - Scan : Scan_Proc; - Set_Ignore_Errors : Set_Ignore_Errors_Proc; - Put_Char : Put_Char_Proc; - New_EOL : New_EOL_Proc) - is + procedure Initialize is begin if not Already_Initialized then Start_String; @@ -707,22 +698,12 @@ package body Prep is Start_String; Empty_String := End_String; - Name_Len := 7; - Name_Buffer (1 .. Name_Len) := "defined"; - Name_Defined := Name_Find; - Start_String; Store_String_Chars ("False"); String_False := End_String; Already_Initialized := True; end if; - - Prep.Error_Msg := Error_Msg; - Prep.Scan := Scan; - Prep.Set_Ignore_Errors := Set_Ignore_Errors; - Prep.Put_Char := Put_Char; - Prep.New_EOL := New_EOL; end Initialize; ------------------ @@ -1470,4 +1451,25 @@ package body Prep is Source_Modified := No_Error_Found and Modified; end Preprocess; + ----------------- + -- Setup_Hooks -- + ----------------- + + procedure Setup_Hooks + (Error_Msg : Error_Msg_Proc; + Scan : Scan_Proc; + Set_Ignore_Errors : Set_Ignore_Errors_Proc; + Put_Char : Put_Char_Proc; + New_EOL : New_EOL_Proc) + is + begin + pragma Assert (Already_Initialized); + + Prep.Error_Msg := Error_Msg; + Prep.Scan := Scan; + Prep.Set_Ignore_Errors := Set_Ignore_Errors; + Prep.Put_Char := Put_Char; + Prep.New_EOL := New_EOL; + end Setup_Hooks; + end Prep; |