diff options
| author | christos <christos@NetBSD.org> | 2011-09-08 01:18:44 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2011-09-08 01:18:44 +0000 |
| commit | 329f623193bb778ccdd26c6dd2fe2c0759f2bb23 (patch) | |
| tree | 86b6a97c1a04e6e0ba63d9e2955c69bd9fdc1ab7 /usr.bin/tr | |
| parent | d66d0b3058f86b54f9f1cc4691385ef55f128531 (diff) | |
a little more KNF, plus add \e (from the previous commit)
Diffstat (limited to 'usr.bin/tr')
| -rw-r--r-- | usr.bin/tr/str.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/usr.bin/tr/str.c b/usr.bin/tr/str.c index d31067fbb56..d902f1dd892 100644 --- a/usr.bin/tr/str.c +++ b/usr.bin/tr/str.c @@ -1,4 +1,4 @@ -/* $NetBSD: str.c,v 1.16 2011/09/08 01:18:05 christos Exp $ */ +/* $NetBSD: str.c,v 1.17 2011/09/08 01:18:44 christos Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)str.c 8.2 (Berkeley) 4/28/95"; #endif -__RCSID("$NetBSD: str.c,v 1.16 2011/09/08 01:18:05 christos Exp $"); +__RCSID("$NetBSD: str.c,v 1.17 2011/09/08 01:18:44 christos Exp $"); #endif /* not lint */ #include <sys/types.h> @@ -297,26 +297,26 @@ backslash(STR *s) if (ch != '\0') ++s->str; switch (ch) { - case 'a': /* escape characters */ - return '\7'; - case 'b': - return '\b'; - case 'e': - return '\033'; - case 'f': - return '\f'; - case 'n': - return '\n'; - case 'r': - return '\r'; - case 't': - return '\t'; - case 'v': - return '\13'; - case '\0': /* \" -> \ */ - s->state = EOS; - return '\\'; - default: /* \x" -> x */ - return ch; + case 'a': /* escape characters */ + return '\7'; + case 'b': + return '\b'; + case 'e': + return '\033'; + case 'f': + return '\f'; + case 'n': + return '\n'; + case 'r': + return '\r'; + case 't': + return '\t'; + case 'v': + return '\13'; + case '\0': /* \" -> \ */ + s->state = EOS; + return '\\'; + default: /* \x" -> x */ + return ch; } } |
