File: autopilot.diff

package info (click to toggle)
autopilot 1.21-1
  • links: PTS
  • area: main
  • in suites: sarge, woody
  • size: 84 kB
  • ctags: 23
  • sloc: ansic: 88; makefile: 59; sh: 12
file content (72 lines) | stat: -rw-r--r-- 2,108 bytes parent folder | download | duplicates (2)
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
diff -u autopilot-1.0/Makefile autopilot-1.0.new/Makefile
--- autopilot-1.0/Makefile	Mon Sep 25 20:23:51 2000
+++ autopilot-1.0.new/Makefile	Sat Oct  7 10:59:33 2000
@@ -5,6 +5,9 @@
 #CFLAGS	= -Wall -g
 #LDFLAGS = -N
 
+PALMDEVICE="/dev/palm"
+# allow maintainers to customize the device name
+
 # for production code
 CFLAGS	= -Wall -O3 -fomit-frame-pointer
 
@@ -12,7 +15,7 @@
 	$(LD) $(LDFLAGS) -o autopilot autopilot.o
 
 autopilot.o: autopilot.c
-	$(CC) $(CFLAGS) -c autopilot.c
+	$(CC) $(CFLAGS) -c autopilot.c -DPALMDEVICE=\"$(PALMDEVICE)\"
 
 install: autopilot
 	install -m 555 autopilot /usr/local/bin/autopilot
diff -u autopilot-1.0/autopilot.1 autopilot-1.0.new/autopilot.1
--- autopilot-1.0/autopilot.1	Mon Sep 25 20:22:09 2000
+++ autopilot-1.0.new/autopilot.1	Sat Oct  7 11:06:50 2000
@@ -48,6 +48,12 @@
 before inserting the palm pilot again, otherwise the -c application could
 lock on itself and not work correctly.
 
+.SH ENVIRONMENT
+
+If the 
+.B PILOTRATE
+environment is set, the value of this will overwritte the default device name.
+
 .SH AUTHOR
 .B AutoPilot
 was written by Leigh Morresi (leigh@signal-x.com), with a little help from the
Only in autopilot-1.0.new/: autopilot.1~
diff -u autopilot-1.0/autopilot.c autopilot-1.0.new/autopilot.c
--- autopilot-1.0/autopilot.c	Mon Sep 25 20:22:44 2000
+++ autopilot-1.0.new/autopilot.c	Sat Oct  7 11:00:45 2000
@@ -32,6 +32,10 @@
  * Leigh Morresi (leigh@signal-x.com)
  */
 
+#ifndef PILOTDEVICE
+#define PILOTDEVICE "/dev/palm"
+#endif
+ 
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
@@ -39,7 +43,7 @@
 #include <fcntl.h>
 
 /* global */
-const char 	*device = "/dev/palm";   /* default device if none specified on command line */
+char 	*device = PALMDEVICE;   /* default device if none specified on command line */
 char		*command;
 int		defaultDelay = 2;
 
@@ -87,6 +91,9 @@
 
   /* parse command line arguments */
   parse_args(argc, argv);
+  /* looking for $PILOTPORT */
+  if (getenv("PILOTPORT") != NULL)
+     device=getenv("PILOTPORT");
   /* open port */
   printf("autopilot: opening %s\n",device);