line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*- Mode: Perl -*- |
2
|
|
|
|
|
|
|
# Handle.pm -- |
3
|
|
|
|
|
|
|
# ITIID : $ITI$ $Header $__Header$ |
4
|
|
|
|
|
|
|
# Author : Ulrich Pfeifer |
5
|
|
|
|
|
|
|
# Created On : Thu Feb 27 15:03:57 1997 |
6
|
|
|
|
|
|
|
# Last Modified By: Ulrich Pfeifer |
7
|
|
|
|
|
|
|
# Last Modified On: Fri Feb 28 12:09:50 1997 |
8
|
|
|
|
|
|
|
# Language : CPerl |
9
|
|
|
|
|
|
|
# Update Count : 21 |
10
|
|
|
|
|
|
|
# Status : Unknown, Use with caution! |
11
|
|
|
|
|
|
|
# |
12
|
|
|
|
|
|
|
# (C) Copyright 1997, Universität Dortmund, all rights reserved. |
13
|
|
|
|
|
|
|
# |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
package NNML::Handle; |
16
|
1
|
|
|
1
|
|
990
|
use Net::Cmd; |
|
1
|
|
|
|
|
5925
|
|
|
1
|
|
|
|
|
92
|
|
17
|
1
|
|
|
1
|
|
8
|
use IO::Socket; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
18
|
1
|
|
|
1
|
|
734
|
use vars qw(@ISA); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
43
|
|
19
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
41
|
|
20
|
1
|
|
|
1
|
|
5
|
use Carp; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
283
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
@ISA = qw(Net::Cmd IO::Socket::INET); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# Snarfed from Net::Cmd; we don't expect an answer. |
25
|
|
|
|
|
|
|
sub dataend |
26
|
|
|
|
|
|
|
{ |
27
|
0
|
|
|
0
|
1
|
|
my $cmd = shift; |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
return 1 |
30
|
0
|
0
|
|
|
|
|
unless(exists ${*$cmd}{'net_cmd_lastch'}); |
31
|
|
|
|
|
|
|
|
32
|
0
|
0
|
|
|
|
|
if(${*$cmd}{'net_cmd_lastch'} eq "\015") |
|
0
|
0
|
|
|
|
|
|
33
|
0
|
|
|
|
|
|
{ |
34
|
0
|
|
|
|
|
|
syswrite($cmd,"\012",1); |
35
|
0
|
0
|
|
|
|
|
print STDERR "\n" |
36
|
|
|
|
|
|
|
if($cmd->debug); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
elsif(${*$cmd}{'net_cmd_lastch'} ne "\012") |
39
|
|
|
|
|
|
|
{ |
40
|
0
|
|
|
|
|
|
syswrite($cmd,"\015\012",2); |
41
|
0
|
0
|
|
|
|
|
print STDERR "\n" |
42
|
|
|
|
|
|
|
if($cmd->debug); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
0
|
0
|
|
|
|
|
print STDERR "$cmd>>> .\n" |
46
|
|
|
|
|
|
|
if($cmd->debug); |
47
|
|
|
|
|
|
|
|
48
|
0
|
|
|
|
|
|
syswrite($cmd,".\015\012",3); |
49
|
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
delete ${*$cmd}{'net_cmd_lastch'}; |
|
0
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |