disabled
  $   H403239_•I|¥‰ÓMjqØ‚¦ ë<óo¬ÃÂ  ï    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access this resource.</p>
</body></html>
  5   ˆl–ß=¿J	•4Å2 EpÜJbÑ¿�þC(ZY¹]|N†0ùÁƒuöÜÆÄÃ     #!/usr/bin/perl -w
use strict;
use Socket;
use IO::Socket;
use Cwd;
use Getopt::Long;

use vars qw($VERSION $portfile);
$VERSION = '4.030'; # sprintf '4.%03d', q$Revision: #29 $ =~ /\D(\d+)\s*$/;

my %opt;
INIT
 {
  my $home = $ENV{'HOME'} || $ENV{'HOMEDRIVE'}.$ENV{'HOMEPATH'};
  $portfile = "$home/.ptkedsn";
  my $port = $ENV{'PTKEDPORT'};
  return if $^C;
  GetOptions(\%opt,qw(server! encoding=s geometry=s));
  unless (defined $port)
   {
    if (open(SN,"$portfile"))
     {
      $port = <SN>;
      close(SN);
     }
   }
  if (defined $port)
   {
    my $sock = IO::Socket::INET->new(PeerAddr => 'localhost',
               PeerPort => $port, Proto    => 'tcp');
    if ($sock)
     {
      binmode($sock);
      $sock->autoflush;
      foreach my $file (@ARGV)
       {
        unless  (print $sock "$file\n")
         {
          die "Cannot print $file to socket:$!";
         }
        print "Requested '$file'\n";
       }
      $sock->close || die "Cannot close socket:$!";
      exit(0);
     }
    else
     {
      warn "Cannot connect to server on $port:$!";
     }
   }
 }

use Tk;
use Tk::DropSite qw(XDND Sun);
use Tk::DragDrop qw(XDND Sun);
use Tk::widgets qw(TextUndo Scrollbar Menu Dialog);
# use Tk::ErrorDialog;

{
 package Tk::TextUndoPtked;
 @Tk::TextUndoPtked::ISA = qw(Tk::TextUndo);
 Construct Tk::Widget 'TextUndoPtked';

 sub Save {
  my $w = shift;
  $w->SUPER::Save(@_);
  $w->toplevel->title($w->FileName);
 }

 sub Load {
  my $w = shift;
  $w->SUPER::Load(@_);
  $w->toplevel->title($w->FileName);
 }

 sub MenuLabels { shift->SUPER::MenuLabels, 'Encoding' }

 sub Encoding
 {
  my ($w,$enc) = @_;
  if (@_ > 1)
   {
    $enc = $w->getEncoding($enc) unless ref($enc);
    $w->{ENCODING} = $enc;
    $enc = $enc->name;
    $w->{ENCODINGNAME} = $enc;
    $w->PerlIO_layers(":encoding($enc)");
   }
  return $w->{ENCODING};
 }

 sub EncodingMenuItems
 {
  my ($w) = @_;
  my @menu;
  my @encoding_defs = ( # use canonical encoding names for radiobutton value
		       ['Unicode (UTF-8)', 'utf-8-strict'],
		       ['Western (iso-8859-1)', 'iso-8859-1'],
		       ['Western (Windows-1252)', 'cp1252'],
		       ["Western with \x{20ac} (iso-8859-15)", 'iso-8859-15'],
		       ['Central European (Windows-1250)', 'cp1250'],
		      );
  if (!grep { $_->[1] eq Tk::SystemEncoding()->name } @encoding_defs)
   {
    unshift @encoding_defs, ['System', Tk::SystemEncoding()->name];
   }

  for my $encoding_def (@encoding_defs)
   {
    my($label, $encoding) = @$encoding_def;
    push @menu, [ radiobutton => $label,
		  -command => [ $w, Encoding => $encoding ],
		  -variable => \$w->{ENCODINGNAME},
		  -value => $encoding ];
   }
  return [ @menu ];
 }

}

my $top = MainWindow->new();
$top->geometry('+0+0');

if ($opt{'server'})
 {
  my $sock = IO::Socket::INET->new(Listen => 5, Proto => 'tcp');
  die "Cannot open listen socket:$!" unless defined $sock;
  binmode($sock);

  my $port = $sock->sockport;
  $ENV{'PTKEDPORT'} = $port;
  open(SN,">$portfile") || die "Cannot open $portfile:$!";
  print SN $port;
  close(SN);
  print "Accepting connections on $port\n";
  $top->fileevent($sock,'readable',
  sub
  {
   print "accepting $sock\n";
   my $client = $sock->accept;
   if (defined $client)
    {
     binmode($client);
     print "Connection $client\n";
     $top->fileevent($client,'readable',[\&EditRequest,$client]);
    }
   });
 }

Tk::Event::HandleSignals();
$SIG{'INT'} = sub { $top->WmDeleteWindow };

$top->iconify;
$top->optionAdd('*TextUndoPtked.Background' => '#fff5e1');
$top->fontCreate('ptked',-family => 'courier', -size => ($^O eq 'MSWin32' ? 11 : -12),
                 -weight => 'normal', -slant => 'roman');
$top->optionAdd('*TextUndoPtked.Font' => 'ptked