README 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. NOTE: Although vfs has been meant to be implemented as a separate
  2. entity redistributable under the LGPL in its current implementation it
  3. uses GPLed code from src/. So there are two possibilities if you want
  4. to use vfs:
  5. 1. Distribute your copy of vfs under the GPL. Then you can freely
  6. include the GPLed functions from the rest of the mc source code.
  7. 2. Distribute your copy of vfs under the LGPL. Then you cannot include
  8. the functions outside the vfs subdirectory. You must then either
  9. rewrite them or work around them in other ways.
  10. ========================================================================
  11. Hi!
  12. I'm midnight commander's vfs layer. Before you start hacking me,
  13. please read this file. I'm integral part of midnight commander, but I
  14. try to go out and live my life myself as a shared library, too. That
  15. means that I should try to use as little functions from midnight as
  16. possible (so I'm tiny, nice and people like me), that I should not
  17. pollute name space by unnecessary symbols (so I do not crash fellow
  18. programs) and that I should have a clean interface between myself and
  19. midnight.
  20. Because I'm rather close to midnight, try to:
  21. * Keep the indentation as the rest of the code. Following could help
  22. you with your friend emacs:
  23. (defun mc-c-mode ()
  24. "C mode with adjusted defaults for use with the Midnight commander."
  25. (interactive)
  26. (c-mode)
  27. (c-set-style "K&R")
  28. (setq c-indent-level 4
  29. c-continued-statement-offset 4
  30. c-brace-offset 0
  31. c-argdecl-indent 4
  32. c-label-offset -4
  33. c-brace-imaginary-offset 0
  34. c-continued-brace-offset 0
  35. c-tab-always-indent nil
  36. c-basic-offset 4
  37. tab-width 8
  38. comment-column 60))
  39. (setq auto-mode-alist (cons '(".*/mc/.*\\.[ch]$" . mc-c-mode)
  40. auto-mode-alist))
  41. And because I'm trying to live life on my own as libvfs.so, try to:
  42. * Make sure all exported symbols are defined in vfs.h and begin with
  43. 'vfs_'.
  44. * Do not make any references from midnight into modules like tar. It
  45. would probably pollute name space and midnight would depend on concrete
  46. configuration of libvfs. mc_setctl() and mc_ctl() are your
  47. friends. (And mine too :-).
  48. Pavel Machek
  49. pavel@ucw.cz
  50. PS: If you'd like to use my features in whole operating system, you
  51. might want to link me to rpc.nfsd. On
  52. http://atrey.karlin.mff.cuni.cz/~pavel/podfuk/podfuk.html you'll find
  53. how to do it.
  54. PPS: I have a friend, shared library called avfs, which is LD_PRELOAD
  55. capable. You can reach her at http://www.inf.bme.hu/~mszeredi/avfs.