rem: fprintf(file, "\\%03o", s[i]);
add: fprintf(file, "\\%03o", (unsigned char)s[i]);
context: unsigned print_str(FILE* file, char *s, unsigned max) {    int i;    for (i=0; s[i] && i < max; i++)	if (isprint(s[i]) || s[i] == ' ')	    fputc(s[i], file);	else {	    if (max - i > 3) {		fprintf(file, "\\%03o", s[i]);		i += 3; /* 4 printed, but i counts one */	    } else		return max - i;	}    return max - i;}