PIPS
file_names.c File Reference
#include "genC.h"
#include "misc.h"
#include "constants.h"
#include "naming.h"
+ Include dependency graph for file_names.c:

Go to the source code of this file.

Functions

string string_codefilename (const char *s)
 Naming of files in the PIPS database. More...
 
string string_par_codefilename (const char *s)
 
string string_fortranfilename (const char *s)
 
bool string_fortran_filename_p (const char *s)
 
string string_par_fortranfilename (const char *s)
 
string string_pp_fortranfilename (const char *s)
 
string string_predicat_fortranfilename (const char *s)
 
string string_entitiesfilename (const char *s)
 
void set_script_directory_name (string dn)
 
string get_script_directory_name (void)
 

Variables

static string script_directory_name = string_undefined
 Keep track of the script directory. More...
 

Function Documentation

◆ get_script_directory_name()

string get_script_directory_name ( void  )

Definition at line 110 of file file_names.c.

111 {
112  return script_directory_name;
113 }
static string script_directory_name
Keep track of the script directory.
Definition: file_names.c:103

References script_directory_name.

◆ set_script_directory_name()

void set_script_directory_name ( string  dn)
Parameters
dnn

Definition at line 105 of file file_names.c.

106 {
108 }
char * strdup()

References script_directory_name, and strdup().

Referenced by parse_arguments().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ string_codefilename()

string string_codefilename ( const char *  s)

Naming of files in the PIPS database.

file_names.c

Definition at line 37 of file file_names.c.

38 {
40  s, SEQUENTIAL_CODE_EXT, NULL));
41 }
#define TOP_LEVEL_MODULE_NAME
Module containing the global variables in Fortran and C.
Definition: naming-local.h:101
#define MODULE_SEP_STRING
Definition: naming-local.h:30
string concatenate(const char *,...)
Return the concatenation of the given strings.
Definition: string.c:183

References concatenate(), MODULE_SEP_STRING, and TOP_LEVEL_MODULE_NAME.

Referenced by module_codefilename().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ string_entitiesfilename()

string string_entitiesfilename ( const char *  s)

Definition at line 87 of file file_names.c.

88 {
90  s, ENTITIES_EXT, NULL));
91 }

References concatenate(), MODULE_SEP_STRING, and TOP_LEVEL_MODULE_NAME.

Referenced by module_entitiesfilename().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ string_fortran_filename_p()

bool string_fortran_filename_p ( const char *  s)

Definition at line 55 of file file_names.c.

56 {
57  int fnl = strlen(s);
58  int sl = sizeof(SEQUENTIAL_FORTRAN_EXT)-1;
59  bool is_fortran = false;
60 
61  if(fnl<=sl)
62  is_fortran = false;
63  else
64  is_fortran = strcmp(SEQUENTIAL_FORTRAN_EXT, s+(fnl-sl))==0;
65 
66  return is_fortran;
67 }

◆ string_fortranfilename()

string string_fortranfilename ( const char *  s)

Definition at line 49 of file file_names.c.

50 {
52  s, SEQUENTIAL_FORTRAN_EXT, NULL));
53 }

References concatenate(), MODULE_SEP_STRING, and TOP_LEVEL_MODULE_NAME.

Referenced by module_fortranfilename().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ string_par_codefilename()

string string_par_codefilename ( const char *  s)

Definition at line 43 of file file_names.c.

44 {
46  s, PARALLEL_CODE_EXT, NULL));
47 }

References concatenate(), MODULE_SEP_STRING, and TOP_LEVEL_MODULE_NAME.

Referenced by module_par_codefilename().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ string_par_fortranfilename()

string string_par_fortranfilename ( const char *  s)

Definition at line 69 of file file_names.c.

70 {
72  s, PARALLEL_FORTRAN_EXT, NULL));
73 }

References concatenate(), MODULE_SEP_STRING, and TOP_LEVEL_MODULE_NAME.

Referenced by module_par_fortranfilename().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ string_pp_fortranfilename()

string string_pp_fortranfilename ( const char *  s)

Definition at line 75 of file file_names.c.

76 {
78  s, PRETTYPRINT_FORTRAN_EXT, NULL));
79 }

References concatenate(), MODULE_SEP_STRING, and TOP_LEVEL_MODULE_NAME.

Referenced by module_pp_fortranfilename().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ string_predicat_fortranfilename()

string string_predicat_fortranfilename ( const char *  s)

Definition at line 81 of file file_names.c.

82 {
84  s, PREDICAT_FORTRAN_EXT, NULL));
85 }

References concatenate(), MODULE_SEP_STRING, and TOP_LEVEL_MODULE_NAME.

Referenced by module_predicat_fortranfilename().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ script_directory_name

string script_directory_name = string_undefined
static

Keep track of the script directory.

It is used to retrieve information about old properties, mostly in a non-regression setting.

In case of "source", the auxiliary directory is ignored.

FI: I do not reset nor free this variable since it is set from beginning to end.

Definition at line 103 of file file_names.c.

Referenced by get_script_directory_name(), and set_script_directory_name().