| 1 |
/* do not edit automatically generated by mc from mcSearch. */ |
| 2 |
/* mcSearch.def mcSearch provides a mechanism to search selected directories. |
| 3 |
|
| 4 |
Copyright (C) 2015-2025 Free Software Foundation, Inc. |
| 5 |
Contributed by Gaius Mulley <[email protected]>. |
| 6 |
|
| 7 |
This file is part of GNU Modula-2. |
| 8 |
|
| 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. |
| 13 |
|
| 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. |
| 18 |
|
| 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/>. */ |
| 22 |
|
| 23 |
|
| 24 |
#if !defined (_mcSearch_H) |
| 25 |
# define _mcSearch_H |
| 26 |
|
| 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 |
| 38 |
|
| 39 |
# include "GDynamicStrings.h" |
| 40 |
|
| 41 |
# if defined (_mcSearch_C) |
| 42 |
# define EXTERN |
| 43 |
# else |
| 44 |
# define EXTERN extern |
| 45 |
# endif |
| 46 |
|
| 47 |
|
| 48 |
/* |
| 49 |
initSearchPath - initialise the compiler search, path. |
| 50 |
The string path may take the form: |
| 51 |
|
| 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 |
| 58 |
*/ |
| 59 |
|
| 60 |
EXTERN void mcSearch_initSearchPath (DynamicStrings_String path); |
| 61 |
|
| 62 |
/* |
| 63 |
prependSearchPath - prepends a new path to the initial search path. |
| 64 |
*/ |
| 65 |
|
| 66 |
EXTERN void mcSearch_prependSearchPath (DynamicStrings_String path); |
| 67 |
|
| 68 |
/* |
| 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. |
| 78 |
*/ |
| 79 |
|
| 80 |
EXTERN bool mcSearch_findSourceFile (DynamicStrings_String FileName, DynamicStrings_String *fullPath); |
| 81 |
|
| 82 |
/* |
| 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. |
| 87 |
*/ |
| 88 |
|
| 89 |
EXTERN bool mcSearch_findSourceDefFile (DynamicStrings_String stem, DynamicStrings_String *fullPath); |
| 90 |
|
| 91 |
/* |
| 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. |
| 96 |
*/ |
| 97 |
|
| 98 |
EXTERN bool mcSearch_findSourceModFile (DynamicStrings_String stem, DynamicStrings_String *fullPath); |
| 99 |
|
| 100 |
/* |
| 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. |
| 104 |
*/ |
| 105 |
|
| 106 |
EXTERN void mcSearch_setDefExtension (DynamicStrings_String ext); |
| 107 |
|
| 108 |
/* |
| 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. |
| 112 |
*/ |
| 113 |
|
| 114 |
EXTERN void mcSearch_setModExtension (DynamicStrings_String ext); |
| 115 |
# ifdef __cplusplus |
| 116 |
} |
| 117 |
# endif |
| 118 |
|
| 119 |
# undef EXTERN |
| 120 |
#endif |