Re: [CODE] CAP(buf); question

From: George (greerga@CIRCLEMUD.ORG)
Date: 12/27/97


On Sat, 27 Dec 1997, Kingmundi wrote:

>what does CAP(buf); do in the following code?
>
>  strcpy(buf, PERS(i, ch));
>  CAP(buf);
[...]
>is it suppose to convert a characters name to all capitalized letters?

utils.h:120:#define CAP(st)  (*(st) = UPPER(*(st)), st)
utils.h:116:#define UPPER(c)   (((c)>='a'  && (c) <= 'z') ? ((c)+('A'-'a')) : (c) )

You can figure out from there, if you read that little bit of code.

--
George Greer  -  Me@Null.net   | Genius may have its limitations, but stupidity
http://www.van.ml.org/~greerga | is not thus handicapped. -- Elbert Hubbard


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST