rename macros public and private --> PUBLIC and PRIVATE
This commit is contained in:
parent
da31886723
commit
a05b05aad5
|
|
@ -1,3 +1,7 @@
|
||||||
|
2011-05-08 Robert Larice
|
||||||
|
* xgraph/alloc.c :
|
||||||
|
rename macros public and private --> PUBLIC and PRIVATE
|
||||||
|
|
||||||
2011-05-08 Robert Larice
|
2011-05-08 Robert Larice
|
||||||
* src/xspice/cmpp/mod_yacc.y ,
|
* src/xspice/cmpp/mod_yacc.y ,
|
||||||
* src/xspice/icm/analog/multi_input_pwl/cfunc.mod :
|
* src/xspice/icm/analog/multi_input_pwl/cfunc.mod :
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,10 @@
|
||||||
* void MemChain();
|
* void MemChain();
|
||||||
*
|
*
|
||||||
* $Log$
|
* $Log$
|
||||||
* Revision 1.2 2011-04-27 18:30:17 rlar
|
* Revision 1.3 2011-05-08 08:54:21 rlar
|
||||||
|
* rename macros public and private --> PUBLIC and PRIVATE
|
||||||
|
*
|
||||||
|
* Revision 1.2 2011/04/27 18:30:17 rlar
|
||||||
* code cleanup
|
* code cleanup
|
||||||
*
|
*
|
||||||
* Revision 1.1 2004/01/25 09:00:49 pnenzi
|
* Revision 1.1 2004/01/25 09:00:49 pnenzi
|
||||||
|
|
@ -85,21 +88,21 @@ extern char *memset();
|
||||||
#define MAX(a, b) ((a) < (b) ? (b) : (a))
|
#define MAX(a, b) ((a) < (b) ? (b) : (a))
|
||||||
#endif /* MAX */
|
#endif /* MAX */
|
||||||
|
|
||||||
#ifndef private
|
#ifndef PRIVATE
|
||||||
#define private static
|
#define PRIVATE static
|
||||||
#endif /* private */
|
#endif
|
||||||
|
|
||||||
#ifndef public
|
#ifndef PUBLIC
|
||||||
#define public
|
#define PUBLIC
|
||||||
#endif /* public */
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define SIG_GOOD 0x01020304
|
#define SIG_GOOD 0x01020304
|
||||||
#define SIG_FREE 0x04030201
|
#define SIG_FREE 0x04030201
|
||||||
#define OVERHEAD (sizeof(long) + sizeof(unsigned))
|
#define OVERHEAD (sizeof(long) + sizeof(unsigned))
|
||||||
|
|
||||||
private unsigned memused = 0;
|
PRIVATE unsigned memused = 0;
|
||||||
private unsigned memalloc = 0;
|
PRIVATE unsigned memalloc = 0;
|
||||||
|
|
||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
typedef void *Ptr;
|
typedef void *Ptr;
|
||||||
|
|
@ -112,7 +115,7 @@ typedef char *Ptr;
|
||||||
/* _chaina():
|
/* _chaina():
|
||||||
* Check things for validity and allocate space
|
* Check things for validity and allocate space
|
||||||
*/
|
*/
|
||||||
private Ptr
|
PRIVATE Ptr
|
||||||
_chaina(n, routine, action, tptr)
|
_chaina(n, routine, action, tptr)
|
||||||
unsigned n;
|
unsigned n;
|
||||||
|
|
||||||
|
|
@ -157,7 +160,7 @@ Ptr tptr;
|
||||||
/* _chainc():
|
/* _chainc():
|
||||||
* Check the pointer given
|
* Check the pointer given
|
||||||
*/
|
*/
|
||||||
private unsigned
|
PRIVATE unsigned
|
||||||
_chainc(ptr, action)
|
_chainc(ptr, action)
|
||||||
char **ptr;
|
char **ptr;
|
||||||
char *action;
|
char *action;
|
||||||
|
|
@ -186,7 +189,7 @@ char *action;
|
||||||
/* Malloc():
|
/* Malloc():
|
||||||
* real alloc
|
* real alloc
|
||||||
*/
|
*/
|
||||||
public Ptr
|
PUBLIC Ptr
|
||||||
Malloc(n)
|
Malloc(n)
|
||||||
unsigned n;
|
unsigned n;
|
||||||
{
|
{
|
||||||
|
|
@ -199,7 +202,7 @@ unsigned n;
|
||||||
/* Calloc():
|
/* Calloc():
|
||||||
* real alloc
|
* real alloc
|
||||||
*/
|
*/
|
||||||
public Ptr
|
PUBLIC Ptr
|
||||||
Calloc(n, sz)
|
Calloc(n, sz)
|
||||||
unsigned n,
|
unsigned n,
|
||||||
sz;
|
sz;
|
||||||
|
|
@ -217,7 +220,7 @@ unsigned n,
|
||||||
/* Realloc():
|
/* Realloc():
|
||||||
* real alloc
|
* real alloc
|
||||||
*/
|
*/
|
||||||
public Ptr
|
PUBLIC Ptr
|
||||||
Realloc(ptr, n)
|
Realloc(ptr, n)
|
||||||
Ptr ptr;
|
Ptr ptr;
|
||||||
unsigned n;
|
unsigned n;
|
||||||
|
|
@ -234,7 +237,7 @@ unsigned n;
|
||||||
/* Free():
|
/* Free():
|
||||||
* free memory counting the number of bytes freed
|
* free memory counting the number of bytes freed
|
||||||
*/
|
*/
|
||||||
public void
|
PUBLIC void
|
||||||
Free(ptr)
|
Free(ptr)
|
||||||
Ptr ptr;
|
Ptr ptr;
|
||||||
{
|
{
|
||||||
|
|
@ -250,7 +253,7 @@ Ptr ptr;
|
||||||
/* MemChain():
|
/* MemChain():
|
||||||
* Dump the chain
|
* Dump the chain
|
||||||
*/
|
*/
|
||||||
public void
|
PUBLIC void
|
||||||
MemChain()
|
MemChain()
|
||||||
{
|
{
|
||||||
if (memused == 0 && memalloc == 0)
|
if (memused == 0 && memalloc == 0)
|
||||||
|
|
@ -267,7 +270,7 @@ MemChain()
|
||||||
/* MemStat():
|
/* MemStat():
|
||||||
* return the amount of memory in use
|
* return the amount of memory in use
|
||||||
*/
|
*/
|
||||||
public unsigned
|
PUBLIC unsigned
|
||||||
MemStat()
|
MemStat()
|
||||||
{
|
{
|
||||||
return (memused);
|
return (memused);
|
||||||
|
|
@ -277,7 +280,7 @@ MemStat()
|
||||||
/* MemPtr():
|
/* MemPtr():
|
||||||
* return the amount of memory used by the pointer
|
* return the amount of memory used by the pointer
|
||||||
*/
|
*/
|
||||||
public unsigned
|
PUBLIC unsigned
|
||||||
MemPtr(ptr)
|
MemPtr(ptr)
|
||||||
Ptr ptr;
|
Ptr ptr;
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue