File:  [Research Unix] / researchv9 / cmd / emacs / macros / caps
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:59 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv9-SUN3_old, researchv9-SUN3, HEAD
researchv9-SUN3(old)

�capitalizes entered letters until end of word [MACRO]

	Joe Steffen, ihuxs!steffen, IH x5381, Version 4.3

 Lowercase letters are converted to uppercase until a character besides
 a lower or uppercase letter, underscore, hyphen, or backspace is entered.
 This character is then executed.  Uppercase letters, underscores, and hyphens
 are inserted as is, whereas backspace deletes the previous character.

�		$4 = 1
^�		while ($4 == 1)
				$0 = getchar()
	0�-<caps
	|�		condition list:
		�7~5~0�a0~0�z	if (islower($0))
			0�		insert $0 into the buffer
						capitalize it
		�
		�7~5~0�A0~0�Z	if (isupper($0))
			0�		insert $0 into the buffer
		�
		�~0�_	if ($0 == '_')
			0�		insert $0 into the buffer
		�
		�~0�-	if ($0 == '-')
			0�		insert $0 into the buffer
		�
		�~0�	if ($0 == '')
						backspace
		�
		� 			default
			�0		$4 = 0
			�			execute the command in $0
		�
	�			end condition list
	0		display the character
�			end loop


unix.superglobalmegacorp.com

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