summaryrefslogtreecommitdiff
path: root/misc/estic/files/patch-ac
blob: 5b9a65ac60eca55f6d5b6ee710c8f549837426a2 (plain) (blame)
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
These were mailed to jhs@
by uz@wuschel.ibb.schwaben.com (Ullrich von Bassewitz)
They were titled:
	Written by Oliver von Bueren, ovb@swissmail.com, 12-Nov-1996 
	The following is only an addition to the ESTIC program, which is Copyright
	by Ullrich von Bassewitz. It's free to integrate into ESTIC as long as
	the terms for the original program from UvB are met.  
	There is absolutely no guarantee that it will work on any other system,
	it just works for me on my system.

I Julian Stacey <jhs@freebsd.org> have tried compiling without the 
	Port->DTROff ();
patch & can confirm for Ullrich, it is necessary, without it, I get
a communications timeout. Thanks Oliver.

*** estic/devstate.cc.orig	Sat Sep 14 15:40:16 1996
--- estic/devstate.cc	Tue Nov 12 20:11:06 1996
***************
*** 622,628 ****
  	    if (DevNum + 21 == E.Info.U % 256) {
  		if (GetState (stBusy) == 0) {
  		    // Get the duration
! 		    ForcedRingEnd = Time () + TimeDiff (E.Info.U / 256);
  		    // Set the new state
  		    SetState (stForcedRing | stForcedRingOn);
  		    // Send the command to the istec
--- 622,631 ----
  	    if (DevNum + 21 == E.Info.U % 256) {
  		if (GetState (stBusy) == 0) {
  		    // Get the duration
! // ovb@swissmail.com, 12-Nov-96: Added typecast (double) as the compiler 
! //				 complained about ambiguous selection 
! //				 possibilities for TimeDiff.
! 		    ForcedRingEnd = Time () + TimeDiff ((double)E.Info.U / 256);
  		    // Set the new state
  		    SetState (stForcedRing | stForcedRingOn);
  		    // Send the command to the istec
*** estic/iccom.cc.orig	Sat Sep 14 15:40:16 1996
--- estic/iccom.cc	Tue Nov 12 20:05:34 1996
***************
*** 34,39 ****
--- 34,48 ----
  #include "iccom.h"
  
  
+ /*****************************************************************************/
+ /*                      Explicit template instantiation                      */
+ /*****************************************************************************/
+ 
+ // ovb@swissmail.com, 12-Nov-96: This definition seemed to be missing.
+ #ifdef EXPLICIT_TEMPLATES
+ template class CircularBuffer<IstecMsg*>;
+ #endif
+ 
  
  /*****************************************************************************/
  /*                                   Data                                    */
***************
*** 126,131 ****
--- 135,144 ----
      // Make the RTS line active. This is needed for the new PCB of the istec
      // (beginning from version #3).
      Port->RTSOn ();
+     // ovb@swissmail.com, 12-Nov-96: Fix of Rev3.
+     // We have to turn the DTR off as this is needed for the power supply.
+     // -> Power is taken from the RTS(+) and the DTR(-) line.
+     Port->DTROff ();
  
      // Success
      return 0;
***************
*** 159,165 ****
      // Post an appropriate event
      PostEvent (evChargeUpdate);
  }
- 
  
  
  static void IstecWrite (unsigned char* Msg, unsigned BufSize)
--- 172,177 ----
*** estic/icfile.cc.orig	Sat Sep 14 15:40:16 1996
--- estic/icfile.cc	Tue Nov 12 20:06:33 1996
***************
*** 27,32 ****
--- 27,35 ----
  
  #include "syserror.h"
  
+ // ovb@swissmail.com, 12-Nov-96: This was missing to compile on FreeBSD 2.1.5
+ extern int errno;
+ 
  #include "icfile.h"