From 88eaeed762746bb83537d9933e8313bc78771913 Mon Sep 17 00:00:00 2001 From: ceriel Date: Thu, 6 Aug 1987 14:24:08 +0000 Subject: [PATCH] code improvement --- modules/src/string/bts2str.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/modules/src/string/bts2str.c b/modules/src/string/bts2str.c index 5887fdd9c..749f89ef4 100644 --- a/modules/src/string/bts2str.c +++ b/modules/src/string/bts2str.c @@ -21,17 +21,10 @@ bts2str(b, n, s) if (is_print(*f)) *t++ = *f++; else { - register char *p; - register int n = (*f++ & 0377); - - *t = '\\'; - p = (t += 4); - *--p = (n & 07) + '0'; - n >>= 3; - *--p = (n & 07) + '0'; - n >>= 3; - *--p = (n & 07) + '0'; - n >>= 3; + *t++ = '\\'; + *t++ = ((*f >> 6) & 03) + '0'; + *t++ = ((*f >> 3) & 07) + '0'; + *t++ = (*f++ & 07) + '0'; } } *t = '\000';