Hi Paul,
The macros are not compatible (I suspect) with PL/I or BPX1*. For some
years, using Borland compilers, I managed to get the 2 byte length field
just in front of the string. I couldn't use a structure, which would
have guaranteed the position because then the debugger and all the
routines that expected the binary zero to be present wouldn't function.
So, defined the binary length part, and immediately followed it with the
string. That worked fine until I used the GCC compiler, and it insisted
on placing a variable number of filler bytes between length word, and
the string. So, total revamp, and nothing was the same in my bit world
again!!!
What is needed is for ANSI to bite the bullet and fix the problem. Or
for someone big, like IBM to do it, and force a standard change. (As an
aside, there is a language called D, which has a length word for
strings, I believe. It is written by Walter Bright, who wrote the
original Zortech C compilers. Bright by name, bright by nature... I
think it uses the GCC C compiler as a backend.)
But I shall write to ANSI now. Again, I think....
The thing is that there is quite a lot of straight C code making it's
way into Z/OS at the moment. And it should take into account these
performance robbing routines.
Clem
Paul Gilmartin wrote:
In a recent note, Clem Clarke said:
Date: Fri, 13 Apr 2007 15:11:45 +0800
I have spent some years studying this problem and have developed some
User friendly C macros that solve the problem.
These are reminiscent of the StrAllocCat, StrAllocCopy, et. al.
family of string functions which are used in Mosaic and its
browser progeny. References at site:w3.org and site:webhistory.org
for example.
We're in agreement tnat C strings were ill-conceived. z/OS Unix
services BPX1* assembler callable interfaces wisely eschewed them
in favor of descriptors. Are your macros compatible with either
the descriptors used by PL/I or those used by BPX1*? (Are the
two the same?)
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html