guile-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

guile/guile-core/ice-9 expect.scm


From: Thien-Thi Nguyen
Subject: guile/guile-core/ice-9 expect.scm
Date: Sat, 28 Apr 2001 12:03:42 -0700

CVSROOT:        /cvs
Module name:    guile
Changes by:     Thien-Thi Nguyen <>     01/04/28 12:03:42

Modified files:
        guile-core/ice-9: expect.scm 

Log message:
        Add commentary; nfc.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/ice-9/expect.scm.diff?cvsroot=OldCVS&tr1=1.13&tr2=1.14&r1=text&r2=text

Patches:
Index: guile/guile-core/ice-9/expect.scm
diff -u guile/guile-core/ice-9/expect.scm:1.13 
guile/guile-core/ice-9/expect.scm:1.14
--- guile/guile-core/ice-9/expect.scm:1.13      Sat Jan 29 10:04:38 2000
+++ guile/guile-core/ice-9/expect.scm   Sat Apr 28 12:03:42 2001
@@ -1,24 +1,36 @@
 ;;;;   Copyright (C) 1996, 1998, 1999 Free Software Foundation, Inc.
-;;;; 
+;;;;
 ;;;; This program is free software; you can redistribute it and/or modify
 ;;;; it under the terms of the GNU General Public License as published by
 ;;;; the Free Software Foundation; either version 2, or (at your option)
 ;;;; any later version.
-;;;; 
+;;;;
 ;;;; This program is distributed in the hope that it will be useful,
 ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 ;;;; GNU General Public License for more details.
-;;;; 
+;;;;
 ;;;; You should have received a copy of the GNU General Public License
 ;;;; along with this software; see the file COPYING.  If not, write to
 ;;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 ;;;; Boston, MA 02111-1307 USA
-;;;; 
+;;;;
 
+;;; Commentary:
 
-(define-module (ice-9 expect) :use-module (ice-9 regex))
+;; This module is documented in the Guile Reference Manual.
+;; Briefly, these are exported:
+;;  procedures: expec-select, expect-regexec
+;;   variables: expect-port, expect-timeout, expect-timeout-proc,
+;;              expect-eof-proc, expect-char-proc,
+;;              expect-strings-compile-flags, expect-strings-exec-flags,
+;;      macros: expect
 
+;;; Code:
+
+(define-module (ice-9 expect)
+  :use-module (ice-9 regex))
+
 ;;; Expect: a macro for selecting actions based on what it reads from a port.
 ;;; The idea is from Don Libes' expect based on Tcl.
 ;;; This version by Gary Houston incorporating ideas from Aubrey Jaffer.
@@ -86,7 +98,7 @@
                                                  #f)
                                       `((apply ,(cadar exprs)
                                                (,(car tests) ,s ,port)))))
-                                 (else 
+                                 (else
                                   (car exprs))))
                        body)))))
                ;; if none of the clauses matched the current string.
@@ -128,7 +140,7 @@
 ;;; timeout is an absolute time in floating point seconds.
 (define-public (expect-select port timeout)
   (let* ((secs-usecs (gettimeofday))
-        (relative (- timeout 
+        (relative (- timeout
                      (car secs-usecs)
                      (/ (cdr secs-usecs)
                         1000000))))    ; one million.
@@ -153,3 +165,4 @@
            ((< i 0) result))
        #f)))
 
+;;; expect.scm ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]