-const char actions_rcs[] = "$Id: actions.c,v 1.33 2002/05/26 12:14:19 roro Exp $";
+const char actions_rcs[] = "$Id: actions.c,v 2.0 2002/06/04 14:34:21 jongfoster Exp $";
/*********************************************************************
*
- * File : $Source: /cvsroot/ijbswa/current/actions.c,v $
+ * File : $Source: /cvsroot/ijbswa/current/src/actions.c,v $
*
* Purpose : Declares functions to work with actions files
* Functions declared include: FIXME
*
* Revisions :
* $Log: actions.c,v $
+ * Revision 2.0 2002/06/04 14:34:21 jongfoster
+ * Moving source files to src/
+ *
* Revision 1.33 2002/05/26 12:14:19 roro
* Change unsigned to unsigned long in actions_name struct. This closes
* SourceForge Bug #539284.
* an enumerated type (well, the preprocessor equivalent). Here are
* the values:
*/
-#define AV_NONE 0 /* +opt -opt */
-#define AV_ADD_STRING 1 /* +stropt{string} */
-#define AV_REM_STRING 2 /* -stropt */
-#define AV_ADD_MULTI 3 /* +multiopt{string} +multiopt{string2} */
-#define AV_REM_MULTI 4 /* -multiopt{string} -multiopt */
-
-/*
- * We need a structure to hold the name, flag changes,
- * type, and string index.
+#define AV_NONE 0 /**< Action type: +bool-action or -bool-action */
+#define AV_ADD_STRING 1 /**< Action type: +string-action{string} */
+#define AV_REM_STRING 2 /**< Action type: -string-action */
+#define AV_ADD_MULTI 3 /**< Action type: +multi-action{string} */
+#define AV_REM_MULTI 4 /**< Action type: -multi-action{string} or -multi-action */
+
+/**
+ * A structure holding information about a single built-in action string.
*/
struct action_name
{
- const char * name;
- unsigned long mask; /* a bit set to "0" = remove action */
- unsigned long add; /* a bit set to "1" = add action */
- int takes_value; /* an AV_... constant */
- int index; /* index into strings[] or multi[] */
+ const char * name; /**< Action name */
+ unsigned long mask; /**< A bit set to "0" = remove action */
+ unsigned long add; /**< A bit set to "1" = add action */
+ int takes_value; /**< An AV_... constant */
+ int index; /**< Index into strings[] or multi[] */
};
-/*
- * And with those building blocks in place, here's the array.
+/**
+ * The array of all built-in action strings.
*/
static const struct action_name action_names[] =
{
};
+/**
+ * The currently loaded actions files.
+ */
+static struct file_list *current_actions_file[MAX_ACTION_FILES] = {
+ NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL
+};
+
+
static int load_one_actions_file(struct client_state *csp, int fileid);
}
-static struct file_list *current_actions_file[MAX_ACTION_FILES] = {
- NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL
-};
-
-
#ifdef FEATURE_GRACEFUL_TERMINATION
/*********************************************************************
*
return 0;
}
+
+/** load_one_actions_file() parser status: At start of file. */
+#define MODE_START_OF_FILE 1
+
+/** load_one_actions_file() parser status: In "{{settings}}" block. */
+#define MODE_SETTINGS 2
+
+/** load_one_actions_file() parser status: In "{{description}}" block. */
+#define MODE_DESCRIPTION 3
+
+/** load_one_actions_file() parser status: In "{{alias}}" block. */
+#define MODE_ALIAS 4
+
+/** load_one_actions_file() parser status: In "{+some-actions}" block. */
+#define MODE_ACTIONS 5
+
+
/*********************************************************************
*
* Function : load_one_actions_file
* Note: Keep these in the order they occur in the file, they are
* sometimes tested with <=
*/
-#define MODE_START_OF_FILE 1
-#define MODE_SETTINGS 2
-#define MODE_DESCRIPTION 3
-#define MODE_ALIAS 4
-#define MODE_ACTIONS 5
int mode = MODE_START_OF_FILE;