1
0
mirror of https://github.com/wfjm/w11.git synced 2026-01-19 01:47:47 +00:00
wfjm.w11/tools/bin/telnet_wrapper
Walter F.J. Mueller 4732555297 - interim release w11a_V0.581 (untagged)
- new reference system
  - switched from ISE 13.3 to 14.7.
  - map/par behaviour changed, unfortunately unfavorably for w11a. 
    On Nexys3 no timing closure anymore for 80 MHz, only 72 MHz can 
    be achieved now.
- new man pages (in doc/man/man1/)
- support for Spartan-6 CMTs in PLL and DCM mode
2014-05-29 21:30:01 +00:00

56 lines
1.4 KiB
Perl
Executable File

#!/usr/bin/perl -w
# $Id: telnet_wrapper 547 2013-12-29 13:10:07Z mueller $
#
# Copyright 2009-2013 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
#
# This program is free software; you may redistribute and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 2, or at your option any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for complete details.
#
# Revision History:
# Date Rev Vers Comment
# 2009-11-07 246 1.0 Initial version
#
use 5.005; # require Perl 5.005 or higher
use strict; # require strict checking
if (scalar(@ARGV) != 2) {
print STDERR "usage: telnet_wrapper host port\n";
exit 1;
}
my $host = $ARGV[0];
my $port = $ARGV[1];
print "$host $port\n";
my $telnet = `which telnet`;
chomp $telnet;
while(1) {
my $rc = system $telnet, $host, $port;
if ($rc != 0) {
print STDERR "telnet failed with rc=$rc\n";
}
print "enter q or <^D> to quit, otherwise hit <ENTER> to reconnect: ";
my $buf;
my $nc = read STDIN, $buf, 1;
if (not defined $nc) {
print "\n";
exit 1;
}
if ($nc == 0) {
print "\n";
exit 0;
}
if ($buf eq "q") {
exit 0;
}
}