#include "error.h"
DEFINE_ERRLIST;
+
+/**
+ * The error code of the last osl library function.
+ *
+ * \sa osl().
+ */
int osl_errno;
/** In case a signal is received, its number is stored here. */
signum = s;
}
+/**
+ * Check whether to terminate adu.
+ *
+ * Check whether a signal was caught that should terminate the
+ * adu process. If yes, close all osl tables and exit gracefully.
+ */
void check_signals(void)
{
if (likely(!signum))
return 1;
}
+/**
+ * Open the directory table.
+ *
+ * \param create If non-zero, create the table first.
+ *
+ * \return Standard.
+ */
int open_dir_table(int create)
{
exit(EXIT_FAILURE);
}
+/**
+ * The main function of adu.
+ *
+ * \param argc Usual argument count.
+ * \param argv Usual argument vector.
+ *
+ * Check command line options, init the signal handlers and
+ * call the main function of the selected mode.
+ *
+ * \return \p EXIT_SUCCESS on success, \p EXIT_FAILURE otherwise.
+ */
int main(int argc, char **argv)
{
int ret;