home *** CD-ROM | disk | FTP | other *** search
- /* print out a fax file */
- parse arg filename .
-
- faxprogram = upper(getclip('AVMFaxProgram'))
- if faxprogram = 'TRAPFAX' then do
-
- address command 'trapfax:tfaxview PRINT ' || filename
- end
- else
- do /* if else */
-
- base = filename || '.'
-
- do i = 1 to 999
- if ~exists(base || right(i, 3, '0')) then break
- end
-
- lastPage = i - 1
-
- /* extract filename base */
- lcolon = lastpos(':', filename)
- lslash = lastpos('/', filename)
- if lcolon > lslash then last = lcolon
- else last = lslash
- last = last
-
- faxFileName = right(filename, length(filename) - last)
-
- do i = 1 to 999
- if ~exists(base || right(i, 3, '0')) then break
- address command 'avm:gnu/fax2iff' '-o faxtemp:' || faxFileName || '.' || right(i, 3, '0') base || right(i, 3, '0')
- if rc = 0 then do
- address command 'avm:avmfaxprint faxtemp:' || faxFileName || '.' || right(i, 3, '0') i lastPage
- saveRC = rc
- call delete('faxtemp:' || faxFileName || '.' || right(i, 3, '0'))
- if saveRC ~= 0 then signal done
- end
- end
-
- end /*if*/
- done:
-
-