2007-06-06 12:35:54 +02:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
-- --
|
|
|
|
-- GNAT RUN-TIME COMPONENTS --
|
|
|
|
-- --
|
|
|
|
-- A D A . C O M M A N D _ L I N E . R E S P O N S E _ F I L E --
|
|
|
|
-- --
|
|
|
|
-- S p e c --
|
|
|
|
-- --
|
lib.ads, [...]: Implement pragma Compiler_Unit_Warning...
2014-02-25 Robert Dewar <dewar@adacore.com>
* lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
Compiler_Unit_Warning, change Compiler_Unit everywhere to
Compiler_Unit_Warning.
2014-02-25 Sergey Rybin <rybin@adacore.com frybin>
* sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
in ASIS mode aggregates that are used as aspect definitions.
From-SVN: r208137
2014-02-25 16:15:44 +01:00
|
|
|
-- Copyright (C) 2007-2013, Free Software Foundation, Inc. --
|
2007-06-06 12:35:54 +02:00
|
|
|
-- --
|
|
|
|
-- 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- --
|
2009-04-09 17:00:19 +02:00
|
|
|
-- ware Foundation; either version 3, or (at your option) any later ver- --
|
2007-06-06 12:35:54 +02:00
|
|
|
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
|
|
|
|
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
|
2009-04-09 17:00:19 +02:00
|
|
|
-- or FITNESS FOR A PARTICULAR PURPOSE. --
|
|
|
|
-- --
|
|
|
|
-- As a special exception under Section 7 of GPL version 3, you are granted --
|
|
|
|
-- additional permissions described in the GCC Runtime Library Exception, --
|
|
|
|
-- version 3.1, as published by the Free Software Foundation. --
|
|
|
|
-- --
|
|
|
|
-- You should have received a copy of the GNU General Public License and --
|
|
|
|
-- a copy of the GCC Runtime Library Exception along with this program; --
|
|
|
|
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
|
|
|
|
-- <http://www.gnu.org/licenses/>. --
|
2007-06-06 12:35:54 +02:00
|
|
|
-- --
|
|
|
|
-- GNAT was originally developed by the GNAT team at New York University. --
|
|
|
|
-- Extensive contributions were provided by Ada Core Technologies Inc. --
|
|
|
|
-- --
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
-- This package is intended to be used in conjunction with its parent unit,
|
|
|
|
-- Ada.Command_Line. It provides facilities for getting command line arguments
|
|
|
|
-- from a text file, called a "response file".
|
|
|
|
--
|
|
|
|
-- Using a response file allow passing a set of arguments to an executable
|
|
|
|
-- longer than the maximum allowed by the system on the command line.
|
|
|
|
|
lib.ads, [...]: Implement pragma Compiler_Unit_Warning...
2014-02-25 Robert Dewar <dewar@adacore.com>
* lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
Compiler_Unit_Warning, change Compiler_Unit everywhere to
Compiler_Unit_Warning.
2014-02-25 Sergey Rybin <rybin@adacore.com frybin>
* sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
in ASIS mode aggregates that are used as aspect definitions.
From-SVN: r208137
2014-02-25 16:15:44 +01:00
|
|
|
pragma Compiler_Unit_Warning;
|
[multiple changes]
2009-11-30 Arnaud Charlet <charlet@adacore.com>
* s-taprop-posix.adb: Fix casing.
* s-osinte-tru64.adb: Complete previous check-in.
2009-11-30 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Document pragma Compiler_Unit
* s-bitops.adb, s-restri.adb, g-htable.adb, s-restri.ads,
a-comlin.ads, a-strhas.ads, s-strhas.adb, s-parame.adb,
s-parame.ads, a-clrefi.adb, a-clrefi.ads, a-ioexce.ads: Supply missing
Compiler_Unit pragmas.
* freeze.adb (Freeze_Entity): Improve message for 8-bit boolean passed
to C.
From-SVN: r154784
2009-11-30 12:08:56 +01:00
|
|
|
|
2007-06-06 12:35:54 +02:00
|
|
|
with System.Strings;
|
|
|
|
|
|
|
|
package Ada.Command_Line.Response_File is
|
|
|
|
|
|
|
|
subtype String_Access is System.Strings.String_Access;
|
|
|
|
-- type String_Access is access all String;
|
|
|
|
|
|
|
|
procedure Free (S : in out String_Access) renames System.Strings.Free;
|
|
|
|
-- To deallocate a String
|
|
|
|
|
|
|
|
subtype Argument_List is System.Strings.String_List;
|
|
|
|
-- type String_List is array (Positive range <>) of String_Access;
|
|
|
|
|
|
|
|
Max_Line_Length : constant := 4096;
|
|
|
|
-- The maximum length of lines in a response file
|
|
|
|
|
|
|
|
File_Does_Not_Exist : exception;
|
|
|
|
-- Raise by Arguments_From when a response file cannot be found
|
|
|
|
|
|
|
|
Line_Too_Long : exception;
|
|
|
|
-- Raise by Arguments_From when a line in the response file is longer than
|
|
|
|
-- Max_Line_Length.
|
|
|
|
|
|
|
|
No_Closing_Quote : exception;
|
|
|
|
-- Raise by Arguments_From when a quoted string does not end before the
|
|
|
|
-- end of the line.
|
|
|
|
|
|
|
|
Circularity_Detected : exception;
|
|
|
|
-- Raise by Arguments_From when Recursive is True and the same response
|
|
|
|
-- file is reading itself, either directly or indirectly.
|
|
|
|
|
|
|
|
function Arguments_From
|
|
|
|
(Response_File_Name : String;
|
|
|
|
Recursive : Boolean := False;
|
|
|
|
Ignore_Non_Existing_Files : Boolean := False)
|
|
|
|
return Argument_List;
|
|
|
|
-- Read response file with name Response_File_Name and return the argument
|
|
|
|
-- it contains as an Argument_List. It is the responsibility of the caller
|
|
|
|
-- to deallocate the strings in the Argument_List if desired. When
|
|
|
|
-- Recursive is True, any argument of the form @file_name indicates the
|
|
|
|
-- name of another response file and is replaced by the arguments in this
|
|
|
|
-- response file.
|
|
|
|
--
|
|
|
|
-- Each non empty line of the response file contains one or several
|
9drpc.adb, [...]: Fix comment typos.
2008-03-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* 9drpc.adb, a-caldel-vms.adb, a-caldel.adb,
a-calend-vms.adb, a-calend.adb, a-calend.ads,
a-calfor.adb, a-chahan.ads, a-chtgke.adb,
a-cihama.ads, a-ciorse.adb, a-clrefi.ads,
a-cohama.ads, a-comlin.ads, a-coorse.adb,
a-crbtgk.adb, a-direct.adb, a-except-2005.adb,
a-except-2005.ads, a-except.adb, a-except.ads,
a-exexda.adb, a-exexpr-gcc.adb, a-exexpr.adb,
a-exextr.adb, a-filico.ads, a-finali.ads,
a-intnam-aix.ads, a-intnam-solaris.ads, a-ngcefu.adb,
a-ngelfu.adb, a-numaux-darwin.adb, a-numeri.ads,
a-sequio.ads, a-strbou.ads, a-strfix.adb,
checks.adb, exp_ch3.adb, exp_ch4.adb,
exp_ch4.ads, exp_ch5.adb, exp_ch6.adb,
exp_ch6.ads, exp_ch7.adb, exp_ch7.ads,
exp_ch9.adb, exp_ch9.ads, exp_dbug.adb,
exp_dbug.ads, exp_disp.adb, exp_dist.adb,
exp_dist.ads, exp_fixd.adb, exp_fixd.ads: Fix comment typos.
From-SVN: r133483
2008-03-24 18:48:07 +01:00
|
|
|
-- arguments separated by white space. Empty lines or lines containing only
|
2007-06-06 12:35:54 +02:00
|
|
|
-- white space are ignored. Arguments containing white space or a double
|
|
|
|
-- quote ('"')must be quoted. A double quote inside a quote string is
|
|
|
|
-- indicated by two consecutive double quotes. Example: "-Idir with quote
|
|
|
|
-- "" and spaces" Non white space characters immediately before or after a
|
|
|
|
-- quoted string are part of the same argument. Example -Idir" with "spaces
|
|
|
|
--
|
|
|
|
-- When a response file cannot be found, exception File_Does_Not_Exist is
|
|
|
|
-- raised if Ignore_Non_Existing_Files is False, otherwise the response
|
|
|
|
-- file is ignored. Exception Line_Too_Long is raised when a line of a
|
|
|
|
-- response file is longer than Max_Line_Length. Exception No_Closing_Quote
|
|
|
|
-- is raised when a quoted argument is not closed before the end of the
|
|
|
|
-- line. Exception Circularity_Detected is raised when a Recursive is True
|
|
|
|
-- and a response file is reading itself, either directly or indirectly.
|
|
|
|
|
|
|
|
end Ada.Command_Line.Response_File;
|