else if (isprint(ch)) {
else if (!iscntrl(ch)) {
get_line(FILE *stream, size_t *lengthp) {  static char *buf=NULL;  static size_t length=0;  size_t len=0;  int ch;  size_t spaces_pending=0;  if (buf==NULL) { length=100; buf=XMALLOC(length); }  while ((ch=getc(stream)) != '\n' && ch != EOF) {    if (ch==' ') ++spaces_pending;    else if (isprint(ch)) {      while (len+spaces_pending >= length) {        length*=2; buf=xrealloc(buf, length);      }      while (spaces_pending > 0) { --spaces_pending; buf[len++]=' '; }      buf[len++] = ch;    }    else if (ch=='\t')      spaces_pending += tab_width - (len+spaces_pending)%tab_width;    else if (ch=='\b') { if (len) --len; }  }  *lengthp=len;  return (len>0 || ch!=EOF) ? buf : 0;}