~ubuntu-branches/ubuntu/trusty/gnat-gps/trusty

« back to all changes in this revision

Viewing changes to .pc/bug-653470.patch/language/src/language_utils.adb

  • Committer: Package Import Robot
  • Author(s): Ludovic Brenta
  • Date: 2012-04-09 15:32:28 UTC
  • Revision ID: package-import@ubuntu.com-20120409153228-hug83kmnmawfsmf2
Tags: 5.0-8
* debian/patches/bug-653470.patch: remove.
* debian/rules (config.ads): set the Default_Charset variable.
  Compile all C source files with the same compiler as the Ada source
  files, i.e. gnatgcc instead of $(CC).
* debian/patches/bug-666958.patch: new.  Closes: #666958.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
-----------------------------------------------------------------------
2
 
-----------------------------------------------------------------------
3
 
 
4
 
with GNAT.Strings;   use GNAT.Strings;
5
 
with Traces;         use Traces;
6
 
 
7
 
with Glib.Convert;
8
 
 
9
 
package body Language_Utils is
10
 
 
11
 
   ---------------------------
12
 
   -- Parse_File_Constructs --
13
 
   ---------------------------
14
 
 
15
 
   procedure Parse_File_Constructs
16
 
     (Lang      : access Language_Root'Class;
17
 
      File_Name : GNATCOLL.VFS.Virtual_File;
18
 
      Result    : out Construct_List)
19
 
   is
20
 
      Buffer : GNAT.Strings.String_Access;
21
 
   begin
22
 
      Buffer := GNATCOLL.VFS.Read_File (File_Name);
23
 
 
24
 
      if Buffer /= null then
25
 
         --  ??? The call to Locale_To_UTF8 is not optimal
26
 
         Parse_Constructs
27
 
           (Lang, Glib.Convert.Locale_To_UTF8 (Buffer.all), Result);
28
 
         Free (Buffer);
29
 
      end if;
30
 
 
31
 
   exception
32
 
      when E : others =>
33
 
         Trace (Exception_Handle, E);
34
 
         Free (Buffer);
35
 
   end Parse_File_Constructs;
36
 
 
37
 
end Language_Utils;