27 #include "pips_config.h"
89 if(s && s[n] !=
'\0') {
93 }
while(s[n] !=
'\0');
102 s[n - 1] = toupper(s[n - 1]);
119 int strcmp_(__const
char *__s1, __const
char *__s2) {
122 int ret = strcmp(a, b);
131 int strncmp_(__const
char *__s1, __const
char *__s2,
size_t __n) {
134 int ret = strncmp(a, b, __n);
143 int fcopy(
const char* old,
const char*
new) {
146 FILE * o = fopen(old,
"r");
148 FILE * n = fopen(
new,
"w");
174 bool has_dot =
false;
175 char *end_sci = NULL;
216 if(strcmp(end_sci,
"e+00") == 0) {
218 }
else if(s != end_sci - 1) {
219 strcpy(s + 1, end_sci);
242 static int initialized = FALSE;
282 int len = strlen(use);
284 gfc_char_t *p = gfc_current_locus.nextc;
286 while(!(
char)*p ==
'\0')
288 char use_stmt[len + (p - gfc_current_locus.nextc) + 2];
290 strcpy(use_stmt, use);
291 p = gfc_current_locus.nextc;
317 list use_entities = NULL;
320 list use_stmts = NULL;
324 FOREACH(
string, a_use, use_stmts) {
325 int a_len = strlen(a_use);
326 current_len += a_len;
330 use = (
string)realloc((
void*)use, current_len *
sizeof(char));
332 strcpy(&(use[current_len - a_len - 1]), a_use);
void set_pips_meta_informations(const char *revs, const char *date, const char *comp)
value make_value_unknown(void)
storage make_storage_rom(void)
type make_type_unknown(void)
#define c_parser_private_spec
#define PVECTEUR_NEWGEN_EXTERNAL
#define ret(why, what)
true if not a remapping for old.
FILE * safe_fopen(const char *filename, const char *what)
int safe_fclose(FILE *stream, const char *filename)
int gen_write_tabulated(FILE *fd, int domain)
GEN_WRITE_TABULATED writes the tabulated object TABLE on FD.
int gen_read_tabulated(FILE *file, int create_p)
GEN_READ_TABULATED reads FILE to update the Gen_tabulated_ table.
void gen_init_external(int which, void *(*read)(FILE *, int(*)(void)), void(*write)(FILE *, void *), void(*free)(void *), void *(*copy)(void *), int(*allocated_memory)(void *))
GEN_INIT_EXTERNAL defines entry points for free, read and write functions of external types.
void gen_read_spec(char *spec,...)
static char start[1024]
The name of the variable from which to start counting domain numbers.
list gen_union(list a, list b)
generate an union of unique elements taken from A and B
void gfc2pips_truncate_useless_zeroes(char *s)
expurgates a string representing a REAL, could be a pre-prettyprinter processing
int fcopy(const char *old, const char *new)
copy the file called *old to the file called *new
void gfc2pips_add_to_callees(entity e)
Add an entity to the list of callees.
char * strrcpy(char *dest, __const char *src)
copy a string from the last char (to allow copy on itself)
void gfc2pips_get_use_st(void)
int strcmp_(__const char *__s1, __const char *__s2)
insensitive case comparison
list gfc2pips_list_of_loops
gfc_code * gfc2pips_get_last_loop(void)
list gfc_module_callees
FIXME: should be generated...
list get_use_entities_list(struct gfc_namespace *ns)
int strncmp_(__const char *__s1, __const char *__s2, size_t __n)
insensitive case n-comparison
list gfc2pips_list_of_declared_code
void gfc2pips_push_loop(gfc_code *c)
hash_table ns2use
void gfc2pips_get_use_st( void );
char * strn2upper(char s[], size_t n)
replace lower case char by upper case ones
char * str2upper(char s[])
Here are few utility functions to handle splitted files and do comparisons with case insensitive.
void gfc2pips_pop_loop(void)
gfc_option_t gfc_option
Cmd line options.
#define POP(l)
Modify a list pointer to point on the next element of the list.
#define NIL
The empty list (nil in Lisp)
list gen_cons(const void *item, const list next)
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
#define CAR(pcons)
Get the value of the first element of a list.
bool gen_in_list_p(const void *vo, const list lx)
tell whether vo belongs to lx
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
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.
#define src(name, suf)
HPFC by Fabien Coelho, May 1993 and later...
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define F95_USE_LOCAL_NAME
constant names
Pvecteur vect_gen_copy_tree(Pvecteur)
void vect_gen_write(FILE *, Pvecteur)
Pvecteur.c.
Pvecteur vect_gen_read(FILE *, int(*)(void))
int vect_gen_allocated_memory(Pvecteur)
void vect_gen_free(Pvecteur)
#define HASH_UNDEFINED_VALUE
value returned by hash_get() when the key is not found; could also be called HASH_KEY_NOT_FOUND,...
#define parser_private_spec
const char * entity_local_name(entity e)
entity_local_name modified so that it does not core when used in vect_fprint, since someone thought t...
entity FindOrCreateEntity(const char *package, const char *local_name)
Problem: A functional global entity may be referenced without parenthesis or CALL keyword in a functi...
bool intrinsic_entity_p(entity e)
#define entity_storage(x)
#define entity_domain
newgen_syntax_domain_defined
#define entity_initial(x)
The structure used to build lists in NewGen.
gen_chunk car
The data payload of a list element.
const char * CurrentPackage
the name of the current package, i.e.
void * e
For externals (foreign objects)