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 ); }
unsigned char *SaraORtn( register unsigned char *TempIndx ) { register short i; unsigned char *TempIndxm1 = TempIndx - 1; short SoreSeoTbLen = 6; /* 7 - 1 */ short OrAngTbLen = 8; /* 9 - 1 */ short MoreMarTbLen = 6; /* 7 - 1 */ short NoreNooTbLen = 1; /* 2 - 1 */ short ShoreChangTbLen = 3; /* 4 - 1 */ static char *SoreSeoTable[] = { "╩т┼╟ь", "╩т╣╟ь", "╩т╡├ь", "╩т┴╩├", "╩т╡╣", "╩тд╗", "╩т┼сб╣" }; static char *OrAngTable[] = { "═т│╖╤┬", "═т├д┬╥", "═т╦╩╘", "═т╣к╥", "═т╖╩╨", "═т┴╦╨", "═т┼└╨", "═т┼╦╨", "═т╚б" }; static char *MoreMarTable[] = { "┴т╦├╨╖╓б", "┴т╦├╩╛", "┴т╦╠╥├", "┴т╦├╒", "┴т╦╩╢", "┴т╣└╥╛", "┴т╣╕├├┴" }; static char *NoreNooTable[] = { "╣т┬║╥┬", "╣т├┤┴" }; static char *ShoreChangTable[] = { "кт┼║┼", "кт┼╕├", "кт┼┴", "кт┬" }; static char ToreTaharnWord[] = "╖т┴╣"; static char RoreReoWord[] = "├т╦░╥╣"; static char YoreYakWord[] = "┬т╩"; static char KorKaiWord[] = "вт┴┬"; switch ( *( TempIndxm1 ) ) { case SoreSeo: /* ╩т┼╟ь ╩т╣╟ь ╩т╡├ь ╩т┴╩├ ╩т╡╣ ╩тд╗ ╩т┼сб╣*/ for ( i = 0; i <= SoreSeoTbLen; ++i ) { if ( !( nstrcmp( SoreSeoTable[i], TempIndxm1 ) ) ) { return( TempIndx - 2 ); /* cut before consonant that before Sara O */ } } return( TempIndxm1 ); /* cut before sara O */ case OrAng: /* ═т│╖╤┬ ═т├д┬╥ ═т╦╩╘ ═т╣к╥ ═т╖╩╨ ═т┴╦╨ ═т┼└╨ ═т┼╦╨ ═т╚б*/ for ( i = 0; i <= OrAngTbLen; ++i ) { if ( !( nstrcmp( OrAngTable[i], TempIndxm1 ) ) ) { return( TempIndx - 2 ); /* cut before consonant that before Sara O */ } } return( TempIndxm1 ); /* cut before sara O */ case MoreMar: /* ┴т╦├╨╖╓б, ┴т╦├╩╛,┴т╦╠╥├,┴т╦├,┴т╦╩╢ */ for ( i = 0; i <= MoreMarTbLen; ++i ) { if ( !( nstrcmp( MoreMarTable[i], TempIndxm1 ) ) ) { return( TempIndx - 2 ); /* cut before consonant that before Sara O */ } } return( TempIndxm1 ); /* cut before sara O */ case NoreNoo: /* ╣т┬║╥┬ ╣т├┤┴ */ if ( !( nstrcmp( "╣т┴", TempIndxm1 ) ) && !( istlvwl( *( TempIndx - 2 ) ) ) ) { if ( !( isttnl( *( TempIndx + 2 ) ) ) ) { return( TempIndx - 2 ); /*cut before NoreNoo */ } } for ( i = 0; i <= NoreNooTbLen; ++i ) { if ( !( nstrcmp( NoreNooTable[i], TempIndxm1 ) ) ) { return( TempIndx - 2 ); /* cut before consonant that before Sara O */ } } return( TempIndxm1 ); /* cut before sara O */ case ShoreChang: /* кт┼║┼ кт┼╕├ кт┼┴ кт┬ */ for ( i = 0; i <= ShoreChangTbLen; ++i ) { if ( !( nstrcmp( ShoreChangTable[i], TempIndxm1 ) ) ) { return( TempIndx - 2 ); /* cut before consonant that before Sara O */ } } return( TempIndxm1 ); /* cut before sara O */ case ToreTaharn: /* ╖т┴╣ */ if ( nstrcmp( ToreTaharnWord, TempIndxm1 ) ) { return( TempIndxm1 ); /* cut before sara O */ } else { return( TempIndx - 2 ); /* cut before consonant that before Sara O */ } break; case RoreReo: /* ├т╦░╥╣ */ if ( nstrcmp( RoreReoWord, TempIndxm1 ) ) { return( TempIndxm1 ); /* cut before sara O */ } else { return( TempIndx - 2 ); /* cut before consonant that before Sara O */ } break; case YoreYak: /* ┬т╩ */ if ( nstrcmp( YoreYakWord, TempIndxm1 ) ) { return( TempIndxm1 ); /* cut before sara O */ } else { return( TempIndx - 2 ); /* cut before consonant that before Sara O */ } break; case KorKai: /* вт┴┬ */ if ( nstrcmp( KorKaiWord, TempIndxm1 ) ) { return( TempIndxm1 ); /* cut before sara O */ } else { return( TempIndx - 2 ); /* cut before consonant that before Sara O */ } break; /* default: return( TempIndx - 1 ); */ } return( TempIndx - 1 ); }