else
else if (locale_count >= max_count)
is_locale_name (int cat_no, const char *str, int len){  static char **locale_names = NULL;  static int max_count = 0;  static int locale_count = 0;  int cnt, exist, fd;  char *fname;  struct stat st;  if (locale_names == NULL)    /* Read in the list of all available locales.  */    {      DIR *dir;      struct dirent *dirent;            /* LOCALE_NAMES is not NULL anymore, but LOCALE_COUNT == 0.  */      ++locale_names;	        dir = opendir (LOCALE_PATH);      if (dir == NULL)	{	  error (1, errno, gettext ("cannot read locale directory `%s'"),		 LOCALE_PATH);	  return NULL;	}      /* Now we can look for all files in the directory.  */      while ((dirent = readdir (dir)) != NULL)	if (strcmp (dirent->d_name, ".") != 0	    && strcmp (dirent->d_name, "..") != 0)	  {	    if (max_count == 0)	      locale_names = (char **) xmalloc ((max_count = 10)						* sizeof (char *));	    else	      locale_names = (char **) xrealloc (locale_names,						 (max_count *= 2)						 * sizeof (char *));	    locale_names[locale_count++] = strdup (dirent->d_name);	  }      closedir (dir);    }  for (cnt = 0; cnt < locale_count; ++cnt)    if (strncmp (str, locale_names[cnt], len) == 0	&& locale_names[cnt][len] == '\0')      break;    if (cnt >= locale_count)    return NULL;    /* Now search for this specific locale file.  */  asprintf (&fname, "%s/%s/%s", LOCALE_PATH, locale_names[cnt],	    category[cat_no].name);    fd = open (fname, O_RDONLY);  if (fd < 0)    {      free (fname);      return NULL;    }    exist = fstat (fd, &st);  close (fd);    if (exist < 0)    {      free (fname);      return NULL;    }  return fname;}