All pastes #156765 Raw Edit

Something

public text v1 · immutable
·published 2006-09-01 00:28 UTC
rendered paste body
#include <stdio.h>
#define LIMIT 8
#define TRUE 1
#define FALSE 0
int isprint(int);
int string[LIMIT];
int main()
{
	int count = 0;
        int ch;
	int printable = TRUE;
	int *chp;
        while ((ch = getchar()) != EOF) {
		if (isprint(ch) && printable) {
                        string[count] = ch;
			count++;
			if (count > LIMIT) {
				printable = FALSE;
			}
		}

		else if (ch == '\0' && count > 0 && printable) {
			chp = string;
			while (count > 0) {
				putchar(*chp);
				chp++;
				count--;
			}
			printf("\n");
			printable = TRUE;
		}
		else if ((ch == '\0' && !printable) || !isprint(ch)) {
			count = 0;
			printable = TRUE;
		}
        }
        return 0;

}