?login_element?

Subversion Repositories NedoOS

Rev

Rev 1764 | Blame | Compare with Previous | Last modification | View Log | Download

  1.     MODULE Fetcher
  2.  
  3. fetchFromNet:
  4.        
  5.         IFDEF MSX
  6.         call Gopher.makeRequest : jr nz, .error
  7.     ELSE
  8.         call Gopher.makeRequest : jr c, .error
  9.     ENDIF
  10.        
  11.     call Gopher.loadBuffer
  12.     jp MediaProcessor.processResource
  13. .error
  14.     ld hl, .err : call DialogBox.msgBox
  15.     jp History.back
  16.    
  17. .err db "Document fetch error! Check your connection or hostname!", 0
  18.  
  19.  
  20. fetchFromFS:
  21.     call UrlEncoder.extractPath
  22. loadFile
  23.         IFDEF MSX
  24.     ld de, Gopher.requestbuffer, a, FMODE_NO_WRITE
  25.     call Dos.fopen
  26.     ld a, b, (.fp), a
  27.     ld de, outputBuffer, hl, (ramtop)
  28.     call Dos.fread
  29.     ld a, (.fp), b, a
  30.     call Dos.fclose
  31.     jp MediaProcessor.processResource
  32. .fp db 0
  33.         ELSE
  34.     ld hl, Gopher.requestbuffer
  35.     call Dos.loadBuffer
  36.     jp MediaProcessor.processResource
  37.         ENDIF
  38.     ENDMODULE