summaryrefslogtreecommitdiffstats
path: root/lib/libedit/emacs.c
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2014-07-10 17:52:17 +0000
committerpfg <pfg@FreeBSD.org>2014-07-10 17:52:17 +0000
commitc8f08e815af7e443d5d77edc61d9c7b245a6ba4f (patch)
tree1bd597a73d609c8e10101b4aade3d982df6c7a76 /lib/libedit/emacs.c
parent95de8768c6d28f485e61df4a6e0383aa3b988c5f (diff)
downloadFreeBSD-src-c8f08e815af7e443d5d77edc61d9c7b245a6ba4f.zip
FreeBSD-src-c8f08e815af7e443d5d77edc61d9c7b245a6ba4f.tar.gz
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 MFC after: 1 week 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