diff options
author | David Berghoff <db@cvs.openbsd.org> | 2005-04-03 02:09:29 +0000 |
---|---|---|
committer | David Berghoff <db@cvs.openbsd.org> | 2005-04-03 02:09:29 +0000 |
commit | b6dc95251a8aa6c607dcb85f78ca2049dab538f7 (patch) | |
tree | aaa772418d7ccfd0a020a53d1c6d7e85f7f7a47a /usr.bin/mg/cinfo.c | |
parent | badc0ff2f722af5ded41bf6344b8e76a32e9017d (diff) |
This is a no binary change which does:
- spelling, punctuation fixes
- variable declaration lineup
- use parentheses for return and sizeof
- K&R function declarations -> ANSI
- other minor code beautification
ok henning@
Diffstat (limited to 'usr.bin/mg/cinfo.c')
-rw-r--r-- | usr.bin/mg/cinfo.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/mg/cinfo.c b/usr.bin/mg/cinfo.c index 580a38184af..d14fa4eef42 100644 --- a/usr.bin/mg/cinfo.c +++ b/usr.bin/mg/cinfo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cinfo.c,v 1.10 2002/07/01 14:33:44 vincent Exp $ */ +/* $OpenBSD: cinfo.c,v 1.11 2005/04/03 02:09:28 db Exp $ */ /* * Character class tables. @@ -93,10 +93,10 @@ char * keyname(char *cp, size_t len, int k) { const char *np; - size_t copied; + size_t copied; if (k < 0) - k = CHARMASK(k);/* sign extended char */ + k = CHARMASK(k); /* sign extended char */ switch (k) { case CCHR('@'): np = "C-SPC"; @@ -131,7 +131,7 @@ keyname(char *cp, size_t len, int k) *cp++ = ((k >> 3) & 7) + '0'; *cp++ = (k & 7) + '0'; *cp = '\0'; - return cp; + return (cp); } else if (k < ' ') { *cp++ = 'C'; *cp++ = '-'; @@ -141,10 +141,10 @@ keyname(char *cp, size_t len, int k) } *cp++ = k; *cp = '\0'; - return cp; + return (cp); } copied = strlcpy(cp, np, len); if (copied >= len) copied = len - 1; - return cp + copied; + return (cp + copied); } |