[fdo] Shared Mime Info

Preben Randhol randhol+freedesktop at pvv.org
Fri May 6 23:04:50 PDT 2005


Hello

First I don't know if this is the correct list, so please point me
further if it isn't.

I noticed that the shared-mime-info contained this entry for the Ada95
programming language:

  <mime-type type="text/x-adasrc">
    <comment>Ada source code</comment>
    <comment xml:lang="de">Ada-Quelltext</comment>
    <comment xml:lang="el">Πηγαίος κώδικας Ada</comment>
    <comment xml:lang="fi">Ada-lähdekoodi</comment>
    <comment xml:lang="no">Ada-kildekode</comment>
    <glob pattern="*.adb"/>
    <glob pattern="*.ads"/>
  </mime-type>

This is a bit ackward. It would be like saying:

<mime-type type="text/x-csrc">
   <comment>C source code</comment>
   <glob pattern="*.c"/>
   <glob pattern="*.h"/>
</mime-type>

as .ads are the spec files of Ada (to some extent like .h for C).

To summarise the extensions used by GNAT:

   .ads     Spec file (containing the declarations)

   .adb     Body file (containing the code)

   .ali     Ada Library info (which contains additional information used
                              to check that an Ada program is consistent.
                              This is made when you compile a program)

   .adt     Ada Tree         (A tree file stores a snapshot of the
                              compiler internal data structures in the
                              very end of a successful compilation.  It
                              contains all the syntactical and semantic
                              information about the unit being compiled
                              and all the units upon which it depends
                              semantically. Some tools need tree files
                              to obtain this information.)


   .ada     Contains both Spec and Body (used by other compilers too)

So it would be nice if the freedesktop mime file could be updated to the
following for Ada:

  <mime-type type="text/x-adasrc">
    <comment>Ada source code</comment>
    <comment xml:lang="de">Ada-Quelltext</comment>
    <comment xml:lang="el">Πηγαίος κώδικας Ada</comment>
    <comment xml:lang="fi">Ada-lähdekoodi</comment>
    <comment xml:lang="no">Ada-kildekode</comment>
    <glob pattern="*.adb"/>
    <glob pattern="*.ada"/>
  </mime-type>

  <mime-type type="text/x-adaspec">
    <comment>Ada source code spec</comment>
    <comment xml:lang="no">Ada-kildekodespesifikasjon</comment>
    <glob pattern="*.ads"/>
  </mime-type>

  <mime-type type="text/x-adalibinfo">
    <comment>Ada library information</comment>
    <comment xml:lang="no">Ada-bibliotektinformasjon</comment>
    <glob pattern="*.ali"/>
  </mime-type>

  <mime-type type="text/x-adatree">
    <comment>Ada tree</comment>
    <comment xml:lang="no">Ada-tre</comment>
    <glob pattern="*.adt"/>
  </mime-type>


Regards,

Preben Randhol


Reference:

<URL: http://gcc.gnu.org/onlinedocs/gcc-4.0.0/gnat_ugn_unw/File-Naming-Rules.html#File-Naming-Rules>

<URL: http://gcc.gnu.org/onlinedocs/gcc-4.0.0/gnat_ugn_unw/The-Ada-Library-Information-Files.html#The-Ada-Library-Information-Files>

<URL: http://lgl.epfl.ch/teaching/programming01_02/doc/gnat_ug.html#SEC142>


More information about the freedesktop mailing list