summaryrefslogtreecommitdiff
path: root/comms/pilotmgr/patches/patch-aa
blob: 4b36fac1a02019402764b5d546dc200cc586108c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
$NetBSD: patch-aa,v 1.4 2002/03/23 15:29:00 magick Exp $

--- PilotMgr.pm.orig	Wed Mar 24 23:59:59 1999
+++ PilotMgr.pm
@@ -604,14 +604,18 @@
     my ($image);
 
     my (@TTYMENU) =
-	("/dev/ttya", [],
-	 "/dev/ttyb", [],
-	 "/dev/cua/a", [],
-	 "/dev/cua/b", [],
-	 "/dev/cua0", [],
-	 "/dev/cua1", [],
-	 "/dev/cua2", [],
-	 "/dev/cua3", [],
+	("/dev/tty00", [],
+	 "/dev/tty01", [],
+	 "/dev/tty02", [],
+	 "/dev/tty03", [],
+	 "/dev/ttyA0", [],
+	 "/dev/ttyA1", [],
+	 "/dev/ttyB0", [],
+	 "/dev/ttyB1", [],
+	 "/dev/ttyC0", [],
+	 "/dev/ttyC1", [],
+	 "/dev/ttyD0", [],
+	 "/dev/ttyD1", [],
 	 "/dev/pilot", [],
 	 "Other...", []);
 
@@ -1586,7 +1590,7 @@
 	do "$RCFILE";
     }
 
-    $PREFS->{'gPort'} = '/dev/ttya'
+    $PREFS->{'gPort'} = '/dev/pilot'
 	unless (exists $PREFS->{'gPort'});
     $PREFS->{'gRate'} = '9600'
 	unless (exists $PREFS->{'gRate'});
@@ -2636,7 +2640,7 @@
 
     $mon++;
     return sprintf("%02d/%02d/%02d %2d:%02d:%02d",
-		   $mon, $mday, $year, $hour, $min, $sec);
+		   $mon, $mday, 1900 + $year, $hour, $min, $sec);
 }
 
 sub loadDBList
@@ -2656,14 +2660,17 @@
 	$count_max = 0;
     }
 
-    do
-    {
-	status("Refreshing Database List", int(100 * $count++ / $count_max))
-	    if ($count_max);
-	push(@$result, $dlp->getDBInfo($i,1,0));
-	$i = $result->[-1]->{"index"}+1;
+    my $rec;
+    eval { do
+     {
+      status("Refreshing Database List", int(100 * $count++ / $count_max))
+	if ($count_max);
+      $rec = $dlp->getDBInfo($i,1,0);
+      push(@$result, $rec) if (exists $rec->{"name"} and $rec->{"name"});
+      $i = $rec->{"index"}+1;
     }
-    while ($result->[-1]->{"more"});
+    while ($rec->{"more"}); };
+
 
     fullStatus("Pilot Manager", "Refreshing Database List", 100);