[Top][All Lists]

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

Re: [PATCH] IBM z/OS + EBCDIC support

From: Daniel Richard G.
Subject: Re: [PATCH] IBM z/OS + EBCDIC support
Date: Wed, 23 Sep 2015 02:58:04 -0400

Okay, I tested your latest changes (git 4d83e798). There is one
assertion that needs to be #ifdef'ed out for EBCDIC:

    $ ./test-c-ctype
    /path/to/gltests/test-c-ctype.c:62: assertion 'c_isascii (c) == (c >= 0 && 
c < 0x80)' failed
    CEE5207E The signal SIGABRT was received.
    ABORT instruction

With that change, test-c-ctype passes.

I also tried a run with signed characters (-qchars=signed), and while
test-c-ctype passed, a number of other things broke. I'll be preparing
and submitting patches for those as well.

On Tue, 2015 Sep 22 19:02-0700, Paul Eggert wrote:
> > How would that match occur? c_isalpha() was/is using a "switch"
> > statement for EBCDIC.
> Oh, sorry, I was assuming that the substitution was being proposed
> for all the functions; but it's being proposed only for c_isascii,
> c_iscntrl, c_isgraph, c_isprint, and c_ispunct.  These functions
> are so rarely used that it probably doesn't matter that much what
> we do....

Okay, I understand. The functions that already had a complete "switch"
implementation, I left alone; that approach will work pretty much
regardless of encoding.

> > A simple program could generate tables for all the isxxxxx()
> > functions (see below) at compile time. Would you be inclined to do
> > it that way?
> I think we can do it without that kind of compile-time hassle, if we
> can assume that the compile-time locale is the same as the run-time.
> I installed the attached patch, which makes that assumption, and which
> I hope does the right thing.

I'm a bit uneasy about hard-coding the list of control characters for
c_iscntrl() like that.

What about having a check in test-c-ctype that compares c_iscntrl() with
its system counterpart? If the assumption is that alternate EBCDIC
encodings used with Gnulib will agree with EBCDIC-1047 on these
characters, then that should be checked.

Also, perhaps, that any character for which c_iscntrl() is true should
return false from most of the other functions...


Daniel Richard G. || address@hidden
My ASCII-art .sig got a bad case of Times New Roman.

reply via email to

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