[asterisk-commits] branch russell/make_menuconfig - r7466
/team/russell/make_menuconfig/build_to...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Dec 13 01:16:42 CST 2005
Author: russell
Date: Tue Dec 13 01:16:41 2005
New Revision: 7466
URL: http://svn.digium.com/view/asterisk?rev=7466&view=rev
Log:
add some comments and rename a function to something that is more appropriate
Modified:
team/russell/make_menuconfig/build_tools/menuconfig.c
Modified: team/russell/make_menuconfig/build_tools/menuconfig.c
URL: http://svn.digium.com/view/asterisk/team/russell/make_menuconfig/build_tools/menuconfig.c?rev=7466&r1=7465&r2=7466&view=diff
==============================================================================
--- team/russell/make_menuconfig/build_tools/menuconfig.c (original)
+++ team/russell/make_menuconfig/build_tools/menuconfig.c Tue Dec 13 01:16:41 2005
@@ -55,6 +55,18 @@
(__tmp); \
})
+/*!
+ The member and category structures are used to maintain our own list of all
+ of the categories and members in these categories that are specified in the
+ build options file.
+
+ The reason we need this is that we have to maintain information about which
+ options are enabled and disabled. This information is read from any existing
+ build configuration, and then changed as the user navigates the system. We
+ will then use this information to output a new build configuration file.
+
+ {
+*/
struct member {
const char *name;
const char *desc;
@@ -69,12 +81,25 @@
struct category *next;
} *categories = NULL;
+/*! } */
+
+/*!
+ We have to maintain a pointer to the root of the tree generated from reading
+ the build options XML file so that we can free it when we're done. We don't
+ copy any of the information over from this tree. Our list is just a
+ convenient mapping to the information contained in this list with one
+ additional piece of information - whether the build option is enabled or not.
+*/
static mxml_node_t *root;
+/*! The input build options file - TODO Make this optionally specified as a command line argument */
static const char *build_options = BUILD_OPTIONS_DEFAULT;
+/*! The output build configuration file - TODO Make this optionally specified as a command line argument */
static const char *build_config = BUILD_CONFIG_DEFAULT;
+/*! Maximum number of characters horizontally */
int max_x = 0;
+/*! Maximum number of characters vertically */
int max_y = 0;
static inline int strlen_zero(const char *s)
@@ -332,7 +357,7 @@
close(f);
}
-int print_member_list(void)
+int output_build_config(void)
{
FILE *f;
struct category *cat;
@@ -653,7 +678,7 @@
res = run_menu();
if (!res)
- res = print_member_list();
+ res = output_build_config();
mxmlDelete(root);
More information about the asterisk-commits
mailing list