diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2007-09-30 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2007-09-30 08:01:00 -0700 |
commit | e54d9691616b9a0326e2fdb3156bb4eeb8abfcd7 (patch) | |
tree | de3ffe87c3e17950351e3b7d97fa18318bd5ea9a /src/misc/util | |
parent | 7d7e60f2dc84393cd4c5db22d2eaf7b1fb1a79b2 (diff) | |
download | abc-e54d9691616b9a0326e2fdb3156bb4eeb8abfcd7.tar.gz abc-e54d9691616b9a0326e2fdb3156bb4eeb8abfcd7.tar.bz2 abc-e54d9691616b9a0326e2fdb3156bb4eeb8abfcd7.zip |
Version abc70930
Diffstat (limited to 'src/misc/util')
-rw-r--r-- | src/misc/util/leaks.h | 30 | ||||
-rw-r--r-- | src/misc/util/module.make | 1 | ||||
-rw-r--r-- | src/misc/util/stdlib_hack.h | 4 | ||||
-rw-r--r-- | src/misc/util/util_hack.h | 95 |
4 files changed, 0 insertions, 130 deletions
diff --git a/src/misc/util/leaks.h b/src/misc/util/leaks.h deleted file mode 100644 index 1a32062a..00000000 --- a/src/misc/util/leaks.h +++ /dev/null @@ -1,30 +0,0 @@ -////////////////////////////////////////////////////////////////////////// -// This file is used to detect memory leaks using Visual Studio 6.0 -// The idea comes from this page: http://www.michaelmoser.org/memory.htm -// In addition to this file, it required the presence of "stdlib_hack.h" -////////////////////////////////////////////////////////////////////////// - -#ifndef __LEAKS_H__ -#define __LEAKS_H__ - -#ifdef _DEBUG -#define _CRTDBG_MAP_ALLOC // include Microsoft memory leak detection procedures -//#define _INC_MALLOC // exclude standard memory alloc procedures - -#define malloc(s) _malloc_dbg(s, _NORMAL_BLOCK, __FILE__, __LINE__) -#define calloc(c, s) _calloc_dbg(c, s, _NORMAL_BLOCK, __FILE__, __LINE__) -#define realloc(p, s) _realloc_dbg(p, s, _NORMAL_BLOCK, __FILE__, __LINE__) -//#define _expand(p, s) _expand_dbg(p, s, _NORMAL_BLOCK, __FILE__, __LINE__) -//#define free(p) _free_dbg(p, _NORMAL_BLOCK) -//#define _msize(p) _msize_dbg(p, _NORMAL_BLOCK) - -//#include <stdlib.h> -#include <stdlib_hack.h> -#include <crtdbg.h> -#endif - -#endif - -////////////////////////////////////// - - diff --git a/src/misc/util/module.make b/src/misc/util/module.make deleted file mode 100644 index d6d908e7..00000000 --- a/src/misc/util/module.make +++ /dev/null @@ -1 +0,0 @@ -SRC += diff --git a/src/misc/util/stdlib_hack.h b/src/misc/util/stdlib_hack.h deleted file mode 100644 index 2ddf73d1..00000000 --- a/src/misc/util/stdlib_hack.h +++ /dev/null @@ -1,4 +0,0 @@ - -#include <stdlib.h> - - diff --git a/src/misc/util/util_hack.h b/src/misc/util/util_hack.h deleted file mode 100644 index 71c77321..00000000 --- a/src/misc/util/util_hack.h +++ /dev/null @@ -1,95 +0,0 @@ -/**CFile**************************************************************** - - FileName [util_hack.h] - - SystemName [ABC: Logic synthesis and verification system.] - - PackageName [This file is used to simulate the presence of "util.h".] - - Synopsis [External declarations.] - - Author [Alan Mishchenko] - - Affiliation [UC Berkeley] - - Date [Ver. 1.0. Started - June 20, 2005.] - - Revision [$Id: util_hack.h,v 1.00 2005/06/20 00:00:00 alanmi Exp $] - -***********************************************************************/ - -#ifndef __UTIL_HACK_H__ -#define __UTIL_HACK_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <assert.h> -#include <time.h> -#include <math.h> - -#define EXTERN extern -#define NIL(type) ((type *) 0) -#define random rand -#define srandom srand - -#define util_cpu_time Extra_CpuTime -#define getSoftDataLimit Extra_GetSoftDataLimit -#define util_getopt_reset Extra_UtilGetoptReset -#define util_getopt Extra_UtilGetopt -#define util_print_time Extra_UtilPrintTime -#define util_strsav Extra_UtilStrsav -#define util_tilde_expand Extra_UtilTildeExpand -#define util_file_search Extra_UtilFileSearch -#define MMoutOfMemory Extra_UtilMMoutOfMemory - -#define util_optarg globalUtilOptarg -#define util_optind globalUtilOptind - -#ifndef ARGS -# ifdef __STDC__ -# define ARGS(args) args -# else -# define ARGS(args) () -# endif -#endif - -#ifndef ABS -# define ABS(a) ((a) < 0 ? -(a) : (a)) -#endif - -#ifndef MAX -# define MAX(a,b) ((a) > (b) ? (a) : (b)) -#endif - -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - -#define ALLOC(type, num) ((type *) malloc(sizeof(type) * (num))) -#define FREE(obj) ((obj) ? (free((char *) (obj)), (obj) = 0) : 0) -#define REALLOC(type, obj, num) \ - ((obj) ? ((type *) realloc((char *)(obj), sizeof(type) * (num))) : \ - ((type *) malloc(sizeof(type) * (num)))) - -extern long Extra_CpuTime(); -extern int Extra_GetSoftDataLimit(); -extern void Extra_UtilGetoptReset(); -extern int Extra_UtilGetopt( int argc, char *argv[], char *optstring ); -extern char * Extra_UtilPrintTime( long t ); -extern char * Extra_UtilStrsav( char *s ); -extern char * Extra_UtilTildeExpand( char *fname ); -extern char * Extra_UtilFileSearch( char *file, char *path, char *mode ); - -extern char * globalUtilOptarg; -extern int globalUtilOptind; - -#ifdef __cplusplus -} -#endif - -#endif |