25 #include "pips_config.h"
139 char lc = global_name[strlen(global_name)-1];
146 if(lc==
'"' || lc==
'\'') {
147 user_name = strchr(global_name, lc);
150 user_name = strchr(global_name,
'(');
183 else if (strstr(global_name,
MAIN_PREFIX) != NULL) {
215 pips_debug(9,
"global name = \"%s\", user_name = \"%s\"\n",
216 global_name, user_name);
241 return(strcmp(s,
"") == 0);
246 extern int isspace(
int);
247 while(*s&&isspace(*s++));
298 static char *local = NULL;
299 static size_t local_size = 0;
302 size_t len = sep? (
size_t) (sep-s): strlen(s);
304 if (local_size < len + 1)
306 if (local)
free(local);
307 local_size = len + 1 > 100? len + 1: 100;
308 local =
malloc(local_size);
311 strncpy(local, s, len);
bool blank_string_p(const char *s)
bool static_module_name_p(const char *name)
Check if the given name is a static module name.
bool return_local_label_name_p(const char *s)
bool main_module_global_name_p(const char *name)
Argument "name" is a global name.
bool return_label_p(const char *s)
const char * global_name_to_user_name(const char *global_name)
functions on strings for entity names
bool empty_label_p(const char *s)
string make_entity_fullname(const char *module_name, const char *local_name)
END_EOLE.
bool empty_global_label_p(const char *gln)
bool compilation_unit_p(const char *module_name)
The names of PIPS entities carry information about their nature.
bool empty_string_p(const char *s)
const char * local_name(const char *s)
Does not take care of block scopes and returns a pointer.
bool module_name_p(string name)
Check if the given name is the name of a plain module and not of a compilation unit.
const char * module_name(const char *s)
Return the module part of an entity name.
bool main_module_name_p(const char *name)
Argument "name" is a local name (not a user name)
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define pips_internal_error
#define RETURN_LABEL_NAME
#define MODULE_SEP
special characters to build entity names of various kinds
#define EMPTY_LABEL_NAME
Its value is "@", the label prefix followed by nothing.
#define TOP_LEVEL_MODULE_NAME
Module containing the global variables in Fortran and C.
#define MODULE_SEP_STRING
#define MEMBER_SEP_STRING
#define BLOCK_SEP_STRING
Scope separator.
string concatenate(const char *,...)
Return the concatenation of the given strings.
#define same_string_p(s1, s2)
static const char * prefix