//define to enable look at b instead of look at book
//#define SHORT_NAMES
#ifdef SHORT_NAMES
#define WHITESPACE " \t"
int isname(char *str, char *namelist)
{
char *newlist, *curtok;
newlist = strdup(namelist); /* make a copy since strtok 'modifies'
strings */
for(curtok = strtok(newlist, WHITESPACE); curtok; curtok = strtok(NULL,
WHITESPACE))
if(curtok && is_abbrev(str, curtok))
{
FREE(newlist);
return 1;
}
FREE(newlist);
return 0;
}
#else//#ifdef SHORT_NAMES
int isname(char *str, char *namelist)
{
const char *curname, *curstr;
curname = namelist;
for (;;)
{
for (curstr = str ; ; curstr++, curname++)
{
if (!*curstr && !isalpha(*curname))
return (1);
if (!*curname)
return (0);
if (!*curstr || *curname == ' ')
break;
if (LOWER(*curstr) != LOWER(*curname))
break;
}
/* skip to next name */
for (; isalpha(*curname); curname++) ;
if (!*curname)
return (0);
curname++; /* first char of new name */
}
}
#endif//#ifdef SHORT_NAMES
>From: Marco Felice Mengozzi <MI0937@mclink.it>
>Reply-To: Circle Discussion List <CIRCLE@post.queensu.ca>
>To: CIRCLE@post.queensu.ca
>Subject: perhaps it is a NEWBIE question but i couldn't find on
> FAQ
>Date: Tue, 21 Dec 1999 02:21:37 +0100
>
>I' d like to be able to write
>get coi
>instead of:
>get coins
>
>kill storm instead of kill stormbringer.
>
>I've started editing in Handler.c the functione generic_find, but that's
>not enough, infact get and similar command do not use this fuction,
>where can I work?
>
>How can I do?
>What file shoud i correct?
>I can program C but I'm not familiar wiht mud programming yet!!:-)
>
>
>
>--
> Live long and prosper
>----------------------------
> Marco Felice Mengozzi
>aka Sirio (mc7253@mclink.it)
>aka UterPendragon
>aka FireLord
> ICQ 4365585
>----------------------------
>
>
> +------------------------------------------------------------+
> | Ensure that you have read the CircleMUD Mailing List FAQ: |
> | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
> +------------------------------------------------------------+
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST