On Tue, 19 Mar 2002, Scott Klement wrote: > > So I didn't think at all about porting until you mentioned that pipes in > > Windows really suck and that you had an alternate way of doing things. I > > In the Windows version, I have a function like: scs2ascii(printer, byte); > it gets called with each new byte retrieved from the AS/400. What makes > this different from the scs2xxx programs is that it can't go back and > read more from the stream, it can only get its input from what's passed to > it. -- so it has to remember where it left off so it knows what the next > byte it's given will be used for...
Would porting to windows be easier if the following could be done: 1. lp5250d always writes the SCS stream received from the iSeries to a temporary file, say c:\tn5250\tmp\lp5250d123.scs 2. After writing to the temp file is complete, lp5250d calls the appropriate conversion program with the temp file name as an argument and the destination file name as another argument, something like: scs2ascii --infile=c:\tn5250\tmp\lp5250d123.scs --outfile=c:\tn5250\tmp\lp5250d123.txt 3. scs2* work basically unchanged from what they are now, except that they can read from a file in addition to stdin and output to a file in addition to stdout. 4. After scs2* is done, lp5250d deletes the temporary file I have no idea if these suggestions are any good, or if performance would be any better or worse than using a pipe. I also have no idea how to do step 2 on windows (how do you pass arguments to programs on windows?). But if these steps are possible I think they would make porting far easier since scs2* would be basically unchanged. James Rich [EMAIL PROTECTED] _______________________________________________ This is the Linux 5250 Development Project (LINUX5250) mailing list To post a message email: [EMAIL PROTECTED] To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/linux5250 or email: [EMAIL PROTECTED] Before posting, please take a moment to review the archives at http://archive.midrange.com/linux5250.
