Changeset 1402 for toilet


Ignore:
Timestamp:
Nov 15, 2006, 1:07:00 PM (16 years ago)
Author:
Sam Hocevar
Message:
  • Fix universal smushing.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • toilet/trunk/src/figlet.c

    r1401 r1402  
    125125            {
    126126                if(xleft < cx->x &&
    127                    smush(cucul_get_char(cx->charcv, xright, y),
    128                          cucul_get_char(cx->cv, cx->x - 1 - xleft, cx->y + y),
     127                   smush(cucul_get_char(cx->cv, cx->x - 1 - xleft, cx->y + y),
     128                         cucul_get_char(cx->charcv, xright, y),
    129129                         0))
    130130                    xleft++;
     
    376376static uint32_t smush(uint32_t ch1, uint32_t ch2, unsigned int mode)
    377377{
    378 
    379378    /* Rule 1 */
    380379    if(ch1 == ch2 && ch1 != 0xa0)
     
    392391            return ch2;
    393392
     393        if(ch2 == '_' && strchr(rule2, ch1))
     394            return ch1;
     395
    394396        /* Rule 3 */
    395397        if((tmp1 = strchr(rule3, ch1)) && (tmp2 = strchr(rule3, ch2)))
Note: See TracChangeset for help on using the changeset viewer.