From:	CSBVAX::MRGATE!info-vax-RELAY@KL.SRI.COM@SMTP  7-JUN-1988 12:01
To:	ARISIA::EVERHART
Subj:	TPU List_Buffers.3_of_3


Received: from RELAY.CS.NET by KL.SRI.COM with TCP; Wed, 1 Jun 88 17:25:59 PDT
Received: from [129.10.1.2] by RELAY.CS.NET id af01317; 1 Jun 88 16:47 EDT
Received: from nuhub.acs.northeastern.edu by helios.northeastern.edu id aa25973;
          1 Jun 88 16:28 EDT
Date: Wed, 1 Jun 88 16:22 5
From: Richard Pieri aka XENON - The Heavy Metal Warrior <UA_RLP%nuhub.acs.northeastern.edu@RELAY.CS.NET>
Subject: TPU List_Buffers.3_of_3
To: info-vax@KL.SRI.COM
X-VMS-To: INFO-VAX

+-+-+-+ Beginning of part 3 +-+-+-+
X                [3]: return "control";
X                [4]: return "shift_printing";
X                [5]: return "shift_keypad";
X                [6]: return "shift_function";
X                [7]: return "shift_control";
X            endcase;
X        endprocedure; ! key_type_ascii
X
X!
X! Capitalize.Tpu
X!
X! Procedure to capitalize a string according to MEH's rules which are:
X!`009If previous character was non-alphabetic character, the character
X! `009is capitalized otherwise the character is made lowercase.
X!`009Non-Alphabetic characters are untouched.  Returns the capitalized
X!`009string.
Xprocedure Meh_Capitalize(A)
X
Xlocal
X`009B,`009`009! The resulting string
X`009i,`009`009! Index to current character
X`009c,`009`009! The current character.
X`009l,`009`009! The length of A
X`009is_alpha,`009! True if current character is alphabetic
X`009last;`009`009! The state of the last character, TRUE if it was
X`009`009`009!  capitalized.
Xlast := FALSE;
XB := "";
Xi := 0;
Xl := length(A);
X
Xloop
X`009exitif i = l;
X`009i := i + 1;
X`009c := substr(A, i, 1);
X`009is_alpha := (index(eve$x_not_alphabetic+" ",c) = 0);
X`009if last AND  is_alpha then
X`009`009change_case(c,lower);
X`009else if NOT last and is_alpha then
X`009`009change_case(c,upper);
X`009endif; endif;
X
X`009last := is_alpha;
X`009B := B + c;
Xendloop;
X
Xreturn(B);
X
Xendprocedure;
X
X`012
XProcedure LB_Attach
X!
X! Attaches to the main process if there is one.
X!
X
Xon_error
X    if error = tpu$_noparent then
X`009message ("You are not running EVE in a subprocess");
X`009return;
X    endif;
Xendon_error;
X
Xmessage (eve$x_null);`009`009! Clear out old message
Xattach;
X
XEndProcedure;
X
$ GOSUB UNPACK_FILE
$ EXIT
-+-+-+-+-+ End of part 3 +-+-+-+-+-
