summaryrefslogtreecommitdiffstats
path: root/contrib/tcsh/ed.xmap.c
diff options
context:
space:
mode:
authormp <mp@FreeBSD.org>2005-04-24 19:41:08 +0000
committermp <mp@FreeBSD.org>2005-04-24 19:41:08 +0000
commit94a109bd814074f290affa8f7698847719d55833 (patch)
tree6daeb0464a7bc8705c0246b7fd98e212b6beed09 /contrib/tcsh/ed.xmap.c
parentbbd1addf8f9452690ad13ce5b875ee4cc9633958 (diff)
downloadFreeBSD-src-94a109bd814074f290affa8f7698847719d55833.zip
FreeBSD-src-94a109bd814074f290affa8f7698847719d55833.tar.gz
Import of tcsh-6.14.00
Diffstat (limited to 'contrib/tcsh/ed.xmap.c')
-rw-r--r--contrib/tcsh/ed.xmap.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/contrib/tcsh/ed.xmap.c b/contrib/tcsh/ed.xmap.c
index 47365d7..5d01ed6 100644
--- a/contrib/tcsh/ed.xmap.c
+++ b/contrib/tcsh/ed.xmap.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/ed.xmap.c,v 3.25 2002/03/08 17:36:45 christos Exp $ */
+/* $Header: /src/pub/tcsh/ed.xmap.c,v 3.28 2005/01/05 18:06:43 christos Exp $ */
/*
* ed.xmap.c: This module contains the procedures for maintaining
* the extended-key map.
@@ -88,7 +88,7 @@
*/
#include "sh.h"
-RCSID("$Id: ed.xmap.c,v 3.25 2002/03/08 17:36:45 christos Exp $")
+RCSID("$Id: ed.xmap.c,v 3.28 2005/01/05 18:06:43 christos Exp $")
#include "ed.h"
#include "ed.defns.h"
@@ -592,7 +592,7 @@ printOne(key, val, ntype)
{
struct KeyFuncs *fp;
unsigned char unparsbuf[200];
- static char *fmt = "%s\n";
+ static const char *fmt = "%s\n";
xprintf("%-15S-> ", key->buf);
if (val != NULL)
@@ -675,7 +675,7 @@ unparsech(cnt, ch)
return cnt;
}
-int
+eChar
parseescape(ptr)
const Char **ptr;
{
@@ -686,7 +686,7 @@ parseescape(ptr)
if ((p[1] & CHAR) == 0) {
xprintf(CGETS(9, 8, "Something must follow: %c\n"), *p);
- return -1;
+ return CHAR_ERR;
}
if ((*p & CHAR) == '\\') {
p++;
@@ -727,7 +727,8 @@ parseescape(ptr)
case '6':
case '7':
{
- register int cnt, val, ch;
+ int cnt, val;
+ Char ch;
for (cnt = 0, val = 0; cnt < 3; cnt++) {
ch = *p++ & CHAR;
@@ -822,9 +823,8 @@ unparsestring(str, buf, sep)
*b++ = '\\';
*b++ = (unsigned char) p;
}
- else if (p == ' ' || (Isprint(p) && !Isspace(p))) {
- *b++ = (unsigned char) p;
- }
+ else if (p == ' ' || (Isprint(p) && !Isspace(p)))
+ b += one_wctomb((char *)b, p & CHAR);
else {
*b++ = '\\';
*b++ = ((p >> 6) & 7) + '0';
OpenPOWER on IntegriCloud