vendor/parsedate/parsedate.cpp
static int checkday(const char *check, size_t len)
{
  int i;
  const char * const *what;
  bool found = FALSE;
  if(len > 3)
    what = &weekday[0];
  else
    what = &Curl_wkday[0];
  for(i = 0; i<7; i++) {
    if(strcasecompare(check, what[0])) {
      found = TRUE;
      break;
    }
    what++;
  }
  return found?i:-1;
}
/* returns:
   -1 no day
   0 monday - 6 sunday
*/
1 no day
0 monday - 6 sunday
1 no day 0 monday - 6 sunday
static int checkday(const char *check, size_t len)
{
  int i;
  const char * const *what;
  bool found = FALSE;
  if(len > 3)
    what = &weekday[0];
  else
    what = &Curl_wkday[0];
  for(i = 0; i<7; i++) {
    if(strcasecompare(check, what[0])) {
      found = TRUE;
      break;
    }
    what++;
  }
  return found?i:-1;
}
static int checkday ( const char * check , size_t len ) { int i ; const char * const * what ; bool found = FALSE ; if ( len > 3 ) what = & weekday [ 0 ] ; else what = & Curl_wkday [ 0 ] ; for ( i = 0 ; i < 7 ; i ++ ) { if ( strcasecompare ( check , what [ 0 ] ) ) { found = TRUE ; break ; } what ++ ; } return found ? i : -1 ; }
returns:
1 no day
0 monday - 6 sunday
returns : 1 no day 0 monday - 6 sunday