1 /* $Id: str2bts.c,v 1.6 1994/06/24 11:22:44 ceriel Exp $ */
3 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
4 * See the copyright notice in the ACK home directory, in the file "Copyright".
6 /* str2bts -- (1985, EHB)
9 #include "ack_string.h"
15 return ((unsigned int)(c-'0') <= ('7'-'0'));
18 /* str2bts() strips the escaped characters of a
19 string and replaces them by the ascii characters they stand for.
20 The ascii length of the resulting string is returned, including the
21 terminating null-character.
29 register char *t = bts;
56 register cnt = 0, oct = 0;
59 oct = oct * 8 + *str - '0';
60 while (is_oct(*++str) && ++cnt < 3);
71 *t = '\0'; /* don't forget this one !!! */