| 1955 | const char *kconfigfile); /* Forward reference */ |
| 1956 | |
| 1957 | static inline char *process_choice(FILE *stream, const char *kconfigdir, |
| 1958 | const char *kconfigname) |
| 1959 | { |
| 1960 | enum token_type_e tokid; |
| 1961 | struct choice_s choice; |
| 1962 | const char *paranum; |
| 1963 | char *token = NULL; |
| 1964 | char *ptr; |
| 1965 | bool help = false; |
| 1966 | |
| 1967 | /* Get the choice information */ |
| 1968 | |
| 1969 | memset(&choice, 0, sizeof(struct choice_s)); |
| 1970 | |
| 1971 | /* Process each line in the choice */ |
| 1972 | |
| 1973 | while ((ptr = kconfig_line(stream)) != NULL) |
| 1974 | { |
| 1975 | /* Process the first token on the Kconfig file line */ |
| 1976 | |
| 1977 | token = get_token(); |
| 1978 | if (token != NULL) |
| 1979 | { |
| 1980 | tokid = tokenize(token); |
| 1981 | switch (tokid) |
| 1982 | { |
| 1983 | case TOKEN_PROMPT: |
| 1984 | { |
| 1985 | /* Get the prompt string */ |
| 1986 | |
| 1987 | ptr = get_html_string(); |
| 1988 | if (ptr) |
| 1989 | { |
| 1990 | choice.c_prompt = strdup(ptr); |
| 1991 | } |
| 1992 | |
| 1993 | /* Indicate that the line has been consumed */ |
| 1994 | |
| 1995 | token = NULL; |
| 1996 | } |
| 1997 | break; |
| 1998 | |
| 1999 | case TOKEN_DEFAULT: |
| 2000 | { |
| 2001 | process_default(stream, &choice.c_default); |
| 2002 | token = NULL; |
| 2003 | } |
| 2004 | break; |
| 2005 | |
| 2006 | case TOKEN_DEPENDS: |
| 2007 | { |
| 2008 | process_dependson(); |
| 2009 | choice.c_ndependencies++; |
| 2010 | token = NULL; |
| 2011 | } |
| 2012 | break; |
| 2013 | |
| 2014 | case TOKEN_HELP: |
no test coverage detected