Update of /cvsroot/alsa/alsa-driver/utils
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32037
Modified Files:
mod-deps.c
Log Message:
Improved acinclude.m4 output - looks better and better
Index: mod-deps.c
===================================================================
RCS file: /cvsroot/alsa/alsa-driver/utils/mod-deps.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mod-deps.c 4 Mar 2004 12:34:54 -0000 1.2
+++ mod-deps.c 4 Mar 2004 12:57:35 -0000 1.3
@@ -58,7 +58,6 @@
// forced selection (dependency) part
struct sel *sel;
// misc
- int hitflag;
struct dep *next;
};
@@ -72,7 +71,7 @@
static struct dep *alloc_mem_for_dep(void);
static struct dep *find_or_create_dep(char *line);
static void add_dep(struct dep * dep, char *line, struct cond *template);
-static void add_select(struct dep * dep, char *line);
+static void add_select(struct dep * dep, char *line, struct cond *template);
static char *get_word(char *line, char *word);
static struct dep *find_dep(char *parent, char *depname);
static void del_all_from_list(void);
@@ -90,10 +89,32 @@
static char *hiddendir = "..";
static char *kernel_deps[] = {
- "ARCH_SA1100",
+ /* buses */
+ "ISA",
+ "ISAPNP",
+ "EISA",
+ "PCI",
"SBUS",
+ "L3",
+ "USB",
+ "PCMCIA",
+ /* architectures */
+ "ARM",
"PARISC",
+ "SPARC32",
+ "SPARC64",
+ "PPC",
+ "PPC64",
+ "X86_64",
+ "IA32_EMULATION",
+ /* architecture specific */
+ "ARCH_SA1100",
+ /* other drivers */
+ "RTC",
"GAMEPORT",
+ "VIDEO_DEV",
+ /* some flags */
+ "EXPERIMENTAL",
NULL
};
@@ -202,6 +223,11 @@
/* ignore some keywords */
if (buffer[0] == '#')
continue;
+ if (!strncmp(buffer, " ", 8)) {
+ buffer[0] = '\t';
+ for (idx = 8; idx <= strlen(buffer); idx++)
+ buffer[idx-7] = buffer[idx];
+ }
if (!strncmp(buffer, "endmenu", 7)) {
struct cond *otemplate;
state = READ_STATE_NONE;
@@ -242,7 +268,7 @@
if (!strncmp(buffer, "\tdepends on ", 12))
add_dep(dep, buffer + 12, *template);
if (!strncmp(buffer, "\tselect ", 8))
- add_select(dep, buffer + 8);
+ add_select(dep, buffer + 8, *template);
continue;
case READ_STATE_MENU:
if (!strncmp(buffer, "\tdepends on ", 12)) {
@@ -451,7 +477,7 @@
}
// Add a new forced (selected) dependency to the current one
-static void add_select(struct dep * dep, char *line)
+static void add_select(struct dep * dep, char *line, struct cond *template)
{
char *word = NULL;
struct sel *sel, *nsel;
@@ -460,6 +486,11 @@
if (word == NULL)
nomem();
get_word(line, word);
+ if (strncmp(word, "SND_", 4)) {
+ add_dep(dep, word, template);
+ free(word);
+ return;
+ }
nsel = calloc(sizeof(struct sel), 1);
if (nsel == NULL)
nomem();
@@ -566,7 +597,7 @@
}
}
-// Resolve all dependencies
+// Optimize all dependencies
static void optimize_dep(struct dep * parent)
{
struct cond *cond, *prev;
@@ -698,6 +729,10 @@
if (dep == NULL)
return 0;
+ for (idx = 0; kernel_deps[idx]; idx++) {
+ if (!strcmp(kernel_deps[idx], dep->name))
+ return 0;
+ }
for (idx = 0; no_cards[idx]; idx++) {
str = no_cards[idx];
if (*str == '%')
@@ -826,8 +861,6 @@
if (!is_toplevel(tempdep))
continue;
for (cond = tempdep->cond, cond_prev = NULL; cond; cond = cond->next) {
- //if (is_always_true(cond->dep))
- // continue;
if (!put_if)
printf("\tif ");
else {
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog