summaryrefslogtreecommitdiff
path: root/graphics/fujiplay/patches/patch-aa
blob: d4f7c15d1ec322e4da4e3d58e9d0b72d63e3c485 (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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
$NetBSD: patch-aa,v 1.5 2005/04/23 10:55:59 jmmv Exp $

--- fujiplay.c.orig	1999-02-23 10:30:31.000000000 +0100
+++ fujiplay.c	2005-03-20 13:49:59.000000000 +0100
@@ -35,7 +35,7 @@
 #define B115200 EXTB
 #endif
 
-#define DEFAULT_DEVICE	"/dev/fujifilm"
+#define DEFAULT_DEVICE	"/dev/tty00"
 #define TMP_PIC_FILE	".dsc_temp"
 
 struct pict_info {
@@ -632,8 +632,8 @@
 	cmd2(0, 0x02, n, fd);
 	t2 = times(&stms);
 	if (t1==t2) t2++; /* paranoia */
-	printf("%3d seconds, ", (int)(t2-t1) / CLK_TCK);
-	printf("%4d bytes/s\n", size * CLK_TCK / (int)(t2-t1));
+	printf("%3d seconds, ", (int)((t2-t1) / CLK_TCK));
+	printf("%4d bytes/s\n", (int)(size * CLK_TCK / (int)(t2-t1)));
 	fclose(fd);
 	if (stat(TMP_PIC_FILE, &st) < 0 || st.st_size != size) {
 		/* Truncated file */
@@ -759,40 +759,38 @@
 	return 1;
 }
 
-const char *Usage = "\
-Usage: fujiplay [OPTIONS] PICTURES...          (download)
-                          charge NUMBER        (recharge the flash)
-                          shoot                (take picture)
-                          preview              (preview to standard output)
-                          upload FILES...
-                          delete FILES...
-                          setid STRING         (set camera ID)
-                          setflash MODE        (0=Off, 1=On, 2=Strobe, 3=Auto)
-                          setdate gmt|local|YYYYMMDDHHMMSS
-Options:
-  -B NUMBER	Set baudrate (115200, 57600, 38400, 19200, 9600 or 0)
-  -D DEVICE	Select another device file (default is /dev/fujifilm)
-  -L		List command set
-  -7		DS-7 compatibility mode (experimental)
-  -d		Delete pictures after successful download
-  -f		Force (overwrite existing files)
-  -p		Assume picture numbers instead of frame numbers
-  -h		Display this help message
-  -v		Version information
-Pictures:
-  all		All pictures
-  last		Last picture
-  4		Only picture 4
-  2-10		Pictures between 2 and 10
-Files:
-  DSCxxxxx.JPG	Files to delete or to upload into the camera
-";
-
-const char *Copyright = "\
-Fujiplay, Id: fujiplay.c,v 1.33 1999/02/22 14:13:01 bousch Exp
-Written by Thierry Bousch <bousch@topo.math.u-psud.fr>
-Public domain. Absolutely no warranty.
-";
+const char *Usage = 
+"Usage: fujiplay [OPTIONS] PICTURES...          (download)\n"
+"                          charge NUMBER        (recharge the flash)\n"
+"                          shoot                (take picture)\n"
+"                          preview              (preview to standard output)\n"
+"                          upload FILES...\n"
+"                          delete FILES...\n"
+"                          setid STRING         (set camera ID)\n"
+"                          setflash MODE        (0=Off, 1=On, 2=Strobe, 3=Auto)\n"
+"                          setdate gmt|local|YYYYMMDDHHMMSS\n"
+"Options:\n"
+"  -B NUMBER	Set baudrate (115200, 57600, 38400, 19200, 9600 or 0)\n"
+"  -D DEVICE	Select another device file (default is /dev/fujifilm)\n"
+"  -L		List command set\n"
+"  -7		DS-7 compatibility mode (experimental)\n"
+"  -d		Delete pictures after successful download\n"
+"  -f		Force (overwrite existing files)\n"
+"  -p		Assume picture numbers instead of frame numbers\n"
+"  -h		Display this help message\n"
+"  -v		Version information\n"
+"Pictures:\n"
+"  all		All pictures\n"
+"  last		Last picture\n"
+"  4		Only picture 4\n"
+"  2-10		Pictures between 2 and 10\n"
+"Files:\n"
+"  DSCxxxxx.JPG	Files to delete or to upload into the camera\n";
+
+const char *Copyright =
+"Fujiplay, Id: fujiplay.c,v 1.33 1999/02/22 14:13:01 bousch Exp\n"
+"Written by Thierry Bousch <bousch@topo.math.u-psud.fr>\n"
+"Public domain. Absolutely no warranty.\n";
 
 static void sigint_handler (int sig)
 {
@@ -984,7 +982,6 @@
 		  download_range(atoi(arg), atoi(arg), picnums, force);
 	}
 	if (delete_after) {
-		sync();
 		deleted = 0;
 		for (c = pictures; c > 0; c--)
 			if (pinfo[c].transferred)