1*30488Slepreau static char Sccsid[] = "@(#)trnslat.c	1.2	02/15/87";
230481Slepreau /*
330481Slepreau 	Copy `str' to `result' replacing any character found
430481Slepreau 	in both `str' and `old' with the corresponding character from `new'.
530481Slepreau 	Return `result'.
630481Slepreau */
730481Slepreau 
trnslat(str,old,new,result)830481Slepreau char *trnslat(str,old,new,result)
930481Slepreau register char *str;
1030481Slepreau char *old, *new, *result;
1130481Slepreau {
1230481Slepreau 	register char *r, *o;
1330481Slepreau 
1430481Slepreau 	for (r = result; *r = *str++; r++)
1530481Slepreau 		for (o = old; *o; )
1630481Slepreau 			if (*r == *o++) {
1730481Slepreau 				*r = new[o - old -1];
1830481Slepreau 				break;
1930481Slepreau 			}
2030481Slepreau 	return(result);
2130481Slepreau }
22