| 1588 | ****************************************************************************/ |
| 1589 | |
| 1590 | static inline char *process_config(FILE *stream, const char *varname, |
| 1591 | const char *kconfigdir, |
| 1592 | const char *kconfigname) |
| 1593 | { |
| 1594 | enum token_type_e tokid; |
| 1595 | struct config_s config; |
| 1596 | output_t outfunc; |
| 1597 | bool help; |
| 1598 | bool hidden; |
| 1599 | const char *paranum; |
| 1600 | char *token; |
| 1601 | char *ptr; |
| 1602 | int i; |
| 1603 | |
| 1604 | /* Get the configuration information */ |
| 1605 | |
| 1606 | memset(&config, 0, sizeof(struct config_s)); |
| 1607 | config.c_name = strdup(varname); |
| 1608 | |
| 1609 | /* Process each line in the configuration */ |
| 1610 | |
| 1611 | help = false; |
| 1612 | token = NULL; |
| 1613 | |
| 1614 | while ((ptr = kconfig_line(stream)) != NULL) |
| 1615 | { |
| 1616 | /* Process the first token on the Kconfig file line */ |
| 1617 | |
| 1618 | token = get_token(); |
| 1619 | if (token != NULL) |
| 1620 | { |
| 1621 | tokid = tokenize(token); |
| 1622 | switch (tokid) |
| 1623 | { |
| 1624 | case TOKEN_BOOL: |
| 1625 | case TOKEN_TRISTATE: |
| 1626 | { |
| 1627 | /* Save the type of the configuration variable */ |
| 1628 | |
| 1629 | config.c_type = tokid == |
| 1630 | TOKEN_BOOL ? VALUE_BOOL : VALUE_TRISTATE; |
| 1631 | |
| 1632 | /* Get the description following the type */ |
| 1633 | |
| 1634 | ptr = get_html_string(); |
| 1635 | if (ptr) |
| 1636 | { |
| 1637 | config.c_desc = strdup(ptr); |
| 1638 | } |
| 1639 | |
| 1640 | /* Indicate that the line has been consumed */ |
| 1641 | |
| 1642 | token = NULL; |
| 1643 | } |
| 1644 | break; |
| 1645 | |
| 1646 | case TOKEN_INT: |
| 1647 | { |
no test coverage detected