static char *sccsid
= "@(#)tr.c 4.1 (Berkeley) %G%";
/* tr - transliterate data stream */
struct string
{ int last
, max
; char *p
; } string1
, string2
;
string1
.last
= string2
.last
= 0;
string1
.max
= string2
.max
= 0;
string1
.p
= string2
.p
= "";
if(*argv
[0]=='-'&&argv
[0][1]!=0) {
if(argc
>0) string1
.p
= argv
[0];
if(argc
>1) string2
.p
= argv
[1];
while(c
= next(&string1
))
if(vect
[i
]==0) vect
[j
++] = i
;
code
[c
&0377] = dflag
?1:d
;
while(d
= next(&string2
))
if(code
[i
]==0) code
[i
] = i
;
else if(dflag
) code
[i
] = 0;
while((c
=getc(stdin
)) != EOF
) {
if(c
= code
[c
&0377]&0377)
if(!sflag
|| c
!=save
|| !squeez
[c
&0377])
if(s
->last
&& *s
->p
=='-') {
return(s
->last
= nextc(s
));
while(i
<3 && (c
= *s
->p
)>='0' && c
<='7') {