Changeset 557:2c8523f9a1c8 for alias.c

Show
Ignore:
Timestamp:
1998-11-10 14:14:00 (10 years ago)
Author:
Thomas Roessler <roessler@…>
Branch:
HEAD
Message:

Introduce or rewrite mutt_{str*cmp,strlen} and use them all over the
place. If there are still segmentation faults due to missing
NONULLs over, they are gone now.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • alias.c

    r465 r557  
    3030 
    3131  for (; t; t = t->next) 
    32     if (!strcasecmp (s, t->name)) 
     32    if (!mutt_strcasecmp (s, t->name)) 
    3333      return (t->addr); 
    3434  return (NULL);   /* no such alias */ 
     
    5353        for (u = *expn; u; u = u->next) 
    5454        { 
    55           if (strcmp (a->mailbox, u->data) == 0) /* alias already found */ 
     55          if (mutt_strcmp (a->mailbox, u->data) == 0) /* alias already found */ 
    5656          { 
    5757            dprint (1, (debugfile, "mutt_expand_aliases_r(): loop in alias found for '%s'\n", a->mailbox)); 
     
    288288    { 
    289289      if (!ap->group && ap->mailbox && 
    290           strcasecmp (ap->mailbox, a->mailbox) == 0) 
     290          mutt_strcasecmp (ap->mailbox, a->mailbox) == 0) 
    291291        return ap; 
    292292    } 
     
    316316    { 
    317317      if (!bestname[0]) /* init */ 
    318         strfcpy (bestname, a->name, min (strlen (a->name) + 1, sizeof (bestname))); 
     318        strfcpy (bestname, a->name, min (mutt_strlen (a->name) + 1, sizeof (bestname))); 
    319319      else 
    320320      { 
     
    335335  else 
    336336  { 
    337     if (strcmp (bestname, s) == 0) /* add anything to the completion? */ 
     337    if (mutt_strcmp (bestname, s) == 0) /* add anything to the completion? */ 
    338338    { 
    339339      /* build alias list and show it */ 
     
    370370    } 
    371371    else /* we are adding something to the completion */ 
    372       strfcpy (s, bestname, strlen (bestname) + 1); 
     372      strfcpy (s, bestname, mutt_strlen (bestname) + 1); 
    373373  } 
    374374 
     
    381381   
    382382  snprintf(buf, sizeof(buf), "%s@%s", NONULL(u), NONULL(d)); 
    383   if (strcasecmp(str, buf) == 0) 
     383  if (mutt_strcasecmp(str, buf) == 0) 
    384384    return 1; 
    385385   
     
    396396    return 0; 
    397397 
    398   if (strcasecmp (addr->mailbox, NONULL(Username)) == 0) 
     398  if (mutt_strcasecmp (addr->mailbox, Username) == 0) 
    399399    return 1; 
    400400  if(string_is_address(addr->mailbox, Username, Hostname))