#include < stdio.h > #define MAXLINE 1000 typedef enum ... { false = 0, true = 1} bool ; int getline( char line[], int maxline);main() ... { int len; int j; bool blank_line = false; char line[MAXLINE]; while((len = getline(line, MAXLINE)) > 0) ...{ j = len - 2; while((line[j] == ' ') || (line[j] == '/t')) ...{ --j; if(j == -1) ...{ blank_line = true; break; } else ...{ blank_line = false; } if((line[j] != ' ') && (line[j] != '/t')) ...{ line[++j] = '/n'; line[++j] = '/0'; } } if(blank_line == false) printf("%s", line); } return 0;} int getline( char s[], int lim) ... { int c, i; for(i = 0; i < lim - 1 && ((c = getchar()) != EOF && c != '/n'); ++i) s[i] = c; if(c == '/n') ...{ s[i] = c; ++i; } else if(c == EOF && i > 0) ...{ /**//* gotta do something about no newline preceding EOF */ s[i] = '/n'; ++i; } s[i] = '/0'; return i;}