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

Function findchar

tools/kconfig2html.c:829–858  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

827 ****************************************************************************/
828
829static char *findchar(char *ptr, char ch)
830{
831 bool escaped = false;
832
833 /* Search for the leading quotation marked */
834
835 for (; *ptr; ptr++)
836 {
837 if (escaped)
838 {
839 /* Skip over this character and reset the escaped flag */
840
841 escaped = false;
842 }
843 else if (*ptr == '\\')
844 {
845 /* Set the escaped flag to skip over the next character */
846
847 escaped = true;
848 }
849 else if (*ptr == ch)
850 {
851 /* We have found the (unescaped) character we are looking for */
852
853 return ptr;
854 }
855 }
856
857 return NULL;
858}
859
860/****************************************************************************
861 * Name: get_token

Callers 2

get_tokenFunction · 0.85
get_html_stringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected