cselib.c (cselib_current_insn_in_libcall): New static variable.
[official-gcc.git] / gcc / ada / g-diopit.ads
blob0cfdb890e1f542e01868e2f04ccd1e4304315e46
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- G N A T . D I R E C T O R Y _ O P E R A T I O N S . I T E R A T I O N --
6 -- --
7 -- S p e c --
8 -- --
9 -- --
10 -- Copyright (C) 2001 Ada Core Technologies, Inc. --
11 -- --
12 -- GNAT is free software; you can redistribute it and/or modify it under --
13 -- terms of the GNU General Public License as published by the Free Soft- --
14 -- ware Foundation; either version 2, or (at your option) any later ver- --
15 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
16 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
17 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
18 -- for more details. You should have received a copy of the GNU General --
19 -- Public License distributed with GNAT; see file COPYING. If not, write --
20 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
21 -- MA 02111-1307, USA. --
22 -- --
23 -- As a special exception, if other files instantiate generics from this --
24 -- unit, or you link this unit with other files to produce an executable, --
25 -- this unit does not by itself cause the resulting executable to be --
26 -- covered by the GNU General Public License. This exception does not --
27 -- however invalidate any other reasons why the executable file might be --
28 -- covered by the GNU Public License. --
29 -- --
30 -- GNAT is maintained by Ada Core Technologies Inc (http://www.gnat.com). --
31 -- --
32 ------------------------------------------------------------------------------
34 -- Iterators among files
36 package GNAT.Directory_Operations.Iteration is
38 generic
39 with procedure Action
40 (Item : String;
41 Index : Positive;
42 Quit : in out Boolean);
43 procedure Find
44 (Root_Directory : Dir_Name_Str;
45 File_Pattern : String);
46 -- Recursively searches the directory structure rooted at Root_Directory.
47 -- This provides functionality similar to the UNIX 'find' command.
48 -- Action will be called for every item matching the regular expression
49 -- File_Pattern (see GNAT.Regexp). Item is the full pathname to the file
50 -- starting with Root_Directory that has been matched. Index is set to one
51 -- for the first call and is incremented by one at each call. The iterator
52 -- will pass in the value False on each call to Action. The iterator will
53 -- terminate after passing the last matched path to Action or after
54 -- returning from a call to Action which sets Quit to True.
55 -- Raises GNAT.Regexp.Error_In_Regexp if File_Pattern is ill formed.
57 generic
58 with procedure Action
59 (Item : String;
60 Index : Positive;
61 Quit : in out Boolean);
62 procedure Wildcard_Iterator (Path : Path_Name);
63 -- Calls Action for each path matching Path. Path can include wildcards '*'
64 -- and '?' and [...]. The rules are:
66 -- * can be replaced by any sequence of characters
67 -- ? can be replaced by a single character
68 -- [a-z] match one character in the range 'a' through 'z'
69 -- [abc] match either character 'a', 'b' or 'c'
71 -- Item is the filename that has been matched. Index is set to one for the
72 -- first call and is incremented by one at each call. The iterator's
73 -- termination can be controlled by setting Quit to True. It is by default
74 -- set to False.
76 -- For example, if we have the following directory structure:
77 -- /boo/
78 -- foo.ads
79 -- /sed/
80 -- foo.ads
81 -- file/
82 -- foo.ads
83 -- /sid/
84 -- foo.ads
85 -- file/
86 -- foo.ads
87 -- /life/
89 -- A call with expression "/s*/file/*" will call Action for the following
90 -- items:
91 -- /sed/file/foo.ads
92 -- /sid/file/foo.ads
94 end GNAT.Directory_Operations.Iteration;