25 #include "pips_config.h"
42 int c, i = 0, sign = 1;
47 if (c ==
'-') sign = -1;
202 #define STATEMENT_FUNCTION_MAP(k, v, code, _map_hash_h) \
203 { void * _map_hash_p = NULL; \
204 void * _map_k; void * _map_v; \
205 while ((_map_hash_p = \
206 hash_table_scan(_map_hash_h,_map_hash_p,&_map_k,&_map_v))) { \
207 statement k = (statement) ((gen_chunkp)_map_k)->p ; \
208 gen_chunkp v = ((gen_chunkp)_map_v)->p; \
349 while ((c = getc(
f)) && c != EOF)
bool statement_consistent_p(statement p)
struct _newgen_struct_statement_ * statement
#define STATEMENT_FUNCTION_MAP(k, v, code, _map_hash_h)
this piece of code makes low level assumptions about newgen internals.
bool pipsdbm_consistent_statement_function(gen_chunkp map)
void declarations_write(FILE *f, hash_table h)
Functions to read and write declarations resource, which is a hash table whose key and value are stri...
void free_static_control_mapping(statement_mapping map)
Modification Dec 11 1995: ne pas utiliser free_static_control car il libere des champs qui appartienn...
static int number_of_ordered_statements(hash_table h)
count the number of statements with a valid ordering.
void pipsdbm_free_statement_mapping(statement_mapping h)
hash_table declarations_read(FILE *f)
static int statement_mapping_count(statement_mapping h)
The old statement_mapping is an hash_table managed directly.
void pipsdbm_write_statement_mapping(FILE *fd, statement_mapping h)
Write a statement mapping.
gen_chunkp pipsdbm_read_statement_function(FILE *fd)
Should use a higher level pipsdbm_read_statement_mapping() to survive to XML.
void pipsdbm_write_statement_function(FILE *fd, gen_chunkp map)
the stored stuff need be based on the ordering...
char * pipsdbm_read_entities(FILE *fd)
externals.c
bool pipsdbm_check_statement_mapping(statement_mapping h)
a little bit partial, because domain are not checked.
static int lire_int(FILE *fd)
reads an int while sharing file and buffers with newgen...
hash_table pipsdbm_read_statement_mapping(FILE *fd)
Read a statement mapping.
void pipsdbm_free_entities(char *p)
char * safe_readline(FILE *file)
returns the allocated line read, whatever its length.
union gen_chunk * gen_chunkp
void gen_free(gen_chunk *obj)
version without shared_pointers.
gen_chunk * gen_alloc(int size, int gen_check_p, int dom,...)
allocates something in newgen.
int gen_read_tabulated(FILE *file, int create_p)
GEN_READ_TABULATED reads FILE to update the Gen_tabulated_ table.
int gen_consistent_p(gen_chunk *obj)
GEN_CONSISTENT_P dynamically checks the type correctness of OBJ.
int gen_free_tabulated(int domain)
free tabulated elements of this domain.
int gen_type(gen_chunk *obj)
GEN_TYPE returns the domain number for the object in argument.
gen_chunk * gen_read(FILE *file)
GEN_READ reads any object from the FILE stream.
void gen_write(FILE *fd, gen_chunk *obj)
GEN_WRITE writes the OBJect on the stream FD.
void gen_free_list(list l)
free the spine of the list
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
string statement_identification(statement)
Like external_statement_identification(), but with internal information, the hexadecimal address of t...
hash_table hash_table_make(hash_key_type key_type, size_t size)
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.
const char * dbll_current_module
the current module is expected by some load/save functions...
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_user_warning
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define pips_internal_error
#define FREE_STATEMENT_MAPPING(map)
#define STATEMENT_ORDERING_UNDEFINED
mapping.h inclusion
#define STATEMENT_MAPPING_MAP(s, v, code, h)
#define HASH_MAP(k, v, code, ht)
#define HASH_EXTEND(start, image, h, k, v)
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
hash_table set_ordering_to_statement(statement s)
To be used instead of initialize_ordering_to_statement() to make sure that the hash table ots is in s...
statement ordering_to_statement(int o)
Get the statement associated to a given ordering.
void reset_ordering_to_statement(void)
Reset the mapping from ordering to statement.
#define static_control_loops(x)
#define static_control_params(x)
#define static_control_tests(x)
#define statement_ordering(x)
#define statement_domain
newgen_sizeofexpression_domain_defined
#define entity_domain
newgen_syntax_domain_defined
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
A DOMAIN union describes the structure of a user type.
A gen_chunk is used to store every object.