octave-maintainers
[Top][All Lists]
Advanced

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

Re: MinGW isprint test


From: Philip Nienhuis
Subject: Re: MinGW isprint test
Date: Wed, 29 Aug 2012 11:56:47 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6

Michael Goffioul wrote:
On Wed, Aug 29, 2012 at 10:20 AM, Philip Nienhuis <address@hidden
<mailto:address@hidden>> wrote:

    Philip Nienhuis wrote:

        Rik wrote:

            - mappers.cc: assert (isprint (charset), result) differs in
            column 10.
            \r\n versus \n line endings?

            8/28/12

            Philip,

            This one should be easy to check. Can you try the following
            at the
            command line?

            isprint ("\n")
            isprint ("\r")

            On Unix systems these are both false. It sounds like
            character 10
            ("\n") may be considered printable no MinGW.


        Both give 0.

        For completeness here are the relevant results from fntest.log:

        assert (isprint (charset),result) expected
        Columns 1 through 22:

        0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
        :
        but got
        Columns 1 through 22:

        0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0

        But:
        octave.exe:2> isprint ( "\t")
        ans = 1

        so it is TAB that is considered printable. Sorry for my miscounting.
        BTW isprint ("\t") does the same on octave-3.6.2_MinGW and
        3.4.3_MinGW.
        Apparently the test is wrong.


    That should read: on MinGW the result of isprint ("\t") seems wrong.


Indeed. I thought the reason was the Windows C runtime implementation,
but I compiled a simple C test program to check the return value of
"isprint" under MSVC, and it returns 0 for the TAB character (char 9).
This calls for further investigation.

If you send me that test prog source I could try to compile and run it under MinGW/gcc. I suppose it is a tiny proggie

Philip


reply via email to

[Prev in Thread] Current Thread [Next in Thread]