PIPS
pipsdbm-local.h
Go to the documentation of this file.
1 /*
2 
3  $Id: pipsdbm-local.h 23065 2016-03-02 09:05:50Z coelho $
4 
5  Copyright 1989-2016 MINES ParisTech
6 
7  This file is part of PIPS.
8 
9  PIPS is free software: you can redistribute it and/or modify it
10  under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  any later version.
13 
14  PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
15  WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  FITNESS FOR A PARTICULAR PURPOSE.
17 
18  See the GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with PIPS. If not, see <http://www.gnu.org/licenses/>.
22 
23 */
24 #include "linear.h"
25 #include "resources.h"
26 
27 #define PIPSDBM_DEBUG_LEVEL "PIPSDBM_DEBUG_LEVEL"
28 
29 #define PROGRAM_RESOURCE_OWNER ""
30 
31 #define WORKSPACE_TMP_SPACE "Tmp"
32 #define WORKSPACE_SRC_SPACE "Src"
33 #define WORKSPACE_PROGRAM_SPACE "Program"
34 #define WORKSPACE_METADATA_SPACE "Metadata"
35 /* Name of the file containing the names of the main procedures
36  *
37  * There may be more than one in Fortran. It is simpler in C, because
38  * the main procedure is always called "main" and we cannot have more
39  * than one without a name conflict.
40  */
41 #define MAIN_FILE_NAMES "PROGRAM.main"
42 
43 /* symbols exported by parser / lexer */
44 extern FILE *genread_in;
45 extern int genread_input(void);
46 
47 /* conform to old interface.
48  */
49 
50 /** Put a memory resource into the current workspace database
51 
52  @ingroup pipsdbm
53 
54  This function allows to update a memory resource already available.
55 
56  @param rname is a resource name, such as DBR_CODE for the code of a
57  module. The construction of these aliases are DBB_ + the uppercased
58  name of a resource defined in pipsmake-rc.tex. They are defined
59  automatically in include/resources.h
60 
61  @param oname is the resource owner name, typically a module name.
62 
63  @param res_val is an opaque pointer to the resource to be
64  stored. Methods defined in methods.h will know how to deal with.
65 */
66 #define DB_PUT_MEMORY_RESOURCE(res_name, own_name, res_val) \
67  db_put_or_update_memory_resource(res_name, own_name, (void*) res_val, true)
68 
69 /** Put a file resource into the current workspace database
70 
71  @ingroup pipsdbm
72 
73  This function allows to update a file resource already available.
74 
75  @param rname is a resource name, such as DBR_CODE for the code of a
76  module. The construction of these aliases are DBB_ + the uppercased
77  name of a resource defined in pipsmake-rc.tex. They are defined
78  automatically in include/resources.h
79 
80  @param oname is the resource owner name, typically a module name.
81 
82  @param res_val is an opaque pointer to the resource to be
83  stored. Methods defined in methods.h will know how to deal with.
84 */
85 #define DB_PUT_FILE_RESOURCE DB_PUT_MEMORY_RESOURCE
86 
87 /** Put a new file resource into the current workspace database
88 
89  @ingroup pipsdbm
90 
91  This function disallows to update a resource already available.
92 
93  @param rname is a resource name, such as DBR_CODE for the code of a
94  module. The construction of these aliases are DBB_ + the uppercased
95  name of a resource defined in pipsmake-rc.tex. They are defined
96  automatically in include/resources.h
97 
98  @param oname is the resource owner name, typically a module name.
99 
100  @param res_val is an opaque pointer to the resource to be
101  stored. Methods defined in methods.h will know how to deal with.
102 */
103 #define DB_PUT_NEW_FILE_RESOURCE(res_name, own_name, res_val) \
104  db_put_or_update_memory_resource(res_name, own_name, (void*) res_val, false)
105 
106 #define db_get_file_resource db_get_memory_resource
107 #define db_unput_a_resource(r,o) db_delete_resource(r,o)
108 #define build_pgmwd db_get_workspace_directory_name
109 
110 #define db_make_subdirectory(n) free(db_get_directory_name_for_module(n))
111 
112 #include "newgen.h" /* ??? statement_mapping */
FILE * genread_in
symbols exported by parser / lexer
int genread_input(void)