MCPcopy Create free account
hub / github.com/apache/nuttx / kconfig_line

Function kconfig_line

tools/kconfig2html.c:749–794  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

747 ****************************************************************************/
748
749static char *kconfig_line(FILE *stream)
750{
751 char *ptr;
752
753 for (; ; )
754 {
755 /* Read the next line from the Kconfig file */
756
757 /* Is there already valid data in the line buffer? This can happen
758 * while parsing help text and we read one line too far.
759 */
760
761 if (!g_preread)
762 {
763 /* Read the next line */
764
765 if (!read_line(stream))
766 {
767 return NULL;
768 }
769 }
770
771 g_preread = false;
772
773 /* Replace all whitespace characters with spaces to simplify parsing */
774
775 for (ptr = g_line; *ptr; ptr++)
776 {
777 if (isspace(((int)*ptr)))
778 {
779 *ptr = ' ';
780 }
781 }
782
783 /* Skip any leading whitespace. Ignore empty lines and lines that
784 * contain only comments.
785 */
786
787 ptr = skip_space(g_line);
788 if (*ptr && *ptr != '#' && *ptr != '\n')
789 {
790 g_lnptr = ptr;
791 return ptr;
792 }
793 }
794}
795
796/****************************************************************************
797 * Name: tokenize

Callers 4

process_configFunction · 0.85
process_choiceFunction · 0.85
process_menuFunction · 0.85
parse_kconfigfileFunction · 0.85

Calls 3

read_lineFunction · 0.70
skip_spaceFunction · 0.70
isspaceFunction · 0.50

Tested by

no test coverage detected