link-grammar-5.8.0/link-grammar/linkage/linkage.c
/**
 * Append an unmarked (i.e. without INFIXMARK) morpheme to join_buff.
 * join_buff is a zeroed-out buffer which has enough room for morpheme to be
 * added + terminating NUL.
 * Note that MT_PREFIX or MT_SUFFIX can be without an INFIX_MARK, in case
 * INFIX_MARK is not defined. XXX: What about MT_MIDDLE? (not in use yet).
 *
 * FIXME Combining contracted words is not handled yet, because combining
 * morphemes which have non-LL links to other words is not yet implemented.
 */
Append an unmarked  morpheme to join_buff.
join_buff is a zeroed-out buffer which has enough room for morpheme to be
added + terminating NUL.
Note that MT_PREFIX or MT_SUFFIX can be without an INFIX_MARK, in case
INFIX_MARK is not defined. XXX: What about MT_MIDDLE. (not in use yet).


Append an unmarked morpheme to join_buff . join_buff is a zeroed - out buffer which has enough room for morpheme to be added + terminating NUL . Note that MT_PREFIX or MT_SUFFIX can be without an INFIX_MARK in case INFIX_MARK is not defined . XXX : What about MT_MIDDLE . ( not in use yet ) .
static void add_morpheme_unmarked(Sentence sent, char *join_buff,
                                  const char *wm, Morpheme_type mt)
{
	const char infix_mark = INFIX_MARK(sent->dict->affix_table);
	const char *sm =  strrchr(wm, SUBSCRIPT_MARK);
	if (NULL == sm) sm = (char *)wm + strlen(wm);
	if ((MT_PREFIX == mt) && (infix_mark == sm[-INFIX_MARK_L]))
		strncat(join_buff, wm, sm-wm-INFIX_MARK_L);
	else if ((MT_SUFFIX == mt) && (infix_mark == wm[0]))
		strncat(join_buff, INFIX_MARK_L+wm, sm-wm-INFIX_MARK_L);
	else if ((MT_MIDDLE == mt))
		strncat(join_buff, INFIX_MARK_L+wm, sm-wm-2*INFIX_MARK_L);
	else
		strncat(join_buff, wm, sm-wm);
}
static void add_morpheme_unmarked ( Sentence sent , char * join_buff , const char * wm , Morpheme_type mt ) { const char infix_mark = INFIX_MARK ( sent -> dict -> affix_table ) ; const char * sm = strrchr ( wm , SUBSCRIPT_MARK ) ; if ( NULL == sm ) sm = ( char * ) wm + strlen ( wm ) ; if ( ( MT_PREFIX == mt ) && ( infix_mark == sm [ - INFIX_MARK_L ] ) ) strncat ( join_buff , wm , sm - wm - INFIX_MARK_L ) ; else if ( ( MT_SUFFIX == mt ) && ( infix_mark == wm [ 0 ] ) ) strncat ( join_buff , INFIX_MARK_L + wm , sm - wm - INFIX_MARK_L ) ; else if ( ( MT_MIDDLE == mt ) ) strncat ( join_buff , INFIX_MARK_L + wm , sm - wm - 2 * INFIX_MARK_L ) ; else strncat ( join_buff , wm , sm - wm ) ; }
Append an unmarked (i.e.
Append an unmarked ( i . e .