#!  /usr/local/bin/wish8.0 -f
# text_client
#  	This file implements a client for a text editor and handles 
#	displaying and editing features

global filePrevious
global fileName
global sock
global pidVal
global updateComplete
set pidVal [pid]
set filePrevious ""
set fileName ""
set ARG_NUM 2 
# set number of arguments to 2 (port and host)
global findwhat exact_match case_sensitive search_direction
global match_length find_index
global replacewith pidval 
global cut_text cut_index start_cut cut_index
global filetype sock filePrevious fileName 
global port host
global ERROR 
set ERROR(permission) -2
set ERROR(clash) -3


# configure tags
if { $argc == [expr $ARG_NUM -1] } {
	set port [lindex $argv 0]
	set host localhost
} elseif { $argc == $ARG_NUM } {
	set port [lindex $argv 0]
	set host [lindex $argv 1]
} else {
        set port 2542
        set host localhost
     #   puts "Usage: textClient.tk8 port \[host\]"
     #   exit 
}
	
 source ffeat
 source efeat
 source dedit
 source dfeat
 source tfeat
# source filefeatures.tk8
# source editfeatures.tk8
#  source displayeditor.tk8
#  source displayfeatures.tk8
#  source tagfeatures.tk8 
# source "c:\\muse1229\\ffeat"
# source "c:\\muse1229\\efeat"
# source "c:\\muse1229\\dedit"
# source "c:\\muse1229\\dfeat"
# source "c:\\muse1229\\tfeat"
