diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-29 16:22:15 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-29 16:22:15 +0000 |
commit | 566caa91e23553c7e9f47977a357a14ea755589d (patch) | |
tree | c0f41483bcb7e8275f8004a78d41f51d90c6bef3 /gcc/ada/xtreeprs.adb | |
parent | b461b108af37b194ed428f021ec4bceef797c722 (diff) | |
download | gcc-566caa91e23553c7e9f47977a357a14ea755589d.tar.gz |
2005-03-29 Robert Dewar <dewar@adacore.com>
* xtreeprs.adb, xnmake.adb: Use Stream_IO instead of Text_IO to
guarantee Unix style line terminators for the output files, even when
running on windows.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97187 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/xtreeprs.adb')
-rw-r--r-- | gcc/ada/xtreeprs.adb | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/gcc/ada/xtreeprs.adb b/gcc/ada/xtreeprs.adb index 2e026d10163..55bfa96f681 100644 --- a/gcc/ada/xtreeprs.adb +++ b/gcc/ada/xtreeprs.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2004 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- -- -- -- 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- -- @@ -45,6 +45,7 @@ with Ada.Command_Line; use Ada.Command_Line; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Strings.Unbounded.Text_IO; use Ada.Strings.Unbounded.Text_IO; with Ada.Text_IO; use Ada.Text_IO; +with Ada.Streams.Stream_IO; use Ada.Streams.Stream_IO; with GNAT.Spitbol; use GNAT.Spitbol; with GNAT.Spitbol.Patterns; use GNAT.Spitbol.Patterns; @@ -75,13 +76,15 @@ procedure XTreeprs is Synonym : VString := Nul; Term : VString := Nul; - OutS : File_Type; + subtype Sfile is Ada.Streams.Stream_IO.File_Type; + + OutS : Sfile; -- Output file - InS : File_Type; + InS : Ada.Text_IO.File_Type; -- Read sinfo.ads - InT : File_Type; + InT : Ada.Text_IO.File_Type; -- Read treeprs.adt Special : TB.Table (20); @@ -137,6 +140,23 @@ procedure XTreeprs is M : Match_Result; + procedure Put_Line (F : Sfile; S : String); + procedure Put_Line (F : Sfile; S : VString); + -- Local version of Put_Line ensures Unix style line endings + + procedure Put_Line (F : Sfile; S : String) is + begin + String'Write (Stream (F), S); + Character'Write (Stream (F), ASCII.LF); + end Put_Line; + + procedure Put_Line (F : Sfile; S : VString) is + begin + Put_Line (F, To_String (S)); + end Put_Line; + +-- Start of processing for XTreeprs + begin Anchored_Mode := True; |