/[svn]/ircd-hybrid-7.2/src/parse.c
ViewVC logotype

Diff of /ircd-hybrid-7.2/src/parse.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 521 by lusky, Sun Oct 2 21:05:51 2005 UTC revision 522 by michael, Sun Mar 12 13:42:20 2006 UTC
# Line 526  del_msg_element(struct MessageTree *mtre Line 526  del_msg_element(struct MessageTree *mtre
526  static struct Message *  static struct Message *
527  msg_tree_parse(const char *cmd, struct MessageTree *root)  msg_tree_parse(const char *cmd, struct MessageTree *root)
528  {  {
529    struct MessageTree *mtree;    struct MessageTree *mtree = root;
530    assert(cmd && *cmd);    assert(cmd && *cmd);
   for (mtree = root->pointers[(*cmd) & (MAXPTRLEN-1)]; mtree != NULL;  
        mtree = mtree->pointers[(*++cmd) & (MAXPTRLEN-1)])  
   {  
     if (!IsAlpha(*cmd))  
       return(NULL);  
     if (*(cmd + 1) == '\0')  
       return(mtree->msg); /* NULL if parsed invalid/unknown command */  
531    
532    }    while (IsAlpha(*cmd) && (mtree = mtree->pointers[*cmd & (MAXPTRLEN - 1)]))
533        if (*++cmd == '\0')
534          return mtree->msg;
535    
536    return(NULL);    return NULL;
537  }  }
538    
539  /* mod_add_cmd()  /* mod_add_cmd()

Legend:
Removed from v.521  
changed lines
  Added in v.522

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28