c++: add fixed test [PR94100]
[official-gcc.git] / gcc / m2 / mc-boot / GmcSearch.h
blob277f55858496f67a7040b0edb3e3c3b869210f1e
1 /* do not edit automatically generated by mc from mcSearch. */
2 /* mcSearch.def mcSearch provides a mechanism to search selected directories.
4 Copyright (C) 2015-2025 Free Software Foundation, Inc.
5 Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
7 This file is part of GNU Modula-2.
9 GNU Modula-2 is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3, or (at your option)
12 any later version.
14 GNU Modula-2 is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with GNU Modula-2; see the file COPYING3. If not see
21 <http://www.gnu.org/licenses/>. */
24 #if !defined (_mcSearch_H)
25 # define _mcSearch_H
27 #include "config.h"
28 #include "system.h"
29 # ifdef __cplusplus
30 extern "C" {
31 # endif
32 #include <stdbool.h>
33 # if !defined (PROC_D)
34 # define PROC_D
35 typedef void (*PROC_t) (void);
36 typedef struct { PROC_t proc; } PROC;
37 # endif
39 # include "GDynamicStrings.h"
41 # if defined (_mcSearch_C)
42 # define EXTERN
43 # else
44 # define EXTERN extern
45 # endif
49 initSearchPath - initialise the compiler search, path.
50 The string path may take the form:
52 Path ::= IndividualPath { ":" IndividualPath }
53 IndividualPath ::= "." | DirectoryPath
54 DirectoryPath ::= [ "/" ] Name { "/" Name }
55 Name ::= Letter { (Letter | Number) }
56 Letter ::= A..Z | a..z
57 Number ::= 0..9
60 EXTERN void mcSearch_initSearchPath (DynamicStrings_String path);
63 prependSearchPath - prepends a new path to the initial search path.
66 EXTERN void mcSearch_prependSearchPath (DynamicStrings_String path);
69 findSourceFile - attempts to locate the source file FileName.
70 If a file is found then TRUE is returned otherwise
71 FALSE is returned.
72 The parameter FullPath is set indicating the
73 absolute location of source FileName.
74 FullPath will be totally overwritten and should
75 not be initialized by InitString before this function
76 is called.
77 FindSourceFile sets FullPath to a new string if successful.
80 EXTERN bool mcSearch_findSourceFile (DynamicStrings_String FileName, DynamicStrings_String *fullPath);
83 findSourceDefFile - attempts to find the definition module for
84 a module, Stem. If successful it returns
85 the full path and returns TRUE. If unsuccessful
86 then FALSE is returned and FullPath is set to NIL.
89 EXTERN bool mcSearch_findSourceDefFile (DynamicStrings_String stem, DynamicStrings_String *fullPath);
92 findSourceModFile - attempts to find the implementation module for
93 a module, Stem. If successful it returns
94 the full path and returns TRUE. If unsuccessful
95 then FALSE is returned and FullPath is set to NIL.
98 EXTERN bool mcSearch_findSourceModFile (DynamicStrings_String stem, DynamicStrings_String *fullPath);
101 setDefExtension - sets the default extension for definition modules to, ext.
102 The string, ext, should be deallocated by the caller at
103 an appropriate time.
106 EXTERN void mcSearch_setDefExtension (DynamicStrings_String ext);
109 setModExtension - sets the default extension for implementation and program
110 modules to, ext. The string, ext, should be deallocated
111 by the caller at an appropriate time.
114 EXTERN void mcSearch_setModExtension (DynamicStrings_String ext);
115 # ifdef __cplusplus
117 # endif
119 # undef EXTERN
120 #endif