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
  • complete.c

    r465 r557  
    4949    { 
    5050      *p++ = 0; 
    51       sprintf (exp_dirpart + strlen (exp_dirpart), "/%s", s+1); 
    52       sprintf (dirpart + strlen (dirpart), "%s/", s+1); 
     51      sprintf (exp_dirpart + mutt_strlen (exp_dirpart), "/%s", s+1); 
     52      sprintf (dirpart + mutt_strlen (dirpart), "%s/", s+1); 
    5353      strfcpy (filepart, p, sizeof (filepart)); 
    5454    } 
     
    101101   * file/directory which is not ``.'' or ``..'' 
    102102   */ 
    103   if ((len = strlen (filepart)) == 0) 
     103  if ((len = mutt_strlen (filepart)) == 0) 
    104104  { 
    105105    while ((de = readdir (dirp)) != NULL) 
    106106    { 
    107       if (strcmp (".", de->d_name) != 0 && strcmp ("..", de->d_name) != 0) 
     107      if (mutt_strcmp (".", de->d_name) != 0 && mutt_strcmp ("..", de->d_name) != 0) 
    108108      { 
    109109        strfcpy (filepart, de->d_name, sizeof (filepart)); 
     
    116116  while ((de = readdir (dirp)) != NULL) 
    117117  { 
    118     if (strncmp (de->d_name, filepart, len) == 0) 
     118    if (mutt_strncmp (de->d_name, filepart, len) == 0) 
    119119    { 
    120120      if (init) 
     
    157157  { 
    158158    strcpy (s, dirpart); 
    159     if (strcmp ("/", dirpart) != 0 && dirpart[0] != '=' && dirpart[0] != '+') 
     159    if (mutt_strcmp ("/", dirpart) != 0 && dirpart[0] != '=' && dirpart[0] != '+') 
    160160      strcat (s, "/"); 
    161161    strcat (s, filepart);