25 #include "pips_config.h"
30 #include <sys/types.h>
109 " which was not found\n",
127 if(strcmp(name, upper_case_name)==0)
131 name, upper_case_name);
135 free(upper_case_name);
203 bool fortran_90_p =
false;
206 for ( i = 0; i < argc; i++ ) {
219 for (i = 0;
success && i < argc; i++)
247 (* pips_update_props_handler)();
249 user_log(
"Workspace %s created and opened.\n", name);
294 pips_assert(
"cannot lazy_open no module", name != NULL);
301 user_log (
"Module %s already active.\n", name);
325 user_log(
"Cannot open workspace %s.\n", name);
331 (* pips_update_props_handler)();
338 user_log(
"Workspace %s opened.\n", name);
415 mkdir( compiled_dir_name, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH );
417 char *gfc_command =
concatenate(
"gfortran -fsyntax-only",
418 " -fcray-pointer -ffree-form",
425 if( 0 != system( gfc_command ) ) {
void open_warning_file(const char *dir)
void close_log_file(void)
void user_log(const char *format,...)
void open_log_file(const string dir)
void close_warning_file(void)
void set_pips_current_computation(const char *rname, const char *oname)
message.c
void reset_pips_current_computation(void)
void free_language(language p)
void db_reset_current_module_name(void)
bool db_resource_p(const char *rname, const char *oname)
true if exists and in loaded or stored state.
string db_get_current_module_name(void)
Also used to check whether set...
bool db_set_current_module_name(const char *name)
bool activate_phases(void)
Use property ACTIVE_PHASES to active the phases required by the user.
void activate_language(language l)
Choose the right combination of activate and setproperty for a given language.
size_t gen_array_nitems(const gen_array_t a)
void gen_array_full_free(gen_array_t a)
gen_array_t gen_array_from_list(list ls)
void * gen_array_item(const gen_array_t a, size_t i)
bool bootstrap(string workspace)
bool open_module(const char *name)
tpips used to convert lower cases into upper cases for all module names, but this is no longer possib...
void default_update_props()
Warning! Do not modify this file that is automatically generated!
bool open_module_if_unique(void)
Open the module of a workspace if there is only one.
static void safe_pop_path(void)
In case an error has been detected, both create_workspace and close_workspace may attempt to clean up...
void compile_f90_module(string filename)
bool delete_workspace(const char *wname)
bool create_workspace(gen_array_t files)
FI: should be called "initialize_workspace()"; a previous call to db_create_workspace() is useful to ...
void(* pips_update_props_handler)()=default_update_props
default assignment of pips_update_props_handler is default_update_props.
static void pop_path(void)
bool close_workspace(bool is_quit)
gen_array_t get_stubs()
Get all stubs.
bool lazy_open_module(const char *name)
Do not open a module already opened :
bool check_delete_workspace(const char *wname, bool check)
static void push_path(void)
static bool some_saved_path
bool open_workspace(const char *name)
should be: success (cf wpips.h)
static string saved_pips_src_path
PIPS SRCPATH before opening the workspace, for restauration.
bool compilation_unit_p(const char *module_name)
The names of PIPS entities carry information about their nature.
const char * module_name(const char *s)
Return the module part of an entity name.
char * strescape(const char *source)
protect a string, for example for use in a system call list of non escaped characters in the macro ab...
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
#define NIL
The empty list (nil in Lisp)
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
gen_array_t db_get_module_list(void)
Get an array of all the modules (functions, procedures and compilation units) of a workspace.
bool db_module_exists_p(const char *name)
Return whether name is a "valid" module.
static int failure(Pproblem XX, Pproblem UU, Pproblem VV, struct rproblem *RR)
string db_get_directory_name_for_module(const char *name)
returns the allocated and mkdir'ed directory for module name
#define pips_user_warning
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
int safe_system_no_abort(string)
the command to be executed
string strupper(string, const char *)
string concatenate(const char *,...)
Return the concatenation of the given strings.
#define same_string_p(s1, s2)
bool make_close_workspace(bool is_quit)
FI->GO: could be in top-level, no?
string make_open_workspace(const char *name)
#define WORKSPACE_SRC_SPACE
bool workspace_exists_p(const char *)
string db_get_current_workspace_directory(void)
bool workspace_ok_p(const char *)
string db_get_current_workspace_name(void)
the function is used to check that there is some current workspace...
bool close_makefile(const char *)
makefile parse_makefile(void)
void delete_some_resources(void)
this is quite ugly, but I wanted to put the enumeration down to pipsdbm.
void pips_srcpath_set(string)
Set the PIPS source path.
bool dot_f95_file_p(string)
Test if a name ends with .f95.
void init_processed_include_cache(void)
bool process_user_file(string)
void close_processed_include_cache(void)
bool dot_f90_file_p(string)
Test if a name ends with .f90.
language workspace_language(gen_array_t)
Choose a language if all filenames in "files" have the same C or Fortran extensions.
void reset_static_entities()
void reset_label_counter()
void safe_reset_entity_to_size(void)
In case of error handling, PIPS may try to reset this table twice.
void reset_unique_variable_numbers(void)
void set_entity_to_size(void)
void reset_entity_to_size(void)
struct _newgen_struct_callees_ * callees
#define callees_callees(x)
#define language_undefined
The structure used to build lists in NewGen.
static string current_name