|
VPR-7.0
|
#include <stdio.h>#include <stdlib.h>#include <math.h>#include "TIO_PrintHandlerExtern.h"
Include dependency graph for util.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | s_linked_vptr |
| struct | s_linked_int |
| struct | s_ivec |
| struct | s_chunk |
Macros | |
| #define | INP |
| #define | OUTP |
| #define | INOUTP |
| #define | BUFSIZE 4096 /* Maximum line length for various parsing proc. */ |
| #define | nint(a) ((int) floor (a + 0.5)) |
| #define | ERRTAG "ERROR:\t" |
| #define | WARNTAG "WARNING:\t" |
Typedefs | |
| typedef struct s_linked_vptr | t_linked_vptr |
| typedef struct s_linked_int | t_linked_int |
| typedef struct s_ivec | t_ivec |
| typedef struct s_chunk | t_chunk |
| typedef unsigned char(* | messagelogger )(TIO_MessageMode_t messageMode, char *pszMessage,...) |
Enumerations | |
| enum | boolean { FALSE, TRUE } |
Functions | |
| int | limit_value (int cur, int max, const char *name) |
| void * | my_malloc (size_t size) |
| void * | my_calloc (size_t nelem, size_t size) |
| void * | my_realloc (void *ptr, size_t size) |
| void * | my_chunk_malloc (size_t size, t_chunk *chunk_info) |
| void | free_chunk_memory (t_chunk *chunk_info) |
| void | free_ivec_vector (struct s_ivec *ivec_vector, int nrmin, int nrmax) |
| void | free_ivec_matrix (struct s_ivec **ivec_matrix, int nrmin, int nrmax, int ncmin, int ncmax) |
| void | free_ivec_matrix3 (struct s_ivec ***ivec_matrix3, int nrmin, int nrmax, int ncmin, int ncmax, int ndmin, int ndmax) |
| void ** | alloc_matrix (int nrmin, int nrmax, int ncmin, int ncmax, size_t elsize) |
| void *** | alloc_matrix3 (int nrmin, int nrmax, int ncmin, int ncmax, int ndmin, int ndmax, size_t elsize) |
| void **** | alloc_matrix4 (int nrmin, int nrmax, int ncmin, int ncmax, int ndmin, int ndmax, int nemin, int nemax, size_t elsize) |
| void | free_matrix (void *vptr, int nrmin, int nrmax, int ncmin, size_t elsize) |
| void | free_matrix3 (void *vptr, int nrmin, int nrmax, int ncmin, int ncmax, int ndmin, size_t elsize) |
| void | free_matrix4 (void *vptr, int nrmin, int nrmax, int ncmin, int ncmax, int ndmin, int ndmax, int nemin, size_t elsize) |
| void | print_int_matrix3 (int ***vptr, int nrmin, int nrmax, int ncmin, int ncmax, int ndmin, int ndmax, char *file) |
| struct s_linked_vptr * | insert_in_vptr_list (struct s_linked_vptr *head, void *vptr_to_add) |
| struct s_linked_vptr * | delete_in_vptr_list (struct s_linked_vptr *head) |
| t_linked_int * | insert_in_int_list (t_linked_int *head, int data, t_linked_int **free_list_head_ptr) |
| void | free_int_list (t_linked_int **int_list_head_ptr) |
| void | alloc_ivector_and_copy_int_list (t_linked_int **list_head_ptr, int num_items, struct s_ivec *ivec, t_linked_int **free_list_head_ptr) |
| int | my_atoi (const char *str) |
| char * | my_strdup (const char *str) |
| char * | my_strncpy (char *dest, const char *src, size_t size) |
| char * | my_strtok (char *ptr, const char *tokens, FILE *fp, char *buf) |
| FILE * | my_fopen (const char *fname, const char *flag, int prompt) |
| char * | my_fgets (char *buf, int max_size, FILE *fp) |
| boolean | file_exists (const char *filename) |
| void | my_srandom (int seed) |
| int | my_irand (int imax) |
| float | my_frand (void) |
| int | ipow (int base, int exp) |
Variables | |
| int | file_line_number |
| char * | out_file_prefix |
| messagelogger | vpr_printf |
| #define BUFSIZE 4096 /* Maximum line length for various parsing proc. */ |
| typedef unsigned char(* messagelogger)(TIO_MessageMode_t messageMode, char *pszMessage,...) |
| typedef struct s_linked_int t_linked_int |
| typedef struct s_linked_vptr t_linked_vptr |
| enum boolean |
| void alloc_ivector_and_copy_int_list | ( | t_linked_int ** | list_head_ptr, |
| int | num_items, | ||
| struct s_ivec * | ivec, | ||
| t_linked_int ** | free_list_head_ptr | ||
| ) |
| void** alloc_matrix | ( | int | nrmin, |
| int | nrmax, | ||
| int | ncmin, | ||
| int | ncmax, | ||
| size_t | elsize | ||
| ) |
| void*** alloc_matrix3 | ( | int | nrmin, |
| int | nrmax, | ||
| int | ncmin, | ||
| int | ncmax, | ||
| int | ndmin, | ||
| int | ndmax, | ||
| size_t | elsize | ||
| ) |
| void**** alloc_matrix4 | ( | int | nrmin, |
| int | nrmax, | ||
| int | ncmin, | ||
| int | ncmax, | ||
| int | ndmin, | ||
| int | ndmax, | ||
| int | nemin, | ||
| int | nemax, | ||
| size_t | elsize | ||
| ) |
| struct s_linked_vptr* delete_in_vptr_list | ( | struct s_linked_vptr * | head | ) |
| boolean file_exists | ( | const char * | filename | ) |
| void free_chunk_memory | ( | t_chunk * | chunk_info | ) |
| void free_int_list | ( | t_linked_int ** | int_list_head_ptr | ) |
| void free_ivec_matrix | ( | struct s_ivec ** | ivec_matrix, |
| int | nrmin, | ||
| int | nrmax, | ||
| int | ncmin, | ||
| int | ncmax | ||
| ) |
Definition at line 511 of file util.c.
Here is the call graph for this function:| void free_ivec_matrix3 | ( | struct s_ivec *** | ivec_matrix3, |
| int | nrmin, | ||
| int | nrmax, | ||
| int | ncmin, | ||
| int | ncmax, | ||
| int | ndmin, | ||
| int | ndmax | ||
| ) |
Definition at line 529 of file util.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void free_ivec_vector | ( | struct s_ivec * | ivec_vector, |
| int | nrmin, | ||
| int | nrmax | ||
| ) |
| void free_matrix | ( | void * | vptr, |
| int | nrmin, | ||
| int | nrmax, | ||
| int | ncmin, | ||
| size_t | elsize | ||
| ) |
| void free_matrix3 | ( | void * | vptr, |
| int | nrmin, | ||
| int | nrmax, | ||
| int | ncmin, | ||
| int | ncmax, | ||
| int | ndmin, | ||
| size_t | elsize | ||
| ) |
| void free_matrix4 | ( | void * | vptr, |
| int | nrmin, | ||
| int | nrmax, | ||
| int | ncmin, | ||
| int | ncmax, | ||
| int | ndmin, | ||
| int | ndmax, | ||
| int | nemin, | ||
| size_t | elsize | ||
| ) |
| t_linked_int* insert_in_int_list | ( | t_linked_int * | head, |
| int | data, | ||
| t_linked_int ** | free_list_head_ptr | ||
| ) |
| struct s_linked_vptr* insert_in_vptr_list | ( | struct s_linked_vptr * | head, |
| void * | vptr_to_add | ||
| ) |
| int ipow | ( | int | base, |
| int | exp | ||
| ) |
| int my_atoi | ( | const char * | str | ) |
| void* my_chunk_malloc | ( | size_t | size, |
| t_chunk * | chunk_info | ||
| ) |
Definition at line 184 of file util.c.
Here is the call graph for this function:
Here is the caller graph for this function:| char* my_fgets | ( | char * | buf, |
| int | max_size, | ||
| FILE * | fp | ||
| ) |
| FILE* my_fopen | ( | const char * | fname, |
| const char * | flag, | ||
| int | prompt | ||
| ) |
| float my_frand | ( | void | ) |
| int my_irand | ( | int | imax | ) |
| void* my_malloc | ( | size_t | size | ) |
| void my_srandom | ( | int | seed | ) |
| char* my_strdup | ( | const char * | str | ) |
| char* my_strncpy | ( | char * | dest, |
| const char * | src, | ||
| size_t | size | ||
| ) |
| char* my_strtok | ( | char * | ptr, |
| const char * | tokens, | ||
| FILE * | fp, | ||
| char * | buf | ||
| ) |
| void print_int_matrix3 | ( | int *** | vptr, |
| int | nrmin, | ||
| int | nrmax, | ||
| int | ncmin, | ||
| int | ncmax, | ||
| int | ndmin, | ||
| int | ndmax, | ||
| char * | file | ||
| ) |
| messagelogger vpr_printf |