/libs.arc

http://github.com/alimoeeny/arc · Unknown · 28 lines · 24 code · 4 blank · 0 comment · 0 complexity · 4b5a014343c3fabe481b8431fcffb50a MD5 · raw file

  1. (map load '("strings.arc"
  2. "code.arc"
  3. "html.arc"
  4. "srv.arc"
  5. "app.arc"
  6. "prompt.arc"))
  7. ; We define 'require here, rather than in a file in load/ so that things in
  8. ; load/ can use it for load-ordering.
  9. (unless (and (bound 'required-files*) required-files*)
  10. (= required-files* (table)))
  11. (def require (file)
  12. " Loads `file' if it has not yet been `require'd. Can be fooled by changing
  13. the name ((require \"foo.arc\") as opposed to (require \"./foo.arc\")), but
  14. this should not be a problem.
  15. See also [[load]]. "
  16. (or (required-files* file)
  17. (do (set required-files*.file)
  18. (load file))))
  19. (def autoload ((o dirname "load"))
  20. " 'require each file in `dirname' ending in \".arc\".
  21. See also [[require]] "
  22. (each f (dir-exists&dir dirname)
  23. (if (endmatch ".arc" f) (require (+ dirname "/" f)))))
  24. (autoload)