summaryrefslogtreecommitdiffstats
path: root/lib/libedit/emacs.c
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2014-07-17 02:14:25 +0000
committerpfg <pfg@FreeBSD.org>2014-07-17 02:14:25 +0000
commit30eedb40f8116d0b9e1474448737253ee214d44a (patch)
treef9a2b5d76dcd431fca9f52c6c575514897497474 /lib/libedit/emacs.c
parent082dc1af3f2b61b464dcf541f07a5ee1969edbb2 (diff)
downloadFreeBSD-src-30eedb40f8116d0b9e1474448737253ee214d44a.zip
FreeBSD-src-30eedb40f8116d0b9e1474448737253ee214d44a.tar.gz
MFC r268502:
Sync some (mostly cosmetical) changes from NetBSD Makefile,v 1.37 tc1.c v 1.3 Rename TEST/test.c tc1.c common.c,v 1.23 pass lint on _LP64. emacs.c,v 1.22 pass lint on _LP64. filecomplete.h,v 1.8 mv NetBSD ID back from 1.9 as we don't have the widecharacter support. prompt.c,v 1.14 prompt.h,v 1.9 term.h,v 1.20 read.h,v 1.6 Update NetBSD version strings sys.h,v 1.12 Misc sun stuff. tty.c 1.31 handle EINTR in the termios operations Allow a single process to control multiple ttys (for pthreads using _REENTRANT) using multiple EditLine objects. pass lint on _LP64. Don't depend on side effects inside an assert Obtained from: NetBSD
Diffstat (limited to 'lib/libedit/emacs.c')
-rw-r--r--lib/libedit/emacs.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/libedit/emacs.c b/lib/libedit/emacs.c
index a285b1c..edcc84b 100644
--- a/lib/libedit/emacs.c
+++ b/lib/libedit/emacs.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $NetBSD: emacs.c,v 1.21 2006/03/06 21:11:56 christos Exp $
+ * $NetBSD: emacs.c,v 1.22 2009/02/15 21:55:23 christos Exp $
*/
#if !defined(lint) && !defined(SCCSID)
@@ -101,7 +101,7 @@ em_delete_next_word(EditLine *el, int c __unused)
*kp++ = *p;
el->el_chared.c_kill.last = kp;
- c_delafter(el, cp - el->el_line.cursor); /* delete after dot */
+ c_delafter(el, (int)(cp - el->el_line.cursor)); /* delete after dot */
if (el->el_line.cursor > el->el_line.lastchar)
el->el_line.cursor = el->el_line.lastchar;
/* bounds check */
@@ -131,7 +131,8 @@ em_yank(EditLine *el, int c __unused)
cp = el->el_line.cursor;
/* open the space, */
- c_insert(el, el->el_chared.c_kill.last - el->el_chared.c_kill.buf);
+ c_insert(el,
+ (int)(el->el_chared.c_kill.last - el->el_chared.c_kill.buf));
/* copy the chars */
for (kp = el->el_chared.c_kill.buf; kp < el->el_chared.c_kill.last; kp++)
*cp++ = *kp;
@@ -185,14 +186,14 @@ em_kill_region(EditLine *el, int c __unused)
while (cp < el->el_chared.c_kill.mark)
*kp++ = *cp++; /* copy it */
el->el_chared.c_kill.last = kp;
- c_delafter(el, cp - el->el_line.cursor);
+ c_delafter(el, (int)(cp - el->el_line.cursor));
} else { /* mark is before cursor */
cp = el->el_chared.c_kill.mark;
kp = el->el_chared.c_kill.buf;
while (cp < el->el_line.cursor)
*kp++ = *cp++; /* copy it */
el->el_chared.c_kill.last = kp;
- c_delbefore(el, cp - el->el_chared.c_kill.mark);
+ c_delbefore(el, (int)(cp - el->el_chared.c_kill.mark));
el->el_line.cursor = el->el_chared.c_kill.mark;
}
return (CC_REFRESH);
@@ -446,7 +447,7 @@ em_copy_prev_word(EditLine *el, int c __unused)
cp = c__prev_word(el->el_line.cursor, el->el_line.buffer,
el->el_state.argument, ce__isword);
- c_insert(el, oldc - cp);
+ c_insert(el, (int)(oldc - cp));
for (dp = oldc; cp < oldc && dp < el->el_line.lastchar; cp++)
*dp++ = *cp;
OpenPOWER on IntegriCloud