diff options
author | Mark Peek <mp@FreeBSD.org> | 2005-04-24 19:41:08 +0000 |
---|---|---|
committer | Mark Peek <mp@FreeBSD.org> | 2005-04-24 19:41:08 +0000 |
commit | 23338178da74e9862b8abd49eef83ee891027a1e (patch) | |
tree | 6daeb0464a7bc8705c0246b7fd98e212b6beed09 /contrib/tcsh/ed.xmap.c | |
parent | b2d5d167edc56df47468e5836b8129dfd3d0369a (diff) | |
download | src-test2-23338178da74e9862b8abd49eef83ee891027a1e.tar.gz src-test2-23338178da74e9862b8abd49eef83ee891027a1e.zip |
Notes
Diffstat (limited to 'contrib/tcsh/ed.xmap.c')
-rw-r--r-- | contrib/tcsh/ed.xmap.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/contrib/tcsh/ed.xmap.c b/contrib/tcsh/ed.xmap.c index 47365d7d8d45..5d01ed6e818f 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'; |