#include "ObjProGen/cpyrght_exe.h"
#include <ctype.h>
#include <stream.h>
#include <stdlib.h>
#include <unistd.h>

void usage()
{
	cerr << "Usage:to_low_arg [-u] argument list\nArguments are converted to lower or\n";
	cerr << "upper (-u) case and written to stdout.\n" ;
	exit(1);
}

void main(int argc, char **argv)
{
	int c ;
	int upper_flag = 0 ;
	while (( c = getopt(argc,argv,"u")) != EOF) switch(c) {
case 'u' :  upper_flag = 1 ;
		break ;
default:
		usage();
	}
	int first = 1 ;
	for (; optind < argc; optind++) {
		if (!first) cout << " " ;
		first = 0 ;
		for (const char * pt =argv[optind]; *pt; pt++)
			if (upper_flag) cout << (char) toupper(*pt);
			else cout << (char) tolower(*pt);
	}
}
