25 #include "pips_config.h"
39 #include "resources.h"
64 "It does not exist a file \"%p\"\n for user_file \"%s\"\n"
65 " and for preprocessed_user_file \"%s\".\n"
73 if((tmp=fopen(s,
"r"))!=NULL) {
75 " and for preprocessed_user_file \"%s\".\n",
82 fprintf(tmp,
"!!\n!! file for %s\n!!\n", name);
85 fprintf(tmp,
"/*\n * file for %s\n */\n", name);
95 "It does exist a file \"%s\"\n for user_file \"%s\"\n"
96 " and for preprocessed_user_file \"%s\".\n"
111 string summary_full_name;
127 concatenate(
"i=`ls ", src_dir,
" | wc -l`; export i; exit $i ",
136 fprintf(summary,
"! module / file\n");
150 pips_debug(1,
"Module: \"%s\", user_file: \"%s\", new_user_file: \"%s\","
gen_array_t db_get_module_list_initial_order(void)
size_t gen_array_nitems(const gen_array_t a)
void gen_array_full_free(gen_array_t a)
void * gen_array_item(const gen_array_t a, size_t i)
FILE * safe_fopen(const char *filename, const char *what)
int safe_fclose(FILE *stream, const char *filename)
char * pips_basename(char *fullpath, char *suffix)
void safe_cat(FILE *out, FILE *in)
static FILE * user_file
These functions implements the writing of objects.
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
#define DB_PUT_FILE_RESOURCE
Put a file resource into the current workspace database.
hash_table hash_table_make(hash_key_type key_type, size_t size)
void * hash_get(const hash_table htp, const void *key)
this function retrieves in the hash table pointed to by htp the couple whose key is equal to key.
void hash_put(hash_table htp, const void *key, const void *val)
This functions stores a couple (key,val) in the hash table pointed to by htp.
void hash_table_free(hash_table htp)
this function deletes a hash table that is no longer useful.
static int failure(Pproblem XX, Pproblem UU, Pproblem VV, struct rproblem *RR)
string db_build_file_resource_name(const char *rname, const char *oname, const char *suffix)
returns an allocated file name for a file resource.
string db_get_directory_name_for_module(const char *name)
returns the allocated and mkdir'ed directory for module name
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_user_warning
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define pips_internal_error
int safe_system_no_abort_no_warning(string)
the command to be executed
int safe_system_no_abort(string)
the command to be executed
string concatenate(const char *,...)
Return the concatenation of the given strings.
#define HASH_MAP(k, v, code, ht)
#define HASH_UNDEFINED_VALUE
value returned by hash_get() when the key is not found; could also be called HASH_KEY_NOT_FOUND,...
#define hash_table_undefined
Value of an undefined hash_table.
#define WORKSPACE_SRC_SPACE
#define PROGRAM_RESOURCE_OWNER
string db_get_current_workspace_directory(void)
bool dot_c_file_p(string)
Test if a name ends with .c.
bool dot_f95_file_p(string)
Test if a name ends with .f95.
string preprocessed_to_user_file(string)
Allocate a new string containing the user file name, before preprocessing.
bool dot_f90_file_p(string)
Test if a name ends with .f90.
bool dot_f_file_p(string)
Test if a name ends with .f.
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
static bool unsplit_internal(const string name, const string dbr)
bool unsplit(const string name)
unsplit > PROGRAM.user_file < ALL.user_file < ALL.printed_file
static string get_new_user_file(string dir_name, string preprocessed_user_file)
returns the new user file where to store user_file
bool unsplit_parsed(const string name)
static hash_table user_files
initial user file -> generated user file