Changeset 4301


Ignore:
Timestamp:
Jan 24, 2010, 11:04:10 PM (7 years ago)
Author:
pterjan
Message:
  • Always draw all background in troff output, on beginning of lines too
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/codec/export.c

    r4300 r4301  
    10521052            if(ch == '\\')
    10531053                cur += sprintf(cur, "\\\\");
     1054            else if(ch == ' ')
     1055            {
     1056                /* Use unbreakable space at line ends, else spaces are dropped */
     1057                if(x == 0 || x == cv->width-1)
     1058                    cur += sprintf(cur, "%c%c", 0xc2, 0xa0);
     1059                else
     1060                    cur += caca_utf32_to_utf8(cur, ch);
     1061            }
    10541062            else
    10551063                cur += caca_utf32_to_utf8(cur, ch);
     
    10621070            started = 1;
    10631071        }
    1064 
    1065         /* Add unbreakable space at the end of lines, else spaces are dropped */
    1066         if(x > 0 && linechar[x-1] == ' ')
    1067             cur += sprintf(cur-1, "%c%c", 0xc2, 0xa0)-1;
    1068 
    10691072        cur += sprintf(cur, "\n");
    10701073    }
Note: See TracChangeset for help on using the changeset viewer.