Mercurial > emacs
changeset 20212:90f407354bdf
automatically generated from GPLed version
author | Ulrich Drepper <drepper@redhat.com> |
---|---|
date | Thu, 06 Nov 1997 00:44:44 +0000 |
parents | f722b33c682d |
children | 696d678c06e7 |
files | lib-src/getopt.c src/strftime.c |
diffstat | 2 files changed, 15 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/lib-src/getopt.c Tue Nov 04 03:28:47 1997 +0000 +++ b/lib-src/getopt.c Thu Nov 06 00:44:44 1997 +0000 @@ -331,9 +331,9 @@ nonoption_flags_len = nonoption_flags_max_len = 0; else { - memcpy (new_str, __getopt_nonoption_flags, nonoption_flags_max_len); - memset (&new_str[nonoption_flags_max_len], '\0', - top + 1 - nonoption_flags_max_len); + memset (__mempcpy (new_str, __getopt_nonoption_flags, + nonoption_flags_max_len), + '\0', top + 1 - nonoption_flags_max_len); nonoption_flags_max_len = top + 1; __getopt_nonoption_flags = new_str; } @@ -442,11 +442,8 @@ if (__getopt_nonoption_flags == NULL) nonoption_flags_max_len = -1; else - { - memcpy (__getopt_nonoption_flags, orig_str, len); - memset (&__getopt_nonoption_flags[len], '\0', - nonoption_flags_max_len - len); - } + memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), + '\0', nonoption_flags_max_len - len); } } nonoption_flags_len = nonoption_flags_max_len;
--- a/src/strftime.c Tue Nov 04 03:28:47 1997 +0000 +++ b/src/strftime.c Thu Nov 06 00:44:44 1997 +0000 @@ -91,6 +91,14 @@ # endif #endif +#ifdef _LIBC +# define MEMPCPY(d, s, n) __mempcpy (d, s, n) +#else +# ifndef HAVE_MEMPCPY +# define MEMPCPY(d, s, n) ((void *) ((char *) memcpy (d, s, n) + (n))) +# endif +#endif + #ifndef __P # if defined (__GNUC__) || (defined (__STDC__) && __STDC__) # define __P(args) args @@ -196,8 +204,7 @@ do \ { \ int _this = _len > 16 ? 16 : _len; \ - memcpy ((P), spaces, _this); \ - (P) += _this; \ + (P) = mempcpy ((P), spaces, _this); \ _len -= _this; \ } \ while (_len > 0); \ @@ -210,8 +217,7 @@ do \ { \ int _this = _len > 16 ? 16 : _len; \ - memcpy ((P), zeroes, _this); \ - (P) += _this; \ + (P) = mempcpy ((P), zeroes, _this); \ _len -= _this; \ } \ while (_len > 0); \