projects
/
unix-history
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a648a42
)
add a realloc() call, for the C library
author
Keith Bostic
<bostic@ucbvax.Berkeley.EDU>
Tue, 31 May 1994 06:55:38 +0000
(22:55 -0800)
committer
Keith Bostic
<bostic@ucbvax.Berkeley.EDU>
Tue, 31 May 1994 06:55:38 +0000
(22:55 -0800)
SCCS-vsn: old/sh/blok.c 4.3
usr/src/old/sh/blok.c
patch
|
blob
|
blame
|
history
diff --git
a/usr/src/old/sh/blok.c
b/usr/src/old/sh/blok.c
index
2bf634b
..
930c317
100644
(file)
--- a/
usr/src/old/sh/blok.c
+++ b/
usr/src/old/sh/blok.c
@@
-1,5
+1,5
@@
#ifndef lint
#ifndef lint
-static char sccsid[] = "@(#)blok.c 4.
2
%G%";
+static char sccsid[] = "@(#)blok.c 4.
3
%G%";
#endif
#
#endif
#
@@
-113,3
+113,18
@@
chkbptr(ptr)
prn(un); prc(SP); prn(us); prc(NL);
}
#endif
prn(un); prc(SP); prn(us); prc(NL);
}
#endif
+
+void *
+realloc(cp, nbytes)
+ void *cp;
+ unsigned int nbytes;
+{
+ void *new;
+
+ new = malloc(nbytes);
+ if (cp == 0)
+ return (new);
+ bcopy(cp, new, nbytes);
+ free(cp);
+ return (new);
+}