Changeset 557:2c8523f9a1c8 for color.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
  • color.c

    r545 r557  
    291291  char *eptr; 
    292292 
    293   if (strncasecmp (s, "bright", 6) == 0) 
     293  if (mutt_strncasecmp (s, "bright", 6) == 0) 
    294294  { 
    295295    *attr |= brite; 
     
    298298 
    299299  /* allow aliases for xterm color resources */ 
    300   if (strncasecmp (s, "color", 5) == 0) 
     300  if (mutt_strncasecmp (s, "color", 5) == 0) 
    301301  { 
    302302    s += 5; 
     
    361361  } 
    362362 
    363   if (strncmp (buf->data, "index", 5) != 0) 
     363  if (mutt_strncmp (buf->data, "index", 5) != 0) 
    364364  { 
    365365    snprintf (err->data, err->dsize, 
     
    392392  { 
    393393    mutt_extract_token (buf, s, 0); 
    394     if (!strcmp ("*", buf->data)) 
     394    if (!mutt_strcmp ("*", buf->data)) 
    395395    { 
    396396      for (tmp = ColorIndexList; tmp; ) 
     
    408408      for (last = NULL, tmp = ColorIndexList; tmp; last = tmp, tmp = tmp->next) 
    409409      { 
    410         if (!strcmp (buf->data, tmp->pattern)) 
     410        if (!mutt_strcmp (buf->data, tmp->pattern)) 
    411411        { 
    412412          if (!do_cache) 
     
    455455    if (sensitive) 
    456456    { 
    457       if (strcmp (s, tmp->pattern) == 0) 
     457      if (mutt_strcmp (s, tmp->pattern) == 0) 
    458458        break; 
    459459    } 
    460460    else 
    461461    { 
    462       if (strcasecmp (s, tmp->pattern) == 0) 
     462      if (mutt_strcasecmp (s, tmp->pattern) == 0) 
    463463        break; 
    464464    } 
     
    541541   
    542542  mutt_extract_token(buf, s, 0); 
    543   if(!strncmp(buf->data, "quoted", 6)) 
     543  if(!mutt_strncmp(buf->data, "quoted", 6)) 
    544544  { 
    545545    if(buf->data[6]) 
     
    615615  mutt_extract_token (buf, s, 0); 
    616616 
    617   if (strcasecmp ("bold", buf->data) == 0) 
     617  if (mutt_strcasecmp ("bold", buf->data) == 0) 
    618618    *attr |= A_BOLD; 
    619   else if (strcasecmp ("underline", buf->data) == 0) 
     619  else if (mutt_strcasecmp ("underline", buf->data) == 0) 
    620620    *attr |= A_UNDERLINE; 
    621   else if (strcasecmp ("none", buf->data) == 0) 
     621  else if (mutt_strcasecmp ("none", buf->data) == 0) 
    622622    *attr = A_NORMAL; 
    623   else if (strcasecmp ("reverse", buf->data) == 0) 
     623  else if (mutt_strcasecmp ("reverse", buf->data) == 0) 
    624624    *attr |= A_REVERSE; 
    625   else if (strcasecmp ("standout", buf->data) == 0) 
     625  else if (mutt_strcasecmp ("standout", buf->data) == 0) 
    626626    *attr |= A_STANDOUT; 
    627   else if (strcasecmp ("normal", buf->data) == 0) 
     627  else if (mutt_strcasecmp ("normal", buf->data) == 0) 
    628628    *attr = A_NORMAL; /* needs use = instead of |= to clear other bits */ 
    629629  else