Re: Anyone know what this does?

From: Daniel Koepke (dkoepke@california.com)
Date: 12/14/96


On Sat, 14 Dec 1996, WarRat wrote:

> Found this a while back, never figured it out, found it again a few days ago
> and decided to ask about it.
> 
> Anybody know what minlen is supposed to do here?  It's declared, never
> assigned a value, and used.  I checked the strn_cmp and it's not being ued
> there to pass a value back.  This code is from ACMD(do_help).
> 
> int minlen;
> 
> /other stuff/
> 
>     } else if (!(chk = strn_cmp(argument, help_table[mid].keyword, minlen))) {
>       /* trace backwards to find first matching entry. Thanks Jeff Fink! */
>       while ((mid > 0) &&
>       (!(chk = strn_cmp(argument, help_table[mid - 1].keyword, minlen))))

Above:
  minlen = strlen(argument);

For strn_cmp, this means compare the first _minlen_ characters of the
argument and help_table[mid].keyword.


--
Daniel Koepke
dkoepke@california.com
Forgive me father, for I am sin.


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



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