.PHONY: dist-clean
dist-clean : clean
+ for dir in $(CLEANABLE); do make -C $$dir dist-clean || true; done
for i in $(wildcard module/share/lib/*); do rm $$i; done
for i in $(wildcard module/share/inc/*); do rm $$i; done
for i in $(wildcard module/share/bin/*); do rm $$i; done
+++ /dev/null
-#ifndef DA_LIB_H
-#define DA_LIB_H
-#include <stdlib.h>
-#include <stdbool.h>
-#include <stdio.h>
-
-typedef struct Da{
- char *base;
- char *end; // one byte/one element off the end of the array
- size_t size; // size >= (end - base) + 1;
- size_t element_size;
-} Da;
-
-#define RETURN(dap, r) \
- { da_free_elements(dap); return r; }
-
-
-void da_alloc(Da *dap, size_t element_size);
-void da_free(Da *dap);
-void da_rewind(Da *dap);
-bool da_emptyq(Da *dap);
-size_t da_length(Da *dap);
-void da_rebase(Da *dap, char *old_base, void *pta);
-char *da_expand(Da *dap);
-bool da_boundq(Da *dap);
-
-char *da_index(Da *dap, size_t i);
-char *da_push_alloc(Da *dap);
-char *da_push(Da *dap, void *element);
-bool da_pop(Da *dap, void *element);
-
-bool da_endq(Da *dap, void *pt);
-void da_map(Da *dap, void f(void *, void *), void *closure);
-
-void da_free_elements(Da *dap);
-
-void da_ints_print(Da *dap, char *sep);
-
-void da_strings_print(Da *dap, char *sep);
-bool da_strings_exists(Da *string_arrp, char *test_string);
-void da_strings_set_insert(Da *string_arrp, char *proffered_string, void destruct(void *));
-void da_strings_set_union(Da *string_arrp, Da *proffered_string_arrp, void destruct(void *));
-
-
-char *da_string_input(Da *dap, FILE *file);
-void da_string_push(Da *dap0, char *string);
-
-void da_cat(Da *dap_base, Da *dap_cat);
-
-#endif
-
+++ /dev/null
-#ifndef DB_LIB_H
-#define DB_LIB_H
-
-int debug_printf(const char *format, ...);
-
-#endif
+++ /dev/null
- /*
- Runs a command or function as its own process.
-
- The return status integer from command or function must be greater than ERR_DISPATCH.
- In the case of dispatch_exec, we only have a promise from the user to not dispatch
- non compliant commands.
-
- */
- #ifndef DISPATCH_LIB_H
- #define DISPATCH_LIB_H
- #include <sys/types.h>
- #include <unistd.h>
-
- #define ERR_DISPATCH -1024
- #define ERR_DISPATCH_NEGATIVE_RETURN_STATUS -1024
- #define ERR_DISPATCH_F_FORK -1025
- #define ERR_DISPATCH_F_SETEUID -1026
- #define ERR_DISPATCH_F_SETEGID -1027
- #define ERR_DISPATCH_NULL_EXECUTABLE -1028
- #define ERR_DISPATCH_EXEC -1029
-
- // currently both dispatcher and dispatchee strings are statically allocated
- struct dispatch_ctx{
- char *dispatcher; // name of the dispatch function ("dispatch_f", "dispatch_f_euid_egid", etc.)
- char *dispatchee; // name of the function being dispatched
- int err; // error code as listed below, or status returned from dispatchee
- };
-void dispatch_f_mess(char *fname, int err, char *dispatchee);
-int dispatch_f(char *fname, int (*f)(void *arg), void *f_arg);
-int dispatch_f_euid_egid(char *fname, int (*f)(void *arg), void *f_arg, uid_t euid, gid_t egid);
-int dispatch_exec(char **argv, char **envp);
-#endif
+++ /dev/null
-#ifndef TRANCHE_LIB_H
-#define TRANCHE_LIB_H
-
-#define TRANCHE_ERR_ARG_PARSE 1
-#define TRANCHE_ERR_SRC_OPEN 2
-#define TRANCHE_ERR_DST_OPEN 4
-#define TRANCHE_ERR_FCLOSE 8
-#define TRANCHE_ERR_HELP 16
-#define TRANCHE_ERR_SNAME 32
-
-void path_trim_slashes(char *path);
-int tranche_send(FILE *src, Da *arg_fds, char *tdir);
-int tranche_target(FILE *src, Da *targets, char *tdir);
-void tranche_make(FILE *src_file, char *src_name, int mfile_fd, char *tdir);
-
-#endif