Re: Esc-P in mcedit: What exactly happens?



Christian Dysthe wrote:
... In mcedit I am using Esc-P which sort of
justifies the  text. However, when doing it some words get two spaces
between them.  Why is that? Or rather, what is Esc-P actually doing?                                          
                                                                          

Esc-P or Alt-P convert linefeeds into spaces, and spaces into linefeeds,
it doesn't actually insert or delete any characters.

static void strip_newlines (unsigned char *t, int size)
{
    unsigned char *p = t;
    while (size--) {
        *p = *p == '\n' ? ' ' : *p;
        p++;
    }
}

As you can see strip_newlines() doesn't actually remove anything, it
only changes linefeeds into spaces. Is this a bug? I think so myself.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]