link-grammar-5.8.0/link-grammar/dict-common/print-dict.c
/**
 * A callback function to display \p word number of disjuncts and file name.
 *
 * @arg Callback args (unused).
 * @return String to display. Must be freed by the caller.
 */
A callback function to display \p word number of disjuncts and file name.
@arg Callback args (unused).
@return String to display. Must be freed by the caller.
A callback function to display \ p word number of disjuncts and file name . @arg Callback args ( unused ) . @return String to display . Must be freed by the caller .
static char *display_word_info(Dictionary dict, const char *word,
                               const void **arg)
{
	const char * regex_name;
	Dict_node *dn_head;
	dn_head = dictionary_lookup_wild(dict, word);
	if (dn_head)
	{
		char *out = display_counts(word, dn_head);
		free_lookup_list(dict, dn_head);
		return out;
	}
	regex_name = match_regex(dict->regex_root, word);
	if (regex_name)
	{
		return display_word_info(dict, regex_name, arg);
	}
	return NULL;
}
static char * display_word_info ( Dictionary dict , const char * word , const void * * arg ) { const char * regex_name ; Dict_node * dn_head ; dn_head = dictionary_lookup_wild ( dict , word ) ; if ( dn_head ) { char * out = display_counts ( word , dn_head ) ; free_lookup_list ( dict , dn_head ) ; return out ; } regex_name = match_regex ( dict -> regex_root , word ) ; if ( regex_name ) { return display_word_info ( dict , regex_name , arg ) ; } return NULL ; }
A callback function to display \p word number of disjuncts and file name.
A callback function to display \ p word number of disjuncts and file name .
/* Recurse, if it's a regex match */