structering the core some more

This commit is contained in:
Axel Kittenberger 2018-03-27 08:54:14 +02:00
parent 5b8be27860
commit 138eeb350f
10 changed files with 46 additions and 29 deletions

View File

@ -1,8 +1,7 @@
/*
| core.c
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| core.c from Lsyncd - Live (Mirror) Syncing Demon
|
|
| This code assumes you have a 100 character wide display to view it (when tabstop is 4)
|
| License: GPLv2 (see COPYING) or any later version
| Authors: Axel Kittenberger <axkibe@gmail.com>
@ -42,6 +41,10 @@
#include "smem.h"
#include "pipe.h"
#ifdef WITH_INOTIFY
#include "inotify.h"
#endif
/*
| The Lua part of Lsyncd
*/

View File

@ -1,13 +1,13 @@
/*
| inotify.c from Lsyncd - Live (Mirror) Syncing Demon
|
|
| Event interface for Lsyncd to Linux´ inotify.
|
|
| License: GPLv2 (see COPYING) or any later version
|
| Authors: Axel Kittenberger <axkibe@gmail.com>
|
| -----------------------------------------------------------------------
|
| Event interface for Lsyncd to Linux´ inotify.
*/
#include "lsyncd.h"
@ -38,6 +38,8 @@
#include "smem.h"
#include "log.h"
#include "inotify.h"
/*
| Event types.

22
core/inotify.h Normal file
View File

@ -0,0 +1,22 @@
/*
| inotify.h from Lsyncd - Live (Mirror) Syncing Demon
|
|
|
| License: GPLv2 (see COPYING) or any later version
| Authors: Axel Kittenberger <axkibe@gmail.com>
*/
#ifndef LSYNCD_INOTIFY_H
#define LSYNCD_INOTIFY_H
#ifndef WITH_INOTIFY
# error "Do not include inotify.h when not configured to use inotify."
#endif
extern void register_inotify(lua_State *L);
extern void open_inotify(lua_State *L);
#endif

View File

@ -1,9 +1,8 @@
/*
| log.c
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| log.c from Lsyncd - Live (Mirror) Syncing Demon
|
|
| Logging
| Logging.
|
|
| This code assumes you have a 100 character wide display to view it (when tabstop is 4)

View File

@ -1,5 +1,6 @@
/*
| log.h
| log.h from Lsyncd - Live (Mirror) Syncing Demon
|
|
| Logging
|

View File

@ -123,13 +123,5 @@ extern void observe_fd(
extern void nonobserve_fd(int fd);
/*
* inotify
*/
#ifdef WITH_INOTIFY
extern void register_inotify(lua_State *L);
extern void open_inotify(lua_State *L);
#endif
#endif

View File

@ -1,13 +1,10 @@
/*
| pipe.c
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| pipe.c from Lsyncd - Live (Mirror) Syncing Demon
|
|
| Manages the pipes used to communicate with spawned subprocesses (usually rsync).
|
|
| This code assumes you have a 100 character wide display to view it (when tabstop is 4)
|
| License: GPLv2 (see COPYING) or any later version
| Authors: Axel Kittenberger <axkibe@gmail.com>
*/

View File

@ -1,8 +1,10 @@
/*
| pipe.h
| pipe.h from Lsyncd - Live (Mirror) Syncing Demon
|
|
| Manages the pipes used to communicate with spawned subprocesses (usually rsync).
|
|
| License: GPLv2 (see COPYING) or any later version
| Authors: Axel Kittenberger <axkibe@gmail.com>
*/

View File

@ -1,6 +1,5 @@
/*
| smem.c
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| smem.c from Lsyncd - Live (Mirror) Syncing Demon
|
|
| Simple "secured" memory management.
@ -11,8 +10,6 @@
| runs out of memory it goes instead into oom-killer mode.
|
|
| This code assumes you have a 100 character wide display to view it (when tabstop is 4)
|
| License: GPLv2 (see COPYING) or any later version
| Authors: Axel Kittenberger <axkibe@gmail.com>
*/

View File

@ -1,8 +1,10 @@
/*
| smem.h
| smem.h from Lsyncd - Live (Mirror) Syncing Demon
|
|
| Simple "secured" memory management.
|
|
| License: GPLv2 (see COPYING) or any later version
| Authors: Axel Kittenberger <axkibe@gmail.com>
*/