Re: [xml] xmlSaveToFd: unexpected behavior while redirecting the 'stdout' stream to a file



On 03/04/2018 14:02, YuGiOhJCJ Mailing-List via xml wrote:
        printf("Content-Type: application/xhtml+xml;\n\n");

This operates on the stdout FILE pointer using buffered IO.

        ctxt = xmlSaveToFd(1, NULL, XML_SAVE_FORMAT);

This operates on the stdout file descriptor using unbuffered IO. You're mixing buffered and unbuffered IO.

Nick


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