aboutsummaryrefslogtreecommitdiffstats
path: root/libsimple.h
diff options
context:
space:
mode:
Diffstat (limited to 'libsimple.h')
-rw-r--r--libsimple.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/libsimple.h b/libsimple.h
index 430dbe0..5bfa5ba 100644
--- a/libsimple.h
+++ b/libsimple.h
@@ -165,6 +165,13 @@
#include "libsimple/strn.h"
#include "libsimple/strtoint.h"
#include "libsimple/search.h"
+#include "libsimple/random.h"
+#include "libsimple/abs.h"
+#include "libsimple/net.h"
+#include "libsimple/path.h"
+#include "libsimple/ascii.h"
+#include "libsimple/exec.h"
+#include "libsimple/sort.h"
/**
@@ -193,6 +200,20 @@ libsimple_close(int *fdp__)
/**
+ * Close a range of file descriptors
+ *
+ * @param first The lowest file descriptor to close
+ * @param last The highest file descriptor to close
+ * @param next Output parameter for the potentially first unclosed file descriptor; may be `NULL`
+ * @return 0 on successful completion, -1 on failure
+ * @throws EINVAL If `first > last`
+ * @throws Any error for close(3) except EBADF
+ */
+int libsimple_close_range(unsigned int first, unsigned int last, unsigned int *next);
+#define LIBSIMPLE_CLOSE_RANGE_MAX (~0U)
+
+
+/**
* Remove an item from a list, keeping the list ordered
*
* `list` must be non-void pointer to a complete type,