/*
 *    Copyright (c) Yaron Keren 1994-1996. All rights reserved.
 */
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
long int l_427=0;
long int l_428=0;
long int l_429=0;
long int l_430=0;
long int l_431=0;
long int l_432=0;
long int l_433=0;
long int l_434=0;
long int l_435=0;
long int l_436=0;
long int l_437=0;
void memreport() {
#if defined(MEMDEBUG)
printf("\115E\115\117\122\131    d\157\165b\154e    \154\157n\147     \151nt    c\150ar c\150ar\160tr\n");
printf("a\154\154\157c\163  \0458\154d\0458\154d\0458\154d\0458\154d\0458\154d\n",l_427,l_428,l_429,
l_430,l_431);
printf("dea\154\154\157c\163\0458\154d\0458\154d\0458\154d\0458\154d\0458\154d\n",l_432,l_433,
l_434,l_435,l_436);
printf("\163\165\155 \075 \045\154d\n",l_437);
#endif
}
void l_493(void *p) {
#ifdef NDEBUG
#undef NDEBUG
#define l_494 1
#endif
int ___Out_of_memory___=(p!=NULL);
assert(  ___Out_of_memory___	);
#ifdef l_494
#undef NDEBUG
#define NDEBUG
#endif
}
double *newdouble(int size) {
double *p;
p=new double[size];
l_493(p);
#ifdef MEMDEBUG
l_427++;
l_437+=(long int)p;
#endif
return(p);
}
char *newchar(int size) {
if (size==0) size=1;
char *p;
p=new char[size];
l_493(p);
#ifdef MEMDEBUG
l_430++;
l_437+=(long int)p;
#endif
return(p);
}
char **newcharptr(int size) {
if (size==0) size=1;
char **p;
p=new char *[size];
l_493(p);
#ifdef MEMDEBUG
l_431++;
l_437+=(long int)p;
#endif
return(p);
}
int *newint(int size) {
if (size==0) size=1;
int *p;
p=new int[size];
l_493(p);
#ifdef MEMDEBUG
l_429++;
l_437+=(long int)p;
#endif
return(p);
}
long *newlong(int size) {
if (size==0) size=1;
long *p;
p=new long[size];
l_493(p);
#ifdef MEMDEBUG
l_428++;
l_437+=(long int)p;
#endif
return(p);
}
void deletedouble(double *p) {
assert(p!=NULL);
#ifdef MEMDEBUG
l_432++;
l_437-=(long int)p;
#endif
delete []p;
}
void deletechar(char *p) {
assert(p!=NULL);
#ifdef MEMDEBUG
l_435++;
l_437-=(long int)p;
#endif
delete []p;
}
void deletecharptr(char **p) {
assert(p!=NULL);
#ifdef MEMDEBUG
l_436++;
l_437-=(long int)p;
#endif
delete []p;
}
void deleteint(int *p) {
assert(p!=NULL);
#ifdef MEMDEBUG
l_434++;
l_437-=(long int)p;
#endif
delete []p;
}
void deletelong(long *p) {
assert(p!=NULL);
#ifdef MEMDEBUG
l_433++;
l_437-=(long int)p;
#endif
delete []p;
}
void copy_double(double *l_286, double *l_57, int n) {
if (n<=0) return;
if (l_286&&l_57) memcpy(l_286,l_57,n*sizeof(double));
}
void fill_double(double *l_286, int n, double val) {
double *p=l_286;
for (int i=n;i;i--) {
*p=val; p++;
}
}
void zero_double(double *l_286, int n) {
  double *p=l_286;
for (int i=n;i;i--) {
*p=0; p++;
}
}
void zero_char(char *l_286, int n) {
char *p=l_286;
for (int i=n;i;i--) {
*p='\0'; p++;
}
}
