From 11c986679a15e976e5fdde5e439a18be4acac0de Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Sun, 25 Apr 2021 12:06:54 +0000 Subject: sort the auto index alphabetically --- gmid.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gmid.h') diff --git a/gmid.h b/gmid.h index cacae39..6f4223e 100644 --- a/gmid.h +++ b/gmid.h @@ -180,7 +180,8 @@ struct client { int code; const char *meta; int fd, pfd; - DIR *dir; + struct dirent **dir; + int dirlen, diroff; /* big enough to store STATUS + SPACE + META + CRLF */ char sbuf[1029]; @@ -285,6 +286,12 @@ int vhost_disable_log(struct vhost*, const char*); void mark_nonblock(int); void loop(struct tls*, int, int, struct imsgbuf*); +/* dirs.c */ +int scandir_fd(int, struct dirent***, int(*)(const struct dirent*), + int(*)(const struct dirent**, const struct dirent**)); +int select_non_dot(const struct dirent*); +int select_non_dotdot(const struct dirent*); + /* ex.c */ int send_string(int, const char*); int recv_string(int, char**); -- cgit v1.2.3