diff options
author | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1990-08-08 17:01:53 +0000 |
---|---|---|
committer | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1990-08-08 17:01:53 +0000 |
commit | 154e51a4a1b0258759b5e901183403af515a35b9 (patch) | |
tree | de56925bf09e2d98ed44c60b3386d09cd675be3d /handy.h | |
parent | ff8e2863486f651339834bc9e3e0bd49d61ff4e1 (diff) | |
download | perl-154e51a4a1b0258759b5e901183403af515a35b9.tar.gz |
perl 3.0 patch #22 patch #19, continued
See patch #19.
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Header: handy.h,v 3.0.1.1 89/11/17 15:25:55 lwall Locked $ +/* $Header: handy.h,v 3.0.1.2 90/08/09 03:48:28 lwall Locked $ * * Copyright (c) 1989, Larry Wall * @@ -6,6 +6,9 @@ * as specified in the README file that comes with the perl 3.0 kit. * * $Log: handy.h,v $ + * Revision 3.0.1.2 90/08/09 03:48:28 lwall + * patch19: various MSDOS and OS/2 patches folded in + * * Revision 3.0.1.1 89/11/17 15:25:55 lwall * patch5: some machines already define TRUE and FALSE * @@ -67,12 +70,21 @@ typedef unsigned short line_t; char *safemalloc(); char *saferealloc(); void safefree(); +#ifndef MSDOS #define New(x,v,n,t) (v = (t*)safemalloc((MEM_SIZE)((n) * sizeof(t)))) #define Newc(x,v,n,t,c) (v = (c*)safemalloc((MEM_SIZE)((n) * sizeof(t)))) #define Newz(x,v,n,t) (v = (t*)safemalloc((MEM_SIZE)((n) * sizeof(t)))), \ bzero((char*)(v), (n) * sizeof(t)) #define Renew(v,n,t) (v = (t*)saferealloc((char*)(v),(MEM_SIZE)((n)*sizeof(t)))) #define Renewc(v,n,t,c) (v = (c*)saferealloc((char*)(v),(MEM_SIZE)((n)*sizeof(t)))) +#else +#define New(x,v,n,t) (v = (t*)safemalloc(((unsigned long)(n) * sizeof(t)))) +#define Newc(x,v,n,t,c) (v = (c*)safemalloc(((unsigned long)(n) * sizeof(t)))) +#define Newz(x,v,n,t) (v = (t*)safemalloc(((unsigned long)(n) * sizeof(t)))), \ + bzero((char*)(v), (n) * sizeof(t)) +#define Renew(v,n,t) (v = (t*)saferealloc((char*)(v),((unsigned long)(n)*sizeof(t)))) +#define Renewc(v,n,t,c) (v = (c*)saferealloc((char*)(v),((unsigned long)(n)*sizeof(t)))) +#endif /* MSDOS */ #define Safefree(d) safefree((char*)d) #define Str_new(x,len) str_new(len) #else /* LEAKTEST */ |