File:  [CSRG BSD Unix] / 3BSD / cmd / liszt / uctolc.c
Revision 1.1: download - view: text, annotated - select for diffs
Tue Apr 24 16:12:53 2018 UTC (8 years, 1 month ago) by root
CVS tags: MAIN, HEAD
Initial revision

#include <stdio.h>
#include <ctype.h>
/*   uctolc   					j foderaro
	convert upper case to lower case
	in the first field of a tags fil
 */
#define TRUE -1
main()
{
	register char c;
	while(TRUE)
	{
	  pt1:
		while( (c=getchar()) != EOF)
		{	
		    if(isupper(c))putchar( c + ('a' - 'A'));
		    else if(c == ' ') goto pt2;
		    else putchar(c);
		}
	        exit();
	pt2:
		putchar(c);
		while( (c=getchar()) != EOF)
		{
		    putchar(c);
		    if(c == '\n') goto pt1;
		}
		exit();
	}
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.