View | Details | Raw Unified | Return to bug 20822
Collapse All | Expand All

(-)xgnatugn.adb~ (-5 / +27 lines)
Lines 98-103 Link Here
98
with Ada.Strings.Unbounded;      use Ada.Strings.Unbounded;
98
with Ada.Strings.Unbounded;      use Ada.Strings.Unbounded;
99
with Ada.Strings.Maps;           use Ada.Strings.Maps;
99
with Ada.Strings.Maps;           use Ada.Strings.Maps;
100
with Ada.Strings.Maps.Constants; use Ada.Strings.Maps.Constants;
100
with Ada.Strings.Maps.Constants; use Ada.Strings.Maps.Constants;
101
with Ada.Streams.Stream_IO;      use Ada.Streams.Stream_IO;
101
with Ada.Text_IO;                use Ada.Text_IO;
102
with Ada.Text_IO;                use Ada.Text_IO;
102
103
103
with GNAT.Spitbol;               use GNAT.Spitbol;
104
with GNAT.Spitbol;               use GNAT.Spitbol;
Lines 109-120 Link Here
109
   --  Print usage information. Invoked if an invalid command line is
110
   --  Print usage information. Invoked if an invalid command line is
110
   --  encountered.
111
   --  encountered.
111
112
112
   Output_File : File_Type;
113
   subtype Sfile is Ada.Streams.Stream_IO.File_Type;
114
115
   Output_File : Sfile;
113
   --  The preprocessed output is written to this file
116
   --  The preprocessed output is written to this file
114
117
115
   type Input_File is record
118
   type Input_File is record
116
      Name : VString;
119
      Name : VString;
117
      Data : File_Type;
120
      Data : Ada.Text_IO.File_Type;
118
      Line : Natural := 0;
121
      Line : Natural := 0;
119
   end record;
122
   end record;
120
   --  Records information on an input file. Name and Line are used
123
   --  Records information on an input file. Name and Line are used
Lines 124-129 Link Here
124
   --  Returns a line from Input and performs the necessary
127
   --  Returns a line from Input and performs the necessary
125
   --  line-oriented checks (length, character set, trailing spaces).
128
   --  line-oriented checks (length, character set, trailing spaces).
126
129
130
   procedure Put_Line (F : Sfile; S : String);
131
   procedure Put_Line (F : Sfile; S : VString);
132
   --  Local version of Put_Line ensures Unix style line endings
133
127
   Number_Of_Warnings : Natural := 0;
134
   Number_Of_Warnings : Natural := 0;
128
   Number_Of_Errors   : Natural := 0;
135
   Number_Of_Errors   : Natural := 0;
129
   Warnings_Enabled   : Boolean;
136
   Warnings_Enabled   : Boolean;
Lines 353-358 Link Here
353
      end;
360
      end;
354
   end Get_Line;
361
   end Get_Line;
355
362
363
   --------------
364
   -- Put_Line --
365
   --------------
366
367
   procedure Put_Line (F : Sfile; S : String) is
368
   begin
369
      String'Write (Stream (F), S);
370
      Character'Write (Stream (F), ASCII.LF);
371
   end Put_Line;
372
373
   procedure Put_Line (F : Sfile; S : VString) is
374
   begin
375
      Put_Line (F, To_String (S));
376
   end Put_Line;
377
356
   -----------
378
   -----------
357
   -- Error --
379
   -- Error --
358
   -----------
380
   -----------
Lines 1312-1318 Link Here
1312
         Open (Source_File.Data, In_File, Argument (2));
1334
         Open (Source_File.Data, In_File, Argument (2));
1313
1335
1314
      exception
1336
      exception
1315
         when Name_Error =>
1337
         when Ada.Text_IO.Name_Error =>
1316
            Valid_Command_Line := False;
1338
            Valid_Command_Line := False;
1317
      end;
1339
      end;
1318
   end if;
1340
   end if;
Lines 1325-1331 Link Here
1325
         Open (Dictionary_File.Data, In_File, Argument (3));
1347
         Open (Dictionary_File.Data, In_File, Argument (3));
1326
1348
1327
      exception
1349
      exception
1328
         when Name_Error =>
1350
         when Ada.Text_IO.Name_Error =>
1329
            Valid_Command_Line := False;
1351
            Valid_Command_Line := False;
1330
      end;
1352
      end;
1331
   end if;
1353
   end if;
Lines 1350-1356 Link Here
1350
         Create (Output_File, Out_File, S (Output_File_Name));
1372
         Create (Output_File, Out_File, S (Output_File_Name));
1351
1373
1352
      exception
1374
      exception
1353
         when Name_Error | Use_Error =>
1375
         when Ada.Text_IO.Name_Error | Ada.Text_IO.Use_Error =>
1354
            Valid_Command_Line := False;
1376
            Valid_Command_Line := False;
1355
      end;
1377
      end;
1356
   end if;
1378
   end if;

Return to bug 20822