Re: ANA() SANA() Macros are wrong...

From: George Greer (greerga@circlemud.org)
Date: 03/10/01


On Sat, 10 Mar 2001, Peter Ajamian wrote:

>George Greer wrote:
>
>> But what correlation of object descriptions to aliases? Is the first alias
>> the first word of the description? Do people put 'a' in the short
>> descriptions?  Not much we can do without NLP.
>
>What do descriptions and aliases have to do with that?  it's checking
>name, I thought that was different?  Anyways, my objective here is just
>to correct an oversight in the macros the way they were, they won't work
>right for a lot of words that start with "y".

#define ANA(obj) (strchr("aeiouyAEIOUY", *(obj)->name) ? "An" : "A")
#define SANA(obj) (strchr("aeiouyAEIOUY", *(obj)->name) ? "an" : "a")

/////

struct obj_data {
[...]
   char *name;                    /* Title of object :get etc.        */
   char *description;             /* When in room                     */
   char *short_description;       /* when worn/carry/in cont.         */
   char *action_description;      /* What to write when used          */
[...]
};

/////

SANA is only used by act(), hence it would most likely be trying to 'a' /
'an' the object's short description, not the alias list. Most objects have
a short description of "an apple" anyway, instead of the code using $a/$A
for that.

--
George Greer
greerga@circlemud.org

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/04/01 PST