Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

util.h File Reference

#include <unistd.h>
#include "scv/scv_config.h"
#include <stdio.h>
#include <ctype.h>

Include dependency graph for util.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define EXTERN   extern
#define ARGS(protos)   ()
#define NULLARGS   ()
#define const
#define UTIL_INLINE
#define UTIL_UNUSED
#define SIZEOF_VOID_P   4
#define SIZEOF_INT   4
#define SIZEOF_LONG   4
#define strsav   util_strsav
#define NIL(type)   ((type *) 0)
#define ALLOC(type, num)   ((type *) MMalloc((long) sizeof(type) * (long) (num)))
#define REALLOC(type, obj, num)   ((type *) MMrealloc((char *) (obj), (long) sizeof(type) * (long) (num)))
#define FREE(obj)   ((obj) ? (free((char *) (obj)), (obj) = 0) : 0)
#define VOID_OR_INT   int
#define VOID_OR_CHAR   char
#define assert(ex)
#define fail(why)
#define ABS(a)   ((a) < 0 ? -(a) : (a))
#define MAX(a, b)   ((a) > (b) ? (a) : (b))
#define MIN(a, b)   ((a) < (b) ? (a) : (b))

Typedefs

typedef int util_ptrint

Functions

FILE * popen ()
FILE ** tmpfile ()
int pclose ()
VOID_OR_INT clearerr ()
VOID_OR_INT rewind ()
VOID_OR_INT abort ()
VOID_OR_INT exit ()
VOID_OR_INT perror ()
char * sprintf ()
EXTERN VOID_OR_INT free ARGS ((void *))
VOID_OR_CHAR * malloc ()
VOID_OR_CHAR ** realloc ()
char * getenv ()
int system ()
double atof ()
char * strcpy ()
char ** strncpy ()
char *** strcat ()
char **** strncat ()
char ***** strerror ()
char * strpbrk ()
char ** strtok ()
char *** strchr ()
char **** strrchr ()
char ***** strstr ()
int strcoll ()
int strxfrm ()
int strncmp ()
int strlen ()
int strspn ()
int strcspn ()
char * memmove ()
char ** memccpy ()
char *** memchr ()
char **** memcpy ()
char ***** memset ()
int memcmp ()
int strcmp ()
EXTERN char *MMalloc ARGS ((long))
EXTERN char *MMrealloc ARGS ((char *, long))
EXTERN long util_cpu_time ARGS ((void))
EXTERN int util_getopt ARGS ((int, char **, char *))
EXTERN char *util_path_search ARGS ((char *))
EXTERN char *util_file_search ARGS ((char *, char *, char *))
EXTERN int util_pipefork ARGS ((char **, FILE **, FILE **, int *))
EXTERN void util_print_cpu_stats ARGS ((FILE *))
EXTERN char *util_print_time ARGS ((unsigned long))
EXTERN int util_save_image ARGS ((char *, char *))
EXTERN void util_restart ARGS ((char *, char *, int))

Variables

char * optarg
int optind
int opterr
EXTERN int util_optind
EXTERN char * util_optarg


Define Documentation

#define ABS      ((a) < 0 ? -(a) : (a))
 

Definition at line 232 of file util.h.

#define ALLOC type,
num       ((type *) MMalloc((long) sizeof(type) * (long) (num)))
 

Definition at line 112 of file util.h.

#define ARGS protos       ()
 

Definition at line 16 of file util.h.

#define assert ex   
 

Value:

{\
    if (! (ex)) {\
  (void) fprintf(stderr,\
      "Assertion failed: file %s, line %d\n\"%s\"\n",\
      __FILE__, __LINE__, "ex");\
  (void) fflush(stdout);\
  abort();\
    }\
}

Definition at line 198 of file util.h.

Referenced by __close_watching(), __sanitycheck_watchlists(), _scv_find_extension(), _scv_pop_constraint(), _scv_set_value(), _scv_use_constraint(), sc_process_b::add_static_event(), sc_dt::b_and_assign_(), sc_dt::b_or_assign_(), sc_dt::b_xor_assign_(), sc_event::cancel(), sc_dt::check_for_zero(), vcd_trace::compose_data_line(), sc_dt::convert_signed_2C_to_SM(), _scv_extension_rand_enum::disable_randomization(), _scv_extension_rand_N< T >::disable_randomization(), _scv_extension_rand_enum::enable_randomization(), _scv_extension_rand_N< T >::enable_randomization(), sc_phash_base::erase(), scv_expression::evaluate(), sc_ppq_base::extract_top(), _scv_random_unsigned_big::floor(), _scv_random_unsigned_ll::floor(), _scv_random_unsigned::floor(), sc_dt::from_uint(), sc_dt::fsm_move(), sc_dt::get_base_and_sign(), _scv_extension_rand_N< T >::get_constraint_data(), sc_prim_channel_registry::insert(), sc_object_manager::next_object(), sc_event::notify(), scv_shared_ptr< scv_random >::operator *(), scv_shared_ptr< scv_random >::operator->(), sc_phash_base::remove(), sc_process_b::remove_static_events(), sc_lv_resolve< W >::resolve(), sc_logic_resolve::resolve(), sc_dt::safe_set(), sc_cor_pkg::sc_cor_pkg(), sc_cor_pkg_qt::sc_cor_pkg_qt(), sc_cthread_cor_fn(), sc_defunct_process_function(), sc_watch::sc_watch(), scv_report_handler::set_log_file_name(), sc_cor_qt::stack_protect(), sc_time::to_string(), sc_thread_process::trigger_dynamic(), sc_method_process::trigger_dynamic(), sc_dt::trim(), sc_dt::trim_signed(), sc_dt::trim_unsigned(), _scv_extension_rand_N< T >::uninitialize(), scv_expression_core_signal< T >::update_signal_value(), scv_expression_core::update_signal_value(), sc_dt::vec_add(), sc_dt::vec_add_on(), sc_dt::vec_add_on2(), sc_dt::vec_add_small(), sc_dt::vec_add_small_on(), sc_dt::vec_cmp(), sc_dt::vec_complement(), sc_dt::vec_copy(), sc_dt::vec_copy_and_zero(), sc_dt::vec_div_large(), sc_dt::vec_div_small(), sc_dt::vec_find_first_nonzero(), sc_dt::vec_from_char(), sc_dt::vec_from_str(), sc_dt::vec_mul(), sc_dt::vec_mul_small(), sc_dt::vec_mul_small_on(), sc_dt::vec_rem_large(), sc_dt::vec_rem_on_small(), sc_dt::vec_rem_small(), sc_dt::vec_reverse(), sc_dt::vec_shift_left(), sc_dt::vec_shift_right(), sc_dt::vec_skip_and_cmp(), sc_dt::vec_skip_leading_zeros(), sc_dt::vec_sub(), sc_dt::vec_sub_on(), sc_dt::vec_sub_on2(), sc_dt::vec_sub_small(), sc_dt::vec_sub_small_on(), sc_dt::vec_to_char(), sc_dt::vec_zero(), and sc_lambda::~sc_lambda().

#define const
 

Definition at line 28 of file util.h.

Referenced by sc_lambda_ptr::sc_lambda_ptr(), and sc_module::sc_module().

#define EXTERN   extern
 

Definition at line 9 of file util.h.

#define fail why   
 

Value:

{\
    (void) fprintf(stderr, "Fatal error: file %s, line %d\n%s\n",\
  __FILE__, __LINE__, why);\
    (void) fflush(stdout);\
    abort();\
}

Definition at line 214 of file util.h.

#define FREE obj       ((obj) ? (free((char *) (obj)), (obj) = 0) : 0)
 

Definition at line 116 of file util.h.

#define MAX a,
     ((a) > (b) ? (a) : (b))
 

Definition at line 235 of file util.h.

#define MIN a,
     ((a) < (b) ? (a) : (b))
 

Definition at line 236 of file util.h.

#define NIL type       ((type *) 0)
 

Definition at line 80 of file util.h.

#define NULLARGS   ()
 

Definition at line 23 of file util.h.

#define REALLOC type,
obj,
num       ((type *) MMrealloc((char *) (obj), (long) sizeof(type) * (long) (num)))
 

Definition at line 114 of file util.h.

#define SIZEOF_INT   4
 

Definition at line 49 of file util.h.

#define SIZEOF_LONG   4
 

Definition at line 52 of file util.h.

#define SIZEOF_VOID_P   4
 

Definition at line 46 of file util.h.

#define strsav   util_strsav
 

Definition at line 64 of file util.h.

#define UTIL_INLINE
 

Definition at line 41 of file util.h.

#define UTIL_UNUSED
 

Definition at line 42 of file util.h.

#define VOID_OR_CHAR   char
 

Definition at line 127 of file util.h.

#define VOID_OR_INT   int
 

Definition at line 126 of file util.h.


Typedef Documentation

typedef int util_ptrint
 

Definition at line 58 of file util.h.


Function Documentation

VOID_OR_INT abort  
 

EXTERN void util_restart ARGS (char *, char *, int)   
 

EXTERN int util_save_image ARGS (char *, char *)   
 

EXTERN char* util_print_time ARGS (unsigned long)   
 

EXTERN void util_print_cpu_stats ARGS (FILE *)   
 

EXTERN int util_pipefork ARGS (char **, FILE **, FILE **, int *)   
 

EXTERN char* util_file_search ARGS (char *, char *, char *)   
 

EXTERN char *util_tilde_expand ARGS (char *)   
 

EXTERN int util_getopt ARGS (int, char **, char *)   
 

EXTERN long getSoftDataLimit ARGS (void)   
 

EXTERN char* MMrealloc ARGS (char *, long)   
 

EXTERN void MMoutOfMemory ARGS (long)   
 

EXTERN VOID_OR_INT free ARGS (void *)   
 

double atof  
 

VOID_OR_INT clearerr  
 

VOID_OR_INT exit  
 

Referenced by vcd_trace_file::vcd_trace_file(), and wif_trace_file::wif_trace_file().

char* getenv  
 

VOID_OR_CHAR* malloc  
 

char* * memccpy  
 

char* * * memchr  
 

int memcmp  
 

char* * * * memcpy  
 

Referenced by sc_pvector_base::operator=(), and sc_pvector_base::sc_pvector_base().

char* memmove  
 

char* * * * * memset  
 

Referenced by _scv_CstructMethods< T >::_scv_CstructMethods(), sc_report_handler::add_msg_type(), and sc_phash_base::rehash().

int pclose  
 

VOID_OR_INT perror  
 

FILE* popen  
 

VOID_OR_CHAR* * realloc  
 

VOID_OR_INT rewind  
 

char* sprintf  
 

Referenced by _scv_ext_util_get_name(), _scv_ext_util_get_string(), _scv_make_unique_name(), scv_debug::close_trace_file(), vcd_trace::compose_data_line(), sc_dt::sc_value_base::concat_clear_data(), sc_dt::sc_value_base::concat_get_ctrl(), sc_dt::sc_value_base::concat_get_data(), sc_dt::sc_value_base::concat_get_uint64(), sc_dt::sc_value_base::concat_length(), sc_dt::sc_value_base::concat_set(), sc_dt::convert_to_bin(), vcd_trace_file::cycle(), scv_report_handler::default_handler(), sc_dt::scfx_rep::dump(), sc_module::elaboration_done(), sc_inout_rv< W >::end_of_elaboration(), sc_in_rv< W >::end_of_elaboration(), sc_inout_resolved::end_of_elaboration(), sc_in_resolved::end_of_elaboration(), sc_name_gen::gen_unique_name(), sc_dt::get_base_and_sign(), sc_dt::is_valid_base(), sc_dt::sc_proxy< X >::lrotate(), vcd_trace_file::obtain_name(), wif_trace_file::obtain_new_index(), scv_report::operator const char *(), sc_module::operator<<(), sc_dt::sc_proxy< X >::operator<<=(), sc_dt::sc_unsigned::operator=(), sc_dt::sc_uint_base::operator=(), sc_dt::sc_signed::operator=(), sc_dt::sc_int_base::operator=(), sc_dt::sc_proxy< X >::operator>>=(), sc_dt::parse_binary_bits(), sc_dt::parse_hex_bits(), wif_trace::print_variable_declaration_line(), vcd_trace::print_variable_declaration_line(), scv_debug::record_data(), sc_semaphore::report_error(), sc_port_base::report_error(), sc_event_finder::report_error(), sc_clock::report_error(), scv_debug::resume(), sc_dt::sc_proxy< X >::rrotate(), sc_dt::sc_int_concref_invalid_length(), sc_process_base::sc_process_base(), sc_report_compose_message(), vcd_trace_file::sc_set_vcd_time_unit(), wif_trace_file::sc_set_wif_time_unit(), sc_signal_invalid_writer(), sc_dt::sc_uint_concref_invalid_length(), scv_debug::set_facility_level(), scv_debug::set_level(), scv_debug::suspend(), sc_time::to_string(), sc_dt::sc_length_param::to_string(), sc_dt::sc_fxtype_params::to_string(), sc_fifo< T >::trace(), sc_dt::vec_from_str(), sc_dt::vec_reverse(), wait(), and wif_enum_trace::write().

char* * * strcat  
 

char* * * strchr  
 

int strcmp  
 

Referenced by _scv_use_constraint(), sc_string::cmp(), scv_tr_generator_base::get_begin_exts_p(), scv_tr_generator_base::get_end_exts_p(), scv_expression_core::get_name(), sc_report_handler::mdlookup(), sc_report::register_id(), sc_strhash_cmp(), and strcmp_void().

int strcoll  
 

char* strcpy  
 

Referenced by vcd_trace::compose_data_line(), operator+(), sc_string::operator+(), sc_string::operator+=(), scv_random::print(), scv_report_handler::set_log_file_name(), _scv_expr::setStringValue(), and _scv_out_buf_t::sync().

int strcspn  
 

char* * * * * strerror  
 

int strlen  
 

Referenced by _scv_get_seed_from_name(), _scv_make_unique_name(), sc_dt::convert_to_bin(), sc_string::length(), operator+(), sc_string::operator+(), sc_string::operator+=(), sc_dt::sc_concatref::operator=(), sc_dt::parse_binary_bits(), sc_dt::parse_hex_bits(), sc_object::sc_object(), scv_report_handler::set_log_file_name(), _scv_expr::setStringValue(), vcd_trace::strip_leading_bits(), and _scv_out_buf_t::sync().

char* * * * strncat  
 

int strncmp  
 

char* * strncpy  
 

char* strpbrk  
 

char* * * * strrchr  
 

Referenced by sc_object::basename().

int strspn  
 

char* * * * * strstr  
 

char* * strtok  
 

int strxfrm  
 

int system  
 

FILE* * tmpfile  
 


Variable Documentation

char* optarg
 

Definition at line 68 of file util.h.

int opterr
 

Definition at line 69 of file util.h.

int optind
 

Definition at line 69 of file util.h.

EXTERN char* util_optarg
 

Definition at line 263 of file util.h.

EXTERN int util_optind
 

Definition at line 262 of file util.h.


Generated on Fri Jan 14 08:30:57 2005 for SystemC2.1beta11(excludingMSLib)(IncludingSCV)\nProvidedby:www.openverificationfoundation.org by doxygen1.2.18