Example #1
0
unsigned char *WoreWaanRtn( register unsigned char *TempIndx ) {
	register unsigned char *plus1 = TempIndx + 1, *minus3 = TempIndx - 3;

	if ( istcon( *( TempIndx - 1 ) ) ) {
		if ( istlvwl( *( TempIndx - 2 ) ) ) {
			return( minus3 );
		} else if ( istcon( *( TempIndx - 2 ) ) && istcon( *plus1 ) ) {
			switch ( *( TempIndx + 1 ) ) {
			case OrAng:
				return( FAIL );
			case RoreReo:
				if ( *( TempIndx + 2 ) == RoreReo ) {
					return( FAIL );
				}
			default:
				if ( plus1 <= RightMargin ) {
					if ( *( TempIndx + 3 ) == Karan ) {
						return( FAIL );
					} else {
						return( !istrvwl( *( TempIndx + 2 ) ) ? plus1 : FAIL );
					}
				} else {
					return( FAIL );
				}
			}
		} else if ( isttnl( *( TempIndx - 1 ) ) && istcon( *( TempIndx - 2 ) ) && istcon( *minus3 ) ) {

			if ( plus1 <= RightMargin ) {
				return( plus1 );
			} else if ( !nstrcmp( "¡Ã", minus3 ) || !nstrcmp( "¡Å", minus3 ) || !nstrcmp( "˹", minus3 ) || !nstrcmp( "ËÂ", minus3 ) ) {
				return( TempIndx - 4 );
			} else {
				return( minus3 );
			}
		}
	}
	return( FAIL );
}
Example #2
0
unsigned char *SaraUeRtn( unsigned char *TempIndx ) {
	if ( isttnl( *( TempIndx + 1 ) ) ) {	/* Check vowel routine here */
		if ( ( TempIndx + 2 ) <= RightMargin ) {
			return( TempIndx + 2 );
		}
	} else {
		switch ( *( TempIndx - 1 ) ) {
		case RoreReo:
			if ( findchar( *( TempIndx + 1 ), ":換" ) ) {
				if ( !istrvwl( *( TempIndx + 2 ) ) && TempIndx + 2 <= RightMargin ) {
					return( TempIndx + 1 );
				}
			} else {
				return( TempIndx );
			}
			break;
		case HorNokHook:
			switch ( *( TempIndx + 1 ) ) {
			case KoreGai:
			case DoreDek:
			case MoreMar:
				return( TempIndx - 2 );
			default:
				return( TempIndx );
			}
		case HorHeeb:
			if ( *( TempIndx + 1 ) == NgorNgoo ) {
				return( TempIndx - 2 );
			} else {
				return( TempIndx );
			}
		case OrAng:
			if ( findchar( *( TempIndx + 1 ), ":換" ) ) {
				if ( TempIndx + 1 <= RightMargin ) {
					return( TempIndx + 1 );
				} else {
					return( TempIndx - 2 );
				}
			} else {
				return( TempIndx );
			}
		default:
			if ( ( TempIndx + 1 ) <= RightMargin ) {
				return( TempIndx + 1 );
			}
		}
	}

	/* Check to cut in front */
	/* if ( !findchar( *( TempIndx - 1), "港壇" ) ) {
		return( TempIndx - 2 );
	} else {
		return( FAIL );
	}  */ /* corrected by Subun */
	/* modified by Subun  : date 24 May, 1988 */

	switch ( *( TempIndx - 1 ) ) {
	case NoreNoo:
		if ( !findchar( *( TempIndx - 2 ), "ぜ僕" ) ) {
			return( TempIndx - 2 );
		}
		break;
	case MoreMar:
		if ( *( TempIndx - 2 ) != HorHeeb ) {
			return( TempIndx - 2 );
		} else {
			return( TempIndx - 3 );
		} /* cut before HorHeep */
	case RoreReo:
		if ( !findchar( *( TempIndx - 2 ), "さ讃" ) ) {
			return( TempIndx - 2 );
		}
		break;
	case LoreLing:
		if ( !findchar( *( TempIndx - 2 ), ",脅瞥" ) ) {
			return( TempIndx - 2 );
		}
		break;
	default:
		return( TempIndx - 2 );
	}
	return( FAIL );
}