I'm trying to do sequential file i/o on a PostScript file (yes, the same old project).
I don't create the PostScript file, a Windows driver does. A note to the curious: Microsoft's PostScript driver is terrible.
The PostScript file is ASCII. However, while most lines are CR/LF terminated, certain code blocks (in particular, those that deal with TrueType font setup statements) are output with a solitary LF (0x0A) character as the line terminator.
Some compilers (Fujitsu, for example) apparently have no difficulty seeing any combination of CR/LF as valid line terminators.
CA-Realia does NOT, and so my program "fails" when it reaches these regions in the file.
So, two questions:
1) Are there any compiler directives or other means of forcing CA-Realia to recognize CRLF, CR, or LF as valid line teriminators, rather than only CRLF?
2) What would be a good work-around? I've thought of UNSTRING using LF as a delimiter. However, another complication is that I want to INDEX each "line". I'm using a buffer length of 300, and some of these "sections" of PostScript code exceed 300 bytes.
Thanks in advance.
Thomas D. Greer
Providing PostScript & PDF
Training, Development & Consulting
I don't create the PostScript file, a Windows driver does. A note to the curious: Microsoft's PostScript driver is terrible.
The PostScript file is ASCII. However, while most lines are CR/LF terminated, certain code blocks (in particular, those that deal with TrueType font setup statements) are output with a solitary LF (0x0A) character as the line terminator.
Some compilers (Fujitsu, for example) apparently have no difficulty seeing any combination of CR/LF as valid line terminators.
CA-Realia does NOT, and so my program "fails" when it reaches these regions in the file.
So, two questions:
1) Are there any compiler directives or other means of forcing CA-Realia to recognize CRLF, CR, or LF as valid line teriminators, rather than only CRLF?
2) What would be a good work-around? I've thought of UNSTRING using LF as a delimiter. However, another complication is that I want to INDEX each "line". I'm using a buffer length of 300, and some of these "sections" of PostScript code exceed 300 bytes.
Thanks in advance.
Thomas D. Greer
Providing PostScript & PDF
Training, Development & Consulting