nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] corruption when attaching all-null files

2014-05-11 05:54:57
Hi Paul,

here's the place where the new "containsnul" is used, for CT_TEXT and
CT_APPLICATION.
...
        case CT_TEXT:
            if (contains8bit && !containsnul && !linelen && !linespace && 
!checksw)
                ct->c_encoding = CE_8BIT;
            else if (contains8bit || containsnul || linelen || linespace || 
checksw)
                ct->c_encoding = CE_QUOTED;
            else
                ct->c_encoding = CE_7BIT;
            break;

The duplication of contains8bit seems overly complex.

    case CT_TEXT:
        if (contains8bit)
            ct->c_encoding = (containsnul || linelen || linespace || checksw) ?
                CE_QUOTED : CE_8BIT;
        else
            ct->c_encoding = CE_7BIT;

Cheers, Ralph.

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>