projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added at to Makefile
[unix-history]
/
usr.bin
/
tr
/
str.c
diff --git
a/usr.bin/tr/str.c
b/usr.bin/tr/str.c
index
71a90dc
..
e81df33
100644
(file)
--- a/
usr.bin/tr/str.c
+++ b/
usr.bin/tr/str.c
@@
-145,7
+145,7
@@
bracket(s)
int isalnum __P((int)),
isalpha __P((int)),
int isalnum __P((int)),
isalpha __P((int)),
- isblank __P((int)),
+/* isblank __P((int)), until 4.4 */
isspace __P((int)),
iscntrl __P((int)),
isdigit __P((int)),
isspace __P((int)),
iscntrl __P((int)),
isdigit __P((int)),
@@
-156,6
+156,15
@@
int isalnum __P((int)),
isupper __P((int)),
isxdigit __P((int));
isupper __P((int)),
isxdigit __P((int));
+
+static int isblank(x) /* until 4.4 */
+ int x;
+{
+ if ((x == ' ') || (x== '\t')) return 1;
+ return 0;
+}
+
+
typedef struct {
char *name;
int (*func) __P((int));
typedef struct {
char *name;
int (*func) __P((int));
@@
-241,7
+250,7
@@
genrange(s)
char *savestart;
savestart = s->str;
char *savestart;
savestart = s->str;
- stopval = *++s->str == '\\' ? backslash(s) : *s->str;
+ stopval = *++s->str == '\\' ? backslash(s) : *s->str
++
;
if (stopval < s->lastch) {
s->str = savestart;
return (0);
if (stopval < s->lastch) {
s->str = savestart;
return (0);