home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / srev13g.zip / FREEUP.CMD < prev    next >
OS/2 REXX Batch file  |  1997-11-15  |  2KB  |  82 lines

  1. /*  Free up queues created by GoServe */
  2.  
  3. Say "  Free up queues created by SRE-Http (ver 1.2) "
  4. say " "
  5. say "Do NOT run this program if GoServe (using SRE-Http) is still running!"
  6. say "(it is meant to be run AFTER you shut GoServe down) "
  7. say " "
  8. say " What port did you run GoServe on (default=80)"
  9. parse pull aport
  10. if aport="" then aport=80
  11.  
  12. foo=rxqueue('d','SREF_'||aport||'_VIRTUAL')
  13. say "virtual queue: " foo
  14. foo=rxqueue('d','SREF_'||aport||'_ACCESS')
  15. say "access queue: " foo
  16. foo=rxqueue('d','SREF_'||aport||'_POSTF')
  17. say "POSTFILTER queue: " foo
  18. foo=rxqueue('d','SREF_'||aport||'_USER')
  19. say "USER queue: " foo
  20. foo=rxqueue('d','SREF_'||aport||'_ALIAS')
  21. SAY " ALIAS queue: " FOO
  22. foo=rxqueue('d','SREF_'||aport||'_VARSTORE')
  23. SAY " Varstore queue: " FOO
  24. foo=rxqueue('d','SREF_'||aport||'_PMPRINTF')
  25. SAY " PMPRINTF queue: " FOO
  26.  
  27.  
  28. do mm=1 to 40   /* delete too many */
  29.   aname="SREF_"||aport||"_t"||mm
  30.   foo=rxqueue('d',aname)
  31.   say "Remove queue: " aname foo
  32. /*  aname2="\SEM32\SREF_"||aport||"_t"mm
  33.   foo=eventsem_close(aname2)
  34.   say "sem " aname2 foo */
  35.   aname2="\PIPE\_"||aport||"_t"mm
  36.   foo=nmpipe_close(aname2)
  37.   say "Remove pipe " aname2 foo
  38.  
  39. end /* do */
  40.  
  41. say "Queue cleanup is done! "
  42.  
  43. say " Clear macrospace now? "
  44. say "  ...... caution: this might remove procedures used by other programs) ?"
  45. say " Enter 1 for YES, 0 for NO "
  46. parse pull ok
  47.      if ok=1 then do
  48.         foo=macroclear()
  49.         say "  SRE-Http routines removed from macrospace .."
  50.      end  /* Do */
  51.  
  52. exit
  53.  
  54.  
  55. /* -------------------- */
  56. /* get a yes or no , return 1 if yes */
  57. yesno:procedure expose normal reverse bold
  58. parse arg fooa , allopt,altans
  59. if altans<>" " & words(altans)>1 then do
  60.    w1=strip(word(altans,1))
  61.    w2=strip(word(altans,2))
  62.    a1=left(w1,1) ; a2=left(w2,1)
  63.    a1a=substr(w1,2) ; a2a=substr(w2,2)
  64. end
  65. else do
  66.     a1='Y' ; a1a='es'
  67.     a2='N' ; a2a='o'
  68. end  /* Do */
  69. ayn='  '||bold||a1||normal||a1a||'\'||bold||a2||normal||a2a
  70. if allopt=1 then  ayn=ayn||'\'||bold||'A'||normal||'ll'
  71.  
  72. do forever
  73.  foo1=normal||reverse||fooa||normal||ayn
  74.  call charout,  foo1 normal ':'
  75.  pull anans
  76.  if abbrev(anans,a1)=1 then return 1
  77.  if abbrev(anans,a2)=1 then return 0
  78.  if allopt=1 & abbrev(anans,'A')=1 then return 2
  79. end
  80.  
  81.  
  82.