]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/m2/mc/mcSearch.def
Update copyright years.
[thirdparty/gcc.git] / gcc / m2 / mc / mcSearch.def
CommitLineData
1eee94d3
GM
1(* mcSearch.def mcSearch provides a mechanism to search selected directories.
2
a945c346 3Copyright (C) 2015-2024 Free Software Foundation, Inc.
1eee94d3
GM
4Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
5
6This file is part of GNU Modula-2.
7
8GNU Modula-2 is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 3, or (at your option)
11any later version.
12
13GNU Modula-2 is distributed in the hope that it will be useful, but
14WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with GNU Modula-2; see the file COPYING3. If not see
20<http://www.gnu.org/licenses/>. *)
21
22DEFINITION MODULE mcSearch ;
23
24
25(* mcSearch provides a mechanism to search selected directories
26 in an attempt to locate and open a given source file. *)
27
28FROM DynamicStrings IMPORT String ;
29
30
31(*
32 initSearchPath - initialise the compiler search, path.
33 The string path may take the form:
34
35 Path ::= IndividualPath { ":" IndividualPath }
36 IndividualPath ::= "." | DirectoryPath
37 DirectoryPath ::= [ "/" ] Name { "/" Name }
38 Name ::= Letter { (Letter | Number) }
39 Letter ::= A..Z | a..z
40 Number ::= 0..9
41*)
42
43PROCEDURE initSearchPath (path: String) ;
44
45
46(*
47 prependSearchPath - prepends a new path to the initial search path.
48*)
49
50PROCEDURE prependSearchPath (path: String) ;
51
52
53(*
54 findSourceFile - attempts to locate the source file FileName.
55 If a file is found then TRUE is returned otherwise
56 FALSE is returned.
57 The parameter FullPath is set indicating the
58 absolute location of source FileName.
59 FullPath will be totally overwritten and should
60 not be initialized by InitString before this function
61 is called.
62 FindSourceFile sets FullPath to a new string if successful.
63*)
64
65PROCEDURE findSourceFile (FileName: String;
66 VAR fullPath: String) : BOOLEAN ;
67
68
69(*
70 findSourceDefFile - attempts to find the definition module for
71 a module, Stem. If successful it returns
72 the full path and returns TRUE. If unsuccessful
73 then FALSE is returned and FullPath is set to NIL.
74*)
75
76PROCEDURE findSourceDefFile (stem: String; VAR fullPath: String) : BOOLEAN ;
77
78
79(*
80 findSourceModFile - attempts to find the implementation module for
81 a module, Stem. If successful it returns
82 the full path and returns TRUE. If unsuccessful
83 then FALSE is returned and FullPath is set to NIL.
84*)
85
86PROCEDURE findSourceModFile (stem: String; VAR fullPath: String) : BOOLEAN ;
87
88
89(*
90 setDefExtension - sets the default extension for definition modules to, ext.
91 The string, ext, should be deallocated by the caller at
92 an appropriate time.
93*)
94
95PROCEDURE setDefExtension (ext: String) ;
96
97
98(*
99 setModExtension - sets the default extension for implementation and program
100 modules to, ext. The string, ext, should be deallocated
101 by the caller at an appropriate time.
102*)
103
104PROCEDURE setModExtension (ext: String) ;
105
106
107END mcSearch.