home *** CD-ROM | disk | FTP | other *** search
- /* efax viewer */
- parse arg filename .
-
- base = filename || '.'
-
- do i = 1 to 999
- if ~exists(base || right(i, 3, '0')) then break
- end
-
- lastPage = i - 1
- currentPage = 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)
- */
-
- address command 'avm:avmfaxview' filename lastPage
-
- /*
- do forever
- address command 'avm:gnu/fax2iff' '-o faxtemp:' || faxFileName || '.' || right(currentPage, 3, '0') base || right(currentPage, 3, '0')
- if rc = 0 then do
- do forever
- address command 'avm:avmfaxview faxtemp:' || faxFileName || '.' || right(currentPage, 3, '0') currentPage lastPage
- retVal = rc
- if retVal ~= 3 then break
- end
-
- call delete('faxtemp:' || faxFileName || '.' || right(currentPage, 3, '0'))
- if retVal = 1 then do
- currentPage = currentPage - 1
- if currentPage < 1 then currentPage = 1
- end; else if retVal = 2 then do
- currentPage = currentPage + 1
- end; else if retVal = 0 then do
- signal done
- end; else do
- currentPage = currentPage + 1
- end
- end; else do
- currentPage = currentPage + 1
- end
-
- if currentPage > lastPage then signal done
- end
-
- done:
- */