README 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 updating ChangeLog file.
  22. * Keep the indentation as the rest of the code. Following could help
  23. you with your friend emacs:
  24. (defun mc-c-mode ()
  25. "C mode with adjusted defaults for use with the Midnight commander."
  26. (interactive)
  27. (c-mode)
  28. (c-set-style "K&R")
  29. (setq c-indent-level 4
  30. c-continued-statement-offset 4
  31. c-brace-offset 0
  32. c-argdecl-indent 4
  33. c-label-offset -4
  34. c-brace-imaginary-offset 0
  35. c-continued-brace-offset 0
  36. c-tab-always-indent nil
  37. c-basic-offset 4
  38. tab-width 8
  39. comment-column 60))
  40. (setq auto-mode-alist (cons '(".*/mc/.*\\.[ch]$" . mc-c-mode)
  41. auto-mode-alist))
  42. And because I'm trying to live life on my own as libvfs.so, try to:
  43. * Make sure all exported symbols are defined in vfs.h and begin with
  44. 'vfs_'.
  45. * Do not make any references from midnight into modules like tar. It
  46. would probably pollute name space and midnight would depend on concrete
  47. configuration of libvfs. mc_setctl() and mc_ctl() are your
  48. friends. (And mine too :-).
  49. Pavel Machek
  50. pavel@ucw.cz
  51. PS: If you'd like to use my features in whole operating system, you
  52. might want to link me to rpc.nfsd. On
  53. http://atrey.karlin.mff.cuni.cz/~pavel/podfuk/podfuk.html you'll find
  54. how to do it.
  55. PPS: I have a friend, shared library called avfs, which is LD_PRELOAD
  56. capable. You can reach her at http://www.inf.bme.hu/~mszeredi/avfs.