zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <clint@zsh.org>
To: Peter Stephenson <pws@csr.com>
Cc: Zsh hackers list <zsh-workers@sunsite.dk>
Subject: Re: PATCH: zle_params.c
Date: Wed, 26 Jan 2005 13:35:53 -0500	[thread overview]
Message-ID: <20050126183553.GA8100@scowler.net> (raw)
In-Reply-To: <200501261806.j0QI6Q2d021854@news01.csr.com>

> broken.  It also fixes a typo in zle_params.c.

Oops.

> -    memmove(zleline + len, zleline + zlecs, zlell - zlecs);
> -    memcpy(zleline, y, len);
> +    memmove((char *)(zleline + len), (char *)(zleline + zlecs),
> +	    (zlell - zlecs) * ZLE_CHAR_SIZE);
> +    ZS_memcpy(zleline, y, len);

Hmm.  For the sake of consistency..

Index: Src/system.h
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/system.h,v
retrieving revision 1.25
diff -u -r1.25 system.h
--- Src/system.h	26 Jan 2005 18:12:18 -0000	1.25
+++ Src/system.h	26 Jan 2005 18:34:04 -0000
@@ -727,6 +727,7 @@
 #define ZLETAB	L'\t'
 #define ZLENULSTR	L""
 #define ZS_memcpy wmemcpy
+#define ZS_memmove wmemmove
 #define ZC_icntrl iswcntrl
 #else
 typedef int ZLE_CHAR_T;
@@ -738,5 +739,6 @@
 #define ZLETAB	'\t'
 #define ZLENULSTR	""
 #define ZS_memcpy memcpy
+#define ZS_memmove memmove
 #define ZC_icntrl icntrl
 #endif
Index: Src/Zle/zle_params.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_params.c,v
retrieving revision 1.22
diff -u -r1.22 zle_params.c
--- Src/Zle/zle_params.c	26 Jan 2005 18:12:18 -0000	1.22
+++ Src/Zle/zle_params.c	26 Jan 2005 18:34:04 -0000
@@ -242,8 +242,7 @@
     else
 	y = ZLENULSTR, len = 0;
     sizeline(zlell - zlecs + len);
-    memmove((char *)(zleline + len), (char *)(zleline + zlecs),
-	    (zlell - zlecs) * ZLE_CHAR_SIZE);
+    ZS_memmove(zleline + len, zleline + zlecs, zlell - zlecs);
     ZS_memcpy(zleline, y, len);
     zlell = zlell - zlecs + len;
     zlecs = len;


  reply	other threads:[~2005-01-26 18:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-26 18:06 Peter Stephenson
2005-01-26 18:35 ` Clint Adams [this message]
2005-01-29  3:47 ` UTF-8 input [was Re: PATCH: zle_params.c] Clint Adams
2005-01-30  1:07   ` Peter Stephenson
2005-01-30  6:35     ` Bart Schaefer
2005-01-31 11:46       ` Peter Stephenson
2005-01-31 16:18         ` Bart Schaefer
2005-01-31 17:01           ` Peter Stephenson
2005-01-31 18:29             ` Bart Schaefer
2005-02-01 10:37               ` Peter Stephenson
2005-02-10 14:22       ` Peter Stephenson
2005-02-10 14:51         ` Bart Schaefer
2005-02-10 15:06           ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050126183553.GA8100@scowler.net \
    --to=clint@zsh.org \
    --cc=pws@csr.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).