PR/12963:Jason Waterman: Fix signed cast problems.
This commit is contained in:
parent
6859233343
commit
93819542b3
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: chared.c,v 1.13 2001/04/13 01:04:19 lukem Exp $ */
|
||||
/* $NetBSD: chared.c,v 1.14 2001/05/17 01:02:17 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -41,7 +41,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)chared.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: chared.c,v 1.13 2001/04/13 01:04:19 lukem Exp $");
|
||||
__RCSID("$NetBSD: chared.c,v 1.14 2001/05/17 01:02:17 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint && not SCCSID */
|
||||
|
||||
@ -588,7 +588,7 @@ ch_end(EditLine *el)
|
||||
public int
|
||||
el_insertstr(EditLine *el, const char *s)
|
||||
{
|
||||
int len;
|
||||
size_t len;
|
||||
|
||||
if ((len = strlen(s)) == 0)
|
||||
return (-1);
|
||||
@ -597,7 +597,7 @@ el_insertstr(EditLine *el, const char *s)
|
||||
return (-1);
|
||||
}
|
||||
|
||||
c_insert(el, len);
|
||||
c_insert(el, (int)len);
|
||||
while (*s)
|
||||
*el->el_line.cursor++ = *s++;
|
||||
return (0);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: hist.c,v 1.8 2001/01/10 07:45:41 jdolecek Exp $ */
|
||||
/* $NetBSD: hist.c,v 1.9 2001/05/17 01:02:17 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -41,7 +41,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)hist.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: hist.c,v 1.8 2001/01/10 07:45:41 jdolecek Exp $");
|
||||
__RCSID("$NetBSD: hist.c,v 1.9 2001/05/17 01:02:17 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint && not SCCSID */
|
||||
|
||||
@ -134,7 +134,7 @@ hist_get(EditLine *el)
|
||||
return (CC_ERROR);
|
||||
}
|
||||
(void) strncpy(el->el_line.buffer, hp,
|
||||
el->el_line.limit - el->el_line.buffer);
|
||||
(size_t)(el->el_line.limit - el->el_line.buffer));
|
||||
el->el_line.lastchar = el->el_line.buffer + strlen(el->el_line.buffer);
|
||||
|
||||
if (el->el_line.lastchar > el->el_line.buffer) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: key.c,v 1.11 2001/01/23 15:55:30 jdolecek Exp $ */
|
||||
/* $NetBSD: key.c,v 1.12 2001/05/17 01:02:17 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -41,7 +41,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)key.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: key.c,v 1.11 2001/01/23 15:55:30 jdolecek Exp $");
|
||||
__RCSID("$NetBSD: key.c,v 1.12 2001/05/17 01:02:17 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint && not SCCSID */
|
||||
|
||||
@ -222,11 +222,11 @@ protected void
|
||||
key_clear(EditLine *el, el_action_t *map, char *in)
|
||||
{
|
||||
|
||||
if ((map[(unsigned char) *in] == ED_SEQUENCE_LEAD_IN) &&
|
||||
if ((map[(unsigned char)*in] == ED_SEQUENCE_LEAD_IN) &&
|
||||
((map == el->el_map.key &&
|
||||
el->el_map.alt[(unsigned char) *in] != ED_SEQUENCE_LEAD_IN) ||
|
||||
el->el_map.alt[(unsigned char)*in] != ED_SEQUENCE_LEAD_IN) ||
|
||||
(map == el->el_map.alt &&
|
||||
el->el_map.key[(unsigned char) *in] != ED_SEQUENCE_LEAD_IN)))
|
||||
el->el_map.key[(unsigned char)*in] != ED_SEQUENCE_LEAD_IN)))
|
||||
(void) key_delete(el, in);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tty.c,v 1.14 2001/01/09 17:31:04 jdolecek Exp $ */
|
||||
/* $NetBSD: tty.c,v 1.15 2001/05/17 01:02:17 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -41,7 +41,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)tty.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: tty.c,v 1.14 2001/01/09 17:31:04 jdolecek Exp $");
|
||||
__RCSID("$NetBSD: tty.c,v 1.15 2001/05/17 01:02:17 christos Exp $");
|
||||
#endif
|
||||
#endif /* not lint && not SCCSID */
|
||||
|
||||
@ -763,7 +763,7 @@ tty_bind_char(EditLine *el, int force)
|
||||
|
||||
unsigned char *t_n = el->el_tty.t_c[ED_IO];
|
||||
unsigned char *t_o = el->el_tty.t_ed.c_cc;
|
||||
char new[2], old[2];
|
||||
unsigned char new[2], old[2];
|
||||
const ttymap_t *tp;
|
||||
el_action_t *map, *alt;
|
||||
const el_action_t *dmap, *dalt;
|
||||
@ -785,16 +785,16 @@ tty_bind_char(EditLine *el, int force)
|
||||
if (new[0] == old[0] && !force)
|
||||
continue;
|
||||
/* Put the old default binding back, and set the new binding */
|
||||
key_clear(el, map, old);
|
||||
map[(int) old[0]] = dmap[(int) old[0]];
|
||||
key_clear(el, map, new);
|
||||
key_clear(el, map, (char *)old);
|
||||
map[old[0]] = dmap[old[0]];
|
||||
key_clear(el, map, (char *)new);
|
||||
/* MAP_VI == 1, MAP_EMACS == 0... */
|
||||
map[(int) new[0]] = tp->bind[(int) el->el_map.type];
|
||||
map[new[0]] = tp->bind[el->el_map.type];
|
||||
if (dalt) {
|
||||
key_clear(el, alt, old);
|
||||
alt[(int) old[0]] = dalt[(int) old[0]];
|
||||
key_clear(el, alt, new);
|
||||
alt[(int) new[0]] = tp->bind[(int) el->el_map.type + 1];
|
||||
key_clear(el, alt, (char *)old);
|
||||
alt[old[0]] = dalt[old[0]];
|
||||
key_clear(el, alt, (char *)new);
|
||||
alt[new[0]] = tp->bind[el->el_map.type + 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user