ftp.nice.ch/pub/next/unix/editor/vile-filters.tar.gz#/vile-filters/vileFilters-1.0.tar.gz#/vileFilters-1.0/nrFilt/nrFilt.c

This is nrFilt.c in view mode; [Download] [Up]

/**
 ** nrFilt
 **
 ** Mind-bogglingly simple xvile filter for nroff documents--just 
 ** adds a color attribute to lines that begin with '.'
 **
 ** PJM 940419	Created
 **/

#include <stdio.h>

#define ATTR	"C3"
#define CTL_A	'\001'

main()
{
	char	buf[BUFSIZ];

	while(gets(buf)) {
		if(*buf == '.') 
			printf("%c%i%s:",CTL_A,strlen(buf),ATTR);

		puts(buf);
	}
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.