summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-04-07 15:19:45 +0200
committerSergei Golubchik <sergii@pisem.net>2013-04-07 15:19:45 +0200
commitbbbd7cedf522e7ea9883b881370fceb91ed3d746 (patch)
tree64a54bba635ba04a1904921c587bcf15851e49da /include
parentfdcaa6cb3201ef432574946976cbc981bcffac61 (diff)
downloadmariadb-git-bbbd7cedf522e7ea9883b881370fceb91ed3d746.tar.gz
my_dir() cleanup
* replace pointer acrobatics with a struct * make sorting explicit: MY_DONT_SORT -> MY_WANT_SORT (if you want something to be done - say it. fixes all places where my_dir() was used without thinking) * typo s/number_off_files/number_of_files/ * directory_file_name() doesn't need to be extern * remove #ifdef __BORLANDC__ * ignore '.' and '..' entries
Diffstat (limited to 'include')
-rw-r--r--include/my_dir.h5
-rw-r--r--include/my_sys.h1
2 files changed, 3 insertions, 3 deletions
diff --git a/include/my_dir.h b/include/my_dir.h
index 6a941b37d79..be988ae790c 100644
--- a/include/my_dir.h
+++ b/include/my_dir.h
@@ -46,8 +46,9 @@ extern "C" {
#define MY_S_ISFIFO(m) (((m) & MY_S_IFMT) == MY_S_IFIFO)
/* Ensure these dosn't clash with anything in my_sys.h */
-#define MY_DONT_SORT 8192 /* my_lib; Don't sort files */
+#define MY_WANT_SORT 8192 /* my_lib; sort files */
#define MY_WANT_STAT 16384 /* my_lib; stat files */
+#define MY_DONT_SORT 0
/* typedefs for my_dir & my_stat */
@@ -94,7 +95,7 @@ typedef struct st_my_dir /* Struct returned from my_dir */
we don't want to change code that uses my_dir.
*/
struct fileinfo *dir_entry;
- uint number_off_files;
+ uint number_of_files;
} MY_DIR;
extern MY_DIR *my_dir(const char *path,myf MyFlags);
diff --git a/include/my_sys.h b/include/my_sys.h
index 13e4d463515..40061a33636 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -708,7 +708,6 @@ extern size_t cleanup_dirname(char * to,const char *from);
extern size_t system_filename(char * to,const char *from);
extern size_t unpack_filename(char * to,const char *from);
extern char * intern_filename(char * to,const char *from);
-extern char * directory_file_name(char * dst, const char *src);
extern int pack_filename(char * to, const char *name, size_t max_length);
extern char * my_path(char * to,const char *progname,
const char *own_pathname_part);