Ticket #2762: mc ignores second directory argument.
[midnight-commander.git] / lib / vfs / README
blob14d43972e8ce78ff0c92a375f121e48b695c714d
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:
6 1. Distribute your copy of vfs under the GPL. Then you can freely
7 include the GPLed functions from the rest of the mc source code.
9 2. Distribute your copy of vfs under the LGPL. Then you cannot include
10 the functions outside the vfs subdirectory. You must then either
11 rewrite them or work around them in other ways.
13 ========================================================================
15 Hi!
17 I'm midnight commander's vfs layer. Before you start hacking me,
18 please read this file. I'm integral part of midnight commander, but I
19 try to go out and live my life myself as a shared library, too. That
20 means that I should try to use as little functions from midnight as
21 possible (so I'm tiny, nice and people like me), that I should not
22 pollute name space by unnecessary symbols (so I do not crash fellow
23 programs) and that I should have a clean interface between myself and
24 midnight.
26 Because I'm rather close to midnight, try to:
28 * Keep the indentation as the rest of the code. Following could help
29 you with your friend emacs:
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))
48 (setq auto-mode-alist (cons '(".*/mc/.*\\.[ch]$" . mc-c-mode)
49                        auto-mode-alist))
51 And because I'm trying to live life on my own as libvfs.so, try to:
53 * Make sure all exported symbols are defined in vfs.h and begin with
54 'vfs_'.
56 * Do not make any references from midnight into modules like tar. It
57 would probably pollute name space and midnight would depend on concrete
58 configuration of libvfs. mc_setctl() and mc_ctl() are your
59 friends. (And mine too :-).
61                                                          Pavel Machek
62                                                          pavel@ucw.cz
64 PS: If you'd like to use my features in whole operating system, you
65 might want to link me to rpc.nfsd. On
66 http://atrey.karlin.mff.cuni.cz/~pavel/podfuk/podfuk.html you'll find
67 how to do it.
69 PPS: I have a friend, shared library called avfs, which is LD_PRELOAD
70 capable. You can reach her at http://www.inf.bme.hu/~mszeredi/avfs.