diff options
Diffstat (limited to 'usr.bin/vi/mem.h')
-rw-r--r-- | usr.bin/vi/mem.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.bin/vi/mem.h b/usr.bin/vi/mem.h index 0f8fac4b8f39..f604cbd0aeed 100644 --- a/usr.bin/vi/mem.h +++ b/usr.bin/vi/mem.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1993 + * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)mem.h 8.2 (Berkeley) 12/19/93 + * @(#)mem.h 8.5 (Berkeley) 3/16/94 */ /* Increase the size of a malloc'd buffer. Two versions, one that @@ -163,4 +163,11 @@ msgq(sp, M_SYSERR, NULL); \ } +/* + * Versions of memmove(3) and memset(3) that use the size of the + * initial pointer to figure out how much memory to manipulate. + */ +#define MEMMOVE(p, t, len) memmove(p, t, (len) * sizeof(*(p))) +#define MEMSET(p, value, len) memset(p, value, (len) * sizeof(*(p))) + int binc __P((SCR *, void *, size_t *, size_t)); |