# "Dirty hack" for PNM-Problem (Re: Question regarding PNM-Format (OS/2))

Stefan Gombar (e9125065@student.tuwien.ac.at)
Thu, 09 Apr 98 09:46:59

- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
- Next message: becka@rz.uni-duesseldorf.de: "Re: Question regarding PNM-Format (OS/2)"
- Previous message: Rogier Wolff: "Re: Question regarding PNM-Format (OS/2)"

On Thu, 9 Apr 1998 00:09:40 +0200 (MET DST), Rogier Wolff wrote:

>(People from the Unix arena rather have everybody follow the specs
>instead of everybody creating ad-hoc workarounds for every bug that
>crops up. Please complain to the Impos/2 people about this.... ;-)

Yes. I will :-)

>(Unix people also like to make small tools that do just one thing.
>How a about a de-comment tool.....)

OS/2 people are writing little tools,too. :-)
Here is the little script I wrote:

tempname is the file from 'scanimage ...>tempname'
tempname2 is the new file, which will be 20 Bytes shorter... :-)

/* Rexx script for converting SANE PNM to Impos/2 PNM */

i=0
rc=STREAM(tempname,'C','OPEN')
rc=STREAM(tempname2,'C','OPEN')
do while CHARS(tempname)<>0
character=CHARIN(tempname)
i=i+1
if (i<4)|(i>23) then rc=CHAROUT(tempname2,character)
if i=23 then do
filecontent=CHARIN(tempname,24,CHARS(tempname))
rc=CHAROUT(tempname2,filecontent)
leave
end
end
rc=STREAM(tempname,'C','CLOSE')
rc=STREAM(tempname2,'C','CLOSE')

Thanks for the help.

Best regards,

Stefan

-----------------------------------
Stefan GOMBAR
Member of TeamOS/2
Certified OS/2 Engineer

email: e9125065@stud1.tuwien.ac.at

    --
    Source code, list archive, and docs: http://www.mostang.com/sane/
    To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com

- Next message: becka@rz.uni-duesseldorf.de: "Re: Question regarding PNM-Format (OS/2)"
- Previous message: Rogier Wolff: "Re: Question regarding PNM-Format (OS/2)"