tcldrop-commits
[Top][All Lists]
Advanced

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

[Tcldrop/CVS] tcldrop/modules core.tcl


From: Philip Moore
Subject: [Tcldrop/CVS] tcldrop/modules core.tcl
Date: Mon, 01 Dec 2003 18:23:52 -0500

CVSROOT:        /cvsroot/tcldrop
Module name:    tcldrop
Branch:         
Changes by:     Philip Moore <address@hidden>   03/12/01 18:23:52

Modified files:
        modules        : core.tcl 

Log message:
        Extended the [binds] command to accept both a bindtype AND a mask 
argument.
        Example: [binds users setuser] will only return the binds with the 
users bind type and  setuser as their mask.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/tcldrop/tcldrop/modules/core.tcl.diff?tr1=1.27&tr2=1.28&r1=text&r2=text

Patches:
Index: tcldrop/modules/core.tcl
diff -u tcldrop/modules/core.tcl:1.27 tcldrop/modules/core.tcl:1.28
--- tcldrop/modules/core.tcl:1.27       Mon Dec  1 03:06:54 2003
+++ tcldrop/modules/core.tcl    Mon Dec  1 18:23:51 2003
@@ -1,6 +1,6 @@
 # core.tcl --
 #
-# $Id: core.tcl,v 1.27 2003/12/01 08:06:54 fireegl Exp $
+# $Id: core.tcl,v 1.28 2003/12/01 23:23:51 fireegl Exp $
 #
 # Copyright (C) 2003 FireEgl (Philip Moore) <address@hidden>
 #
@@ -47,7 +47,7 @@
        # Provide the users module:
        variable version {0.4}
        package provide tcldrop::core $version
-       variable rcsid {$Id: core.tcl,v 1.27 2003/12/01 08:06:54 fireegl Exp $}
+       variable rcsid {$Id: core.tcl,v 1.28 2003/12/01 23:23:51 fireegl Exp $}
        # Initialize variables:
        variable Binds
        variable Timers
@@ -307,11 +307,11 @@
        array unset Binds $type,$priority,$proc,$mask
 }
 
-proc ::tcldrop::binds {{typemask {*}}} {
+proc ::tcldrop::binds {{typemask {*}} {mask {*}}} {
        variable Binds
        set matchbinds {}
        # Search by type:
-       foreach b [lsort -dictionary [array names Binds $typemask,*]] {
+       foreach b [lsort -dictionary [array names Binds $typemask,*,*,$mask]] {
                array set bind $Binds($b)
                lappend matchbinds [list $bind(type) $bind(flags) $bind(mask) 
$bind(count) $bind(proc)]
        }




reply via email to

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