summaryrefslogtreecommitdiff
path: root/lib/savedir.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2016-01-20 10:55:18 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2016-01-20 10:55:18 +0000
commit70e9163c9c18e995515598085cb824e554eb7ae7 (patch)
treea42dc8b2a6c031354bf31472de888bfc8a060132 /lib/savedir.h
parentcbf5993c43f49281173f185863577d86bfac6eae (diff)
downloadcoreutils-tarball-master.tar.gz
Diffstat (limited to 'lib/savedir.h')
-rw-r--r--lib/savedir.h34
1 files changed, 24 insertions, 10 deletions
diff --git a/lib/savedir.h b/lib/savedir.h
index 5b7bef9..a277024 100644
--- a/lib/savedir.h
+++ b/lib/savedir.h
@@ -1,11 +1,12 @@
/* Save the list of files in a directory in a string.
- Copyright (C) 1997, 1999, 2001, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2001, 2003, 2005, 2009-2016 Free Software
+ Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -13,15 +14,28 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
-#if !defined SAVEDIR_H_
-# define SAVEDIR_H_
+#ifndef _GL_SAVEDIR_H
+#define _GL_SAVEDIR_H
-char *savedir (char const *dir);
-char *fdsavedir (int fd);
+#include <dirent.h>
+
+enum savedir_option
+ {
+ SAVEDIR_SORT_NONE,
+ SAVEDIR_SORT_NAME,
+#if D_INO_IN_DIRENT
+ SAVEDIR_SORT_INODE,
+ SAVEDIR_SORT_FASTREAD = SAVEDIR_SORT_INODE
+#else
+ SAVEDIR_SORT_FASTREAD = SAVEDIR_SORT_NONE
+#endif
+ };
+
+char *streamsavedir (DIR *, enum savedir_option);
+char *savedir (char const *, enum savedir_option);
#endif