Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. /* Test REXX UnZip API */
  2. call RxFuncAdd 'UZLoadFuncs', 'UNZIP32', 'UZLoadFuncs'
  3. call UZLoadFuncs
  4.  
  5. parse arg all
  6.  
  7. say; say 'Demonstrating UZUnZip' UZUnZip(all,'TEST.')
  8. do num=1 to test.0
  9.   say num':'test.num
  10. end
  11.  
  12. /*** Demonstrate UZFileTree ***/
  13. fname = 'g:\cqc\channel1\12-30.qwk'
  14. say; say 'Demonstrating UZFileTree by displaying all entries in',
  15.           fname
  16. exc.0 = 2
  17. exc.1 = '*.dat'
  18. exc.2 = '*.ndx'
  19. call UZFileTree fname, 'files','','exc'
  20. do num=1 to files.0
  21.   say num':'files.num
  22. end
  23.  
  24. say; say 'Demonstrating UZUnZipToVar -' UZUnZipToVar(fname,'CONTROL.DAT')
  25.  
  26.  
  27. test. = 0
  28. say; say 'Demonstrating UZUnZipToVar -' UZUnZipToVar(fname,'CONTROL.DAT','test.')
  29. SAY "Test =" test.0
  30. do num=1 to test.0
  31.   say num':'test.num
  32. end
  33.  
  34. test. = 0
  35. say; say 'Demonstrating UZUnZipToStem -' UZUnZipToStem('\SourceCode\cqc\cqcmain.zip','test',"*.rch",,'T')
  36. call recout "test"
  37.  
  38. say; say 'Demonstrating UZVer -' UZVer()
  39.  
  40. call UZDropFuncs
  41. exit
  42.  
  43. recout: PROCEDURE EXPOSE test.
  44. parse arg this
  45. say this "Contains" value(this'.0') "entries"
  46. do num=1 to value(this'.0')
  47.   tval = value(this'.'num)
  48.   say "Got" this'.'num':' tval
  49.   if Right(tval,1) = '/' then
  50.      call recout this'.'left(tval,length(tval)-1)
  51.   else
  52.      say "Contains:" value(this'.tval')
  53. end
  54. return
  55.