× 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.



Actually I also have some other problems like this one:

written += TIFFWriteFile(output, (tdata_t) "a PDF tag/r", 10);

this statements is executed hundreds of times, but sometimes it writes
garbage.

I've changed with something like:

strcpy(buffer, "a PDF tag/r");
written += TIFFWriteFile(output, (tdata_t) buffer, 10);

and it works always.

At this point I will check if I missed some PTF.

Beppe.

----- Original Message ----- 
From: "Jevgeni Astanovski" <J.Astanovski@xxxxxxxxxxxx>
To: "C programming iSeries / AS400" <c400-l@xxxxxxxxxxxx>
Sent: Wednesday, August 18, 2004 2:43 PM
Subject: RE: [C400-L] Ebcdic2ascii


> Compiles fine also under V5R2M0 - just tried, no warnings.
>
> > -----Original Message-----
> > From: Beppe Costagliola [mailto:beppecosta@xxxxxxxx]
> > Sent: Wednesday, August 18, 2004 2:09 PM
> > To: C programming iSeries / AS400
> > Subject: Re: [C400-L] Ebcdic2ascii
> >
> >
> > > Compiles fine - no problem. V4R5.
> >
> > But problems at V5R2:
> >
> >    19       !void funct(char *dest, const char *srce, size_t count)
> >    20       !à
> >    21     1 !  while(count-- != 0)
> > ===========>
> > ........a.....................................................
> > ..........
> > *=GRAVE==========> a - CZM0025  L'operando deve essere un lvalue
> > modificabile.
> >    22       !  à
> >    23     2 !    *dest++ = 256 - (*srce++) ;
> >    24       !  è
> >
> >
> > ----- Original Message ----- 
> > From: "Jevgeni Astanovski" <J.Astanovski@xxxxxxxxxxxx>
> > To: "C programming iSeries / AS400" <c400-l@xxxxxxxxxxxx>
> > Sent: Wednesday, August 18, 2004 12:44 PM
> > Subject: RE: [C400-L] Ebcdic2ascii
> >
> >
> > > #include <stdio.h>
> > > #include <stdlib.h>
> > >
> > > typedef int tsize_t;
> > >
> > > void funct(char *dest, const char *srce, size_t count) ;
> > >
> > > int main()
> > > {
> > >   tsize_t size ;
> > >   int count ;
> > >   char *buf ;
> > >
> > >   funct(buf, buf, (size_t) size) ;
> > >
> > >   return(1) ;
> > > }
> > >
> > > void funct(char *dest, const char *srce, size_t count)
> > > {
> > >   while(count-- != 0)
> > >   {
> > >     *dest++ = 256 - (*srce++) ;
> > >   }
> > > }
> > >
> > > I think, that this is more or less the same, as yours.
> > > Plane copy-paste from source file.
> > > Compiles fine - no problem. V4R5.
> > >
> > >
> > > > -----Original Message-----
> > > > From: Beppe Costagliola [mailto:beppecosta@xxxxxxxx]
> > > > Sent: Wednesday, August 18, 2004 12:04 PM
> > > > To: C programming iSeries / AS400
> > > > Subject: Re: [C400-L] Ebcdic2ascii
> > > >
> > > >
> > > > tsize_t is defined in tiffio.h with a note:
> > > >
> > > > * NB: tsize_t is int32 and not uint32 because some functions
> > > > *     return -1.
> > > > typedef int32 tsize_t;          /* i/o size in bytes */
> > > >
> > > > I changed the code to decrement count separately and I solved
> > > > the problem
> > > > but I was just wondering why it compiles fine on PC and
> > fails on AS.
> > > >
> > > >
> > > > ----- Original Message ----- 
> > > > From: "Jevgeni Astanovski" <J.Astanovski@xxxxxxxxxxxx>
> > > > To: "C programming iSeries / AS400" <c400-l@xxxxxxxxxxxx>
> > > > Sent: Wednesday, August 18, 2004 10:25 AM
> > > > Subject: RE: [C400-L] Ebcdic2ascii
> > > >
> > > >
> > > > > 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.
> > > > > >
> > > > > >
> > > > >
> > > > > _______________________________________________
> > > > > 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.
> > > > >
> > > >
> > > > _______________________________________________
> > > > 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.
> > > >
> > > >
> > >
> > > _______________________________________________
> > > 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.
> > >
> >
> > _______________________________________________
> > 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.
> >
> >
>
> _______________________________________________
> 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 ...

Replies:

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.