Stuff added
This commit is contained in:
parent
300397b61e
commit
b073219efd
33
xfone/config.tcl
Normal file
33
xfone/config.tcl
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
#!/usr/local/bin/wish8.4
|
||||||
|
# Copyright (c) 2005, Dan Ponte
|
||||||
|
#
|
||||||
|
# config.tcl - configureation
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
# 4. Neither the name of the University nor the names of its contributors
|
||||||
|
# may be used to endorse or promote products derived from this software
|
||||||
|
# without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
|
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
# SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
# $Amigan: phoned/xfone/config.tcl,v 1.1 2005/06/26 16:51:00 dcp1990 Exp $
|
||||||
|
|
||||||
|
#defaults
|
||||||
|
set sockfile "/tmp/phoned.sock"
|
31
xfone/init.tcl
Normal file
31
xfone/init.tcl
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#!/usr/local/bin/wish8.4
|
||||||
|
# Copyright (c) 2005, Dan Ponte
|
||||||
|
#
|
||||||
|
# init.tcl - initialisation
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
# 4. Neither the name of the University nor the names of its contributors
|
||||||
|
# may be used to endorse or promote products derived from this software
|
||||||
|
# without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
|
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
# SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
# $Amigan: phoned/xfone/init.tcl,v 1.1 2005/06/26 16:51:00 dcp1990 Exp $
|
||||||
|
logindlg
|
@ -27,8 +27,23 @@
|
|||||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
# SUCH DAMAGE.
|
# SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
# $Amigan: phoned/xfone/maindlg.tcl,v 1.1 2005/06/26 04:47:20 dcp1990 Exp $
|
# $Amigan: phoned/xfone/maindlg.tcl,v 1.2 2005/06/26 16:51:00 dcp1990 Exp $
|
||||||
# vars
|
# vars
|
||||||
|
proc logindlg {} {
|
||||||
|
toplevel .login
|
||||||
|
frame .login.m -width 5c -height 2c
|
||||||
|
grid .m -row 0 -column 0
|
||||||
|
label .login.m.lo -text "Login:"
|
||||||
|
entry .login.m.loge
|
||||||
|
grid .login.m.lo .login.m.loge -row 0
|
||||||
|
label .login.m.pa -text "Pass:"
|
||||||
|
entry .login.m.pase -show "*"
|
||||||
|
grid .login.m.pa .login.m.pase -row 1
|
||||||
|
button .login.m.log -text "Login" -command {loginProc [.login.m.loge get] [.login.m.pase get]}
|
||||||
|
button .login.m.cancel -text "Cancel" -command {destroy .login}
|
||||||
|
grid .login.m.log -row 0 -column 0 -sticky ew
|
||||||
|
grid .login.m.cancel -row 0 -column 1 -sticky ew
|
||||||
|
}
|
||||||
set prj .mbar.project
|
set prj .mbar.project
|
||||||
set phdm .mbar.phoned
|
set phdm .mbar.phoned
|
||||||
#frame
|
#frame
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/local/bin/wish8.4
|
#!/usr/local/bin/wish8.4
|
||||||
# Copyright (c) 2005, Dan Ponte
|
# Copyright (c) 2005, Dan Ponte
|
||||||
#
|
#
|
||||||
# xfone.tcl - interface to phoned - main script
|
# phoned.tcl - Tcl interface to phoned's socket using my udom package
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
# modification, are permitted provided that the following conditions
|
# modification, are permitted provided that the following conditions
|
||||||
@ -27,8 +27,22 @@
|
|||||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
# SUCH DAMAGE.
|
# SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
# $Amigan: phoned/xfone/phoned.tcl,v 1.3 2005/06/26 16:08:19 dcp1990 Exp $
|
# $Amigan: phoned/xfone/phoned.tcl,v 1.4 2005/06/26 16:51:00 dcp1990 Exp $
|
||||||
load ./udom.so
|
load ./udom.so
|
||||||
set sockfile "/tmp/phoned.sock"
|
|
||||||
set fph [udom -file $sockfile]
|
proc openSock {sfile} {
|
||||||
close $fph
|
set os [udom -file $sfile]
|
||||||
|
fconfigure $os -buffering line
|
||||||
|
return $os
|
||||||
|
}
|
||||||
|
|
||||||
|
proc parseres {res} {
|
||||||
|
}
|
||||||
|
|
||||||
|
proc login {user pass} {
|
||||||
|
global sh
|
||||||
|
puts $sh {login $user $pass}
|
||||||
|
parseres [gets $sh]
|
||||||
|
}
|
||||||
|
|
||||||
|
set $sh [openSock $sockfile]
|
||||||
|
@ -27,5 +27,8 @@
|
|||||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
# SUCH DAMAGE.
|
# SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
# $Amigan: phoned/xfone/xfone.tcl,v 1.1 2005/06/26 04:47:20 dcp1990 Exp $
|
# $Amigan: phoned/xfone/xfone.tcl,v 1.2 2005/06/26 16:51:00 dcp1990 Exp $
|
||||||
|
source config.tcl
|
||||||
|
source phoned.tcl
|
||||||
source maindlg.tcl
|
source maindlg.tcl
|
||||||
|
source init.tcl
|
||||||
|
Loading…
Reference in New Issue
Block a user