× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Just curious, Beppe, where in headers is tsize_t defined? I failed to find it...
The same with tlong and thandle_t.
Wanted to test your program piece :-(

Jevgeni.

> -----Original Message-----
> From: Beppe Costagliola [mailto:beppecosta@xxxxxxxx]
> Sent: Tuesday, August 17, 2004 12:29 PM
> To: c400-l@xxxxxxxxxxxx
> Subject: [C400-L] Ebcdic2ascii
> 
> 
> 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.
>                                                               
>                           
> _______________________________________________
> This is the C programming iSeries / AS400 (C400-L) mailing list
> To post a message email: C400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/c400-l
> or email: C400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/c400-l.
> 
> 


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.