X-Git-Url: http://git.tuebingen.mpg.de/?p=adu.git;a=blobdiff_plain;f=interactive.c;h=7327ee168eaf264c6830a1ed54052972ff244ce5;hp=3cfb3a2f5ee284c0f757d21e71f4058c21601daa;hb=ca20c17a6742464bcf861fe856a4caddf2bfeab2;hpb=09b30a0e3aeba620db7daa3d81b30bbb5727dda3 diff --git a/interactive.c b/interactive.c index 3cfb3a2..7327ee1 100644 --- a/interactive.c +++ b/interactive.c @@ -1,3 +1,11 @@ +/* + * Copyright (C) 2008 Andre Noll + * + * Licensed under the GPL v2. For licencing details see COPYING. + */ + +/** \file interactive.c \brief Commands for interactive mode. */ + #include /* isspace() */ #include "adu.h" @@ -26,6 +34,7 @@ struct interactive_command { static struct uid_range *admissible_uids; static struct format_info *fi; +/** The set of supported interactive commands. */ #define INTERACTIVE_COMMANDS \ INTERACTIVE_COMMAND(set, "change the current configuration") \ INTERACTIVE_COMMAND(reset, "reset configuration to defaults") \ @@ -34,6 +43,7 @@ static struct format_info *fi; INTERACTIVE_COMMAND(source, "read and execute interactive commands from a file") +/** \cond doxygen is not smart enough for this */ #define INTERACTIVE_COMMAND(name, desc) \ static int icom_ ## name (char *line); @@ -52,7 +62,9 @@ struct interactive_command icmds[] = { INTERACTIVE_COMMANDS {.name = NULL} }; +/** \endcond */ +/** Iterate over the list of all interactive commands. */ #define FOR_EACH_COMMAND(c) for (c = icmds; c->name; c++) static int read_input_line(char *line, size_t size) @@ -74,6 +86,9 @@ static int icom_help(__a_unused char *line) return 1; } +/** + * Print the list of commands with short descriptions. + */ void print_interactive_help(void) { struct interactive_command *c; @@ -184,6 +199,11 @@ out: return ret; } +/** + * The main function for interactive mode. + * + * \return Standard. + */ int com_interactive(void) { char line[255];