From 1976980d4a272fb7fc3694c734bfc6825edfc721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 23 Jun 2022 03:23:44 +0200 Subject: Centralize (almost) all exports to :export in define-module. --- module/vulgar/color.scm | 4 ++-- module/vulgar/components.scm | 4 ++-- module/vulgar/info.scm | 5 +++-- module/vulgar/termios.scm | 21 ++++++++++++--------- 4 files changed, 19 insertions(+), 15 deletions(-) (limited to 'module/vulgar') diff --git a/module/vulgar/color.scm b/module/vulgar/color.scm index 368a823c..5f9fbe40 100644 --- a/module/vulgar/color.scm +++ b/module/vulgar/color.scm @@ -1,5 +1,5 @@ (define-module (vulgar color) - :export (color-if)) + :export (color-if color-escape)) (define-public STR-YELLOW "\x1b[0;33m") (define-public STR-RESET "\x1b[m") @@ -11,7 +11,7 @@ (begin body ...) (if pred-value STR-RESET "")))) -(define-public (color-escape n) +(define (color-escape n) (cond ((not n) "") ((char=? #\# (string-ref n 0)) (let* ((str (string-drop n 1)) diff --git a/module/vulgar/components.scm b/module/vulgar/components.scm index 740e64c3..3242ec8c 100644 --- a/module/vulgar/components.scm +++ b/module/vulgar/components.scm @@ -1,9 +1,9 @@ (define-module (vulgar components) #:use-module (datetime) #:use-module (hnh util) - #:export ()) + #:export (display-calendar-header!)) -(define-public (display-calendar-header! date) +(define (display-calendar-header! date) (let ((day (number->string (day date))) (month (number->string (month date))) (year (number->string (year date)))) diff --git a/module/vulgar/info.scm b/module/vulgar/info.scm index 0f55c942..04c19c24 100644 --- a/module/vulgar/info.scm +++ b/module/vulgar/info.scm @@ -1,10 +1,11 @@ (define-module (vulgar info) :use-module ((srfi srfi-1) :select (car+cdr)) - :use-module (srfi srfi-71)) + :use-module (srfi srfi-71) + :export (get-terminal-size)) ;; Sort-of backwards subprocess call since we want the current terminal to be ;; inherited by stty -(define-public (get-terminal-size) +(define (get-terminal-size) (let ((rpipe wpipe (car+cdr (pipe)))) (system (format #f "stty size > /proc/~s/fd/~s" (getpid) (port->fdes wpipe))) diff --git a/module/vulgar/termios.scm b/module/vulgar/termios.scm index aa26da65..713c9875 100644 --- a/module/vulgar/termios.scm +++ b/module/vulgar/termios.scm @@ -10,7 +10,10 @@ :use-module (hnh util) :export (make-termios copy-termios - tcsetattr! tcgetattr! cfmakeraw!)) + tcsetattr! tcgetattr! cfmakeraw! + + iflag oflag cflag lflag line cc ispeed ospeed + )) @@ -106,14 +109,14 @@ (list-set! lst idx v) (set-list! t lst))))) -(define-public iflag (make-termios-accessor 0)) -(define-public oflag (make-termios-accessor 1)) -(define-public cflag (make-termios-accessor 2)) -(define-public lflag (make-termios-accessor 3)) -(define-public line (make-termios-accessor 4)) -(define-public cc (make-termios-accessor 5)) -(define-public ispeed (make-termios-accessor 6)) -(define-public ospeed (make-termios-accessor 7)) +(define iflag (make-termios-accessor 0)) +(define oflag (make-termios-accessor 1)) +(define cflag (make-termios-accessor 2)) +(define lflag (make-termios-accessor 3)) +(define line (make-termios-accessor 4)) +(define cc (make-termios-accessor 5)) +(define ispeed (make-termios-accessor 6)) +(define ospeed (make-termios-accessor 7)) -- cgit v1.2.3