Changeset 8660 in project


Ignore:
Timestamp:
02/23/08 13:00:24 (10 years ago)
Author:
sjamaan
Message:

Add wmii:directory and wmii:read-lines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/3/wmiirc/trunk/wmiirc.scm

    r8633 r8660  
    3434(declare
    3535 (export wmii:connect wmii:write wmii:read
     36         wmii:read-lines wmii:directory
    3637         wmii:colrules wmii:colrules-set!
    3738         wmii:tagrules wmii:tagrules-set!
     
    9697  (9p:with-output-to-file *wmii:connection* file (lambda () (display data))))
    9798
     99(define (wmii:directory path)
     100  (9p:directory *wmii:connection* path))
     101
    98102(define (wmii:alist->rules alist)
    99103  (apply string-append
     
    108112
    109113(define (wmii:rules->alist rules)
    110   (map
    111    (lambda (rule)
    112      (let ((result (string-match "^/([^/]+)/\\s*->\\s*(.*)$" rule)))
    113        (cons (second result) (string-split (third result) "+"))))
    114    rules))
     114  (reverse
     115    (map
     116     (lambda (rule)
     117       (let ((result (string-match "^/([^/]+)/\\s*->\\s*(.*)$" rule)))
     118         (cons (second result) (string-split (third result) "+"))))
     119     rules)))
    115120
    116121(define (wmii:colrules)
     
    317322
    318323(define (wmii:tabs bar)
    319   (9p:directory *wmii:connection* bar))
     324  (wmii:directory bar))
    320325
    321326(define (wmii:quit)
Note: See TracChangeset for help on using the changeset viewer.