result = (char *)calloc(1, (p-(*str) + added + 1));
result = typecallocn(char, p-(*str) + added + 1);
PUBLIC void HTMake822Word ARGS1(	char **,	str){    CONST char * p;    char * q;    char * result;    unsigned char a;    int added = 0;    if (!(*str) || !(**str)) {	StrAllocCopy(*str, "\"\"");	return;    }    for (p = *str; *p; p++) {	a = TOASCII(*p);  /* S/390 -- gil -- 0240 */	if (a < 32 || a >= 128 ||	    ((crfc[a-32]) & 1)) {	    if (!added)		added = 2;	    if (a >= 160 || a == '\t')		continue;	    if (a == '\r' || a == '\n')		added += 2;	    else if ((a & 127) < 32 || ((crfc[a-32]) & 2))		added++;	}    }    if (!added)	return;    result = (char *)calloc(1, (p-(*str) + added + 1));    if (result == NULL)	outofmem(__FILE__, "HTMake822Word");    result[0] = '"';    /*    ** Having converted the character to ASCII, we can't use symbolic    ** escape codes, since they're in the host character set, which    ** is not necessarily ASCII.  Thus we use octal escape codes instead.    ** -- gil (Paul Gilmartin) <pg@sweng.stortek.com>    */  /* S/390 -- gil -- 0268 */    for (q = result + 1, p = *str; *p; p++) {	a = TOASCII(*p);	if ((a != '\011') && ((a & 127) < 32 ||			    ( a < 128 && ((crfc[a-32]) & 2))))	    *q++ = '\033';	*q++ = *p;	if (a == '\012' || (a == '\015' && (TOASCII(*(p+1)) != '\012')))	    *q++ = ' ';    }    *q++ = '"';    *q++ = '\0';			/* Terminate */    FREE(*str);    *str = result;}