From f835793336020212b03232486aa5f76b9953a632 Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Wed, 12 Aug 2015 16:02:58 +0200 Subject: main: Import the modules all together. * scm/mcron/main.scm: Gather module imports. --- scm/mcron/main.scm | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/scm/mcron/main.scm b/scm/mcron/main.scm index 5f48379..ddd7619 100644 --- a/scm/mcron/main.scm +++ b/scm/mcron/main.scm @@ -29,12 +29,16 @@ ;; (l0ad "crontab.scm") (sic) is inlined by the makefile. All other ;; functionality comes through modules in .../share/guile/site/mcron/*.scm. +(use-modules (ice-9 getopt-long) + (ice-9 rdelim) + (ice-9 regex) + (mcron config) + (mcron core) + (mcron job-specifier) + (mcron vixie-specification) + (srfi srfi-2)) - -;; Pull in some constants set by the builder (via autoconf) at configuration -;; time. Turn debugging on if indicated. - -(use-modules (mcron config)) +;; Turn debugging on if indicated. (if config-debug (begin (debug-enable 'debug) (debug-enable 'backtrace))) @@ -44,8 +48,6 @@ ;; backwards for the first non-alphabetic character. This allows names like ;; in.cron to be accepted as an invocation of the cron command. -(use-modules (ice-9 regex) (ice-9 rdelim)) - (define command-name (match:substring (regexp-exec (make-regexp "[[:alpha:]]*$") (car (command-line))))) @@ -93,8 +95,6 @@ ;; all the others, with the --help and --version options common to all the ;; personalities. -(use-modules (ice-9 getopt-long)) - (define options (catch 'misc-error @@ -234,16 +234,6 @@ reading all the information in the users' crontabs and in /etc/crontab.\n (c-set-cron-signals))) - -;; Define the functions available to the configuration files. While we're here, -;; we'll get the core loaded as well. - -(use-modules (mcron core) - (mcron job-specifier) - (mcron vixie-specification)) - - - ;; Procedure to slurp the standard input into a string. (define (stdin->string) @@ -349,8 +339,6 @@ reading all the information in the users' crontabs and in /etc/crontab.\n ;; operation, but we leave it to the permissions on the /var/cron/tabs directory ;; to enforce this. -(use-modules (srfi srfi-2)) ;; For and-let*. - (define (process-files-in-system-directory) (catch #t (lambda () -- cgit v1.2.3