projects
/
unix-history
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c53bde9
)
have to increment on octal string; bug case was fo tr '\003' '\002',
author
Keith Bostic
<bostic@ucbvax.Berkeley.EDU>
Fri, 22 Nov 1991 04:15:26 +0000
(20:15 -0800)
committer
Keith Bostic
<bostic@ucbvax.Berkeley.EDU>
Fri, 22 Nov 1991 04:15:26 +0000
(20:15 -0800)
occurrences of '3' in the string would get changed to '2'
SCCS-vsn: usr.bin/tr/str.c 5.4
usr/src/usr.bin/tr/str.c
patch
|
blob
|
blame
|
history
diff --git
a/usr/src/usr.bin/tr/str.c
b/usr/src/usr.bin/tr/str.c
index
8b3e2c3
..
d9350dd
100644
(file)
--- a/
usr/src/usr.bin/tr/str.c
+++ b/
usr/src/usr.bin/tr/str.c
@@
-6,7
+6,7
@@
*/
#ifndef lint
*/
#ifndef lint
-static char sccsid[] = "@(#)str.c 5.
3
(Berkeley) %G%";
+static char sccsid[] = "@(#)str.c 5.
4
(Berkeley) %G%";
#endif /* not lint */
#include <sys/cdefs.h>
#endif /* not lint */
#include <sys/cdefs.h>
@@
-286,9
+286,9
@@
backslash(s)
if (++cnt == 3)
break;
}
if (++cnt == 3)
break;
}
+ ++s->str;
if (cnt)
return (val);
if (cnt)
return (val);
- ++s->str;
switch (ch) {
case 'a': /* escape characters */
return ('\7');
switch (ch) {
case 'a': /* escape characters */
return ('\7');