home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / hp48 / 4522 < prev    next >
Encoding:
Text File  |  1992-09-09  |  1.1 KB  |  59 lines

  1. Newsgroups: comp.sys.hp48
  2. Path: sparky!uunet!gatech!concert!seq!eldi.epfl.CH!COHEN_LA
  3. From: COHEN_LA@eldi.epfl.CH ((DANIEL COHEN-LAROQUE - CALL ME DAN -))
  4. Subject: Tree
  5. Message-ID: <920909181447.286@sic.epfl.ch>
  6. Sender: daemon@seq.uncwil.edu (Admin)
  7. Organization: UNCW news/mail gateway service
  8. Date: Wed, 9 Sep 1992 17:14:47 GMT
  9. Lines: 48
  10.  
  11. BEGIN_DOC tree.doc
  12. 09.09.1992   
  13.  
  14.    Hi all!
  15. Here is a small routine which recursively scans your HOMEDIR 
  16. to see how it is made.
  17. The inspiration comes from Eric Davis (see on horn1), but
  18. this routine is quicker.
  19. Put it in the home directory ***name it TREE***
  20. and execute it (be sure the user flag 1 is cleared --> 1 CF )
  21.  
  22. P.S. You can scroll the string with my program called scrn_v2.0
  23.    available at comp.sources.hp48
  24.  
  25.  
  26. Prog. TREE
  27. ChkS  #F4BAh
  28. Bytes 264.5
  29.  
  30. END_DOC
  31.  
  32. BEGIN_SRC tree
  33. %%HP: T(3)A(R)F(.);
  34. \<<
  35.   IF 1 FC?
  36.   THEN 1 SF "HOME
  37. "
  38. 0 TREE 1 CF
  39.   ELSE EVAL 15
  40. TVARS \-> \165 $
  41.     \<<
  42.       IF $ { } SAME
  43.       THEN UPDIR
  44. '\165' 5 STO-
  45.       ELSE '\165' 5
  46. STO+ 1 $ SIZE
  47.         FOR i $ i
  48. GET
  49. "                    "
  50. 1 \165 SUB OVER + "
  51. "
  52. + \165 ROT TREE +
  53.         NEXT
  54.       END
  55.     \>>
  56.   END
  57. \>>
  58. END_SRC
  59.