(define (tms:cutime obj) (vector-ref obj 3))
(define (tms:cstime obj) (vector-ref obj 4))
-(define (file-position . args) (apply ftell args))
-(define (file-set-position . args) (apply fseek args))
+(define file-position ftell)
+(define (file-set-position port offset . whence)
+ (let ((whence (if (eq? whence '()) SEEK_SET (car whence))))
+ (seek port offset whence)))
(define (move->fdes fd/port fd)
(cond ((integer? fd/port)
(putenv (string-append name "=" value))
(putenv name)))
+(define (unsetenv name)
+ "Remove the entry for NAME from the environment."
+ (putenv name))
+
\f
;;; {Load Paths}
;;;
(debug-enable 'debug)
(debug-enable 'backtrace)
(read-enable 'positions))
-
+
(define (load-user-init)
(let* ((home (or (getenv "HOME")
(false-if-exception (passwd:dir (getpwuid (getuid))))
(eq? (car (last-pair use-list)) the-scm-module))
(set-module-uses! module (reverse (cdr (reverse use-list)))))))
-;; Return a module that is a interface to the module designated by
+;; Return a module that is an interface to the module designated by
;; NAME.
;;
;; `resolve-interface' takes two keyword arguments:
;; is the name in the used module and SEEN is the name in the using
;; module. Note that SEEN is also passed through RENAMER, below. The
;; default is to select all bindings. If you specify no selection but
-;; a renamer, only the bindings that already exists in the used module
+;; a renamer, only the bindings that already exist in the used module
;; are made available in the interface. Bindings that are added later
;; are not picked up.
;;
(lambda (symbol)
(symbol-append prefix symbol)))
+;; This function is called from "modules.c". If you change it, be
+;; sure to update "modules.c" as well.
+
(define (process-define-module args)
(let* ((module-id (car args))
(module (resolve-module module-id #f))
(define autoloads-in-progress '())
+;; This function is called from "modules.c". If you change it, be
+;; sure to update "modules.c" as well.
+
(define (try-module-autoload module-name)
(let* ((reverse-name (reverse module-name))
(name (symbol->string (car reverse-name)))
;; The guts of the use-modules macro. Add the interfaces of the named
;; modules to the use-list of the current module, in order.
+;; This function is called by "modules.c". If you change it, be sure
+;; to change scm_c_use_module as well.
+
(define (process-use-modules module-interface-args)
(for-each (lambda (mif-args)
(let ((mod-iface (apply resolve-interface mif-args)))
(defmacro ,@args))))))
;; Export a local variable
-;;
+
+;; This function is called from "modules.c". If you change it, be
+;; sure to update "modules.c" as well.
+
(define (module-export! m names)
(let ((public-i (module-public-interface m)))
(for-each (lambda (name)