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