PIPS
workspace.c File Reference
#include "private.h"
#include "pipsdbm_private.h"
+ Include dependency graph for workspace.c:

Go to the source code of this file.

Macros

#define WORKSPACE_NAME_CHARS    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
 the workspace name must be composed of the following characters. More...
 
#define MD_DATABASE   "database"
 
#define METADATA   "Metadata"
 
#define DATABASE_STATUS   "STATUS"
 
#define DATABASE_SYMBOLS   "SYMBOLS"
 
#define DATABASE_MISC   "MISC"
 
#define DATABASE_NEWGEN   "NEWGEN" /**newgen type translation data... */
 
#define ONERROR(cond, what)    if (cond) { what; return false; }
 

Functions

bool workspace_name_p (const char *name)
 workspace.c More...
 
static void db_set_current_workspace_name (const char *name)
 
static void db_reset_current_workspace_name (void)
 
static void db_reset_current_workspace_name_if_necessary (void)
 
string db_get_current_workspace_name (void)
 the function is used to check that there is some current workspace... More...
 
string db_get_workspace_directory_name (const char *name)
 returns an allocated string. More...
 
string db_get_current_workspace_directory (void)
 
int db_inc_logical_time (void)
 0 means not set... More...
 
int db_get_logical_time (void)
 
static void db_set_logical_time (int time)
 
static void db_reset_logical_time (void)
 
string db_get_meta_data_directory ()
 The syntax of a property list. More...
 
static string meta_data_db_file_name (string data)
 
static void reset_meta_data (void)
 reset all meta data on failures. More...
 
static bool save_meta_data (bool do_free)
 save (and maybe free) metadata. More...
 
static bool load_meta_data (void)
 load metadata from workspace. More...
 
bool workspace_exists_p (const char *name)
 
bool workspace_ok_p (const char *name)
 
bool db_create_workspace (const char *name)
 
static void db_close_module (string what, string oname, bool do_free)
 stores all resources of module oname. More...
 
static void db_save_workspace (string what, bool do_free)
 
void db_checkpoint_workspace (void)
 
bool db_close_workspace (bool is_quit)
 
bool db_open_workspace (const char *name)
 

Variables

static string current_workspace_name = NULL
 the workspace has a name. More...
 
static int logical_time = 1
 

Macro Definition Documentation

◆ DATABASE_MISC

#define DATABASE_MISC   "MISC"

Definition at line 136 of file workspace.c.

◆ DATABASE_NEWGEN

#define DATABASE_NEWGEN   "NEWGEN" /**newgen type translation data... */

Definition at line 137 of file workspace.c.

◆ DATABASE_STATUS

#define DATABASE_STATUS   "STATUS"

Definition at line 134 of file workspace.c.

◆ DATABASE_SYMBOLS

#define DATABASE_SYMBOLS   "SYMBOLS"

Definition at line 135 of file workspace.c.

◆ MD_DATABASE

#define MD_DATABASE   "database"

Definition at line 88 of file workspace.c.

◆ METADATA

#define METADATA   "Metadata"

Definition at line 132 of file workspace.c.

◆ ONERROR

#define ONERROR (   cond,
  what 
)     if (cond) { what; return false; }

Definition at line 205 of file workspace.c.

◆ WORKSPACE_NAME_CHARS

#define WORKSPACE_NAME_CHARS    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"

the workspace name must be composed of the following characters.

Definition at line 43 of file workspace.c.

Function Documentation

◆ db_checkpoint_workspace()

void db_checkpoint_workspace ( void  )

load ENTITIES (since no one ask for them as they should...)

Definition at line 350 of file workspace.c.

351 {
353  pips_debug(1, "Checkpointing workspace %s\n",
355 
356  db_save_workspace("Saving", false);
357 
358  /* load ENTITIES (since no one ask for them as they should...)
359  */
360  if (db_resource_p(DBR_ENTITIES, ""))
361  (void) db_get_memory_resource(DBR_ENTITIES, "", true);
362 
364  debug_off();
365 }
void dump_all_db_resource_status(FILE *file, string where)
Definition: database.c:198
bool db_resource_p(const char *rname, const char *oname)
true if exists and in loaded or stored state.
Definition: database.c:524
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
Definition: database.c:755
#define debug_on(env)
Definition: misc-local.h:157
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
Definition: misc-local.h:145
#define debug_off()
Definition: misc-local.h:160
#define PIPSDBM_DEBUG_LEVEL
Definition: pipsdbm-local.h:27
#define ifdebug(n)
Definition: sg.c:47
static void db_save_workspace(string what, bool do_free)
Definition: workspace.c:333
void db_checkpoint_workspace(void)
Definition: workspace.c:350
string db_get_current_workspace_name(void)
the function is used to check that there is some current workspace...
Definition: workspace.c:82

References db_get_current_workspace_name(), db_get_memory_resource(), db_resource_p(), db_save_workspace(), debug_off, debug_on, dump_all_db_resource_status(), ifdebug, pips_debug, and PIPSDBM_DEBUG_LEVEL.

Referenced by checkpoint_workspace().

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

◆ db_close_module()

static void db_close_module ( string  what,
string  oname,
bool  do_free 
)
static

stores all resources of module oname.

log if necessary.

Definition at line 318 of file workspace.c.

319 {
320  // the download order is retrieved from the methods...
321  int nr = dbll_number_of_resources(), i;
322 
323  if (!same_string_p(oname, "")) /* log if necessary. */
324  user_log(" %s module %s.\n", what, oname);
325 
326  for (i=0; i<nr; i++)
327  {
329  (dbll_get_ith_resource_name(i), oname, do_free);
330  }
331 }
void user_log(const char *format,...)
Definition: message.c:234
void db_save_and_free_memory_resource_if_any(const char *rname, const char *oname, bool do_free)
Definition: database.c:1013
int dbll_number_of_resources(void)
Definition: lowlevel.c:108
string dbll_get_ith_resource_name(int i)
Definition: lowlevel.c:113
#define same_string_p(s1, s2)

References db_save_and_free_memory_resource_if_any(), dbll_get_ith_resource_name(), dbll_number_of_resources(), same_string_p, and user_log().

Referenced by db_save_workspace(), and main().

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

◆ db_close_workspace()

bool db_close_workspace ( bool  is_quit)

free?

Parameters
is_quits_quit

Definition at line 367 of file workspace.c.

368 {
370  pips_debug(1, "Closing workspace %s\n", db_get_current_workspace_name());
371 
372  db_save_workspace("Closing", /* free? */ !is_quit);
374 
375  pips_debug(1, "done\n");
376  debug_off();
377  return true;
378 }
static void db_reset_current_workspace_name(void)
Definition: workspace.c:69

References db_get_current_workspace_name(), db_reset_current_workspace_name(), db_save_workspace(), debug_off, debug_on, pips_debug, and PIPSDBM_DEBUG_LEVEL.

Referenced by create(), main(), make_close_workspace(), make_open_workspace(), old_reductions(), tpips_internal_error(), and tpips_user_error().

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

◆ db_create_workspace()

bool db_create_workspace ( const char *  name)
Parameters
nameame

Definition at line 282 of file workspace.c.

283 {
284  bool ok;
285  string dir_name;
287 
288  dir_name = db_get_workspace_directory_name(name);
289 
290  pips_debug(1, "workspace %s in directory %s\n", name, dir_name);
291 
292  if ((ok = purge_directory(dir_name)))
293  {
294  if ((ok = create_directory(dir_name)))
295  {
298  }
299  else
300  {
301  pips_user_warning("could not create directory %s\n", dir_name);
302  }
303  }
304  else
305  {
306  pips_user_warning("could not remove old directory %s\n", dir_name);
307  }
308 
309  free(dir_name);
310  pips_debug(1, "done\n");
311 
312  debug_off();
313  return ok;
314 }
void db_create_pips_database(void)
exported interface is minimal.
Definition: database.c:109
bool create_directory(char *name)
Definition: file.c:435
bool purge_directory(char *name)
Definition: file.c:453
void free(void *)
#define pips_user_warning
Definition: misc-local.h:146
static bool ok
static void db_set_current_workspace_name(const char *name)
Definition: workspace.c:60
string db_get_workspace_directory_name(const char *name)
returns an allocated string.
Definition: workspace.c:91

References create_directory(), db_create_pips_database(), db_get_workspace_directory_name(), db_set_current_workspace_name(), debug_off, debug_on, free(), ok, pips_debug, pips_user_warning, PIPSDBM_DEBUG_LEVEL, and purge_directory().

Referenced by create(), end_create_workspace_notify(), execute_workspace_creation_and_so_on_given_with_options(), and pips_main().

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

◆ db_get_current_workspace_directory()

string db_get_current_workspace_directory ( void  )

Definition at line 96 of file workspace.c.

97 {
98  string ws_name = db_get_current_workspace_name();
99  pips_assert("some current workspace", ws_name);
100  return db_get_workspace_directory_name(ws_name);
101 }
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
Definition: misc-local.h:172

◆ db_get_current_workspace_name()

◆ db_get_logical_time()

int db_get_logical_time ( void  )

Definition at line 112 of file workspace.c.

113 {
114  return logical_time;
115 }
static int logical_time
Definition: workspace.c:105

References logical_time.

Referenced by db_check_time(), db_put_or_update_memory_resource(), db_set_resource_as_required(), db_touch_resource(), db_update_time(), and save_meta_data().

+ Here is the caller graph for this function:

◆ db_get_meta_data_directory()

string db_get_meta_data_directory ( void  )

The syntax of a property list.

FC 2015-07-19 include "pipsdbm.h" avoid include cycle pipsdbm -> properties -> pipsdbm there is still a link cycle.

Definition at line 139 of file workspace.c.

140 {
142 }
string db_get_directory_name_for_module(const char *name)
returns the allocated and mkdir'ed directory for module name
Definition: lowlevel.c:150
#define METADATA
Definition: workspace.c:132

Referenced by meta_data_db_file_name().

+ Here is the caller graph for this function:

◆ db_get_workspace_directory_name()

string db_get_workspace_directory_name ( const char *  name)

returns an allocated string.

Parameters
nameame

Definition at line 91 of file workspace.c.

92 {
93  return strdup(concatenate("./", name, "." MD_DATABASE, NULL));
94 }
string concatenate(const char *,...)
Return the concatenation of the given strings.
Definition: string.c:183
char * strdup()
#define MD_DATABASE
Definition: workspace.c:88

References concatenate(), MD_DATABASE, and strdup().

Referenced by db_create_workspace(), db_get_current_workspace_directory(), db_open_workspace(), workspace_exists_p(), and workspace_ok_p().

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

◆ db_inc_logical_time()

int db_inc_logical_time ( void  )

0 means not set...

Definition at line 107 of file workspace.c.

108 {
109  return logical_time++;
110 }

References logical_time.

Referenced by db_check_time(), and update_preserved_resources().

+ Here is the caller graph for this function:

◆ db_open_workspace()

bool db_open_workspace ( const char *  name)

failure!

load ENTITIES (since no one ask for them as they should;-)

should touch them somehow to force latter saving?

Parameters
nameame

Definition at line 380 of file workspace.c.

381 {
382  bool ok = true;
383  string dir_name;
385  pips_debug(1, "Opening workspace %s\n", name);
386 
387  dir_name = db_get_workspace_directory_name(name);
388  if (directory_exists_p(dir_name))
389  {
391  ok = load_meta_data();
392 
393  if (!ok) /* failure! */
394  {
395  reset_meta_data();
396  pips_user_warning("Cannot load workspace metadata for %s.\n",
397  name);
398  }
399 
400  /* load ENTITIES (since no one ask for them as they should;-) */
401  if (ok && db_resource_p(DBR_ENTITIES, "")) {
402  (void) db_get_memory_resource(DBR_ENTITIES, "", true);
403  /* should touch them somehow to force latter saving? */
404  }
405  }
406  else ok = false;
407 
408  pips_debug(1, "done (%d)\n", ok);
409  debug_off();
410  free(dir_name);
411  return ok;
412 }
bool directory_exists_p(const char *name)
Definition: file.c:314
static bool load_meta_data(void)
load metadata from workspace.
Definition: workspace.c:211
static void reset_meta_data(void)
reset all meta data on failures.
Definition: workspace.c:153

References db_get_memory_resource(), db_get_workspace_directory_name(), db_resource_p(), db_set_current_workspace_name(), debug_off, debug_on, directory_exists_p(), free(), load_meta_data(), ok, pips_debug, pips_user_warning, PIPSDBM_DEBUG_LEVEL, and reset_meta_data().

Referenced by main(), make_open_workspace(), and old_reductions().

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

◆ db_reset_current_workspace_name()

static void db_reset_current_workspace_name ( void  )
static

Definition at line 69 of file workspace.c.

70 {
71  pips_assert("some current workspace", current_workspace_name);
73 }

References current_workspace_name, free(), and pips_assert.

Referenced by db_close_workspace(), and db_reset_current_workspace_name_if_necessary().

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

◆ db_reset_current_workspace_name_if_necessary()

static void db_reset_current_workspace_name_if_necessary ( void  )
static

Definition at line 75 of file workspace.c.

References current_workspace_name, and db_reset_current_workspace_name().

Referenced by reset_meta_data().

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

◆ db_reset_logical_time()

static void db_reset_logical_time ( void  )
static

Definition at line 123 of file workspace.c.

124 {
125  logical_time = 0;
126 }

References logical_time.

Referenced by reset_meta_data().

+ Here is the caller graph for this function:

◆ db_save_workspace()

static void db_save_workspace ( string  what,
bool  do_free 
)
static

ENTITIES are saved here...

Definition at line 333 of file workspace.c.

334 {
335  gen_array_t a;
336 
337  user_log("%s all modules.\n", what);
338  a = db_get_module_list();
339  GEN_ARRAY_FOREACH(string, module, a)
340  db_close_module(what, module, do_free);
342 
343  user_log("%s program.\n", what);
344  db_close_module(what, "", do_free); /* ENTITIES are saved here... */
345 
346  user_log("%s workspace.\n", what);
347  save_meta_data(do_free);
348 }
void gen_array_full_free(gen_array_t a)
Definition: array.c:77
gen_array_t db_get_module_list(void)
Get an array of all the modules (functions, procedures and compilation units) of a workspace.
Definition: database.c:1266
#define GEN_ARRAY_FOREACH(type, s, array)
Definition: newgen_array.h:50
static char * module
Definition: pips.c:74
static bool save_meta_data(bool do_free)
save (and maybe free) metadata.
Definition: workspace.c:164
static void db_close_module(string what, string oname, bool do_free)
stores all resources of module oname.
Definition: workspace.c:318

References db_close_module(), db_get_module_list(), GEN_ARRAY_FOREACH, gen_array_full_free(), module, save_meta_data(), and user_log().

Referenced by db_checkpoint_workspace(), and db_close_workspace().

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

◆ db_set_current_workspace_name()

static void db_set_current_workspace_name ( const char *  name)
static

Definition at line 60 of file workspace.c.

61 {
63  pips_internal_error("current workspace %s not closed",
65  pips_assert("valid workspace name", workspace_name_p(name));
67 }
#define pips_internal_error
Definition: misc-local.h:149
bool workspace_name_p(const char *name)
workspace.c
Definition: workspace.c:46

References current_workspace_name, pips_assert, pips_internal_error, strdup(), and workspace_name_p().

Referenced by db_create_workspace(), and db_open_workspace().

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

◆ db_set_logical_time()

static void db_set_logical_time ( int  time)
static

Definition at line 117 of file workspace.c.

118 {
119  pips_assert("positive time set", time>=1);
120  logical_time = time;
121 }

References logical_time, and pips_assert.

Referenced by load_meta_data().

+ Here is the caller graph for this function:

◆ load_meta_data()

static bool load_meta_data ( void  )
static

load metadata from workspace.

Returns
whether successful.

Definition at line 211 of file workspace.c.

212 {
213  string file_name, ws_name;
214  FILE * file;
215  int time;
216  bool ok;
217 
218  pips_debug(2, "loading newgen type translation data\n");
222  else
223  pips_user_warning("no newgen type translation file...");
224  free(file_name);
225 
226  pips_debug(2, "loading database misc data\n");
228  file = check_fopen(file_name, "r");
229  ONERROR(!file,/* nope */)
230  ONERROR(fscanf(file, "%d\n", &time)!=1,
231  pips_internal_error("fscanf failed"))
232  db_set_logical_time(time);
233  ws_name = safe_readline(file);
235  pips_user_warning("Workspace %s has been moved to %s\n",
236  ws_name, db_get_current_workspace_name());
237  free(ws_name);
238  safe_fclose(file, file_name);
239  free(file_name);
240 
241  pips_debug(2, "loading database symbols\n");
243  file = check_fopen(file_name, "r");
244  ONERROR(!file,/* nope */)
246 
247  safe_fclose(file, file_name);
248  free(file_name);
249 
250  pips_debug(2, "loading database status\n");
252  file = check_fopen(file_name, "r");
253  ONERROR(!file,/* nope */)
254  ok = db_open_pips_database(file);
255  ONERROR(!ok, pips_user_error("Could not read database content!"))
256  safe_fclose(file, file_name);
257  free(file_name);
258 
259  pips_debug(2, "done\n");
260 
261  return true;
262 }
void read_tabulated_db_symbol(FILE *f)
bool db_open_pips_database(FILE *fd)
Definition: database.c:119
bool file_exists_p(const char *name)
Definition: file.c:321
int safe_fclose(FILE *stream, const char *filename)
Definition: file.c:77
char * safe_readline(FILE *file)
returns the allocated line read, whatever its length.
Definition: file.c:497
FILE * check_fopen(const char *file, const char *mode)
file.c
Definition: file.c:56
void gen_type_translation_read(string filename)
set current type translation table according to file
Definition: genClib.c:2189
if(!(yy_init))
Definition: genread_lex.c:1029
#define pips_user_error
Definition: misc-local.h:147
#define true
Definition: newgen_types.h:81
return(s1)
static string file_name
#define DATABASE_STATUS
Definition: workspace.c:134
#define DATABASE_SYMBOLS
Definition: workspace.c:135
#define DATABASE_MISC
Definition: workspace.c:136
static void db_set_logical_time(int time)
Definition: workspace.c:117
#define ONERROR(cond, what)
Definition: workspace.c:205
#define DATABASE_NEWGEN
Definition: workspace.c:137
static string meta_data_db_file_name(string data)
Definition: workspace.c:144

References check_fopen(), DATABASE_MISC, DATABASE_NEWGEN, DATABASE_STATUS, DATABASE_SYMBOLS, db_get_current_workspace_name(), db_open_pips_database(), db_set_logical_time(), file_exists_p(), file_name, free(), gen_type_translation_read(), meta_data_db_file_name(), ok, ONERROR, pips_debug, pips_internal_error, pips_user_error, pips_user_warning, read_tabulated_db_symbol(), safe_fclose(), safe_readline(), and same_string_p.

Referenced by db_open_workspace().

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

◆ meta_data_db_file_name()

static string meta_data_db_file_name ( string  data)
static

Definition at line 144 of file workspace.c.

145 {
146  string dir_name = db_get_meta_data_directory(),
147  res = strdup(concatenate(dir_name, "/" MD_DATABASE ".", data, NULL));
148  free(dir_name); return res;
149 }
string db_get_meta_data_directory()
The syntax of a property list.
Definition: workspace.c:139

References concatenate(), db_get_meta_data_directory(), free(), MD_DATABASE, and strdup().

Referenced by load_meta_data(), and save_meta_data().

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

◆ reset_meta_data()

static void reset_meta_data ( void  )
static

reset all meta data on failures.

what about db_symbols?

Definition at line 153 of file workspace.c.

154 {
157  /* what about db_symbols? */
159 }
void db_reset_pips_database_if_necessary(void)
Definition: database.c:155
static void db_reset_logical_time(void)
Definition: workspace.c:123
static void db_reset_current_workspace_name_if_necessary(void)
Definition: workspace.c:75

References db_reset_current_workspace_name_if_necessary(), db_reset_logical_time(), and db_reset_pips_database_if_necessary().

Referenced by db_open_workspace().

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

◆ save_meta_data()

static bool save_meta_data ( bool  do_free)
static

save (and maybe free) metadata.

Returns
whether sucessful.

Definition at line 164 of file workspace.c.

165 {
166  string file_name;
167  FILE * file;
168 
169  pips_debug(2, "saving database status\n");
171  file = safe_fopen(file_name, "w");
172  db_save_pips_database(file);
173  safe_fclose(file, file_name);
174  free(file_name);
175 
176  if (do_free) db_close_pips_database();
177 
178  pips_debug(2, "saving database symbols\n");
180  file = safe_fopen(file_name, "w");
182  safe_fclose(file, file_name);
183  free(file_name);
184 
185  if (do_free) gen_free_tabulated(db_symbol_domain);
186 
187  pips_debug(2, "saving database misc data\n");
189  file = safe_fopen(file_name, "w");
190  fprintf(file, "%d\n%s\n",
192  safe_fclose(file, file_name);
193  free(file_name);
194 
195  pips_debug(2, "saving newgen type translation data\n");
198  free(file_name);
199 
200  pips_debug(2, "done\n");
201 
202  return true;
203 }
void write_tabulated_db_symbol(FILE *f)
void db_save_pips_database(FILE *fd)
Definition: database.c:137
void db_close_pips_database(void)
Definition: database.c:150
FILE * safe_fopen(const char *filename, const char *what)
Definition: file.c:67
void gen_type_translation_write(string filename)
Definition: genClib.c:2195
int gen_free_tabulated(int domain)
free tabulated elements of this domain.
Definition: genClib.c:1461
#define db_symbol_domain
newgen_db_status_domain_defined
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
int db_get_logical_time(void)
Definition: workspace.c:112

References DATABASE_MISC, DATABASE_NEWGEN, DATABASE_STATUS, DATABASE_SYMBOLS, db_close_pips_database(), db_get_current_workspace_name(), db_get_logical_time(), db_save_pips_database(), db_symbol_domain, file_name, fprintf(), free(), gen_free_tabulated(), gen_type_translation_write(), meta_data_db_file_name(), pips_debug, safe_fclose(), safe_fopen(), and write_tabulated_db_symbol().

Referenced by db_save_workspace().

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

◆ workspace_exists_p()

bool workspace_exists_p ( const char *  name)
Parameters
nameame

Definition at line 266 of file workspace.c.

267 {
269  bool result = directory_exists_p(full_name);
270  free(full_name);
271  return result;
272 }
#define full_name(dir, name)
Definition: compile.c:414

References db_get_workspace_directory_name(), directory_exists_p(), free(), and full_name.

Referenced by continue_create_workspace_notify(), create(), and open_workspace().

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

◆ workspace_name_p()

bool workspace_name_p ( const char *  name)

workspace.c

Parameters
nameame

Definition at line 46 of file workspace.c.

47 {
48  return strlen(name)==strspn(name, WORKSPACE_NAME_CHARS);
49 }
#define WORKSPACE_NAME_CHARS
the workspace name must be composed of the following characters.
Definition: workspace.c:43

References WORKSPACE_NAME_CHARS.

Referenced by continue_create_workspace_notify(), db_set_current_workspace_name(), end_create_workspace_notify(), and open_or_create_workspace().

+ Here is the caller graph for this function:

◆ workspace_ok_p()

bool workspace_ok_p ( const char *  name)
Parameters
nameame

Definition at line 274 of file workspace.c.

275 {
277  bool result = file_readable_p(full_name);
278  free(full_name);
279  return result;
280 }
bool file_readable_p(char *name)
Definition: file.c:428

References db_get_workspace_directory_name(), file_readable_p(), free(), and full_name.

Referenced by open_workspace().

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

Variable Documentation

◆ current_workspace_name

string current_workspace_name = NULL
static

the workspace has a name.

{set,reset,get}_workspace

Definition at line 58 of file workspace.c.

Referenced by db_get_current_workspace_name(), db_reset_current_workspace_name(), db_reset_current_workspace_name_if_necessary(), and db_set_current_workspace_name().

◆ logical_time

int logical_time = 1
static