chiark / gitweb /
Merge branch 'protogen'
[disorder] / clients / disorder.c
index 5d47bb120174dbecfd9cb1e466f574587d14e0af..b401c62bbdb4204d054eedadf00b6b3592b2ba06 100644 (file)
@@ -505,9 +505,15 @@ static void cf_setup_guest(char **argv) {
     exit(EXIT_FAILURE);
 }
 
     exit(EXIT_FAILURE);
 }
 
+/** @brief A scheduled event read from the server */
 struct scheduled_event {
 struct scheduled_event {
+  /** @brief When event should occur */
   time_t when;
   time_t when;
+
+  /** @brief Details of action */
   struct kvp *actiondata;
   struct kvp *actiondata;
+
+  /** @brief Event ID */
   char *id;
 };
 
   char *id;
 };
 
@@ -669,12 +675,28 @@ static void cf_playlist_set(char **argv) {
     exit(EXIT_FAILURE);
 }
 
     exit(EXIT_FAILURE);
 }
 
-static const struct command {
+/** @brief Command-line client's definition of a command */
+static const struct client_command {
+  /** @brief Command name */
   const char *name;
   const char *name;
-  int min, max;
+
+  /** @brief Minimum number of argument */
+  int min;
+
+  /** @brief Maximum number of argument */
+  int max;
+
+  /** @brief Pointer to function implementing command */
   void (*fn)(char **);
   void (*fn)(char **);
+
+  /** @brief Function to recognize a valid argument, or NULL */
   int (*isarg)(const char *);
   int (*isarg)(const char *);
-  const char *argstr, *desc;
+
+  /** @brief Summary of arguments */
+  const char *argstr;
+
+  /** @brief Description */
+  const char *desc;
 } commands[] = {
   { "adduser",        2, 3, cf_adduser, isarg_rights, "USERNAME PASSWORD [RIGHTS]",
                       "Create a new user" },
 } commands[] = {
   { "adduser",        2, 3, cf_adduser, isarg_rights, "USERNAME PASSWORD [RIGHTS]",
                       "Create a new user" },