aboutsummaryrefslogtreecommitdiff
path: root/sys/memio/realloc.x
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-07-08 20:46:52 -0400
commitfa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch)
treebdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/memio/realloc.x
downloadiraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz
Initial commit
Diffstat (limited to 'sys/memio/realloc.x')
-rw-r--r--sys/memio/realloc.x22
1 files changed, 22 insertions, 0 deletions
diff --git a/sys/memio/realloc.x b/sys/memio/realloc.x
new file mode 100644
index 00000000..40229b8f
--- /dev/null
+++ b/sys/memio/realloc.x
@@ -0,0 +1,22 @@
+# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
+
+include <syserr.h>
+
+# REALLOC -- Change the size of a previously allocated buffer, moving the
+# buffer if necessary. If there is no old buffer (NULL pointer) simply
+# allocate a new buffer.
+
+procedure realloc (ubufp, nelems, dtype)
+
+pointer ubufp # buffer to be reallocated
+int nelems # new size of buffer
+int dtype # buffer datatype
+
+int krealloc()
+
+begin
+ if (krealloc (ubufp, nelems, dtype) == ERR) {
+ ubufp = NULL
+ call syserr (SYS_MFULL)
+ }
+end