[svn-commits] branch group/autoconf_and_menuselect r22200 - /team/group/autoconf_and_menuse...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Sun Apr 23 06:23:35 MST 2006


Author: russell
Date: Sun Apr 23 08:23:34 2006
New Revision: 22200

URL: http://svn.digium.com/view/asterisk?rev=22200&view=rev
Log:
various cleanups for things pointed out when building with more strict
build options

Modified:
    team/group/autoconf_and_menuselect/build_tools/Makefile
    team/group/autoconf_and_menuselect/build_tools/menuselect.c
    team/group/autoconf_and_menuselect/build_tools/menuselect.h
    team/group/autoconf_and_menuselect/build_tools/menuselect_curses.c

Modified: team/group/autoconf_and_menuselect/build_tools/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/build_tools/Makefile?rev=22200&r1=22199&r2=22200&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/build_tools/Makefile (original)
+++ team/group/autoconf_and_menuselect/build_tools/Makefile Sun Apr 23 08:23:34 2006
@@ -1,11 +1,15 @@
-menuselect: menuselect.o menuselect_curses.o
-	$(CC) -g -o $@ $< menuselect_curses.o ../mxml/libmxml.a -lcurses
+MENUSELECT_OBJS=menuselect.o menuselect_curses.o
+
+MENUSELECT_CFLAGS=-g -c -D_GNU_SOURCE -I../ -I../include/
+
+menuselect: $(MENUSELECT_OBJS)
+	$(CC) -g -o $@ $(MENUSELECT_OBJS) ../mxml/libmxml.a -lcurses
 
 menuselect.o: menuselect.c menuselect.h
-	$(CC) -D_GNU_SOURCE -g -c -o $@ -I../ -I../include/ $<
+	$(CC) -o $@ $(MENUSELECT_CFLAGS) $<
 
 menuselect_curses.o: menuselect_curses.c menuselect.h
-	$(CC) -D_GNU_SOURCE -g -c -o $@ -I../ -I../include/ $<
+	$(CC) -o $@ $(MENUSELECT_CFLAGS) $<
 
 clean:
 	rm -f menuselect *.o

Modified: team/group/autoconf_and_menuselect/build_tools/menuselect.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/build_tools/menuselect.c?rev=22200&r1=22199&r2=22200&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/build_tools/menuselect.c (original)
+++ team/group/autoconf_and_menuselect/build_tools/menuselect.c Sun Apr 23 08:23:34 2006
@@ -89,6 +89,17 @@
 /*! Force a clean of the source tree */
 int force_clean = 0;
 
+int add_category(struct category *cat);
+int add_member(struct member *mem, struct category *cat);
+int parse_makeopts_xml(const char *makeopts_xml);
+int process_deps(void);
+int build_member_list(void);
+void mark_as_present(const char *member, const char *category);
+int parse_existing_config(const char *infile);
+int generate_makeopts_file(void);
+void free_member_list(void);
+void free_trees(void);
+
 /*! \brief a wrapper for calloc() that generates an error message if the allocation fails */
 static inline void *my_calloc(size_t num, size_t len)
 {
@@ -362,7 +373,7 @@
 deps_file_free:
 
 	/* Free the dependency list we built from the file */
-	while (dep_file = AST_LIST_REMOVE_HEAD(&deps_file, list))
+	while ((dep_file = AST_LIST_REMOVE_HEAD(&deps_file, list)))
 		free(dep_file);
 
 	return res;
@@ -541,11 +552,11 @@
 	struct depend *dep;
 	struct conflict *cnf;
 
-	while (cat = AST_LIST_REMOVE_HEAD(&categories, list)) {
-		while (mem = AST_LIST_REMOVE_HEAD(&cat->members, list)) {
-			while (dep = AST_LIST_REMOVE_HEAD(&mem->deps, list))
+	while ((cat = AST_LIST_REMOVE_HEAD(&categories, list))) {
+		while ((mem = AST_LIST_REMOVE_HEAD(&cat->members, list))) {
+			while ((dep = AST_LIST_REMOVE_HEAD(&mem->deps, list)))
 				free(dep);
-			while (cnf = AST_LIST_REMOVE_HEAD(&mem->conflicts, list))
+			while ((cnf = AST_LIST_REMOVE_HEAD(&mem->conflicts, list)))
 				free(cnf);
 			free(mem);
 		}
@@ -558,7 +569,7 @@
 {
 	struct tree *tree;
 
-	while (tree = AST_LIST_REMOVE_HEAD(&trees, list)) {
+	while ((tree = AST_LIST_REMOVE_HEAD(&trees, list))) {
 		mxmlDelete(tree->root);
 		free(tree);
 	}

Modified: team/group/autoconf_and_menuselect/build_tools/menuselect.h
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/build_tools/menuselect.h?rev=22200&r1=22199&r2=22200&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/build_tools/menuselect.h (original)
+++ team/group/autoconf_and_menuselect/build_tools/menuselect.h Sun Apr 23 08:23:34 2006
@@ -72,7 +72,14 @@
 int run_menu(void);
 
 int count_categories(void);
+
 int count_members(struct category *cat);
+
+/*! \brief Toggle a member of a category at the specified index to enabled/disabled */
+void toggle_enabled(struct category *cat, int index);
+
+/*! \brief Enable/Disable all members of a category as long as dependencies have been met and no conflicts are found */
+void set_all(struct category *cat, int val);
 
 /*! \brief returns non-zero if the string is not defined, or has zero length */
 static inline int strlen_zero(const char *s)

Modified: team/group/autoconf_and_menuselect/build_tools/menuselect_curses.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/build_tools/menuselect_curses.c?rev=22200&r1=22199&r2=22200&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/build_tools/menuselect_curses.c (original)
+++ team/group/autoconf_and_menuselect/build_tools/menuselect_curses.c Sun Apr 23 08:23:34 2006
@@ -21,7 +21,7 @@
  *
  * \author Russell Bryant <russell at digium.com>
  * 
- * \brief curses frontend for the Asterisk module selection
+ * \brief curses frontend for Asterisk module selection
  */
 
 #include "autoconfig.h"
@@ -62,6 +62,14 @@
 	"",
 	"XXX means dependencies have not been met"
 };
+
+void winch_handler(int sig);
+void show_help(WINDOW *win);
+void draw_main_menu(WINDOW *menu, int curopt);
+void draw_category_menu(WINDOW *menu, struct category *cat, int start, int end, int curopt);
+int run_category_menu(WINDOW *menu, int cat_num);
+int run_category_menu(WINDOW *menu, int cat_num);
+void draw_title_window(WINDOW *title);
 
 /*! \brief Handle a window resize in xterm */
 void winch_handler(int sig)



More information about the svn-commits mailing list