PIPS
database.h File Reference

Go to the source code of this file.

Data Structures

struct  _newgen_struct_database_
 
struct  _newgen_struct_resource_
 
struct  _newgen_struct_status_
 

Macros

#define _gen_database_start   7
 
#define database_domain   (_gen_database_start+0)
 
#define _newgen_database_domain_defined_
 
#define DATABASE_NEWGEN_DOMAIN   (database_domain)
 
#define database_NEWGEN_DOMAIN   (database_domain)
 
#define resource_domain   (_gen_database_start+1)
 newgen_database_domain_defined More...
 
#define _newgen_resource_domain_defined_
 
#define RESOURCE_NEWGEN_DOMAIN   (resource_domain)
 
#define resource_NEWGEN_DOMAIN   (resource_domain)
 
#define status_domain   (_gen_database_start+2)
 newgen_resource_domain_defined More...
 
#define _newgen_status_domain_defined_
 
#define STATUS_NEWGEN_DOMAIN   (status_domain)
 
#define status_NEWGEN_DOMAIN   (status_domain)
 
#define DATABASE(x)   ((database)((x).p))
 newgen_status_domain_defined More...
 
#define database_CAST(x)   DATABASE(x)
 
#define DATABASE_CAST(x)   DATABASE(x)
 
#define DATABASE_(x)   ((x).e)
 
#define DATABASE_TYPE   database
 
#define database_TYPE   database
 
#define database_undefined   ((database)gen_chunk_undefined)
 
#define database_undefined_p(x)   ((x)==database_undefined)
 
#define gen_DATABASE_cons   gen_database_cons
 
#define database_domain_number(x)   ((x)->_type_)
 
#define database_name_(x)   database_name(x) /**old hack compatible */
 
#define database_name(x)   ((x)->_database_name_)
 
#define database_directory_(x)   database_directory(x) /**old hack compatible */
 
#define database_directory(x)   ((x)->_database_directory_)
 
#define database_resources_(x)   database_resources(x) /**old hack compatible */
 
#define database_resources(x)   ((x)->_database_resources_)
 
#define RESOURCE(x)   ((resource)((x).p))
 RESOURCE. More...
 
#define resource_CAST(x)   RESOURCE(x)
 
#define RESOURCE_CAST(x)   RESOURCE(x)
 
#define RESOURCE_(x)   ((x).e)
 
#define RESOURCE_TYPE   resource
 
#define resource_TYPE   resource
 
#define resource_undefined   ((resource)gen_chunk_undefined)
 
#define resource_undefined_p(x)   ((x)==resource_undefined)
 
#define gen_RESOURCE_cons   gen_resource_cons
 
#define resource_domain_number(x)   ((x)->_type_)
 
#define resource_name_(x)   resource_name(x) /**old hack compatible */
 
#define resource_name(x)   ((x)->_resource_name_)
 
#define resource_owner_name_(x)   resource_owner_name(x) /**old hack compatible */
 
#define resource_owner_name(x)   ((x)->_resource_owner_name_)
 
#define resource_status_(x)   resource_status(x) /**old hack compatible */
 
#define resource_status(x)   ((x)->_resource_status_)
 
#define resource_time_(x)   resource_time(x) /**old hack compatible */
 
#define resource_time(x)   ((x)->_resource_time_)
 
#define resource_file_time_(x)   resource_file_time(x) /**old hack compatible */
 
#define resource_file_time(x)   ((x)->_resource_file_time_)
 
#define STATUS(x)   ((status)((x).p))
 STATUS. More...
 
#define status_CAST(x)   STATUS(x)
 
#define STATUS_CAST(x)   STATUS(x)
 
#define STATUS_(x)   ((x).e)
 
#define STATUS_TYPE   status
 
#define status_TYPE   status
 
#define status_undefined   ((status)gen_chunk_undefined)
 
#define status_undefined_p(x)   ((x)==status_undefined)
 
#define gen_STATUS_cons   gen_status_cons
 
#define status_domain_number(x)   ((x)->_type_)
 
#define status_tag(x)   ((x)->_status_tag__)
 
#define status_memory_p(x)   (status_tag(x)==is_status_memory)
 
#define status_memory_(x)   status_memory(x) /**old hack compatible */
 
#define status_memory(x)   ((x)->_status_union_._status_memory_)
 
#define status_file_p(x)   (status_tag(x)==is_status_file)
 
#define status_file_(x)   status_file(x) /**old hack compatible */
 
#define status_file(x)   ((x)->_status_union_._status_file_)
 
#define database_spec   "\--NEWGEN-START 7\n\database = name:string x directory:string x resources:resource*;\n\resource = name:string x owner_name:string x status:status x time:int x file_time:int;\n\status = memory:string + file:string;\n\"
 

Typedefs

typedef struct _newgen_struct_database_database
 
typedef struct _newgen_struct_resource_resource
 
typedef struct _newgen_struct_status_status
 

Enumerations

enum  status_utype { is_status_memory , is_status_file }
 

Functions

database copy_database (database)
 DATABASE. More...
 
void free_database (database)
 
database check_database (database)
 
bool database_consistent_p (database)
 
bool database_defined_p (database)
 
list gen_database_cons (database, list)
 
void database_assign_contents (database, database)
 
void database_non_recursive_free (database)
 
void write_database (FILE *, database)
 
database read_database (FILE *)
 
database make_database (string, string, list)
 
resource copy_resource (resource)
 RESOURCE. More...
 
void free_resource (resource)
 
resource check_resource (resource)
 
bool resource_consistent_p (resource)
 
bool resource_defined_p (resource)
 
list gen_resource_cons (resource, list)
 
void resource_assign_contents (resource, resource)
 
void resource_non_recursive_free (resource)
 
void write_resource (FILE *, resource)
 
resource read_resource (FILE *)
 
resource make_resource (string, string, status, intptr_t, intptr_t)
 
status copy_status (status)
 STATUS. More...
 
void free_status (status)
 
status check_status (status)
 
bool status_consistent_p (status)
 
bool status_defined_p (status)
 
list gen_status_cons (status, list)
 
void status_assign_contents (status, status)
 
void status_non_recursive_free (status)
 
void write_status (FILE *, status)
 
status read_status (FILE *)
 
string status_tag_as_string (enum status_utype)
 
status make_status (enum status_utype, void *)
 
status make_status_memory (string)
 
status make_status_file (string)
 

Macro Definition Documentation

◆ _gen_database_start

#define _gen_database_start   7

Definition at line 3 of file database.h.

◆ _newgen_database_domain_defined_

#define _newgen_database_domain_defined_

Definition at line 12 of file database.h.

◆ _newgen_resource_domain_defined_

#define _newgen_resource_domain_defined_

Definition at line 20 of file database.h.

◆ _newgen_status_domain_defined_

#define _newgen_status_domain_defined_

Definition at line 28 of file database.h.

◆ DATABASE

#define DATABASE (   x)    ((database)((x).p))

newgen_status_domain_defined

DATABASE

Definition at line 36 of file database.h.

◆ DATABASE_

#define DATABASE_ (   x)    ((x).e)

Definition at line 39 of file database.h.

◆ database_CAST

#define database_CAST (   x)    DATABASE(x)

Definition at line 37 of file database.h.

◆ DATABASE_CAST

#define DATABASE_CAST (   x)    DATABASE(x)

Definition at line 38 of file database.h.

◆ database_directory

#define database_directory (   x)    ((x)->_database_directory_)

Definition at line 69 of file database.h.

◆ database_directory_

#define database_directory_ (   x)    database_directory(x) /**old hack compatible */

Definition at line 68 of file database.h.

◆ database_domain

#define database_domain   (_gen_database_start+0)

Definition at line 10 of file database.h.

◆ database_domain_number

#define database_domain_number (   x)    ((x)->_type_)

Definition at line 65 of file database.h.

◆ database_name

#define database_name (   x)    ((x)->_database_name_)

Definition at line 67 of file database.h.

◆ database_name_

#define database_name_ (   x)    database_name(x) /**old hack compatible */

Definition at line 66 of file database.h.

◆ DATABASE_NEWGEN_DOMAIN

#define DATABASE_NEWGEN_DOMAIN   (database_domain)

Definition at line 13 of file database.h.

◆ database_NEWGEN_DOMAIN

#define database_NEWGEN_DOMAIN   (database_domain)

Definition at line 14 of file database.h.

◆ database_resources

#define database_resources (   x)    ((x)->_database_resources_)

Definition at line 71 of file database.h.

◆ database_resources_

#define database_resources_ (   x)    database_resources(x) /**old hack compatible */

Definition at line 70 of file database.h.

◆ database_spec

#define database_spec   "\--NEWGEN-START 7\n\database = name:string x directory:string x resources:resource*;\n\resource = name:string x owner_name:string x status:status x time:int x file_time:int;\n\status = memory:string + file:string;\n\"

Definition at line 167 of file database.h.

◆ DATABASE_TYPE

#define DATABASE_TYPE   database

Definition at line 40 of file database.h.

◆ database_TYPE

#define database_TYPE   database

Definition at line 41 of file database.h.

◆ database_undefined

#define database_undefined   ((database)gen_chunk_undefined)

Definition at line 42 of file database.h.

◆ database_undefined_p

#define database_undefined_p (   x)    ((x)==database_undefined)

Definition at line 43 of file database.h.

◆ gen_DATABASE_cons

#define gen_DATABASE_cons   gen_database_cons

Definition at line 50 of file database.h.

◆ gen_RESOURCE_cons

#define gen_RESOURCE_cons   gen_resource_cons

Definition at line 89 of file database.h.

◆ gen_STATUS_cons

#define gen_STATUS_cons   gen_status_cons

Definition at line 134 of file database.h.

◆ RESOURCE

#define RESOURCE (   x)    ((resource)((x).p))

RESOURCE.

Definition at line 75 of file database.h.

◆ RESOURCE_

#define RESOURCE_ (   x)    ((x).e)

Definition at line 78 of file database.h.

◆ resource_CAST

#define resource_CAST (   x)    RESOURCE(x)

Definition at line 76 of file database.h.

◆ RESOURCE_CAST

#define RESOURCE_CAST (   x)    RESOURCE(x)

Definition at line 77 of file database.h.

◆ resource_domain

#define resource_domain   (_gen_database_start+1)

newgen_database_domain_defined

Definition at line 18 of file database.h.

◆ resource_domain_number

#define resource_domain_number (   x)    ((x)->_type_)

Definition at line 106 of file database.h.

◆ resource_file_time

#define resource_file_time (   x)    ((x)->_resource_file_time_)

Definition at line 116 of file database.h.

◆ resource_file_time_

#define resource_file_time_ (   x)    resource_file_time(x) /**old hack compatible */

Definition at line 115 of file database.h.

◆ resource_name

#define resource_name (   x)    ((x)->_resource_name_)

Definition at line 108 of file database.h.

◆ resource_name_

#define resource_name_ (   x)    resource_name(x) /**old hack compatible */

Definition at line 107 of file database.h.

◆ RESOURCE_NEWGEN_DOMAIN

#define RESOURCE_NEWGEN_DOMAIN   (resource_domain)

Definition at line 21 of file database.h.

◆ resource_NEWGEN_DOMAIN

#define resource_NEWGEN_DOMAIN   (resource_domain)

Definition at line 22 of file database.h.

◆ resource_owner_name

#define resource_owner_name (   x)    ((x)->_resource_owner_name_)

Definition at line 110 of file database.h.

◆ resource_owner_name_

#define resource_owner_name_ (   x)    resource_owner_name(x) /**old hack compatible */

Definition at line 109 of file database.h.

◆ resource_status

#define resource_status (   x)    ((x)->_resource_status_)

Definition at line 112 of file database.h.

◆ resource_status_

#define resource_status_ (   x)    resource_status(x) /**old hack compatible */

Definition at line 111 of file database.h.

◆ resource_time

#define resource_time (   x)    ((x)->_resource_time_)

Definition at line 114 of file database.h.

◆ resource_time_

#define resource_time_ (   x)    resource_time(x) /**old hack compatible */

Definition at line 113 of file database.h.

◆ RESOURCE_TYPE

#define RESOURCE_TYPE   resource

Definition at line 79 of file database.h.

◆ resource_TYPE

#define resource_TYPE   resource

Definition at line 80 of file database.h.

◆ resource_undefined

#define resource_undefined   ((resource)gen_chunk_undefined)

Definition at line 81 of file database.h.

◆ resource_undefined_p

#define resource_undefined_p (   x)    ((x)==resource_undefined)

Definition at line 82 of file database.h.

◆ STATUS

#define STATUS (   x)    ((status)((x).p))

STATUS.

Definition at line 120 of file database.h.

◆ STATUS_

#define STATUS_ (   x)    ((x).e)

Definition at line 123 of file database.h.

◆ status_CAST

#define status_CAST (   x)    STATUS(x)

Definition at line 121 of file database.h.

◆ STATUS_CAST

#define STATUS_CAST (   x)    STATUS(x)

Definition at line 122 of file database.h.

◆ status_domain

#define status_domain   (_gen_database_start+2)

newgen_resource_domain_defined

Definition at line 26 of file database.h.

◆ status_domain_number

#define status_domain_number (   x)    ((x)->_type_)

Definition at line 158 of file database.h.

◆ status_file

#define status_file (   x)    ((x)->_status_union_._status_file_)

Definition at line 165 of file database.h.

◆ status_file_

#define status_file_ (   x)    status_file(x) /**old hack compatible */

Definition at line 164 of file database.h.

◆ status_file_p

#define status_file_p (   x)    (status_tag(x)==is_status_file)

Definition at line 163 of file database.h.

◆ status_memory

#define status_memory (   x)    ((x)->_status_union_._status_memory_)

Definition at line 162 of file database.h.

◆ status_memory_

#define status_memory_ (   x)    status_memory(x) /**old hack compatible */

Definition at line 161 of file database.h.

◆ status_memory_p

#define status_memory_p (   x)    (status_tag(x)==is_status_memory)

Definition at line 160 of file database.h.

◆ STATUS_NEWGEN_DOMAIN

#define STATUS_NEWGEN_DOMAIN   (status_domain)

Definition at line 29 of file database.h.

◆ status_NEWGEN_DOMAIN

#define status_NEWGEN_DOMAIN   (status_domain)

Definition at line 30 of file database.h.

◆ status_tag

#define status_tag (   x)    ((x)->_status_tag__)

Definition at line 159 of file database.h.

◆ STATUS_TYPE

#define STATUS_TYPE   status

Definition at line 124 of file database.h.

◆ status_TYPE

#define status_TYPE   status

Definition at line 125 of file database.h.

◆ status_undefined

#define status_undefined   ((status)gen_chunk_undefined)

Definition at line 126 of file database.h.

◆ status_undefined_p

#define status_undefined_p (   x)    ((x)==status_undefined)

Definition at line 127 of file database.h.

Typedef Documentation

◆ database

Definition at line 15 of file database.h.

◆ resource

Definition at line 23 of file database.h.

◆ status

typedef struct _newgen_struct_status_* status

Definition at line 31 of file database.h.

Enumeration Type Documentation

◆ status_utype

Enumerator
is_status_memory 
is_status_file 

Definition at line 140 of file database.h.

140  {
143 };
@ is_status_file
Definition: database.h:142
@ is_status_memory
Definition: database.h:141

Function Documentation

◆ check_database()

database check_database ( database  p)

Definition at line 22 of file database.c.

22  {
24 }
#define database_domain
Definition: database.h:10
gen_chunk * gen_check(gen_chunk *obj, int t)
GEN_CHECK checks that the gen_chunk received OBJ is of the appropriate TYPE.
Definition: genClib.c:2356
A gen_chunk is used to store every object.
Definition: genC.h:58

References database_domain, and gen_check().

Referenced by database_assign_contents(), and database_consistent_p().

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

◆ check_resource()

resource check_resource ( resource  p)

Definition at line 64 of file database.c.

64  {
66 }
#define resource_domain
newgen_database_domain_defined
Definition: database.h:18

References gen_check(), and resource_domain.

Referenced by resource_assign_contents(), and resource_consistent_p().

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

◆ check_status()

status check_status ( status  p)

Definition at line 106 of file database.c.

106  {
107  return (status) gen_check((gen_chunk*) p, status_domain);
108 }
#define status_domain
newgen_resource_domain_defined
Definition: database.h:26

References gen_check(), and status_domain.

Referenced by status_assign_contents(), and status_consistent_p().

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

◆ copy_database()

database copy_database ( database  p)

DATABASE.

Definition at line 16 of file database.c.

16  {
17  return (database) gen_copy_tree((gen_chunk*) p);
18 }
gen_chunk * gen_copy_tree(gen_chunk *obj)
Definition: genClib.c:1429

References gen_copy_tree().

+ Here is the call graph for this function:

◆ copy_resource()

resource copy_resource ( resource  p)

RESOURCE.

Definition at line 58 of file database.c.

58  {
59  return (resource) gen_copy_tree((gen_chunk*) p);
60 }

References gen_copy_tree().

+ Here is the call graph for this function:

◆ copy_status()

status copy_status ( status  p)

STATUS.

Definition at line 100 of file database.c.

100  {
101  return (status) gen_copy_tree((gen_chunk*) p);
102 }

References gen_copy_tree().

+ Here is the call graph for this function:

◆ database_assign_contents()

void database_assign_contents ( database  r,
database  v 
)

Definition at line 35 of file database.c.

35  {
36  check_database(r);
37  check_database(v);
38  message_assert("defined references to domain database",
40  memcpy(r, v, sizeof(struct _newgen_struct_database_));
41 }
bool database_defined_p(database p)
Definition: database.c:29
database check_database(database p)
Definition: database.c:22
#define message_assert(msg, ex)
Definition: newgen_assert.h:47

References check_database(), database_defined_p(), and message_assert.

+ Here is the call graph for this function:

◆ database_consistent_p()

bool database_consistent_p ( database  p)

Definition at line 25 of file database.c.

25  {
26  check_database(p);
27  return gen_consistent_p((gen_chunk*) p);
28 }
int gen_consistent_p(gen_chunk *obj)
GEN_CONSISTENT_P dynamically checks the type correctness of OBJ.
Definition: genClib.c:2398

References check_database(), and gen_consistent_p().

+ Here is the call graph for this function:

◆ database_defined_p()

bool database_defined_p ( database  p)

Definition at line 29 of file database.c.

29  {
30  return gen_defined_p((gen_chunk*) p);
31 }
int gen_defined_p(gen_chunk *obj)
Definition: genClib.c:2438

References gen_defined_p().

Referenced by database_assign_contents().

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

◆ database_non_recursive_free()

void database_non_recursive_free ( database  p)

Definition at line 42 of file database.c.

42  {
43  // should clear up contents...
44  free(p);
45 }
void free(void *)

References free().

+ Here is the call graph for this function:

◆ free_database()

void free_database ( database  p)

Definition at line 19 of file database.c.

19  {
20  gen_free((gen_chunk*) p);
21 }
void gen_free(gen_chunk *obj)
version without shared_pointers.
Definition: genClib.c:992

References gen_free().

+ Here is the call graph for this function:

◆ free_resource()

void free_resource ( resource  p)

Definition at line 61 of file database.c.

61  {
62  gen_free((gen_chunk*) p);
63 }

References gen_free().

+ Here is the call graph for this function:

◆ free_status()

void free_status ( status  p)

Definition at line 103 of file database.c.

103  {
104  gen_free((gen_chunk*) p);
105 }

References gen_free().

+ Here is the call graph for this function:

◆ gen_database_cons()

list gen_database_cons ( database  p,
list  l 
)

Definition at line 32 of file database.c.

32  {
34 }
#define DATABASE_NEWGEN_DOMAIN
Definition: database.h:13
list gen_typed_cons(_int type, const void *item, const list next)
CONS a list with minimal type checking this cannot be done within the CONS macro because possible fun...
Definition: list.c:900

References DATABASE_NEWGEN_DOMAIN, and gen_typed_cons().

+ Here is the call graph for this function:

◆ gen_resource_cons()

list gen_resource_cons ( resource  p,
list  l 
)

Definition at line 74 of file database.c.

74  {
76 }
#define RESOURCE_NEWGEN_DOMAIN
Definition: database.h:21

References gen_typed_cons(), and RESOURCE_NEWGEN_DOMAIN.

+ Here is the call graph for this function:

◆ gen_status_cons()

list gen_status_cons ( status  p,
list  l 
)

Definition at line 116 of file database.c.

116  {
117  return gen_typed_cons(STATUS_NEWGEN_DOMAIN, p, l);
118 }
#define STATUS_NEWGEN_DOMAIN
Definition: database.h:29

References gen_typed_cons(), and STATUS_NEWGEN_DOMAIN.

+ Here is the call graph for this function:

◆ make_database()

database make_database ( string  a1,
string  a2,
list  a3 
)

Definition at line 52 of file database.c.

52  {
53  return (database) gen_alloc(4*sizeof(gen_chunk), GEN_CHECK_ALLOC, database_domain, a1, a2, a3);
54 }
#define GEN_CHECK_ALLOC
Definition: genC.h:307
gen_chunk * gen_alloc(int size, int gen_check_p, int dom,...)
allocates something in newgen.
Definition: genClib.c:298

References database_domain, gen_alloc(), and GEN_CHECK_ALLOC.

+ Here is the call graph for this function:

◆ make_resource()

resource make_resource ( string  a1,
string  a2,
status  a3,
intptr_t  a4,
intptr_t  a5 
)

Definition at line 94 of file database.c.

94  {
95  return (resource) gen_alloc(6*sizeof(gen_chunk), GEN_CHECK_ALLOC, resource_domain, a1, a2, a3, a4, a5);
96 }

References gen_alloc(), GEN_CHECK_ALLOC, and resource_domain.

+ Here is the call graph for this function:

◆ make_status()

status make_status ( enum  status_utype,
void *  val 
)

Definition at line 143 of file database.c.

143  {
144  return (status) gen_alloc(3*sizeof(gen_chunk), GEN_CHECK_ALLOC, status_domain, tag, val);
145 }
int tag
TAG.
Definition: newgen_types.h:92

References gen_alloc(), GEN_CHECK_ALLOC, and status_domain.

Referenced by make_status_file(), and make_status_memory().

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

◆ make_status_file()

status make_status_file ( string  _field_)

Definition at line 149 of file database.c.

149  {
150  return make_status(is_status_file, (void*)(intptr_t) _field_);
151 }
status make_status(enum status_utype tag, void *val)
Definition: database.c:143
#define intptr_t
Definition: stdint.in.h:294

References intptr_t, is_status_file, and make_status().

+ Here is the call graph for this function:

◆ make_status_memory()

status make_status_memory ( string  _field_)

Definition at line 146 of file database.c.

146  {
147  return make_status(is_status_memory, (void*)(intptr_t) _field_);
148 }

References intptr_t, is_status_memory, and make_status().

+ Here is the call graph for this function:

◆ read_database()

database read_database ( FILE *  f)

Definition at line 49 of file database.c.

49  {
50  return (database) gen_read(f);
51 }
gen_chunk * gen_read(FILE *file)
GEN_READ reads any object from the FILE stream.
Definition: genClib.c:2323
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Definition: offsets.c:15

References f(), and gen_read().

+ Here is the call graph for this function:

◆ read_resource()

resource read_resource ( FILE *  f)

Definition at line 91 of file database.c.

91  {
92  return (resource) gen_read(f);
93 }

References f(), and gen_read().

+ Here is the call graph for this function:

◆ read_status()

status read_status ( FILE *  f)

Definition at line 133 of file database.c.

133  {
134  return (status) gen_read(f);
135 }

References f(), and gen_read().

+ Here is the call graph for this function:

◆ resource_assign_contents()

void resource_assign_contents ( resource  r,
resource  v 
)

Definition at line 77 of file database.c.

77  {
78  check_resource(r);
79  check_resource(v);
80  message_assert("defined references to domain resource",
82  memcpy(r, v, sizeof(struct _newgen_struct_resource_));
83 }
bool resource_defined_p(resource p)
Definition: database.c:71
resource check_resource(resource p)
Definition: database.c:64

References check_resource(), message_assert, and resource_defined_p().

+ Here is the call graph for this function:

◆ resource_consistent_p()

bool resource_consistent_p ( resource  p)

Definition at line 67 of file database.c.

67  {
68  check_resource(p);
69  return gen_consistent_p((gen_chunk*) p);
70 }

References check_resource(), and gen_consistent_p().

+ Here is the call graph for this function:

◆ resource_defined_p()

bool resource_defined_p ( resource  p)

Definition at line 71 of file database.c.

71  {
72  return gen_defined_p((gen_chunk*) p);
73 }

References gen_defined_p().

Referenced by resource_assign_contents().

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

◆ resource_non_recursive_free()

void resource_non_recursive_free ( resource  p)

Definition at line 84 of file database.c.

84  {
85  // should clear up contents...
86  free(p);
87 }

References free().

+ Here is the call graph for this function:

◆ status_assign_contents()

void status_assign_contents ( status  r,
status  v 
)

Definition at line 119 of file database.c.

119  {
120  check_status(r);
121  check_status(v);
122  message_assert("defined references to domain status",
124  memcpy(r, v, sizeof(struct _newgen_struct_status_));
125 }
bool status_defined_p(status p)
Definition: database.c:113
status check_status(status p)
Definition: database.c:106

References check_status(), message_assert, and status_defined_p().

+ Here is the call graph for this function:

◆ status_consistent_p()

bool status_consistent_p ( status  p)

Definition at line 109 of file database.c.

109  {
110  check_status(p);
111  return gen_consistent_p((gen_chunk*) p);
112 }

References check_status(), and gen_consistent_p().

+ Here is the call graph for this function:

◆ status_defined_p()

bool status_defined_p ( status  p)

Definition at line 113 of file database.c.

113  {
114  return gen_defined_p((gen_chunk*) p);
115 }

References gen_defined_p().

Referenced by status_assign_contents().

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

◆ status_non_recursive_free()

void status_non_recursive_free ( status  p)

Definition at line 126 of file database.c.

126  {
127  // should clear up contents...
128  free(p);
129 }

References free().

+ Here is the call graph for this function:

◆ status_tag_as_string()

string status_tag_as_string ( enum  status_utype)

Definition at line 136 of file database.c.

136  {
137  switch (tag) {
138  case is_status_memory: return "memory";
139  case is_status_file: return "file";
140  default: return string_undefined;
141  }
142 }
#define string_undefined
Definition: newgen_types.h:40

References is_status_file, is_status_memory, and string_undefined.

◆ write_database()

void write_database ( FILE *  f,
database  p 
)

Definition at line 46 of file database.c.

46  {
47  gen_write(f, (gen_chunk*) p);
48 }
void gen_write(FILE *fd, gen_chunk *obj)
GEN_WRITE writes the OBJect on the stream FD.
Definition: genClib.c:1745

References f(), and gen_write().

+ Here is the call graph for this function:

◆ write_resource()

void write_resource ( FILE *  f,
resource  p 
)

Definition at line 88 of file database.c.

88  {
89  gen_write(f, (gen_chunk*) p);
90 }

References f(), and gen_write().

+ Here is the call graph for this function:

◆ write_status()

void write_status ( FILE *  f,
status  p 
)

Definition at line 130 of file database.c.

130  {
131  gen_write(f, (gen_chunk*) p);
132 }

References f(), and gen_write().

+ Here is the call graph for this function: