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

Function htmlize_text

tools/kconfig2html.c:518–545  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

516 ****************************************************************************/
517
518static char *htmlize_text(const char *src)
519{
520 char *dest = g_scratch;
521
522 /* We may get here with the source pointer equal to NULL (or a pointer to
523 * a NUL string). Return the
524 * disfavor.
525 */
526
527 if (!src || !*src)
528 {
529 return NULL;
530 }
531
532 /* Transfer each character from the source string into the scratch buffer */
533
534 for (; *src; src++)
535 {
536 /* Expand characters as necessary. NOTE: There is no check if the
537 * HTML-expanded text overflows the g_scratch[] buffer. If you see
538 * errors, be suspicious.
539 */
540
541 dest += htmlize_character(dest, *src);
542 }
543
544 return g_scratch;
545}
546
547/****************************************************************************
548 * Name: htmlize_expression

Callers 2

get_html_stringFunction · 0.85
process_helpFunction · 0.85

Calls 1

htmlize_characterFunction · 0.85

Tested by

no test coverage detected