link-grammar-5.8.0/link-grammar/dict-common/print-dict.c
/* a sentinel to request an expression display */
a sentinel to request an expression display
a sentinel to request an expression display
static bool validate_flags(const char *display_type, const char *flags)
{
	const char *known_flags;
	if (&do_display_expr == display_type)
		known_flags = "lm";
	else
		known_flags = "afmr";
	size_t unknown_flag_pos = strspn(flags, known_flags);
	if (flags[unknown_flag_pos] != '\0')
	{
		prt_error("Error: Token display: Unknown flag \"%c\".\n",
		          flags[unknown_flag_pos]);
		if (&do_display_expr == display_type)
		{
			prt_error("Valid flags for the \"!!word/\" command "
			          "(show expression):\n"
			          "l - low level expression details.\n"
			          "m - macro context.\n");
		}
		else
		{
			prt_error("Valid flags for the \"!!word//\" command "
			          "(show disjuncts):\n"
			          "a - any connector order.\n"
			          "f - full disjunct specification.\n"
			          "m - macro context for connectors.\n"
			          "r - regex pattern (automatically detected usually).\n");
		}
		return false;
	}
	return true;
}
static bool validate_flags ( const char * display_type , const char * flags ) { const char * known_flags ; if ( & do_display_expr == display_type ) known_flags = " " ; else known_flags = " " ; size_t unknown_flag_pos = strspn ( flags , known_flags ) ; if ( flags [ unknown_flag_pos ] != ' \0 ' ) { prt_error ( " \" \" \n " , flags [ unknown_flag_pos ] ) ; if ( & do_display_expr == display_type ) { prt_error ( " \" \" " " \n " " \n " " \n " ) ; } else { prt_error ( " \" \" " " \n " " \n " " \n " " \n " " \n " ) ; } return false ; } return true ; }
a sentinel to request an expression display
a sentinel to request an expression display