* Licensed under the GPL v2. For licencing details see COPYING.
*/
-/*
- * A simple file archiver with many limitations. Do not use it. It is just an
- * example to illustrate programming with libosl.
+/**
+ * \file osltar.c A simple file archiver with many limitations. Do not use it.
+ * It is just an * example to illustrate programming with libosl.
*/
#include <inttypes.h>
#include <sys/mman.h>
#include <fcntl.h>
+/** The columns of the osl table. */
enum osltar_columns {
+ /** File name. */
OTC_NAME,
+ /** File content. */
OTC_DATA,
+ /** two. */
NUM_OT_COLUMNS
};
+
+/**
+ * We want doxygen to create documentation for certain static functions. So we
+ * use __static__ for such functions.
+ */
+#define __static__ static
+
/**
* Compare two osl objects of string type.
*
* \param obj1 Pointer to the first object.
* \param obj2 Pointer to the second object.
*
- * In any case, only \p MIN(obj1->size, obj2->size) characters of each string
- * are taken into account.
- *
* \return It returns an integer less than, equal to, or greater than zero if
* \a obj1 is found, respectively, to be less than, to match, or be greater than
* obj2.
*
* \sa strcmp(3), strncmp(3), osl_compare_func.
*/
-int string_compare(const struct osl_object *obj1, const struct osl_object *obj2)
+__static__ int string_compare(const struct osl_object *obj1, const struct osl_object *obj2)
{
const char *str1 = (const char *)obj1->data;
const char *str2 = (const char *)obj2->data;
return 1;
}
-int com_list(int argc, char **argv)
+static int com_list(int argc, char **argv)
{
int ret;
return ret;
}
+/**
+ * The osltar main funcion.
+ *
+ * \param argc Usual argument count.
+ * \param argv Usual argument vector.
+ */
int main(int argc, char **argv)
{
if (argc < 2)