summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFredrik <fredrik@krixor.xy.org>2002-01-05 13:20:50 +0000
committerFredrik <fredrik@krixor.xy.org>2002-01-05 13:20:50 +0000
commita175df21f5e3965fdfe7f73422312ea3c025ef8c (patch)
tree38ffa3b7dae24d5267b9627c24bb0819ece1ea31
parent69c760174964d96f883fdf0e22052fdf49f5471e (diff)
downloadlibgphoto2-a175df21f5e3965fdfe7f73422312ea3c025ef8c.tar.gz
Eliminated // comments for compatibility with pre-C99 compilers
(following Dan Fandrich's example in the gphoto2 core). git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@3729 67ed7778-7388-44ab-90cf-0a291f65f57c
-rw-r--r--camlibs/canon/canon.c4
-rw-r--r--camlibs/canon/library.c8
-rw-r--r--camlibs/canon/serial.c25
-rw-r--r--camlibs/canon/serial.h2
-rw-r--r--camlibs/canon/usb.c8
5 files changed, 25 insertions, 22 deletions
diff --git a/camlibs/canon/canon.c b/camlibs/canon/canon.c
index a5f242163..ab4246113 100644
--- a/camlibs/canon/canon.c
+++ b/camlibs/canon/canon.c
@@ -1068,7 +1068,7 @@ canon_int_get_thumbnail (Camera *camera, const char *name, int *length)
if (i != GP_OK) {
GP_DEBUG ("canon_usb_get_thumbnail() failed, "
"returned %i", i);
- return NULL; // XXX for now
+ return NULL; /* XXX for now */
}
break;
case GP_PORT_SERIAL:
@@ -1174,7 +1174,7 @@ canon_int_get_thumbnail (Camera *camera, const char *name, int *length)
GP_DEBUG ("Got thumbnail, extracting it with the EXIF lib.");
if (exif_parse_data (&exifdat) > 0) {
- data = exif_get_thumbnail (&exifdat); // Extract Thumbnail
+ data = exif_get_thumbnail (&exifdat); /* Extract Thumbnail */
if (data == NULL) {
int f;
char fn[255];
diff --git a/camlibs/canon/library.c b/camlibs/canon/library.c
index 4e6048990..b64fcfeda 100644
--- a/camlibs/canon/library.c
+++ b/camlibs/canon/library.c
@@ -32,7 +32,6 @@
#include <sys/stat.h>
#include <termios.h>
#include <time.h>
-//#include <ctype.h>
#include <gphoto2.h>
@@ -889,7 +888,7 @@ delete_file_func (CameraFilesystem *fs, const char *folder, const char *filename
GP_DEBUG ("delete_file_func() (previously known as camera_file_delete())");
- // initialize memory to avoid problems later
+ /* initialize memory to avoid problems later */
memset (path, 0, sizeof (path));
memset (thumbname, 0, sizeof (thumbname));
@@ -1265,8 +1264,9 @@ get_info_func (CameraFilesystem *fs, const char *folder, const char *filename,
/* FIXME GP_FILE_INFO_PERMISSIONS to add */
info->file.fields = GP_FILE_INFO_NAME | GP_FILE_INFO_TYPE;
- // | GP_FILE_INFO_PERMISSIONS | GP_FILE_INFO_SIZE;
- //info->file.fields.permissions =
+ /* | GP_FILE_INFO_PERMISSIONS | GP_FILE_INFO_SIZE;
+ info->file.fields.permissions =
+ */
if (is_movie (filename))
strcpy (info->file.type, GP_MIME_AVI);
diff --git a/camlibs/canon/serial.c b/camlibs/canon/serial.c
index 43c3c2c47..1262e5f7a 100644
--- a/camlibs/canon/serial.c
+++ b/camlibs/canon/serial.c
@@ -545,7 +545,7 @@ canon_serial_send_msg (Camera *camera, unsigned char mtype, unsigned char dir, v
gp_debug_printf (GP_DEBUG_LOW, "canon",
"No ACK received, retrying command\n");
if (try == 2) {
- //is the camera still there?
+ /* is the camera still there? */
if (!canon_serial_send_packet
(camera, PKT_EOT, camera->pl->seq_tx,
camera->pl->psa50_eot + PKT_HDR_LEN, 0))
@@ -594,8 +594,8 @@ canon_serial_recv_msg (Camera *camera, unsigned char mtype, unsigned char dir, i
return NULL;
if (type == PKT_MSG)
break;
- //uploading is special
-// if (type == PKT_ACK && mtype == 0x3 && dir == 0x21) break;
+ /* uploading is special */
+ /*if (type == PKT_ACK && mtype == 0x3 && dir == 0x21) break; */
if (type == PKT_EOT) {
gp_debug_printf (GP_DEBUG_LOW, "canon",
"Old EOT received sending corresponding ACK\n");
@@ -609,10 +609,12 @@ canon_serial_recv_msg (Camera *camera, unsigned char mtype, unsigned char dir, i
length = frag[MSG_LEN_LSB] | (frag[MSG_LEN_MSB] << 8);
/* while uploading we expect 2 ACKs and a message 0x3 0x21
* not always in the same order */
-// if (type == PKT_ACK && mtype == 0x3 && dir == 0x21) {
-// gp_debug_printf(GP_DEBUG_LOW,"canon","ignoring ACK received while waiting for MSG\n");
-// return frag;
-// }
+ /*
+ if (type == PKT_ACK && mtype == 0x3 && dir == 0x21) {
+ gp_debug_printf(GP_DEBUG_LOW,"canon","ignoring ACK received while waiting for MSG\n");
+ return frag;
+ }
+ */
if (len < MSG_HDR_LEN || frag[MSG_02] != 2) {
gp_debug_printf (GP_DEBUG_LOW, "canon",
"ERROR: message format error\n");
@@ -1142,7 +1144,7 @@ canon_serial_ready (Camera *camera)
GP_DEBUG ("canon_int_ready()");
- serial_set_timeout (camera->port, 900); // 1 second is the delay for awakening the camera
+ serial_set_timeout (camera->port, 900); /* 1 second is the delay for awakening the camera */
serial_flush_input (camera->port);
serial_flush_output (camera->port);
@@ -1268,9 +1270,10 @@ canon_serial_ready (Camera *camera)
break;
}
- // 5 seconds delay should be enough for big flash cards. By
- // experience, one or two seconds is too little, as a large flash
- // card needs more access time.
+ /* 5 seconds delay should be enough for big flash cards. By
+ * experience, one or two seconds is too little, as a large flash
+ * card needs more access time.
+ */
serial_set_timeout (camera->port, 5000);
(void) canon_serial_recv_packet (camera, &type, &seq, NULL);
if (type != PKT_EOT || seq) {
diff --git a/camlibs/canon/serial.h b/camlibs/canon/serial.h
index 6c2f8d81f..e0043369f 100644
--- a/camlibs/canon/serial.h
+++ b/camlibs/canon/serial.h
@@ -94,7 +94,7 @@ int canon_serial_ready (Camera *camera);
#define MSG_LEN_LSB 8
#define MSG_LEN_MSB 9
-// #define MSG_FFFB 12
+/* #define MSG_FFFB 12 */
diff --git a/camlibs/canon/usb.c b/camlibs/canon/usb.c
index 3a0d37cd1..fe07e59a8 100644
--- a/camlibs/canon/usb.c
+++ b/camlibs/canon/usb.c
@@ -376,8 +376,8 @@ canon_usb_dialogue (Camera *camera, int canon_funct, int *return_length,
int msgsize, status, i;
char cmd1 = 0, cmd2 = 0, *funct_descr = "";
int cmd3 = 0, read_bytes = 0, read_bytes1 = 0, read_bytes2 = 0;
- unsigned char packet[1024]; // used for sending data to camera
- static unsigned char buffer[0x9c]; // used for receiving data from camera
+ unsigned char packet[1024]; /* used for sending data to camera */
+ static unsigned char buffer[0x9c]; /* used for receiving data from camera */
/* clear this to indicate that no data is there if we abort */
if (return_length)
@@ -651,7 +651,7 @@ canon_usb_get_file (Camera *camera, const char *name, unsigned char **data, int
sprintf (payload, "12111111%s", name);
gp_debug_printf (GP_DEBUG_LOW, "canon", "canon_usb_get_file: payload %s", payload);
payload_length = strlen (payload) + 1;
- htole32a (payload, 0x0); // get picture
+ htole32a (payload, 0x0); /* get picture */
htole32a (payload + 0x4, USB_BULK_READ_SIZE);
/* the 1 is to show status */
@@ -690,7 +690,7 @@ canon_usb_get_thumbnail (Camera *camera, const char *name, unsigned char **data,
"payload %s", payload);
payload_length = strlen (payload) + 1;
- htole32a (payload, 0x1); // get thumbnail
+ htole32a (payload, 0x1); /* get thumbnail */
htole32a (payload + 0x4, USB_BULK_READ_SIZE);
/* 0 is to not show status */