|
I'm trying to modify an existing module and add some code to convert to ascii
before writing to file.
This is the code:
==========
/* ebcdic-to-ascii */
void ebcdic2ascii(char *dest, const char *srce, size_t count);
const unsigned char toascii[256] = {
0x00, 0x01, 0x02, 0x03, 0x85, 0x09, 0x86, 0x7f . . . .
. . . .
static tsize_t
_tiffWriteProc(thandle_t fd, tdata_t buf, tsize_t size)
{
tlong count = size;
ebcdic2ascii(buf, buf, count);
return ((tsize_t) write((int) fd, buf, (size_t) size));
}
. . . . .
void
ebcdic2ascii(char *dest, const char *srce, size_t count)
{
while (count-- |= 0) {
*dest++ = toascii[*srce++];
}
}
===============
when I compile I get the error: CZM0025 the operand must be a lvalue modifiable
What's wrong ?
Thanks for help.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.