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