36
36
#include "mysys/mysys_priv.h"
37
37
#include <mystrings/m_string.h>
38
38
#include <mystrings/m_ctype.h>
39
#include <mysys/my_dir.h>
40
39
#include <drizzled/configmake.h>
40
#include <drizzled/gettext.h>
44
45
const char *my_defaults_file=0;
45
46
const char *my_defaults_group_suffix=0;
668
669
ptr, name, line)))
671
if (!(search_dir= my_dir(ptr, MYF(MY_WME))))
672
if ((dirp= opendir(ptr)) == NULL)
676
* Since clients still use this code, we use fprintf here.
677
* This fprintf needs to be turned into errmsg_printf
678
* as soon as the client programs no longer use mysys
679
* and can use the pluggable error message system.
681
fprintf(stderr, _("error: could not open directory: %s\n"), ptr);
674
for (i= 0; i < (uint32_t) search_dir->number_off_files; i++)
685
int rc= readdir_r(dirp, &dirent_entry, &dirent_result);
687
while (!rc && (dirent_result != NULL))
676
search_file= search_dir->dir_entry + i;
677
ext= fn_ext(search_file->name);
689
ext= fn_ext(dirent_entry.d_name);
679
691
/* check extension */
680
692
for (tmp_ext= (char**) f_extensions; *tmp_ext; tmp_ext++)
682
694
if (!strcmp(ext, *tmp_ext))
688
fn_format(tmp, search_file->name, ptr, "",
689
MY_UNPACK_FILENAME | MY_SAFE_PATH);
691
search_default_file_with_ext(opt_handler, handler_ctx, "", "", tmp,
692
recursion_level + 1);
696
fn_format(tmp, dirent_entry.d_name, ptr, "",
697
MY_UNPACK_FILENAME | MY_SAFE_PATH);
699
search_default_file_with_ext(opt_handler, handler_ctx, "", "",
700
tmp, recursion_level + 1);
704
rc= readdir_r(dirp, &dirent_entry, &dirent_result);
696
my_dirend(search_dir);
698
707
else if ((!strncmp(ptr, include_keyword, sizeof(include_keyword) - 1)) &&
699
708
my_isspace(&my_charset_utf8_general_ci, ptr[sizeof(include_keyword)-1]))